query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Get the value of roles
public static function getRoles() { return self::$roles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRole() \n {\n return $this->_fields['Role']['FieldValue'];\n }", "public function get_roles()\n {\n $query=$this->db->get('tbl_roles');\n return $query->result();\n }", "public function rolesForUser();", "public function & GetRoles ();", "public function list_roles(){\n $roles=$this->roles->pluck('name')->toArray();\n //el primer parametro es el separador, y el segundo para es el arreglo a seprar\n // es lo opuesto al explode que retorna una arreglo\n $string=implode(', ',$roles);\n return $string;\n\n }", "public function getRole();", "public function getRole();", "public function getRoles()\n {\n return array('1');\n }", "public function getRoles(): array;", "public function getRoles()\r\n {\r\n return $this->roles;\r\n }", "public function getRole() {}", "public function getRolesNames ();", "public function getRoles(){\n\n $roles = $this->visiteur_roles->map(function($role){\n return $role->getTitle();\n })->ToArray();\n\n $roles[]= 'ROLE_USER';\n \n return $roles;\n }", "public function getRoles()\n {\n #obsolete, I don't wnat user roles, I want the permission those roles are linked to\n # so I just need a getPermissions once, store those constants in a small session array\n #$roles = $this->roles;\n\n #d($roles);\n\n #foreach ($roles as $role) {\n # echo $role->name;\n #}\n }", "public function getRole() : string;", "public function getRoles()\n {\n $roles = $this->roles;\n if ($roles != NULL) {\n\n return explode(\" \", $roles);\n } else {\n return $this->roles;\n }\n // return ['ROLE_USER'];\n }", "public function getRoles() \n {\n return $this->roles;\n }", "public function getRoles(){\n\n return $this->_arrRoles;\n \n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "function get_role_list() {\n\t\treturn $this->db->get('system_security.security_role');\n\t\t\n\t}", "public function getRoles()\n {\n if (!is_array($this->role)) {\n return array($this->role);\n }\n return $this->role;\n }", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "abstract protected function getRoles();", "protected function getRoles() {\n return $this->roleStorage->loadMultiple();\n }", "public function getRoleId()\n {\n return $this->db->get('role_id')->result_array();\n }", "public function get_roles() {\n return DB::query(Database::SELECT, 'SELECT * FROM roles WHERE id > 1')\n ->as_object()\n ->execute($this->db);\n }", "public static function getRole(){\n $role = Auth::user()->role_id ;\n switch($role){\n case 1 :\n return \"admin\";\n break;\n case 2 :\n return \"khateeb\";\n break ;\n case 3 :\n return \"ad\";\n break;\n default:\n return \"false\";\n }\n }", "public function getAvailableRoles() ;", "public function getRoles()\n {\n return [$this->role];\n }", "public function getRoles()\n {\n return [$this->role];\n }", "public function getRole()\n\t{\n\t\t$column = self::COL_ROLE;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "function getRoles () {\n return array(\"user.image.edit\",\"user.image.view\");\n }", "public function getRole()\n {\n return $this->_getVar('user_role');\n }", "public function getRolesData()\n {\n $em = $this->getEntityManager();\n $query = $em->createQuery(\n 'SELECT p\n FROM Vlreleases\\UserBundle\\Entity\\Role p'\n \n );\n $result = $query->getResult();\n \n return $result;\n }", "public function getRoles()\n {\n $roles = Yii::$app->authManager->getRolesByUser($this->getId());\n return ArrayHelper::getColumn($roles, 'name', false);\n }", "public static function getUserRole(){\n\t\t$db = DemoDB::getConnection();\n $sql = \"SELECT *\n FROM user_role\";\n $stmt = $db->prepare($sql);\n $ok = $stmt->execute();\n if ($ok) {\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }\n\t}", "public function getRoles(): array\n {\n return [$this->role];\n }", "public static function getRoles ()\n {\n // Pulls column string from DB\n $enumStr = DB::select(DB::raw('SHOW COLUMNS FROM `user` WHERE FIELD = \"role\"'))[0]->Type;\n\n // Parse string\n preg_match_all(\"/'([^']+)'/\", $enumStr, $matches);\n\n // Return matches\n return isset($matches[1]) ? $matches[1] : [];\n }", "public function getProductionRoles();", "public function getRoles()\n\t{\n\t\t$roles = array_map(function($value)\n\t\t{\n\t\t\treturn Html::a($value, $value->links['self']);\n\t\t}, $this->entity->roles);\n\n\t\treturn join('<br>', $roles);\n\t}", "public static function roles(){\n self::init();\n\n return array_keys(AUTH_USER_ROLES);\n }", "public function getRoleAttribute(){\n \n $rolesIDs = $this->roles()->pluck('role_id')->toArray();\n $selected = 0;\n if(!empty($rolesIDs)){\n $selected = $rolesIDs[0];\n }\n return $selected;\n }", "function getRoles () {\n return array(\"user.friendRequest.edit\",\"user.friendRequest.view\");\n }", "public function roles()\n {\n\n $roles = get_editable_roles();\n $output = array();\n foreach ($roles as $key => $val) {\n $output[$key] = $val['name'];\n }\n return $output;\n }", "public function getRole(){\n return $this->role; \n }", "public function getRole() {\n\n return session('role');\n\n }", "private static function getUserRole(): array\n\t{\n\t return self::getUser()->roles;\n\t}", "public function get_role()\n {\n }", "public function getRoles() {\n $string = null;\n\n $last = end($this->roles);\n\n foreach ($this->roles as $role) {\n if ($role->role != end($last)->role) {\n $string .= $role->role . ', ';\n } else {\n $string .= $role->role;\n }\n }\n\n return $string;\n }", "public function roles($level) {\n $stmt = $this->connection->prepare(\"SELECT idRol, name, default_role FROM users_roles WHERE name = ?\");\n $stmt->bind_param(\"s\", $this->level);\n $stmt->execute();\n $result = $stmt->get_result();\n return $result->fetch_assoc();\n }", "function egsr_custom_site_roles(){\n\n return Array ( \n // STAFF_ROLE => Array (\n // 'label' => STAFF_ROLE_LABEL,\n // 'caps' => egsr_staff_cap(),\n // ),\n GROUP_EDITOR_ROLE => Array (\n 'label' => GROUP_EDITOR_ROLE_LABEL,\n 'caps' => egsr_group_editor_cap(),\n ),\n GROUP_ADMIN_ROLE => Array (\n 'label' => GROUP_ADMIN_ROLE_LABEL,\n 'caps' => egsr_group_admin_cap(),\n ),\n );\n\n}", "public function get_roles()\n {\n $users_roles = user_role_active_record::search()->where('uid', $this->uid)->exec();\n $roles = array();\n foreach ($users_roles as $users_role) {\n $roles[] = role_active_record::search()->where('rid', $users_role->rid)->execOne();\n }\n return $roles;\n }", "public function getRole(){\r\n\t\t\treturn $this->role;\r\n\t\t}", "public function getRoles()\n\t{\n\t\treturn $this->roles->toArray();\n\t}", "public function getRole() {\n return($this->role);\n }", "public function getUserRoles()\n {\n return $this->userRoles;\n }", "function get_role($roles_id)\n {\n return $this->db->get_where('roles',array('roles_id'=>$roles_id))->row_array();\n }", "function getRole()\n {\n return $this->role;\n }", "public function getRoles()\n {\n return array($this->role);\n }", "function getRole() {\n\t\treturn 1;\n\t}", "static public function getRole() {\n\t\tif(!Yii::$app->user->isGuest) {\n\t\t\tif($role = AuthAssignment::findOne(['user_id' => Yii::$app->user->identity->id]))\n\t\t\t\tif($key = array_search($role->item_name, Yii::$app->params['league_roles']))\n\t\t\t\t\treturn $key;\n\t\t\treturn self::DEFAULT_ROLE;\n\t\t}\n\t\treturn null;\n\t}", "function get_roles(){\n\t\t$this->db->select('*');\n\t\t$q = $this->db->get('user_role');\n\n\t\treturn $q->result_array();\n\t}", "public function getRoles(): array\n\t{\n\t\treturn $this->roles;\n\t}", "public function getRoles()\n {\n return array(\"ROLE_\".$this->getUserGroup());\n }", "function getRolesList(){\r\n\t\t$sql=\"select * from m_employee_roles\";\r\n\t\t$res=$this->db->query($sql);\r\n\t\tif($res->num_rows()){\r\n\t\t\treturn $res->result_array($sql);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private function _getRole()\n {\n //return role\n if(false/*logged_in*/){\n\n }else{\n $this->load->Model('user_roles/Mdl_roles');\n return $this->Mdl_roles->getRolesName();\n }\n }", "public function getRoles(): array\n {\n return $this->roles;\n }", "public function getRoles(): array\n {\n return $this->roles;\n }", "protected function get_roles_disponibles()\n\t{\n\t\t$roles_existentes = array();\n\t\t$datos = $this->db->listar_roles();\n\t\tforeach($datos as $valor) {\n\t\t\t$roles_existentes[] = strtolower($valor['rolname']);\n\t\t}\n\t\treturn $roles_existentes;\n\t}", "function getList() {\n return $this->listRole;\n }", "public function getRoles(): ?array\n {\n return $this->roles;\n }", "public function getRoles(): array\n {\n return ['admin'];\n }", "function wporphanageex_get_roles() {\n\tglobal $wpdb;\n\n\t$option = $wpdb->prefix . 'user_roles';\n\treturn get_option( $option );\n}", "public function getRoles()\n {\n\n $rolesReturn = [];\n $roles = $this->roles()->with(['role'])->get();\n\n $rolesReturn = $roles->pluck('role.name');\n\n // Add Standard role to the user roles\n\n if($rolesReturn->contains(config('user.standardRole')) === false)\n {\n $rolesReturn->push(config('user.standardRole'));\n }\n\n return $rolesReturn;\n\n }", "public function getUsers_role_role()\n {\n return $this->users_role_role;\n }", "public function getSystemRoleNames() {\n if (!isset($this->cache['roleNames']))\n return $this->cache['roleNames'];\n\n $roles = Environment::getConfig()->roles;\n $roleNames = array(\n 'administrator' => $this->getRole($roles->administrator)->name,\n 'employee' => $this->getRole($roles->employee)->name,\n 'student' => $this->getRole($roles->student)->name,\n );\n\n $this->cache->save('roleNames', $roleNames);\n return $roleNames;\n }", "function getUserRoleName()\n{\n return array_flip(getConfig('role'))[Auth::user()->role_id];\n}", "function getUserIDRoleList()\r\n\t{\r\n\t\treturn $this->UserIDRoleList;\r\n\t}", "public function getRole(): string\n {\n $roles = RoleEnum::getConstants();\n\n return $roles[$this->role][1];\n }", "public function getRoles()\n {\n return $this->userRoles->toArray();\n /*$roles = array();\n foreach ($this->userRoles as $role) {\n $roles[] = $role->getRole();\n }\n\n return $roles;*/\n }", "protected abstract function getAllowedRoles();", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }" ]
[ "0.74015695", "0.7388096", "0.7348018", "0.7334402", "0.7334308", "0.73030543", "0.73030543", "0.7288232", "0.72686857", "0.7252168", "0.7245201", "0.72406554", "0.7238209", "0.72339606", "0.7191877", "0.7188122", "0.7185147", "0.71794486", "0.71557945", "0.71557945", "0.71557945", "0.71524763", "0.71112734", "0.7105354", "0.7105354", "0.7105354", "0.7105354", "0.70972526", "0.70972526", "0.70972526", "0.70972526", "0.70972526", "0.70972526", "0.7095946", "0.70935297", "0.7089713", "0.7079386", "0.703798", "0.70262486", "0.702525", "0.702525", "0.70165503", "0.7008487", "0.6996584", "0.6973322", "0.69601965", "0.69577706", "0.694518", "0.69292635", "0.6922053", "0.6921963", "0.69218147", "0.69187707", "0.6902409", "0.6901925", "0.68943226", "0.68771654", "0.68662465", "0.6864849", "0.68587065", "0.6847263", "0.68466264", "0.68420476", "0.6819368", "0.6803361", "0.68026614", "0.6795726", "0.67919785", "0.67901325", "0.6789885", "0.67747855", "0.6770479", "0.6770146", "0.67676723", "0.6760992", "0.6756194", "0.6754595", "0.6746573", "0.6746573", "0.6733146", "0.6724748", "0.6722853", "0.67105114", "0.67079175", "0.6699146", "0.6699086", "0.66934234", "0.66890097", "0.66853046", "0.6682046", "0.6681659", "0.66795284", "0.6675103", "0.6675103", "0.6675103", "0.6675103", "0.6675103", "0.6675103", "0.6675103", "0.6675103" ]
0.71709967
18
Set the value of roles
public static function setRoles($roles) { self::$roles = $roles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SetRoles ($roles);", "public function setRoles(array $roles);", "public function setRoles($roles)\n {\n $this->roles = $roles;\n }", "public function setRolesAttribute($value): void\n {\n $this->_roles = $value;\n }", "function set_roles( $user_id, $roles ) {\r\n\r\n\t\t}", "public function setRoles(array $roles): void\n {\n $this->roles = $roles;\n }", "function setRole($value)\n\t{\n\t\t$this->setState('__role', $value);\n\t}", "public function setRoles($roles = [])\n {\n\n $rolesPermissionsToUpdate = Role::whereIn('name',$roles);\n $rolesPermissionsToDelete = $this->roles()->whereNotIn('role_id',$rolesPermissionsToUpdate->pluck('id')->toArray())->where('user_id',$this->id);\n\n UserRole::whereIn('role_id',$rolesPermissionsToDelete->pluck('id')->toArray())->where('user_id',$this->id)->delete();\n\n $diff = array_intersect($rolesPermissionsToUpdate->pluck('name')->toArray(),$roles);\n\n if (sizeOf($diff) > 0)\n {\n collect($diff)->each(function($roleName) use ($rolesPermissionsToUpdate){\n\n $role = Role::where('name',$roleName)->first();\n\n UserRole::create([\n 'user_id' => $this->id,\n 'role_id' => $role->id\n ]);\n\n });\n }\n\n }", "public function setRole() {\n\n $res= $_POST['link']->query(\"SELECT t2.perm_name FROM role_perm as t1\n JOIN permissions as t2 ON t1.perm_id = t2.perm_id\n WHERE t1.role_id = $this->rol_id\");\n\n\n foreach($res as $item)\n $this->role_perm[]= $item['perm_name'];\n }", "private function setRoles(UserRoles $roles) {\n $this->roles = $roles;\n }", "public function setRoles(array $roles)\n {\n $this->roles = array_unique($roles);\n }", "public function setRoles($roles) {\n foreach ($roles as $role) {\n $this->addRole($role);\n }\n }", "public function editRoles(array $roles){\n unset($this->roles);\n $connection = new Connection();\n $link = $connection->connect();\n $link->exec(\"DELETE FROM user_has_role WHERE user_id = '$this->id'\");\n $newRoles = new UserRoles;\n foreach ($roles as $role){\n $newRoles[] = new Role('id', $role);\n $link->exec(\"INSERT INTO user_has_role (user_id, role_id) VALUES ('$this->id', '$role')\");\n }\n $this->setRoles($newRoles);\n $connection = null;\n }", "public function setIdRole($value)\n {\n $this->_id_role = $value;\n }", "public function setRoles(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->roles = $arr;\n }", "private function setRoles() {\r\n\t\t$all_roles = array(); $role = Model_Role::retrieve(); \r\n\t\tforeach ($role->fetchEntries(array(\r\n \t\t'NAME', 'PARENT' => new Data_Column('PARENT_ROLE_ID', null, $role, 'NAME'))) as $rel)\r\n\t\t{\t\r\n \t\t$all_roles[$rel['NAME']] = array($rel['PARENT']);\r\n\t\t}\r\n\t\t\r\n\t\t// get users with role reslationship \r\n\t\t$userRole = Model_User_Role::retrieve(); \r\n\t\tforeach ($userRole->fetchEntries(array(\r\n \t\t'NAME' => new Data_Column('USER_ID', null, $userRole, 'LOGIN'),\r\n \t\t'PARENT' => new Data_Column('ROLE_ID', null, $userRole, 'NAME')), null, true) as $rel)\r\n\t\t{\t\t\t\r\n\t\t // one user can belong to more than one role\r\n\t\t\tif (array_key_exists($rel['NAME'], $all_roles))\r\n\t\t array_push($all_roles[$rel['NAME']], $rel['PARENT']);\r\n\t\t else\r\n\t\t $all_roles[$rel['NAME']] = array($rel['PARENT']);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t// now register all roles and users from database as application roles\r\n\t\tforeach ($all_roles as $name => $roles) {\r\n\t\t $this->_registerRole($name, $all_roles);\r\n\t\t}\r\n\t\t\r\n\t\t//$this->_registerRole('Guest', array());\r\n\t}", "public function saveRoles()\n {\n Yii::$app->authManager->revokeAll($this->getId()); \n\n if (is_array($this->roles)) {\n foreach ($this->roles as $roleName) {\n if ($role = Yii::$app->authManager->getRole($roleName)) {\n Yii::$app->authManager->assign($role, $this->getId());\n }\n }\n }\n }", "public function setRoles(array $roles)\n {\n return parent::setRoles($roles);\n }", "public function saveRoles($roles)\n {\n }", "public function setRoles()\n {\n if (!array_key_exists(User::ROLE_ADMINISTRATOR, Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId()))) {\n $array = Yii::$app->authManager->getRoles();\n unset($array[self::ADMINISTRATOR]);\n } else {\n $array = Yii::$app->authManager->getRoles();\n }\n\n $roles = ArrayHelper::map(Yii::$app->authManager->getRoles(), 'name', 'name');\n\n $now = Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId());\n\n //unset($roles[array_search('super_administrator', $roles)]);\n unset($roles[array_search('user', $roles)]);\n\n foreach ($roles as $key => $role) {\n $roles[$key] = Yii::t('backend', $role);\n }\n\n if (array_key_exists(User::ROLE_CUSTOMER, Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId()))) {\n $key = array_search(User::ROLE_CUSTOMER, $roles);\n $roles = array_intersect_key($roles, [$key => $roles[$key]]);\n }\n\n return $roles;\n }", "public function setRoles(?array $roles): self\n {\n $this->initialized['roles'] = true;\n $this->roles = $roles;\n\n return $this;\n }", "public function setRoleId(?string $value): void {\n $this->getBackingStore()->set('roleId', $value);\n }", "public function setRoleId(?string $value): void {\n $this->getBackingStore()->set('roleId', $value);\n }", "public function setRoles($roles): self\n {\n $this->roles = $roles[0];\n return $this;\n }", "public function setRole($value)\n {\n return $this->set('Role', $value);\n }", "public function setRoles($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->roles = $arr;\n\n return $this;\n }", "public function setRoleIdAttribute($value)\n {\n if ($value == 0) {\n } else {\n $this->attributes['role_id'] = $value;\n\n $this->attributes['role_name'] = Role::findOrFail($value)->name;\n }\n }", "public function attachRoles($roles);", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "public function replaceRoles(array $roles): void\n {\n $this->roles = $roles;\n }", "function populate_roles()\n {\n }", "private function save_new_roles(){\n\t\tupdate_option( 'war_old_user_roles', json_encode( $this->new_roles ), false );\n\t}", "public function setRoles(array $roles)\n\t{\n\t\t$this->roles = $roles;\n\t\treturn $this;\n\t}", "public function init_roles()\n {\n }", "public function set_roles($roles = array(), $user = 0) \n\t{\n\t\t// role must be an array\n\t\tif ( ! is_array($roles)) \n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// if no user passed, get current user from session\n\t\tif (intval($user) === 0)\n\t\t{\n\t\t\t$user = $this->get_user();\n\t\t}\n\n\t\t// if user is an object\n\t\tif (is_object($user) AND ($user instanceof Auth_Users_Model OR $user instanceof Simple_User)) \n\t\t{\n\t\t\t// load user from database\n\t\t\t$user_model = new Auth_Users_Model($user->id);\t\t\t\n\t\t}\n\t\telseif (intval($user) !== 0)\n\t\t{\n\t\t\t$user_model = new Auth_Users_Model(intval($user));\n\t\t}\n\n\t\tif ( ! $user_model->loaded())\n\t\t{ \n\t\t\t// if no such user, quit\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$roles_model = new Auth_Roles_Model;\n\t\t$user_roles_model = new Auth_User_Roles_Model; \n\t\t$db_roles = $roles_model->select_list('id','role');\n\t\t$db_roles_keys = array_flip($db_roles);\t\n\t\t\n\t\t$roles_to_save = array();\n\t\t\n\t\tforeach ($roles as $role) \n\t\t{\n\t\t\tif ((intval($role) !== 0) AND (array_key_exists($role, $db_roles)))\n\t\t\t{\n\t\t\t\t$roles_to_save[] = $role;\n\t\t\t} \n\t\t\telseif ((is_string($role)) AND (in_array($role, $db_roles)))\n\t\t\t{\n\t\t\t\t$roles_to_save[] = $db_roles_keys[$role];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!empty($roles_to_save))\n\t\t{\n\t\t\t$user_roles_model->delete_user_roles($user_model->id);\n\t\t\t\n\t\t\tforeach ($roles_to_save as $role)\n\t\t\t{\n\t\t\t\t$insert['user_id']=$user_model->id;\n\t\t\t\t$insert['role_id']=$role;\n\t\t\t\t$user_roles_model->insert($insert);\n\t\t\t} \n\t\t\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "function setUserIDRoleList($newVal)\r\n\t{\r\n\t\t$this->UserIDRoleList = $newVal;\r\n\t}", "protected function initRoles()\n {\n $this->roles = new ArrayCollection();\n }", "public function setRoles(array $roles): self\n {\n $this->roles = $roles;\n\n return $this;\n }", "public function assignRole(...$roles)\n {\n $roles = $this->getAllRoles(array_flatten($roles)); \n\n if ($roles === null) {\n return $this;\n }\n\n $this->roles()->saveMany($roles);\n\n return $this;\n }", "function populate_roles_230()\n {\n }", "function modifyRoles($userIdOverride=\"\",$action,$roles=array()){\n\t\t\t//\tadd\t\t\t= add roles to user\n\t\t\t//\tdelete\t\t= delete roles from user\n\t\t\t//\treload\t\t= deletes all roles and then readd from in array $roles\n\t\t\t//\tclear \t\t= delete all roles\n\t\t\t//\tdefaults \t= delete all roles then readd defaults\n\t\t\t\n\t\t\t$temp_userid = $this->user_id;\n\t\t\tif($userIdOverride!=\"\"){\n\t\t\t\t$temp_userid = $userIdOverride;\n\t\t\t}\n\t\t\t\n\t\t\t$SQLStatement = \"\";\n\t\t\t\n\t\t\tif($action == \"clear\"){\n\t\t\t\t$this->clearRoles($temp_userid);\n\t\t\t}\n\t\t\t\n\t\t\tif($action == \"add\"){\n\t\t\t\t$this->addRoles($temp_userid,$roles);\n\t\t\t}\n\t\t\t\n\t\t\tif($action == \"reload\"){\n\t\t\t\t$this->clearRoles($temp_userid);\n\t\t\t\t$this->addRoles($temp_userid,$roles);\n\t\t\t}\n\t\t\t\n\t\t\tif($action == \"defaults\"){\n\t\t\t\t$this->clearRoles($temp_userid);\n\t\t\t\t$this->addRoles($temp_userid,$this->config['app_site_user_activate_roles']);\n\t\t\t}\n\t\t\tif($action == \"delete\"){\n\t\t\t\t$this->deleteRoles($temp_userid,$roles);\n\t\t\t}\n\t\t\t\n\t}", "public function setRoles($roles)\r\n {\r\n $this->roles = $roles;\r\n\r\n return $this;\r\n }", "function editable_roles( $roles ){\n if( isset( $roles['administrator'] ) && !current_user_can('administrator') ){\n unset( $roles['administrator']);\n }\n return $roles;\n }", "public function rolesForUser();", "public function syncRoles(...$roles)\n {\n $this->roles()->detach();\n return $this->assignRole($roles);\n }", "public function testUpdateRole()\n {\n }", "public function testUpdateRole()\n {\n }", "static function setRole(&$rsData, $role)\n {\n $rsData['role'] = $role;\n }", "public function setRoles(array $roles)\n {\n $this->roles = $roles;\n\n return $this;\n }", "public function setRoles(array $roles)\n {\n $this->roles = $roles;\n\n return $this;\n }", "public function setRoles($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::ENUM, \\Google\\Cloud\\Dataproc\\V1\\GkeNodePoolTarget\\Role::class);\n $this->roles = $arr;\n\n return $this;\n }", "function populate_roles_280()\n {\n }", "function populate_roles_210()\n {\n }", "public function assignRole ($name);", "public function setAsAdmin()\n {\n if (!in_array('admin', $this->roles)) {\n $this->roles[] = 'admin';\n }\n }", "public function saveRoles($data);", "protected function setRoles($roles, string $process)\n {\n // Guess event name\n $event = $process === 'syncWithoutDetaching' ? 'attach' : $process;\n\n // If the \"attaching/syncing/detaching\" event returns false we'll cancel this operation and\n // return false, indicating that the attaching/syncing/detaching failed. This provides a\n // chance for any listeners to cancel save operations if validations fail or whatever.\n if ($this->fireModelEvent($event.'ing') === false) {\n return false;\n }\n\n // Hydrate Roles\n $roles = $this->hydrateRoles($roles)->pluck('id')->toArray();\n\n // Set roles\n $this->roles()->$process($roles);\n\n // Fire the roles attached/synced/detached event\n $this->fireModelEvent($event.'ed', false);\n\n return true;\n }", "public function setRole($role);", "public function testSetRoleUsers()\n {\n }", "function populate_roles_160()\n {\n }", "public function roles()\n {\n $this->roles = $this->Role->list($_SESSION['guild_id']);\n }", "public function setUserInRole($login, array $roles) {\n dibi::query(\"DELETE FROM users_in_roles WHERE login = %s\", $login);\n \n $newRoles = array();\n foreach ($roles as $r)\n $newRoles[] = array(\n 'login' => $login,\n 'role_id' => $r,\n );\n\n dibi::query(\"INSERT INTO users_in_roles %ex\", $newRoles);\n }", "static function add_roles(): void {\r\n\t\tself::add_acf_inner_field(self::divisions, self::roles, [\r\n\t\t\t'label' => 'Roles',\r\n\t\t\t'type' => 'repeater',\r\n\t\t\t'instructions' => '',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'collapsed' => '',\r\n\t\t\t'min' => '1',\r\n\t\t\t'max' => '',\r\n\t\t\t'layout' => 'block',\r\n\t\t\t'button_label' => 'Add role'\r\n\t\t]);\r\n\t}", "function populate_roles_260()\n {\n }", "public function set_role($role)\n {\n }", "static function assign($roles)\n {\n $org = &self::$users[self::$user][self::$org];\n\n if(!isset($org))\n $org = [];\n\n foreach((array)$roles as $role)\n array_push($org, $role);\n\n return __CLASS__;\n }", "public function setAllRoles()\n {\n Role::create(['name' => 'Member']);\n Role::create(['name' => 'Creator']);\n Role::create(['name' => 'Admin']);\n }", "public function postSave()\n {\n if (is_array($this->roles)) {\n\n self::getConnection()->delete('@system_user_role', ['user_id' => $this->getId()]);\n\n if (!array_key_exists(Role::ROLE_AUTHENTICATED, $this->roles)) {\n $this->roles[Role::ROLE_AUTHENTICATED] = self::getManager()->find('Pagekit\\User\\Entity\\Role', Role::ROLE_AUTHENTICATED);\n }\n\n foreach ($this->roles as $role) {\n self::getConnection()->insert('@system_user_role', ['user_id' => $this->getId(), 'role_id' => $role->getId()]);\n }\n }\n }", "function pilau_editable_roles( $roles ) {\n\n\t// Only admins should be able to update_core, and only admins can edit admins\n\tif ( ! current_user_can( 'update_core' ) && array_key_exists( 'administrator', $roles ) ) {\n\t\tunset( $roles['administrator'] );\n\t}\n\n\treturn $roles;\n}", "public function editable_roles($roles)\n {\n if (isset($roles['administrator']) && !current_user_can('administrator')) {\n unset($roles['administrator']);\n }\n return $roles;\n }", "function populate_roles_250()\n {\n }", "public function setRoles(array $roles)\n {\n $this->roles = new ArrayCollection();\n \n foreach ($roles as $role) {\n $this->addRole($role);\n }\n \n return $this;\n }", "function setRole($name) \n\t{\n\t\t$this->db->where('roleName',$name);\n\t\t$queryResult = $this->db->get('roles',1);\n\t\t$value = $queryResult->result();\n\t\tif ($queryResult->num_rows() > 0)\t{\n \t$this->roleID \t= $value[0]->roleID;\n \t$this->roleName = $value[0]->roleName;\n \t$this->roleDesc = $value[0]->roleDesc;\n \t$this->rstatus = $value[0]->rstatus;\n\t\t} else {\n\t\t\t$this->roleID \t= \"\";\n \t$this->roleName = \"\";\n \t$this->roleDesc = \"\";\n \t$this->rstatus = \"\";\n\t\t}\n\t}", "private function setRolesFromDB(){\n $connection = new Connection();\n $link = $connection->connect();\n $result = $link->query(\"SELECT role_id FROM user_has_role WHERE user_id = '$this->id'\");\n $roles = new UserRoles();\n foreach ($result as $record){\n $roles[] = new Role('id', $record['role_id']);\n }\n $this->setRoles($roles);\n $connection = null;\n }", "public function setRoleName(?string $value): void {\n $this->getBackingStore()->set('roleName', $value);\n }", "public function setDesiredRole($val)\n {\n $this->_propDict[\"desiredRole\"] = $val;\n return $this;\n }", "public function edit(Roles $roles)\n {\n //\n }", "public function init($roles){\n if (isset($roles)){\n $this->roles = $roles;\n $this->initiated = true;\n }\n }", "public function setAppRoles($val)\n {\n $this->_propDict[\"appRoles\"] = $val;\n return $this;\n }", "public function test_update_user_roles()\n {\n $roles = [\n Role::firstOrCreate(['display_name' => Role::ACCOUNT_MANAGER])->id,\n Role::firstOrCreate(['display_name' => Role::CASHIER])->id,\n ];\n\n $this->user->syncRoles($roles);\n\n $branchManager = Role::firstOrCreate(['display_name' => Role::BRANCH_MANAGER])->id;\n\n $this->put('users/'.$this->user->id, ['roles' => [$branchManager]])\n ->assertRedirect(route_with_hash('settings.index', '#users'))\n ->assertSessionHas('flash_notification.message', 'User details updated');\n\n self::assertCount(1, $this->user->roles);\n }", "function populate_roles_300()\n {\n }", "public function setRoleId($val)\n {\n $this->_propDict[\"roleId\"] = $val;\n return $this;\n }", "public function assignRole(...$roles)\n {\n $roles = $this->checkMultipleRole($roles)\n ->map(function ($role) {\n if (empty($role)) {\n return false;\n }\n\n return $this->getStoredRole($role);\n })\n ->filter(function ($role) {\n return $role instanceof Role;\n })\n ->map->id\n ->all();\n\n $this->roles()->sync($roles, false);\n $this->load('roles');\n\n $this->forgetCachedPermissions();\n\n return $this;\n }", "function populate_roles_270()\n {\n }", "public function setRoles($roles)\n {\n $this->roles = $roles;\n\n return $this;\n }", "public function setRoles($roles)\n {\n $this->roles = $roles;\n\n return $this;\n }", "public function setUserDefaultRoles(array $userDefaultRoles);", "public function setRoles(array $roles)\n {\n $this->roles = [];\n\n foreach ($roles as $role) {\n $this->addRole($role);\n }\n\n return $this;\n }", "static public function set_core_roles_capabilities(){\n stablish_capabilities('administrator', TA_Roles_Plugin::get_capabilities() );\n\n stablish_capabilities('subscriber', TA_Roles_Plugin::get_capabilities(array(\n 'comments_pre_aproved',\n )) );\n\n stablish_capabilities('editor', TA_Roles_Plugin::get_capabilities(array(\n 'portada',\n 'micrositio_home',\n 'article_section_edit',\n 'article_place_edit',\n 'article_tema_edit',\n 'article_tag',\n 'article_author',\n 'article_micrositio',\n 'article_micrositio_edit',\n 'menus',\n 'articles_edit',\n 'articles_publish',\n 'media_uploads',\n 'ed_impresa',\n 'fotogaleria',\n 'taller',\n 'memberships',\n 'mailtrain',\n 'comments',\n 'extra',\n 'comments_pre_aproved',\n )) );\n }", "public function setRoleLogin($value)\n {\n $this->role_login = $value;\n }", "public function setMatchedPeopleByRole(?array $value): void {\n $this->getBackingStore()->set('matchedPeopleByRole', $value);\n }", "public function setAuthenticatedRole($role);", "function reset_role( $role ) {\n $default_roles = array(\n 'administrator' => array(\n 'switch_themes' => 1,\n 'edit_themes' => 1,\n 'activate_plugins' => 1,\n 'edit_plugins' => 1,\n 'edit_users' => 1,\n 'edit_files' => 1,\n 'manage_options' => 1,\n 'moderate_comments' => 1,\n 'manage_categories' => 1,\n 'manage_links' => 1,\n 'upload_files' => 1,\n 'import' => 1,\n 'unfiltered_html' => 1,\n 'edit_posts' => 1,\n 'edit_others_posts' => 1,\n 'edit_published_posts' => 1,\n 'publish_posts' => 1,\n 'edit_pages' => 1,\n 'read' => 1,\n 'level_10' => 1,\n 'level_9' => 1,\n 'level_8' => 1,\n 'level_7' => 1,\n 'level_6' => 1,\n 'level_5' => 1,\n 'level_4' => 1,\n 'level_3' => 1,\n 'level_2' => 1,\n 'level_1' => 1,\n 'level_0' => 1,\n 'edit_others_pages' => 1,\n 'edit_published_pages' => 1,\n 'publish_pages' => 1,\n 'delete_pages' => 1,\n 'delete_others_pages' => 1,\n 'delete_published_pages' => 1,\n 'delete_posts' => 1,\n 'delete_others_posts' => 1,\n 'delete_published_posts' => 1,\n 'delete_private_posts' => 1,\n 'edit_private_posts' => 1,\n 'read_private_posts' => 1,\n 'delete_private_pages' => 1,\n 'edit_private_pages' => 1,\n 'read_private_pages' => 1,\n 'delete_users' => 1,\n 'create_users' => 1,\n 'unfiltered_upload' => 1,\n 'edit_dashboard' => 1,\n 'update_plugins' => 1,\n 'delete_plugins' => 1,\n 'install_plugins' => 1,\n 'update_themes' => 1,\n 'install_themes' => 1,\n 'update_core' => 1,\n 'list_users' => 1,\n 'remove_users' => 1,\n 'add_users' => 1,\n 'promote_users' => 1,\n 'edit_theme_options' => 1,\n 'delete_themes' => 1,\n 'export' => 1,\n ),\n \n 'editor' => array(\n 'moderate_comments' => 1,\n 'manage_categories' => 1,\n 'manage_links' => 1,\n 'upload_files' => 1,\n 'unfiltered_html' => 1,\n 'edit_posts' => 1,\n 'edit_others_posts' => 1,\n 'edit_published_posts' => 1,\n 'publish_posts' => 1,\n 'edit_pages' => 1,\n 'read' => 1,\n 'level_7' => 1,\n 'level_6' => 1,\n 'level_5' => 1,\n 'level_4' => 1,\n 'level_3' => 1,\n 'level_2' => 1,\n 'level_1' => 1,\n 'level_0' => 1,\n 'edit_others_pages' => 1,\n 'edit_published_pages' => 1,\n 'publish_pages' => 1,\n 'delete_pages' => 1,\n 'delete_others_pages' => 1,\n 'delete_published_pages' => 1,\n 'delete_posts' => 1,\n 'delete_others_posts' => 1,\n 'delete_published_posts' => 1,\n 'delete_private_posts' => 1,\n 'edit_private_posts' => 1,\n 'read_private_posts' => 1,\n 'delete_private_pages' => 1,\n 'edit_private_pages' => 1,\n 'read_private_pages' => 1,\n ),\n \n 'author' => array(\n 'upload_files' => 1,\n 'edit_posts' => 1,\n 'edit_published_posts' => 1,\n 'publish_posts' => 1,\n 'read' => 1,\n 'level_2' => 1,\n 'level_1' => 1,\n 'level_0' => 1,\n 'delete_posts' => 1,\n 'delete_published_posts' => 1,\n ),\n \n 'contributor' => array(\n 'edit_posts' => 1,\n 'read' => 1,\n 'level_1' => 1,\n 'level_0' => 1,\n 'delete_posts' => 1,\n ),\n \n 'subscriber' => array(\n 'read' => 1,\n 'level_0' => 1,\n ),\n \n 'display_name' => array(\n 'administrator' => 'Administrator',\n 'editor'\t=> 'Editor',\n 'author'\t=> 'Author',\n 'contributor' => 'Contributor',\n 'subscriber'\t=> 'Subscriber',\n ),\n \n );\n \n $role = strtolower( $role );\n \n remove_role( $role );\n \n return add_role( $role, $default_roles['display_name'][$role], $default_roles[$role] );\n}", "function egsr_change_roles_names() {\n global $wp_roles;\n \n if ( ! isset( $wp_roles ) )\n $wp_roles = new WP_Roles();\n \n $wp_site_roles = egsr_default_wp_site_roles();\n foreach ($wp_site_roles as $key => $value) {\n // Change role name\n $wp_roles->roles[$key]['name'] = $wp_roles->roles[$key]['name'] .' (Deprecated)';\n $wp_roles->role_names['contributor'] = $wp_roles->role_names[$key] .'$wp_roles->roles[$key]'; \n }\n}", "function _requireUserRolesDropdown() {\n\n\t\t//p($this->mcontents['aAllRoles']);\n\n\t\t$this->mcontents['aAllUserRoles'][0] = 'All';\n\t\tforeach( $this->mcontents['aAllRoles'] AS $sName => $aItem ) {\n\n\t\t\t$this->mcontents['aAllUserRoles'][ $aItem['id'] ] = $aItem['title'];\n\t\t}\n\t}", "public function setRole($userId, $roleId);", "public function setRole(int $role): void\n {\n $this->role = $role;\n }" ]
[ "0.8088709", "0.7991876", "0.76852554", "0.7562761", "0.7561715", "0.7505526", "0.75041556", "0.7280287", "0.7265332", "0.7256364", "0.7238928", "0.7173347", "0.7111407", "0.7030395", "0.6959332", "0.6887849", "0.6883296", "0.68714577", "0.6866016", "0.6792117", "0.67795515", "0.6775661", "0.6775661", "0.6729481", "0.6683592", "0.6663255", "0.66489893", "0.66419756", "0.66408753", "0.66408753", "0.66408753", "0.66408753", "0.66398764", "0.65906286", "0.6544082", "0.6543422", "0.6537385", "0.6501171", "0.64739895", "0.64552844", "0.6453312", "0.6430883", "0.6394215", "0.6343852", "0.6310589", "0.62654144", "0.626095", "0.62566704", "0.624157", "0.624157", "0.6236504", "0.6224749", "0.6224749", "0.62059146", "0.61960065", "0.6194556", "0.6183257", "0.618073", "0.6177877", "0.61666495", "0.616172", "0.615526", "0.6150776", "0.61434793", "0.61416984", "0.61354107", "0.61197466", "0.60907304", "0.60860014", "0.60785353", "0.606061", "0.60544187", "0.60479146", "0.6045087", "0.60415876", "0.6039982", "0.60381746", "0.603087", "0.6024347", "0.60141575", "0.59994334", "0.59895784", "0.5981742", "0.59776783", "0.5970361", "0.59688824", "0.59522426", "0.595183", "0.595183", "0.594707", "0.59378225", "0.59206885", "0.5917232", "0.59045494", "0.59000766", "0.5895882", "0.5893497", "0.58901376", "0.58893746", "0.5879821" ]
0.76381844
3
Get the value of sbus
public static function getSBUs() { return self::$sbus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBusNo():string\n {\n return $this->busNo;\n }", "public function getBusDriverID(){return $this->bus_driver_ID;}", "function getValue() {\n\t\treturn $this->sValue;\n\t}", "public function getValue() {\n\n\t\treturn trim(\n\t\t\tfile_get_contents(\n\t\t\t\tself::PINDIR.'/gpio'.$this->iPinNumber.'/value'\n\t\t\t)\n\t\t);\n\t}", "public function getAllSbus()\n {\n $sbus = sbu::get(['id']);\n\n return $sbus;\n }", "public function get_value()\n {\n }", "public function get_value()\n {\n }", "public function getvalue()\n {\n $this->flushbits();\n return $this->_out;\n }", "public function getValue(){\n \treturn $this->value;\n }", "function getValue(){\r\n\t\treturn $this->value;\r\n\t}", "function select() {\n\t\t$raw = shmop_read($this -> id, 0, $this -> size);\n\t\tif ($this -> raw === false) {\n\t\t\t$this -> val = unserialize($raw);\n\n\t\t} else {\n\t\t\t$i = strpos($raw, \"\\0\");\n\t\t\tif ($i === false) {\n\t\t\t\t$this -> val = $raw;\n\t\t\t}\n\t\t\t$this -> val = substr($raw, 0, $i);\n\n\t\t}\n\n\t\treturn $this -> val;\n\n\t}", "public function getValue()\n {\n\treturn $this->value;\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function get_value()\n\t{\n\t\treturn $this->value;\n\t}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue(){\n return $this->value;\n }", "public function getValue(){\n return $this->value;\n }", "public function get_value()\n {\n return $this->value;\n }", "public function getSap_meth () {\n\t$preValue = $this->preGetValue(\"sap_meth\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->getClass()->getFieldDefinition(\"sap_meth\")->preGetData($this);\n\treturn $data;\n}", "public function getBusiPayload()\n {\n return $this->BusiPayload;\n }", "public function getValue() {\n\t\treturn $this->data[\"value\"];\n\t}", "public function getValue(){\n return $this->_value;\n }", "public function getValue()\n {\n\t\treturn $this->value;\n\t}", "public function getBusDriverStatus(){return $this->driver_status;}", "public function getValue()\n {\n return $this->str_value;\n }", "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "public function getValue()\n\t{\n\t\treturn $this->data['value'];\n\t}", "public function get_value() {\n return $this->value;\n }", "function sequence_value() {\n\t\treturn $this->data[$this->sequence_field];\n\t}", "function getValue() {\n return $this->value;\n }", "public function getValue()\r\n {\r\n return $this->value;\r\n }", "public function getValue()\n {\n return $this->segment->value;\n }", "public function get_value() {\n\t\treturn $this->_value;\n\t}", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue()\n {\n return $this->get(self::_VALUE);\n }", "public function getValue()\n {\n return $this->get(self::_VALUE);\n }", "public function getValue(){ }", "public function getSb()\n {\n return $this->sb;\n }", "private function value()\n {\n $this->white();\n switch ($this->currentByte) {\n case '{':\n return $this->obj();\n case '[':\n return $this->arr();\n case '\"':\n case \"'\":\n return $this->string();\n case '-':\n case '+':\n case '.':\n return $this->number();\n default:\n return \\is_numeric($this->currentByte) ? $this->number() : $this->word();\n }\n }", "public function getValue()\r\n\t{\r\n\t\treturn $this->value;\r\n\t}", "function getValue() { return $this->readText(); }", "public function &getValue();", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "function get_systat_value($metric)\n{\n global $db_tables;\n\n $sql = \"SELECT * FROM \" . $db_tables[DB_NAGIOSXI][\"sysstat\"] . \" WHERE metric='\" . escape_sql_param($metric, DB_NAGIOSXI) . \"'\";\n if (($rs = exec_sql_query(DB_NAGIOSXI, $sql, false))) {\n if ($rs->MoveFirst()) {\n return $rs->fields[\"value\"];\n }\n }\n return null;\n}", "function getValue() { return $this->readText(); }", "public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}", "public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}", "public function getValue()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'value'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'value'];\n\t\t}\n\n\t\treturn '';\n\t}", "function getSystemSettingValue($code){\n\t\t\n\t\t$sql = \"SELECT value \n\t\t\t\tFROM settings\n\t\t\t\tWHERE varname = '\".$code.\"'\";\n\t\t$rslt = $this->dbclass->select($sql);\n\t\t\n\t\treturn $rslt[0]['value'];\n\t}", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }" ]
[ "0.6745653", "0.61128086", "0.60820127", "0.60101163", "0.5994296", "0.58984643", "0.58984643", "0.58166516", "0.57235056", "0.5666323", "0.56280196", "0.56067", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.5588612", "0.55688417", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.5542177", "0.55418706", "0.55418706", "0.55418706", "0.55418706", "0.55418706", "0.55335", "0.55335", "0.55298764", "0.5514317", "0.5504366", "0.5497853", "0.5491359", "0.54833657", "0.5481113", "0.54696316", "0.5463674", "0.5463674", "0.5462179", "0.54528356", "0.5412977", "0.5411949", "0.5402214", "0.5397324", "0.5395785", "0.537993", "0.537993", "0.537993", "0.5366854", "0.5366854", "0.5362472", "0.535943", "0.53441346", "0.5341327", "0.5338326", "0.5333905", "0.5330327", "0.5330327", "0.5330327", "0.5330327", "0.5330327", "0.5330327", "0.5324198", "0.5322006", "0.53204256", "0.53204256", "0.5313977", "0.5303288", "0.53009784", "0.53009784", "0.53009784", "0.53009784", "0.53009784" ]
0.54015994
70
Set the value of sbus
public static function setSBUs($sbus) { self::$sbus = $sbus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBusNo(string $busNo) : void\n {\n $this->busNo = $busNo; \n }", "public function setBuslineAttribute($value)\n {\n $this->attributes['busline'] = $value;\n }", "function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}", "function setValue($sNewValue) {\n\t\t$this->sValue = $sNewValue;\n\t}", "function setValue($value) {\n $this->value = $value;\n }", "function setValue ($value) {\n\t\t$this->_value = $value;\n\t}", "public function setValue($sValue) {\n\n $this->value = SssSBla::translateIfNeeded($sValue);\n\n }", "public function setValue($value){\n $this->_value = $value;\n }", "public function set($s) {\r\n\t\t$this->current = $s;\r\n\t}", "function set_value($value)\n\t{\n\t\t$this->value = $value;\n\t}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function set_Squad1($value)\n\t{\n\t\t$this->Squad1 = $value;\n\t}", "public function setValue( $value ) { \n $this->inputValue = $value; \n $this->value = $value;\n }", "public function setSw($x) { $this->sw = $x; }", "function setDeviceState($dserial, $state) {\n\t#$non_num_pattern = \"/[^0-9A-Z]/\";\n\t\n\t#if(preg_match($non_num_pattern, $dserial) || preg_match($non_num_pattern, $state)) {\n\t#\tdie('Non decimal character detected');\n\t#}\n\t\n\t$state = intval($state, 10);\n\t\n\tif($state == DeviceState::Off) $msg = 'off';\n\telse if($state == DeviceState::On) $msg = 'on';\n\telse die('Invalid state' . $state);\n\t\n\t$msg .= '/pi/' . $dserial;\n\t\n\t$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\tif(!$sock) die('PHP cannot create socket');\n\t\n\tif(!socket_connect($sock, SCRIPT_IP, SCRIPT_PORT)) {\n\t\tsocket_close($sock);\n\t\tdie('Cannot connect to PiHome.py ip and port at ' . SCRIPT_IP . ', ' . SCRIPT_PORT);\n\t}\n\t\n\tsocket_send($sock, $msg, strlen($msg), 0);\n\t\n\tsocket_close($sock);\n}", "public function set_value($value) {\n\t\t$this->_value = $value + 0;\n\t}", "public function setRegstateAttribute($value)\n\t{\n\t\t$this->attributes['regstate'] = strtoupper($value);\n\t}", "public function setValue($value) {\n $this->value = $value;\n }", "public function setValue($value) {\n $this->value = $value;\n }", "public function setValue($value) {\n $this->value = $value;\n }", "public function setValue($value) {\n $this->value = $value;\n }", "abstract public function setValue($value);", "public function setValue($value)\n {\n $this->value = $value;\n }", "public function setValue($value)\n {\n $this->value = $value;\n }", "public function setValue($value)\n {\n $this->value = $value;\n }", "public function setValue($value)\n {\n $this->value = $value;\n }", "public function setValue( $value )\r\n\t{\r\n\t\t$this->value = $value;\r\n\t}", "public function setSerialNumber(?string $value): void {\n $this->getBackingStore()->set('serialNumber', $value);\n }", "public function __set($sName, $xValue)\n {\n }", "public function set_value( $value ) {\n $this->value = $value;\n }", "public function setSerialNumber($value) {\n\t\tself::$_serialNumber = $value;\n\t}", "function __set($name,$value){\r\n switch ($name){\r\n case 'gas': // daca aveam in loc de case, return numai trebuia sa pun break\r\n if(is_numeric($value)) $this->gas = $value;\r\n break; // la return nu se pune break!!\r\n case new Exception(\"Gas tre sa fie numeric\"); //arunca o eroare\r\n break;\r\n }\r\n }", "final public function __set($index, $value)\n {\n $this->_registry->$index = $value;\n }", "public function setValue($value) {\n $this->value = $value->value;\n }", "public static function setFuel($name, $value, $lock = false) {\n\t\t$wire = ProcessWire::getCurrentInstance();\n\t\tif($wire->wire('log')) $wire->wire('log')->deprecatedCall();\n\t\t$wire->fuel()->set($name, $value, $lock);\n\t}", "public function setValue($v){\n $this->value = $v;\n }", "function setBreve($sbreve = '')\n {\n $this->sbreve = $sbreve;\n }", "private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}", "public function set()\n {\n if ( ! $this->value ) {\n $this->generate();\n }\n }", "function setObserv($sobserv = '')\n {\n $this->sobserv = $sobserv;\n }", "function setObserv($sobserv = '')\n {\n $this->sobserv = $sobserv;\n }", "public function setSku(?string $value): void {\n $this->getBackingStore()->set('sku', $value);\n }", "function setWebsiteS(string $websiteS): void{\n\t\t$this->websiteS = $websiteS;\n\t}", "function setScad($scad)\n {\n $this->scad = $scad;\n }", "public function setSb($sb)\n {\n $this->sb = $sb;\n\n return $this;\n }", "public function setValue($value)\n {\n $this->value = (string) $value;\n }", "public function setHasRtbus($value) {\n return $this->set(self::HAS_RTBUS, $value);\n }", "function update_bus($new,$old)\n {\n $query=$this->db2->query(\"UPDATE bus_type SET buses_type='$new' WHERE bus_type='$old' \");\n if($query)\n return 1;\n else\n return 0;\n }", "public function setValue2($value){\n $this->_value2 = $value;\n }", "public function SetValue($value)\n\t{\n\t\t$this->value = $value;\n\t}", "function setStreet1( &$value )\n {\n $this->Street1 = $value;\n }", "public function setBaseValue() {\n $sessionstaff = $this->Session->read('staff');\n if ($_POST['base_value'] == '') {\n $_POST['base_value'] = 0;\n }\n $this->AccessStaff->query('update access_staffs set base_value=' . $_POST['base_value'] . ' where clinic_id=' . $sessionstaff['clinic_id']);\n echo 1;\n\n die;\n }", "function setSuperada($bsuperada = 'f')\n {\n $this->bsuperada = $bsuperada;\n }", "function DENON_InputSource($id, $value) // Input Source\n{\n CSCK_SendText($id, \"SI\".$value.chr(13));\n}", "public function setValue($value)\n\t{\n\t\t$this->setViewState('Value',$value,'');\n\t}", "public function setState($value) {\n\t\tself::$_state = $value;\n\t}", "function setStreet2( &$value )\n {\n $this->Street2 = $value;\n }", "public function setSendSMS($send_sms){\n $this->send_sms = $send_sms;\n }", "public function set($name, $value){\n\t\t$_SESSION['tmobi'][$name] = $value;\n\t}", "function value( $value )\n\t{\n\t\t$this->value = $value;\n\t}", "public function set($index, $value)\n {\n $value = $this->cube($value);\n parent::set($index, $value);\n }", "public function setValue($value, $encoding = 'UTF-8') {}", "public function setValue($value, $encoding = 'UTF-8') {}", "public function setValue($value)\n {\n if ($value === 'on') {\n $this->_value = 1;\n }\n $this->_value = trim($this->_db->prepareString($value));\n }", "public function setStreetAddress($value) {\n\t\tself::$_streetAddress = $value;\n\t}", "function setValue(int $field, $value) : void;", "public function getBusDriverID(){return $this->bus_driver_ID;}", "function setSorpresa($_caja){\r\n $this->sorpresa=$_caja;\r\n }", "public function getAllSbus()\n {\n $sbus = sbu::get(['id']);\n\n return $sbus;\n }", "function setValue(int $idx, int $val) {\n if ($idx > $this::SRAM_SIZE) {\n throw new \\Exception(\"Initial SRAM index out of bounds: \" . $idx);\n }\n if ($val > 255 || $val < 0) {\n throw new \\Exception(\"Initial SRAM value out of bounds: \" . $val);\n }\n\n $this->initial_sram_bytes[$idx] |= $val;\n }", "public function _set($number)\n {\n }", "function variant_set($variant, $value) {}", "function set_random_us_phone($state='*')\r\n{\r\n\t// get random state\r\n\tif ( $state == '*' )\r\n\t{\r\n\t\t$_ZIP_DATA = $this->_get_random_zip_data();\r\n\t\t$state = $_ZIP_DATA[1];\r\n\t}\r\n\t\r\n\t// get random phone\r\n\t$phone = $this->_get_random_us_phone($state, 1);\r\n\t\r\n\t// set prop\r\n\t$this->phone = $phone;\r\n\treturn;\r\n}", "public function setMaster($value){\n $this->master = $value;\n }", "public function setValue($value = true)\n {\n $this->value = $value;\n }", "public function setValue($value, $load = false);", "public function setSenderShiftId(?string $value): void {\n $this->getBackingStore()->set('senderShiftId', $value);\n }", "public function setRawValue($value) {\n\n $this->rawValue = $value;\n }" ]
[ "0.7106364", "0.5979085", "0.59331876", "0.5884034", "0.5834159", "0.5821788", "0.5742684", "0.57422954", "0.5709905", "0.5690685", "0.5689336", "0.5689336", "0.568811", "0.568811", "0.568811", "0.568811", "0.568811", "0.568811", "0.568811", "0.568811", "0.568811", "0.568811", "0.568811", "0.56346196", "0.56346196", "0.56346196", "0.56346196", "0.56346196", "0.56346196", "0.56346196", "0.56346196", "0.56346196", "0.56346196", "0.56026506", "0.5595325", "0.54948735", "0.54933727", "0.54867816", "0.54823697", "0.5464507", "0.5464507", "0.5464507", "0.5464507", "0.54467565", "0.5397911", "0.5397911", "0.5397911", "0.5397911", "0.5392476", "0.5383028", "0.5373381", "0.5362388", "0.5361496", "0.5346388", "0.5340838", "0.53392386", "0.5339016", "0.5319917", "0.53180856", "0.5311728", "0.5307497", "0.5306226", "0.5306226", "0.53030026", "0.5291143", "0.52857244", "0.5261041", "0.5259139", "0.5252042", "0.5251613", "0.5238526", "0.52374774", "0.5221553", "0.520315", "0.5195223", "0.51924545", "0.5179602", "0.5175725", "0.516318", "0.5113812", "0.5108316", "0.50939727", "0.50922906", "0.50804794", "0.5079529", "0.50762546", "0.50727075", "0.50685775", "0.50443923", "0.5039385", "0.5035748", "0.5029446", "0.5022717", "0.5004398", "0.49974298", "0.49951532", "0.4989201", "0.4988606", "0.4985653", "0.49850547" ]
0.60415226
1
throw new Exception('Currently disabled');
public function edit_language($lang = 'en_GB', $page = 1) { if ($this->session->userdata(array('admin' => 'is_admin'))) { $this->load_header(); $extension = ($lang == 'en_GB') ? 'pot' : 'po'; $language = APP_PATH . DS . 'localization' . DS . $lang . DS . 'LC_MESSAGES' . DS . 'message.' . $extension; if (!file_exists($language)) { $this->vars['error'] = 'Language not found.'; } else { $translations = Translations::fromPoFile($language); //var_dump($translations); //pre($translations); } $this->load->view('admincp' . DS . 'language_manager' . DS . 'view.edit_language', $this->vars); $this->load_footer(); } else { json(array('error' => 'Please login first!')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function disabled();", "public function disabled();", "public function executeDisabled()\n {\n }", "private function _checkEnable() {\r\n if ($this->_isEnabled === true) {\r\n throw new Exception('Profiler is still enabled.');\r\n }\r\n }", "public function isDisabled()\n {\n }", "public function is_disabled()\n {\n }", "public function isDisabled() {}", "public function disable(): bool {}", "public function failed()\n {\n // Do nothing\n }", "function isEnabled()\n {\n return false;\n }", "public function isDisabled()\n\t{\n\t\treturn false;\n\t}", "function isDisabled()\n {\n return false;\n }", "protected function throwInaccessibleException() {}", "public function disable();", "public function isDisabled();", "public function isDisabled();", "public function isDisabled();", "protected function _checkStatus() {\n if ($this->analyticsEnabled === null) {\n $this->analyticsEnabled = Zend_Registry::get('config')->analytics->enabled; \n } \n if ($this->analyticsEnabled != 1) { \n throw new Exception(\"We're sorry, Analytics is disabled at the moment\");\n }\n }", "public function disable() {}", "public static function disable()\n {\n self::$_enabled = FALSE;\n }", "public function throwForbidden()\n {\n throw new Exception\\ForbiddenException('Forbidden', 1449130939);\n }", "final public function __wakeup(){\n throw new Exception('Feature disabled.');\n }", "public function disable(): void\n {\n $this->disabled = true;\n }", "public function is_enabled()\n {\n }", "public static function disable(){\n self::$disabled = true; \n self::$enabled = false;\n }", "static function denied()\n {\n\n }", "public function isDisabled()\n {\n return false;\n }", "public function onDisable() {\n\t}", "function disable_function()\n{\n die('Disabled');\n}", "public function getDisabled(): bool;", "public static function disable() {\n\t\tself::$enabled = false;\n\t}", "function disable_function() {\r\n die('Disabled');\r\n}", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "public function failed();", "private function __construct()\n {\n // disabled method\n }", "function disable_signaled_exceptions($history = false)\n{\n return XPSPL::instance()->disable_signaled_exceptions($history);\n}", "protected function enabled()\n {\n }", "function disable_false() {\r\n return FALSE;\r\n}", "function disable_true(){\r\n return TRUE;\r\n}", "public function modify()\r\n\t{\r\n\t\tthrow new Exception('modify() has been disabled');\r\n\t}", "public function disableExceptions()\n {\n $this->throwException = false;\n }", "public function enableExceptions()\n {\n $this->throwException = true;\n }", "public static function disable(): void\n {\n static::$_enabled = false;\n }", "public function isEvaled()\n {\n return false;\n }", "public function enable(): bool {}", "public function failure(){\n\t}", "protected function checkDisableFunctions() {}", "public static function disable(): void\n {\n self::$isEnabled = false;\n }", "public function disable()\n {\n $this->enabled = false;\n }", "public function is_enabled()\n {\n }", "public function nextDisabled(): string;", "public function no_op() {\n\t\t\texit( 'Not permitted' );\n\t\t}", "public function canBeEnabled();", "public function enableExceptions()\n {\n $this->setExceptions(true);\n }", "public function pass()\n {\n throw new Pass();\n }", "public function getIsDisabled() {}", "function check(){\r\n\t\tglobal $PDBCExceptionException;\r\n\t\tif($PDBCExceptionException)\r\n\t\t\tPDBCException::raise($PDBCExceptionException);\r\n\t}", "public function enabled();", "public function enabled();", "public function enabled();", "public function enabled();", "public function loginCheckAction()\n {\n\n\n throw new \\Exception('This should never be reached!');\n }", "function disabled($disabled, $current = \\true, $display = \\true)\n {\n }", "function isEnabled ();", "function isDisabled()\n {\n return $this->_disabled;\n }", "public function disable() {\n\t\t$this->update(TRUE);\n\t}", "public function disable() {\n\t\tif (!$this->enabled) return;\n\t\t$this->errorCatcher->disable();\n\t\t$this->enabled = false;\n\t}", "public function fails();", "public function fails();", "public static function forbidden(){\n\n throw new \\yii\\web\\HttpException(403, 'Forbidden Access not Available', 405);\n\n }", "public function testTroubleshootingModeDisabledNoCookie() {\n\t\t$this->assertFalse( $this->class_instance->is_troubleshooting() );\n\t}", "public function enable() {}", "public function loginCheckAction()\n {\n throw new \\Exception('This should never be reached!');\n }", "function enable ($enabled = true);", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "function getEnabled() {return $this->_enabled;}", "public function disable( $name );", "public function forbiddenAction() {\n }", "public static function enable(){\n self::$enabled = true; \n self::$disabled=false;\n }", "public function __test()\n {\n throw new \\Exception('Oops! It is a dead end!', 400);\n }", "function js_disabled() {\n\n }", "public function forbidden() {\n return $this->setStatus(403);\n }", "public function setDisabled($disabled = true);", "public function enable();", "public function enable();", "function isEnabled();", "function isEnabled();", "public function setDisabled($disabled);", "public function disableExceptions()\n {\n $this->setExceptions(false);\n }", "public static function block()\n\t{\n\t\t$msg = 'No posee permisos para realizar esta acción.';\n\t\tthrow new PublicException($msg);\n\t}", "public function runFailed();", "public function disableButtons()\n\t{\n\t}", "function defaultAction() {\n\t\tthrow new xException(\"Method not allowed\", 403);\n\t}", "function bibdk_voxb_offensive_error() {\n return array(\n '#markup' => t('bibdk_voxb_no_access', array(), array('context'=>'bibdk_voxb')),\n );\n}", "public function disabled_notice() {\n\n\t\techo '<div class=\"error fade\"><p>';\n\t\techo sprintf( esc_html__( '%sImportant:%s WooCommerce TM Extra Product Options requires WordPress %s or later.', 'woocommerce-tm-extra-product-options' ),\n\t\t\t'<strong>', '</strong>', THEMECOMPLETE_EPO_WP_VERSION );\n\t\techo '</p></div>' . \"\\n\";\n\n\t}", "public function disabled(): self\n {\n return $this->state(['enabled' => false]);\n }", "public function isDisabled(): bool\n {\n return ! $this->isEnabled();\n }", "public function canBeDisabledAndEnabled() {}" ]
[ "0.71291846", "0.71291846", "0.69247466", "0.6844114", "0.66973674", "0.6670493", "0.6588638", "0.64870614", "0.638746", "0.63787395", "0.6364926", "0.6356879", "0.6350466", "0.6347108", "0.63301724", "0.63301724", "0.63301724", "0.63220406", "0.6312581", "0.6262463", "0.6237358", "0.623019", "0.62301576", "0.62153757", "0.6200062", "0.61970806", "0.6170987", "0.616871", "0.61155", "0.6102949", "0.6095804", "0.60766464", "0.60506123", "0.60506123", "0.60506123", "0.602915", "0.602904", "0.6023171", "0.6019247", "0.60127306", "0.59698415", "0.59540814", "0.5949234", "0.594271", "0.59393466", "0.5931111", "0.59224284", "0.59036183", "0.58837783", "0.5857082", "0.58457696", "0.58372724", "0.58107495", "0.57875216", "0.5787459", "0.5776736", "0.57637995", "0.57628876", "0.5757838", "0.5749389", "0.5749389", "0.5749389", "0.5749389", "0.57404935", "0.5739806", "0.5708922", "0.5707277", "0.57041883", "0.57018054", "0.56995386", "0.56995386", "0.56988513", "0.56940216", "0.56845754", "0.5682558", "0.5669407", "0.56692827", "0.56691843", "0.5668717", "0.56679434", "0.56659234", "0.56636536", "0.5662165", "0.5661389", "0.565592", "0.56558347", "0.5640815", "0.5640815", "0.5635558", "0.5635558", "0.563178", "0.5620328", "0.56193906", "0.5616069", "0.5613727", "0.5585708", "0.558163", "0.55806625", "0.5571388", "0.5558742", "0.55571496" ]
0.0
-1
throw new Exception('Currently disabled');
public function import_language() { if ($this->session->userdata(array('admin' => 'is_admin'))) { $this->load_header(); if (count($_POST) > 0) { if ($_FILES['language']['name'] == '') $this->vars['error'] = 'Please select file to upload'; else { $file_name = $_FILES['language']['name']; $ext = strtolower(substr(strrchr($file_name, "."), 1)); if (!in_array($ext, array('json'))) $this->vars['error'] = 'You must upload a file with one of the following extensions: ' . implode(', ', array('json')); else { if ($_FILES['language']['error'] == UPLOAD_ERR_OK && is_uploaded_file($_FILES['language']['tmp_name'])) { $file = json_decode(file_get_contents($_FILES['language']['tmp_name']), true); $lang_title = $this->website->c(array_keys($file['config'])[0]); if (is_array($file)) { $languages = $this->config->values('lang_config'); if (array_key_exists($lang_title, $languages['lang_list'])) { $this->vars['error'] = 'Language already exists.'; } else { $languages['lang_list'][$lang_title] = array('title' => $file['config'][$lang_title]['title'], 'flag' => $file['config'][$lang_title]['flag'], 'active' => $file['config'][$lang_title]['active']); $this->config->save_config_data($languages, 'lang_config'); $this->translation->create_translation_file($lang_title); $this->translation->lang = $file['translations']; $this->translation->write_full_translations(); $this->vars['success'] = 'Language successfully imported.'; } } } } } } $this->load->view('admincp' . DS . 'language_manager' . DS . 'view.import_language', $this->vars); $this->load_footer(); } else { $this->login(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function disabled();", "public function disabled();", "public function executeDisabled()\n {\n }", "private function _checkEnable() {\r\n if ($this->_isEnabled === true) {\r\n throw new Exception('Profiler is still enabled.');\r\n }\r\n }", "public function isDisabled()\n {\n }", "public function is_disabled()\n {\n }", "public function isDisabled() {}", "public function disable(): bool {}", "public function failed()\n {\n // Do nothing\n }", "function isEnabled()\n {\n return false;\n }", "public function isDisabled()\n\t{\n\t\treturn false;\n\t}", "function isDisabled()\n {\n return false;\n }", "protected function throwInaccessibleException() {}", "public function disable();", "public function isDisabled();", "public function isDisabled();", "public function isDisabled();", "protected function _checkStatus() {\n if ($this->analyticsEnabled === null) {\n $this->analyticsEnabled = Zend_Registry::get('config')->analytics->enabled; \n } \n if ($this->analyticsEnabled != 1) { \n throw new Exception(\"We're sorry, Analytics is disabled at the moment\");\n }\n }", "public function disable() {}", "public static function disable()\n {\n self::$_enabled = FALSE;\n }", "public function throwForbidden()\n {\n throw new Exception\\ForbiddenException('Forbidden', 1449130939);\n }", "final public function __wakeup(){\n throw new Exception('Feature disabled.');\n }", "public function disable(): void\n {\n $this->disabled = true;\n }", "public function is_enabled()\n {\n }", "public static function disable(){\n self::$disabled = true; \n self::$enabled = false;\n }", "static function denied()\n {\n\n }", "public function isDisabled()\n {\n return false;\n }", "public function onDisable() {\n\t}", "function disable_function()\n{\n die('Disabled');\n}", "public function getDisabled(): bool;", "public static function disable() {\n\t\tself::$enabled = false;\n\t}", "function disable_function() {\r\n die('Disabled');\r\n}", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "public function failed();", "private function __construct()\n {\n // disabled method\n }", "function disable_signaled_exceptions($history = false)\n{\n return XPSPL::instance()->disable_signaled_exceptions($history);\n}", "protected function enabled()\n {\n }", "function disable_false() {\r\n return FALSE;\r\n}", "function disable_true(){\r\n return TRUE;\r\n}", "public function modify()\r\n\t{\r\n\t\tthrow new Exception('modify() has been disabled');\r\n\t}", "public function disableExceptions()\n {\n $this->throwException = false;\n }", "public function enableExceptions()\n {\n $this->throwException = true;\n }", "public static function disable(): void\n {\n static::$_enabled = false;\n }", "public function isEvaled()\n {\n return false;\n }", "public function enable(): bool {}", "public function failure(){\n\t}", "protected function checkDisableFunctions() {}", "public static function disable(): void\n {\n self::$isEnabled = false;\n }", "public function disable()\n {\n $this->enabled = false;\n }", "public function is_enabled()\n {\n }", "public function nextDisabled(): string;", "public function no_op() {\n\t\t\texit( 'Not permitted' );\n\t\t}", "public function canBeEnabled();", "public function enableExceptions()\n {\n $this->setExceptions(true);\n }", "public function pass()\n {\n throw new Pass();\n }", "public function getIsDisabled() {}", "function check(){\r\n\t\tglobal $PDBCExceptionException;\r\n\t\tif($PDBCExceptionException)\r\n\t\t\tPDBCException::raise($PDBCExceptionException);\r\n\t}", "public function enabled();", "public function enabled();", "public function enabled();", "public function enabled();", "public function loginCheckAction()\n {\n\n\n throw new \\Exception('This should never be reached!');\n }", "function disabled($disabled, $current = \\true, $display = \\true)\n {\n }", "function isEnabled ();", "function isDisabled()\n {\n return $this->_disabled;\n }", "public function disable() {\n\t\t$this->update(TRUE);\n\t}", "public function disable() {\n\t\tif (!$this->enabled) return;\n\t\t$this->errorCatcher->disable();\n\t\t$this->enabled = false;\n\t}", "public function fails();", "public function fails();", "public static function forbidden(){\n\n throw new \\yii\\web\\HttpException(403, 'Forbidden Access not Available', 405);\n\n }", "public function testTroubleshootingModeDisabledNoCookie() {\n\t\t$this->assertFalse( $this->class_instance->is_troubleshooting() );\n\t}", "public function enable() {}", "public function loginCheckAction()\n {\n throw new \\Exception('This should never be reached!');\n }", "function enable ($enabled = true);", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "function getEnabled() {return $this->_enabled;}", "public function disable( $name );", "public function forbiddenAction() {\n }", "public static function enable(){\n self::$enabled = true; \n self::$disabled=false;\n }", "public function __test()\n {\n throw new \\Exception('Oops! It is a dead end!', 400);\n }", "function js_disabled() {\n\n }", "public function forbidden() {\n return $this->setStatus(403);\n }", "public function setDisabled($disabled = true);", "public function enable();", "public function enable();", "function isEnabled();", "function isEnabled();", "public function setDisabled($disabled);", "public function disableExceptions()\n {\n $this->setExceptions(false);\n }", "public static function block()\n\t{\n\t\t$msg = 'No posee permisos para realizar esta acción.';\n\t\tthrow new PublicException($msg);\n\t}", "public function runFailed();", "public function disableButtons()\n\t{\n\t}", "function defaultAction() {\n\t\tthrow new xException(\"Method not allowed\", 403);\n\t}", "function bibdk_voxb_offensive_error() {\n return array(\n '#markup' => t('bibdk_voxb_no_access', array(), array('context'=>'bibdk_voxb')),\n );\n}", "public function disabled_notice() {\n\n\t\techo '<div class=\"error fade\"><p>';\n\t\techo sprintf( esc_html__( '%sImportant:%s WooCommerce TM Extra Product Options requires WordPress %s or later.', 'woocommerce-tm-extra-product-options' ),\n\t\t\t'<strong>', '</strong>', THEMECOMPLETE_EPO_WP_VERSION );\n\t\techo '</p></div>' . \"\\n\";\n\n\t}", "public function disabled(): self\n {\n return $this->state(['enabled' => false]);\n }", "public function isDisabled(): bool\n {\n return ! $this->isEnabled();\n }", "public function canBeDisabledAndEnabled() {}" ]
[ "0.71291846", "0.71291846", "0.69247466", "0.6844114", "0.66973674", "0.6670493", "0.6588638", "0.64870614", "0.638746", "0.63787395", "0.6364926", "0.6356879", "0.6350466", "0.6347108", "0.63301724", "0.63301724", "0.63301724", "0.63220406", "0.6312581", "0.6262463", "0.6237358", "0.623019", "0.62301576", "0.62153757", "0.6200062", "0.61970806", "0.6170987", "0.616871", "0.61155", "0.6102949", "0.6095804", "0.60766464", "0.60506123", "0.60506123", "0.60506123", "0.602915", "0.602904", "0.6023171", "0.6019247", "0.60127306", "0.59698415", "0.59540814", "0.5949234", "0.594271", "0.59393466", "0.5931111", "0.59224284", "0.59036183", "0.58837783", "0.5857082", "0.58457696", "0.58372724", "0.58107495", "0.57875216", "0.5787459", "0.5776736", "0.57637995", "0.57628876", "0.5757838", "0.5749389", "0.5749389", "0.5749389", "0.5749389", "0.57404935", "0.5739806", "0.5708922", "0.5707277", "0.57041883", "0.57018054", "0.56995386", "0.56995386", "0.56988513", "0.56940216", "0.56845754", "0.5682558", "0.5669407", "0.56692827", "0.56691843", "0.5668717", "0.56679434", "0.56659234", "0.56636536", "0.5662165", "0.5661389", "0.565592", "0.56558347", "0.5640815", "0.5640815", "0.5635558", "0.5635558", "0.563178", "0.5620328", "0.56193906", "0.5616069", "0.5613727", "0.5585708", "0.558163", "0.55806625", "0.5571388", "0.5558742", "0.55571496" ]
0.0
-1
throw new Exception('Currently disabled');
public function delete_language() { if ($this->session->userdata(array('admin' => 'is_admin'))) { $dir = APP_PATH . DS . 'localization' . DS . $_POST['id']; if (is_dir($dir)) { if ($_POST['id'] == 'en_GB') { json(array('error' => 'Your unable to delete default website language.')); } else { $it = new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS); $files = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); foreach ($files as $file) { if ($file->isDir()) { rmdir($file->getRealPath()); } else { unlink($file->getRealPath()); } } rmdir($dir); json(array('success' => 'Language successfully removed.')); } } else { json(array('error' => 'Unable to find language.')); } } else { json(array('error' => 'Please login first!')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function disabled();", "public function disabled();", "public function executeDisabled()\n {\n }", "private function _checkEnable() {\r\n if ($this->_isEnabled === true) {\r\n throw new Exception('Profiler is still enabled.');\r\n }\r\n }", "public function isDisabled()\n {\n }", "public function is_disabled()\n {\n }", "public function isDisabled() {}", "public function disable(): bool {}", "public function failed()\n {\n // Do nothing\n }", "function isEnabled()\n {\n return false;\n }", "public function isDisabled()\n\t{\n\t\treturn false;\n\t}", "function isDisabled()\n {\n return false;\n }", "protected function throwInaccessibleException() {}", "public function disable();", "public function isDisabled();", "public function isDisabled();", "public function isDisabled();", "protected function _checkStatus() {\n if ($this->analyticsEnabled === null) {\n $this->analyticsEnabled = Zend_Registry::get('config')->analytics->enabled; \n } \n if ($this->analyticsEnabled != 1) { \n throw new Exception(\"We're sorry, Analytics is disabled at the moment\");\n }\n }", "public function disable() {}", "public static function disable()\n {\n self::$_enabled = FALSE;\n }", "public function throwForbidden()\n {\n throw new Exception\\ForbiddenException('Forbidden', 1449130939);\n }", "final public function __wakeup(){\n throw new Exception('Feature disabled.');\n }", "public function disable(): void\n {\n $this->disabled = true;\n }", "public function is_enabled()\n {\n }", "public static function disable(){\n self::$disabled = true; \n self::$enabled = false;\n }", "static function denied()\n {\n\n }", "public function isDisabled()\n {\n return false;\n }", "public function onDisable() {\n\t}", "function disable_function()\n{\n die('Disabled');\n}", "public function getDisabled(): bool;", "public static function disable() {\n\t\tself::$enabled = false;\n\t}", "function disable_function() {\r\n die('Disabled');\r\n}", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "public function failed();", "private function __construct()\n {\n // disabled method\n }", "function disable_signaled_exceptions($history = false)\n{\n return XPSPL::instance()->disable_signaled_exceptions($history);\n}", "protected function enabled()\n {\n }", "function disable_false() {\r\n return FALSE;\r\n}", "function disable_true(){\r\n return TRUE;\r\n}", "public function modify()\r\n\t{\r\n\t\tthrow new Exception('modify() has been disabled');\r\n\t}", "public function disableExceptions()\n {\n $this->throwException = false;\n }", "public function enableExceptions()\n {\n $this->throwException = true;\n }", "public static function disable(): void\n {\n static::$_enabled = false;\n }", "public function isEvaled()\n {\n return false;\n }", "public function enable(): bool {}", "public function failure(){\n\t}", "protected function checkDisableFunctions() {}", "public static function disable(): void\n {\n self::$isEnabled = false;\n }", "public function disable()\n {\n $this->enabled = false;\n }", "public function is_enabled()\n {\n }", "public function nextDisabled(): string;", "public function no_op() {\n\t\t\texit( 'Not permitted' );\n\t\t}", "public function canBeEnabled();", "public function enableExceptions()\n {\n $this->setExceptions(true);\n }", "public function pass()\n {\n throw new Pass();\n }", "public function getIsDisabled() {}", "function check(){\r\n\t\tglobal $PDBCExceptionException;\r\n\t\tif($PDBCExceptionException)\r\n\t\t\tPDBCException::raise($PDBCExceptionException);\r\n\t}", "public function enabled();", "public function enabled();", "public function enabled();", "public function enabled();", "public function loginCheckAction()\n {\n\n\n throw new \\Exception('This should never be reached!');\n }", "function disabled($disabled, $current = \\true, $display = \\true)\n {\n }", "function isEnabled ();", "function isDisabled()\n {\n return $this->_disabled;\n }", "public function disable() {\n\t\t$this->update(TRUE);\n\t}", "public function disable() {\n\t\tif (!$this->enabled) return;\n\t\t$this->errorCatcher->disable();\n\t\t$this->enabled = false;\n\t}", "public function fails();", "public function fails();", "public static function forbidden(){\n\n throw new \\yii\\web\\HttpException(403, 'Forbidden Access not Available', 405);\n\n }", "public function testTroubleshootingModeDisabledNoCookie() {\n\t\t$this->assertFalse( $this->class_instance->is_troubleshooting() );\n\t}", "public function enable() {}", "public function loginCheckAction()\n {\n throw new \\Exception('This should never be reached!');\n }", "function enable ($enabled = true);", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "function getEnabled() {return $this->_enabled;}", "public function disable( $name );", "public function forbiddenAction() {\n }", "public static function enable(){\n self::$enabled = true; \n self::$disabled=false;\n }", "public function __test()\n {\n throw new \\Exception('Oops! It is a dead end!', 400);\n }", "function js_disabled() {\n\n }", "public function forbidden() {\n return $this->setStatus(403);\n }", "public function setDisabled($disabled = true);", "public function enable();", "public function enable();", "function isEnabled();", "function isEnabled();", "public function setDisabled($disabled);", "public function disableExceptions()\n {\n $this->setExceptions(false);\n }", "public static function block()\n\t{\n\t\t$msg = 'No posee permisos para realizar esta acción.';\n\t\tthrow new PublicException($msg);\n\t}", "public function runFailed();", "public function disableButtons()\n\t{\n\t}", "function defaultAction() {\n\t\tthrow new xException(\"Method not allowed\", 403);\n\t}", "function bibdk_voxb_offensive_error() {\n return array(\n '#markup' => t('bibdk_voxb_no_access', array(), array('context'=>'bibdk_voxb')),\n );\n}", "public function disabled_notice() {\n\n\t\techo '<div class=\"error fade\"><p>';\n\t\techo sprintf( esc_html__( '%sImportant:%s WooCommerce TM Extra Product Options requires WordPress %s or later.', 'woocommerce-tm-extra-product-options' ),\n\t\t\t'<strong>', '</strong>', THEMECOMPLETE_EPO_WP_VERSION );\n\t\techo '</p></div>' . \"\\n\";\n\n\t}", "public function disabled(): self\n {\n return $this->state(['enabled' => false]);\n }", "public function isDisabled(): bool\n {\n return ! $this->isEnabled();\n }", "public function canBeDisabledAndEnabled() {}" ]
[ "0.71291846", "0.71291846", "0.69247466", "0.6844114", "0.66973674", "0.6670493", "0.6588638", "0.64870614", "0.638746", "0.63787395", "0.6364926", "0.6356879", "0.6350466", "0.6347108", "0.63301724", "0.63301724", "0.63301724", "0.63220406", "0.6312581", "0.6262463", "0.6237358", "0.623019", "0.62301576", "0.62153757", "0.6200062", "0.61970806", "0.6170987", "0.616871", "0.61155", "0.6102949", "0.6095804", "0.60766464", "0.60506123", "0.60506123", "0.60506123", "0.602915", "0.602904", "0.6023171", "0.6019247", "0.60127306", "0.59698415", "0.59540814", "0.5949234", "0.594271", "0.59393466", "0.5931111", "0.59224284", "0.59036183", "0.58837783", "0.5857082", "0.58457696", "0.58372724", "0.58107495", "0.57875216", "0.5787459", "0.5776736", "0.57637995", "0.57628876", "0.5757838", "0.5749389", "0.5749389", "0.5749389", "0.5749389", "0.57404935", "0.5739806", "0.5708922", "0.5707277", "0.57041883", "0.57018054", "0.56995386", "0.56995386", "0.56988513", "0.56940216", "0.56845754", "0.5682558", "0.5669407", "0.56692827", "0.56691843", "0.5668717", "0.56679434", "0.56659234", "0.56636536", "0.5662165", "0.5661389", "0.565592", "0.56558347", "0.5640815", "0.5640815", "0.5635558", "0.5635558", "0.563178", "0.5620328", "0.56193906", "0.5616069", "0.5613727", "0.5585708", "0.558163", "0.55806625", "0.5571388", "0.5558742", "0.55571496" ]
0.0
-1
throw new Exception('Currently disabled');
public function add_language() { if ($this->session->userdata(array('admin' => 'is_admin'))) { $this->load_header(); $this->vars['country_flags'] = $this->Madmin->load_country_images(); if (isset ($_POST['add_language'])) { if ($_POST['name'] == '') { $this->vars['error'] = 'Please enter language name.'; } else { if ($_POST['title'] == '') { $this->vars['error'] = 'Please enter language title.'; } else { if ($this->Madmin->add_language($_POST)) { header('Location: ' . $this->config->base_url . 'admincp/edit-language/' . $_POST['name']); } else { $this->vars['error'] = $this->Madmin->error; } } } } $this->load->view('admincp' . DS . 'language_manager' . DS . 'view.add_language', $this->vars); $this->load_footer(); } else { json(array('error' => 'Please login first!')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function disabled();", "public function disabled();", "public function executeDisabled()\n {\n }", "private function _checkEnable() {\r\n if ($this->_isEnabled === true) {\r\n throw new Exception('Profiler is still enabled.');\r\n }\r\n }", "public function isDisabled()\n {\n }", "public function is_disabled()\n {\n }", "public function isDisabled() {}", "public function disable(): bool {}", "public function failed()\n {\n // Do nothing\n }", "function isEnabled()\n {\n return false;\n }", "public function isDisabled()\n\t{\n\t\treturn false;\n\t}", "function isDisabled()\n {\n return false;\n }", "protected function throwInaccessibleException() {}", "public function disable();", "public function isDisabled();", "public function isDisabled();", "public function isDisabled();", "protected function _checkStatus() {\n if ($this->analyticsEnabled === null) {\n $this->analyticsEnabled = Zend_Registry::get('config')->analytics->enabled; \n } \n if ($this->analyticsEnabled != 1) { \n throw new Exception(\"We're sorry, Analytics is disabled at the moment\");\n }\n }", "public function disable() {}", "public static function disable()\n {\n self::$_enabled = FALSE;\n }", "public function throwForbidden()\n {\n throw new Exception\\ForbiddenException('Forbidden', 1449130939);\n }", "final public function __wakeup(){\n throw new Exception('Feature disabled.');\n }", "public function disable(): void\n {\n $this->disabled = true;\n }", "public function is_enabled()\n {\n }", "public static function disable(){\n self::$disabled = true; \n self::$enabled = false;\n }", "static function denied()\n {\n\n }", "public function isDisabled()\n {\n return false;\n }", "public function onDisable() {\n\t}", "function disable_function()\n{\n die('Disabled');\n}", "public function getDisabled(): bool;", "public static function disable() {\n\t\tself::$enabled = false;\n\t}", "function disable_function() {\r\n die('Disabled');\r\n}", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "public function failed();", "private function __construct()\n {\n // disabled method\n }", "function disable_signaled_exceptions($history = false)\n{\n return XPSPL::instance()->disable_signaled_exceptions($history);\n}", "protected function enabled()\n {\n }", "function disable_false() {\r\n return FALSE;\r\n}", "function disable_true(){\r\n return TRUE;\r\n}", "public function modify()\r\n\t{\r\n\t\tthrow new Exception('modify() has been disabled');\r\n\t}", "public function disableExceptions()\n {\n $this->throwException = false;\n }", "public function enableExceptions()\n {\n $this->throwException = true;\n }", "public static function disable(): void\n {\n static::$_enabled = false;\n }", "public function isEvaled()\n {\n return false;\n }", "public function enable(): bool {}", "public function failure(){\n\t}", "protected function checkDisableFunctions() {}", "public static function disable(): void\n {\n self::$isEnabled = false;\n }", "public function disable()\n {\n $this->enabled = false;\n }", "public function is_enabled()\n {\n }", "public function nextDisabled(): string;", "public function no_op() {\n\t\t\texit( 'Not permitted' );\n\t\t}", "public function canBeEnabled();", "public function enableExceptions()\n {\n $this->setExceptions(true);\n }", "public function pass()\n {\n throw new Pass();\n }", "public function getIsDisabled() {}", "function check(){\r\n\t\tglobal $PDBCExceptionException;\r\n\t\tif($PDBCExceptionException)\r\n\t\t\tPDBCException::raise($PDBCExceptionException);\r\n\t}", "public function enabled();", "public function enabled();", "public function enabled();", "public function enabled();", "public function loginCheckAction()\n {\n\n\n throw new \\Exception('This should never be reached!');\n }", "function disabled($disabled, $current = \\true, $display = \\true)\n {\n }", "function isEnabled ();", "function isDisabled()\n {\n return $this->_disabled;\n }", "public function disable() {\n\t\t$this->update(TRUE);\n\t}", "public function disable() {\n\t\tif (!$this->enabled) return;\n\t\t$this->errorCatcher->disable();\n\t\t$this->enabled = false;\n\t}", "public function fails();", "public function fails();", "public static function forbidden(){\n\n throw new \\yii\\web\\HttpException(403, 'Forbidden Access not Available', 405);\n\n }", "public function testTroubleshootingModeDisabledNoCookie() {\n\t\t$this->assertFalse( $this->class_instance->is_troubleshooting() );\n\t}", "public function enable() {}", "public function loginCheckAction()\n {\n throw new \\Exception('This should never be reached!');\n }", "function enable ($enabled = true);", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "function getEnabled() {return $this->_enabled;}", "public function disable( $name );", "public function forbiddenAction() {\n }", "public static function enable(){\n self::$enabled = true; \n self::$disabled=false;\n }", "public function __test()\n {\n throw new \\Exception('Oops! It is a dead end!', 400);\n }", "function js_disabled() {\n\n }", "public function forbidden() {\n return $this->setStatus(403);\n }", "public function setDisabled($disabled = true);", "public function enable();", "public function enable();", "function isEnabled();", "function isEnabled();", "public function setDisabled($disabled);", "public function disableExceptions()\n {\n $this->setExceptions(false);\n }", "public static function block()\n\t{\n\t\t$msg = 'No posee permisos para realizar esta acción.';\n\t\tthrow new PublicException($msg);\n\t}", "public function runFailed();", "public function disableButtons()\n\t{\n\t}", "function defaultAction() {\n\t\tthrow new xException(\"Method not allowed\", 403);\n\t}", "function bibdk_voxb_offensive_error() {\n return array(\n '#markup' => t('bibdk_voxb_no_access', array(), array('context'=>'bibdk_voxb')),\n );\n}", "public function disabled_notice() {\n\n\t\techo '<div class=\"error fade\"><p>';\n\t\techo sprintf( esc_html__( '%sImportant:%s WooCommerce TM Extra Product Options requires WordPress %s or later.', 'woocommerce-tm-extra-product-options' ),\n\t\t\t'<strong>', '</strong>', THEMECOMPLETE_EPO_WP_VERSION );\n\t\techo '</p></div>' . \"\\n\";\n\n\t}", "public function disabled(): self\n {\n return $this->state(['enabled' => false]);\n }", "public function isDisabled(): bool\n {\n return ! $this->isEnabled();\n }", "public function canBeDisabledAndEnabled() {}" ]
[ "0.71291846", "0.71291846", "0.69247466", "0.6844114", "0.66973674", "0.6670493", "0.6588638", "0.64870614", "0.638746", "0.63787395", "0.6364926", "0.6356879", "0.6350466", "0.6347108", "0.63301724", "0.63301724", "0.63301724", "0.63220406", "0.6312581", "0.6262463", "0.6237358", "0.623019", "0.62301576", "0.62153757", "0.6200062", "0.61970806", "0.6170987", "0.616871", "0.61155", "0.6102949", "0.6095804", "0.60766464", "0.60506123", "0.60506123", "0.60506123", "0.602915", "0.602904", "0.6023171", "0.6019247", "0.60127306", "0.59698415", "0.59540814", "0.5949234", "0.594271", "0.59393466", "0.5931111", "0.59224284", "0.59036183", "0.58837783", "0.5857082", "0.58457696", "0.58372724", "0.58107495", "0.57875216", "0.5787459", "0.5776736", "0.57637995", "0.57628876", "0.5757838", "0.5749389", "0.5749389", "0.5749389", "0.5749389", "0.57404935", "0.5739806", "0.5708922", "0.5707277", "0.57041883", "0.57018054", "0.56995386", "0.56995386", "0.56988513", "0.56940216", "0.56845754", "0.5682558", "0.5669407", "0.56692827", "0.56691843", "0.5668717", "0.56679434", "0.56659234", "0.56636536", "0.5662165", "0.5661389", "0.565592", "0.56558347", "0.5640815", "0.5640815", "0.5635558", "0.5635558", "0.563178", "0.5620328", "0.56193906", "0.5616069", "0.5613727", "0.5585708", "0.558163", "0.55806625", "0.5571388", "0.5558742", "0.55571496" ]
0.0
-1
throw new Exception('Currently disabled');
public function save_translation($lang) { if ($this->session->userdata(array('admin' => 'is_admin'))) { if (!$this->Madmin->change_language_translation($lang, $_POST['key'], $_POST['val'])) { json(array('error' => 'Unable to update language status')); } else { json(array('success' => 'Language status changed')); } } else { json(array('error' => 'Please login first!')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function disabled();", "public function disabled();", "public function executeDisabled()\n {\n }", "private function _checkEnable() {\r\n if ($this->_isEnabled === true) {\r\n throw new Exception('Profiler is still enabled.');\r\n }\r\n }", "public function isDisabled()\n {\n }", "public function is_disabled()\n {\n }", "public function isDisabled() {}", "public function disable(): bool {}", "public function failed()\n {\n // Do nothing\n }", "function isEnabled()\n {\n return false;\n }", "public function isDisabled()\n\t{\n\t\treturn false;\n\t}", "function isDisabled()\n {\n return false;\n }", "protected function throwInaccessibleException() {}", "public function disable();", "public function isDisabled();", "public function isDisabled();", "public function isDisabled();", "protected function _checkStatus() {\n if ($this->analyticsEnabled === null) {\n $this->analyticsEnabled = Zend_Registry::get('config')->analytics->enabled; \n } \n if ($this->analyticsEnabled != 1) { \n throw new Exception(\"We're sorry, Analytics is disabled at the moment\");\n }\n }", "public function disable() {}", "public static function disable()\n {\n self::$_enabled = FALSE;\n }", "public function throwForbidden()\n {\n throw new Exception\\ForbiddenException('Forbidden', 1449130939);\n }", "final public function __wakeup(){\n throw new Exception('Feature disabled.');\n }", "public function disable(): void\n {\n $this->disabled = true;\n }", "public function is_enabled()\n {\n }", "public static function disable(){\n self::$disabled = true; \n self::$enabled = false;\n }", "static function denied()\n {\n\n }", "public function isDisabled()\n {\n return false;\n }", "public function onDisable() {\n\t}", "function disable_function()\n{\n die('Disabled');\n}", "public function getDisabled(): bool;", "public static function disable() {\n\t\tself::$enabled = false;\n\t}", "function disable_function() {\r\n die('Disabled');\r\n}", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "public function failed();", "private function __construct()\n {\n // disabled method\n }", "function disable_signaled_exceptions($history = false)\n{\n return XPSPL::instance()->disable_signaled_exceptions($history);\n}", "protected function enabled()\n {\n }", "function disable_false() {\r\n return FALSE;\r\n}", "function disable_true(){\r\n return TRUE;\r\n}", "public function modify()\r\n\t{\r\n\t\tthrow new Exception('modify() has been disabled');\r\n\t}", "public function disableExceptions()\n {\n $this->throwException = false;\n }", "public function enableExceptions()\n {\n $this->throwException = true;\n }", "public static function disable(): void\n {\n static::$_enabled = false;\n }", "public function isEvaled()\n {\n return false;\n }", "public function enable(): bool {}", "public function failure(){\n\t}", "protected function checkDisableFunctions() {}", "public static function disable(): void\n {\n self::$isEnabled = false;\n }", "public function disable()\n {\n $this->enabled = false;\n }", "public function is_enabled()\n {\n }", "public function nextDisabled(): string;", "public function no_op() {\n\t\t\texit( 'Not permitted' );\n\t\t}", "public function canBeEnabled();", "public function enableExceptions()\n {\n $this->setExceptions(true);\n }", "public function pass()\n {\n throw new Pass();\n }", "public function getIsDisabled() {}", "function check(){\r\n\t\tglobal $PDBCExceptionException;\r\n\t\tif($PDBCExceptionException)\r\n\t\t\tPDBCException::raise($PDBCExceptionException);\r\n\t}", "public function enabled();", "public function enabled();", "public function enabled();", "public function enabled();", "public function loginCheckAction()\n {\n\n\n throw new \\Exception('This should never be reached!');\n }", "function disabled($disabled, $current = \\true, $display = \\true)\n {\n }", "function isEnabled ();", "function isDisabled()\n {\n return $this->_disabled;\n }", "public function disable() {\n\t\t$this->update(TRUE);\n\t}", "public function disable() {\n\t\tif (!$this->enabled) return;\n\t\t$this->errorCatcher->disable();\n\t\t$this->enabled = false;\n\t}", "public function fails();", "public function fails();", "public static function forbidden(){\n\n throw new \\yii\\web\\HttpException(403, 'Forbidden Access not Available', 405);\n\n }", "public function testTroubleshootingModeDisabledNoCookie() {\n\t\t$this->assertFalse( $this->class_instance->is_troubleshooting() );\n\t}", "public function enable() {}", "public function loginCheckAction()\n {\n throw new \\Exception('This should never be reached!');\n }", "function enable ($enabled = true);", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {}", "function getEnabled() {return $this->_enabled;}", "public function disable( $name );", "public function forbiddenAction() {\n }", "public static function enable(){\n self::$enabled = true; \n self::$disabled=false;\n }", "public function __test()\n {\n throw new \\Exception('Oops! It is a dead end!', 400);\n }", "function js_disabled() {\n\n }", "public function forbidden() {\n return $this->setStatus(403);\n }", "public function setDisabled($disabled = true);", "public function enable();", "public function enable();", "function isEnabled();", "function isEnabled();", "public function setDisabled($disabled);", "public function disableExceptions()\n {\n $this->setExceptions(false);\n }", "public static function block()\n\t{\n\t\t$msg = 'No posee permisos para realizar esta acción.';\n\t\tthrow new PublicException($msg);\n\t}", "public function runFailed();", "public function disableButtons()\n\t{\n\t}", "function defaultAction() {\n\t\tthrow new xException(\"Method not allowed\", 403);\n\t}", "function bibdk_voxb_offensive_error() {\n return array(\n '#markup' => t('bibdk_voxb_no_access', array(), array('context'=>'bibdk_voxb')),\n );\n}", "public function disabled_notice() {\n\n\t\techo '<div class=\"error fade\"><p>';\n\t\techo sprintf( esc_html__( '%sImportant:%s WooCommerce TM Extra Product Options requires WordPress %s or later.', 'woocommerce-tm-extra-product-options' ),\n\t\t\t'<strong>', '</strong>', THEMECOMPLETE_EPO_WP_VERSION );\n\t\techo '</p></div>' . \"\\n\";\n\n\t}", "public function disabled(): self\n {\n return $this->state(['enabled' => false]);\n }", "public function isDisabled(): bool\n {\n return ! $this->isEnabled();\n }", "public function canBeDisabledAndEnabled() {}" ]
[ "0.71291846", "0.71291846", "0.69247466", "0.6844114", "0.66973674", "0.6670493", "0.6588638", "0.64870614", "0.638746", "0.63787395", "0.6364926", "0.6356879", "0.6350466", "0.6347108", "0.63301724", "0.63301724", "0.63301724", "0.63220406", "0.6312581", "0.6262463", "0.6237358", "0.623019", "0.62301576", "0.62153757", "0.6200062", "0.61970806", "0.6170987", "0.616871", "0.61155", "0.6102949", "0.6095804", "0.60766464", "0.60506123", "0.60506123", "0.60506123", "0.602915", "0.602904", "0.6023171", "0.6019247", "0.60127306", "0.59698415", "0.59540814", "0.5949234", "0.594271", "0.59393466", "0.5931111", "0.59224284", "0.59036183", "0.58837783", "0.5857082", "0.58457696", "0.58372724", "0.58107495", "0.57875216", "0.5787459", "0.5776736", "0.57637995", "0.57628876", "0.5757838", "0.5749389", "0.5749389", "0.5749389", "0.5749389", "0.57404935", "0.5739806", "0.5708922", "0.5707277", "0.57041883", "0.57018054", "0.56995386", "0.56995386", "0.56988513", "0.56940216", "0.56845754", "0.5682558", "0.5669407", "0.56692827", "0.56691843", "0.5668717", "0.56679434", "0.56659234", "0.56636536", "0.5662165", "0.5661389", "0.565592", "0.56558347", "0.5640815", "0.5640815", "0.5635558", "0.5635558", "0.563178", "0.5620328", "0.56193906", "0.5616069", "0.5613727", "0.5585708", "0.558163", "0.55806625", "0.5571388", "0.5558742", "0.55571496" ]
0.0
-1
Seed the application's database.
public function run() { factory(User::class, 4) ->state('create') ->create() // Create users ->each(static function($user){ $user->threads()->createMany( factory(ThreadAlias::class, 5)->raw() // Create Threads and attach to users )->each(static function($thread){ $thread->posts()->createMany( factory(Post::class, 3)->state('create')->raw() // Add posts to thread ); }); }) ->each(static function ($user){ $user->collections()->createMany( factory(Collection::class, 4)->raw() // Create Collections ) ->each(function ($collection) use ($user){ $collection->threads()->attach($collection->id, ['user_id'=>$user->id]); // Attach existing threads to collections }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');// <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t}\n\t}", "protected function seedDB()\n {\n $ans = $this->ask('Seed your database?: ', 'y');\n\n // Check if the answer is true\n if (preg_match('/^y/', $ans))\n {\n $this->call('db:seed');\n $this->comment('');\n $this->comment('Database successfully seeded.');\n $this->comment('=====================================');\n echo \"Your app is now ready!\";\n }\n }", "protected function seedDatabase(): void\n {\n $this->seedProductCategories();\n $this->seedProducts();\n }", "public function setupDatabase()\n {\n Artisan::call('migrate:refresh');\n Artisan::call('db:seed');\n\n self::$setupDatabase = false;\n }", "public function run()\n {\n $this->seed('FormsMenuItemsTableSeeder');\n $this->seed('FormsDataTypesTableSeeder');\n $this->seed('FormsDataRowsTableSeeder');\n $this->seed('FormsPermissionsTableSeeder');\n $this->seed('FormsSettingsTableSeeder');\n $this->seed('FormsTableSeeder');\n }", "public function run()\n {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"\\n--- Seeding ---\\n\", TRUE));\n\n if (App::environment('production')) {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- ERROR: Seeding in Production is prohibited ---\\n\", TRUE));\n return;\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(ConfigsTableSeeder::class);\n $this->call(ConfigContentsTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n if (defined('STDERR')) fwrite(STDERR, print_r(\"Set FOREIGN_KEY_CHECKS=1 --- DONE\\n\", TRUE));\n\n // \\Artisan::call('command:regenerate-user-feeds');\n\n \\Cache::flush();\n\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- End Seeding ---\\n\\n\", TRUE));\n }", "protected function setupDatabase()\n {\n $this->call('migrate');\n $this->call('db:seed');\n\n $this->info('Database migrated and seeded.');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function seedDatabase(): void\n {\n echo \"Running seeds\";\n\n // Folder where all the seeds are.\n $folder = __DIR__ . '/../seeds/';\n\n // Scan all files/folders inside database.\n $files = \\scandir($folder);\n\n $seeders = [];\n foreach ($files as $key => $file) {\n\n // All files that don't start with a dot.\n if ($file[0] !== '.') {\n\n // Load the file.\n require_once $folder . $file;\n\n // We have to call the migrations after because\n // some seeds are dependant from other seeds.\n $seeders[] = explode('.', $file)[0];\n }\n }\n\n // Run all seeds.\n foreach ($seeders as $seeder) {\n (new $seeder)->run();\n }\n }", "protected function seedDatabase()\n {\n //$this->app->make('db')->table(static::TABLE_NAME)->delete();\n\n TestExtendedModel::create([\n 'unique_field' => '999',\n 'second_field' => null,\n 'name' => 'unchanged',\n 'active' => true,\n 'hidden' => 'invisible',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1234567',\n 'second_field' => '434',\n 'name' => 'random name',\n 'active' => false,\n 'hidden' => 'cannot see me',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1337',\n 'second_field' => '12345',\n 'name' => 'special name',\n 'active' => true,\n 'hidden' => 'where has it gone?',\n ]);\n }", "public function initDatabase()\n {\n $this->call('migrate');\n\n $userModel = config('admin.database.users_model');\n\n if ($userModel::count() == 0) {\n $this->call('db:seed', ['--class' => AdminSeeder::class]);\n }\n }", "public function run ()\n {\n if (App::environment() === 'production') {\n exit('Seed should be run only in development/debug environment.');\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('role_user')->truncate();\n\n // Root user\n $user = User::find(1);\n $user->assignRole('owner');\n\n $user = User::find(2);\n $user->assignRole('admin');\n\n $user = User::find(3);\n $user->assignRole('admin');\n\n $user = User::find(4);\n $user->assignRole('moderator');\n\n $user = User::find(5);\n $user->assignRole('moderator');\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n Model::unguard();\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(EntrustTableSeeder::class);\n\n $this->call(AccounttypeSeeder::class);\n $this->call(AppUserTableSeeder::class);\n $this->call(AppEmailUserTableSeeder::class);\n\n\n $this->call(CountryTableSeeder::class);\n $this->call(CityTableSeeder::class);\n\n\n $this->call(PostTypeTableSeeder::class);\n $this->call(PostSubTypeTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(AppPostSolvedTableSeeder::class);\n\n\n $this->call(AppCommentTypeTableSeeder::class);\n // $this->call(AppCommentTableSeeder::class);\n // $this->call(AppSubCommentTableSeeder::class);\n\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }\n\n Model::reguard();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('password_resets')->truncate();\n DB::table('domains')->truncate();\n DB::table('folders')->truncate();\n DB::table('bookmarks')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->seedUserAccount('[email protected]');\n $this->seedUserAccount('[email protected]');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n // $this->call(UsersTableSeeder::class);\n /* Schema::dropIfExists('employees');\n Schema::dropIfExists('users');\n Schema::dropIfExists('requests');\n Schema::dropIfExists('requeststatus');*/\n User::truncate();\n InstallRequest::truncate();\n RequestStatus::truncate();\n\n $cantidadEmployyes = 20;\n $cantidadUsers = 20;\n $cantidadRequestStatus = 3;\n $cantidadRequests = 200;\n\n factory(User::class, $cantidadUsers)->create();\n factory(RequestStatus::class, $cantidadRequestStatus)->create();\n factory(InstallRequest::class, $cantidadRequests)->create();\n }", "public function run()\n {\n Model::unguard();\n foreach (glob(__DIR__ . '/seeds/*.php') as $filename) {\n require_once($filename);\n }\n // $this->call(UserTableSeeder::class);\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n// $this->call('CustomerTableSeeder');\n $this->call('PhotoTableSeeder');\n// $this->call('ProductTableSeeder');\n// $this->call('StaffTableSeeder');\n// $this->call('PasswordResetsTableSeeder');\n// $this->call('UsersTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('EmployeesTableSeeder');\n $this->call('InventoryTransactionTypesTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrderDetailsStatusTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('InvoicesTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrdersStatusTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n\n $this->call('OrdersTaxStatusTableSeeder');\n $this->call('PrivilegesTableSeeder');\n $this->call('EmployeePrivilegesTableSeeder');\n $this->call('ProductsTableSeeder');\n $this->call('InventoryTransactionsTableSeeder');\n $this->call('PurchaseOrderDetailsTableSeeder');\n\n $this->call('PurchaseOrderStatusTableSeeder');\n $this->call('PurchaseOrdersTableSeeder');\n $this->call('SalesReportsTableSeeder');\n $this->call('ShippersTableSeeder');\n $this->call('StringsTableSeeder');\n $this->call('SuppliersTableSeeder');\n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Model::reguard();\n }", "public function run()\n\t{\n $this->cleanDatabase();\n\n Eloquent::unguard();\n\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('CartsTableSeeder');\n $this->call('StoreTableSeeder');\n $this->call('AdvertisementsTableSeeder');\n \n\t}", "public function run()\n {\n \tDB::table('seeds')->truncate();\n\n $seeds = array(\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_18_2013',\n ),\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_20_2013',\n ),\n );\n\n // Uncomment the below to run the seeder\n DB::table('seeds')->insert($seeds);\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "protected function setUp(): void\n {\n $db = new DB;\n\n $db->addConnection([\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ]);\n\n $db->bootEloquent();\n $db->setAsGlobal();\n\n $this->createSchema();\n }", "public function run()\n {\n //$this->call('UserTableSeeder');\n //$this->call('ProjectTableSeeder');\n //$this->call('TaskTableSeeder');\n\n /**\n * Prepare seeding\n */\n $faker = Faker::create();\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Model::unguard();\n\n /**\n * Seeding user table\n */\n App\\User::truncate();\n factory(App\\User::class)->create([\n 'name' => 'KCK',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n /*factory(App\\User::class, 9)->create();\n $this->command->info('users table seeded');*/\n\n /**\n * Seeding roles table\n */\n Spatie\\Permission\\Models\\Role::truncate();\n DB::table('model_has_roles')->truncate();\n $superAdminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '최고 관리자'\n ]);\n $adminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '관리자'\n ]);\n $regularRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '정회원'\n ]);\n $associateRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '준회원'\n ]);\n\n App\\User::where('email', '!=', '[email protected]')->get()->map(function ($user) use ($regularRole) {\n $user->assignRole($regularRole);\n });\n\n App\\User::whereEmail('[email protected]')->get()->map(function ($user) use ($superAdminRole) {\n $user->assignRole($superAdminRole);\n });\n $this->command->info('roles table seeded');\n\n /**\n * Seeding articles table\n */\n App\\Article::truncate();\n $users = App\\User::all();\n\n $users->each(function ($user) use ($faker) {\n $user->articles()->save(\n factory(App\\Article::class)->make()\n );\n });\n $this->command->info('articles table seeded');\n\n /**\n * Seeding comments table\n */\n App\\Comment::truncate();\n $articles = App\\Article::all();\n\n $articles->each(function ($article) use ($faker, $users) {\n for ($i = 0; $i < 10; $i++) {\n $article->comments()->save(\n factory(App\\Comment::class)->make([\n 'author_id' => $faker->randomElement($users->pluck('id')->toArray()),\n //'parent_id' => $article->id\n ])\n );\n };\n });\n $this->command->info('comments table seeded');\n\n /**\n * Seeding tags table\n */\n App\\Tag::truncate();\n DB::table('article_tag')->truncate();\n $articles->each(function ($article) use ($faker) {\n $article->tags()->save(\n factory(App\\Tag::class)->make()\n );\n });\n $this->command->info('tags table seeded');\n\n /**\n * Seeding attachments table\n */\n App\\Attachment::truncate();\n if (!File::isDirectory(attachment_path())) {\n File::deleteDirectory(attachment_path(), true);\n }\n\n $articles->each(function ($article) use ($faker) {\n $article->attachments()->save(\n factory(App\\Attachment::class)->make()\n );\n });\n\n //$files = App\\Attachment::pluck('name');\n\n if (!File::isDirectory(attachment_path())) {\n File::makeDirectory(attachment_path(), 777, true);\n }\n\n /*\n foreach ($files as $file) {\n File::put(attachment_path($file), '');\n }\n */\n\n $this->command->info('attachments table seeded');\n\n /**\n * Close seeding\n */\n Model::reguard();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(CountriesTableSeeder::class);\n $this->call(StatesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n\n factory(Group::class)->create();\n factory(Contact::class, 5000)->create();\n }", "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('AdminTableSeeder');\n\t\t// $this->call('UserTableSeeder');\n\t\t// $this->call('MenuTableSeeder');\n\t\t// $this->call('ProductTableSeeder');\n\t\t// $this->call('CategoryTableSeeder');\n\t\t// $this->call('OptionTableSeeder');\n\t\t// $this->call('OptionGroupTableSeeder');\n\t\t// $this->call('TypeTableSeeder');\n\t\t// $this->call('LayoutTableSeeder');\n\t\t// $this->call('LayoutDetailTableSeeder');\n\t\t// $this->call('BannerTableSeeder');\n\t\t// $this->call('ConfigureTableSeeder');\n\t\t// $this->call('PageTableSeeder');\n\t\t// $this->call('ImageTableSeeder');\n\t\t// $this->call('ImageableTableSeeder');\n\t\t// ======== new Seed =======\n\t\t$this->call('AdminsTableSeeder');\n\t\t$this->call('BannersTableSeeder');\n\t\t$this->call('CategoriesTableSeeder');\n\t\t$this->call('ConfiguresTableSeeder');\n\t\t$this->call('ImageablesTableSeeder');\n\t\t$this->call('ImagesTableSeeder');\n\t\t$this->call('LayoutsTableSeeder');\n\t\t$this->call('LayoutDetailsTableSeeder');\n\t\t$this->call('MenusTableSeeder');\n\t\t$this->call('OptionablesTableSeeder');\n\t\t$this->call('OptionsTableSeeder');\n\t\t$this->call('OptionGroupsTableSeeder');\n\t\t$this->call('PagesTableSeeder');\n\t\t$this->call('PriceBreaksTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('ProductsCategoriesTableSeeder');\n\t\t$this->call('SizeListsTableSeeder');\n\t\t$this->call('TypesTableSeeder');\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ContactsTableSeeder');\n\t\t$this->call('RolesTableSeeder');\n\t\t$this->call('PermissionsTableSeeder');\n\t\t$this->call('PermissionRoleTableSeeder');\n\t\t$this->call('AssignedRolesTableSeeder');\n\t\t$this->call('OrdersTableSeeder');\n\t\t$this->call('OrderDetailsTableSeeder');\n\t\tCache::flush();\n\t\t// BackgroundProcess::copyFromVI();\n\t}", "public function run()\n {\n Model::unguard();\n\n User::create([\n 'email' => '[email protected]',\n 'name' => 'admin',\n 'password' => Hash::make('1234'),\n 'email_verified_at' => Carbon::now()\n ]);\n\n factory(User::class, 200)->create();\n\n // $this->call(\"OthersTableSeeder\");\n }", "public function run()\n {\n $this->seedRegularUsers();\n $this->seedAdminUser();\n }", "public function run()\n {\n if (\\App::environment() === 'local') {\n\n // Delete existing data\n\n\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // Truncate all tables, except migrations\n $tables = array_except(DB::select('SHOW TABLES'), ['migrations']);\n foreach ($tables as $table) {\n $tables_in_database = \"Tables_in_\" . Config::get('database.connections.mysql.database');\n DB::table($table->$tables_in_database)->truncate();\n }\n\n // supposed to only apply to a single connection and reset it's self\n // but I like to explicitly undo what I've done for clarity\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n //get roles\n $this->call('AccountSeeder');\n $this->call('CountrySeeder');\n $this->call('StateSeeder');\n $this->call('CitySeeder');\n $this->call('OptionSeeder');\n $this->call('TagSeeder');\n $this->call('PrintTemplateSeeder');\n $this->call('SettingsSeeder');\n\n\n\n if(empty($web_installer)) {\n $admin = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"admin\",\n 'first_name' => 'Admin',\n 'last_name' => 'Doe',\n ));\n $admin->user_id = $admin->id;\n $admin->save();\n\n $adminRole = Sentinel::findRoleById(1);\n $adminRole->users()->attach($admin);\n }\n else {\n $admin = Sentinel::findById(1);\n }\n\n //add dummy staff and customer\n $staff = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"staff\",\n 'first_name' => 'Staff',\n 'last_name' => 'Doe',\n ));\n $admin->users()->save($staff);\n\n foreach ($this->getPermissions() as $permission) {\n $staff->addPermission($permission);\n }\n $staff->save();\n\n $customer = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"customer\",\n 'first_name' => 'Customer',\n 'last_name' => 'Doe',\n ));\n Customer::create(array('user_id' => $customer->id, 'belong_user_id' => $staff->id));\n $staff->users()->save($customer);\n\n //add respective roles\n\n $staffRole = Sentinel::findRoleById(2);\n $staffRole->users()->attach($staff);\n $customerRole = Sentinel::findRoleById(3);\n $customerRole->users()->attach($customer);\n\n\n\n DB::table('sales_teams')->truncate();\n DB::table('opportunities')->truncate();\n\n //Delete existing seeded users except the first 4 users\n User::where('id', '>', 3)->get()->each(function ($user) {\n $user->forceDelete();\n });\n\n //Get the default ADMIN\n $user = User::find(1);\n $staffRole = Sentinel::getRoleRepository()->findByName('staff');\n $customerRole = Sentinel::getRoleRepository()->findByName('customer');\n\n //Seed Sales teams for default ADMIN\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($user->id, $j, $user);\n $this->createOpportunity($user, $user->id, $j);\n }\n\n\n //Get the default STAFF\n $staff = User::find(2);\n $this->createSalesTeam($staff->id, 1, $staff);\n $this->createSalesTeam($staff->id, 2, $staff);\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $staff->id, $j);\n }\n\n foreach (range(1, 3) as $i) {\n $staff = $this->createStaff($i);\n $user->users()->save($staff);\n $staffRole->users()->attach($staff);\n\n $customer = $this->createCustomer($i);\n $staff->users()->save($customer);\n $customerRole->users()->attach($customer);\n $customer->customer()->save(factory(\\App\\Models\\Customer::class)->make());\n\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 5) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $i, $j);\n }\n\n }\n\n //finally call it installation is finished\n file_put_contents(storage_path('installed'), 'Welcome to LCRM');\n }\n }", "public function run()\n {\n if (env('DB_DATABASE') == 'connection') {\n Connection::create([\n \"ruc\" => \"12312312312\",\n \"basedata\" => \"nbdata2018_1\",\n ]);\n \n Connection::create([\n \"ruc\" => \"12312312315\",\n \"basedata\" => \"nbdata2018_2\",\n ]);\n \n $this->call(ConnectionTableSeeder::class);\n } else {\n $this->call(AppSeeder::class);\n }\n }", "public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::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 < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n # truncates tables before seeding\n foreach ($this->toTruncate as $table) {\n DB::table($table)->delete();\n }\n\n factory(App\\Models\\Product::class, 25)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Post::truncate();\n Comment::truncate();\n // CommentReply::truncate();\n \n\n\n factory(User::class,10)->create();\n factory(Post::class,20)->create();\n factory(Comment::class,30)->create();\n // factory(CommentReply::class,30)->create();\n }", "public function run()\n\t{\n \n Eloquent::unguard();\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\t$this->call('UserTableSeeder');\n\t $this->call('LayerTableSeeder');\n $this->call('UserLevelTableSeeder');\n $this->call('RoleUserTableSeeder');\n $this->call('RoleLayerTableSeeder');\n $this->call('BookmarkTableSeeder');\n \n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n DB::statement('SET foreign_key_checks = 0');\n DB::table('topics')->truncate();\n\n factory(\\App\\Topic::class, 100)->create();\n // ->each(function($topic) {\n\n // // Seed para a relação com group\n // $topic->group()->save(factory(App\\Group::class)->make());\n\n // // Seed para a relação com topicMessages\n // $topic->topicMessages()->save(factory(App\\TopicMessage::class)->make());\n\n // // Seed para a relação com user\n // $topic->user()->save(factory(App\\User::class)->make());\n // });\n \n DB::statement('SET foreign_key_checks = 1');\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n Categoria::truncate();\n Atractivo::truncate();\n Galeria::truncate();\n User::truncate();\n\n $this->call(CategoriasTableSeeder::class);\n $this->call(AtractivosTableSeeder::class);\n $this->call(GaleriasTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n }", "public function run(Faker $faker)\n {\n Schema::disableForeignKeyConstraints();\n DB::table('users')->insert([\n 'name' => $faker->name(),\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n\t $this->call(CategoryTableSeed::class);\n\t $this->call(ProductTableSeed::class);\n\t $this->call(UserTableSeed::class);\n }", "public function run()\n {\n $this->cleanDatabase();\n\n factory(User::class, 50)->create();\n factory(Document::class, 30)->create();\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n \t// DB::table('webapps')->delete();\n\n $webapps = array(\n\n );\n\n // Uncomment the below to run the seeder\n // DB::table('webapps')->insert($webapps);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $tables = array(\n 'users',\n 'companies',\n 'stands',\n 'events',\n 'visitors',\n 'api_keys'\n );\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n }\n\n foreach ($tables as $table) {\n DB::table($table)->truncate();\n }\n\n $this->call(UsersTableSeeder::class);\n $this->call(EventsTableSeeder::class);\n $this->call(CompaniesTableSeeder::class);\n $this->call(StandsTableSeeder::class);\n $this->call(VisitorsTableSeeder::class);\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n $clear = $this->command->confirm('Wil je de database leegmaken? (Dit haalt alle DATA weg)');\n\n if ($clear):\n $this->command->callSilent('migrate:refresh');\n $this->command->info('Database Cleared, starting seeding');\n endif;\n\n $this->call([\n SeedSeeder::class,\n RoleSeeder::class,\n UserSeeder::class,\n // BoardgameSeeder::class,\n BoardgamesTableSeeder::class,\n StatusSeeder::class,\n TournamentSeeder::class,\n AchievementsSeeder::class,\n TournamentUsersSeeder::class,\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n $this->call(PaisSeeder::class);\n $this->call(DepartamentoSeeder::class);\n $this->call(MunicipioSeeder::class);\n $this->call(PersonaSeeder::class);\n }", "public function run()\n {\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('events')->truncate();\n \n Event::create([\n 'id' => 1,\n 'name' => 'Spot Registration For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n Event::create([\n 'id' => 2,\n 'name' => 'Spot Screening For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'screen',\n 'formId'\t\t=> 1,\n ]);\n \n Event::create([\n 'id' => 3,\n 'name' => 'Spot Registration For Skin Cancer',\n 'cancerId' => 2,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n\n Event::create([\n 'id' => 3,\n 'name' => 'Registration cum Screening camp for Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addWeeks(1),\n 'eventType'\t\t=> 'register_screen',\n 'formId'\t\t=> 1,\n ]);\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Para que no verifique el control de claves foráneas al hacer el truncate haremos:\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n\t\t// Primero hacemos un truncate de las tablas para que no se estén agregando datos\n\t\t// cada vez que ejecutamos el seeder.\n\t\t//Foto::truncate();\n\t\t//Album::truncate();\n\t\t//Usuario::truncate();\n DB::table('users')->delete();\n DB::table('ciudades')->delete();\n DB::table('tiendas')->delete();\n DB::table('ofertas')->delete();\n DB::table('ventas')->delete();\n\n\n\t\t// Es importante el orden de llamada.\n\t\t$this->call('UserSeeder');\n $this->call('CiudadSeeder');\n\t\t$this->call('TiendaSeeder');\n $this->call('OfertaSeeder');\n $this->call('VentaSeeder');\n }", "public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }", "public function run()\n {\n $this->truncateTables([\n 'users',\n 'categories',\n 'types',\n 'courses',\n 'classrooms',\n 'contents',\n 'companies',\n ]);\n\n $this->call(CompanyTableSeeder::class);\n $this->call(TypeTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(CoursesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(ContentTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(ClassroomTableSeeder::class);\n $this->call(TestTableSeeder::class);\n $this->call(BankTableSeeder::class);\n\n\n // factory(\\App\\User::class, 50)\n // ->create()\n // ->each(function ($user) {\n // // $user->companies()->save();\n // $company = \\App\\Company::inRandomOrder()->first();\n // $user->companies()->attach($company->id);\n // $user->assignRole(['participante']);\n // });\n /*\n factory(\\App\\User::class, 50)\n ->create()\n ->each(function ($user) {\n $user->assignRole(['participante']);\n });*/\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Question::truncate();\n Option::truncate();\n// Answer::truncate();\n Quiz::truncate();\n QuizQuestion::truncate();\n\n //for admin\n $admin = factory(User::class)->create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'is_admin' => 1,\n ]);\n\n //for user\n $user = factory(User::class)->create([\n 'name' => 'User',\n 'email' => '[email protected]',\n ]);\n\n factory(Question::class, 100)->create()->each(function ($question) {\n factory(Option::class, mt_rand(2, 4))->create([\n 'question_id' => $question->id,\n ]);\n });\n\n factory(Quiz::class, 10)->create()->each(function ($quiz) {\n\n factory(QuizQuestion::class, mt_rand(5, 10))->create();\n });\n\n\n }", "public function run()\n {\n $this->call([\n SiteSettingsSeeder::class,\n LaratrustSeeder::class,\n CountrySeeder::class,\n GovernorateSeeder::class,\n FaqSeeder::class,\n SitePageSeeder::class,\n UsersSeeder::class,\n ]);\n\n Country::whereiso(\"EG\")->update(['enable_shipping' => true]);\n\n factory(User::class, 400)->create();\n\n Category::create([\n 'en' => [\n 'name' => \"cake tools\"\n ]\n ]);\n\n Category::create([\n 'en' => [\n 'name' => \"Party Supplies\"\n ]\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ProductSeeder::class\n ]);\n }", "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n\n if (App::environment('local')) {\n $this->call(FakeUsersTableSeeder::class);\n $this->call(FakeArticlesTableSeeder::class);\n $this->call(FakeEventsTableSeeder::class);\n }\n }", "public function run()\n {\n Model::unguard();\n\n $this->call(CategoryTypesTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(AccountTypesTableSeeder::class);\n $this->call(TransactionTypesTableSeeder::class);\n\n if (App::environment() !== 'production') {\n $this->call(UserTableSeeder::class);\n $this->call(AccountBudgetTableSeeder::class);\n $this->call(TransactionTableSeeder::class);\n }\n\n Model::reguard();\n }", "public function run()\n {\n User::truncate();\n Product::truncate();\n User::forceCreate([\n 'name' => 'foo',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n factory(User::class, 5)->create();\n factory(Product::class, 5)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n {\n $this->call([UsersTableSeeder::class]);\n $this->call([ContratosTableSeeder::class]);\n $this->call([UsuariosTableSeeder::class]);\n $this->call([UnidadesTableSeeder::class]);\n $this->call([AtestadosTableSeeder::class]);\n }", "public function run()\n {\n Model::unguard();\n\n // $this->call(\"OthersTableSeeder\");\n\n // DB::table('locations')->insert([\n // 'id' => 1,\n // 'name' => 'Default',\n // 'name' => 'district',\n // 'district_id' => 1,\n // 'province_id' => 1,\n // ]);\n }", "public function run()\n {\n $data = include env('DATA_SEED');\n\n \\Illuminate\\Support\\Facades\\DB::table('endpoints')->insert((array)$data);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('admins')->truncate();\n\n for ($i = 0; $i < 10; $i++)\n {\n $faker = Factory::create('en_US');\n $values = [\n 'name' => $faker->userName,\n 'email' => $faker->freeEmail,\n 'password' => bcrypt($faker->password),\n 'phone' => $faker->phoneNumber,\n 'status' => random_int(0,1)\n ];\n admin::create($values);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n DB::beginTransaction();\n// $this->seed();\n DB::commit();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n \\DB::table('provinces')->delete();\n \\DB::table('cities')->delete();\n \\DB::table('districts')->delete();\n // import provinces and cities from sql file\n $sqlFile = app_path() . '/../database/raw/administrative_indonesia_without_districts.sql';\n DB::unprepared(file_get_contents($sqlFile));\n $this->command->info('Successfully seed Provinces and Cities!');\n\n // import districts with latitude and longitude from csv file\n $csvFile = app_path() . '/../database/raw/administrative_indonesia_districts_with_lat_lng.csv';\n $districts = $this->csvToArray($csvFile);\n // check if lat lng exists\n foreach ($districts as $i => $d) {\n if ($d['latitude'] == '') $districts[$i]['latitude'] = 0;\n if ($d['longitude'] == '') $districts[$i]['longitude'] = 0;\n }\n // insert it\n $insert = District::insert($districts);\n if ($insert) $this->command->info('Successfully seed Districts!');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RegionsTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(SubDistrictsTableSeeder::class);\n $this->call(PostcodesTableSeeder::class);\n\n if (env('APP_ENV') !== 'production') {\n // Wipe up 5 churches, and each church has 5 cells, and each cell has 20 members associated with.\n // In other word, we wipe up 500 church members.\n for ($i = 0; $i < 2; $i++) {\n $church = factory(\\App\\Models\\Church::class)->create();\n\n $church->areas()->saveMany(factory(\\App\\Models\\Area::class, 2)->create([\n 'church_id' => $church->id\n ])->each(function($area) {\n $area->cells()->saveMany(factory(\\App\\Models\\Cell::class, 2)->create([\n 'area_id' => $area->id\n ])->each(function($cell) {\n $cell->members()->saveMany(factory(App\\Models\\Member::class, 10)->create([\n 'cell_id' => $cell\n ]));\n }));\n }));\n }\n }\n }", "public function run()\n {\n User::create([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n ]);\n\n User::create([\n 'name' => 'Leonardo',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789')\n ]);\n\n // seed sin model\n /* DB::table('users')->insert([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]); */\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->environmentPath = env('APP_ENV') === 'production' ||\n env('APP_ENV') === 'qa' ||\n env('APP_ENV') === 'integration' ?\n 'Production':\n 'local';\n //disable FK\n Model::unguard();\n DB::statement(\"SET session_replication_role = 'replica';\");\n\n // $this->call(HrEmployeeTableSeeder::class);\n $this->call(\"Modules\\HR\\Database\\Seeders\\\\$this->environmentPath\\HrEmployeePosTableSeeder\");\n // $this->call(HrEmployeePresetsDiscountTableSeeder::class);\n\n // Enable FK\n DB::statement(\"SET session_replication_role = 'origin';\");\n Model::reguard();\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "protected static function seed()\n {\n foreach (self::fetch('database/seeds', false) as $file) {\n Bus::need($file);\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n $faker = F::create('App\\Proovedores');\n for($i=0; $i < 10; $i++){\n DB::table('users')->insert([\n 'usuario' => $i,\n 'password' => $i,\n 'email' => $faker->email,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Delete all records.\n DB::table('users')->delete();\n // Reset AUTO_INCREMENT.\n DB::table('users')->truncate();\n\n // Dev user.\n App\\Models\\User::create([\n 'email' => '[email protected]',\n 'password' => '$2y$10$t6q81nz.XrMrh20NHDvxUu/szwHBwgzPd.01e8uuP0qVy0mPa6H/e',\n 'first_name' => 'L5',\n 'last_name' => 'App',\n 'username' => 'l5-app',\n 'is_email_verified' => 1,\n ]);\n\n // Dummy users.\n TestDummy::times(10)->create('App\\Models\\User');\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // We did this for test purposes. Shouldn't be doing this for production\n $password = Hash::make('123456');\n\n User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n }", "public function run()\n {\n Model::unguard();\n \n factory('App\\User','admin')->create();\n factory('App\\Evento',100)->create();\n //factory('App\\User','miembro',10)->create();\n factory('App\\Telefono',13)->create();\n factory('App\\Notificacion',10)->create();\n factory('App\\Rubro',10)->create();\n factory('App\\Tecnologia',10)->create();\n factory('App\\Cultivo',10)->create();\n factory('App\\Etapa',10)->create();\n factory('App\\Variedad',10)->create();\n factory('App\\Caracteristica',10)->create();\n factory('App\\Practica',30)->create();\n factory('App\\Tag',15)->create();\n // $this->call(PracticaTableSeeder::class);\n $this->call(TrTableSeeder::class);\n $this->call(MesTableSeeder::class);\n $this->call(SemanasTableSeeder::class);\n $this->call(PsTableSeeder::class);\n $this->call(MsTableSeeder::class);\n $this->call(CeTableSeeder::class);\n $this->call(CvTableSeeder::class);\n $this->call(PtSeeder::class);\n \n\n Model::unguard();\n }", "public function run() {\n $this->call(UserSeeder::class);\n $this->call(PermissionSeeder::class);\n $this->call(CreateAdminUserSeeder::class);\n // $this->call(PhoneSeeder::class);\n // $this->call(AddressSeeder::class);\n\n $this->call(ContactFormSeeder::class);\n //$this->call(ContactSeeder::class);\n\n User::factory()->count(20)->create()->each(function ($user) {\n // Seed the relation with one address\n $address = Address::factory()->make();\n $user->address()->save($address);\n\n // Seed the relation with one phone\n $phone = Phone::factory()->make();\n $user->phone()->save($phone);\n\n // Seed the relation with 15 contacts\n $contact = Contact::factory()->count(25)->make();\n $user->contacts()->saveMany($contact);\n });\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Activity::truncate();\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n $this->call(UserTableSeeder::class);\n $this->call(ActivityTableSeeder::class);\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n \\App\\User::truncate();\n \\App\\Category::truncate();\n \\App\\Product::truncate();\n \\App\\Transaction::truncate();\n DB::table('category_product')->truncate();\n\n \\App\\User::flushEventListeners();\n \\App\\Category::flushEventListeners();\n \\App\\Product::flushEventListeners();\n \\App\\Transaction::flushEventListeners();\n\n\n $usersQuentity = 1000;\n $categoriesQuentity = 30;\n $productsQuentity = 1000;\n $transactionsQuentity = 1000;\n\n factory(\\App\\User::class, $usersQuentity)->create();\n factory(\\App\\Category::class, $categoriesQuentity)->create();\n factory(\\App\\Product::class, $productsQuentity)->create()->each(\n function ($product){\n $categories = \\App\\Category::all()->random(mt_rand(1, 5))->pluck('id');\n\n $product->categories()->attach($categories);\n }\n );\n factory(\\App\\Transaction::class, $transactionsQuentity)->create();\n\n }", "public function run()\n {\n Eloquent::unguard();\n \n $this->call('AdminMemberTableSeeder');\n $this->call('BankInfoTableSeeder');\n $this->call('LocationLookUpTableSeeder');\n $this->call('OrderStatusTableSeeder');\n $this->call('AdminRoleTableSeeder');\n\n }", "public static function setUpBeforeClass()\n {\n parent::setUpBeforeClass();\n $app = require __DIR__ . '/../../bootstrap/app.php';\n /** @var \\Pterodactyl\\Console\\Kernel $kernel */\n $kernel = $app->make(Kernel::class);\n $kernel->bootstrap();\n $kernel->call('migrate:fresh');\n\n \\Artisan::call('db:seed');\n }", "public function run()\n {\n Model::unguard();\n\n if( !User::where('email', '[email protected]')->count() ) {\n User::create([\n 'nombre'=>'Nick'\n ,'apellidos'=>'Palomino'\n ,'email'=>'[email protected]'\n ,'password'=> Hash::make('1234567u')\n ,'celular'=>'966463589'\n ]);\n }\n\n $this->call('CategoriaTableSeeder');\n $this->call('WhateverSeeder');\n $this->call('ProductTableSeeder');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n Model::unguard();\n\n $this->command->info('seed start!');\n\n // 省市县\n $this->call('RegionTableSeeder');\n // 用户、角色\n $this->call('UserTableSeeder');\n // 权限\n $this->call('PurviewTableSeeder');\n // 博文分类\n $this->call('CategoryTableSeeder');\n // 博文、评论、标签\n $this->call('ArticleTableSeeder');\n // 心情\n $this->call('MoodTableSeeder');\n // 留言\n $this->call('MessageTableSeeder');\n // 文件\n $this->call('StorageTableSeeder');\n\n $this->command->info('seed end!');\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n {\n $this->call(RolesDatabaseSeeder::class);\n $this->call(UsersDatabaseSeeder::class);\n $this->call(LocalesDatabaseSeeder::class);\n $this->call(MainDatabaseSeeder::class);\n }", "public function run()\n {\n\n Schema::disableForeignKeyConstraints(); //in order to execute truncate before seeding\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostCategoriesSeeder::class);\n $this->call(TagsSeeder::class);\n $this->call(PostsSeeder::class);\n\n Schema::enableForeignKeyConstraints();\n\n\n }", "public function run()\n {\n // DB::table('users')->insert([\n // ['id'=>1, 'email'=>'nhat','password'=>bcrypt(1234), 'lever'=>0]\n // ]);\n // $this->call(UsersTableSeeder::class);\n // $this->call(CatTableSeeder::class);\n // $this->call(TypeTableSeeder::class);\n // $this->call(AppTableSeeder::class);\n // $this->call(GameTableSeeder::class);\n \n \n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "public function run()\n\t{\n\t\t//composer require fzaninotto/faker\n\t\t\n\t\t$this->call(populateAllSeeder::class);\n\t\t\n\t}", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n Model::unguard();\n\n $faker =Faker\\Factory::create();\n\n // $this->call(UserTableSeeder::class);\n\n $this->seedTasks($faker);\n $this->seedTags($faker);\n\n Model::reguard($faker);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n $this->call([\n CountriesSeeder::class,\n ProvincesSeeder::class,\n SettingsSeeder::class,\n AdminsTableSeeder::class,\n ]);\n }" ]
[ "0.8064933", "0.7848158", "0.7674873", "0.724396", "0.7216743", "0.7132209", "0.70970356", "0.70752203", "0.704928", "0.699208", "0.6987078", "0.69839287", "0.6966499", "0.68990964", "0.6868679", "0.68468624", "0.68307716", "0.68206114", "0.6803113", "0.6803113", "0.6801801", "0.6789746", "0.6788733", "0.6788008", "0.6786291", "0.67765796", "0.67742485", "0.677106", "0.67651874", "0.6761959", "0.675823", "0.67337847", "0.6733437", "0.67295784", "0.67290515", "0.6724652", "0.67226326", "0.6722267", "0.6721339", "0.6715842", "0.67070943", "0.67060536", "0.67031103", "0.6702514", "0.6702361", "0.67017967", "0.6695973", "0.6693496", "0.66868156", "0.66837406", "0.6678434", "0.66755766", "0.66726524", "0.666599", "0.664943", "0.6640641", "0.663921", "0.66387916", "0.6636016", "0.6633116", "0.6629787", "0.6627134", "0.6625862", "0.661699", "0.66093796", "0.6602538", "0.65996546", "0.659914", "0.6596484", "0.6596383", "0.65922767", "0.65922284", "0.65913564", "0.65889347", "0.65812707", "0.65811145", "0.6579546", "0.6578819", "0.6575912", "0.65749073", "0.6574314", "0.657148", "0.65696406", "0.6568972", "0.65624833", "0.6560332", "0.6559092", "0.6557491", "0.65555155", "0.6554255", "0.65509576", "0.6548099", "0.65479296", "0.6545845", "0.65443295", "0.65434265", "0.65432936", "0.654295", "0.65426385", "0.6541781", "0.6539325" ]
0.0
-1
Converts a value from its PHP representation to its database representation of this type.
public function convertToDatabaseValue($value) { return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function convertPHPToDatabaseValue($value)\n {\n $type = self::getTypeFromPHPVariable($value);\n\n if ($type !== null) {\n return $type->convertToDatabaseValue($value);\n }\n\n return $value;\n }", "public function convertToPHPValue($value);", "public function dbTypecast($value)\n {\n // to override this with annotation of explicit PDO type.\n return $this->typecast($value);\n }", "public function convertToPHPValue($value)\n {\n return $value;\n }", "public function convertToPHPValue($value)\n {\n return $value;\n }", "public function convertToPHPValue($value, $type)\n {\n return Type::getType($type)->convertToPHPValue($value, $this->getDatabasePlatform());\n }", "protected function typecast($value)\n {\n if ($value === ''\n && !in_array(\n $this->type,\n [\n Schema::TYPE_TEXT,\n Schema::TYPE_STRING,\n Schema::TYPE_BINARY,\n Schema::TYPE_CHAR\n ],\n true)\n ) {\n return null;\n }\n\n if ($value === null\n || gettype($value) === $this->phpType\n || $value instanceof ExpressionInterface\n || $value instanceof Query\n ) {\n return $value;\n }\n\n if (is_array($value)\n && count($value) === 2\n && isset($value[1])\n && in_array($value[1], $this->getPdoParamTypes(), true)\n ) {\n return new PdoValue($value[0], $value[1]);\n }\n\n switch ($this->phpType) {\n case 'resource':\n case 'string':\n if (is_resource($value)) {\n return $value;\n }\n if (is_float($value)) {\n // ensure type cast always has . as decimal separator in all locales\n return str_replace(',', '.', (string) $value);\n }\n return (string) $value;\n case 'integer':\n if (is_bool($value)) {\n return ($value) ? 1 : 0;\n }\n return (int) $value;\n case 'boolean':\n return (boolean) $value;\n case 'double':\n return (double) $value;\n }\n\n return $value;\n }", "abstract public function convertFromRawValue($value);", "public function convertToPhpValue($data);", "function fromDB($value, $type) {\n\t\t//everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\treturn new DateTime($value);\n\t\t\tcase 'integer':\n\t\t\t\treturn (int) $value;\n\t\t\tcase 'boolean':\n\t\t\t\treturn (bool) $value;\n\t\t}\n\t\treturn $value;\n\t}", "public function convertToDatabaseValue($value, $type)\n {\n return Type::getType($type)->convertToDatabaseValue($value, $this->getDatabasePlatform());\n }", "abstract public function convertFromDb($value, Entity\\ScalarField $field);", "protected function transformValueFromDatabase($value,$type) {\n\n if($type==SettingInterface::TYPE_STRING) {\n return (string)$value;\n }\n\n if($type==SettingInterface::TYPE_INTEGER) {\n return (integer)$value;\n }\n\n if($type==SettingInterface::TYPE_BOOLEAN) {\n if(in_array($value,[true,1,'y','yes','true'])) {\n return true;\n }\n if(in_array($value,[false,0,'n','no','false'])) {\n return false;\n }\n }\n\n if($type==SettingInterface::TYPE_DATE_TIME) {\n return \\DateTime::createFromFormat('Y-m-d H:i:s',$value);\n }\n\n if($type==SettingInterface::TYPE_ARRAY) {\n return json_decode($value,true);\n }\n\n return $value;\n }", "public function value2db($value=FALSE)\r\n {\r\n return $value;\r\n }", "function to_database($value, Backend $backend) {\n return $value;\n }", "public function castDb(mixed $value, string $format = ''): mixed\n {\n if (is_null($value) || ! is_string($value)) {\n return $value;\n }\n\n return $this->encode($value, $this->parseFormat($format));\n }", "function toDB($value, $type) {\n\t\t// everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\tif($value instanceof DateTime) return $value->format('c');\n\t\t}\n\t\treturn $value;\n\t}", "function to_php($value, Backend $backend) {\n return $value;\n }", "public function toPhp($value)\n {\n return $value;\n }", "abstract public function cast($value);", "public function _typecastSaveField(Field $f, $value)\n {\n // work only on copied value not real one !!!\n $v = is_object($value) ? clone $value : $value;\n\n switch ($f->type) {\n case 'boolean':\n // if enum is not set, then simply cast value to integer\n if (!isset($f->enum) || !$f->enum) {\n $v = (int) $v;\n break;\n }\n\n // if enum is set, first lets see if it matches one of those precisely\n if ($v === $f->enum[1]) {\n $v = true;\n } elseif ($v === $f->enum[0]) {\n $v = false;\n }\n\n // finally, convert into appropriate value\n $v = $v ? $f->enum[1] : $f->enum[0];\n break;\n case 'date':\n case 'datetime':\n case 'time':\n $dt_class = isset($f->dateTimeClass) ? $f->dateTimeClass : 'DateTime';\n $tz_class = isset($f->dateTimeZoneClass) ? $f->dateTimeZoneClass : 'DateTimeZone';\n\n if ($v instanceof $dt_class) {\n $format = ['date' => 'Y-m-d', 'datetime' => 'Y-m-d H:i:s', 'time' => 'H:i:s'];\n $format = $f->persist_format ?: $format[$f->type];\n\n // datetime only - set to persisting timezone\n if ($f->type == 'datetime' && isset($f->persist_timezone)) {\n $v->setTimezone(new $tz_class($f->persist_timezone));\n }\n $v = $v->format($format);\n }\n break;\n case 'array':\n case 'object':\n // don't encode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonEncode($f, $v);\n break;\n }\n\n return $v;\n }", "public function toDatabase($value, Driver $driver)\n {\n $value = json_encode($value, JSON_UNESCAPED_UNICODE);\n return parent::toDatabase($value, $driver);\n }", "function cast($field, $value) {\n\t\t// if the column doesn't exist, don't cast the value\n\t\tif (!isset($this->columns[$field])) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t// precast arrays\n\t\tif (is_array($value)) {\n\t\t\t$value = $this->columns[$field]->array_to_type(array_values($value));\n\t\t}\n\n\t\t// cast value\n\t\t$value = $this->columns[$field]->type_cast($value);\n\n\t\treturn $value;\n\n\t}", "public function toPhp()\n {\n return $this->_value->toPhp();\n }", "public function _typecastLoadField(Field $f, $value)\n {\n // LOB fields return resource stream\n if (is_resource($value)) {\n $value = stream_get_contents($value);\n }\n\n // work only on copied value not real one !!!\n $v = is_object($value) ? clone $value : $value;\n\n switch ($f->type) {\n case 'string':\n case 'text':\n // do nothing - it's ok as it is\n break;\n case 'integer':\n $v = (int) $v;\n break;\n case 'float':\n $v = (float) $v;\n break;\n case 'money':\n $v = round($v, 4);\n break;\n case 'boolean':\n if (isset($f->enum) && is_array($f->enum)) {\n if (isset($f->enum[0]) && $v == $f->enum[0]) {\n $v = false;\n } elseif (isset($f->enum[1]) && $v == $f->enum[1]) {\n $v = true;\n } else {\n $v = null;\n }\n } elseif ($v === '') {\n $v = null;\n } else {\n $v = (bool) $v;\n }\n break;\n case 'date':\n case 'datetime':\n case 'time':\n $dt_class = isset($f->dateTimeClass) ? $f->dateTimeClass : 'DateTime';\n $tz_class = isset($f->dateTimeZoneClass) ? $f->dateTimeZoneClass : 'DateTimeZone';\n\n if (is_numeric($v)) {\n $v = new $dt_class('@'.$v);\n } elseif (is_string($v)) {\n // ! symbol in date format is essential here to remove time part of DateTime - don't remove, this is not a bug\n $format = ['date' => '+!Y-m-d', 'datetime' => '+!Y-m-d H:i:s', 'time' => '+!H:i:s'];\n $format = $f->persist_format ?: $format[$f->type];\n\n // datetime only - set from persisting timezone\n if ($f->type == 'datetime' && isset($f->persist_timezone)) {\n $v = $dt_class::createFromFormat($format, $v, new $tz_class($f->persist_timezone));\n if ($v === false) {\n throw new Exception(['Incorrectly formatted datetime', 'format' => $format, 'value' => $value, 'field' => $f]);\n }\n $v->setTimeZone(new $tz_class(date_default_timezone_get()));\n } else {\n $v = $dt_class::createFromFormat($format, $v);\n if ($v === false) {\n throw new Exception(['Incorrectly formatted date/time', 'format' => $format, 'value' => $value, 'field' => $f]);\n }\n }\n\n // need to cast here because DateTime::createFromFormat returns DateTime object not $dt_class\n // this is what Carbon::instance(DateTime $dt) method does for example\n if ($dt_class != 'DateTime') {\n $v = new $dt_class($v->format('Y-m-d H:i:s.u'), $v->getTimeZone());\n }\n }\n break;\n case 'array':\n // don't decode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonDecode($f, $v, true);\n break;\n case 'object':\n // don't decode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonDecode($f, $v, false);\n break;\n }\n\n return $v;\n }", "final public static function convertValueForSql($type, $value)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase Core::TYPE_INTEGER:\n\t\t\t\treturn intval($value);\n\n\t\t\tcase Core::TYPE_FLOAT:\n\t\t\t\treturn floatval($value);\n\t\t\t\tbreak;\n\n\t\t\tcase Core::TYPE_BOOLEAN:\n\t\t\t\treturn $value ? 1 : 0;\n\n\t\t\tcase Core::TYPE_STRING:\n\t\t\t\t$temp\t\t\t=\thtmlspecialchars_decode($value, ENT_QUOTES);\n\t\t\t\t$temp\t\t\t=\thtmlspecialchars($temp, ENT_QUOTES, Core::$current_db_is_utf8 ? 'UTF-8' : 'ISO-8859-1');\n\t\t\t\treturn '\"'.$temp.'\"';\n\n\t\t\tcase Core::TYPE_DATE:\n\t\t\tcase Core::TYPE_TIME:\n\t\t\tcase Core::TYPE_DATETIME:\n\t\t\tcase Core::TYPE_TIMESTAMP:\n\t\t\tcase Core::TYPE_YEAR:\n\t\t\t\t$format\t\t\t=\tnull;\n\n\t\t\t\tif(empty($value)) {\n\t\t\t\t\treturn 'NULL';\n\t\t\t\t}\n\n\t\t\t\tswitch($type)\n\t\t\t\t{\n\t\t\t\t\tcase Core::TYPE_TIME:\t\t$format\t=\t'H:i:s'; break;\n\t\t\t\t\tcase Core::TYPE_DATETIME:\t$format\t=\t'Y-m-d H:i:s'; break;\n\t\t\t\t\tcase Core::TYPE_TIMESTAMP:\t$format\t=\t'YmdHis'; break;\n\t\t\t\t\tcase Core::TYPE_YEAR:\t\t$format\t=\t'Y'; break;\n\t\t\t\t\tcase Core::TYPE_DATE:\t\t$format\t=\t'Y-m-d'; break;\n\t\t\t\t}\n\n\t\t\t\treturn\t'\"'.(is_numeric($value)\n\t\t\t\t\t\t? @date($format, $value)\n\t\t\t\t\t\t: (\n\t\t\t\t\t\t$value instanceof \\DateTime\n\t\t\t\t\t\t\t? $value->format($format)\n\t\t\t\t\t\t\t: $value\n\t\t\t\t\t\t)).'\"';\n\n\t\t\tdefault:\n\t\t\t\treturn $value;\n\t\t}\n\t}", "public function convertToPHPValue($value, DBAL\\Platforms\\AbstractPlatform $platform)\n {\n if (is_null($value)) {\n return null;\n }\n\n return $this->factory($value);\n }", "public function fromRaw($value)\n {\n $type = $this->getDataType();\n\n if ($type === 'json') {\n $value = json_decode($value, true);\n } elseif ($type === 'array') {\n $value = (array) $value;\n } elseif ($type === 'list') {\n $value = explode(',', $value);\n } elseif ($type === 'boolean') {\n $value = (bool) $value;\n } elseif ($type === 'integer') {\n $value = (int) $value;\n } elseif ($type === 'float') {\n $value = (float) $value;\n }\n\n return $value;\n }", "public function convertToDrupalValue($value);", "protected function _convertValue ($value) {\n switch ($value) {\n case 'null':\n # Null value\n $value = null;\n break;\n\n case 'true':\n # Boolean\n $value = true;\n break;\n\n case 'false':\n # Boolean\n $value = false;\n break;\n\n default:\n if (is_numeric ($value)) {\n\n # Number\n if (preg_match ('/^-?[1-9][0-9]*$/', $value)) {\n\n # Regular 10-base integer\n $value = intval ($value, 10);\n\n } else if (preg_match ('/^-?0[0-7]*$/', $value)) {\n\n # 8-base integer\n $value = intval ($value, 8);\n\n } else if (preg_match ('/^-?0x[0-9a-z]*$/i', $value)) {\n\n # 16-base integer\n $value = intval ($value, 16);\n\n } else {\n\n # Floating point number\n $value = $value + 0;\n\n }\n\n } else {\n\n # String\n /*NOP*/;\n\n }\n }\n return $value;\n }", "protected function transformValueToDatabase($value,$type) {\n\n if($type==SettingInterface::TYPE_BOOLEAN) {\n Assert::boolean($value);\n return $value ? 1 : 0;\n }\n\n if($type==SettingInterface::TYPE_DATE_TIME) {\n if(!$value instanceof \\DateTimeInterface) {\n throw new \\Exception('value is not an datetime-object');\n }\n return $value->format('Y-m-d H:i:s');\n }\n\n if($type==SettingInterface::TYPE_ARRAY) {\n Assert::isArray($value);\n return json_encode($value);\n }\n\n return $value;\n }", "abstract function toEntity($value);", "public function cast($value)\n {\n return json_decode($value, true);\n }", "public function convertToPHPValue($value)\n {\n if ($value === null) {\n return null;\n }\n\n $reflection = new \\ReflectionClass($this->getClass($value));\n $instance = $reflection->newInstanceWithoutConstructor();\n\n foreach ($value as $field => $val) {\n if ($field === Fields::KEY_CLASS) {\n continue;\n }\n\n $this->setValue($reflection, $instance, $field, $val);\n }\n\n return $instance;\n }", "public function dbPrepValue($value)\n {\n return $value;\n }", "function dbsimplevalue($value) {\n if (is_null($value)) {\n return 'NULL';\n }\n\n\t// Stripslashes\n\tif (get_magic_quotes_gpc())\n\t\t$value = stripslashes($value);\n\n\tif (!is_int($value))\n\t\t$value = \"'\" . addslashes($value) . \"'\";\n\n\treturn $value;\n}", "public function toPHP($value, Driver $driver)\n {\n if ($value === null) {\n return null;\n }\n $value = parent::toPhp($value, $driver);\n return json_decode($value, true);\n }", "public function db2value($value=FALSE)\r\n {\r\n return $value;\r\n }", "public function convertToDb($value, Entity\\ScalarField $field)\n\t{\n\t\tif ($value === null)\n\t\t{\n\t\t\treturn \"NULL\";\n\t\t}\n\n\t\tif ($value instanceof SqlExpression)\n\t\t{\n\t\t\treturn $value->compile();\n\t\t}\n\n\t\tif($field instanceof Entity\\DatetimeField)\n\t\t{\n\t\t\tif (empty($value))\n\t\t\t{\n\t\t\t\t$result = \"NULL\";\n\t\t\t}\n\t\t\telseif($value instanceof Type\\Date)\n\t\t\t{\n\t\t\t\tif($value instanceof Type\\DateTime)\n\t\t\t\t{\n\t\t\t\t\t$value = clone($value);\n\t\t\t\t\t$value->setDefaultTimeZone();\n\t\t\t\t}\n\t\t\t\t$result = $this->getCharToDateFunction($value->format(\"Y-m-d H:i:s\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Main\\ArgumentTypeException('value', '\\Bitrix\\Main\\Type\\Date');\n\t\t\t}\n\t\t}\n\t\telseif($field instanceof Entity\\DateField)\n\t\t{\n\t\t\tif (empty($value))\n\t\t\t{\n\t\t\t\t$result = \"NULL\";\n\t\t\t}\n\t\t\telseif($value instanceof Type\\Date)\n\t\t\t{\n\t\t\t\t$result = $this->getCharToDateFunction($value->format(\"Y-m-d\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Main\\ArgumentTypeException('value', '\\Bitrix\\Main\\Type\\Date');\n\t\t\t}\n\t\t}\n\t\telseif($field instanceof Entity\\IntegerField)\n\t\t{\n\t\t\t$result = \"'\".intval($value).\"'\";\n\t\t}\n\t\telseif($field instanceof Entity\\FloatField)\n\t\t{\n\t\t\tif(($scale = $field->getScale()) !== null)\n\t\t\t{\n\t\t\t\t$result = \"'\".round(doubleval($value), $scale).\"'\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result = \"'\".doubleval($value).\"'\";\n\t\t\t}\n\t\t}\n\t\telseif($field instanceof Entity\\StringField)\n\t\t{\n\t\t\t$result = \"'\".$this->forSql($value, $field->getSize()).\"'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = \"'\".$this->forSql($value).\"'\";\n\t\t}\n\n\t\treturn $result;\n\t}", "protected function _typecast($value) {\n\t\t$type = null;\t\t\n\n\t\tif (is_string($value)) {\n\t\t\t$type = 'string';\n\t\t}\n\t\tif (is_int($value)) {\n\t\t\t$type = 'int';\n\t\t}\n\t\tif (is_float($value)) {\n\t\t\t$type = 'double';\n\t\t}\n\t\tif (is_bool($value)) {\n\t\t\t$type = 'boolean';\n\t\t}\n\t\tif (is_array($value)) {\n\t\t\t$type = 'array';\n\t\t\t\n\t\t\t$valueKeys = array_keys($value);\n\t\t\tforeach($valueKeys as $vk) {\n\t\t\t\tif (!is_numeric($vk)) {\n\t\t\t\t\t$type = 'struct';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $type;\n\t}", "function get_value_db()\n\t{\n\t\treturn $this->value;\n\t}", "public function getValue()\n {\n return $this->_db->prepareStringToOut($this->_value);\n }", "protected function convertToStorage($value)\n\t{\n\t\treturn $value;\n\t}", "public function convertToPhpValue($value, AbstractPlatform $platform)\n {\n return $value;\n }", "protected function sanitize( $type, $value, $toDb = false )\n\t{\n\t\tswitch ( $type )\n\t\t{\n\t\t\tcase 'string':\n\t\t\t\treturn (string) $value;\n\t\t\tbreak;\n\n\t\t\tcase 'int':\n\t\t\t\treturn (int) $value;\n\t\t\tbreak;\n\t\t\n\t\t\tcase 'real':\n\t\t\tcase 'float':\n\t\t\tcase 'double':\n\t\t\t\treturn (double) $value;\n\t\t\tbreak;\n\n\t\t\tcase 'boolean':\n\t\t\t\treturn (boolean) $value;\n\t\t\tbreak;\n\n\t\t\tcase 'datetime':\n\t\t\t\tif ( ! $value )\n\t\t\t\t{\n\t\t\t\t\treturn '0000-00-00 00:00:00';\n\t\t\t\t}\n\t\t\t\treturn date( 'Y-m-d H:i:s', strtotime( $value ) );\n\t\t\tbreak;\n\n\t\t\tcase 'json':\n\t\t\t\tif ( $toDb )\n\t\t\t\t{\n\t\t\t\t\treturn json_encode( $value );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn json_decode( $value, true );\n\t\t\t\t\t} catch ( \\Exception $ex ) {\n\t\t\t\t\t\treturn array();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "public function convertToDatabaseValue($value)\n {\n if ($value === null) {\n return null;\n }\n\n $reflection = new \\ReflectionClass($value);\n\n $result = [\n Fields::KEY_ID => null,\n Fields::KEY_CLASS => $reflection->name\n ];\n\n foreach ($reflection->getProperties() as $prop) {\n $prop->setAccessible(true);\n $result[$prop->getName()] = $prop->getValue($value);\n }\n\n return array_filter(\n $result,\n function ($value) {\n return $value !== null;\n }\n );\n }", "public function toNative()\n {\n $value = parent::toNative();\n\n return \\intval($value);\n }", "protected function _castValue ( $value ) {\n\t\t\tswitch ( $this->_settingType ) {\n\t\t\t\tcase self::TYPE_BOOLEAN: return $value == \"true\" ? true : false;\n\t\t\t\tcase self::TYPE_SWITCH: return $value ? \"on\" : \"off\";\n\t\t\t\tcase self::TYPE_INTEGER: return intval ( $value );\n\t\t\t\tcase self::TYPE_STRING: return \"$value\";\n\t\t\t\tdefault: return \"\";\n\t\t\t}\n\t\t}", "public function database_prep($value)\n {\n $value = $this->connection->escape_string($value);\n return $value;\n }", "public function convertToDatabaseValue($value, DBAL\\Platforms\\AbstractPlatform $platform)\n {\n if (is_null($value)) {\n return null;\n }\n\n return (string)$value;\n }", "public function createValue($value, $type)\n\t{\n\t\tswitch ($type) {\n\t\t\tcase 'literal':\n\t\t\t\treturn $value;\n\t\t\t\tbreak;\n\t\t\tcase 'null':\n\t\t\t\treturn $this->sqlConstant('NULL');\n\t\t\t\tbreak;\n\t\t\tcase 'list':\n\t\t\t\treturn $this->valueList($value);\n\t\t\t\tbreak;\n\t\t\tcase 'number':\n\t\t\t\treturn $this->number($value);\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\treturn $this->string($value);\n\t\t\t\tbreak;\n\t\t\tcase 'constant':\n\t\t\t\treturn $this->sqlConstant($value);\n\t\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\tif ($value === true) {\n\t\t\t\t\treturn $this->sqlConstant('TRUE');\n\t\t\t\t} else {\n\t\t\t\t\treturn $this->sqlConstant('FALSE');\n\t\t\t\t}\n\t\t\tcase 'function':\n\t\t\t\tlist($function, $args) = explode('::SEPARATOR::', preg_replace('/^(.+)\\((.+)\\)$/', '$1::SEPARATOR::$2', $value));\n\t\t\t\t$args = explode(',', $args);\n\t\t\t\tforeach ($args as $i => $arg) {\n\t\t\t\t\t$args[$i] = $this->guess(trim($arg));\n\t\t\t\t}\n\t\t\t\treturn $this->sqlFunction(trim($function), $args);\n\t\t\t\tbreak;\n\t\t\tcase 'table':\n\t\t\t\treturn $this->table(trim($value, '`'));\n\t\t\t\tbreak;\n\t\t\tcase 'tableField':\n\t\t\tcase 'field':\n\t\t\t\tlist($table, $field) = explode('.', $value);\n\t\t\t\treturn $this->tableField(trim($table, '`'), trim($field, '`'));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new \\Exception('Invalid value type given to MySql::createValueInstance');\n\t\t\t\tbreak;\n\t\t}\n\t}", "function tosql($value, $type)\n{\n if(!strlen($value))\n return \"NULL\";\n else\n if($type == \"Number\")\n return str_replace (\",\", \".\", doubleval($value));\n else\n {\n if(get_magic_quotes_gpc() == 0)\n {\n $value = str_replace(\"'\",\"''\",$value);\n $value = str_replace(\"\\\\\",\"\\\\\\\\\",$value);\n }\n else\n {\n $value = str_replace(\"\\\\'\",\"''\",$value);\n $value = str_replace(\"\\\\\\\"\",\"\\\"\",$value);\n }\n\n return \"'\" . $value . \"'\";\n }\n}", "function tosql($value, $type)\n{\n if(!strlen($value))\n return \"NULL\";\n else\n if($type == \"Number\")\n return str_replace (\",\", \".\", doubleval($value));\n else\n {\n if(get_magic_quotes_gpc() == 0)\n {\n $value = str_replace(\"'\",\"''\",$value);\n $value = str_replace(\"\\\\\",\"\\\\\\\\\",$value);\n }\n else\n {\n $value = str_replace(\"\\\\'\",\"''\",$value);\n $value = str_replace(\"\\\\\\\"\",\"\\\"\",$value);\n }\n\n return \"'\" . $value . \"'\";\n }\n}", "protected function convertField(string $name, ?string $value): mixed\n {\n return $this->converters[$name]->fromPg($value, $this->types[$name]);\n }", "public function dbUnserialize(string $storedValue): void;", "private function castValue($type, $value)\n {\n switch ($type) {\n case 'number':\n $value = (int) $value;\n break;\n case 'boolean':\n $value = boolval($value);\n break;\n case 'map':\n case 'object':\n $value = json_decode($value);\n break;\n default:\n break;\n }\n\n return $value;\n }", "public function decodeValue($value)\n {\n if ($value !== false) {\n if ($this->format == self::JSON) {\n $value = json_decode($value, true);\n } else if ($this->format == self::PHP) {\n $value = unserialize($value);\n }\n }\n\n return $value;\n }", "public static function castFieldValue($value, $type)\n {\n if ($value === null || is_string($value)) {\n return $value;\n }\n\n if ($type === 'dateTime' && $value instanceof DateTime) {\n return (string)$value->getTimestamp();\n }\n\n if ($type === 'integer' && is_int($value)) {\n return sprintf('%011d', $value);\n }\n\n if ($type === 'double' && is_float($value)) {\n // 123.15 => 00000000123.15000, padding to 11 numbers before and padding to 5 behind decimal point\n return sprintf('%017.5f', $value);\n }\n\n if ($type === 'boolean' && is_bool($value)) {\n return $value ? '1' : '0';\n }\n\n if ($type === 'array' && is_array($value)) {\n return array_values($value);\n }\n\n return null;\n }", "protected function castValue($value)\n {\n switch ($value) {\n case 'false':\n return false;\n\n case 'true':\n return true;\n }\n\n if (is_numeric($value)) {\n $value = intval($value);\n }\n\n return $value;\n }", "public function unserialize($value)\n {\n $type = $this->getDataType();\n\n if ($type === 'json') {\n $value = json_decode($value, true);\n } elseif ($type === 'array') {\n $value = json_decode($value, true);\n } elseif ($type === 'list') {\n $value = explode(',', $value);\n } elseif ($type === 'boolean') {\n $value = (bool) $value;\n } elseif ($type === 'integer') {\n $value = (int) $value;\n } elseif ($type === 'float') {\n $value = (float) $value;\n }\n\n return $value;\n }", "function db2value($rec)\n {\n $languages = $this->getLanguages();\n if($this->isMlNode())\n {\n if(is_array($rec[$this->fieldName()]))\n {\n foreach($rec[$this->fieldName()] as $lng=>$value)\n {\n $result[$lng]=stripslashes($value);\n }\n } else $result = stripslashes($rec[$this->fieldName()]);\n }\n else\n {\n for ($i=0,$_i=count($languages);$i<$_i;$i++)\n {\n $result[$languages[$i]] = stripslashes($rec[$this->fieldName().'_'.$languages[$i]]);\n }\n }\n return $result;\n }", "public static function getValue($value)\n\t{\n\t\tif(is_string($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeString) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeString($value);\n\t\t\t}\n\t\t} else if(is_int($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeInt) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeInt($value);\n\t\t\t}\n\t\t} else if(is_float($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeFloat) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeFloat($value);\n\t\t\t}\n\t\t} else if(is_array($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeArray) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeArray($value);\n\t\t\t}\n\t\t} else if(is_bool($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeBool) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeBool($value);\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "private static function castToType($value) {\n if ($value == \"true\" || $value == \"1\")\n return true;\n\n if ($value == \"false\" || $value == \"0\")\n return false;\n\n return $value;\n\n }", "public static function phpize($value)\n {\n $value = (string) $value;\n $lowercaseValue = \\strtolower($value);\n\n if ('null' === $lowercaseValue) {\n return;\n }\n\n if (\\ctype_digit($value)) {\n return self::transformToNumber($value, 0);\n }\n\n if (isset($value[1]) && '-' === $value[0] && \\ctype_digit(\\substr($value, 1))) {\n return self::transformToNumber($value, 1);\n }\n\n if ($lowercaseValue === 'true') {\n return true;\n }\n\n if ('false' === $lowercaseValue) {\n return false;\n }\n\n if (isset($value[1]) && '0b' === $value[0] . $value[1]) {\n return \\bindec($value);\n }\n\n if (\\is_numeric($value)) {\n return '0x' === $value[0] . $value[1] ? \\hexdec($value) : (float) $value;\n }\n\n if (\\preg_match('/^0x[0-9a-f]++$/i', $value) === 1) {\n return \\hexdec($value);\n }\n\n if (\\preg_match('/^(-|\\+)?\\d+(\\.\\d+)?$/', $value) === 1) {\n return (float) $value;\n }\n\n return $value;\n }", "function value2sql( $type, $value )\n\t\t{\n\t\tif( $type == \"VARCHAR\" || $type == \"varchar\" || $type == \"char\" )\n\t\t\t{\n\t\t\tif( $value == \"\") return \" null\" ;\n\t\t\treturn \"'\" . $value . \"'\" ;\n\t\t\t}\n\t\telse if( $type == \"DATETIME\" )\n\t\t\t{\n\t\t\tif( $value == \"\") return \" null\" ;\n\t\t\treturn strftime( \"#%Y-%m-%d %H:%M:%S#\", $value ) ;\n\t\t\t}\n\t\treturn $value ;\n\t\t}", "abstract public function toPhp();", "public function formatValueForDatabase($value) {\n\t\tswitch ($this->type) {\n\t\t\tcase 'Date':\n\t\t\t\t/**\n\t\t\t\t * @var \\DateTime $value\n\t\t\t\t */\n\t\t\t\t$value = $value->format('Y-m-d');\n\t\t\t\tbreak;\n\n\t\t\tcase 'DateTime':\n\t\t\t\t/**\n\t\t\t\t * @var \\DateTime $value\n\t\t\t\t */\n\t\t\t\t$value = $value->format('Y-m-d H:i:s');\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $value;\n\t}", "function prepValueForDB($value) {\n\t\tif($value === true) {\n\t\t\treturn 1;\n\t\t} if(!$value || !is_numeric($value)) {\n\t\t\treturn \"0\";\n\t\t} else {\n\t\t\treturn addslashes($value);\n\t\t}\n\t}", "protected function fromDatabase( $data )\n\t{\n\t\tforeach ( $data AS $field => $value ) \n\t\t{\t\n\t\t\tif ( isset( static::$schema[ $field ] ) )\n\t\t\t{\n\t\t\t\tif ( is_array( static::$schema[ $field ] ) )\n\t\t\t\t{\n\t\t\t\t\t$type = static::$schema[ $field ][ 'type' ];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$type = static::$schema[ $field ];\n\t\t\t\t}\n\t\n\t\t\t\t$this->data[ $field ] = $this->sanitize( $type, $value );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->loaded = true;\n\t}", "protected function castify($value)\n {\n if (preg_match('/^\\-?([0-9]+)$/', $value)) {\n return intval($value);\n }\n\n if (preg_match('/^\\-?\\d+(\\.\\d+)?$/', $value)) {\n // @todo fix json returning float values.\n // return floatval($value);\n\n return $value;\n }\n\n return $value;\n }", "function make_db_value($field,$value,$controltype=\"\",$postfilename=\"\",$table=\"\")\n{\t\n\t$ret = prepare_for_db($field, $value, $controltype, $postfilename, $table);\n\t\n\tif($ret === false)\n\t\treturn $ret;\n\t\t\n\treturn add_db_quotes($field, $ret, $table);\n}", "function __db_escape_values($mysqli, $type, $value)\n{\n\tswitch ($type) {\n\t\tcase 'string_n': //string that can be null\n\t\t\tif (!$value) {\n\t\t\t\treturn 'NULL';\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase 'string':\n\t\t\treturn '\\'' . $mysqli->real_escape_string($value) . '\\'';\n\t\t\tbreak;\n\t\tcase 'datetime':\n\t\t\treturn '\\'' . date(MYSQL_DATETIME_FMT, strtotime($value)) . '\\'';\n\t\t\tbreak;\n\t\tcase 'user':\n\t\tcase 'committee':\n\t\tcase 'event':\n\t\tcase 'int_n':\n\t\t\tif (!$value) {\n\t\t\t\treturn 'NULL';\n\t\t\t}\n\t\tcase 'int':\n\t\t\treturn (string)intval($value);\n\t\t\tbreak;\n\t\tcase 'double':\n\t\tcase 'float':\n\t\t\treturn (string)doubleval($value);\n\t\t\tbreak;\n\t\tcase 'bool':\n\t\t\treturn ($value) ? '1' : '0';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Exception('invalid type' . $type);\n\t\t\tbreak;\n\t}\n}", "public abstract function makeValue($value);", "private static function valueFromType($value, $type)\n {\n if ($value === null)\n {\n return null;\n }\n \n switch ($type)\n {\n case 'bool':\n case 'boolean':\n return (bool) $value;\n \n case 'int':\n case 'integer':\n return (int) $value;\n \n case 'lob':\n return stream_get_contents($value);\n \n case 'base64':\n return base64_decode($value);\n \n case 'date':\n case 'time':\n case 'timestamp':\n return strtotime($value);\n \n case 'string':\n case 'istring':\n default:\n return (string) $value;\n }\n }", "public function toNative()\n {\n return $this->value;\n }", "public static function correctType($value)\n {\n try {\n if (Str::isBoolean($value)) {\n $value = Str::toBoolean($value);\n } elseif (is_float($value)) {\n $value = floatval($value);\n } elseif (is_int($value)) {\n $value = intval($value);\n }\n } catch (\\Exception $ex) {\n }\n return $value;\n }", "public function cleanValue($value)\n {\n\n $return = $value;\n if ($this->modelColumn->dbType === 'jsonb') {\n\n if (!is_array($value) && !empty($value)) {\n try {\n\n $return = Json::decode($value, true);\n } catch (\\Exception $exception) {\n return $return;\n }\n\n }\n\n }\n\n return $return;\n }", "function set_value_type(&$table, $value)\n{\n\t$tmp_value = trim($value);\n\tif(isset($table))\n\t\t$table = compare_data_type($table, recognize_data_type($value)); //if there already is set data type compare old and now to get the highest one\n\telse\n\t\t$table = (empty($tmp_value) ? NULL : recognize_data_type($value)); //if value (trimmed) is empty set it to NULL, else data type not set and there is a need to recognize it\n}", "abstract public function Convert($data);", "public function encodedValue()\n\t{\n\t\treturn $this->definition\n\t\t\t? $this->definition->encode($this->value)\n\t\t\t: $this->value;\n\t}", "public function convertToDbDateTime(\\DateTimeInterface $phpValue): string;", "public function cleanValue($value)\n {\n $value = $this->toPhp($value);\n $this->validate($value);\n return $value;\n }", "private function castExplicit($key, $value, $collection) {\r\n switch($collection->model->getDbType($key)) {\r\n case 'integer':\r\n return (integer) $value;\r\n case 'float':\r\n return (float) $value;\r\n /*\r\n * PostgreSQL returns ST_AsGeoJSON(geometry) \r\n */\r\n case 'geometry':\r\n return json_decode($value, true);\r\n case 'array':\r\n return explode(',', substr($value, 1, -1));\r\n default:\r\n return $value;\r\n }\r\n }", "private function get_field_value($value) {\r\n\t if ($value instanceof LazyDBExpressionType) {\r\n\t return $value->getExpression();\r\n\t } else if (is_array ( $value )) {\r\n\t\t\treturn \"'\" . $this->add_slashes( serialize($value) ) . \"'\";\r\n\t\t} else {\r\n\t\t\treturn \"'\" . $this->add_slashes ( $value ) . \"'\";\r\n\t\t}\r\n\t}", "static public function SQLValue( $value, $datatype = self::SQLVALUE_TEXT )\r\n\t{\r\n\t\t$return_value = '';\r\n\t\t$value = mysql_real_escape_string( self::fixQuery( $value ) );\r\n\r\n\t\tswitch( strtolower( trim( $datatype ) ) )\r\n\t\t{\r\n\t\t\tcase 'text':\r\n\t\t\tcase 'string':\r\n\t\t\tcase 'varchar':\r\n\t\t\tcase 'char':\r\n\t\t\t\tif( strlen( $value ) == 0 )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"NULL\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif( get_magic_quotes_gpc() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$value = stripslashes( $value );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$return_value = \"'\" . str_replace( \"'\", \"''\", $value ) . \"'\";\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'number':\r\n\t\t\tcase 'integer':\r\n\t\t\tcase 'int':\r\n\t\t\tcase 'double':\r\n\t\t\tcase 'float':\r\n\t\t\t\tif( is_numeric( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = $value;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = 'NULL';\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'boolean': //boolean to use this with a bit field\r\n\t\t\tcase 'bool':\r\n\t\t\tcase 'bit':\r\n\t\t\t\tif( self::GetBooleanValue( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t $return_value = '1';\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t $return_value = '0';\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'y-n': //boolean to use this with a char(1) field\r\n\t\t\t\tif( self::GetBooleanValue( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'Y'\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'N'\";\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 't-f': //boolean to use this with a char(1) field\r\n\t\t\t\tif( self::GetBooleanValue( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'T'\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'F'\";\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'date':\r\n\t\t\t\tif( self::IsDate( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'\" . date('Y-m-d', strtotime($value)) . \"'\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = 'NULL';\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'datetime':\r\n\t\t\t\tif( self::IsDate( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'\" . date('Y-m-d H:i:s', strtotime( $value ) ) . \"'\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = 'NULL';\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'time':\r\n\t\t\t\tif( self::IsDate( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'\" . date( 'H:i:s', strtotime( $value ) ) . \"'\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = 'NULL';\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\texit('ERROR: Invalid data type specified in SQLValue method');\r\n\t\t}\r\n\t\treturn $return_value;\r\n\t}", "function o_castString($value) {\n\t\t\treturn Obj::singleton()->castString($value);\n\t\t}", "public function toValue(): string\n {\n return (string) $this->pdoStatement->fetchColumn();\n }", "private function value($value, array $schema = array()) {\n\t\tif (is_array($value) && count($value) > 0) {\n\t\t\tforeach ($value as $key => $val) {\n\t\t\t\t$value[$key] = $this->value($val, $schema);\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\t\tif ($value === null) {\n\t\t\treturn 'NULL';\n\t\t}\n\n\t\tif(count($schema) > 0){\n\t\t\tswitch ($type = $schema['type']) {\n case 'boolean':\n return $this->_toNativeBoolean($value);\n case 'float':\n return floatval($value);\n case 'string':\n case 'nchar':\n case 'varchar':\n case 'nvarchar':\n return \"'\".$value.\"'\";\n\t\t\t\t\t\t\tcase 'ntext':\n\t\t\t\t\t\t\t\treturn \"\\\"\".$value.\"\\\"\";\n case 'integer':\n case 'bigint':\n case 'int':\n return intval($value);\n case 'date':\n return \"'\".date(\"Y-m-d\", strtotime($value)).\"'\";\n case 'datetime':\n return \"'\".date(\"Y-m-d H:i:s\", strtotime($value)).\"'\";\n\n }\n\t\t}\n\t}", "protected function _cast($type, $value, $column, $schema = [])\n\t{\n\t\t$column += ['formatter' => null, 'format' => null];\n\t\t$schema += ['default' => null, 'null' => false];\n\n\t\tif (is_object($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif ($formatter = $column['formatter']) {\n\t\t\t$format = $column['format'];\n\t\t\treturn $format ? $formatter($format, $value) : $formatter($value);\n\t\t}\n\t\treturn $this->connection->quote($value);\n\t}", "public function hydrate($value)\n {\n $serializer = $this->getSerializer();\n return $serializer->unserialize($value);\n }", "public static function convertToNativeType($field, $value)\n {\n switch($field[\"type\"])\n {\n case \"number\":\n if(isset($field[\"field_options\"][\"integer_only\"]) && $field[\"field_options\"][\"integer_only\"])\n return intval($value);\n else\n return floatval($value);\n break; // defensive but not necessary\n case \"date\": // @todo: use a format attribute within field options accordig to date_parse_from_format function\n return $value;\n break;\n // @todo: file\n default:\n return $value;\n }\n }", "function _toType($value) {\n\tif (preg_match('/^(\"(.*)\"|\\'(.*)\\')/',$value,$matches)) {\n\t$value = (string)preg_replace('/(\\'\\'|\\\\\\\\\\')/',\"'\",end($matches));\n\t$value = preg_replace('/\\\\\\\\\"/','\"',$value);\n\t} elseif (preg_match('/^\\\\[(.+)\\\\]$/',$value,$matches)) {\n\t\t// Inline Sequence\n\n\t\t// Take out strings sequences and mappings\n\t\t$explode = $this->_inlineEscape($matches[1]);\n\n\t\t// Propogate value array\n\t\t$value = array();\n\t\tforeach ($explode as $v) {\n\t\t$value[] = $this->_toType($v);\n\t\t}\n\t} elseif (strpos($value,': ')!==false && !preg_match('/^{(.+)/',$value)) {\n\t\t// It's a map\n\t\t$array = explode(': ',$value);\n\t\t$key = trim($array[0]);\n\t\tarray_shift($array);\n\t\t$value = trim(implode(': ',$array));\n\t\t$value = $this->_toType($value);\n\t\t$value = array($key => $value);\n\t} elseif (preg_match(\"/{(.+)}$/\",$value,$matches)) {\n\t\t// Inline Mapping\n\n\t\t// Take out strings sequences and mappings\n\t\t$explode = $this->_inlineEscape($matches[1]);\n\n\t\t// Propogate value array\n\t\t$array = array();\n\t\tforeach ($explode as $v) {\n\t\t$array = $array + $this->_toType($v);\n\t\t}\n\t\t$value = $array;\n\t} elseif (strtolower($value) == 'null' or $value == '' or $value == '~') {\n\t\t$value = NULL;\n\t} elseif (preg_match ('/^[0-9]+$/', $value)) {\n\t// Cheeky change for compartibility with PHP < 4.2.0\n\t\t$value = (int)$value;\n\t} elseif (in_array(strtolower($value),\n\t\t\t\tarray('true', 'on', '+', 'yes', 'y'))) {\n\t\t$value = true;\n\t} elseif (in_array(strtolower($value),\n\t\t\t\tarray('false', 'off', '-', 'no', 'n'))) {\n\t\t$value = false;\n\t} elseif (is_numeric($value)) {\n\t\t$value = (float)$value;\n\t} else {\n\t\t// Just a normal string, right?\n\t\t$value = trim(preg_replace('/#(.+)$/','',$value));\n\t}\n\n\treturn $value;\n\t}", "protected function guessDataType($value)\n {\n switch (gettype($value)) {\n case 'array':\n return PDO::PARAM_ARRAY;\n case 'object':\n return PDO::PARAM_OBJECT;\n case 'double':\n return PDO::PARAM_DOUBLE;\n case 'boolean':\n return PDO::PARAM_BOOL;\n case 'NULL':\n return PDO::PARAM_NULL;\n case 'integer':\n return PDO::PARAM_LONG;\n default:\n return PDO::PARAM_STR;\n }\n }", "public function getSqlFormattedValue()\n {\n if ($this->getType() == \"string\" || $this->getType() == \"time\" || $this->getType() == \"enum\") {\n return \"{\" .\"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName() .\",'notNumber')},\";\n } else if ($this->getType() == \"date\") {\n return \"{\" .\"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName() .\",'date')},\";\n } else if ($this->getType() == \"datetime\") {\n return \"{\" .\"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName() .\",'datetime')},\";;\n } else {\n return \"{\". \"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName().\")},\";\n }\n /*\n } else if ($this->getType() == \"date_OLD\") {\n return \"STR_TO_DATE(\". \"{\".\"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName().\",'date')},\".\"'\". \"{\".\"$\".\"constants['STORED_DATE_FORMAT']}\" .\"'),\";\n } else if ($this->getType() == \"datetime_OLD\") {\n return \"STR_TO_DATE(\". \"{\".\"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName().\",'date')},\".\"'\". \"{\".\"$\".\"constants['STORED_DATETIME_FORMAT']}\" .\"'),\";\n */\n\n }", "public function toMixed();", "function it_can_convert_to_database_value(AbstractPlatform $platform)\n {\n $dbValue = $this->convertToDatabaseValue('', $platform);\n $dbValue->shouldNotBeNull();\n }", "public function value($value, array $schema = [])\n\t{\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $key => $val) {\n\t\t\t\t$value[$key] = $this->value($val, isset($schema[$key]) ? $schema[$key] : $schema);\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\n\t\tif (is_object($value) && isset($value->scalar)) {\n\t\t\treturn $value->scalar;\n\t\t}\n\n\t\tif ($value === null) {\n\t\t\treturn 'NULL';\n\t\t}\n\n\t\t$type = isset($schema['type']) ? $schema['type'] : $this->_introspectType($value);\n\t\t$column = isset($this->_columns[$type]) ? $this->_columns[$type] : null;\n\n\t\treturn $this->_cast($type, $value, $column, $schema);\n\t}", "public function convert();", "public function prepValue($value)\n\t{\n\t\t$this->_convertDateTimes($value);\n\n\t\tif (is_array($value) && ($columns = $this->getSettings()->columns))\n\t\t{\n\t\t\t// Make the values accessible from both the col IDs and the handles\n\t\t\tforeach ($value as &$row)\n\t\t\t{\n\t\t\t\tforeach ($columns as $colId => $col)\n\t\t\t\t{\n\t\t\t\t\tif ($col['handle'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$row[$col['handle']] = (isset($row[$colId]) ? $row[$colId] : null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $value;\n\t\t}\n\t}" ]
[ "0.79672056", "0.7608769", "0.7163", "0.6833284", "0.6833284", "0.6787953", "0.67689407", "0.6768303", "0.6749614", "0.6736876", "0.6726482", "0.67233837", "0.6652283", "0.65738326", "0.65472364", "0.65390337", "0.6538266", "0.6481403", "0.64700556", "0.64573646", "0.63547975", "0.6267041", "0.6183672", "0.61416113", "0.61263543", "0.61227274", "0.61198705", "0.60729253", "0.6070723", "0.6068811", "0.60349077", "0.59425753", "0.5883304", "0.5877377", "0.5868358", "0.58673245", "0.58614916", "0.584631", "0.57962877", "0.5780461", "0.5763017", "0.5756483", "0.57459736", "0.5741937", "0.57303524", "0.5702306", "0.5696811", "0.5675584", "0.567462", "0.5669092", "0.56677264", "0.56448054", "0.56448054", "0.5634131", "0.5624618", "0.5623672", "0.56119686", "0.56109965", "0.5609372", "0.5607762", "0.5585099", "0.55810136", "0.5564392", "0.5550795", "0.55483174", "0.554401", "0.55362517", "0.55305445", "0.55277765", "0.54982847", "0.5497154", "0.54889137", "0.5483447", "0.5481369", "0.5469568", "0.5464009", "0.54572296", "0.5453754", "0.5451452", "0.54473585", "0.54392564", "0.5430389", "0.5429473", "0.54281086", "0.5423919", "0.5415443", "0.54113364", "0.53964293", "0.5383191", "0.5367122", "0.5366861", "0.5366389", "0.5365504", "0.5365209", "0.53538346", "0.53437144", "0.53367436", "0.5317085", "0.5316833" ]
0.71781176
3
Converts a value from its database representation to its PHP representation of this type.
public function convertToPHPValue($value) { return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function convertPHPToDatabaseValue($value)\n {\n $type = self::getTypeFromPHPVariable($value);\n\n if ($type !== null) {\n return $type->convertToDatabaseValue($value);\n }\n\n return $value;\n }", "public function convertToPHPValue($value);", "public function dbTypecast($value)\n {\n // to override this with annotation of explicit PDO type.\n return $this->typecast($value);\n }", "public function convertToDatabaseValue($value)\n {\n return $value;\n }", "public function convertToDatabaseValue($value)\n {\n return $value;\n }", "protected function typecast($value)\n {\n if ($value === ''\n && !in_array(\n $this->type,\n [\n Schema::TYPE_TEXT,\n Schema::TYPE_STRING,\n Schema::TYPE_BINARY,\n Schema::TYPE_CHAR\n ],\n true)\n ) {\n return null;\n }\n\n if ($value === null\n || gettype($value) === $this->phpType\n || $value instanceof ExpressionInterface\n || $value instanceof Query\n ) {\n return $value;\n }\n\n if (is_array($value)\n && count($value) === 2\n && isset($value[1])\n && in_array($value[1], $this->getPdoParamTypes(), true)\n ) {\n return new PdoValue($value[0], $value[1]);\n }\n\n switch ($this->phpType) {\n case 'resource':\n case 'string':\n if (is_resource($value)) {\n return $value;\n }\n if (is_float($value)) {\n // ensure type cast always has . as decimal separator in all locales\n return str_replace(',', '.', (string) $value);\n }\n return (string) $value;\n case 'integer':\n if (is_bool($value)) {\n return ($value) ? 1 : 0;\n }\n return (int) $value;\n case 'boolean':\n return (boolean) $value;\n case 'double':\n return (double) $value;\n }\n\n return $value;\n }", "abstract public function convertFromRawValue($value);", "public function convertToPHPValue($value, $type)\n {\n return Type::getType($type)->convertToPHPValue($value, $this->getDatabasePlatform());\n }", "function fromDB($value, $type) {\n\t\t//everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\treturn new DateTime($value);\n\t\t\tcase 'integer':\n\t\t\t\treturn (int) $value;\n\t\t\tcase 'boolean':\n\t\t\t\treturn (bool) $value;\n\t\t}\n\t\treturn $value;\n\t}", "abstract public function cast($value);", "public function convertToPhpValue($data);", "public function convertToDatabaseValue($value, $type)\n {\n return Type::getType($type)->convertToDatabaseValue($value, $this->getDatabasePlatform());\n }", "protected function transformValueFromDatabase($value,$type) {\n\n if($type==SettingInterface::TYPE_STRING) {\n return (string)$value;\n }\n\n if($type==SettingInterface::TYPE_INTEGER) {\n return (integer)$value;\n }\n\n if($type==SettingInterface::TYPE_BOOLEAN) {\n if(in_array($value,[true,1,'y','yes','true'])) {\n return true;\n }\n if(in_array($value,[false,0,'n','no','false'])) {\n return false;\n }\n }\n\n if($type==SettingInterface::TYPE_DATE_TIME) {\n return \\DateTime::createFromFormat('Y-m-d H:i:s',$value);\n }\n\n if($type==SettingInterface::TYPE_ARRAY) {\n return json_decode($value,true);\n }\n\n return $value;\n }", "public function toPhp($value)\n {\n return $value;\n }", "abstract public function convertFromDb($value, Entity\\ScalarField $field);", "function to_php($value, Backend $backend) {\n return $value;\n }", "public function castDb(mixed $value, string $format = ''): mixed\n {\n if (is_null($value) || ! is_string($value)) {\n return $value;\n }\n\n return $this->encode($value, $this->parseFormat($format));\n }", "function cast($field, $value) {\n\t\t// if the column doesn't exist, don't cast the value\n\t\tif (!isset($this->columns[$field])) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t// precast arrays\n\t\tif (is_array($value)) {\n\t\t\t$value = $this->columns[$field]->array_to_type(array_values($value));\n\t\t}\n\n\t\t// cast value\n\t\t$value = $this->columns[$field]->type_cast($value);\n\n\t\treturn $value;\n\n\t}", "public function value2db($value=FALSE)\r\n {\r\n return $value;\r\n }", "public function _typecastSaveField(Field $f, $value)\n {\n // work only on copied value not real one !!!\n $v = is_object($value) ? clone $value : $value;\n\n switch ($f->type) {\n case 'boolean':\n // if enum is not set, then simply cast value to integer\n if (!isset($f->enum) || !$f->enum) {\n $v = (int) $v;\n break;\n }\n\n // if enum is set, first lets see if it matches one of those precisely\n if ($v === $f->enum[1]) {\n $v = true;\n } elseif ($v === $f->enum[0]) {\n $v = false;\n }\n\n // finally, convert into appropriate value\n $v = $v ? $f->enum[1] : $f->enum[0];\n break;\n case 'date':\n case 'datetime':\n case 'time':\n $dt_class = isset($f->dateTimeClass) ? $f->dateTimeClass : 'DateTime';\n $tz_class = isset($f->dateTimeZoneClass) ? $f->dateTimeZoneClass : 'DateTimeZone';\n\n if ($v instanceof $dt_class) {\n $format = ['date' => 'Y-m-d', 'datetime' => 'Y-m-d H:i:s', 'time' => 'H:i:s'];\n $format = $f->persist_format ?: $format[$f->type];\n\n // datetime only - set to persisting timezone\n if ($f->type == 'datetime' && isset($f->persist_timezone)) {\n $v->setTimezone(new $tz_class($f->persist_timezone));\n }\n $v = $v->format($format);\n }\n break;\n case 'array':\n case 'object':\n // don't encode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonEncode($f, $v);\n break;\n }\n\n return $v;\n }", "function toDB($value, $type) {\n\t\t// everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\tif($value instanceof DateTime) return $value->format('c');\n\t\t}\n\t\treturn $value;\n\t}", "function to_database($value, Backend $backend) {\n return $value;\n }", "public function toPhp()\n {\n return $this->_value->toPhp();\n }", "final public static function convertValueForSql($type, $value)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase Core::TYPE_INTEGER:\n\t\t\t\treturn intval($value);\n\n\t\t\tcase Core::TYPE_FLOAT:\n\t\t\t\treturn floatval($value);\n\t\t\t\tbreak;\n\n\t\t\tcase Core::TYPE_BOOLEAN:\n\t\t\t\treturn $value ? 1 : 0;\n\n\t\t\tcase Core::TYPE_STRING:\n\t\t\t\t$temp\t\t\t=\thtmlspecialchars_decode($value, ENT_QUOTES);\n\t\t\t\t$temp\t\t\t=\thtmlspecialchars($temp, ENT_QUOTES, Core::$current_db_is_utf8 ? 'UTF-8' : 'ISO-8859-1');\n\t\t\t\treturn '\"'.$temp.'\"';\n\n\t\t\tcase Core::TYPE_DATE:\n\t\t\tcase Core::TYPE_TIME:\n\t\t\tcase Core::TYPE_DATETIME:\n\t\t\tcase Core::TYPE_TIMESTAMP:\n\t\t\tcase Core::TYPE_YEAR:\n\t\t\t\t$format\t\t\t=\tnull;\n\n\t\t\t\tif(empty($value)) {\n\t\t\t\t\treturn 'NULL';\n\t\t\t\t}\n\n\t\t\t\tswitch($type)\n\t\t\t\t{\n\t\t\t\t\tcase Core::TYPE_TIME:\t\t$format\t=\t'H:i:s'; break;\n\t\t\t\t\tcase Core::TYPE_DATETIME:\t$format\t=\t'Y-m-d H:i:s'; break;\n\t\t\t\t\tcase Core::TYPE_TIMESTAMP:\t$format\t=\t'YmdHis'; break;\n\t\t\t\t\tcase Core::TYPE_YEAR:\t\t$format\t=\t'Y'; break;\n\t\t\t\t\tcase Core::TYPE_DATE:\t\t$format\t=\t'Y-m-d'; break;\n\t\t\t\t}\n\n\t\t\t\treturn\t'\"'.(is_numeric($value)\n\t\t\t\t\t\t? @date($format, $value)\n\t\t\t\t\t\t: (\n\t\t\t\t\t\t$value instanceof \\DateTime\n\t\t\t\t\t\t\t? $value->format($format)\n\t\t\t\t\t\t\t: $value\n\t\t\t\t\t\t)).'\"';\n\n\t\t\tdefault:\n\t\t\t\treturn $value;\n\t\t}\n\t}", "protected function _convertValue ($value) {\n switch ($value) {\n case 'null':\n # Null value\n $value = null;\n break;\n\n case 'true':\n # Boolean\n $value = true;\n break;\n\n case 'false':\n # Boolean\n $value = false;\n break;\n\n default:\n if (is_numeric ($value)) {\n\n # Number\n if (preg_match ('/^-?[1-9][0-9]*$/', $value)) {\n\n # Regular 10-base integer\n $value = intval ($value, 10);\n\n } else if (preg_match ('/^-?0[0-7]*$/', $value)) {\n\n # 8-base integer\n $value = intval ($value, 8);\n\n } else if (preg_match ('/^-?0x[0-9a-z]*$/i', $value)) {\n\n # 16-base integer\n $value = intval ($value, 16);\n\n } else {\n\n # Floating point number\n $value = $value + 0;\n\n }\n\n } else {\n\n # String\n /*NOP*/;\n\n }\n }\n return $value;\n }", "public function fromRaw($value)\n {\n $type = $this->getDataType();\n\n if ($type === 'json') {\n $value = json_decode($value, true);\n } elseif ($type === 'array') {\n $value = (array) $value;\n } elseif ($type === 'list') {\n $value = explode(',', $value);\n } elseif ($type === 'boolean') {\n $value = (bool) $value;\n } elseif ($type === 'integer') {\n $value = (int) $value;\n } elseif ($type === 'float') {\n $value = (float) $value;\n }\n\n return $value;\n }", "public function cast($value)\n {\n return json_decode($value, true);\n }", "public function _typecastLoadField(Field $f, $value)\n {\n // LOB fields return resource stream\n if (is_resource($value)) {\n $value = stream_get_contents($value);\n }\n\n // work only on copied value not real one !!!\n $v = is_object($value) ? clone $value : $value;\n\n switch ($f->type) {\n case 'string':\n case 'text':\n // do nothing - it's ok as it is\n break;\n case 'integer':\n $v = (int) $v;\n break;\n case 'float':\n $v = (float) $v;\n break;\n case 'money':\n $v = round($v, 4);\n break;\n case 'boolean':\n if (isset($f->enum) && is_array($f->enum)) {\n if (isset($f->enum[0]) && $v == $f->enum[0]) {\n $v = false;\n } elseif (isset($f->enum[1]) && $v == $f->enum[1]) {\n $v = true;\n } else {\n $v = null;\n }\n } elseif ($v === '') {\n $v = null;\n } else {\n $v = (bool) $v;\n }\n break;\n case 'date':\n case 'datetime':\n case 'time':\n $dt_class = isset($f->dateTimeClass) ? $f->dateTimeClass : 'DateTime';\n $tz_class = isset($f->dateTimeZoneClass) ? $f->dateTimeZoneClass : 'DateTimeZone';\n\n if (is_numeric($v)) {\n $v = new $dt_class('@'.$v);\n } elseif (is_string($v)) {\n // ! symbol in date format is essential here to remove time part of DateTime - don't remove, this is not a bug\n $format = ['date' => '+!Y-m-d', 'datetime' => '+!Y-m-d H:i:s', 'time' => '+!H:i:s'];\n $format = $f->persist_format ?: $format[$f->type];\n\n // datetime only - set from persisting timezone\n if ($f->type == 'datetime' && isset($f->persist_timezone)) {\n $v = $dt_class::createFromFormat($format, $v, new $tz_class($f->persist_timezone));\n if ($v === false) {\n throw new Exception(['Incorrectly formatted datetime', 'format' => $format, 'value' => $value, 'field' => $f]);\n }\n $v->setTimeZone(new $tz_class(date_default_timezone_get()));\n } else {\n $v = $dt_class::createFromFormat($format, $v);\n if ($v === false) {\n throw new Exception(['Incorrectly formatted date/time', 'format' => $format, 'value' => $value, 'field' => $f]);\n }\n }\n\n // need to cast here because DateTime::createFromFormat returns DateTime object not $dt_class\n // this is what Carbon::instance(DateTime $dt) method does for example\n if ($dt_class != 'DateTime') {\n $v = new $dt_class($v->format('Y-m-d H:i:s.u'), $v->getTimeZone());\n }\n }\n break;\n case 'array':\n // don't decode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonDecode($f, $v, true);\n break;\n case 'object':\n // don't decode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonDecode($f, $v, false);\n break;\n }\n\n return $v;\n }", "public function convertToPHPValue($value, DBAL\\Platforms\\AbstractPlatform $platform)\n {\n if (is_null($value)) {\n return null;\n }\n\n return $this->factory($value);\n }", "public function toDatabase($value, Driver $driver)\n {\n $value = json_encode($value, JSON_UNESCAPED_UNICODE);\n return parent::toDatabase($value, $driver);\n }", "public function toNative()\n {\n $value = parent::toNative();\n\n return \\intval($value);\n }", "public function getValue()\n {\n return $this->_db->prepareStringToOut($this->_value);\n }", "public function convertToDrupalValue($value);", "protected function transformValueToDatabase($value,$type) {\n\n if($type==SettingInterface::TYPE_BOOLEAN) {\n Assert::boolean($value);\n return $value ? 1 : 0;\n }\n\n if($type==SettingInterface::TYPE_DATE_TIME) {\n if(!$value instanceof \\DateTimeInterface) {\n throw new \\Exception('value is not an datetime-object');\n }\n return $value->format('Y-m-d H:i:s');\n }\n\n if($type==SettingInterface::TYPE_ARRAY) {\n Assert::isArray($value);\n return json_encode($value);\n }\n\n return $value;\n }", "abstract function toEntity($value);", "public function db2value($value=FALSE)\r\n {\r\n return $value;\r\n }", "public function toPHP($value, Driver $driver)\n {\n if ($value === null) {\n return null;\n }\n $value = parent::toPhp($value, $driver);\n return json_decode($value, true);\n }", "protected function _castValue ( $value ) {\n\t\t\tswitch ( $this->_settingType ) {\n\t\t\t\tcase self::TYPE_BOOLEAN: return $value == \"true\" ? true : false;\n\t\t\t\tcase self::TYPE_SWITCH: return $value ? \"on\" : \"off\";\n\t\t\t\tcase self::TYPE_INTEGER: return intval ( $value );\n\t\t\t\tcase self::TYPE_STRING: return \"$value\";\n\t\t\t\tdefault: return \"\";\n\t\t\t}\n\t\t}", "protected function _typecast($value) {\n\t\t$type = null;\t\t\n\n\t\tif (is_string($value)) {\n\t\t\t$type = 'string';\n\t\t}\n\t\tif (is_int($value)) {\n\t\t\t$type = 'int';\n\t\t}\n\t\tif (is_float($value)) {\n\t\t\t$type = 'double';\n\t\t}\n\t\tif (is_bool($value)) {\n\t\t\t$type = 'boolean';\n\t\t}\n\t\tif (is_array($value)) {\n\t\t\t$type = 'array';\n\t\t\t\n\t\t\t$valueKeys = array_keys($value);\n\t\t\tforeach($valueKeys as $vk) {\n\t\t\t\tif (!is_numeric($vk)) {\n\t\t\t\t\t$type = 'struct';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $type;\n\t}", "public function toNative()\n {\n return $this->value;\n }", "private function castValue($type, $value)\n {\n switch ($type) {\n case 'number':\n $value = (int) $value;\n break;\n case 'boolean':\n $value = boolval($value);\n break;\n case 'map':\n case 'object':\n $value = json_decode($value);\n break;\n default:\n break;\n }\n\n return $value;\n }", "function get_value_db()\n\t{\n\t\treturn $this->value;\n\t}", "public function toValue(): string\n {\n return (string) $this->pdoStatement->fetchColumn();\n }", "public static function getValue($value)\n\t{\n\t\tif(is_string($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeString) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeString($value);\n\t\t\t}\n\t\t} else if(is_int($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeInt) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeInt($value);\n\t\t\t}\n\t\t} else if(is_float($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeFloat) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeFloat($value);\n\t\t\t}\n\t\t} else if(is_array($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeArray) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeArray($value);\n\t\t\t}\n\t\t} else if(is_bool($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeBool) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeBool($value);\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "public function convertToPHPValue($value)\n {\n if ($value === null) {\n return null;\n }\n\n $reflection = new \\ReflectionClass($this->getClass($value));\n $instance = $reflection->newInstanceWithoutConstructor();\n\n foreach ($value as $field => $val) {\n if ($field === Fields::KEY_CLASS) {\n continue;\n }\n\n $this->setValue($reflection, $instance, $field, $val);\n }\n\n return $instance;\n }", "protected function castValue($value)\n {\n switch ($value) {\n case 'false':\n return false;\n\n case 'true':\n return true;\n }\n\n if (is_numeric($value)) {\n $value = intval($value);\n }\n\n return $value;\n }", "public function convertToPhpValue($value, AbstractPlatform $platform)\n {\n return $value;\n }", "private static function castToType($value) {\n if ($value == \"true\" || $value == \"1\")\n return true;\n\n if ($value == \"false\" || $value == \"0\")\n return false;\n\n return $value;\n\n }", "public function dbPrepValue($value)\n {\n return $value;\n }", "protected function sanitize( $type, $value, $toDb = false )\n\t{\n\t\tswitch ( $type )\n\t\t{\n\t\t\tcase 'string':\n\t\t\t\treturn (string) $value;\n\t\t\tbreak;\n\n\t\t\tcase 'int':\n\t\t\t\treturn (int) $value;\n\t\t\tbreak;\n\t\t\n\t\t\tcase 'real':\n\t\t\tcase 'float':\n\t\t\tcase 'double':\n\t\t\t\treturn (double) $value;\n\t\t\tbreak;\n\n\t\t\tcase 'boolean':\n\t\t\t\treturn (boolean) $value;\n\t\t\tbreak;\n\n\t\t\tcase 'datetime':\n\t\t\t\tif ( ! $value )\n\t\t\t\t{\n\t\t\t\t\treturn '0000-00-00 00:00:00';\n\t\t\t\t}\n\t\t\t\treturn date( 'Y-m-d H:i:s', strtotime( $value ) );\n\t\t\tbreak;\n\n\t\t\tcase 'json':\n\t\t\t\tif ( $toDb )\n\t\t\t\t{\n\t\t\t\t\treturn json_encode( $value );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn json_decode( $value, true );\n\t\t\t\t\t} catch ( \\Exception $ex ) {\n\t\t\t\t\t\treturn array();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "public static function castFieldValue($value, $type)\n {\n if ($value === null || is_string($value)) {\n return $value;\n }\n\n if ($type === 'dateTime' && $value instanceof DateTime) {\n return (string)$value->getTimestamp();\n }\n\n if ($type === 'integer' && is_int($value)) {\n return sprintf('%011d', $value);\n }\n\n if ($type === 'double' && is_float($value)) {\n // 123.15 => 00000000123.15000, padding to 11 numbers before and padding to 5 behind decimal point\n return sprintf('%017.5f', $value);\n }\n\n if ($type === 'boolean' && is_bool($value)) {\n return $value ? '1' : '0';\n }\n\n if ($type === 'array' && is_array($value)) {\n return array_values($value);\n }\n\n return null;\n }", "public function convertToDb($value, Entity\\ScalarField $field)\n\t{\n\t\tif ($value === null)\n\t\t{\n\t\t\treturn \"NULL\";\n\t\t}\n\n\t\tif ($value instanceof SqlExpression)\n\t\t{\n\t\t\treturn $value->compile();\n\t\t}\n\n\t\tif($field instanceof Entity\\DatetimeField)\n\t\t{\n\t\t\tif (empty($value))\n\t\t\t{\n\t\t\t\t$result = \"NULL\";\n\t\t\t}\n\t\t\telseif($value instanceof Type\\Date)\n\t\t\t{\n\t\t\t\tif($value instanceof Type\\DateTime)\n\t\t\t\t{\n\t\t\t\t\t$value = clone($value);\n\t\t\t\t\t$value->setDefaultTimeZone();\n\t\t\t\t}\n\t\t\t\t$result = $this->getCharToDateFunction($value->format(\"Y-m-d H:i:s\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Main\\ArgumentTypeException('value', '\\Bitrix\\Main\\Type\\Date');\n\t\t\t}\n\t\t}\n\t\telseif($field instanceof Entity\\DateField)\n\t\t{\n\t\t\tif (empty($value))\n\t\t\t{\n\t\t\t\t$result = \"NULL\";\n\t\t\t}\n\t\t\telseif($value instanceof Type\\Date)\n\t\t\t{\n\t\t\t\t$result = $this->getCharToDateFunction($value->format(\"Y-m-d\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Main\\ArgumentTypeException('value', '\\Bitrix\\Main\\Type\\Date');\n\t\t\t}\n\t\t}\n\t\telseif($field instanceof Entity\\IntegerField)\n\t\t{\n\t\t\t$result = \"'\".intval($value).\"'\";\n\t\t}\n\t\telseif($field instanceof Entity\\FloatField)\n\t\t{\n\t\t\tif(($scale = $field->getScale()) !== null)\n\t\t\t{\n\t\t\t\t$result = \"'\".round(doubleval($value), $scale).\"'\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result = \"'\".doubleval($value).\"'\";\n\t\t\t}\n\t\t}\n\t\telseif($field instanceof Entity\\StringField)\n\t\t{\n\t\t\t$result = \"'\".$this->forSql($value, $field->getSize()).\"'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = \"'\".$this->forSql($value).\"'\";\n\t\t}\n\n\t\treturn $result;\n\t}", "protected function castify($value)\n {\n if (preg_match('/^\\-?([0-9]+)$/', $value)) {\n return intval($value);\n }\n\n if (preg_match('/^\\-?\\d+(\\.\\d+)?$/', $value)) {\n // @todo fix json returning float values.\n // return floatval($value);\n\n return $value;\n }\n\n return $value;\n }", "public function decodeValue($value)\n {\n if ($value !== false) {\n if ($this->format == self::JSON) {\n $value = json_decode($value, true);\n } else if ($this->format == self::PHP) {\n $value = unserialize($value);\n }\n }\n\n return $value;\n }", "function dbsimplevalue($value) {\n if (is_null($value)) {\n return 'NULL';\n }\n\n\t// Stripslashes\n\tif (get_magic_quotes_gpc())\n\t\t$value = stripslashes($value);\n\n\tif (!is_int($value))\n\t\t$value = \"'\" . addslashes($value) . \"'\";\n\n\treturn $value;\n}", "public function createValue($value, $type)\n\t{\n\t\tswitch ($type) {\n\t\t\tcase 'literal':\n\t\t\t\treturn $value;\n\t\t\t\tbreak;\n\t\t\tcase 'null':\n\t\t\t\treturn $this->sqlConstant('NULL');\n\t\t\t\tbreak;\n\t\t\tcase 'list':\n\t\t\t\treturn $this->valueList($value);\n\t\t\t\tbreak;\n\t\t\tcase 'number':\n\t\t\t\treturn $this->number($value);\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\treturn $this->string($value);\n\t\t\t\tbreak;\n\t\t\tcase 'constant':\n\t\t\t\treturn $this->sqlConstant($value);\n\t\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\tif ($value === true) {\n\t\t\t\t\treturn $this->sqlConstant('TRUE');\n\t\t\t\t} else {\n\t\t\t\t\treturn $this->sqlConstant('FALSE');\n\t\t\t\t}\n\t\t\tcase 'function':\n\t\t\t\tlist($function, $args) = explode('::SEPARATOR::', preg_replace('/^(.+)\\((.+)\\)$/', '$1::SEPARATOR::$2', $value));\n\t\t\t\t$args = explode(',', $args);\n\t\t\t\tforeach ($args as $i => $arg) {\n\t\t\t\t\t$args[$i] = $this->guess(trim($arg));\n\t\t\t\t}\n\t\t\t\treturn $this->sqlFunction(trim($function), $args);\n\t\t\t\tbreak;\n\t\t\tcase 'table':\n\t\t\t\treturn $this->table(trim($value, '`'));\n\t\t\t\tbreak;\n\t\t\tcase 'tableField':\n\t\t\tcase 'field':\n\t\t\t\tlist($table, $field) = explode('.', $value);\n\t\t\t\treturn $this->tableField(trim($table, '`'), trim($field, '`'));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new \\Exception('Invalid value type given to MySql::createValueInstance');\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function cast( // phpcs:ignore\n $value\n ): string;", "public function encodedValue()\n\t{\n\t\treturn $this->definition\n\t\t\t? $this->definition->encode($this->value)\n\t\t\t: $this->value;\n\t}", "protected function convertToStorage($value)\n\t{\n\t\treturn $value;\n\t}", "public function unserialize($value)\n {\n $type = $this->getDataType();\n\n if ($type === 'json') {\n $value = json_decode($value, true);\n } elseif ($type === 'array') {\n $value = json_decode($value, true);\n } elseif ($type === 'list') {\n $value = explode(',', $value);\n } elseif ($type === 'boolean') {\n $value = (bool) $value;\n } elseif ($type === 'integer') {\n $value = (int) $value;\n } elseif ($type === 'float') {\n $value = (float) $value;\n }\n\n return $value;\n }", "public static function correctType($value)\n {\n try {\n if (Str::isBoolean($value)) {\n $value = Str::toBoolean($value);\n } elseif (is_float($value)) {\n $value = floatval($value);\n } elseif (is_int($value)) {\n $value = intval($value);\n }\n } catch (\\Exception $ex) {\n }\n return $value;\n }", "function o_castString($value) {\n\t\t\treturn Obj::singleton()->castString($value);\n\t\t}", "private static function valueFromType($value, $type)\n {\n if ($value === null)\n {\n return null;\n }\n \n switch ($type)\n {\n case 'bool':\n case 'boolean':\n return (bool) $value;\n \n case 'int':\n case 'integer':\n return (int) $value;\n \n case 'lob':\n return stream_get_contents($value);\n \n case 'base64':\n return base64_decode($value);\n \n case 'date':\n case 'time':\n case 'timestamp':\n return strtotime($value);\n \n case 'string':\n case 'istring':\n default:\n return (string) $value;\n }\n }", "public function convert($value): string;", "public function formatValueForDatabase($value) {\n\t\tswitch ($this->type) {\n\t\t\tcase 'Date':\n\t\t\t\t/**\n\t\t\t\t * @var \\DateTime $value\n\t\t\t\t */\n\t\t\t\t$value = $value->format('Y-m-d');\n\t\t\t\tbreak;\n\n\t\t\tcase 'DateTime':\n\t\t\t\t/**\n\t\t\t\t * @var \\DateTime $value\n\t\t\t\t */\n\t\t\t\t$value = $value->format('Y-m-d H:i:s');\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $value;\n\t}", "public function toValue() {\r\n\t\treturn $this->PDOStatement->fetchColumn();\r\n\t}", "protected function convertField(string $name, ?string $value): mixed\n {\n return $this->converters[$name]->fromPg($value, $this->types[$name]);\n }", "protected function _cast($type, $value, $column, $schema = [])\n\t{\n\t\t$column += ['formatter' => null, 'format' => null];\n\t\t$schema += ['default' => null, 'null' => false];\n\n\t\tif (is_object($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif ($formatter = $column['formatter']) {\n\t\t\t$format = $column['format'];\n\t\t\treturn $format ? $formatter($format, $value) : $formatter($value);\n\t\t}\n\t\treturn $this->connection->quote($value);\n\t}", "protected function typeCast($value) {\n\t\t# Cast\n\t\treturn (int) $value;\n\t}", "public function cleanValue($value)\n {\n\n $return = $value;\n if ($this->modelColumn->dbType === 'jsonb') {\n\n if (!is_array($value) && !empty($value)) {\n try {\n\n $return = Json::decode($value, true);\n } catch (\\Exception $exception) {\n return $return;\n }\n\n }\n\n }\n\n return $return;\n }", "public function convertToDatabaseValue($value, DBAL\\Platforms\\AbstractPlatform $platform)\n {\n if (is_null($value)) {\n return null;\n }\n\n return (string)$value;\n }", "private static function doConvertType($value, $type) {\n switch ($type) {\n case 'def' :\n $newValue = self::convertTextContent($value);\n break;\n case 'int' :\n $newValue = (int) $value;\n break;\n case 'array':\n return $value;\n break;\n case 'double' :\n $value = str_replace('.', '', $value);\n $value = str_replace(',', '.', $value);\n $newValue = doubleval($value);\n break;\n case 'currency_format' :\n $newValue = self::currency_format($value);\n break;\n default :\n if (get_magic_quotes_gpc() == 0) {\n $value = addslashes($value);\n }\n $newValue = htmlspecialchars($value);\n break;\n }\n return $newValue;\n }", "public function reverseConvert ($value)\n {\n return $value;\n }", "public function hydrate($value)\n {\n $serializer = $this->getSerializer();\n return $serializer->unserialize($value);\n }", "public function toMixed();", "public function getSqlFormattedValue()\n {\n if ($this->getType() == \"string\" || $this->getType() == \"time\" || $this->getType() == \"enum\") {\n return \"{\" .\"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName() .\",'notNumber')},\";\n } else if ($this->getType() == \"date\") {\n return \"{\" .\"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName() .\",'date')},\";\n } else if ($this->getType() == \"datetime\") {\n return \"{\" .\"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName() .\",'datetime')},\";;\n } else {\n return \"{\". \"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName().\")},\";\n }\n /*\n } else if ($this->getType() == \"date_OLD\") {\n return \"STR_TO_DATE(\". \"{\".\"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName().\",'date')},\".\"'\". \"{\".\"$\".\"constants['STORED_DATE_FORMAT']}\" .\"'),\";\n } else if ($this->getType() == \"datetime_OLD\") {\n return \"STR_TO_DATE(\". \"{\".\"$\". \"this->parseValue(\". \"$\". \"this->\". $this->getName().\",'date')},\".\"'\". \"{\".\"$\".\"constants['STORED_DATETIME_FORMAT']}\" .\"'),\";\n */\n\n }", "public function castTyped( // phpcs:ignore\n $value\n ): string;", "public function convertToDatabaseValue($value)\n {\n if ($value === null) {\n return null;\n }\n\n $reflection = new \\ReflectionClass($value);\n\n $result = [\n Fields::KEY_ID => null,\n Fields::KEY_CLASS => $reflection->name\n ];\n\n foreach ($reflection->getProperties() as $prop) {\n $prop->setAccessible(true);\n $result[$prop->getName()] = $prop->getValue($value);\n }\n\n return array_filter(\n $result,\n function ($value) {\n return $value !== null;\n }\n );\n }", "private function get_field_value($value) {\r\n\t if ($value instanceof LazyDBExpressionType) {\r\n\t return $value->getExpression();\r\n\t } else if (is_array ( $value )) {\r\n\t\t\treturn \"'\" . $this->add_slashes( serialize($value) ) . \"'\";\r\n\t\t} else {\r\n\t\t\treturn \"'\" . $this->add_slashes ( $value ) . \"'\";\r\n\t\t}\r\n\t}", "function db2value($rec)\n {\n $languages = $this->getLanguages();\n if($this->isMlNode())\n {\n if(is_array($rec[$this->fieldName()]))\n {\n foreach($rec[$this->fieldName()] as $lng=>$value)\n {\n $result[$lng]=stripslashes($value);\n }\n } else $result = stripslashes($rec[$this->fieldName()]);\n }\n else\n {\n for ($i=0,$_i=count($languages);$i<$_i;$i++)\n {\n $result[$languages[$i]] = stripslashes($rec[$this->fieldName().'_'.$languages[$i]]);\n }\n }\n return $result;\n }", "public static function convertToNativeType($field, $value)\n {\n switch($field[\"type\"])\n {\n case \"number\":\n if(isset($field[\"field_options\"][\"integer_only\"]) && $field[\"field_options\"][\"integer_only\"])\n return intval($value);\n else\n return floatval($value);\n break; // defensive but not necessary\n case \"date\": // @todo: use a format attribute within field options accordig to date_parse_from_format function\n return $value;\n break;\n // @todo: file\n default:\n return $value;\n }\n }", "public function value($value, array $schema = [])\n\t{\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $key => $val) {\n\t\t\t\t$value[$key] = $this->value($val, isset($schema[$key]) ? $schema[$key] : $schema);\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\n\t\tif (is_object($value) && isset($value->scalar)) {\n\t\t\treturn $value->scalar;\n\t\t}\n\n\t\tif ($value === null) {\n\t\t\treturn 'NULL';\n\t\t}\n\n\t\t$type = isset($schema['type']) ? $schema['type'] : $this->_introspectType($value);\n\t\t$column = isset($this->_columns[$type]) ? $this->_columns[$type] : null;\n\n\t\treturn $this->_cast($type, $value, $column, $schema);\n\t}", "public function convert();", "abstract public function toPhp();", "public function fromDatabase( $databaseValue )\n {\n if ( $databaseValue === null )\n {\n return null;\n }\n if ( !is_int( $databaseValue ) && !is_numeric( $databaseValue ) )\n {\n throw new ezcBaseValueException( 'databaseValue', $databaseValue, 'int' );\n }\n return new DateTime( '@' . (int) $databaseValue );\n }", "abstract public function Convert($data);", "public abstract function makeValue($value);", "function _toDriver($value)\n {\n return $value;\n }", "private function value($value, array $schema = array()) {\n\t\tif (is_array($value) && count($value) > 0) {\n\t\t\tforeach ($value as $key => $val) {\n\t\t\t\t$value[$key] = $this->value($val, $schema);\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\t\tif ($value === null) {\n\t\t\treturn 'NULL';\n\t\t}\n\n\t\tif(count($schema) > 0){\n\t\t\tswitch ($type = $schema['type']) {\n case 'boolean':\n return $this->_toNativeBoolean($value);\n case 'float':\n return floatval($value);\n case 'string':\n case 'nchar':\n case 'varchar':\n case 'nvarchar':\n return \"'\".$value.\"'\";\n\t\t\t\t\t\t\tcase 'ntext':\n\t\t\t\t\t\t\t\treturn \"\\\"\".$value.\"\\\"\";\n case 'integer':\n case 'bigint':\n case 'int':\n return intval($value);\n case 'date':\n return \"'\".date(\"Y-m-d\", strtotime($value)).\"'\";\n case 'datetime':\n return \"'\".date(\"Y-m-d H:i:s\", strtotime($value)).\"'\";\n\n }\n\t\t}\n\t}", "public static function phpize($value)\n {\n $value = (string) $value;\n $lowercaseValue = \\strtolower($value);\n\n if ('null' === $lowercaseValue) {\n return;\n }\n\n if (\\ctype_digit($value)) {\n return self::transformToNumber($value, 0);\n }\n\n if (isset($value[1]) && '-' === $value[0] && \\ctype_digit(\\substr($value, 1))) {\n return self::transformToNumber($value, 1);\n }\n\n if ($lowercaseValue === 'true') {\n return true;\n }\n\n if ('false' === $lowercaseValue) {\n return false;\n }\n\n if (isset($value[1]) && '0b' === $value[0] . $value[1]) {\n return \\bindec($value);\n }\n\n if (\\is_numeric($value)) {\n return '0x' === $value[0] . $value[1] ? \\hexdec($value) : (float) $value;\n }\n\n if (\\preg_match('/^0x[0-9a-f]++$/i', $value) === 1) {\n return \\hexdec($value);\n }\n\n if (\\preg_match('/^(-|\\+)?\\d+(\\.\\d+)?$/', $value) === 1) {\n return (float) $value;\n }\n\n return $value;\n }", "function tosql($value, $type)\n{\n if(!strlen($value))\n return \"NULL\";\n else\n if($type == \"Number\")\n return str_replace (\",\", \".\", doubleval($value));\n else\n {\n if(get_magic_quotes_gpc() == 0)\n {\n $value = str_replace(\"'\",\"''\",$value);\n $value = str_replace(\"\\\\\",\"\\\\\\\\\",$value);\n }\n else\n {\n $value = str_replace(\"\\\\'\",\"''\",$value);\n $value = str_replace(\"\\\\\\\"\",\"\\\"\",$value);\n }\n\n return \"'\" . $value . \"'\";\n }\n}", "function tosql($value, $type)\n{\n if(!strlen($value))\n return \"NULL\";\n else\n if($type == \"Number\")\n return str_replace (\",\", \".\", doubleval($value));\n else\n {\n if(get_magic_quotes_gpc() == 0)\n {\n $value = str_replace(\"'\",\"''\",$value);\n $value = str_replace(\"\\\\\",\"\\\\\\\\\",$value);\n }\n else\n {\n $value = str_replace(\"\\\\'\",\"''\",$value);\n $value = str_replace(\"\\\\\\\"\",\"\\\"\",$value);\n }\n\n return \"'\" . $value . \"'\";\n }\n}", "protected function _convertColumnValue($name, $value, $row)\n {\n $column = $this->_column($name);\n foreach ($column->converters as $converter) {\n $value = $converter->call($value, $row, $this);\n }\n\n if ($name !== false) {\n // sanity check\n if (!is_string($value)) {\n $value = (string)$value;\n }\n\n // strip HTML tags\n if (!$column->rawHtml) {\n $value = htmlspecialchars($value);\n }\n }\n\n return $value;\n }", "private function transform($value) {\n $CI = & get_instance();\n // caso seja um array\n if (is_array($value)) {\n // percorre os valores\n foreach ($value as $x) {\n // se for um inteiro\n if (is_integer($x)) {\n $foo[] = $x;\n } else if (is_string($x)) {\n // se for string, adiciona aspas\n $foo[] = $CI->db->escape($x);\n }\n }\n // converte o array em string separada por \",\"\n $result = '(' . implode(',', $foo) . ')';\n }\n // caso seja uma string\n else if (is_string($value)) {\n // adiciona aspas\n $result = $CI->db->escape($value);\n }\n // caso seja valor nullo\n else if (is_null($value)) {\n // armazena NULL\n $result = 'NULL';\n }\n\n // caso seja booleano\n else if (is_bool($value)) {\n // armazena TRUE ou FALSE\n $result = $value ? 'TRUE' : 'FALSE';\n } else {\n $result = $CI->db->escape($value);\n }\n // retorna o valor\n return $result;\n }", "static public function SQLValue( $value, $datatype = self::SQLVALUE_TEXT )\r\n\t{\r\n\t\t$return_value = '';\r\n\t\t$value = mysql_real_escape_string( self::fixQuery( $value ) );\r\n\r\n\t\tswitch( strtolower( trim( $datatype ) ) )\r\n\t\t{\r\n\t\t\tcase 'text':\r\n\t\t\tcase 'string':\r\n\t\t\tcase 'varchar':\r\n\t\t\tcase 'char':\r\n\t\t\t\tif( strlen( $value ) == 0 )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"NULL\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif( get_magic_quotes_gpc() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$value = stripslashes( $value );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$return_value = \"'\" . str_replace( \"'\", \"''\", $value ) . \"'\";\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'number':\r\n\t\t\tcase 'integer':\r\n\t\t\tcase 'int':\r\n\t\t\tcase 'double':\r\n\t\t\tcase 'float':\r\n\t\t\t\tif( is_numeric( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = $value;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = 'NULL';\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'boolean': //boolean to use this with a bit field\r\n\t\t\tcase 'bool':\r\n\t\t\tcase 'bit':\r\n\t\t\t\tif( self::GetBooleanValue( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t $return_value = '1';\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t $return_value = '0';\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'y-n': //boolean to use this with a char(1) field\r\n\t\t\t\tif( self::GetBooleanValue( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'Y'\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'N'\";\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 't-f': //boolean to use this with a char(1) field\r\n\t\t\t\tif( self::GetBooleanValue( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'T'\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'F'\";\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'date':\r\n\t\t\t\tif( self::IsDate( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'\" . date('Y-m-d', strtotime($value)) . \"'\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = 'NULL';\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'datetime':\r\n\t\t\t\tif( self::IsDate( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'\" . date('Y-m-d H:i:s', strtotime( $value ) ) . \"'\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = 'NULL';\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'time':\r\n\t\t\t\tif( self::IsDate( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = \"'\" . date( 'H:i:s', strtotime( $value ) ) . \"'\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$return_value = 'NULL';\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\texit('ERROR: Invalid data type specified in SQLValue method');\r\n\t\t}\r\n\t\treturn $return_value;\r\n\t}", "public function cleanValue($value)\n {\n $value = $this->toPhp($value);\n $this->validate($value);\n return $value;\n }", "function convertValue( $value, $type = 'string', $options = array() )\n\t{\n\t\tswitch( $type )\n\t\t{\n\t\t\t//\tstring\n\t\t\tcase 'string':\n\t\t\t\tsettype( $value, 'string' );\n\t\t\t\tbreak;\n\n\t\t\t//\tboolean\n\t\t\tcase 'boolean':\n\t\t\tcase 'bool':\n\t\t\t\tif( $value == 'true' || $value == 'yes' || $value == 'on' )\n\t\t\t\t\t$value\t=\ttrue;\n\t\t\t\telse\n\t\t\t\t\t$value\t=\tfalse;\n\t\t\t\tbreak;\n\n\t\t\t//\tinteger\n\t\t\tcase 'integer':\n\t\t\tcase 'int':\n\t\t\t\tsettype( $value, 'integer' );\n\t\t\t\tbreak;\n\n\t\t\t//\tdouble\n\t\t\tcase 'float':\n\t\t\tcase 'double':\n\t\t\t\tsettype( $value, 'double' );\n\t\t\t\tbreak;\n\n\t\t\t//\tarray\n\t\t\tcase 'array':\n\t\t\t\tif( !is_array( $value ) )\n\t\t\t\t{\n\t\t\t\t\tif( trim( $value ) )\n\t\t\t\t\t\t$value\t=\tarray( $value );\n\t\t\t\t\telse\n\t\t\t\t\t\t$value\t=\tarray();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t//\tobject\n\t\t\tcase 'object':\n\t\t\t\tif( class_exists( $options['instanceof'] ) )\n\t\t\t\t\t$class = $options['instanceof'];\n\t\t\t\telse\n\t\t\t\t\t$class = 'stdClass';\n\t\t\t\t\t\n\t\t\t\t$value = &new $class( $value );\n\t\t\t\tbreak;\n\n\t\t}\n\t\treturn\t$value;\n\t}", "function value2sql( $type, $value )\n\t\t{\n\t\tif( $type == \"VARCHAR\" || $type == \"varchar\" || $type == \"char\" )\n\t\t\t{\n\t\t\tif( $value == \"\") return \" null\" ;\n\t\t\treturn \"'\" . $value . \"'\" ;\n\t\t\t}\n\t\telse if( $type == \"DATETIME\" )\n\t\t\t{\n\t\t\tif( $value == \"\") return \" null\" ;\n\t\t\treturn strftime( \"#%Y-%m-%d %H:%M:%S#\", $value ) ;\n\t\t\t}\n\t\treturn $value ;\n\t\t}", "private function castExplicit($key, $value, $collection) {\r\n switch($collection->model->getDbType($key)) {\r\n case 'integer':\r\n return (integer) $value;\r\n case 'float':\r\n return (float) $value;\r\n /*\r\n * PostgreSQL returns ST_AsGeoJSON(geometry) \r\n */\r\n case 'geometry':\r\n return json_decode($value, true);\r\n case 'array':\r\n return explode(',', substr($value, 1, -1));\r\n default:\r\n return $value;\r\n }\r\n }" ]
[ "0.76550174", "0.76377624", "0.73278356", "0.728742", "0.728742", "0.70976305", "0.6877209", "0.6873517", "0.6749173", "0.6718191", "0.66757804", "0.6673076", "0.66573036", "0.66355693", "0.6617719", "0.66148084", "0.6535413", "0.65225476", "0.6519564", "0.6494722", "0.6456114", "0.6447893", "0.63926053", "0.6300579", "0.6278179", "0.6218189", "0.62017035", "0.61656123", "0.61429477", "0.61238426", "0.6103812", "0.6097935", "0.6063626", "0.604454", "0.6034901", "0.60326505", "0.60301054", "0.6029128", "0.6023618", "0.5999231", "0.5979483", "0.59319043", "0.5905396", "0.5891883", "0.5890012", "0.5888108", "0.58764315", "0.5831052", "0.58231825", "0.5820918", "0.58143014", "0.5802132", "0.5801044", "0.5797245", "0.5793745", "0.57907194", "0.5781666", "0.5770801", "0.5757511", "0.5749464", "0.5732018", "0.57293373", "0.5719102", "0.5696722", "0.5694597", "0.56921643", "0.56668556", "0.5665379", "0.56606305", "0.5645371", "0.5642996", "0.564166", "0.56354356", "0.56352955", "0.56335545", "0.5629796", "0.5625508", "0.56243646", "0.56227016", "0.56221545", "0.5602649", "0.55974525", "0.5586994", "0.55772156", "0.5568748", "0.55624825", "0.55589694", "0.55580163", "0.5547966", "0.55385387", "0.55183524", "0.55183524", "0.5511352", "0.54913294", "0.548927", "0.5475515", "0.5470231", "0.5467432", "0.5466511" ]
0.7034595
7
Register a new type in the type map.
public static function registerType($name, $class) { self::$typesMap[$name] = $class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function register_type();", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "private static function registerType(IType $type)\n {\n self::$types[$type->getName()] = $type;\n }", "public static function addType($name)\n {\n if (is_null(self::$registry)) {\n self::registerType(new $name());\n return;\n }\n self::registerType(new $name(self::$registry));\n }", "public static function registerType(string $name, string $class): void\n {\n self::$typesMap[$name] = $class;\n }", "public function addType($type);", "public function register()\n {\n foreach ($this->types as $type) {\n if (!class_exists($type)) {\n trigger_error('Missing post type class: ' . $type . '.');\n continue;\n }\n $typeInstance = with(new $type)->init();\n $this->resolvedAlias[$type] = $this->resolvedTypes[$typeInstance->id] = $typeInstance;\n }\n }", "function registerFieldType($name, $type);", "public function register_type(string $type_name, $config)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public static function register_type(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public function register_object_type(string $type_name, array $config)\n {\n }", "public function registerType(IType $type): void\n {\n $schemaName = $type->getSchemaName();\n $typeName = $type->getName();\n\n if (!isset($this->types[$schemaName])) {\n $this->types[$schemaName] = [];\n }\n $this->types[$schemaName][$typeName] = $type;\n }", "public function addType(Type $type, $name = '')\n {\n if (!$name) {\n $name = (string)$type;\n }\n\n $this->types[$name] = $type;\n }", "public function AddType($type) {\n $this->Types[] = $type;\n }", "public function addType($registry, $name, $className)\n {\n if (isset($this->mapping[$registry][$name])) {\n throw new \\LogicException(sprintf('%s type \"%s\" is already defined', $registry, $name));\n }\n\n // make sure it's fully qualified\n if (substr($className, 0, 1) !== '\\\\') {\n $className = '\\\\'.$className;\n }\n\n $this->mapping[$registry][$name] = $className;\n }", "public function register(string $type, string $classPath)\n {\n $this->classPool[$type] = $classPath;\n }", "public static function get_type_registry()\n {\n }", "public function registerType($registry, $name, $instance)\n {\n $this->addType($registry, $name, get_class($instance));\n $this->typeObjects[$registry][$name] = $instance;\n }", "public static function addType(string $name, string $className): void\n {\n if (isset(self::$typesMap[$name])) {\n throw MappingException::typeExists($name);\n }\n\n self::$typesMap[$name] = $className;\n }", "public function register()\n {\n $args = apply_filters( $this->name.'_post_type_config', $this->config );\n $args['labels'] = apply_filters( $this->name.'_post_type_labels', $this->labels);\n\n register_post_type( $this->name, $args );\n }", "abstract public function register ( );", "abstract public function register();", "abstract public function register();", "abstract public function register();", "function register_field_type($class)\n {\n }", "public function add(TypeInterface $type) : TypeInterface;", "public function init_type_registry(\\WPGraphQL\\Registry\\TypeRegistry $type_registry)\n {\n }", "public function add(string $type): void\n {\n /**\n * Don't add in case of an invalid type or in case the type has already\n * been added.\n */\n if (in_array($type, self::$allowedTypes, true)\n && !in_array($type, $this->types, true)\n ) {\n $this->types[] = $type;\n }\n }", "public static function addType($name, $className)\n {\n if (isset(self::$typesMap[$name])) {\n throw MappingException::typeExists($name);\n }\n\n self::$typesMap[$name] = $className;\n }", "public function add(string $key, mixed $value, mixed $type = null): void;", "public function register_interface_type(string $type_name, array $config)\n {\n }", "public function register(): void;", "public function register_post_type() {\n\t\tadd_action( 'init', array( $this, 'post_registration_callback' ), 0, 0 );\n\t}" ]
[ "0.8264354", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7921263", "0.7490243", "0.7297055", "0.7072518", "0.70220417", "0.6906129", "0.6904881", "0.6844126", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.6608331", "0.66050506", "0.6597799", "0.65342367", "0.6447118", "0.6354986", "0.6350319", "0.6241892", "0.62078846", "0.6149627", "0.6143097", "0.6136861", "0.61003906", "0.61003906", "0.61003906", "0.6089833", "0.6080851", "0.6019829", "0.6019391", "0.6007287", "0.5963474", "0.59052473", "0.58887", "0.58733267" ]
0.7109172
51
Get a Type instance.
public static function getType($type) { if ( ! isset(self::$typesMap[$type])) { throw new \InvalidArgumentException(sprintf('Invalid type specified "%s".', $type)); } if ( ! isset(self::$types[$type])) { $className = self::$typesMap[$type]; self::$types[$type] = new $className; } return self::$types[$type]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getType(): Type\n {\n return $this->type;\n }", "public function get(string $className): Type\n {\n if (!isset($this->types[$className])) {\n $instance = $this->createInstance($className);\n $this->types[$className] = $instance;\n }\n\n return $this->types[$className];\n }", "public function type(): Type\n {\n return $this->type;\n }", "public static function get_type($type = \"Posts\") {\r\n\t\t$_type = \"\\\\ESWP\\\\MyTypes\\\\\".\"$type\";\r\n\t\treturn new $_type();\r\n\t}", "public function resolveType(): Type\n {\n return $this->typeRegistry->get($this->currentType);\n }", "public function getType(): TypeDefinition;", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Type');\n }", "public function getType()\n\t{\n\t\treturn $this->getObject('type', null, 'type');\n\t}", "public function type()\n\t{\n\t\treturn $this->oneToOne(__NAMESPACE__ . '\\\\Type', 'id', 'type');\n\t}", "public function getType()\n {\n return $this->factory->resolveType($this);\n }", "public static function getType(string $type): Type\n {\n if (!isset(self::$typesMap[$type])) {\n throw new InvalidArgumentException(sprintf('Invalid type specified \"%s\".', $type));\n }\n\n if (!isset(self::$typeObjects[$type])) {\n $className = self::$typesMap[$type];\n\n self::$typeObjects[$type] = new $className();\n }\n\n return self::$typeObjects[$type];\n }", "public function createType()\n {\n $o = new TypeSelector();\n $this->appendSelector($o);\n\n return $o;\n }", "public function get($type)\n {\n return $this->resolve($type);\n }", "public function getType(string $type): TypeImplementor\n {\n return $this->getItemById($type);\n }", "public function type()\n {\n return $this->hasOne(Type::class);\n }", "public function getType() {\n\t\treturn self::$_type;\n\t}", "public function get_type();", "public static function getInstance($value, $type)\n\t{\n\t\tif($type['type'] == 'array') {\n\t\t\tif($value instanceof DataTypes\\TypeArray) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeArray($value, isset($type['of'])? $type['of']: 'mixed', isset($type['length'])? $type['length']: 0);\n\t\t\t}\n\t\t} else if($type['type'] == 'string') {\n\t\t\tif($value instanceof DataTypes\\TypeString) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeString($value, isset($type['length'])? $type['length']: 0);\n\t\t\t}\n\t\t} else if($type['type'] == 'int') {\n\t\t\tif($value instanceof DataTypes\\TypeInt) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeInt($value, isset($type['length'])? $type['length']: 0);\n\t\t\t}\n\t\t} else if($type['type'] == 'float') {\n\t\t\tif($value instanceof DataTypes\\TypeFloat) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeFloat($value, isset($type['length'])? $type['length']: 0, isset($type['decimal'])? $type['decimal']: 0);\n\t\t\t}\n\t\t} else if($type['type'] == 'bool') {\n\t\t\tif($value instanceof DataTypes\\TypeBool) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeBool($value);\n\t\t\t}\n\t\t} else {\n\t\t\treturn self::getValue($value);\n\t\t}\n\t}", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return isset($this->Type) ? $this->Type : null;\n }", "final protected function get_type() {\n return $this->type;\n }", "public function getType()\n {\n return $this->_Type;\n }", "public function getType()\n {\n return new ReflectionClass($this);\n }", "public function getType()\n {\n return new ReflectionClass($this);\n }", "public function getType()\n\t{\n\t\t$types = $this->getValidTypes();\n\n\t\treturn $types[$this->type];\n\t}", "public static function get($type)\n {\n }", "public function get($type);", "public function getType(): ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null\n {\n $type = $this->node->type;\n assert($type instanceof Node\\Identifier || $type instanceof Node\\Name || $type instanceof Node\\NullableType || $type instanceof Node\\UnionType || $type instanceof Node\\IntersectionType || $type === null);\n\n if ($type === null) {\n return null;\n }\n\n return ReflectionType::createFromNode($this->reflector, $this, $type);\n }", "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public function getType( $type )\n {\n return $this->types[$type];\n }", "public function get_type() {\n\t\treturn $this->type;\n\t}", "public function get_type() {\n return $this->type;\n }", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function get_type() {\n return $this->_type;\n }", "function getType() {\n\t\treturn $this->_Type;\n\t}", "public function getType(): ?Type\n {\n return $this->type;\n }", "public abstract function getType();", "public function get(string $type): mixed\n {\n if (array_key_exists($type, $this->store)) {\n return $this->store[$type];\n }\n\n return $this->getBinding($type)\n ->getInstance();\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }" ]
[ "0.71767926", "0.710375", "0.68919986", "0.68723255", "0.6662461", "0.6662346", "0.6556137", "0.65514314", "0.6516296", "0.65017694", "0.6471181", "0.6364491", "0.63526756", "0.63515526", "0.6332289", "0.6315423", "0.6306327", "0.62690836", "0.62634254", "0.62634254", "0.62634254", "0.6260827", "0.6260827", "0.6260827", "0.6260827", "0.6260827", "0.6260827", "0.6260827", "0.6260827", "0.6260827", "0.6260827", "0.619881", "0.6196296", "0.6167635", "0.61639166", "0.61639166", "0.6152218", "0.6144171", "0.6143805", "0.610251", "0.60950035", "0.60948986", "0.608375", "0.6072341", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.6069933", "0.60666776", "0.60606736", "0.60572195", "0.60388684", "0.6032899", "0.6000353", "0.6000353", "0.6000353", "0.6000353", "0.6000353", "0.6000353", "0.6000353" ]
0.6184161
33
Get a Type instance based on the type of the passed php variable.
public static function getTypeFromPHPVariable($variable) { if (is_object($variable)) { if ($variable instanceof \DateTime) { return self::getType('date'); } else if ($variable instanceof \MongoId) { return self::getType('id'); } } else { $type = gettype($variable); switch ($type) { case 'integer'; return self::getType('int'); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getTypeFromPHPVariable($variable): ?Type\n {\n if (is_object($variable)) {\n if ($variable instanceof DateTimeInterface) {\n return self::getType(self::TIMESTAMP);\n }\n } else {\n $type = gettype($variable);\n\n switch ($type) {\n case 'boolean':\n return self::getType(self::BOOLEAN);\n case 'integer':\n return self::getType(self::INTEGER);\n case 'float':\n return self::getType(self::FLOAT);\n case 'string':\n return self::getType(self::STRING);\n }\n }\n\n return null;\n }", "public static function get_type($type = \"Posts\") {\r\n\t\t$_type = \"\\\\ESWP\\\\MyTypes\\\\\".\"$type\";\r\n\t\treturn new $_type();\r\n\t}", "public function get(string $className): Type\n {\n if (!isset($this->types[$className])) {\n $instance = $this->createInstance($className);\n $this->types[$className] = $instance;\n }\n\n return $this->types[$className];\n }", "public function resolveType(): Type\n {\n return $this->typeRegistry->get($this->currentType);\n }", "public function get_type();", "public function getType(string $parameter);", "public static function type($var) : string\n\t{\n\t\treturn is_object($var) ? get_class($var) : gettype($var);\n\t}", "public static function createFromVariable($variable): TypeToken\n {\n $type = \\is_object($variable) ? \\get_class($variable) : \\gettype($variable);\n\n return self::create($type);\n }", "public function type($type);", "public function getDefinitionInstanceByType($a_type)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_type, \"Definition\");\t\t\r\n\t\treturn new $class();\t\t\r\n\t}", "public function findByName(Type $var = null)\n {\n # code...\n }", "protected static function astVarType(\n Context $context,\n $node\n ) : Type {\n\n // Check for $$var or ${...} (whose idea was that anyway?)\n if(($node->children[0] instanceof Node)\n && ($node->children[0]->kind == \\ast\\AST_VAR\n || $node->children[0]->kind == \\ast\\AST_BINARY_OP)\n ) {\n return new Type(['mixed']);\n }\n\n if($node->children[0] instanceof Node) {\n return Type::none();\n }\n\n $variable_name = $node->children[0];\n\n // if(empty($scope[$current_scope]['vars'][$node->children[0]])\n if (!$context->getScope()->hasVariableWithName($variable_name)) {\n if(!superglobal($variable_name))\n Log::err(\n Log::EVAR,\n \"Variable \\${$node->children[0]} is not defined\",\n $context->getFile(),\n $node->lineno\n );\n } else {\n $variable =\n $context->getScope()->getVariableWithName($variable_name);\n\n return $variable->getType();\n\n /*\n if(!empty($scope[$current_scope]['vars'][$node->children[0]]['tainted'])\n ) {\n $tainted_by =\n $scope[$current_scope]['vars'][$node->children[0]]['tainted_by'];\n $taint = true;\n }\n */\n }\n\n return Type::none();\n }", "public function getType($name);", "public function make($type);", "protected function _determineType($var, $resultGraph)\n {\n $type = null;\n // find in namedGraphs\n if (!$var instanceof Literal) {\n $iter = $this->dataset->findInNamedGraphs(\n null,\n $var,\n new Resource(RDF_NAMESPACE_URI.'type'),\n null,\n true\n );\n while ($iter->valid()) {\n $statement = $iter->current();\n $type = $statement->getObject1();\n $resultGraph->add($iter->current());\n break;\n }\n }\n // if no type information found find in default graph\n if (!$type) {\n if (!$var instanceof Literal) {\n $iter1 = $this->dataset->findInDefaultGraph(\n $var,\n new Resource(RDF_NAMESPACE_URI.'type'),\n null\n );\n $type = null;\n while ($iter1->valid()) {\n $statement = $iter1->current();\n $type = $statement->getObject1();\n $resultGraph->add($iter1->current());\n break;\n }\n }\n }\n return $type;\n }", "public static function get_new($type) {\n // Get type name\n if (!$type) {\n $type = 'general';\n }\n if (!preg_match('~^[a-z][a-z0-9_]*$~', $type)) {\n throw new coding_exception(\"Invalid forum type name: $type\");\n }\n $classname = 'forumngtype_' . $type;\n\n // Require library\n global $CFG;\n require_once(dirname(__FILE__) . \"/$type/$classname.php\");\n\n // Create and return type object\n return new $classname;\n }", "public function type($type='string')\n {\n $type = strtolower($type);\n\n switch ($type) {\n case 'string':\n return new Types\\SettingString($this->app);\n\n case 'array':\n return new Types\\SettingArray($this->app);\n\n case 'json':\n return new Types\\SettingJson($this->app);\n\n case 'object':\n return new Types\\SettingObject($this->app);\n }\n\n $this->unknownType($type);\n }", "public static function create(object|string $object): Type\n {\n return new static(ClassName::canonical($object));\n }", "protected function get_type_from_id($id)\n\t{\n\t\treturn $this->types->get($id);\n\t}", "public function get($type);", "public function createType()\n {\n $o = new TypeSelector();\n $this->appendSelector($o);\n\n return $o;\n }", "public static function getType($var)\n {\n if (is_object($var)) {\n return get_class($var);\n }\n if ($var === null) {\n return 'null';\n }\n if (is_string($var)) {\n return 'string';\n }\n if (is_array($var)) {\n return 'array';\n }\n if (is_int($var)) {\n return 'integer';\n }\n if (is_bool($var)) {\n return 'boolean';\n }\n if (is_float($var)) {\n return 'float';\n }\n if (is_resource($var)) {\n return 'resource';\n }\n return 'unknown';\n }", "public function get_type(string $type_name)\n {\n }", "protected function getType($type) {\n\t\tif (isset($this->typeAlias[$type])) {\n\t\t\treturn $this->typeAlias[$type];\n\t\t}\n\t\treturn $type;\n\t}", "protected function load_type($type)\n\t{\n\t\t$type_id = $this->types->type_from_url($type);\n\t\treturn $this->get_type_from_id($type_id);\n\t}", "public function expectObjectType($var, $strict = false) {\n\t\t\t$object_type_id = (int) getRequest($var);\n\t\t\treturn umiObjectTypesCollection::getInstance()->getType($object_type_id);\n\t\t}", "public static function getTypeFromValue($value)\n {\n switch (gettype($value)) {\n case 'boolean':\n return Type::getBool();\n\n case 'integer':\n return Type::getInt();\n\n case 'double':\n return Type::getFloat();\n\n case 'string':\n return Type::getString();\n\n case 'array':\n return Type::getArray();\n\n case 'NULL':\n return Type::getNull();\n\n default:\n return Type::getMixed();\n }\n }", "abstract protected function getType();", "public static function typeMatches ($value, $type) {\n $types = array(\"string\", \"number\", \"array\", \"object\", \"date\", \"boolean\", \"null\");\n $phpType = gettype($value);\n //....?\n }", "protected abstract function getType();", "public static function getType(string $type): Type\n {\n if (!isset(self::$typesMap[$type])) {\n throw new InvalidArgumentException(sprintf('Invalid type specified \"%s\".', $type));\n }\n\n if (!isset(self::$typeObjects[$type])) {\n $className = self::$typesMap[$type];\n\n self::$typeObjects[$type] = new $className();\n }\n\n return self::$typeObjects[$type];\n }", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "public function getVariableType(ParsedDocument $document, Variable $variable): ?string\n {\n if ($variable->name === 'this') {\n return $document->getClassName();\n }\n\n $closestVariable = $this->findClosestVariableReferencesInDocument($variable, $document);\n\n if ($closestVariable === null) {\n return null;\n }\n\n return $this->getType($document, $closestVariable);\n }", "public abstract function getType();", "public function getObject(): mixed\n {\n // how can i derive this class from a string?\n if (!$object = call_user_func('App\\\\'.ucfirst($this->object_type).'::find', $this->object_id)) {\n return $object;\n }\n\n return null;\n }", "private function get_type() {\n\n\t}", "function &typed($value, string $namespace = 'default')\n{\n if (is_bool($value)) {\n return bool($value, $namespace);\n } elseif (is_string($value)) {\n return string($value, $namespace);\n } elseif (is_float($value)) {\n return float($value, $namespace);\n } elseif (is_int($value)) {\n return int($value, $namespace);\n } elseif (is_iterable($value)) {\n return iterable($value, $namespace);\n } elseif (is_callable($value, false)) {\n return func($value, $namespace);\n } elseif (is_object($value)) {\n return object($value, $namespace);\n } else {\n throw new InvalidArgumentException(\n sprintf('Couldn\\'t create a typed variable for \"%s\" type.', gettype($value))\n );\n }\n}", "function getType();", "function getType();", "function getType();", "function getType();", "function getType();", "public static function create(string $type): TypeToken\n {\n if (!isset(self::$types[$type])) {\n self::$types[$type] = new static($type);\n }\n\n return self::$types[$type];\n }", "public static function getInstance($value, $type)\n\t{\n\t\tif($type['type'] == 'array') {\n\t\t\tif($value instanceof DataTypes\\TypeArray) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeArray($value, isset($type['of'])? $type['of']: 'mixed', isset($type['length'])? $type['length']: 0);\n\t\t\t}\n\t\t} else if($type['type'] == 'string') {\n\t\t\tif($value instanceof DataTypes\\TypeString) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeString($value, isset($type['length'])? $type['length']: 0);\n\t\t\t}\n\t\t} else if($type['type'] == 'int') {\n\t\t\tif($value instanceof DataTypes\\TypeInt) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeInt($value, isset($type['length'])? $type['length']: 0);\n\t\t\t}\n\t\t} else if($type['type'] == 'float') {\n\t\t\tif($value instanceof DataTypes\\TypeFloat) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeFloat($value, isset($type['length'])? $type['length']: 0, isset($type['decimal'])? $type['decimal']: 0);\n\t\t\t}\n\t\t} else if($type['type'] == 'bool') {\n\t\t\tif($value instanceof DataTypes\\TypeBool) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeBool($value);\n\t\t\t}\n\t\t} else {\n\t\t\treturn self::getValue($value);\n\t\t}\n\t}", "private function getType($id) {\n \n $this->loadTypes();\n \n foreach ($this->types as $type) {\n \n if ($type->getId() === $id) return $type;\n }\n \n return NULL;\n }", "public static function fromReflectionType(Php7ReflectionType $type)\n {\n $typeValue = (string) $type;\n if ($type->isBuiltin()) {\n if ($typeValue === 'array') {\n return self::arrayType(self::mixed());\n } else {\n return self::builtinType($typeValue);\n }\n } elseif (class_exists($typeValue) || interface_exists($typeValue)) {\n return self::objectType($typeValue);\n } else {\n return self::mixed();\n }\n }", "function reflect($var)\n {\n if (is_object($var)) {\n return new ReflectionObject($var);\n }\n\n return new ReflectionClass($var);\n }", "protected static function GetClassForType($sType)\n {\n $oInstance = null;\n $sClassName = null;\n\n // old format (Class, Subtype, Type) lookup\n if (strstr($sType, ',')) {\n $aParts = explode(',', $sType);\n if (3 == count($aParts)) {\n $sClassName = trim($aParts[0]);\n }\n } else {\n $sClassName = $sType;\n }\n\n if (is_null($sClassName)) {\n trigger_error('ERROR: sType has invalid format (must be of the form CLASSNAME,SUBTYPE,TYPE)', E_USER_ERROR);\n } else {\n $oInstance = new $sClassName();\n }\n\n return $oInstance;\n }", "public function getFieldType($fieldSlug);", "public function get($type)\n {\n return $this->resolve($type);\n }", "private function defaultCast(string $type, $value)\n {\n return class_exists($type) ? new $type($value) : $value;\n }", "public abstract function type();", "public abstract function type();", "public function GetType($name){\r\n\t\tself::Debug('Find type '.$name);\r\n\t\t$i=-1;\r\n\t\t$len=sizeof($this->Types);\r\n\t\twhile(++$i<$len)\r\n\t\t\tif($this->Types[$i]->Name==$name){\r\n\t\t\t\tself::Debug('Found type at index '.$i);\r\n\t\t\t\treturn $this->Types[$i];\r\n\t\t\t}\r\n\t\treturn null;\r\n\t}", "public function getType( $type )\n {\n return $this->types[$type];\n }", "public static function getHolderType();", "protected function getEffectiveType(\n TypeInterface $variableType,\n VariableDefinitionNode $variableDefinition\n ): TypeInterface {\n return (!$variableDefinition->hasDefaultValue() || $variableType instanceof NonNullType)\n ? $variableType\n : newNonNull($variableType);\n }", "public function make($type)\n {\n if ($instance = array_get($this->resolved, $type)) {\n return $instance;\n }\n\n return $this->build($type);\n }", "public function get(string $variableName = null, int $type = Variables::TYPE_STRING)\n {\n if ($variableName === null) {\n throw new BadMethodCallException('Variable name must be specified');\n }\n if ($variableName === '_MFREG_') {\n throw new InvalidArgumentException('_MFREG_ variable name is not allowed');\n }\n if (isset($this->variables[$variableName])) {\n return $this->cast(@\\unserialize(\\base64_decode($this->variables[$variableName])), $type);\n }\n return $this->cast(null, $type);\n }", "public static function getType($name)\n {\n $pkg = self::$pkg;\n if (!isset(self::$types[$name])) {\n if (class_exists(\"\\\\{$pkg}\\\\Model\\\\Type\\\\{$name}Type\")) {\n self::addType(\"\\\\{$pkg}\\\\Model\\\\Type\\\\{$name}Type\");\n } elseif (class_exists(\"\\\\Pearly\\\\Model\\\\Type\\\\{$name}Type\")) {\n self::addType(\"\\\\Pearly\\\\Model\\\\Type\\\\{$name}Type\");\n }\n }\n return isset(self::$types[$name]) ? self::$types[$name] : self::$types['string'];\n }", "public function get(string $type): mixed\n {\n if (array_key_exists($type, $this->store)) {\n return $this->store[$type];\n }\n\n return $this->getBinding($type)\n ->getInstance();\n }", "public function guessType($class, $property);", "protected function fetchType( $type )\n\t{\n\t\tif ( count( $this->typesCache ) )\n\t\t{\n\t\t\treturn $this->typesCache[$type];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach( $this->db->select( '*', 'contenttype' ) AS $contenttype )\n\t\t\t{\n\t\t\t\t$this->typesCache[$contenttype['class']] = $contenttype['contenttypeid'];\n\t\t\t}\n\n\t\t\treturn $this->typesCache[$type];\n\t\t}\n\t}", "public static function getTypeIdByTypeName($type_name) {\n\t\t$mapping = [\n\t\t\t'dbl' => ITEM_VALUE_TYPE_FLOAT,\n\t\t\t'str' => ITEM_VALUE_TYPE_STR,\n\t\t\t'log' => ITEM_VALUE_TYPE_LOG,\n\t\t\t'uint' => ITEM_VALUE_TYPE_UINT64,\n\t\t\t'text' => ITEM_VALUE_TYPE_TEXT\n\t\t];\n\n\t\tif (array_key_exists($type_name, $mapping)) {\n\t\t\treturn $mapping[$type_name];\n\t\t}\n\n\t\t// Fallback to float.\n\t\treturn ITEM_VALUE_TYPE_FLOAT;\n\t}", "public function getType()\n {\n return $this->factory->resolveType($this);\n }", "abstract public function type();", "abstract public function type();", "private static function valueFromType($value, $type)\n {\n if ($value === null)\n {\n return null;\n }\n \n switch ($type)\n {\n case 'bool':\n case 'boolean':\n return (bool) $value;\n \n case 'int':\n case 'integer':\n return (int) $value;\n \n case 'lob':\n return stream_get_contents($value);\n \n case 'base64':\n return base64_decode($value);\n \n case 'date':\n case 'time':\n case 'timestamp':\n return strtotime($value);\n \n case 'string':\n case 'istring':\n default:\n return (string) $value;\n }\n }", "public function type();", "public function type();", "public function type();", "public function type();", "public static function InstaceOf($type, $var){\n\t\t$realType = gettype($var);\t\n\t\tif(!empty($type)){\n\t\t\tswitch(strtolower($type)){\n\t\t\t\tcase 'string':\n\t\t\t\tcase 'array':\n\t\t\t\tcase 'boolean':\n\t\t\t\tcase 'integer':\n\t\t\t\tcase 'double':\n\t\t\t\t\treturn $realType === strtolower($type);\n\t\t\t\tcase 'bool':\n\t\t\t\t\treturn $realType === 'bool';\n\t\t\t\tcase 'int':\n\t\t\t\t\treturn $realType === 'integer';\n\t\t\t\tcase 'float':\n\t\t\t\tcase 'decimal':\n\t\t\t\t\treturn $realType === 'double';\n\t\t\t\tdefault:\n\t\t\t\t\treturn strtolower($type) === strtolower(get_class($var));\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Exception('Validate::InstaceOf expects parameter 1 to be string');\n\t\t}\n\t}", "public function getType()\n\t{\n\t\t$types = $this->getValidTypes();\n\n\t\treturn $types[$this->type];\n\t}", "function get_field_type($name)\n {\n }", "function apiSnagType($varName,$default=false,$type=false) {\r\n\t$retVal = $default;\t\r\n\tif(apiSnag($varName)) {\r\n\t\tif(!$type || gettype(apiSnag($varName)) == $type) {\t//\tif type is set, make sure it's the right type\r\n\t\t\t$retVal = apiSnag($varName);\r\n\t\t}\r\n\t}\r\n\treturn $retVal;\r\n}", "function is_type_of(mixed $var, string ...$types): bool\n{\n $var_type = strtolower(get_debug_type($var));\n\n // Multiple at once.\n if ($types && str_contains($types[0], '|')) {\n $types = explode('|', $types[0]);\n\n // A little bit faster than foreach().\n if (in_array($var_type, $types, true)) {\n return true;\n }\n }\n\n foreach ($types as $type) {\n $type = strtolower($type);\n if (match ($type) {\n // Any/mixed.\n 'any', 'mixed' => 1,\n\n // Sugar stuff.\n 'list', 'number', 'image', 'stream', 'iterator', 'enum'\n => ('is_' . $type)($var),\n\n // Primitive & internal stuff.\n 'int', 'float', 'string', 'bool', 'array', 'object', 'null',\n 'numeric', 'scalar', 'resource', 'iterable', 'callable', 'countable',\n => ('is_' . $type)($var),\n\n // All others.\n default => ($var_type === $type) || ($var instanceof $type)\n }) {\n return true;\n }\n }\n return false;\n}", "public function resolveExpressionNodeToType(Node\\Expr $expr): Type\n {\n if ($expr instanceof Node\\Expr\\Variable || $expr instanceof Node\\Expr\\ClosureUse) {\n if ($expr instanceof Node\\Expr\\Variable && $expr->name === 'this') {\n $classNode = getClosestNode($expr, Node\\Stmt\\Class_::class);\n if ($classNode) {\n return self::resolveClassNameToType($classNode->namespacedName);\n }\n return new Types\\This;\n }\n // Find variable definition\n $defNode = $this->resolveVariableToNode($expr);\n if ($defNode instanceof Node\\Expr) {\n return $this->resolveExpressionNodeToType($defNode);\n }\n if ($defNode instanceof Node\\Param) {\n return $this->getTypeFromNode($defNode);\n }\n }\n if ($expr instanceof Node\\Expr\\FuncCall) {\n // Find the function definition\n if ($expr->name instanceof Node\\Expr) {\n // Cannot get type for dynamic function call\n return new Types\\Mixed;\n }\n $fqn = (string)($expr->getAttribute('namespacedName') ?? $expr->name);\n $def = $this->index->getDefinition($fqn, true);\n if ($def !== null) {\n return $def->type;\n }\n }\n if ($expr instanceof Node\\Expr\\ConstFetch) {\n if (strtolower((string)$expr->name) === 'true' || strtolower((string)$expr->name) === 'false') {\n return new Types\\Boolean;\n }\n // Resolve constant\n $fqn = (string)($expr->getAttribute('namespacedName') ?? $expr->name);\n $def = $this->index->getDefinition($fqn, true);\n if ($def !== null) {\n return $def->type;\n }\n }\n if ($expr instanceof Node\\Expr\\MethodCall || $expr instanceof Node\\Expr\\PropertyFetch) {\n if ($expr->name instanceof Node\\Expr) {\n return new Types\\Mixed;\n }\n // Resolve object\n $objType = $this->resolveExpressionNodeToType($expr->var);\n if (!($objType instanceof Types\\Compound)) {\n $objType = new Types\\Compound([$objType]);\n }\n for ($i = 0; $t = $objType->get($i); $i++) {\n if ($t instanceof Types\\This) {\n $classFqn = self::getContainingClassFqn($expr);\n if ($classFqn === null) {\n return new Types\\Mixed;\n }\n } else if (!($t instanceof Types\\Object_) || $t->getFqsen() === null) {\n return new Types\\Mixed;\n } else {\n $classFqn = substr((string)$t->getFqsen(), 1);\n }\n $fqn = $classFqn . '->' . $expr->name;\n if ($expr instanceof Node\\Expr\\MethodCall) {\n $fqn .= '()';\n }\n if ($def = $this->index->getDefinition($fqn)) {\n if ($def->type instanceof Types\\This || $def->type instanceof Types\\Self_) {\n return $this->resolveExpressionNodeToType($expr->var);\n }\n return $def->type;\n }\n }\n }\n if (\n $expr instanceof Node\\Expr\\StaticCall\n || $expr instanceof Node\\Expr\\StaticPropertyFetch\n || $expr instanceof Node\\Expr\\ClassConstFetch\n ) {\n $classType = self::resolveClassNameToType($expr->class);\n if (!($classType instanceof Types\\Object_) || $classType->getFqsen() === null || $expr->name instanceof Node\\Expr) {\n return new Types\\Mixed;\n }\n $fqn = substr((string)$classType->getFqsen(), 1) . '::';\n if ($expr instanceof Node\\Expr\\StaticPropertyFetch) {\n $fqn .= '$';\n }\n $fqn .= $expr->name;\n if ($expr instanceof Node\\Expr\\StaticCall) {\n $fqn .= '()';\n }\n $def = $this->index->getDefinition($fqn);\n if ($def === null) {\n return new Types\\Mixed;\n }\n return $def->type;\n }\n if ($expr instanceof Node\\Expr\\New_) {\n return self::resolveClassNameToType($expr->class);\n }\n if ($expr instanceof Node\\Expr\\Clone_ || $expr instanceof Node\\Expr\\Assign) {\n return $this->resolveExpressionNodeToType($expr->expr);\n }\n if ($expr instanceof Node\\Expr\\Ternary) {\n // ?:\n if ($expr->if === null) {\n return new Types\\Compound([\n $this->resolveExpressionNodeToType($expr->cond),\n $this->resolveExpressionNodeToType($expr->else)\n ]);\n }\n // Ternary is a compound of the two possible values\n return new Types\\Compound([\n $this->resolveExpressionNodeToType($expr->if),\n $this->resolveExpressionNodeToType($expr->else)\n ]);\n }\n if ($expr instanceof Node\\Expr\\BinaryOp\\Coalesce) {\n // ?? operator\n return new Types\\Compound([\n $this->resolveExpressionNodeToType($expr->left),\n $this->resolveExpressionNodeToType($expr->right)\n ]);\n }\n if (\n $expr instanceof Node\\Expr\\InstanceOf_\n || $expr instanceof Node\\Expr\\Cast\\Bool_\n || $expr instanceof Node\\Expr\\BooleanNot\n || $expr instanceof Node\\Expr\\Empty_\n || $expr instanceof Node\\Expr\\Isset_\n || $expr instanceof Node\\Expr\\BinaryOp\\Greater\n || $expr instanceof Node\\Expr\\BinaryOp\\GreaterOrEqual\n || $expr instanceof Node\\Expr\\BinaryOp\\Smaller\n || $expr instanceof Node\\Expr\\BinaryOp\\SmallerOrEqual\n || $expr instanceof Node\\Expr\\BinaryOp\\BooleanAnd\n || $expr instanceof Node\\Expr\\BinaryOp\\BooleanOr\n || $expr instanceof Node\\Expr\\BinaryOp\\LogicalAnd\n || $expr instanceof Node\\Expr\\BinaryOp\\LogicalOr\n || $expr instanceof Node\\Expr\\BinaryOp\\LogicalXor\n || $expr instanceof Node\\Expr\\BinaryOp\\NotEqual\n || $expr instanceof Node\\Expr\\BinaryOp\\NotIdentical\n ) {\n return new Types\\Boolean;\n }\n if (\n $expr instanceof Node\\Expr\\Concat\n || $expr instanceof Node\\Expr\\Cast\\String_\n || $expr instanceof Node\\Expr\\BinaryOp\\Concat\n || $expr instanceof Node\\Expr\\AssignOp\\Concat\n || $expr instanceof Node\\Expr\\Scalar\\String_\n || $expr instanceof Node\\Expr\\Scalar\\Encapsed\n || $expr instanceof Node\\Expr\\Scalar\\EncapsedStringPart\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Class_\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Dir\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Function_\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Method\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Namespace_\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Trait_\n ) {\n return new Types\\String_;\n }\n if (\n $expr instanceof Node\\Expr\\BinaryOp\\Minus\n || $expr instanceof Node\\Expr\\BinaryOp\\Plus\n || $expr instanceof Node\\Expr\\BinaryOp\\Pow\n || $expr instanceof Node\\Expr\\BinaryOp\\Mul\n || $expr instanceof Node\\Expr\\AssignOp\\Minus\n || $expr instanceof Node\\Expr\\AssignOp\\Plus\n || $expr instanceof Node\\Expr\\AssignOp\\Pow\n || $expr instanceof Node\\Expr\\AssignOp\\Mul\n ) {\n if (\n $this->resolveExpressionNodeToType($expr->left) instanceof Types\\Integer_\n && $this->resolveExpressionNodeToType($expr->right) instanceof Types\\Integer_\n ) {\n return new Types\\Integer;\n }\n return new Types\\Float_;\n }\n if (\n $expr instanceof Node\\Scalar\\LNumber\n || $expr instanceof Node\\Expr\\Cast\\Int_\n || $expr instanceof Node\\Expr\\Scalar\\MagicConst\\Line\n || $expr instanceof Node\\Expr\\BinaryOp\\Spaceship\n || $expr instanceof Node\\Expr\\BinaryOp\\BitwiseAnd\n || $expr instanceof Node\\Expr\\BinaryOp\\BitwiseOr\n || $expr instanceof Node\\Expr\\BinaryOp\\BitwiseXor\n ) {\n return new Types\\Integer;\n }\n if (\n $expr instanceof Node\\Expr\\BinaryOp\\Div\n || $expr instanceof Node\\Expr\\DNumber\n || $expr instanceof Node\\Expr\\Cast\\Double\n ) {\n return new Types\\Float_;\n }\n if ($expr instanceof Node\\Expr\\Array_) {\n $valueTypes = [];\n $keyTypes = [];\n foreach ($expr->items as $item) {\n $valueTypes[] = $this->resolveExpressionNodeToType($item->value);\n $keyTypes[] = $item->key ? $this->resolveExpressionNodeToType($item->key) : new Types\\Integer;\n }\n $valueTypes = array_unique($keyTypes);\n $keyTypes = array_unique($keyTypes);\n if (empty($valueTypes)) {\n $valueType = null;\n } else if (count($valueTypes) === 1) {\n $valueType = $valueTypes[0];\n } else {\n $valueType = new Types\\Compound($valueTypes);\n }\n if (empty($keyTypes)) {\n $keyType = null;\n } else if (count($keyTypes) === 1) {\n $keyType = $keyTypes[0];\n } else {\n $keyType = new Types\\Compound($keyTypes);\n }\n return new Types\\Array_($valueType, $keyType);\n }\n if ($expr instanceof Node\\Expr\\ArrayDimFetch) {\n $varType = $this->resolveExpressionNodeToType($expr->var);\n if (!($varType instanceof Types\\Array_)) {\n return new Types\\Mixed;\n }\n return $varType->getValueType();\n }\n if ($expr instanceof Node\\Expr\\Include_) {\n // TODO: resolve path to PhpDocument and find return statement\n return new Types\\Mixed;\n }\n return new Types\\Mixed;\n }", "protected function getPhpType($type)\n {\n static $typeMap = [\n // abstract type => php type\n 'smallint' => 'integer',\n 'integer' => 'integer',\n 'bigint' => 'integer',\n 'boolean' => 'boolean',\n 'float' => 'double',\n 'binary' => 'resource',\n ];\n if (isset($typeMap[$type])) {\n return $typeMap[$type];\n } else {\n return 'string';\n }\n }", "public function getType(): ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null\n {\n $type = $this->node->type;\n assert($type instanceof Node\\Identifier || $type instanceof Node\\Name || $type instanceof Node\\NullableType || $type instanceof Node\\UnionType || $type instanceof Node\\IntersectionType || $type === null);\n\n if ($type === null) {\n return null;\n }\n\n return ReflectionType::createFromNode($this->reflector, $this, $type);\n }", "function variant_get_type($variant) {}", "private function GetType($value){\n\t\tswitch (true) {\n\t\t\tcase is_int($value):\n\t\t\t\t$type = PDO::PARAM_INT;\n\t\t\t\tbreak;\n\t\t\tcase is_bool($value):\n\t\t\t\t$type = PDO::PARAM_BOOL;\n\t\t\t\tbreak;\n\t\t\tcase is_null($value):\n\t\t\t\t$type = PDO::PARAM_NULL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$type = PDO::PARAM_STR;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $type;\n\t}", "private function checkType($var) {\n\t\tif(gettype($var) == \"string\") {\n\t\t\treturn \"'$var'\";\n\t\t}\n\t\treturn $var;\n\t}", "public function getType(): TypeDefinition;", "function _get_type() {\n\t\treturn $this->type();\n\n\t}", "public static function getType($type)\n {\n if ( ! isset(self::$typesMap[$type])) {\n throw new \\InvalidArgumentException(sprintf('Invalid type specified \"%s\".', $type));\n }\n if ( ! isset(self::$types[$type])) {\n $className = self::$typesMap[$type];\n self::$types[$type] = new $className;\n }\n return self::$types[$type];\n }", "protected function type($type)\n {\n return $this->builder->where('type', $type);\n }", "public function getType($type){\n\t\tif(!isset($type))return $this->getAllTypes();\n\t\tif(is_string($type)){\n\t\t\t$query = Queries::gettypebyname($type);\n\t\t}else{\n\t\t\t$query = Queries::gettypebyid($type);\n\t\t}\n\t\t$types = $this->query($query);\n\t\tif(count($types)==0)return false;\n\t\treturn $types[0];\n\t}", "function getType() ;", "function getType() ;", "function getType() ;", "public function getType();", "public function getType();", "public function getType();", "public function getType();" ]
[ "0.66420007", "0.65254605", "0.60373753", "0.59743303", "0.5790302", "0.57358354", "0.5718934", "0.57053953", "0.5703616", "0.56685007", "0.56590813", "0.5626555", "0.5605969", "0.5592505", "0.5573377", "0.5568781", "0.5567719", "0.556089", "0.5553336", "0.5528171", "0.55191934", "0.55017996", "0.5487608", "0.547363", "0.54709476", "0.5460391", "0.54475325", "0.540383", "0.5398762", "0.5387497", "0.5377188", "0.53634024", "0.53634024", "0.53634024", "0.53634024", "0.53634024", "0.53634024", "0.5356653", "0.53514665", "0.5329477", "0.5318217", "0.5317823", "0.53169394", "0.53169394", "0.53169394", "0.53169394", "0.53169394", "0.53023267", "0.53014797", "0.5300284", "0.5298647", "0.52586675", "0.52535397", "0.5250128", "0.52360785", "0.52323365", "0.5218499", "0.5218499", "0.52115846", "0.5211305", "0.5194947", "0.5188684", "0.5184455", "0.51837826", "0.5177984", "0.5165624", "0.5161756", "0.5159454", "0.5145875", "0.5144175", "0.5135813", "0.5135813", "0.5135665", "0.51167643", "0.51167643", "0.51167643", "0.51167643", "0.51135945", "0.51098645", "0.5098051", "0.50950724", "0.5094269", "0.508579", "0.50773865", "0.50756806", "0.50750625", "0.5069376", "0.50640005", "0.5061033", "0.50483507", "0.50455105", "0.50349045", "0.50219387", "0.50217634", "0.50217193", "0.5021151", "0.5011822", "0.5011822", "0.5011822", "0.5011822" ]
0.68385893
0
Adds a custom type to the type map.
public static function addType($name, $className) { if (isset(self::$typesMap[$name])) { throw MappingException::typeExists($name); } self::$typesMap[$name] = $className; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addType($type);", "abstract public function register_type();", "public static function addType($name)\n {\n if (is_null(self::$registry)) {\n self::registerType(new $name());\n return;\n }\n self::registerType(new $name(self::$registry));\n }", "public function addType(Type $type, $name = '')\n {\n if (!$name) {\n $name = (string)$type;\n }\n\n $this->types[$name] = $type;\n }", "public function registerCustomTypes()\n {\n // enum\n DbalService::getSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');\n }", "public function AddType($type) {\n $this->Types[] = $type;\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public function add_custom_post_types() {\n //\n }", "public function registerCustomPostType()\n {\n if (!post_type_exists($this->slug)) {\n register_post_type($this->slug, $this->arguments);\n }\n }", "public function register_object_type(string $type_name, array $config)\n {\n }", "public function add(string $key, mixed $value, mixed $type = null): void;", "public function register_type(string $type_name, $config)\n {\n }", "public function add_post_type( $name ) {\n\t\t$this->post_types[] = $name;\n\t}", "function register_post_types(){\n\t\t\trequire('lib/custom-types.php');\n\t\t}", "function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}", "public static function registerType($name, $class)\n {\n self::$typesMap[$name] = $class;\n }", "private static function registerType(IType $type)\n {\n self::$types[$type->getName()] = $type;\n }", "function registerFieldType($name, $type);", "public function add($key, \\SetaPDF_Core_Type_AbstractType $value) {}", "public function add(string $type): void\n {\n /**\n * Don't add in case of an invalid type or in case the type has already\n * been added.\n */\n if (in_array($type, self::$allowedTypes, true)\n && !in_array($type, $this->types, true)\n ) {\n $this->types[] = $type;\n }\n }", "public function addType($type) {\n $this->type[] = $type;\n return $this;\n }", "public static function registerType(string $name, string $class): void\n {\n self::$typesMap[$name] = $class;\n }", "public function addCustomType($option, $type)\n {\n $this->isTypeAvailable($type, true);\n if (isset($this->typeCustomList[$option])) {\n throw new \\InvalidArgumentException('There is already a custom type for this option configured');\n }\n $this->typeCustomList[$option] = $type;\n return $this;\n }", "public function add(TypeInterface $type) : TypeInterface;", "public function flo_reg_custom_post_type(){\n\t\t// call the methods that are registering the post types\n\t\t$this->flo_reg_forms_post_type();\n\t\t$this->flo_reg_entrie_post_type();\n\n\t\t$this->flo_register_form_entries_taxonomy();\n\t}", "public function register_custom_post() {\n foreach ( $this->posts as $key => $value ) {\n register_post_type( $key, $value );\n }\n }", "public function add_field($name, $type)\n {\n $this->fields[$name] = $type;\n }", "private function installCustomPostTypesFromPHP()\n {\n if (! file_exists($this->rootPath.'/config/types.php')) {\n return;\n }\n\n $types = include $this->rootPath.'/config/types.php';\n foreach ($types as $cpt => $details) {\n register_post_type($cpt, $details);\n }\n }", "public function addType($type)\n {\n if(is_string($type))\n $this->types[] = $type;\n else\n throw new \\InvalidArgumentException('The geocoder result type must be a string value.');\n }", "private function addFieldType($type,$hasOptions){\n $this->hasOptions[$type]=$hasOptions;\n }", "function isf_create_custom_post_types() {\n\n\t// Maps.\n\tregister_post_type(\n\t\tMAP_POST_TYPE,\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => 'Maps',\n\t\t\t\t'singular_name' => 'Map',\n\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t'add_new_item' => 'Add New Map',\n\t\t\t\t'edit_item' => 'Edit Map',\n\t\t\t\t'new_item' => 'New Map',\n\t\t\t\t'view_item' => 'View Map',\n\t\t\t\t'view_items' => 'View Maps',\n\t\t\t\t'search_items' => 'Search Maps',\n\t\t\t\t'not_found' => 'No Maps Found',\n\t\t\t\t'not_found_in_trash' => 'No Maps found in Trash',\n\t\t\t\t'all_items' => 'All Maps',\n\t\t\t\t'archives' => 'Map Archives',\n\t\t\t\t'attributes' => 'Map Attributes',\n\t\t\t\t'insert_into_item' => 'Insert into Map',\n\t\t\t\t'uploaded_to_this_item' => 'Uploaded to this Map',\n\t\t\t),\n\t\t\t'public' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'menu_icon' => 'dashicons-location-alt',\n\t\t\t'supports' => array( 'title' ),\n\t\t)\n\t);\n\n\t// Map Groups.\n\tregister_post_type(\n\t\tMAP_GROUP_POST_TYPE,\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => 'Map Groups',\n\t\t\t\t'singular_name' => 'Map Group',\n\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t'add_new_item' => 'Add New Map Group',\n\t\t\t\t'edit_item' => 'Edit Map Group',\n\t\t\t\t'new_item' => 'New Map Group',\n\t\t\t\t'view_item' => 'View Map Group',\n\t\t\t\t'view_items' => 'View Map Groups',\n\t\t\t\t'search_items' => 'Search Map Groups',\n\t\t\t\t'not_found' => 'No Map Groups Found',\n\t\t\t\t'not_found_in_trash' => 'No Map Groups found in Trash',\n\t\t\t\t'all_items' => 'All Map Groups',\n\t\t\t\t'archives' => 'Map Group Archives',\n\t\t\t\t'attributes' => 'Map Group Attributes',\n\t\t\t\t'insert_into_item' => 'Insert into Map Group',\n\t\t\t\t'uploaded_to_this_item' => 'Uploaded to this Map Group',\n\t\t\t),\n\t\t\t'public' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'menu_icon' => 'dashicons-arrow-right',\n\t\t\t'supports' => array( 'title' ),\n\t\t)\n\t);\n\n\t// Proposal Eras.\n\tregister_post_type(\n\t\tPROPOSAL_ERA_POST_TYPE,\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => 'Proposal Eras',\n\t\t\t\t'singular_name' => 'Proposal Era',\n\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t'add_new_item' => 'Add New Proposal Era',\n\t\t\t\t'edit_item' => 'Edit Proposal Era',\n\t\t\t\t'new_item' => 'New Proposal Era',\n\t\t\t\t'view_item' => 'View Proposal Era',\n\t\t\t\t'view_items' => 'View Proposal Eras',\n\t\t\t\t'search_items' => 'Search Proposal Eras',\n\t\t\t\t'not_found' => 'No Proposal Eras Found',\n\t\t\t\t'not_found_in_trash' => 'No Proposal Eras found in Trash',\n\t\t\t\t'all_items' => 'All Proposal Eras',\n\t\t\t\t'archives' => 'Proposal Era Archives',\n\t\t\t\t'attributes' => 'Proposal Era Attributes',\n\t\t\t\t'insert_into_item' => 'Insert into Proposal Era',\n\t\t\t\t'uploaded_to_this_item' => 'Uploaded to this Proposal Era',\n\t\t\t),\n\t\t\t'public' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'menu_icon' => 'dashicons-menu-alt',\n\t\t\t'supports' => array( 'title' ),\n\t\t)\n\t);\n\n\t// Narratives.\n\tregister_post_type(\n\t\tNARRATIVE_POST_TYPE,\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => 'Narratives',\n\t\t\t\t'singular_name' => 'Narrative',\n\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t'add_new_item' => 'Add New Narrative',\n\t\t\t\t'edit_item' => 'Edit Narrative',\n\t\t\t\t'new_item' => 'New Narrative',\n\t\t\t\t'view_item' => 'View Narrative',\n\t\t\t\t'view_items' => 'View Narratives',\n\t\t\t\t'search_items' => 'Search Narratives',\n\t\t\t\t'not_found' => 'No Narratives Found',\n\t\t\t\t'not_found_in_trash' => 'No Narratives found in Trash',\n\t\t\t\t'all_items' => 'All Narratives',\n\t\t\t\t'archives' => 'Narrative Archives',\n\t\t\t\t'attributes' => 'Narrative Attributes',\n\t\t\t\t'insert_into_item' => 'Insert into Narrative',\n\t\t\t\t'uploaded_to_this_item' => 'Uploaded to this Narrative',\n\t\t\t),\n\t\t\t'public' => true,\n\t\t\t'menu_icon' => 'dashicons-book-alt',\n\t\t\t'rewrite' => array( 'slug' => 'narratives' ),\n\t\t)\n\t);\n\n\t// Feedback.\n\tregister_post_type(\n\t\tFEEDBACK_POST_TYPE,\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => 'Feedback',\n\t\t\t\t'singular_name' => 'Feedback',\n\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t'add_new_item' => 'Add New Feedback',\n\t\t\t\t'edit_item' => 'Feedback',\n\t\t\t\t'new_item' => 'New Feedback',\n\t\t\t\t'view_item' => 'View Feedback',\n\t\t\t\t'view_items' => 'View Feedback',\n\t\t\t\t'search_items' => 'Search Feedback',\n\t\t\t\t'not_found' => 'No Feedback Found',\n\t\t\t\t'not_found_in_trash' => 'No Feedback found in Trash',\n\t\t\t\t'all_items' => 'All Feedback',\n\t\t\t\t'archives' => 'Feedback Archives',\n\t\t\t\t'attributes' => 'Feedback Attributes',\n\t\t\t\t'insert_into_item' => 'Insert into Feedback',\n\t\t\t\t'uploaded_to_this_item' => 'Uploaded to this Feedback',\n\t\t\t),\n\t\t\t'public' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'menu_icon' => 'dashicons-testimonial',\n\t\t\t'supports' => false,\n\t\t\t'map_meta_cap' => true,\n\t\t\t'capabilities' => array(\n\t\t\t\t'create_posts' => false,\n\t\t\t),\n\t\t)\n\t);\n\n}", "public static function register_type() {\n\t\tregister_graphql_object_type(\n\t\t\t'PostTypeLabelDetails',\n\t\t\t[\n\t\t\t\t'description' => __( 'Details for labels of the PostType', 'wp-graphql' ),\n\t\t\t\t'fields' => [\n\t\t\t\t\t'name' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'General name for the post type, usually plural.', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'singularName' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Name for one object of this post type.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->singular_name ) ? $labels->singular_name : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'addNew' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Default is ‘Add New’ for both hierarchical and non-hierarchical types.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->add_new ) ? $labels->add_new : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'addNewItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for adding a new singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->add_new_item ) ? $labels->add_new_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'editItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for editing a singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->edit_item ) ? $labels->edit_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'newItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the new item page title.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->new_item ) ? $labels->new_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'viewItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for viewing a singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->view_item ) ? $labels->view_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'viewItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for viewing post type archives.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->view_items ) ? $labels->view_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'searchItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for searching plural items.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->search_items ) ? $labels->search_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'notFound' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used when no items are found.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->not_found ) ? $labels->not_found : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'notFoundInTrash' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used when no items are in the trash.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->not_found_in_trash ) ? $labels->not_found_in_trash : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'parentItemColon' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used to prefix parents of hierarchical items.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->parent_item_colon ) ? $labels->parent_item_colon : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'allItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label to signify all items in a submenu link.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->all_items ) ? $labels->all_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'archives' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for archives in nav menus', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'attributes' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the attributes meta box.', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'insertIntoItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the media frame button.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->insert_into_item ) ? $labels->insert_into_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'uploadedToThisItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the media frame filter.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->uploaded_to_this_item ) ? $labels->uploaded_to_this_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'featuredImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the Featured Image meta box title.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->featured_image ) ? $labels->featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'setFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for setting the featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->set_featured_image ) ? $labels->set_featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'removeFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for removing the featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->remove_featured_image ) ? $labels->remove_featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'useFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label in the media frame for using a featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->use_featured_item ) ? $labels->use_featured_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'menuName' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the menu name.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->menu_name ) ? $labels->menu_name : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'filterItemsList' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table views hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->filter_items_list ) ? $labels->filter_items_list : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'itemsListNavigation' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table pagination hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->items_list_navigation ) ? $labels->items_list_navigation : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'itemsList' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->items_list ) ? $labels->items_list : null;\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\n\t}", "function tower_custom_post_types() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n register_post_type($key, $custom_type['config']);\n }\n}", "public function add($userid, $type)\r\n {\r\n $getInfo = $this->get($userid);\r\n\r\n $getInfo[$type] = $type;\r\n\r\n $this->update($userid, $getInfo);\r\n }", "public static function addType(string $name, string $className): void\n {\n if (isset(self::$typesMap[$name])) {\n throw MappingException::typeExists($name);\n }\n\n self::$typesMap[$name] = $className;\n }", "private function initializeCustomTypes()\n {\n $property = new \\ReflectionProperty('Fridge\\DBAL\\Platform\\AbstractPlatform', 'customTypes');\n $property->setAccessible(true);\n\n $property->setValue($this->platform, array(Type::INTEGER));\n }", "public function add_pod_type( $data ) {\n\n\t\t$data['pod'] = __( 'Advanced Content Type (separate from WP, blank slate, in its own table)', 'pods' );\n\n\t\treturn $data;\n\t}", "public function register_post_type() {\n\t\tadd_action( 'init', array( $this, 'post_registration_callback' ), 0, 0 );\n\t}", "public function registerType(IType $type): void\n {\n $schemaName = $type->getSchemaName();\n $typeName = $type->getName();\n\n if (!isset($this->types[$schemaName])) {\n $this->types[$schemaName] = [];\n }\n $this->types[$schemaName][$typeName] = $type;\n }", "public function add_question_type() {\n\t\tregister_taxonomy(\n\t\t\t'question_type',\n\t\t\t'questions',\n\t\t\tarray(\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'label' => __( 'Question type', 'lingo' ),\n\t\t\t\t'singular_name' => __( 'Question type level', 'lingo' ),\n\t\t\t)\n\t\t);\n\n\t}", "public static function customTypeDeclaration() {\n // Already declare by Wordpress Core\n }", "function theme_custom_post_type() {\n\tregister_post_type( 'custom_type',\n\n\t\t// Array with all the options for the custom post type\n\t\tarray( 'labels' => array(\n\t\t\t'name'\t\t\t\t\t=> __( 'Custom Types' ), // Name of the custom post type group\n\t\t\t'singular_name'\t\t\t=> __( 'Custom Post' ), // Name of the custom post type singular\n\t\t\t'all_items'\t\t\t\t=> __( 'All Custom Posts' ),\n\t\t\t'add_new' \t\t\t\t=> __( 'Add New' ),\n\t\t\t'add_new_item' \t\t\t=> __( 'Add New Custom Type' ),\n\t\t\t'edit'\t\t\t\t\t=> __( 'Edit' ),\n\t\t\t'edit_item'\t\t\t\t=> __( 'Edit Post Types' ),\n\t\t\t'new_item'\t\t\t\t=> __( 'New Post Type' ),\n\t\t\t'view_item'\t\t\t\t=> __( 'View Post Type' ),\n\t\t\t'search_items'\t\t\t=> __( 'Search Post Type' ),\n\t\t\t'not_found'\t\t\t\t=> __( 'Nothing found in the Database.' ),\n\t\t\t'not_found_in_trash'\t=> __( 'Nothing found in Trash' ),\n\t\t\t'parent_item_colon' \t=> ''\n\t\t\t),\n\n\t\t\t'description' \t\t\t=> __( 'This is the example custom post type' ), // Custom post type description\n\t\t\t'public' \t\t\t\t=> true,\n\t\t\t'publicly_queryable' \t=> true,\n\t\t\t'exclude_from_search' \t=> false,\n\t\t\t'show_ui' \t\t\t\t=> true,\n\t\t\t'query_var' \t\t\t=> true,\n\t\t\t'menu_position' \t\t=> 5, // The order the custom post type appears on the admin menu\n\t\t\t// 'menu_icon' \t\t\t=> get_stylesheet_directory_uri() . '/assets/images/custom-post-icon.png',\n\t\t\t'rewrite'\t\t\t\t=> array( 'slug' => 'custom_type', 'with_front' => false ), // You may specify its url slug\n\t\t\t'has_archive' \t\t\t=> 'custom_type', // You mary rename the slug here\n\t\t\t'capability_type' \t\t=> 'post',\n\t\t\t'hierarchical' \t\t\t=> false,\n\n\t\t\t// Enable post editor support\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'author',\n\t\t\t\t'thumbnail',\n\t\t\t\t'excerpt',\n\t\t\t\t'trackbacks',\n\t\t\t\t'custom-fields',\n\t\t\t\t'comments',\n\t\t\t\t'revisions',\n\t\t\t\t'sticky'\n\t\t\t)\n\t\t)\n\t);\n\n\t// This adds your post categories to your custom post type\n\tregister_taxonomy_for_object_type( 'category', 'custom_type' );\n\n\t// This adds your post tags to your custom post type\n\tregister_taxonomy_for_object_type( 'post_tag', 'custom_type' );\n\n}", "private function installCustomPostTypesFromJSON()\n {\n if (! file_exists($this->rootPath.'/config/types.json')) {\n return;\n }\n\n $types = JSONParser::parse(file_get_contents($this->rootPath.'/config/types.json'));\n\n foreach ($types as $cpt => $details) {\n register_post_type($cpt, $details);\n }\n }", "public function register_input_type(string $type_name, array $config)\n {\n }", "public function customPostType()\n {\n\n if (empty($this->custom_post_types)) {\n return;\n }\n\n foreach ($this->custom_post_types as $post_type) {\n register_post_type(\n $post_type['post_type'],\n [\n 'labels' => [\n 'name' => __($post_type['name'], 'vrcoder'),\n 'singular_name' => __($post_type['singular_name'], 'vrcoder'),\n 'menu_name' => __($post_type['name'], 'vrcoder'),\n 'name_admin_bar' => __($post_type['singular_name'], 'vrcoder'),\n 'archives' => __($post_type['singular_name'] . ' Archives', 'vrcoder'),\n 'attributes' => __($post_type['singular_name'] . ' Attributes', 'vrcoder'), \n 'parent_item_colon' => __('Parent ' . $post_type['singular_name'], 'vrcoder'),\n 'all_items' => __('All ' . $post_type['name'], 'vrcoder'),\n 'add_new_item' => __('Add new ' . $post_type['singular_name'], 'vrcoder'),\n 'add_new' => __('Add new', 'vrcoder'),\n 'new_item' => __('New ' . $post_type['singular_name'], 'vrcoder'),\n 'edit_item' => __('Edit ' . $post_type['singular_name'], 'vrcoder'),\n 'update_item' => __('Update' . $post_type['singular_name'], 'vrcoder'),\n 'view_item' => __('View' . $post_type['singular_name'], 'vrcoder'),\n 'view_items' => __('View' . $post_type['name'], 'vrcoder'),\n 'search_items' => __('Search' . $post_type['name'], 'vrcoder'),\n 'not_found' => __('No' . $post_type['singular_name'] . ' Found', 'vrcoder'),\n 'not_found_in_trash' => __('No' . $post_type['singular_name'] . ' Found in Trash', 'vrcoder'),\n 'featured_image' => __('Featured Image', 'vrcoder'),\n 'set_featured_image' => __('Set Featured Image', 'vrcoder'),\n 'remove_featured_image' => __('Remove Featured Image', 'vrcoder'),\n 'use_featured_image' => __('Use Featured Image', 'vrcoder'),\n 'insert_into_item' => __('Insert into' . $post_type['singular_name'], 'vrcoder'),\n 'uploaded_to_this_item' => __('Upload to this' . $post_type['singular_name'], 'vrcoder'),\n 'items_list' => __($post_type['name'] . ' List', 'vrcoder'),\n 'items_list_navigation' => __($post_type['name'] . ' List Navigation', 'vrcoder'),\n 'filter_items_list' => __('Filter' . $post_type['name'] . ' List', 'vrcoder'),\n ],\n 'label' => __($post_type['singular_name'], 'vrcoder'),\n 'description' => __($post_type['name'] . ' Custom Post Type', 'vrcoder'),\n 'supports' => $post_type['supports'],\n 'show_in_rest' => $post_type['show_in_rest'],\n 'taxonomies' => $post_type['taxonomies'],\n 'hierarchical' => $post_type['hierarchical'],\n 'public' => $post_type['public'],\n 'show_ui' => $post_type['show_ui'],\n 'show_in_menu' => $post_type['show_in_menu'],\n 'menu_position' => $post_type['menu_position'],\n 'show_in_admin_bar' => $post_type['show_in_admin_bar'],\n 'show_in_nav_menus' => $post_type['show_in_nav_menus'],\n 'can_export' => $post_type['can_export'],\n 'has_archive' => $post_type['has_archive'],\n 'exclude_from_search' => $post_type['exclude_from_search'],\n 'publicly_queryable' => $post_type['publicly_queryable'],\n 'capability_type' => $post_type['capability_type'],\n 'menu_icon' => $post_type['menu_icon']\n ]\n );\n }\n\n }", "function register_field_type($class)\n {\n }", "public function add_pod_type( $data ) {\n\n\t\t$data['taxonomy'] = __( 'Taxonomies (Categories, Tags, etc..)', 'pods' );\n\n\t\treturn $data;\n\t}", "public function register_custom_post_type() {\n $labels = array (\n 'name' => __('Custom', self::$plugin_obj->class_name ),\n 'singular_name' => __('item', self::$plugin_obj->class_name ),\n 'add_new' => __('new item', self::$plugin_obj->class_name ),\n 'add_new_item' => __('new item', self::$plugin_obj->class_name ),\n 'new_item' => __('new item', self::$plugin_obj->class_name ),\n 'edit' => __('edit item', self::$plugin_obj->class_name ),\n 'edit_item' => __('edit item', self::$plugin_obj->class_name ),\n 'view' => __('view item', self::$plugin_obj->class_name ),\n 'view_item' => __('view item', self::$plugin_obj->class_name ),\n 'search_items' => __('search item', self::$plugin_obj->class_name ),\n 'not_found' => __('no item found', self::$plugin_obj->class_name ),\n 'not_found_in_trash' => __('no item in trash', self::$plugin_obj->class_name ),\n 'parent' => __('parent item', self::$plugin_obj->class_name )\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => TRUE,\n 'publicly_queryable' => TRUE,\n 'show_ui' => TRUE,\n 'show_in_menu' => TRUE,\n 'query_var' => TRUE,\n 'capability_type' => 'page',\n 'has_archive' => TRUE,\n 'hierarchical' => TRUE,\n 'exclude_from_search' => FALSE,\n 'menu_position' => 100 ,\n 'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail','page-attributes'),\n 'taxonomies' => array('category','post_tag')\n );\n\n register_post_type('custom', $args);\n }", "public function installCustomPostTypes()\n {\n $this->installCustomPostTypesFromJSON();\n $this->installCustomPostTypesFromPHP();\n $this->installMultipleCustomPostTypes();\n }", "function register_graphql_object_type(string $type_name, array $config)\n {\n }", "public static function register_post_types()\n {\n if (post_type_exists('wc_custom_statuses')) {\n return;\n }\n\n do_action('wc_sa_register_post_type');\n\n register_post_type('wc_custom_statuses',\n array(\n 'labels' => array(\n 'name' => __('Order Statuses', 'woocommerce_status_actions'),\n 'singular_name' => __('Status', 'woocommerce_status_actions'),\n 'menu_name' => _x('Order Statuses', 'Admin menu name', 'woocommerce_status_actions'),\n 'add_new' => __('Add Order Status', 'woocommerce_status_actions'),\n 'add_new_item' => __('Add New Status', 'woocommerce_status_actions'),\n 'edit' => __('Edit', 'woocommerce_status_actions'),\n 'edit_item' => __('Edit Order Status', 'woocommerce_status_actions'),\n 'new_item' => __('New Status', 'woocommerce_status_actions'),\n 'view' => __('View Statuses', 'woocommerce_status_actions'),\n 'view_item' => __('View Status', 'woocommerce_status_actions'),\n 'search_items' => __('Search Statuses', 'woocommerce_status_actions'),\n 'not_found' => __('No Statuses found', 'woocommerce_status_actions'),\n 'not_found_in_trash' => __('No Statuses found in trash', 'woocommerce_status_actions'),\n 'parent' => __('Parent Status', 'woocommerce_status_actions'),\n 'featured_image' => __('Icon', 'woocommerce_status_actions'),\n 'set_featured_image' => __('Set Icon', 'woocommerce_status_actions'),\n 'remove_featured_image' => __('Remove Icon', 'woocommerce_status_actions'),\n ),\n 'description' => __('This is where you can add new Statuses that you can use in orders.', 'woocommerce_status_actions'),\n 'public' => false,\n 'show_ui' => true,\n 'capability_type' => 'post',\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'show_in_menu' => false,//current_user_can( 'manage_woocommerce' ) ? 'woocommerce' : true,\n 'hierarchical' => false,\n 'rewrite' => false,\n 'supports' => array('title'),\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true\n )\n );\n\n }", "public function addCustom($name, $type = 'text', $default_values = array()) {\n $endpoint = $this->endpoint('set') . '/custom/' . rawurlencode($name);\n $params = array();\n $params['type'] = $type;\n if ($default_values) {\n $params['default_values'] = $default_values;\n }\n $this->server->post($endpoint, $params, FALSE);\n return $this;\n }", "public function add(string $name, string $type = null, array $options = []);" ]
[ "0.7061605", "0.660396", "0.65895945", "0.6576523", "0.65252286", "0.6517424", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.6479114", "0.64089847", "0.6349697", "0.62017983", "0.6190173", "0.6180932", "0.6087603", "0.60294944", "0.60189605", "0.59990233", "0.59771544", "0.59567314", "0.59448236", "0.5916833", "0.5890545", "0.5880352", "0.58567", "0.5797216", "0.5782702", "0.5762626", "0.5737675", "0.5721326", "0.57157487", "0.564786", "0.55863005", "0.558448", "0.55700946", "0.5506014", "0.55026734", "0.5464514", "0.5460762", "0.54602075", "0.5458833", "0.54437506", "0.5437464", "0.5423769", "0.54206485", "0.5418224", "0.54153657", "0.539399", "0.53936046", "0.5389471", "0.5384659", "0.5365122", "0.5360954", "0.53609204", "0.5360334" ]
0.5550448
80
Checks if exists support for a type.
public static function hasType($name) { return isset(self::$typesMap[$name]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function supports(string $type): bool;", "public function supports($type);", "public function isTypeSupported(string $type) : bool;", "protected function _supports($type)\n {\n return in_array($type, $this->supports);\n }", "public function hasProvider($type);", "public function type_exists($type)\n\t{\n\t\t$module_path=$this->_ci->config->item('module_path');\n\t\treturn file_exists($module_path.'/'.$type);\n\t}", "public function has($type);", "public static function existsProvider($type)\n {\n return in_array($type, static::getList());\n }", "public function hasComponent(string $type): bool;", "public static function isTypeSupported(int $type): bool\n {\n return in_array($type, self::SUPPORTED_TYPES);\n }", "public static function hasType($type)\n {\n \t$types = array_keys(self::getTypes());\n return false !== in_array($type, $types);\n }", "public function hasType(){\n return $this->_has(9);\n }", "final public function isSupported($type) {\n\t\tif (NULL == ($backend = $this->getBackendByType($type)))\n\t\t\treturn FALSE;\n\t\treturn TRUE;\n\t}", "public function has($type = null) {}", "protected function is_types_active() {\n\t\treturn class_exists( 'Types_Main' );\n\t}", "static public function isSupported();", "public function hasType()\n {\n return isset($this->type);\n }", "public function hasType(){\r\n return $this->_has(7);\r\n }", "public static function isSupported(): bool;", "public function hasType(){\r\n return $this->_has(1);\r\n }", "public function isSupported();", "public function isSupported();", "public function hasType($name);", "public static function exists(string $type): bool\n {\n $types = self::types();\n\n return isset($types[$type]) || isset($types[self::prefixed($type)]);\n }", "public function has(string $type): bool\n {\n return\n isset($this->store[$type]) ||\n isset($this->bindings[$type]) ||\n isset($this->aliases[$type]) ||\n isset($this->providers[$type]);\n }", "public function hasType(string $name): bool;", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType() {\n return $this->_has(3);\n }", "public function hasType(){\n return $this->_has(4);\n }", "function atkexists($type, $name)\n{\n\treturn file_exists(atkgetinclude($type, $name));\n}", "public function hasType() {\n return $this->_has(2);\n }", "protected function checkGdLibFreeTypeSupport() {}", "public function hasType(){\n return !empty($this->type);\n }", "public function isSupported(): bool;", "public function hasType(){\n return $this->_has(2);\n }", "public function hasType($type) {\n return in_array($type, (array)$this->getType());\n }", "abstract function isSupported(): bool;", "protected static function _isSupported($type, $throw = true)\n {\n if( empty(self::getSupport()->$type) )\n {\n if( $throw )\n {\n throw new Engine_Image_Adapter_Exception(sprintf('Image type %s is not supported', $type));\n }\n return false;\n }\n return true;\n }", "public function exists(string $id, string $type = self::DEFINITION_DEFAULT): bool\n {\n return array_key_exists($id, $this->definitions[$type]);\n }", "public function supports($package_type)\n {\n return in_array($package_type, self::SUPPORTED_TYPES);\n }", "public function hasType(){\n return $this->_has(5);\n }", "public function hasType(){\n return $this->_has(5);\n }", "public static function isSupported()\n {\n return function_exists('finfo_open');\n }", "private static function typeExists($type, $autoload = false)\n {\n return class_exists($type, $autoload)\n || interface_exists($type, $autoload)\n || trait_exists($type, $autoload);\n }", "public function module_exists($name,$type)\n\t{\n\t\t$module_path=$this->_ci->config->item('module_path');\n\t\treturn file_exists($module_path.'/'.$type.'/'.$name.'/'.$name.'.php');\n\t}", "public function supports($resource, $type = null)\n {\n return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'php' === $type);\n }", "function checkFinanceTypeIsUsed($type_id)\n\t{\n\t\t$sql = \"SELECT * FROM ia32_finance WHERE type_id = '\".stripquotes($type_id).\"'\";\n\t\t$recs = $this->db32select($sql);\n\n\t\tif ($recs[0]) return true;\n\n\t\treturn false;\n\n\t}", "public function hasFinder(string $type): bool\n {\n $finder = 'find' . $type;\n\n return method_exists($this, $finder);\n }", "public function isSupported()\n {\n return null !== $this->name();\n }", "public static function Exists( $type )\n {\n switch ( strtolower( trim ( $type ) ) )\n {\n case \"post\":\n return ( !empty( $_POST ) ) ? true : false;\n \n break;\n \n case \"get\":\n return ( !empty( $_GET ) ) ? true : false;\n \n break;\n \n default:\n return false;\n \n break;\n }\n }", "public function supports(string $class): bool;", "public function supports($resource, $type = null)\n {\n return true;\n }", "public function checkFeatureImplemented();", "public function hasTypeIdentifier()\n {\n return count($this->get(self::TYPE_IDENTIFIER)) !== 0;\n }", "public function hasShoptype(){\n return $this->_has(19);\n }", "public static function exists($type= 'post') {\n switch($type) {\n case 'post':\n return (!empty($_POST)) ? true: false;\n break;\n case 'get':\n return (!empty($_GET)) ? true: false;\n break;\n default:\n return false;\n break;\n }\n }", "public static function supports($name)\n {\n return in_array($name, self::available());\n }", "public static function exists($type = 'post'){\r\n switch ($type){\r\n case 'post':\r\n return (!empty($_POST)) ? true : false;\r\n break;\r\n case 'get':\r\n return (!empty($_GET)) ? true : false;\r\n break;\r\n default:\r\n return false;\r\n break;\r\n }\r\n }", "public static function exists($type = 'post'){\r\r\n\t\tswitch($type){\r\r\n\t\t\tcase 'post':\r\r\n\t\t\t\treturn (!empty($_POST)) ? true : false;\r\r\n\t\t\tbreak;\r\r\n\t\t\tcase 'get':\r\r\n\t\t\t\treturn (!empty($_GET)) ? true : false;\r\r\n\t\t\tbreak;\r\r\n\t\t\tdefault:\r\r\n\t\t\t\treturn false;\r\r\n\t\t\tbreak;\r\r\n\t\t}\r\r\n\t}", "public function supported($type = false)\n {\n if ($response = $this->request('supported')) {\n if (isset($response->success) && $response->success == true) {\n switch ($type) {\n case 'extensions':\n return $response->extensions;\n break;\n case 'mime':\n return $response->types;\n break;\n default:\n return $response;\n break;\n }\n }\n }\n return false;\n }", "public function hasFortType()\n {\n return $this->FortType !== null;\n }", "public static function isElementRegistered($type)\r\n {\r\n return isset(self::$elementTypes[strtolower($type)]);\r\n }", "function acf_field_type_exists($type = '')\n{\n}", "function is_valid_type($type){\n\t\treturn in_array($type, $this->valid_types);\n\t}", "function check_exists()\n\t{\n\t\t$name = url_title($this->input->post('name'));\n\n\t\t$exists = $this->content_type_model->check_exists(\n\t\t\t'name',\n\t\t\t$name,\n\t\t\t$this->input->post('id_content_type')\n\t\t);\n\n\t\t$this->xhr_output($exists);\n\t}", "public function hasType(): bool\n {\n return $this->node->type !== null;\n }", "static function isType($type)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isType', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public static function hasApi($modname, $type)\n {\n return (bool)self::getClass($modname, $type, true);\n }", "public function hasType(string $name): bool\n {\n return isset($this->typesMap[$name]);\n }", "function registrationTypeExistsByTypeId($typeId, $schedConfId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\t\tFROM registration_types\n\t\t\t\tWHERE type_id = ?\n\t\t\t\tAND sched_conf_id = ?',\n\t\t\tarray(\n\t\t\t\t$typeId,\n\t\t\t\t$schedConfId\n\t\t\t)\n\t\t);\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "function is_class_exists($class_name, $class_type) {\n\t$file_path = ROOT . $class_type . 's/' . $class_name . '.' . $class_type . '.php';\n\tif(!file_exists($file_path)) return false;\n\n\tinclude_once $file_path;\n\treturn class_exists(true_uppercase($class_name . '_' . $class_type), false);\n}", "public function duelTypeExists(int $id) : bool {\n\t\treturn isset($this->types[$id]) and $this->types[$id] instanceof DuelType;\n\t}", "public static function isSupport($service) {\n return in_array($service, self::$serviceSupport);\n }", "public static function isSupported()\n\t{\n\t\treturn true;\n\t}", "public static function isSupported()\n\t{\n\t\treturn true;\n\t}", "function db_type_name_exists()\r\n {\r\n $toReturn = false;\r\n $dbmgr = new DB_Mgr(\"sites\");\r\n $stmt = \"SELECT count(*) FROM SI_PHONE_TYPE WHERE name = '\" . $this->name . \"'\";\r\n $dbmgr->query($stmt);\r\n $row = $dbmgr->get_a_row();\r\n $num = $row[0];\r\n return($num);\r\n }", "public function is_supported() : bool\n\t{\n\t\treturn true;\n\t}", "public function has($type) : bool\n {\n return $this->bindings->has($type);\n }", "public static function exists($type = 'post') {\n\t\tswitch ($type) {\n\t\t\tcase 'post':\n\t\t\t\treturn (!empty($_POST)) ? true : false;\n\t\t\t\tbreak;\n\t\t\tcase 'get':\n\t\t\t\treturn (!empty($_GET)) ? true : false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t}", "protected function supports($format)\n {\n return isset($this->decoders[$format]);\n }", "public function hasSourceType()\n {\n return $this->source_type !== null;\n }", "public function has($id): bool\n { \n if(class_exists($id)){\n return true;\n }else{\n return false;\n }\n }", "public function isType($type){\n \n // canary...\n if(!$this->hasType()){ return false; }//if\n \n return ($this->field_map['type'] === $type);\n \n }", "public static function exists($type = 'post'){\n\t\tswitch ($type) {\n\t\t\tcase 'post':\n\t\t\t\treturn isset($_POST) and !empty($_POST);\n\t\t\t\tbreak;\n\t\t\tcase 'get':\n\t\t\t\treturn isset($_GET) and !empty($_GET);\n\t\t\t\tbreak;\n\t\t\tcase 'files':\n\t\t\t\treturn isset($_FILES) and !empty($_FILES);\n\t\t\t\tbreak;\t\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function isSupported() {\n\t\treturn class_exists('Salt');\n\t}", "public function supportsClass($class);", "public function supportsClass($class);", "public function isAllowedType()\n {\n $extension = $this->getFile()->guessExtension();\n if (in_array($extension, $this->allowedTypes)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkSupportedFile($file_type) {\n return true;\n\n\n }", "public static function isSupported()\n {\n return true;\n }", "public static function checkForSupport()\n {\n if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) {\n self::$SUPPORT['already_checked_via_portable_utf8'] = true;\n\n // http://php.net/manual/en/book.mbstring.php\n self::$SUPPORT['mbstring'] = self::mbstring_loaded();\n\n self::$SUPPORT['mbstring_func_overload'] = self::mbstring_overloaded();\n if (self::$SUPPORT['mbstring'] === true) {\n \\mb_internal_encoding('UTF-8');\n \\mb_regex_encoding('UTF-8');\n self::$SUPPORT['mbstring_internal_encoding'] = 'UTF-8';\n }\n\n // http://php.net/manual/en/book.iconv.php\n self::$SUPPORT['iconv'] = self::iconv_loaded();\n\n // http://php.net/manual/en/book.intl.php\n self::$SUPPORT['intl'] = self::intl_loaded();\n\n // http://php.net/manual/en/class.intlchar.php\n self::$SUPPORT['intlChar'] = self::intlChar_loaded();\n\n // http://php.net/manual/en/book.ctype.php\n self::$SUPPORT['ctype'] = self::ctype_loaded();\n\n // http://php.net/manual/en/class.finfo.php\n self::$SUPPORT['finfo'] = self::finfo_loaded();\n\n // http://php.net/manual/en/book.json.php\n self::$SUPPORT['json'] = self::json_loaded();\n\n // http://php.net/manual/en/book.pcre.php\n self::$SUPPORT['pcre_utf8'] = self::pcre_utf8_support();\n\n self::$SUPPORT['symfony_polyfill_used'] = self::symfony_polyfill_used();\n if (self::$SUPPORT['symfony_polyfill_used'] === true) {\n \\mb_internal_encoding('UTF-8');\n self::$SUPPORT['mbstring_internal_encoding'] = 'UTF-8';\n }\n\n return true;\n }\n\n return null;\n }", "private function _checkClass()\n {\n if ($this->_useWithoutTypeCheck === true) {\n return true;\n }\n\n $resource = $this->_owApp->selectedResource;\n $rModel = $resource->getMemoryModel();\n\n // search with each expression using the preg matchtype\n foreach ($this->_types as $type) {\n if (isset($type['classUri'])) {\n $classUri = $type['classUri'];\n } else {\n continue;\n }\n if (\n $rModel->hasSPvalue(\n (string) $resource,\n EF_RDF_TYPE,\n $classUri\n )\n ) {\n return true;\n }\n }\n\n // type does not match to one of the expressions\n return false;\n }", "public function supports($resource, $type = null)\n {\n return preg_match('/\\.ya?ml$/i', $resource);\n }", "public static function finfo_loaded(): bool\n {\n return \\class_exists('finfo');\n }", "public static function hasType(string $name): bool\n {\n return isset(self::$typesMap[$name]);\n }", "public function supports(string $string): bool;", "public function supports($data);", "public function is_supported()\n\t{\n\t\treturn true;\n\t}" ]
[ "0.7363403", "0.72751814", "0.7238579", "0.69245565", "0.6825401", "0.6791966", "0.6691456", "0.6631053", "0.6614298", "0.6592094", "0.65544426", "0.6516708", "0.6487589", "0.6486231", "0.6422038", "0.63712806", "0.6314186", "0.63037145", "0.62580055", "0.6248626", "0.62463856", "0.62463856", "0.6219297", "0.6201271", "0.6190786", "0.61838686", "0.6155207", "0.6155207", "0.6155207", "0.61432266", "0.6136228", "0.61131936", "0.61013067", "0.60993254", "0.60949284", "0.60886335", "0.6083561", "0.60657805", "0.60058194", "0.59978724", "0.597943", "0.5967743", "0.59374154", "0.59374154", "0.59213406", "0.5909616", "0.58944774", "0.5888102", "0.58854705", "0.58585525", "0.58457017", "0.5835628", "0.58299404", "0.58272547", "0.5826744", "0.576762", "0.5764722", "0.57597476", "0.57539696", "0.57521296", "0.5745372", "0.5743401", "0.56949013", "0.5682499", "0.5679588", "0.56787604", "0.5677485", "0.56495863", "0.56485254", "0.5645111", "0.5622088", "0.5617674", "0.561072", "0.5610416", "0.5600836", "0.5597524", "0.5597524", "0.55947804", "0.5591483", "0.5584082", "0.5583969", "0.5577307", "0.5574636", "0.556575", "0.55631524", "0.5553866", "0.5551517", "0.55453587", "0.55453587", "0.5529857", "0.5525848", "0.55214787", "0.5517305", "0.5510835", "0.5507787", "0.5505933", "0.55011153", "0.5499621", "0.54980886", "0.5492755" ]
0.5684595
63
Overrides an already defined type to use a different implementation.
public static function overrideType($name, $className) { if ( ! isset(self::$typesMap[$name])) { throw MappingException::typeNotFound($name); } self::$typesMap[$name] = $className; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function register_type();", "public function setDefaultType($type);", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "abstract protected function getType();", "public function __construct()\n {\n $fullClassName = explode('\\\\', get_class($this));\n $this->type = (string)array_pop($fullClassName);\n }", "function variant_set_type($variant, $type) {}", "public function CreateOverrideTypeElement() {\n\t\treturn $this->createElement('Override');\n\t}", "abstract public function type();", "abstract public function type();", "protected abstract function getType();", "public function setType(string $type): self;", "public function setType(string $type): self;", "public function getNewType(): TypeImplementor\n {\n return $this->getNewEmptyItem(); // TODO: Change the autogenerated stub\n }", "public function setTyp( $type );", "public function getDefaultType();", "public function setType($type) {}", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "private function defaultCast(string $type, $value)\n {\n return class_exists($type) ? new $type($value) : $value;\n }", "public function setType($type){ }", "public abstract function type();", "public abstract function type();", "public function make($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public static function customTypeDeclaration() {\n // Already declare by Wordpress Core\n }", "public static function mixed(): Type\n {\n return new Type(null, 'mixed');\n }", "public function setType($type)\n{\n$this->type = $type;\n\nreturn $this;\n}", "function __construct($type) {\n\t$this->type = $type;\n\t}", "public function __construct($type)\n {\n }", "public function changeType($type) {\n\t\t\tif ($this->info->type != 'unknown') {\n\t\t\t\t$value = Core\\Convert::changeType($this->value, $type);\n\t\t\t\treturn static::factory($this->name, $value);\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "public function get_type(){ return $this->_type;}", "public function setType( $type )\n {\n }", "public function __construct($type) {\n $this->type = $type;\n }", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "function setTypeAsCustom($HTML) {\n\t\t$this->type = \"custom\";\n\t\t$this->customHTML = $HTML;\n\t}", "public function setup_types()\n {\n }", "private function extension($type, $name, $method = null)\n\t{\n\t\treturn new $type($name, [\n\t\t\t$this,\n\t\t\t$method ?? $name\n\t\t]);\n\t}", "abstract protected function getDefaultClass();", "public abstract function getType();", "public function setType(string $type);", "function __construct($type='simple')\n {\n $this->type = $type;\n }", "public static function overrideStandardTypes(array $types)\n {\n }" ]
[ "0.5917393", "0.57870066", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.5468814", "0.54438746", "0.5410691", "0.5398383", "0.5365262", "0.53319174", "0.53319174", "0.52966976", "0.52884054", "0.52884054", "0.5287116", "0.5264047", "0.5255664", "0.52492535", "0.5226708", "0.5226708", "0.5226708", "0.5226708", "0.5226708", "0.5226708", "0.5190842", "0.5172691", "0.5165414", "0.5165414", "0.5148825", "0.5126664", "0.5126664", "0.5126664", "0.5126664", "0.5126664", "0.5126664", "0.5126664", "0.5126664", "0.51139784", "0.5097706", "0.50504935", "0.5030142", "0.5029333", "0.50045586", "0.49796635", "0.4965292", "0.49577135", "0.49371827", "0.49371827", "0.4904363", "0.49043098", "0.4890386", "0.4883512", "0.48822376", "0.48820463", "0.4879447", "0.48703608" ]
0.0
-1
Get the types array map which holds all registered types and the corresponding type class
public static function getTypesMap() { return self::$typesMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getTypesMap(): array\n {\n return self::$typesMap;\n }", "public function getTypeMap()\n {\n return $this->typeMap;\n }", "public function getTypeMap()\n {\n }", "public static function get_type_registry()\n {\n }", "public static function getTypeMap() {\n return [\n 'session_id' => self::FIELD_INT,\n 'user_id' => self::FIELD_INT,\n 'session_string' => self::FIELD_STRING,\n 'create_date' => self::FIELD_EPOCH,\n 'update_date' => self::FIELD_EPOCH,\n ];\n }", "public static function getTypes();", "static function getTypes(): array\n\t{\n return self::$types;\n }", "public static function getAll()\r\n {\r\n return self::$typeRegistry;\r\n }", "public function getTypes() : array\n {\n return \\array_map(function ($t) {\n return $t instanceof self ? $t : new self([$t]);\n }, $this->types);\n }", "public function get_types()\n\t{\n\t\treturn array();\n\t}", "public function typesProvider()\n {\n return [\n '1 Type' => ['Type1'],\n '2 Type' => [['Type1', 'Type2']],\n ];\n }", "public static function getTypeMap() {\n return [\n 'charge_id' => self::FIELD_INT,\n 'user_id' => self::FIELD_INT,\n 'amount' => self::FIELD_INT,\n 'description' => self::FIELD_STRING,\n 'charge_date' => self::FIELD_EPOCH,\n 'create_date' => self::FIELD_EPOCH,\n 'update_date' => self::FIELD_EPOCH,\n ];\n }", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "protected function getTypes() {}", "public function getClassMap()\n {\n return array();\n }", "protected function loadTypes()\n {\n return array(\n new RecaptchaType(\n $this->app['salberts_recaptcha2.public_key'],\n $this->app['salberts_recaptcha2.enabled'],\n $this->app['salberts_recaptcha2.ajax'],\n $this->app['salberts_recaptcha2.locale_key']\n )\n );\n }", "public function getTypes(): array\n {\n return $this->types;\n }", "static public function getRegisteredClasses () {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:160: characters 3-19\n\t\t$result = new \\Array_hx();\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:161: lines 161-163\n\t\t$collection = Boot::$aliases;\n\t\tforeach ($collection as $key => $value) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:162: characters 4-39\n\t\t\t$x = Boot::getClass($key);\n\t\t\t$result->arr[$result->length] = $x;\n\t\t\t++$result->length;\n\n\t\t}\n\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:164: characters 3-16\n\t\treturn $result;\n\t}", "public function getTypeMapper();", "public function getTypes(): array;", "public function getTypes(): array;", "protected function _listTypes()\n {\n global $config;\n $types = objects::types();\n\n $result = array();\n foreach ($types as $type) {\n $infos = objects::infos($type);\n $result[$type] = $infos['name'];\n }\n return $result;\n }", "public static function types()\n {\n return self::$types;\n }", "public function getTypeLabels()\n {\n $labelMap = array();\n foreach ($this->configServices as $configService) {\n $labelMap[$configService->getTypeCode()] = $configService->getTypeLabel();\n }\n return $labelMap;\n }", "public static function getTypesById()\n {\n return array_flip(self::getTypes());\n }", "public static function types(): array\n {\n $all = self::getAll();\n\n return array_keys($all);\n }", "public function getTypes()\n {\n return $this->getTypesCollection()->getArrayCopy();\n }", "public static function getTypes()\n {\n return [\n ModelRegistry::TRANSACTION => ModelRegistry::getById(ModelRegistry::TRANSACTION)->label,\n ModelRegistry::PRODUCT => ModelRegistry::getById(ModelRegistry::PRODUCT)->label,\n ];\n }", "public function get_types()\n\t{\n\t\treturn $this->driver_query('type_list', FALSE);\n\t}", "public static function get_types()\n {\n return self::$TYPES;\n }", "public function typeProvider()\n {\n return array(\n array(true, false),\n array(12, false),\n array(24.50, false),\n array(new \\stdClass(), false),\n array('string', true),\n );\n }", "function getTypes() {\n\t\treturn $this->types;\n\t}", "static public function getTypeList()\n\t{\n\t\t/*\n\t\t * Searches the Type folder for all different tournament types.\n\t\t * This is used for when a user is creating a tournament and want to select what type to use\n\t\t * The array is set up like so:\n\t\t * key: class name for tourney type (get_class() could be useful)\n\t\t * value: result of object getName()\n\t\t */\n\t\t$retarray = array();\n\t\tif ($dir = scandir(APPLICATION_PATH . '/models/VictoryCondition')) {\n\t\t\tforeach ($dir as $file) {\n\t\t\t\tif ($file != 'Abstract.php' && strtolower(substr($file, strrpos($file, '.') + 1)) == 'php') {\n\t\t\t\t\t$classname = 'Model_VictoryCondition_' . substr($file, 0, strrpos($file, '.'));\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (class_exists($classname)) {\n\t\t\t\t\t\t\t$instance = new $classname;\n\t\t\t\t\t\t\tif ($instance instanceof Model_VictoryCondition_Abstract) {\n\t\t\t\t\t\t\t\t$retarray[$classname] = $instance->getTypeName();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception $e) {}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $retarray;\n\t}", "public function get_types()\n {\n }", "public static function get_all_types() {\t\t$types = scandir(str_replace(\"/\", \"\\\\\", dirname(plugin_dir_path( __FILE__ )) . \"\\\\ESWP\\\\MyTypes\"));\r\n\t\t$size = count($types);\r\n\t\t$_types = array();\r\n\t\t\r\n\t\t//Feed in the extra types\r\n\t\t$extra_types = array();\r\n\t\tif(has_filter(\"es_include_types\")) {\r\n\t\t\t$extra_types = apply_filters(\"es_include_types\", $extra_types);\r\n\t\t\t\r\n\t\t\t$size += count($extra_types);\r\n\t\t\t\r\n\t\t\tforeach ($extra_types as $type) {\r\n\t\t\t\t$order = $size;\r\n\t\t\t\t\r\n\t\t\t\tif (method_exists($type, \"get_order\")) {\r\n\t\t\t\t\t$order = $type->get_order();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tarray_push($_types, array(\r\n\t\t\t\t\t\"order\" => $order,\r\n\t\t\t\t\t\"type\" => $type\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Add the included types\r\n\t\tforeach ($types as $type) {\r\n\t\t\tif ($type !== \"BaseType.php\" && trim($type, \".\") !== \"\") {\r\n\t\t\t\t$order = $size + 10;\r\n\t\t\t\t$_type = \"\\\\ESWP\\\\MyTypes\\\\\". explode(\".\", $type)[0];\r\n\t\t\t\t\r\n\t\t\t\tif (class_exists($_type)) {\r\n\t\t\t\t\t$_type_obj = new $_type();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (method_exists($_type, \"get_order\")) {\r\n\t\t\t\t\t\t$order = $_type_obj->get_order();\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\tarray_push($_types, array(\r\n\t\t\t\t\t\t\"order\" => $order,\r\n\t\t\t\t\t\t\"type\" => $_type_obj\r\n\t\t\t\t\t));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $_types;\r\n\t}", "public static function getTypeList() {\n return array(\n self::TYPE_CODE_1=>self::TYPE_STRING_1,\n self::TYPE_CODE_2=>self::TYPE_STRING_2,\n self::TYPE_CODE_3=>self::TYPE_STRING_3,\n self::TYPE_CODE_4=>self::TYPE_STRING_4,\n self::TYPE_CODE_5=>self::TYPE_STRING_5,\n self::TYPE_CODE_6=>self::TYPE_STRING_6\n );\n }", "public function getTypes() {\n\t\treturn $this->types;\n\t}", "public function get_types()\n {\n return self::$TYPES;\n }", "public function getTypes()\n {\n return $this->types;\n }", "public function getTypes()\n {\n return $this->types;\n }", "protected function getRegisteredClasses() {}", "public static function getAllTypes() {\r\n\t\t$class_name = get_class(new static());\r\n\t\treturn isset(self::$all_role_types[$class_name]) ? self::$all_role_types[$class_name] : [];\r\n\t}", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "public function getAllTypes() {\n\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from(\n array('t' => 'NEWAGENTTYPELOOKUP')\n );\n $allTypes = $this->fetchAll($select);\n $returnVal = array();\n foreach ($allTypes as $typeRow) {\n $returnVal[$typeRow->NEWAGENTTYPELOOKUPID] = $typeRow->LABEL;\n }\n\n return $returnVal;\n }", "public function getClassmap() : array\n {\n return $this->classmap;\n }", "public static function getFieldTypeMapping() {\n // Check the static cache first.\n if (empty(static::$fieldTypeMapping)) {\n // It's easier to write and understand this array in the form of\n // $search_api_field_type => array($data_types) and flip it below.\n $default_mapping = array(\n 'text' => array(\n 'field_item:string_long.string',\n 'field_item:text_long.string',\n 'field_item:text_with_summary.string',\n 'text',\n ),\n 'string' => array(\n 'string',\n 'email',\n 'uri',\n 'filter_format',\n 'duration_iso8601',\n ),\n 'integer' => array(\n 'integer',\n 'timespan',\n ),\n 'decimal' => array(\n 'decimal',\n 'float',\n ),\n 'date' => array(\n 'datetime_iso8601',\n 'timestamp',\n ),\n 'boolean' => array(\n 'boolean',\n ),\n // Types we know about but want/have to ignore.\n NULL => array(\n 'language',\n ),\n );\n\n foreach ($default_mapping as $search_api_type => $data_types) {\n foreach ($data_types as $data_type) {\n $mapping[$data_type] = $search_api_type;\n }\n }\n\n // Allow other modules to intercept and define what default type they want\n // to use for their data type.\n \\Drupal::moduleHandler()->alter('search_api_field_type_mapping', $mapping);\n\n static::$fieldTypeMapping = $mapping;\n }\n\n return static::$fieldTypeMapping;\n }", "public function Types(){\r\n\t\t$types = self::get_types();\r\n\t\t$types_available = self::get_types_available();\r\n\t\tif (!$types){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$completeTypes = ArrayList::create();\r\n\t\tforeach ($types as $type){\r\n\t\t\tif (isset($types_available[$type])){\r\n\t\t\t\t$completeTypes->push($types_available[$type]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $completeTypes;\t\r\n\t}", "public function types()\n {\n return $this->types;\n }", "public static function getAllServiceTypes() {\n return id(new PhutilClassMapQuery())\n ->setAncestorClass(__CLASS__)\n ->setUniqueMethod('getServiceTypeConstant')\n ->setSortMethod('getServiceTypeName')\n ->execute();\n }", "public static function types()\n\t{\n\t\t$states = array(\n\t\t\t'blog' => __('Blog'),\n\t\t\t'page' => __('Page'),\n\t\t\t'user' => __('User')\n\t\t);\n\n\t\t$values = Module::action('gleez_types', $states);\n\n\t\treturn $values;\n\t}", "public function getTypes()\n {\n return $this->getData(self::TYPES);\n }", "public static function getTypes()\n\t{\n\t\t\n\t\treturn [\n\t\t\tself::TYPE_SHARES\t\t\t =>\t\"Shares\",\n\t\t\tself::TYPE_PROPERTY\t\t\t =>\t\"Property\",\n\t\t];\n\t\t\n\t}", "function &getAssociatedTypes() {\n\t\tif ($this->getIsGeneric()) { return array(); }\n\t\t\n\t\t$sTable = KTUtil::getTableName('document_type_fieldsets');\n $aQuery = array(\n \"SELECT document_type_id FROM $sTable WHERE fieldset_id = ?\",\n array($this->getId()),\n );\n $aIds = DBUtil::getResultArrayKey($aQuery, 'document_type_id');\n\t\t\n\t\t$aRet = array();\n\t\tforeach ($aIds as $iID) {\n\t\t $oType = DocumentType::get($iID);\n\t\t\tif (!PEAR::isError($oType)) { \n\t\t\t $aRet[] = $oType;\n\t\t\t}\n\t\t}\n\t\treturn $aRet;\n\t}", "function agilecrm_map_types($array)\n{\n $mapped = [];\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $mapped[] = $value;\n continue;\n }\n\n $type = in_array($key, TYPES['SYSTEM']) ? 'SYSTEM' : 'CUSTOM';\n\n $mapped[] = [\n 'type' => $type,\n 'name' => $key,\n 'value' => $value,\n ];\n }\n\n return $mapped;\n}", "public static function getTypesList()\n {\n return ArrayHelper::map(Yii::$app->get('cms')->getPageTypes(), 'type', 'name');\n }", "public function getTypeLoaders(): array\n {\n return $this->typeLoaders;\n }", "protected function getTypeMapping()\n {\n return self::$mysqlTypeMap;\n }", "public static function getTypes(): array\n {\n return self::getRelevancyTypes();\n }", "public function getTypes(): TypesRegistryInterface\n {\n if (!isset($this->types)) {\n $this->setTypes(new TypesRegistry());\n }\n\n return $this->types;\n }", "public function getGenerics(): array\n {\n return $this->genericTypes;\n }", "public function getTypes()\n {\n return get_object_vars($this);\n }", "public function getTypesItems()\n {\n return self::$_types;\n }", "public function get_desired_types();", "public function getTypes()\n {\n $oDb = Factory::service('Database');\n $oResult = $oDb->query('SHOW COLUMNS FROM `' . $this->table . '` LIKE \"type\"')->row();\n $sTypes = $oResult->Type;\n $sTypes = preg_replace('/enum\\((.*)\\)/', '$1', $sTypes);\n $sTypes = str_replace(\"'\", '', $sTypes);\n $aTypes = explode(',', $sTypes);\n\n $aOut = [];\n\n foreach ($aTypes as $sType) {\n $aOut[$sType] = ucwords(strtolower($sType));\n }\n\n return $aOut;\n }", "protected function getTypesCollection()\n {\n if (null === $this->types) {\n $this->types = new Collection(\n array($this->type),\n $this->docblock ? $this->docblock->getContext() : null\n );\n }\n return $this->types;\n }", "public static function getTypeArray() {\n\t\treturn array( \n\t\t\t'hash' => 'EthD32',\n\t\t\t'nonce' => 'EthQ',\n\t\t\t'blockHash' => 'EthD32',\n\t\t\t'blockNumber' => 'EthQ',\n\t\t\t'transactionIndex' => 'EthQ',\n\t\t\t'from' => 'EthD20',\n\t\t\t'to' => 'EthD20',\n\t\t\t'value' => 'EthQ',\n\t\t\t'gasPrice' => 'EthQ',\n\t\t\t'gas' => 'EthQ',\n\t\t\t'input' => 'EthD',\n\t\t);\n\t}", "protected function get_applicable_types()\n\t{\n\t\t$types = array();\n\n\t\tforeach ($this->types->get_all() as $id => $class)\n\t\t{\n\t\t\tif ($class->forum_robot && $class->forum_database)\n\t\t\t{\n\t\t\t\t$types[] = $id;\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "protected function getRegisteredClassNames(): ?array {\n $ctx = CompilerContext::getCurrentCompiler();\n if($ctx) {\n $reflections = $ctx->getValueCache()->fetchValue( FindExposedSymbolsCompiler::CACHE_CLASS_REFLECTIONS );\n return array_keys($reflections);\n }\n return NULL;\n }", "static public function fieldTypes()\n {\n if (!empty(self::$_fieldTypes)) {\n return self::$_fieldTypes;\n }\n\n /* Fetch all declared classes. */\n $classes = get_declared_classes();\n\n /* Filter for the Horde_Form_Type classes. */\n $blacklist = array('invalid', 'addresslink', 'spacer', 'description',\n 'captcha', 'figlet', 'header');\n foreach ($classes as $class) {\n if (stripos($class, 'horde_form_type_') !== false) {\n $field_type = substr($class, 16);\n /* Don't bother including the types that cannot be handled\n * usefully. */\n if (in_array($field_type, $blacklist)) {\n continue;\n }\n self::$_fieldTypes[$field_type] = @call_user_func(\n array('Horde_Form_Type_' . $field_type, 'about'));\n }\n }\n\n return self::$_fieldTypes;\n }", "public static function getTypes($type) {\n switch($type) {\n case \"users\":\n $users_info = array(\"users_login\" => \"login\",\n \"password\" => \"password\",\n \"users_email\" => \"email\",\n \"language\" => \"languages_NAME\",\n \"users_name\" => \"name\",\n \"users_surname\" => \"surname\",\n \"active\" => \"active\",\n \"user_type\" => \"user_type\",\n \"registration_date\" => \"timestamp\");\n return $users_info;\n case \"users_to_courses\":\n return array(\"users_login\" => \"users_login\",\n \"courses_name\" => \"course_name\",\n \"course_start_date\" => \"from_timestamp\",\n \"course_user_type\" => \"user_type\",\n \"course_completed\" => \"completed\",\n \"course_comments\" => \"comments\",\n \"course_score\" => \"score\",\n \"course_active\" => \"active\",\n \"course_end_date\" => \"to_timestamp\");\n case \"users_to_groups\":\n return array(\"users_login\" => \"users_login\",\n \"group_name\" => \"groups.name\");\n }\n }", "public function getClassMap(): array\n {\n $parentMap = $this->getBoundIterator()->getClassMap();\n $map = iterator_to_array($this->getIterator());\n\n foreach ($map as $name => &$fileinfo) {\n $fileinfo = $parentMap[$name];\n }\n\n return $map;\n }", "public static function getTypes($type) {\n switch($type) {\n case \"users\":\n $users_info = array(\"users_login\" => \"login\",\n \"password\" => \"password\",\n \"users_email\" => \"email\",\n \"language\" => \"languages_NAME\",\n \"users_name\" => \"name\",\n \"users_surname\" => \"surname\",\n \"active\" => \"active\",\n \"user_type\" => \"user_type\",\n \"registration_date\" => \"timestamp\");\n return $users_info;\n case \"users_to_courses\":\n return array(\"users_login\" => \"users_login\",\n \"courses_name\" => \"courses.name\",\n \"course_start_date\" => \"users_to_courses.from_timestamp\",\n \"course_user_type\" => \"users_to_courses.user_type\",\n \"course_completed\" => \"users_to_courses.completed\",\n \"course_comments\" => \"users_to_courses.comments\",\n \"course_score\" => \"users_to_courses.score\",\n \"course_active\" => \"users_to_courses.active\",\n \"course_end_date\" => \"users_to_courses.to_timestamp\");\n case \"users_to_groups\":\n return array(\"users_login\" => \"users_login\",\n \"group_name\" => \"groups.name\");\n }\n }", "private function &getSerializableAttributeTypesFromCache(): array {\n $key = \\get_class($this);\n if (!isset(self::$__attrTypeCache[$key])) {\n self::$__attrTypeCache[$key] = $this->getSerializableAttributeTypes();\n }\n return self::$__attrTypeCache[$key];\n }", "function get_known_types()\n {\n return array_keys($this->object->_forms);\n }", "public function getUserTypes()\n {\n $main_actions = [\n 'type' => \\adminer\\lang('Create type'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n ];\n\n // From db.inc.php\n $userTypes = \\adminer\\support(\"type\") ? \\adminer\\types() : [];\n $details = [];\n foreach($userTypes as $userType)\n {\n $details[] = [\n 'name' => \\adminer\\h($userType),\n ];\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }", "protected function get_class_mapper() {\n\t\t$class_mapper = array();\n\n\t\t/*\n\t\t * rsvp\n\t\t * @link https://indieweb.org/rsvp\n\t\t */\n\t\t$class_mapper['rsvp'] = 'rsvp';\n\n\t\t/*\n\t\t * invite\n\t\t * @link https://indieweb.org/invitation\n\t\t */\n\t\t$class_mapper['invitee'] = 'invite';\n\n\t\t/*\n\t\t * repost\n\t\t * @link https://indieweb.org/repost\n\t\t */\n\t\t$class_mapper['repost'] = 'repost';\n\t\t$class_mapper['repost-of'] = 'repost';\n\n\t\t/*\n\t\t * likes\n\t\t * @link https://indieweb.org/likes\n\t\t */\n\t\t$class_mapper['like'] = 'like';\n\t\t$class_mapper['like-of'] = 'like';\n\n\t\t/*\n\t\t * favorite\n\t\t * @link https://indieweb.org/favorite\n\t\t */\n\t\t$class_mapper['favorite'] = 'favorite';\n\t\t$class_mapper['favorite-of'] = 'favorite';\n\n\t\t/*\n\t\t * bookmark\n\t\t * @link https://indieweb.org/bookmark\n\t\t */\n\t\t$class_mapper['bookmark'] = 'bookmark';\n\t\t$class_mapper['bookmark-of'] = 'bookmark';\n\n\t\t/*\n\t\t * tag\n\t\t * @link https://indieweb.org/tag\n\t\t */\n\t\t$class_mapper['tag-of'] = 'tag';\n\t\t$class_mapper['category'] = 'tag';\n\n\t\t/*\n\t\t * read\n\t\t * @link https://indieweb.org/read\n\t\t */\n\t\t$class_mapper['read-of'] = 'read';\n\t\t$class_mapper['read'] = 'read';\n\n\t\t/*\n\t\t * listen\n\t\t * @link https://indieweb.org/listen\n\t\t */\n\t\t$class_mapper['listen-of'] = 'listen';\n\t\t$class_mapper['listen'] = 'listen';\n\n\t\t/*\n\t\t * watch\n\t\t * @link https://indieweb.org/watch\n\t\t */\n\t\t$class_mapper['watch-of'] = 'watch';\n\t\t$class_mapper['watch'] = 'watch';\n\n\t\t/*\n\t\t * follow\n\t\t * @link https://indieweb.org/follow\n\t\t */\n\t\t$class_mapper['follow-of'] = 'follow';\n\n\t\t/*\n\t\t * replies\n\t\t * @link https://indieweb.org/replies\n\t\t */\n\t\t$class_mapper['in-reply-to'] = 'comment';\n\t\t$class_mapper['reply'] = 'comment';\n\t\t$class_mapper['reply-of'] = 'comment';\n\n\t\treturn apply_filters( 'webmention_mf2_class_mapper', $class_mapper );\n\t}", "protected function getVehicleTypeAliasByIdMap(): array\n {\n return [\n 'ID_TYPE_AGRICULTURAL' => 'agricultural',\n 'ID_TYPE_ARTIC' => 'artic',\n 'ID_TYPE_ATV' => 'atv',\n 'ID_TYPE_AUTOLOADER' => 'autoloader',\n 'ID_TYPE_BULLDOZER' => 'bulldozer',\n 'ID_TYPE_BUS' => 'bus',\n 'ID_TYPE_CAR' => 'car',\n 'ID_TYPE_CONSTRUCTION' => 'construction',\n 'ID_TYPE_CRANE' => 'crane',\n 'ID_TYPE_SELF_LOADER' => 'self_loader',\n 'ID_TYPE_DREDGE' => 'dredge',\n 'ID_TYPE_LIGHT_TRUCK' => 'light_truck',\n 'ID_TYPE_MOTORCYCLE' => 'motorcycle',\n 'ID_TYPE_MUNICIPAL' => 'municipal',\n 'ID_TYPE_SCOOTER' => 'scooter',\n 'ID_TYPE_SNOWMOBILE' => 'snowmobile',\n 'ID_TYPE_TRAILER' => 'trailer',\n 'ID_TYPE_TRUCK' => 'truck',\n ];\n }", "public function types()\n {\n return [\n static::TYPE_APP,\n static::TYPE_GALLERY,\n static::TYPE_PHOTO,\n static::TYPE_PLAYER,\n static::TYPE_PRODUCT,\n static::TYPE_SUMMARY,\n static::TYPE_SUMMARY_LARGE_IMAGE,\n ];\n }", "public function types(): array\n {\n return collect($this->modelSchemas)->map(function ($modelSchema) {\n return $modelSchema instanceof RootType\n ? $modelSchema\n : $this->registry->type($this->registry->getModelSchema($modelSchema)->typename());\n })->toArray();\n }", "function db_type_map() {\n // Put :normal last so it gets preserved by array_flip. This makes\n // it much easier for modules (such as schema.module) to map\n // database types back into schema types.\n $map = array(\n 'varchar:normal' => 'VARCHAR',\n 'char:normal' => 'CHAR',\n\n 'text:tiny' => 'TINYTEXT',\n 'text:small' => 'TINYTEXT',\n 'text:medium' => 'MEDIUMTEXT',\n 'text:big' => 'LONGTEXT',\n 'text:normal' => 'TEXT',\n\n 'serial:tiny' => 'TINYINT',\n 'serial:small' => 'SMALLINT',\n 'serial:medium' => 'MEDIUMINT',\n 'serial:big' => 'BIGINT',\n 'serial:normal' => 'INT',\n\n 'int:tiny' => 'TINYINT',\n 'int:small' => 'SMALLINT',\n 'int:medium' => 'MEDIUMINT',\n 'int:big' => 'BIGINT',\n 'int:normal' => 'INT',\n\n 'float:tiny' => 'FLOAT',\n 'float:small' => 'FLOAT',\n 'float:medium' => 'FLOAT',\n 'float:big' => 'DOUBLE',\n 'float:normal' => 'FLOAT',\n\n 'numeric:normal' => 'DECIMAL',\n\n 'blob:big' => 'LONGBLOB',\n 'blob:normal' => 'BLOB',\n\n 'datetime:normal' => 'DATETIME',\n );\n return $map;\n}", "public static function getAllTypes($className) {\n\n\t\t$key = strtolower($className);\n\t\tif (!isset(self::$typeHierarchies[$key])) {\n\t\t\tself::loadLibraryClassByName($className);\n\n\t\t\t$types = array();\n\t\t\t$classes = self::getParentReflectionClasses($className);\n\t\t\t$classes[] = new ReflectionClass($className);\n\n\t\t\tforeach ($classes as $class) {\n\t\t\t\t$types[] = $class->getName();\n\t\t\t\t$types = array_merge($types, $class->getInterfaceNames());\n\t\t\t}\n\t\t\tself::$typeHierarchies[$key] = $types;\n\t\t}\n\n\t\treturn self::$typeHierarchies[$key];\n\t}", "public static function getAllFieldsWithTypes(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n\n\n $cache_key = self::$cache_prefix.'.ALLFIELDS.WITH.TYPES.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return self::getArrayTableInfo($table);\n }) : self::getArrayTableInfo($table);\n }", "protected function classMap()\n {\n $class_map = new ClassMap();\n\n return $class_map->getMap();\n }", "public function getTypeHandlers()\n {\n return array_keys($this->handlers);\n }", "public static function getTypeArray()\n {\n return [\n self::TYPE_GENERIC => Yii::t('app', 'Generic'),\n ];\n }", "public function get_types() {\n\n $q = $this->db->query('SELECT DISTINCT `rgl_type` , `vtr_type` \n FROM `t_reglements` \n LEFT JOIN `v_types_reglements` ON `vtr_id` = `rgl_type` ');\n if ($q->num_rows() > 0) {\n $resultat = $q->result();\n return $resultat;\n }\n else {\n return array();\n }\n }", "function get_field_mapping_types() {\n return drupal_map_assoc([\n 'string',\n 'keyword',\n 'date',\n 'long',\n 'double',\n 'boolean',\n 'ip',\n 'object',\n 'nested',\n 'geo_point',\n 'geo_shape',\n 'completion',\n ]);\n}", "public function getTypes()\n {\n $types = PropertyType::all();\n $values = [];\n foreach ($types as $key) {\n $values[] = $key->id;\n }\n return $values;\n }", "public function getDataClasses()\n {\n return $this->data_types;\n }", "public static function getMap()\n\t\t{\n\n\t\t\t$reflectionClass = new ReflectionClass(static::class);\n\t\t\treturn array_flip($reflectionClass->getConstants());\n\n\t\t}", "public static function types(): array\n {\n $config = app(ConfigInterface::class);\n\n return $config\n ->get('alert.types');\n }", "function getUserTypes() {\n return array(self::HOME => self::HOME,\n self::CLINIC => self::CLINIC);\n }", "public static function getUserTypes() {\n return array_keys(self::userTypes());\n }", "public static function getTypes() {\n\t\treturn [\n\t\t\t'text' => self::RESOURCE_TYPE_TEXT,\n\t\t\t'img' => self::RESOURCE_TYPE_IMG\n\t\t];\n\t}", "public function types()\n {\n return new Types($this->domusClient);\n }" ]
[ "0.82546985", "0.7464621", "0.7455776", "0.717192", "0.71357745", "0.71064496", "0.7083926", "0.7036556", "0.6974769", "0.6972508", "0.69536084", "0.6927291", "0.6861731", "0.6861731", "0.6861731", "0.6861731", "0.68394184", "0.68364877", "0.679472", "0.6779887", "0.670672", "0.6663577", "0.66588306", "0.66588306", "0.6648286", "0.66176623", "0.65546715", "0.6531744", "0.65039915", "0.6491144", "0.6466919", "0.64661556", "0.64655155", "0.64627236", "0.64031476", "0.6402507", "0.637378", "0.63454974", "0.63355273", "0.6335339", "0.6296781", "0.62803", "0.62803", "0.62670815", "0.62629557", "0.6247964", "0.6247964", "0.6247964", "0.62437975", "0.62064993", "0.6198", "0.61615646", "0.61503524", "0.61410767", "0.61172044", "0.6103836", "0.6096953", "0.6096305", "0.6093818", "0.60926306", "0.6063128", "0.6054504", "0.60422647", "0.60132694", "0.60035956", "0.6003087", "0.5992875", "0.5990493", "0.59698176", "0.5953178", "0.59527534", "0.59135354", "0.59017056", "0.58963287", "0.58936644", "0.5888586", "0.5886559", "0.5881885", "0.5881382", "0.58550745", "0.5854665", "0.5853607", "0.5850726", "0.5842114", "0.5830434", "0.5829245", "0.58122927", "0.57992095", "0.5799068", "0.57740355", "0.57657677", "0.5759736", "0.5756309", "0.5749032", "0.5746939", "0.5745415", "0.573219", "0.572949", "0.5726179", "0.5725518" ]
0.80459994
1
Record a record hit to the statistics index when stat tracking is enabled; this is called by the Home action.
public function recordHit() { global $configArray; if ($configArray['Statistics']['enabled']) { // Setup Statistics Index Connection $solrStats = ConnectionManager::connectToIndex('SolrStats'); // Save Record View $solrStats->saveRecordView($this->recordDriver->getUniqueID()); unset($solrStats); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recordAnalytics() {\n\t\t//Is your user agent any of my business? Not really, but don't worry about it.\n\t\texecuteQuery(\"\n\t\t\tINSERT INTO dwm2r_activitymonitor\n\t\t\t(IPAddress,UserAgent,Flags,Seed,CreatedDTS)\n\t\t\tVALUES (\n\t\t\t\t'\".$_SERVER['REMOTE_ADDR'].\"',\n\t\t\t\t'\".$_SERVER['HTTP_USER_AGENT'].\"',\n\t\t\t\t'\".trim($_REQUEST[\"Flags\"]).\"',\n\t\t\t\t'\".$this->modder->flags[\"Seed\"].\"',\n\t\t\t\tNOW()\n\t\t\t)\n\t\t\");\n\t}", "public function statHit(Stats_OLP_Client $stats, $event_type_key, $date_occurred = NULL, $event_amount = NULL, $track_key = NULL, $space_key = NULL)\n\t{\n\t\t$mode = $stats->getMode();\n\t\t$application_id = $stats->getApplicationID();\n\t\t\n\t\tif ($application_id)\n\t\t{\n\t\t\t$this->insertEventLog($event_type_key, $mode, $application_id);\n\t\t}\n\t}", "protected function recordUniqueStatHit($stat_name, $date_created = NULL)\n\t{\n\t\t$this->stat_history[$stat_name] = $this->formatStatDate($date_created);\n\t}", "public function hitStat($stat_name, $track_key = null, $space_key= null)\n\t{\n\t\tif (!$track_key) $track_key = $this->getTrackKeyValue();\n\t\tif (!$space_key) $space_key = $this->getSpaceKeyValue();\n\n\t\ttry\n\t\t{\n\t\t\t$this->recordEvent($track_key, $space_key, $stat_name);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->log->Write($e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t}", "function record_stat($blog_id, $action) {\r\n\t\tglobal $wpdb;\r\n\t\t//only record one stat action per blog per day\r\n\t\t$exists = $wpdb->get_var( $wpdb->prepare(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites_signup_stats WHERE blog_ID = %s AND action = %s AND time_stamp = %s\", $blog_id, $action, date('Y-m-d')) );\r\n\t\tif ( !$exists ) {\r\n $wpdb->insert( \"{$wpdb->base_prefix}pro_sites_signup_stats\", array( 'blog_ID' => $blog_id, 'action' => $action, 'time_stamp' => date('Y-m-d') ), array( '%d', '%s', '%s' ) );\r\n\t\t}\r\n\t}", "function countHit() {\n\n $this->saveField('hits', $this->data['Ringsite']['hits']+1, false);\n }", "public function hitStat($event_type_key, $date_occurred = NULL, $event_amount = NULL, $track_key = NULL, $space_key = NULL)\n\t{\n\t\tif (!$track_key) $track_key = $this->track_key;\n\t\tif (!$space_key) $space_key = $this->space_key;\n\t\t\n\t\t$this->statpro->recordEvent($track_key, $space_key, $event_type_key, $date_occurred, $event_amount);\n\t}", "public static function Hit() {\n\t\tif(self::$alreadyhit == TRUE) return TRUE;\n\t\t\n\t\t# increment the hit count in the session table\n\t\tdatabase()->start_query('sessions', 'UPDATE')\n\t\t\t->set(array('hits' => self::$data->hits + 1))\n\t\t\t->where(array('key' => self::$sid))\n\t\t\t\t->run();\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t# configure the hit data\n\t\t\t$hit = array(\n\t\t\t\t\"user\" => self::$data->user,\n\t\t\t\t\"ip\" => $_SERVER['REMOTE_ADDR'],\n\t\t\t\t\"session\" => self::$sid,\n\t\t\t\t\"_data\"\t\t=> serialize(array(\n\t\t\t\t\t'URL' => Router::url(),\n\t\t\t\t\t'USER_AGENT' => $_SERVER['HTTP_USER_AGENT'],\n\t\t\t\t\t'REFERER' => $_SERVER['HTTP_REFERER'],\n\t\t\t\t\t'REQUEST_TIME' => $_SERVER['REQUEST_TIME'],\n\t\t\t\t)),\n\t\t\t);\n\t\t\t\n\t\t\t# create the hit\n\t\t\tdatabase()->start_query('hits', 'INSERT')->set($hit)->run();\n\t\t\t\n\t\t} catch(DatabaseException $e) {\n\t\t\t\n\t\t\t// ignore\n\t\t\t\n\t\t}\n\t\t\n\t\tself::$alreadyhit = TRUE;\n\t}", "public function track($trackingNumber);", "public static function maybe_track_usage() {\n\n\t\t/** checking optin state */\n\t\tif ( 'yes' == self::get_optIn_state() ) {\n\t\t\t$data = self::collect_data();\n\n\t\t\t//posting data to api\n\t\t\tXL_API::post_tracking_data( $data );\n\t\t}\n\t}", "public function track_status_view() {\n\t\tif ( isset( $_GET['page'] ) && 'wc-status' === sanitize_text_field( wp_unslash( $_GET['page'] ) ) ) {\n\n\t\t\t$tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'status';\n\n\t\t\tWC_Tracks::record_event(\n\t\t\t\t'status_view',\n\t\t\t\tarray(\n\t\t\t\t\t'tab' => $tab,\n\t\t\t\t\t'tool_used' => isset( $_GET['action'] ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : null,\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( 'status' === $tab ) {\n\t\t\t\twc_enqueue_js(\n\t\t\t\t\t\"\n\t\t\t\t\t$( 'a.debug-report' ).click( function() {\n\t\t\t\t\t\twindow.wcTracks.recordEvent( 'status_view_reports' );\n\t\t\t\t\t} );\n\t\t\t\t\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function hit()\n {\n if($this->exists){\n $stats = $this->popularityStats()->first();\n if( empty( $stats ) ){\n //associates a new Stats instance for this instance\n $stats = new Stats();\n $this->popularityStats()->save($stats);\n }\n return $stats->updateStats();\n }\n return false; \n }", "public function indexAction()\n {\n $date = $this->params()->fromQuery('date');\n $init = new Google();\n $response = $init->getReport($date, $date);\n $result = $init->printResults($response);\n foreach ($result as $key => $item) {\n\n $sql = \"insert into analytics(source_medium,users,new_users,session,bounce_rate,pages_session,\n avg_session_duration,ecommerce_conversion_rate,transactions,revenue,created_date) values('{$key}','{$item['ga:users']}','{$item['ga:newUsers']}','{$item['ga:sessions']}'\n ,'{$item['ga:bounceRate']}','{$item['ga:pageviewsPerSession']}','{$item['ga:avgSessionDuration']}'\n ,'{$item['ga:transactionsPerSession']}','{$item['ga:transactions']}','{$item['ga:transactionRevenue']}','{$date}') on duplicate key update\n users = '{$item['ga:users']}',new_users ='{$item['ga:newUsers']}' ,session='{$item['ga:sessions']}',bounce_rate='{$item['ga:bounceRate']}',pages_session='{$item['ga:pageviewsPerSession']}',\n avg_session_duration='{$item['ga:avgSessionDuration']}',ecommerce_conversion_rate='{$item['ga:transactionsPerSession']}',transactions='{$item['ga:transactions']}',revenue='{$item['ga:transactionRevenue']}'\";\n $statement = $this->conn->createStatement($sql);\n $statement->execute();\n }\n }", "public function tracking()\n {\n if (Request::has('h')) {\n $track = Tracking::getByHash(Request::input('h'));\n if ($track->isActive()) {\n $data = [\n 'tracking_id' => $track->tracking_id,\n 'data' => json_encode(Request::except('h'))\n ];\n Tracking::log($data);\n }\n }\n\n // if we have a mail_id, we update the mail status and the date where it is opened\n if (Request::has(Tracking::MAIL_ID)) {\n if (Mail::exists(uuid('bytes', Request::input(Tracking::MAIL_ID)))) {\n $mail = Mail::getById(uuid('bytes', Request::input(Tracking::MAIL_ID)));\n\n if ($mail->mail_status_id != Mail::STATUS_OPENED) {\n $mail->mail_status_id = Mail::STATUS_OPENED;\n $mail->opened_at = Carbon::now();\n $mail->save();\n }\n }\n }\n\n header('Content-type:image/jpg');\n header(\"Pragma: no-cache\");\n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0, public\");\n header(\"Expires: 0\");\n exit;\n }", "public function attachAllHitStatObservers()\n\t{\n\t\t$event_log = new Stats_OLP_Observe_Eventlog();\n\t\t$event_log->observeHitStat($this);\n\t}", "public function hit()\n {\n if($this->exists){\n $stats = $this->popularityStats()->first();\n if( empty( $stats ) ){\n //associates a new Stats instance for this instance\n $stats = new Stats();\n $this->popularityStats()->save($stats);\n }\n return $stats->updateStats();\n }\n return false;\n }", "private function _recordVisit() {\n $txnTable = $this->settings['txnTable'];\n $dtlTable = $this->settings['dtlTable'];\n $isRES = BoolYN( $this->_isResource() );\n $rVal = false;\n\n // Construct the INSERT Statement and Record It\n $dsvID = \"CONCAT(DATE_FORMAT(Now(), '%Y-%m-%d %h:00:00'), '-', \" . \n nullInt($this->settings['SiteID']) . \", '-', \" . \n \"'\" . sqlScrub($this->settings['RequestURL']) . \"')\";\n $sqlStr = \"INSERT INTO `$txnTable` (`dsvID`, `DateStamp`, `SiteID`, `VisitURL`, `Hits`, `isResource`, `UpdateDTS`) \" .\n \"VALUES ( MD5($dsvID), DATE_FORMAT(Now(), '%Y-%m-%d %h:00:00'), \" . nullInt($this->settings['SiteID']) . \",\" .\n \" '\" . sqlScrub($this->settings['RequestURL']) . \"',\" .\n \" 1, '$isRES', Now() )\" .\n \"ON DUPLICATE KEY UPDATE `Hits` = `Hits` + 1,\" .\n \" `UpdateDTS` = Now();\" .\n \"INSERT INTO `$dtlTable` (`SiteID`, `DateStamp`, `VisitURL`, `ReferURL`, `SearchQuery`, `isResource`, `isSearch`, `UpdateDTS`) \" .\n \"VALUES ( \" . nullInt($this->settings['SiteID']) . \", DATE_FORMAT(Now(), '%Y-%m-%d %h:00:00'),\" . \n \" '\" . sqlScrub($this->settings['RequestURL']) . \"',\" .\n \" '\" . sqlScrub($this->settings['Referrer']) . \"',\" .\n \" '', '$isRES', 'N', Now() );\";\n $rslt = doSQLExecute( $sqlStr );\n if ( $rslt > 0 ) { $rVal = true; }\n\n // Return the Boolean Response\n return $rVal;\n }", "static function hit(){\n $beeHiveWriter = new BeeHiveWriter(self::$_hiveName);\n // if game is not over, random hit a bee\n if(!self::$_hive->gameOver()){\n self::$_hive->randomHit();\n }\n // after the hit, if game over: delete session\n if(self::$_hive->gameOver()){\n self::$_gameStatus = \"game over\";\n $beeHiveWriter->deleteSession();\n }else{\n // if game is not over, write the session\n self::$_gameStatus= \"game on\";\n $beeHiveWriter->writeSession(self::$_hive);\n };\n // update status\n self::$_hiveStatus = self::$_hiveViewer->view();\n }", "protected function doActionSendTracking()\n {\n \\XLite\\Core\\Mailer::sendOrderTrackingInformationCustomer($this->getOrder());\n\n \\XLite\\Core\\TopMessage::addInfo('Tracking information has been sent');\n }", "function action_track() {\n if(model_user::userLoggedIn()) {\n // Include view for this page.\n @include_once APP_PATH . 'view/track_page.tpl.php';\n } else {\n header('Location: /home/login');\n }\n }", "private function track(string $action) : void {\n if (filter_input(INPUT_SERVER, 'HTTP_DNT') === '1') {\n return;\n }\n $matomoTracker = new MatomoTracker(4, 'https://stats.codepoints.net/');\n /* make sure this blocks the API as little as possible */\n $matomoTracker->setRequestTimeout(1);\n $matomoTracker->setUrlReferrer($_SERVER['HTTP_REFERER'] ?? '');\n $matomoTracker->setUserAgent($_SERVER['HTTP_USER_AGENT'] ?? '');\n $matomoTracker->disableCookieSupport();\n $matomoTracker->doTrackPageView('API v1: '.$action);\n }", "function countHit() {\n App::import('Vendor', 'ip');\n\n $ip = _getip();\n $client = ip2long($ip);\n\n $sql = \"SELECT count(*) FROM hits WHERE \";\n $sql .= \"ip='\".$client.\"' AND link_id='\".$this->id.\"' \";\n // mySQL >=5: $sql .= \"AND DATEDIFF(NOW(), created) < 1\";\n $sql .= \"AND (TO_DAYS(NOW()) - TO_DAYS(created)) < \".Configure::read('Clicks.NoCountPeriod');\n $allreadyClicked = $this->query($sql);\n\n if ($allreadyClicked[0][0]['count(*)'] == 0) {\n $this->Hit->create();\n $this->Hit->data['Hit']['link_id'] = $this->id;\n $this->Hit->data['Hit']['ip'] = $client;\n $this->Hit->save($this->Hit->data);\n\n $this->saveField('hit_count', $this->data['Link']['hit_count']+1, false);\n }\n }", "public function log_activity() {\n\t\t$data = array();\n\t\t$data['page'] = current_url();\n\t\t$data['ip_address'] = $this->_ci->input->ip_address();\n\t\t$data['user_agent'] = $this->_ci->agent->agent_string(); \n\t\t$data['request_method'] = $this->_ci->input->server('REQUEST_METHOD');\n\t\t$data['request_params'] = serialize($this->_ci->input->get_post(NULL, TRUE)); \n\t\t$data['uri_string'] = $this->_ci->uri->uri_string();\n\t\t$data['created_at'] = date('Y-m-d h:i:s');\n\n\t\tif($this->verify_activity()) {\n\t\t\t// And write it to the database\n\t\t\t$this->_ci->db->insert('hooks', $data);\n\t\t}\n\t}", "function enableHitsOnly(){\n\t\t$this->hitsonly = true;\n\t}", "public static function optin_track_usage() {\n\n\t\t/** update week day for tracking */\n\t\t$track_week_day = date( 'w' );\n\t\tupdate_option( 'xl_track_day', $track_week_day, false );\n\n\t\t$data = self::collect_data();\n\n\t\t//posting data to api\n\t\tXL_API::post_tracking_data( $data );\n\t}", "function track_visitor()\n{\n $dbh = new db;\n $dbh->createTables();\n\n $ip_address = checkParam($_SERVER,\"REMOTE_ADDR\",'');\n $page_name = checkParam($_SERVER,\"SCRIPT_NAME\",'');\n $query_string = checkParam($_SERVER,\"QUERY_STRING\",'');\n $current_page = $page_name.\"?\".$query_string;\n\n if( isset($_SESSION['visitor_id']) )\n $visitor_id = $_SESSION['visitor_id'];\n else\n $visitor_id = $dbh->getNewVisitorID();\n\n if( isset($_SESSION[\"tracking\"]) )\n {\n // If it's a new page, add new tracking entry\n if($_SESSION[\"current_page\"] != $current_page)\n {\n $dbh->addEntry($visitor_id,$ip_address,$page_name,$query_string);\n }\n }\n else\n {\n $_SESSION[\"tracking\"] = TRUE;\n $_SESSION[\"visitor_id\"] = $visitor_id;\n $dbh->addEntry($visitor_id,$ip_address,$page_name,$query_string);\n }\n $_SESSION[\"current_page\"] = $current_page;\n}", "function feuserloginsystem_addUserStatisticEntry() {\r\n\r\n $timeStamp = time();\r\n\r\n # For the page tracking feature get the time and the page ID.\r\n $pagetrackingArray = array();\r\n $pagetrackingArray[] = array('time' => $timeStamp, 'pageID' => intval($this->id));\r\n\r\n # Get commom information for statistics.\r\n\t\t$insertDataArray = array();\r\n\t\t$insertDataArray['feuserid'] = intval($this->fe_user->user[\"uid\"]);\r\n\t\t$insertDataArray['sessionstart'] = $timeStamp;\r\n\t\t$insertDataArray['lastpageview'] = $timeStamp;\r\n\t\t$insertDataArray['pagecounter'] = intval(1);\r\n\t\t$insertDataArray['pagetracking'] = serialize($pagetrackingArray);\r\n\r\n\t\t# Create statistic entry in the database.\r\n $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_feuserloginsystem_userstatistics',$insertDataArray);\r\n }", "function log_stats($page_id)\n {\n global $app, $HTTP_USER_AGENT, $REMOTE_ADDR;\n\t\t$app[current_page] = $page_id;\n\t\t$year = date('Y');\n $hour = date('g a');\n $week = date('w');\n $month = date('F');\n\n\t\t## total hit \n $sql = \"select * from {$app[table][stats_hit]}\n where year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_hit]} \n set counter = counter + 1\n where year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_hit]} (counter, year) values(1,'$year')\";\n endif;\n db::qry($sql);\n \n ## by page\n $sql = \"select * from {$app[table][stats_page]}\n where page_id = '$page_id' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_page]} \n \tset counter = counter + 1\n\t\t\t\t\twhere page_id = '$page_id' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_page]} (page_id, counter, year) values('$page_id',1,'$year')\";\n endif;\n db::qry($sql);\n\t\n ## by browser\n if (eregi(\"Nav\", $HTTP_USER_AGENT) || eregi(\"Gold\", $HTTP_USER_AGENT) || eregi(\"X11\", $HTTP_USER_AGENT) || eregi(\"en-US\", $HTTP_USER_AGENT) || eregi(\"Netscape\", $HTTP_USER_AGENT) || eregi(\"Mozilla/4.74\", $HTTP_USER_AGENT)):\n $browser = \"Netscape\";\n elseif (eregi(\"Lynx\", $HTTP_USER_AGENT)): \n $browser = \"Lynx\";\n elseif (eregi(\"Opera\", $HTTP_USER_AGENT)): \n $browser = \"Opera\";\n elseif (eregi(\"Konqueror\", $HTTP_USER_AGENT)): \n $browser = \"Konqueror\";\n elseif (eregi(\"Bot\", $HTTP_USER_AGENT) || eregi(\"Google\", $HTTP_USER_AGENT) || eregi(\"Slurp\", $HTTP_USER_AGENT) || eregi(\"Scooter\", $HTTP_USER_AGENT) || eregi(\"Spider\", $HTTP_USER_AGENT) || eregi(\"Infoseek\", $HTTP_USER_AGENT)):\n $browser = \"Bot\";\n elseif (eregi(\"MSIE\", $HTTP_USER_AGENT)):\n $browser = \"MSIE\";\n else:\n $browser = \"Other\";\n endif;\n \n $sql = \"select * from {$app[table][stats_browser]}\n where browser = '$browser' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_browser]} \n set counter = counter + 1\n where browser = '$browser' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_browser]} (browser, counter, year) values('$browser',1,'$year')\";\n endif; \n db::qry($sql); \n\t\n ## by OS\n if (eregi(\"Win\", $HTTP_USER_AGENT)):\n $os = \"Windows\";\n elseif (eregi(\"Mac\", $HTTP_USER_AGENT)): \n $os = \"Mac\";\n elseif (eregi(\"PPC\", $HTTP_USER_AGENT)): \n $os = \"Mac\";\n elseif (eregi(\"Linux\", $HTTP_USER_AGENT)): \n $os = \"Linux\";\n elseif (eregi(\"FreeBSD\", $HTTP_USER_AGENT)): \n $os = \"FreeBSD\";\n elseif (eregi(\"SunOS\", $HTTP_USER_AGENT)):\n $os = \"SunOS\";\n elseif (eregi(\"IRIX\", $HTTP_USER_AGENT)):\n $os = \"IRIX\";\n elseif (eregi(\"BeOS\", $HTTP_USER_AGENT)):\n $os = \"BeOS\";\n elseif (eregi(\"OS/2\", $HTTP_USER_AGENT)):\n $os = \"OS2\";\n elseif (eregi(\"AIX\", $HTTP_USER_AGENT)):\n $os = \"AIX\";\n else:\n $os = \"Other\";\n endif;\n \n $sql = \"select * from {$app[table][stats_os]}\n where os = '$os' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_os]} \n set counter = counter + 1\n where os = '$os' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_os]} (os, counter, year) values('$os',1,'$year')\";\n endif;\n\t\tdb::qry($sql);\n\t\n\t\t## by hour\n\t\t$sql = \"select * from {$app[table][stats_hour]}\n where jam = '$hour' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_hour]} \n set counter = counter + 1\n where jam = '$hour' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_hour]} (jam, counter, year) values('$hour',1,'$year')\";\n endif;\n\t\tdb::qry($sql);\n\t\t\n\t\t## by weekday\n\t\t$sql = \"select * from {$app[table][stats_week]}\n where hari = '$week' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_week]} \n set counter = counter + 1\n where hari = '$week' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_week]} (hari, counter, year) values('$week',1,'$year')\";\n endif;\n\t\tdb::qry($sql);\n\t\t\t\n ## by month\n $sql = \"select * from {$app[table][stats_month]}\n where bulan = '$month' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_month]} \n set counter = counter + 1\n where bulan = '$month' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_month]} (bulan, counter, year) values('$month',1,'$year')\";\n endif;\n\t\tdb::qry($sql);\n \t\n \t## by IP\n \t$ip = $REMOTE_ADDR;\n \t#$hostname = @gethostbyaddr($ip);\n\t\t$hostname = $ip;\n\t\t$sql = \"select * from {$app[table][stats_ip]} where ip = '$ip' and year = '$year'\";\n\t\t#echo $sql;exit;\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_ip]} \n set counter = counter + 1\n where ip = '$ip' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_ip]} (ip, hostname, counter, year) values('$ip','$hostname', 1, '$year')\";\n endif;\n db::qry($sql);\n\t}", "public function hitURL($url)\n\t{\n\t\t$this->statpro->insert(\n\t\t\t6,\n\t\t\tarray(\n\t\t\t\t$url,\n\t\t\t\ttime(),\n\t\t\t)\n\t\t);\n\t}", "function updateHitCount($short_url_id){\n\t\t$this->query('UPDATE short_urls SET hit_count = hit_count + 1, modified = NOW() WHERE id='.$short_url_id);\n\t}", "function pmproex_track($experiment, $url, $goal = NULL)\r\n{\r\n\t$stats = get_option('pmpro_experiments_stats', array());\t\r\n\r\n\t//create experiment element if not there\r\n\tif(empty($stats[$experiment]))\r\n\t{\r\n\t\t$stats[$experiment] = array('entrances'=>0);\r\n\t}\r\n\t\r\n\tif(empty($goal))\r\n\t{\r\n\t\t//tracking an entrance\t\t\r\n\t\t$stats[$experiment]['entrances']++;\r\n\t\tif(empty($stats[$experiment][$url]))\r\n\t\t\t$stats[$experiment][$url] = array('entrances'=>0);\r\n\t\t$stats[$experiment][$url]['entrances']++;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//tracking a goal\r\n\t\tif(empty($stats[$experiment][$url]))\r\n\t\t\t$stats[$experiment][$url] = array('entrances'=>0, $goal=>0);\r\n\t\telseif(empty($stats[$experiment][$url][$goal]))\r\n\t\t\t$stats[$experiment][$url][$goal] = 0;\r\n\t\t$stats[$experiment][$url][$goal]++;\r\n\t}\r\n\t\r\n\t//delete_option('pmpro_experiments_stats');\t\t\r\n\tupdate_option('pmpro_experiments_stats', $stats, 'no');\r\n}", "public function hitStat($event_type_key, $date_occurred = NULL, $event_amount = NULL, $track_key = NULL, $space_key = NULL)\n\t{\n\t\t$hit_stat = TRUE;\n\t\t\n\t\t$is_unique = FALSE;\n\t\t\n\t\t// All stats are unique except these\n\t\tif (!$this->isNotUnique($event_type_key)) $is_unique = TRUE;\n\t\t\n\t\t// All stats are not unique unless listed here\n\t\t//if ($this->isUnique($event_type_key)) $is_unique = TRUE;\n\t\t\n\t\t// If we pass in a track key different than the one stored, don't do uniqueness tests\n\t\tif ($track_key !== NULL && $this->track_key != $track_key) $is_unique = FALSE;\n\t\t\n\t\tif ($is_unique)\n\t\t{\n\t\t\tif ($this->isAlreadyHit($event_type_key))\n\t\t\t{\n\t\t\t\t$hit_stat = FALSE;\n\t\t\t}\n\t\t\telseif (!$this->insertUniqueStat($event_type_key))\n\t\t\t{\n\t\t\t\t$hit_stat = FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// If unique, do not hit it more than once.\n\t\t\t\tif ($event_amount > 1)\n\t\t\t\t\t$event_amount = 1;\n\t\t\t\t\n\t\t\t\t// Record as a new unique stat hit during this load\n\t\t\t\t$this->new_stat_history[] = $event_type_key;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($hit_stat)\n\t\t{\n\t\t\t$hit_stat = parent::hitStat($event_type_key, $date_occurred, $event_amount, $track_key, $space_key);\n\t\t}\n\t\t\n\t\treturn $hit_stat;\n\t}", "protected function _pushStat()\n {\n\n $this->_detectRefIP();\n\n $this->_detectOS();\n\n $this->_detectBrowser();\n\n $this->_detectCountry();\n\n $this->_detectRef();\n\n // push to redis\n $this->redis->pipeline(function($pipe)\n {\n //Page to set of pages\n $pipe->sadd('gstat:pages', $this->page);\n\n //Site\n $this->_keyPipeSend($pipe, 'gstat:site');\n\n //Page\n $this->_keyPipeSend($pipe, 'gstat:page:'.$this->page);\n\n\n });\n\n }", "function get_statistics_data_hit($params)\r\n {\r\n return $this->get_statistics_data_view($params);\r\n }", "protected function track(Request $request, Classified $deal)\n {\n // Get tracker\n $tracker = new Tracker;\n\n // Get user ip\n $ip = ip();\n \n // Check if tracking succeed\n if (!$tracker->isSucceed) {\n return;\n }\n \n // New stats query\n $tracking = new ClassifiedStatistics;\n \n // Check if already visited\n $visit = $tracking->whereDealId($deal->id)->whereIp($ip)->first();\n\n // Already visited? update last visit\n if ($visit) {\n\n $visit->last_visit = now();\n $visit->save();\n\n // Success\n return;\n }\n\n // New visit\n $tracking->create([\n 'deal_id' => $deal->id,\n 'ip' => $ip,\n 'provider' => $tracker->provider,\n 'countryCode' => $tracker->countryCode,\n 'countryName' => $tracker->countryName,\n 'state' => $tracker->state,\n 'city' => $tracker->city,\n 'continent' => $tracker->continent,\n 'longitutde' => $tracker->longitutde,\n 'latitude' => $tracker->latitude,\n 'browserName' => $tracker->browserName,\n 'browserVersion' => str_replace('_', '.', $tracker->browserVersion),\n 'browserLanguage' => $request->language,\n 'platformName' => $tracker->platformName,\n 'platformVersion' => str_replace('_', '.', $tracker->platformVersion),\n 'isPhone' => $tracker->isPhone,\n 'isTablet' => $tracker->isTablet,\n 'isDesktop' => $tracker->isDesktop,\n 'isRobot' => $tracker->isRobot,\n 'robotName' => $tracker->robotName,\n 'deviceName' => $tracker->deviceName,\n 'screenWidth' => $request->width,\n 'screenHeight' => $request->height,\n 'referrer' => $tracker->referrer,\n 'referrerDomain' => $tracker->referrerDomain,\n 'searchEngineKeyword' => $tracker->searchEngineKeyword,\n 'first_visit' => $tracker->first_visit,\n 'last_visit' => $tracker->last_visit\n ]);\n\n // Success\n return;\n\n }", "public function record(string $command, bool $hit = false): void\n {\n $this->recorder->addRecord($command, $this, $hit);\n }", "public function AddHit($pageID)\n {\n if (self::IGNORE_SEARCH_BOTS && $this->IsSearchBot())\n return false;\n if (in_array($_SERVER['REMOTE_ADDR'], $this->IP_IGNORE_LIST))\n return false;\n if (\n self::HONOR_DO_NOT_TRACK &&\n isset($_SERVER['HTTP_DNT']) && $_SERVER['HTTP_DNT'] == \"1\"\n ) {\n return false;\n }\n\n $this->Cleanup();\n if ($this->UniqueHit($pageID)) {\n $this->CountHit($pageID, true);\n $this->LogHit($pageID);\n }\n $this->CountHit($pageID, false);\n\n return true;\n }", "function collectAction( KalturaStatsEvent $event )\r\n\t{\r\n\t\t$evenLogFullPath = kConf::get ( \"event_log_file_path\" );\r\n\t\t\r\n\t\t// if no file path - do nothing\r\n\t\tif ( ! $evenLogFullPath ) return;\r\n\t\t\r\n\t\t$http_referrer = isset ( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : \"\";\r\n\t\t\r\n\t\t$users_timestamp = $event->eventTimestamp;\r\n\t\t\r\n\t\t$eventLine = \r\n\t\t\t$event->clientVer . self::SEPARATOR \r\n\t\t\t. $event->eventType . self::SEPARATOR\r\n\t\t\t. date ( \"Y-m-d H:i:s\" , time() ) . self::SEPARATOR // use server time\r\n\t\t\t. $event->sessionId . self::SEPARATOR\r\n\t\t\t. $event->partnerId . self::SEPARATOR\r\n\t\t\t. $event->entryId . self::SEPARATOR\r\n\t\t\t. $event->uniqueViewer . self::SEPARATOR\r\n\t\t\t. $event->widgetId . self::SEPARATOR\r\n\t\t\t. $event->uiconfId . self::SEPARATOR\r\n\t\t\t. $event->userId . self::SEPARATOR\r\n\t\t\t. $event->currentPoint . self::SEPARATOR\r\n\t\t\t. $event->duration . self::SEPARATOR\r\n\t\t\t. requestUtils::getRemoteAddress() . self::SEPARATOR\r\n\t\t\t. $event->processDuration . self::SEPARATOR\r\n\t\t\t. $event->controlId . self::SEPARATOR\r\n\t\t\t. $event->seek . self::SEPARATOR\r\n\t\t\t. $event->newPoint . self::SEPARATOR\r\n\t\t\t. ( $event->referrer ? $event->referrer : \"\" )\t. self::SEPARATOR\t// duw to the way flash sends the referrer - allow it to override\r\n\t\t\t. $users_timestamp . self::SEPARATOR\r\n\t\t\t. PHP_EOL \r\n\t\t;\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$res = $this->writeToFile ( $evenLogFullPath , $eventLine);\r\n\t\t\tif ( ! $res )\r\n\t\t\t\tKalturaLog::err( \"Error while trying to write event to log. Event:\\n\". $eventLine );\r\n }\r\n catch ( Exception $ex )\r\n {\r\n \tKalturaLog::err( \"Error while trying to write event to log. Event:\\n\". $eventLine );\t\r\n }\r\n\t\treturn true;\r\n\t}", "function logevent($action) {\n require 'mgstats.php';\n //Pull the username or enter \"Not Logged In\"\n if($_SESSION['username']) { $remoteUN = $_SESSION['username']; } else { $remoteUN = \"Not Logged In\"; } \n $logTime = date('Y-m-d H:i:s'); //Establish Log time.\n $sid = session_id(); //Session ID\n $entry = $logTime.\"|\".$action.\"|\".$_SERVER['REMOTE_ADDR'].\"|\".$_SERVER['HTTP_USER_AGENT'].\"|\".$remoteUN.\"|\".$sid.\"\\n\"; //Create the variable for log entry\n $filename = \"logs/\".date('Y-m-d').\".log\"; //Build filename, changes by day.\n file_put_contents($filename,$entry, FILE_APPEND); //Appends the entry to the log file.\n return;\n}", "function track(){\n\n\t\tif($params = $this->getURLParams()) {\n\n\t\t\t//different link versions, for maintaining backwards compatability\n\t\t\tif(isset($params['Version']) && $params['Version'] == \"v2\"){\n\n\t\t\t\tif($decrypted = $this->decryptHash()){\n\n\t\t\t\t\tif($recipient = DataObject::get_one(\"Newsletter_SentRecipient\",\"\\\"Email\\\" = '\".$decrypted['e'].\"' AND \\\"ParentID\\\" = \".$decrypted['nl'])){\n\t\t\t\t\t\t$recipient->recordClick();\n\t\t\t\t\t}\n\t\t\t\t\tif(isset($decrypted['l']) && is_numeric($decrypted['l']) && $link = DataObject::get_by_id('Newsletter_TrackedLink', (int)$decrypted['l'])){\n\t\t\t\t\t\t$link->recordClick();\n\t\t\t\t\t\treturn $this->redirect($link->Original, 301);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}elseif(isset($params['Hash']) && ($hash = Convert::raw2sql($params['Hash']))) {\n\t\t\t\t$link = DataObject::get_one('Newsletter_TrackedLink', \"\\\"Hash\\\" = '$hash'\");\n\t\t\t\tif($link) {\n\t\t\t\t\t// check for them visiting this link before\n\t\t\t\t\t$link->recordClick();\n\t\t\t\t\treturn $this->redirect($link->Original, 301);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn $this->httpError(404);\n\t}", "public function store(HealthStatisticRequest $request)\n {\n //save statistics\n app(\"HealthOrgStatistic\")->saveStatistic($request, auth()->guard('business')->id());\n \n return redirect(route('business.healthorg.statistics'));\n }", "function hit(){\r\n\t\t$query = \"UPDATE #__rsgallery2_galleries SET hits = hits + 1 WHERE id = {$this->id}\";\r\n\t\t\r\n\t\t$db = &JFactory::getDBO();\r\n\t\t$db->setQuery( $query );\r\n\t\t\r\n\t\tif( !$db->query() ) {\r\n// \t\t\t$this->setError( $db->getErrorMsg() );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->hits++;\r\n\t}", "function feuserloginsystem_updateUserStatisticEntry() {\r\n\r\n # Get existing statistic information for the current user and session.\r\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\r\n\t\t\t'uid,feuserid,sessionstart,lastpageview,pagecounter,pagetracking',\r\n\t\t\t'tx_feuserloginsystem_userstatistics',\r\n\t\t\tsprintf('feuserid=\\'%s\\'',addslashes(intval($this->fe_user->user[\"uid\"]))),\r\n\t\t\t'',\r\n\t\t\t'sessionstart DESC',\r\n\t\t\t'1'\r\n \t);\r\n \t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\r\n\r\n \t# Existing statistic information could be found.\r\n \tif(is_array($row)) {\r\n\r\n $timeStamp = time();\r\n\r\n # Unserialize page tracking information.\r\n $pagetrackingArray = unserialize($row['pagetracking']);\r\n # Add new page tracking information to the already existing page tracking information.\r\n $pagetrackingArray[] = array('time' => $timeStamp, 'pageID' => intval($this->id));\r\n\r\n\t\t\t#Update commom information for statistics.\r\n\t\t $insertDataArray = array();\r\n\t\t $insertDataArray['lastpageview'] = $timeStamp;\r\n\t\t $insertDataArray['pagecounter'] = intval($row['pagecounter'] + 1);\r\n\t\t $insertDataArray['pagetracking'] = serialize($pagetrackingArray);\r\n\r\n\t\t # Update statistic information in the database.\r\n $GLOBALS['TYPO3_DB']->exec_UPDATEquery(\r\n 'tx_feuserloginsystem_userstatistics',\r\n sprintf('uid=\\'%s\\'',addslashes(intval($row['uid']))),\r\n $insertDataArray\r\n );\r\n\r\n }\r\n\r\n }", "public function reportAction() {\n parent::reportAction();\n }", "public function insertStats()\n {\n if (in_array($_SERVER['REQUEST_URI'], $this->Ignore)) {\n return false;\n }\n\n $query = \"\n INSERT INTO\n \" . $this->tableName . \"(\n stat_date,\n session_id,\n stat_url,\n http_host,\n http_user_agent,\n http_accept,\n user_language,\n request_method,\n http_connection,\n http_referer,\n remote_addr,\n request_uri,\n page,\n server_protocol,\n user_id)\n VALUES(\n '\" . Date::UTC2MySQLDateTime() . \"',\n '\" . $this->EscapeString(session_id()) . \"',\n '\" . $this->EscapeString(\"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) . \"',\n '\" . $this->EscapeString($_SERVER['HTTP_HOST']) . \"',\n '\" . $this->EscapeString($_SERVER['HTTP_USER_AGENT']) . \"',\n '\" . $this->EscapeString($_SERVER['HTTP_ACCEPT']) . \"',\n '\" . $this->EscapeString($_SERVER['HTTP_ACCEPT_LANGUAGE']) . \"',\n '\" . $this->EscapeString($_SERVER['REQUEST_METHOD']) . \"',\n '\" . $this->EscapeString($_SERVER['HTTP_CONNECTION']) . \"',\n '\" . $this->EscapeString($_SERVER['HTTP_REFERER']) . \"',\n '\" . $this->EscapeString(Network::getip()) . \"',\n '\" . $this->EscapeString($_SERVER['REQUEST_URI']) . \"',\n '\" . $this->EscapeString($_SERVER['PHP_SELF']) . \"',\n '\" . $this->EscapeString($_SERVER['SERVER_PROTOCOL']) . \"',\n '\" . $this->EscapeString($this->current_user['user_id']) . \"')\";\n\n return $this->InsertData($query);\n }", "public function tracking() {\n\n\t\t// Return if user is logged in\n\t\tif ( is_user_logged_in() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Display tracking code\n\t\tif ( $tracking = get_theme_mod( 'tracking' ) ) {\n\t\t\techo $tracking;\n\t\t}\n\n\t}", "public static function saveStats()\r\n {\r\n }", "public function logUser()\n {\n if (!$this->limpid->visitCounterManager->getEntry($_SERVER['REMOTE_ADDR']))\n $this->limpid->visitCounterManager->logUser($_SERVER['REMOTE_ADDR']);\n else\n $this->limpid->visitCounterManager->editEntry($_SERVER['REMOTE_ADDR'], ['last_visit' => date('Y-m-d H:i:s')]);\n }", "public function onStats(TransferStats $stats): void\n {\n }", "public function run()\n {\n Statistic::insert([\n 'visits_count'=>0,\n 'docs_count'=>0,\n 'generating_number_count'=>0,\n 'messages_sent_count'=>0\n ]);\n }", "public function recordAction() {\n\t\t \t\t\t\t\n\t\t\n\t}", "public function tracking_field() {\n\t\techo cyprus_get_settings( 'mts_analytics_code' );\n\t}", "function counterHits(){\n\tglobal $pth; include($pth['app']['globals']);\n\t$count \t\t= '';\n\t$counterHits= $pth['site']['counterHits'];\n\tclearstatcache();\n\tif(!is_file($counterHits)){ $handle\t= fopen($counterHits,'w'); fwrite($handle,'0'); fclose($handle); }\n\t// get current Hits + count\n\t$count\t= file_get_contents($counterHits);\n\tif(!$adm){\n\t\t$count = $count+1;\n\t\t// save Hits\n\t\t$files = fopen($counterHits,'w'); \n\t\tfwrite($files,$count);\n\t\tfclose($files);\n\t}\n\t\n\treturn '<p><strong>'.$count.'</strong> '.$txt['counterHits']['views'].'.</p>';\n}", "public function recordAnalytics($icid, $url, $repoICID) {\n $sql = \"INSERT INTO outbound_link (ic_id, url, repo_ic_id) VALUES ($1, $2, $3)\";\n $result = $this->sdb->query($sql, array($icid, $url, $repoICID));\n }", "public function track($id)\n\t{\n\t\tif (app::is_ajax())\n\t\t{\n\t\t\t$rownd = new stdClass();\n\t\t\t$rownd->id = $id;\n\t\t\t$rownd->last_visited = date('Y-m-d H:i:s');\n\t\t\t$this->rownd->save($rownd);\n\t\t\t$this->output->set_content_type('application/json')\n\t\t\t\t\t\t ->set_output(json_encode(array('last_visited'=>'Last Rownd: '. date(\"m/d/Y @ h:i a\", strtotime($rownd->last_visited)))));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect('/');\n\t\t}\n\t}", "public function addActionsStats() {\n //$this->hooks_stats[]= array ( \"hook\" => \"wp_login\", \"method\" =>array($this->session, \"wp_login\") );\n //$this->hooks_stats[]= array ( \"hook\" => \"wp_enqueue_scripts\", \"method\" =>array(\"Wolive_ajax\", \"addFrontEndScripts\") );\n //$this->hooks_stats[]= array ( \"hook\" => \"wp_ajax_wostats\", \"method\" =>array(\"Wolive_session\", \"ajaxFrontEnd\") );\n //$this->hooks_stats[]= array ( \"hook\" => \"wp_ajax_nopriv_wostats\", \"method\" =>array(\"Wolive_session\", \"ajaxFrontEnd\") );\n }", "public function hit();", "public function hit()\n {\n app(RateLimiter::class)->hit($this->rateLimiterKey, $this->decayTime);\n }", "public function overviewAction(){\n \t$analytics = new Pas_Analytics_Gateway($this->_ID, $this->_pword);\n \t$analytics->setProfile(25726058);\n \t$timeframe = new Pas_Analytics_Timespan(); \n $timeframe->setTimespan($this->_getParam('timespan'));\n \t$dates = $timeframe->getDates();\n \t$analytics->setStart($dates['start']);\n \t$analytics->setEnd($dates['end']);\n \t$analytics->setMetrics(\n array(\n Zend_Gdata_Analytics_DataQuery::METRIC_VISITORS,\n Zend_Gdata_Analytics_DataQuery::METRIC_PAGEVIEWS,\n Zend_Gdata_Analytics_DataQuery::METRIC_UNIQUE_PAGEVIEWS,\n Zend_Gdata_Analytics_DataQuery::METRIC_AVG_TIME_ON_PAGE,\n Zend_Gdata_Analytics_DataQuery::METRIC_ENTRANCES,\n Zend_Gdata_Analytics_DataQuery::METRIC_EXITS,\n Zend_Gdata_Analytics_DataQuery::METRIC_BOUNCES\n \t\t));\n \t$analytics->setDimensions(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_TITLE,\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH,\t\t\n \t\t));\n \tif(is_null($this->_getParam('filter'))){\n \t$analytics->setFilters(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH \n . Zend_Gdata_Analytics_DataQuery::REGULAR_NOT . 'forum'\n\t ));\n\t } else {\n \t$analytics->setFilters(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH \n . Zend_Gdata_Analytics_DataQuery::REGULAR . '/'\n . $this->_getParam('filter')\n\t ));\n\t }\n \t$analytics->setMax(20);\n \t$analytics->setSort(Zend_Gdata_Analytics_DataQuery::METRIC_VISITORS);\n \t$analytics->setSortDirection(true);\n \t$analytics->setStartIndex($this->getStart());\n \t$this->view->results = $analytics->getData();\n $paginator = Zend_Paginator::factory((int)$analytics->getTotal());\n $paginator->setCurrentPageNumber((int)$this->getPage())\n\t\t\t->setItemCountPerPage((int)self::MAX_RESULTS);\n $this->view->paginator = $paginator;\n }", "function hit(&$Model, $key = null, $settings = null)\n\t{\n\t\t$_settings = array();\n\n\t\tif (isset($this->settings[$Model->alias]))\n\t\t\t$_settings = $this->settings[$Model->alias];\n\n\t\tif (is_array($settings))\n\t\t\t$_settings = array_merge($_settings, $settings);\n\n\t\tif (!isset($_settings['hitField']) || !isset($_settings['keyField']))\n\t\t{\n\t\t\t$this->log('Miscofigured hitcount behavior!', LOG_WARNING);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$Model->hasField($_settings['keyField']))\n\t\t\treturn;\n\n\t\tif (!$Model->hasField($_settings['hitField']))\n\t\t\treturn;\n\n\t\tif (empty($key))\n\t\t\t$key = $Model->id;\n\n\t\tif (empty($key))\n\t\t{\n\t\t\t$this->log('Invalid call to hitcount behavior!', LOG_WARNING);\n\t\t\treturn;\n\t\t}\n\n\t\t$Model->updateAll\n\t\t\t(\n\t\t\t\tarray ($_settings['hitField'] => $Model->alias.'.'.$_settings['hitField'].' + 1'),\n\t\t\t\tarray ($Model->alias.'.'.$_settings['keyField'] => $key)\n\t\t\t);\n\t}", "public function requestAnalysis() {\n $this->getTransaction()->tagAsAnalysisSent($this);\n }", "function wyz_business_stats_visits() {\n\tif ( ! isset($_POST['id']) || ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'wyz_ajax_custom_nonce' ) )\n\t\treturn;\n\t$id = esc_html( $_POST['id'] );\n\tif( false === get_post_status( $id ) )\n\t\treturn;\n\tWyzHelpers::maybe_increment_business_visits( $id );\n\twp_die();\n}", "function trackUser($message)\n{\n $fp = fopen('jammer_log.txt', 'a');\n fwrite($fp, $_SERVER[REMOTE_ADDR].\" \". date('Y-m-d H:i:s').\" \".$message.\"\\n\"); \n fclose($fp);\n\n $hit = track($_SERVER[REMOTE_ADDR]);\n return $hit;\n}", "public function executeReport(sfWebRequest $request)\n {\n\t\t$this->printAndReport($request);\n\t\t$this->random=sha1(time());\n\t\t\n\t\t$this->getUser()->setAttribute($this->random, $this->specimensearch);\n }", "public function statisticAction() {\n\t\t\t// @TODO: Check toArray\n\t\t$results = $this->resultRepository->findByFeuser((int) $GLOBALS['TSFE']->fe_user->user['uid'])->toArray();\n\t\t$this->view->assign('results', $results);\n\t\t$this->view->assign('page', $this->settings['certificate']['detailPid']);\n\t}", "public function addStat($statData);", "public function log_view() {\n \\filter_embedquestion\\event\\question_viewed::create(['context' => $this->embedlocation->context,\n 'objectid' => $this->current_question()->id])->trigger();\n }", "function trackPageView() {\n $timeStamp = time();\n $domainName = $_SERVER[\"SERVER_NAME\"];\n if (empty($domainName)) {\n $domainName = \"\";\n }\n\n // Get the referrer from the utmr parameter, this is the referrer to the\n // page that contains the tracking pixel, not the referrer for tracking\n // pixel.\n $documentReferer = $_GET[\"utmr\"];\n if (empty($documentReferer) && $documentReferer !== \"0\") {\n $documentReferer = \"-\";\n } else {\n $documentReferer = urldecode($documentReferer);\n }\n $documentPath = $_GET[\"utmp\"];\n if (empty($documentPath)) {\n $documentPath = \"\";\n } else {\n $documentPath = urldecode($documentPath);\n }\n\n $account = $_GET[\"utmac\"];\n $userAgent = $_SERVER[\"HTTP_USER_AGENT\"];\n if (empty($userAgent)) {\n $userAgent = \"\";\n }\n\n // Try and get visitor cookie from the request.\n $cookie = isset($_COOKIE[COOKIE_NAME]) ? $_COOKIE[COOKIE_NAME] : '';\n\n $dcmguid = isset($_SERVER[\"HTTP_X_DCMGUID\"]) ? $_SERVER[\"HTTP_X_DCMGUID\"] : '';\n $visitorId = getVisitorId(\n $dcmguid, $account, $userAgent, $cookie);\n\n // Always try and add the cookie to the response.\n setrawcookie(\n COOKIE_NAME,\n $visitorId,\n $timeStamp + COOKIE_USER_PERSISTENCE,\n COOKIE_PATH);\n\n $utmGifLocation = \"http://www.google-analytics.com/__utm.gif\";\n\n // Construct the gif hit url.\n $utmUrl = $utmGifLocation . \"?\" .\n \"utmwv=\" . VERSION .\n \"&utmn=\" . getRandomNumber() .\n \"&utmhn=\" . urlencode($domainName) .\n \"&utmr=\" . urlencode($documentReferer) .\n \"&utmp=\" . urlencode($documentPath) .\n \"&utmac=\" . $account .\n \"&utmcc=__utma%3D999.999.999.999.999.1%3B\" .\n \"&utmvid=\" . $visitorId .\n \"&utmip=\" . getIP($_SERVER[\"REMOTE_ADDR\"]);\n\n sendRequestToGoogleAnalytics($utmUrl);\n\n // If the debug parameter is on, add a header to the response that contains\n // the url that was used to contact Google Analytics.\n if (!empty($_GET[\"utmdebug\"])) {\n header(\"X-GA-MOBILE-URL:\" . $utmUrl);\n }\n // Finally write the gif data to the response.\n writeGifData();\n }", "private function add_to_log($action) {\n if ($action) {\n $event = \\mod_simplecertificate\\event\\course_module_viewed::create(\n array(\n 'objectid' => $this->get_course_module()->instance,\n 'context' => $this->get_context(),\n 'other' => array('certificatecode' => $this->get_issue()->code)));\n $event->add_record_snapshot('course', $this->get_course());\n }\n\n if (!empty($event)) {\n $event->trigger();\n }\n }", "function __cachedCustomerAccountLog()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //create array containg all post data in format:: array('name'=>$this->input->post('name));\n $search_array = array();\n foreach ($_POST as $key => $value) {\n $search_array[$key] = $this->input->post($key);\n }\n\n //save serch query in database & get id of database record\n $search_id = $this->input->save_query($search_array);\n\n //change url to \"list\" and redirect with cached search id.\n redirect(\"admin/customer/account/$search_id\");\n\n }", "function record_incident($tag,$email,$message){\n $query = \"INSERT INTO HISTORY (TIME,TAG,EMAIL,MESSAGE) VALUES (\" . time() . \",'\" . $tag . \"','\" . $email . \"','\" . $message . \"')\" ; \n if(!$this->query($query)) return false;\n return true;\t \n }", "public function send() {\n\n\t\t$current_time = time();\n\t\tif ( ! $this->should_send_tracking( $current_time ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$collector = $this->get_collector();\n\n\t\t$request = new WPSEO_Remote_Request( $this->endpoint );\n\t\t$request->set_body( $collector->get_as_json() );\n\t\t$request->send();\n\n\t\tupdate_option( $this->option_name, $current_time, 'yes' );\n\t}", "public function logPerformance();", "public function logPerformance();", "public static function trackBookmarkVisit(){\r\n\t\tif(self::isBookmarkVisit()) {\r\n\t\t\t$bookmark_count = self::getBookmarkCount();\r\n\t\t\tif($bookmark_count > 10) {\r\n\t\t\t\t$bookmark_count = '10+';\r\n\t\t\t}\r\n\t\t\t$bookmark_position = Helper_Request::getRequest('fb_bmpos', '', 'STR');\r\n\t\t\t$bookmark_source = Helper_Request::getRequest('fb_source', '', 'STR');\r\n\t\t\tif($bookmark_position != '' && $bookmark_source != '') {\r\n\t\t\t\t$position_prepend = $bookmark_source == 'bookmarks_apps' ? 'apps_' : 'favs_';\r\n\t\t\t\t$position_parts = explode('_', $bookmark_position);\r\n\t\t\t\tif(count($position_parts) == 2) {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function recordUser($action) {\n $data = array(\n 'class_name' => $this->getClassName(),\n 'object_id' => $this->id,\n 'user_id' => Auth::user()->id,\n 'action' => $action\n );\n $this->user_counters()->updateOrCreate($data, $data);\n }", "public function track_extensions_page() {\n\t\t// phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification\n\t\t$event = 'extensions_view';\n\t\t$properties = array(\n\t\t\t'section' => empty( $_REQUEST['section'] ) ? '_featured' : wc_clean( wp_unslash( $_REQUEST['section'] ) ),\n\t\t);\n\n\t\tif ( ! empty( $_REQUEST['search'] ) ) {\n\t\t\t$event = 'extensions_view_search';\n\t\t\t$properties['search_term'] = wc_clean( wp_unslash( $_REQUEST['search'] ) );\n\t\t}\n\t\t// phpcs:enable\n\n\t\tWC_Tracks::record_event( $event, $properties );\n\t}", "public function addHits(\\iface\\ExperimentInfo\\HitsEntry $value){\n return $this->_add(3, $value);\n }", "public function daam_track_click()\n {\n\n //check the referer\n if ( ! check_ajax_referer('daam', 'security', false)) {\n echo \"Invalid AJAX Request\";\n die();\n }\n\n //get the data\n $post_id = $_POST['post_id'];\n $autolink_id = $_POST['autolink_id'];\n $user_ip = $_SERVER[\"REMOTE_ADDR\"];\n\n //get the minimum interval\n $minimum_interval = intval(get_option($this->shared->get('slug') . \"_tracking_minimum_interval\"), 10);\n\n //verify if there are tracked clicks submitted in the last $minimum_interval seconds\n global $wpdb;\n $table_name = $wpdb->prefix . $this->shared->get('slug') . \"_tracking\";\n $past_time_gmt = date(\"Y-m-d H:i:s\", current_time('timestamp', 1) - $minimum_interval);\n $current_time_gmt = current_time('mysql', 1);\n $safe_sql = $wpdb->prepare(\"SELECT COUNT(*) FROM $table_name WHERE user_ip = %s AND date_gmt BETWEEN %s AND %s\",\n $user_ip, $past_time_gmt, $current_time_gmt);\n $number_of_records = $wpdb->get_var($safe_sql);\n\n if (intval($number_of_records, 10) > 0) {\n echo 'rejected';\n die();\n }\n\n //save the click\n global $wpdb;\n $table_name = $wpdb->prefix . $this->shared->get('slug') . \"_tracking\";\n $safe_sql = $wpdb->prepare(\"INSERT INTO $table_name SET \n post_id = %d,\n autolink_id = %d,\n user_ip = %s,\n date = %s,\n date_gmt = %s\",\n $post_id,\n $autolink_id,\n $user_ip,\n current_time('mysql', 0),\n current_time('mysql', 1)\n );\n\n $query_result = $wpdb->query($safe_sql);\n\n if ($query_result !== false) {\n echo \"saved\";\n } else {\n echo \"error\";\n }\n\n die();\n\n }", "public function visited() {\n // Checking if there's no data in the database - if not, will insert the new view.\n if (!$this->psm->hasdata(\"SELECT id FROM artist_views WHERE artist_id = :ref AND ip = :ip\",[\n ':ref' => $this->data['id'],\n ':ip' => $_SERVER['REMOTE_ADDR']\n ])) {\n $view = true;\n }\n\n // But if not, we must check if it was more than 2 minutes ago or not - if so, we can add! Vice versa.\n else {\n $set = $this->psm->set(\"SELECT timeadded FROM artist_views WHERE artist_id = :ref AND ip = :ip ORDER BY id DESC LIMIT 1\",[\n ':ref' => $this->data['id'],\n ':ip' => $_SERVER['REMOTE_ADDR']\n ]);\n $view = ((time()-$set['timeadded'])/60 > 2)?true:false;\n }\n\n // Finally, if we have decided there's need for the view to be added, execute!\n if ($view) {\n $this->psm->insert('artist_views', [\n 'artist_id' => $this->data['id'],\n 'ip' => $_SERVER['REMOTE_ADDR'],\n 'timeadded' => time()\n ]);\n }\n }", "public function AddStatistics($EventName) {\n\n $this->Stats[$EventName]= ($this->Stats[$EventName] ?? 0) + 1;\n }", "public function onTrackPlayed(){\n $this->request->validate([\n 'type' => 'string|in:song,episode',\n ]);\n\n if($this->request->input('type') == 'song') {\n $song = Song::findOrFail($this->request->input('id'));\n $song->increment('plays');\n if(isset($song->artists[0])) {\n $artist_id = $song->artists[0]->id;\n //Insert song statistic\n DB::statement(\"INSERT INTO \" . DB::getTablePrefix() . \"popular (`song_id`, `artist_id`, `plays`, `created_at`) VALUES (\" . intval($song->id). \", '\" . $artist_id . \"', '1', '\" . Carbon::now() . \"') ON DUPLICATE KEY UPDATE plays=plays+1\");\n }\n\n if ($song->user_id && config('settings.monetization') && Role::getUserValue('monetization_streaming', $song->user_id)) {\n\n if ($song->user_id && config('settings.monetization') && Role::getUserValue('monetization_streaming', $song->user_id)) {\n if(request()->ip()) {\n if(! Stream::where('streamable_id', $song->id)->where('streamable_type', (new Song)->getMorphClass())->where('ip', request()->ip())->exists()) {\n $revenue = Role::getUserValue('monetization_streaming_rate', $song->user_id);\n $steam = new Stream();\n $steam->user_id = $song->user_id;\n $steam->streamable_id = $song->id;\n $steam->streamable_type = (new Song)->getMorphClass();\n $steam->revenue = $revenue;\n $steam->ip = request()->ip();\n $steam->save();\n $song->user()->increment('balance', $revenue);\n }\n }\n }\n\n }\n\n if(auth()->check())\n {\n if($song->user_id) {\n $song->user()->increment('balance', Role::getUserValue('monetization_streaming_rate', $song->user_id));\n }\n makeActivity(auth()->user()->id, $song->id, (new Song)->getMorphClass(), 'playSong', $song->id);\n History::updateOrCreate(\n [\n 'user_id' => auth()->user()->id,\n 'historyable_id' => $song->id,\n 'historyable_type' => (new Song)->getMorphClass(),\n ],\n [\n 'created_at' => Carbon::now(),\n 'ownerable_type' => (new Artist)->getMorphClass(),\n 'ownerable_id' => isset($song->artists[0]) ? $song->artists[0]->id : null,\n 'interaction_count' => DB::raw('interaction_count + 1')\n ]\n );\n }\n\n return response()->json(array('success' => true));\n\n } else {\n $episode = Episode::findOrFail($this->request->input('id'));\n $episode->increment('plays');\n\n if ($episode->user_id && config('settings.monetization') && Role::getUserValue('monetization_streaming', $episode->user_id)) {\n if(request()->ip()) {\n if(! Stream::where('streamable_id', $episode->id)->where('streamable_type', (new Episode)->getMorphClass())->where('ip', request()->ip())->exists()) {\n $revenue = Role::getUserValue('monetization_streaming_rate', $episode->user_id);\n $steam = new Stream();\n $steam->user_id = $episode->user_id;\n $steam->streamable_id = $episode->id;\n $steam->streamable_type = (new Episode)->getMorphClass();\n $steam->revenue = $revenue;\n $steam->ip = request()->ip();\n $steam->save();\n $episode->user()->increment('balance', $revenue);\n }\n }\n }\n\n return response()->json(array('success' => true));\n }\n }", "public function _report_view()\n\t{\n\t\t$incident_id = Event::$data;\n\t\tif ($incident_id)\n\t\t{\n\t\t\t$actionable = ORM::factory('actionable')\n\t\t\t\t->where('incident_id', $incident_id)\n\t\t\t\t->find();\n\t\t\tif ($actionable->loaded)\n\t\t\t{\n\t\t\t\tif ($actionable->actionable)\n\t\t\t\t{\n\t\t\t\t\t$report = View::factory('actionable_report');\n\t\t\t\t\t$report->actionable = $actionable->actionable;\n\t\t\t\t\t$report->action_taken = $actionable->action_taken;\n\t\t\t\t\t$report->action_summary = $actionable->action_summary;\n\t\t\t\t\t$report->render(TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function track()\n {\n return self::$driver->track();\n }", "function add_views_tracking($rel_type, $rel_id)\n{\n $CI =& get_instance();\n if (!is_staff_logged_in()) {\n $CI->db->where('rel_id', $rel_id);\n $CI->db->where('rel_type', $rel_type);\n $CI->db->order_by('id', 'DESC');\n $CI->db->limit(1);\n $row = $CI->db->get('tblviewstracking')->row();\n if ($row) {\n $dateFromDatabase = strtotime($row->date);\n $date1HourAgo = strtotime(\"-1 hours\");\n if ($dateFromDatabase >= $date1HourAgo) {\n return false;\n }\n }\n }\n\n do_action('before_insert_views_tracking', array(\n 'rel_id' => $rel_id,\n 'rel_type' => $rel_type\n ));\n\n $CI->db->insert('tblviewstracking', array(\n 'rel_id' => $rel_id,\n 'rel_type' => $rel_type,\n 'date' => date('Y-m-d H:i:s'),\n 'view_ip' => $CI->input->ip_address()\n ));\n}", "function tracking($uid, $activity, $module) \n{\n\t\n\tglobal $dbf;\n\n\t$running_no = '00001';\n\t\t\n\t$sql_select_tracking = \"SELECT MAX(track_id) AS track_id FROM base_tracking\";\n\t$sql_slct = $dbf;\n\t$sql_slct->query($sql_select_tracking);\n\t$sql_slct->next_record();\n\t\t\n\tif($sql_slct->num_rows($sql_select_tracking)== 0 || $sql_slct->f(\"track_id\")==NULL){\n\t\t$trackId = date(\"Ym\").$running_no;\n\t} else {\n\t \n $todate = date(\"Ym\");\n \n if($todate > substr($sql_slct->f(\"track_id\"),0,6)) {\n $trackId = $todate.$running_no;\n }\n else {\n\t\t $trackId = $sql_slct->f(\"track_id\") + 1;\n }\n\t}\n\t\t\t\n\t$sql_insert_track = \"INSERT INTO base_tracking (track_id, track_ip, track_agent, track_uid, track_activity, track_module, track_url, track_time) VALUES('$trackId','\".$_SERVER['REMOTE_ADDR'].\"','\".$_SERVER['HTTP_USER_AGENT'].\"','$uid', '$activity', '$module', '\".$_SERVER['SCRIPT_NAME'].\"', now())\"; \n\t\t\n\t$sql_ins = $dbf;\n\t$sql_ins->query($sql_insert_track);\n\t\t\t\t\n}", "public function track($categoryId, $ip);", "public function log_activity() {\n \n \n $CI =& get_instance();\n $CI->load->library('audit_trail');\n // Start off with the session stuff we know\n $data = array();\n $data['user_id'] = $CI->session->userdata('user_id');\n \n // Next up, we want to know what page we're on, use the router class\n $data['section'] = $CI->router->class;\n $data['action'] = $CI->router->method;\n \n // Lastly, we need to know when this is happening\n $data['when'] = date('Y-m-d G:i:s');\n \n // We don't need it, but we'll log the URI just in case\n $data['uri'] = uri_string();\n $path = realpath(APPPATH);\n // And write it to the database\n if($CI->router->method!='checkPortal' && $CI->router->method!='getAttendanceUpdates' && $CI->router->method!='getAverageDailyAttendance'):\n $CI->audit_trail->lfile($path.'/modules/logs/'.$CI->session->userdata('user_id').'.txt');\n $CI->audit_trail->lwrite($CI->session->userdata('name').' access '.$CI->router->method.' through '. uri_string().'.' , 'TRACE');\n endif;\n }", "public function send() {\n // listing was reported\n }", "public function track($id) {\n $data = array(\n \"status\" => \"tracked\"\n );\n $this->db->where(\"id\", $id);\n $this->db->update(\"violations\", $data);\n }", "public function log() {\n $_SESSION['dblog_overview_filter'] = array(\n 'type' => array(\n 'bc_subsites' => 'bc_subsites',\n ),\n 'severity' => array(),\n );\n return RedirectResponse::create(Url::fromRoute('dblog.overview', [\n 'type[]' => 'bc_subsites',\n ])->toString());\n }", "function apc_cache_shunt_log_redirect($false, $keyword) {\n\n\tif(defined('APC_CACHE_STATS_SHUNT')) {\n\t\tif(APC_CACHE_STATS_SHUNT == \"drop\") {\n\t\t\treturn true;\n\t\t} else if(APC_CACHE_STATS_SHUNT == \"none\"){\n\t\t\treturn false;\n\t\t}\n\t}\n\t// respect setting in YOURLS_NOSTATS. Why you'd want to enable the plugin and \n\t// set YOURLS_NOSTATS true I don't know ;)\n\tif ( !yourls_do_log_redirect() )\n\t\treturn true;\n\n\t// Initialise the time.\n\tif(!apc_exists(APC_CACHE_LOG_TIMER)) {\n\t\tapc_add(APC_CACHE_LOG_TIMER, time());\n\t}\n\t$ip = yourls_get_IP();\n\t$args = array(\n\t\tdate( 'Y-m-d H:i:s' ),\n\t\tyourls_sanitize_string( $keyword ),\n\t\t( isset( $_SERVER['HTTP_REFERER'] ) ? yourls_sanitize_url( $_SERVER['HTTP_REFERER'] ) : 'direct' ),\n\t\tyourls_get_user_agent(),\n\t\t$ip,\n\t\tyourls_geo_ip_to_countrycode( $ip )\n\t);\n\t\n\t// Separated out the calls to make a bit more readable here\n\t$key = APC_CACHE_LOG_INDEX;\n\t$logindex = 0;\n\t$added = false;\n\t\n\tif(!apc_exists($key)) {\n\t\t$added = apc_add($key, 0);\n\t} \n\t\n\n\t$logindex = apc_cache_key_increment($key);\n\n\t\n\t// We now have a reserved logindex, so lets cache\n\tapc_store(apc_cache_get_logindex($logindex), $args, APC_CACHE_LONG_TIMEOUT);\n\t\n\t// If we've been caching for over a certain amount do write\n\tif(apc_cache_write_needed('log')) {\n\t\t// We can add, so lets flush the log cache\n\t\tapc_cache_write_log();\n\t} \n\t\n\treturn true;\n}", "public function trackerAction()\n\t{\n\t\t$this->view->pagerName = 'tracker-page';\n\n\t\t$currentPage = ifset($this->_getAllParams(), $this->view->pagerName, 1);\n\t\t$this->view->totalEntries = $this->trackerService->getTotalEntries();\n\t\t// Get all projects\n\n\t\t$this->view->entries = $this->trackerService->getEntries(array(), $currentPage, 50);\n\t\t$this->renderView('admin/tracker.php');\n\t}", "function Save()\n\t{\n\t\t$Database = new DatabaseConnection();\n\t\t$this->pog_query = \"select `statsid` from `stats` where `statsid`='\".$this->statsId.\"' LIMIT 1\";\n\t\t$Database->Query($this->pog_query);\n\t\tif ($Database->Rows() > 0)\n\t\t{\n\t\t\t$this->pog_query = \"update `stats` set \n\t\t\t`objectname`='\".$Database->Escape($this->objectname).\"', \n\t\t\t`objectid`='\".$Database->Escape($this->objectid).\"', \n\t\t\t`impressions`='\".$Database->Escape($this->impressions).\"', \n\t\t\t`clicks`='\".$Database->Escape($this->clicks).\"' where `statsid`='\".$this->statsId.\"'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->pog_query = \"insert into `stats` (`objectname`, `objectid`, `impressions`, `clicks`) values (\n\t\t\t'\".$Database->Escape($this->objectname).\"', \n\t\t\t'\".$Database->Escape($this->objectid).\"', \n\t\t\t'\".$Database->Escape($this->impressions).\"', \n\t\t\t'\".$Database->Escape($this->clicks).\"' )\";\n\t\t}\n\t\t$Database->InsertOrUpdate($this->pog_query);\n\t\tif ($this->statsId == \"\")\n\t\t{\n\t\t\t$this->statsId = $Database->GetCurrentId();\n\t\t}\n\t\treturn $this->statsId;\n\t}", "function update_stats($type)\n{\n\tglobal $database;\n\n\t// INCREASE REQUESTED STAT VALUE\n\t$database->database_query(\"\n INSERT INTO se_stats\n (`stat_date`, `stat_{$type}`)\n VALUES\n (UNIX_TIMESTAMP(CURDATE()), 1) \n ON DUPLICATE KEY UPDATE\n `stat_{$type}`=`stat_{$type}`+1\n \");\n}", "function outputStatistics() {\n\t\trequire_once \"./Services/Tracking/classes/class.ilLMStatistics.php\";\n\n\t\tif ($_POST[\"stat\"] == 'u') { //Beobachtungsmodell starten\n\t\t\t$this->lm_statistics->outputApplet();\n\t\t} else { //Session-,Seiten-,Kapitelstats starten\n\t\t\t$this->lm_statistics->outputHTML();\n\t\t}\n\t}", "public function _report_view()\n\t{\n\t\t$incident_id = Event::$data;\n\t\tif ($incident_id)\n\t\t{\n\t\t\t$actionable = ORM::factory('actionable')\n\t\t\t\t->where('incident_id', $incident_id)\n\t\t\t\t->find();\n\t\t\tif ($actionable->loaded)\n\t\t\t{\n\t\t\t\tif ($actionable->actionable)\n\t\t\t\t{\n\t\t\t\t\t$report = View::factory('actionable_report');\n\t\t\t\t\t$report->actionable = $actionable->actionable;\n\t\t\t\t\t$report->action_taken = $actionable->action_taken;\n\t\t\t\t\t$report->action_summary = $actionable->action_summary;\n\t\t\t\t\t$report->action_date = $actionable->action_date;\n\t\t\t\t\t$report->resolution_summary = $actionable->resolution_summary;\n\t\t\t\t\t$report->resolution_date = $actionable->resolution_date;\n\t\t\t\t\t$report->render(TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function trackProfileUpdate(int $type)\n {\n $this->engagement->setType($type);\n $this->saveTracker();\n }", "public function Action_foo()\n\t{\n\t if (Kohana::$profiling === TRUE)\n\t {\n\t // Start a new benchmark\n\t $benchmark = Profiler::start('my_group', __FUNCTION__);\n\t }\n\t for($i=0;$i<1000000;$i++){\n\t \techo $i;\n\t }\n\t // Do some stuff\n\t if (isset($benchmark))\n\t {\n\t // Stop the benchmark\n\t Profiler::stop($benchmark);\n\t }\n\t echo View::factory('profiler/stats');\n\t}", "public function testIndexActionCanBeAccessed()\n {\n $this->elasticsearchClientMock->expects($this->once())\n ->method('getIndexStats')\n ->will($this->returnValue(array()));\n\n $serviceManager = $this->controller->getServiceLocator();\n $serviceManager->setAllowOverride(true);\n $serviceManager->setService('ElasticsearchManager', $this->elasticsearchClientMock);\n\n $this->routeMatch->setParam('action', 'index');\n\n $result = $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n\n $this->assertEquals(200, $response->getStatusCode());\n }" ]
[ "0.6572687", "0.64216864", "0.6278415", "0.62199825", "0.61919165", "0.6091253", "0.59876066", "0.59746367", "0.5839471", "0.58259034", "0.5744556", "0.56715214", "0.56668496", "0.5616951", "0.5609843", "0.5601164", "0.55535907", "0.555136", "0.55492556", "0.55422217", "0.55138075", "0.5503173", "0.54922414", "0.54806256", "0.54710513", "0.5451103", "0.54276633", "0.54107475", "0.5407347", "0.5360643", "0.5310014", "0.5293498", "0.5269197", "0.5240572", "0.52242106", "0.5212745", "0.5211985", "0.52112013", "0.52090526", "0.5207168", "0.51882255", "0.51638347", "0.5145691", "0.51429147", "0.5139256", "0.5137712", "0.5129444", "0.5125429", "0.5114527", "0.5114001", "0.51110965", "0.51057464", "0.5104387", "0.5077936", "0.50526196", "0.5048564", "0.504845", "0.50336486", "0.5026113", "0.50229853", "0.50225645", "0.5014789", "0.50017464", "0.49931213", "0.4992983", "0.49886468", "0.4986239", "0.49804515", "0.4975214", "0.49084112", "0.48980695", "0.48912323", "0.489061", "0.489061", "0.48844782", "0.48654652", "0.48598418", "0.4853156", "0.48284358", "0.4819613", "0.4818265", "0.4816705", "0.4811875", "0.48065618", "0.48016647", "0.48005915", "0.4793961", "0.47805566", "0.47774127", "0.47746658", "0.47697583", "0.47619763", "0.47606942", "0.47604334", "0.47598714", "0.47578943", "0.4747341", "0.47329104", "0.4732485", "0.47310132" ]
0.81755155
0
Display a listing of the resource.
public function index() { $check = etudiant::with(['user'])->where('user_id', Auth::id())->first(); $classe = classe::all(); if (!$check) { return view('student.index', compact('classe', 'check')); } else { $datesoutenace = etudiant::where('user_id', Auth::id())->with(['projet.soutenance'])->first(); if ($datesoutenace->projet === null) { return view('student.index', compact('classe', 'check', 'datesoutenace')); } else { $datereunion = Reunion::where('projet_id', $datesoutenace->projet->id)->get(); $data = []; foreach ($datereunion as $start) { array_push($data, [ 'title' => 'Reunion', 'id' => $start->id, 'start' => $start->dateReunion, 'message' => $start->message, ]); } $data = json_encode($data); return view('student.index', compact('classe', 'datesoutenace', 'check', 'data')); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET 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 //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { $projet = projet::with(['soutenance'])->where('etudiant_id', etudiant::where('user_id', Auth::id())->value('id'))->first(); return view('student.form.etat', compact('projet')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { etudiant::create([ 'user_id' => Auth::user()->id, 'CIN' => $request->input('CIN'), 'datenaissance' => $request->input('datenaissance'), 'ville' => $request->input('ville'), 'telephone' => $request->input('tele'), 'class_id' => $request->input('classe'), ]); Alert::success('succès', 'Votre operation a été effectuer avec succès'); return back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "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 }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "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}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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 }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "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 }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "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 }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "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 }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "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}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "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 }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "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 }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "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 }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "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 }", "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 }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "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 }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "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}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "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 }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "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 }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "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 }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "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 }", "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 }", "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 }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "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 }", "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 }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "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 }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "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 }", "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 }", "public function update(Entity $entity);", "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 }", "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}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "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 }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Create a new controller instance.
public function __construct(CategoryRepository $categories) { $this->categories = $categories; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_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\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private 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 $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 ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "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 }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Get Domain object by primry key
public function load($id){ $sql = 'SELECT * FROM cst_tech_req WHERE ID = ?'; $sqlQuery = new SqlQuery($sql); $sqlQuery->setNumber($id); return $this->getRow($sqlQuery); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function getObject($objKey);", "protected function objectForKey($key) {\n\t\tif ($this->keyField == 'ID') {\n\t\t\treturn ExternalContent::getDataObjectFor($key);\n\t\t} else {\n\t\t\treturn DataObject::get_one($this->sourceObject, \"\\\"{$this->keyField}\\\" = '\" . Convert::raw2sql($key) . \"'\");\n\t\t}\n\t}", "public function getByKey($key);", "function domain_get($key=NULL){\n if(is_null($key)) return NULL;\n if(is_null($key)) $key = $this->cumd;\n return isset($this->domains[$key])?$this->domains[$key]:NULL;\n }", "public function __get(string $key);", "public function __get($key)\n {\n return $this->getModel($key);\n }", "public function getObject($key) {\n\t\treturn $this->objects[$key];\n\t}", "public function __get($key);", "public function __get($key);", "public function getObject($key)\n\t{\n\t\treturn $this->objects[$key];\n\t}", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "abstract public function get($key);", "public function get( $key );", "public function getObjFromCache($key);", "abstract protected function retrieve($key);", "public static function Get($key) {\r\n\t\t$cls = get_called_class();\r\n\t\t$model = new $cls();\r\n\t\t$primary = $model->index('primary');\r\n\t\tif (is_null($primary)) {\r\n\t\t\tthrow new Exception(\"The schema for {$cls} does not identify a primary key\");\r\n\t\t}\r\n\t\tif (!is_array($key)) {\r\n\t\t\tif (count($primary['fields']) > 1) {\r\n\t\t\t\tthrow new Exception(\"The schema for {$cls} has more than one field in its primary key\");\r\n\t\t\t}\r\n\t\t\t$key = array(\r\n\t\t\t\t$primary['fields'][0] => $key\r\n\t\t\t);\r\n\t\t}\r\n\t\tforeach ($primary['fields'] as $field) {\r\n\t\t\tif (!isset($key[$field])) {\r\n\t\t\t\tthrow new Exception(\"No value provided for the {$field} field in the primary key for \" . get_called_class());\r\n\t\t\t}\r\n\t\t\t$model->where(\"{$field} = ?\", $key[$field]);\r\n\t\t}\r\n\t\t//$src = Dbi_Source::GetModelSource($model);\r\n\t\t$result = $model->select();\r\n\t\tif ($result->count()) {\r\n\t\t\tif ($result->count() > 1) {\r\n\t\t\t\tthrow new Exception(\"{$cls} returned multiple records for primary key {$id}\");\r\n\t\t\t}\r\n\t\t\t$record = $result[0];\r\n\t\t} else {\r\n\t\t\t$record = new Dbi_Record($model, null);\r\n\t\t\t$record->setArray($key, false);\r\n\t\t}\r\n\t\treturn $record;\r\n\t}", "public function fetchValue(string $domain, $key = NULL);", "public function get($strKey);", "abstract public function get ($key);", "public function obtenerObjeto($key){\n\t\tif(is_object(self::$objetos[$key])){\n\t\t\treturn self::$objetos[$key];\n\t\t} \n\t}", "public function getObject(string $key): ?object;", "function get($key) {\n return apc_fetch($key);\n }", "public function __get( $key )\n {\n $p = parent::__get( $key );\n if ( !is_null( $p ) ) {\n return $p;\n }\n\n switch ( $key ) {\n case 'oid':\n return $this->scale_no->value;\n break;\n case 'name':\n return $this->scale_name->value;\n break;\n case 'level':\n return $this->level_name->value;\n break;\n case 'start':\n case 't0':\n return $this->early_age->value;\n break;\n case 'end':\n case 't1':\n case 'tf':\n return $this->late_age->value;\n break;\n default:\n throw new \\DomainException( sprintf( 'Invalid property %s', $key ) );\n }\n\n return null;\n }", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public static function get($key);", "public static function get($key);", "function get($key) \n {\n return $this->$key;\n \n }", "protected function findPkSimple($key, $con)\n\t{\n\t\t$sql = 'SELECT ID, ROUTEID, PROVIDERID, PROVIDERNAME, NAMEZH, NAMEEN, PATHATTRIBUTEID, PATHATTRIBUTENAME, PATHATTRIBUTEENAME, BUILDPERIOD, DEPARTUREZH, DEPARTUREEN, DESTINATIONZH, DESTINATIONEN, REALSEQUENCE, DISTANCE, GOFIRSTBUSTIME, BACKFIRSTBUSTIME, GOLASTBUSTIME, BACKLASTBUSTIME, OFFPEAKHEADWAY FROM routes_2011 WHERE ID = :p0';\n\t\ttry {\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindValue(':p0', $key, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t} catch (Exception $e) {\n\t\t\tPropel::log($e->getMessage(), Propel::LOG_ERR);\n\t\t\tthrow new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);\n\t\t}\n\t\t$obj = null;\n\t\tif ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$obj = new Routes2011();\n\t\t\t$obj->hydrate($row);\n\t\t\tRoutes2011Peer::addInstanceToPool($obj, (string) $row[0]);\n\t\t}\n\t\t$stmt->closeCursor();\n\n\t\treturn $obj;\n\t}", "public function getPersistentObject($key)\n {\n if (!$this->loaded) {\n $this->load();\n }\n\n return $this->doGetPersistentObject($key);\n }", "function get( $key ){\r\n\t\treturn $this->$key;\r\n\t}", "public function getObject( $key )\r\n\t{\r\n\t\tif( is_object ( self::$objects[ $key ] ) )\r\n\t\t{\r\n\t\t\treturn self::$objects[ $key ];\r\n\t\t}\r\n\t}", "public function get($key)\n {\n return $this->find($key);\n }", "public function getItem($key){}", "public function findByKey($key)\n {\n return Page::where('key', $key)->first();\n }", "function get($key) {\n\t\t\treturn $this->inst->get($key);\n\t\t}", "public function query_get($key) {\n\t\t\treturn \\uri\\query::get($this->object, $key);\n\t\t}", "public function get($key) {\n\t\t\tif(!is_object($this->package) || !($this->package instanceof Object))\n\t\t\t\t$this->package = $this->getPackage();\n\t\t\t\n\t\t\treturn $this->package->get($key);\n\t\t}", "public function getClientByApiKeyAndDomain(string $apikey, string $domain) : ?\\stdClass {\n\t\t$dataOjb = $this->entityClient->getValuesAsObject();\n\t\t$dataOjb->apikey = $apikey;\n\t\tif ($domain !== 'self') {\n\t\t\t$dataOjb->domain = $domain;\n\t\t}\n\t\t$this->entityClient->populateState($dataOjb, true);\n\n\t\treturn $this->entityClient->get($this->entityClient->get('primaryKey')) ? $this->entityClient->getValuesAsObject() : null;\n\t}", "public function __get($key)\n {\n return apc_fetch($key);\n }", "public function getObject($key) {\n $get = $this->get($key);\n $get = unserialize($get);\n\t\treturn $get;\n\t}", "abstract public function getConcrete($key);", "protected function findPkSimple($key, $con)\n\t{\n\t\t$sql = 'SELECT `ID`, `TITULO`, `DURACION`, `FECHA_ESTRENO`, `ESTRENO`, `ACTOR1_NOM`, `ACTOR1_APELL`, `ACTOR2_NOM`, `ACTOR2_APELL`, `CATEGORIA_ID`, `ESTADO`, `SINOPSIS`, `IMAGEN` FROM `pelicula` WHERE `ID` = :p0';\n\t\ttry {\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindValue(':p0', $key, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t} catch (Exception $e) {\n\t\t\tPropel::log($e->getMessage(), Propel::LOG_ERR);\n\t\t\tthrow new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);\n\t\t}\n\t\t$obj = null;\n\t\tif ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$obj = new Pelicula();\n\t\t\t$obj->hydrate($row);\n\t\t\tPeliculaPeer::addInstanceToPool($obj, (string) $key);\n\t\t}\n\t\t$stmt->closeCursor();\n\n\t\treturn $obj;\n\t}", "protected function findPkSimple($key, $con)\n\t{\n\t\t$sql = 'SELECT `ID`, `NAME`, `VALUE`, `REMOTE` FROM `repository` WHERE `ID` = :p0';\n\t\ttry {\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindValue(':p0', $key, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t} catch (Exception $e) {\n\t\t\tPropel::log($e->getMessage(), Propel::LOG_ERR);\n\t\t\tthrow new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);\n\t\t}\n\t\t$obj = null;\n\t\tif ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$obj = new Repository();\n\t\t\t$obj->hydrate($row);\n\t\t\tRepositoryPeer::addInstanceToPool($obj, (string) $row[0]);\n\t\t}\n\t\t$stmt->closeCursor();\n\n\t\treturn $obj;\n\t}", "function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Especificacion',$k,$v); }", "protected function findPkSimple($key, $con)\n\t{\n\t\t$sql = 'SELECT `ID`, `USER_ID`, `NAME`, `DESCRIPTION`, `BARE_PATH`, `CLONE_PATH`, `FORKED_FROM_ID`, `FORKED_AT`, `CREATED_AT`, `UPDATED_AT` FROM `repository` WHERE `ID` = :p0';\n\t\ttry {\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindValue(':p0', $key, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t} catch (Exception $e) {\n\t\t\tPropel::log($e->getMessage(), Propel::LOG_ERR);\n\t\t\tthrow new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);\n\t\t}\n\t\t$obj = null;\n\t\tif ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$obj = new Repository();\n\t\t\t$obj->hydrate($row);\n\t\t\tRepositoryPeer::addInstanceToPool($obj, (string) $row[0]);\n\t\t}\n\t\t$stmt->closeCursor();\n\n\t\treturn $obj;\n\t}", "public function createDomainObject($key)\n {\n $domainClass = KernelRegistry::getDomainClass($key);\n if (false === $domainClass) {\n return false;\n }\n\n try {\n return new $domainClass();\n } catch (Exception $e) {\n $err = \"object not found for ($key) at ($domainClass)\";\n throw new RunTimeException($err, 0, $e);\n }\n }", "public function getItem($key);", "public function getItem($key);", "public function getItem($key);", "public function getItem($key);", "public function __get($key)\n {\n $method = 'get' . ucfirst($key);\n if (method_exists($this, $method)) {\n return $this->$method();\n }\n\n // If the property is defined in our data object, return it.\n if (isset($this->data->{$key})) {\n return $this->data->{$key};\n }\n\n // Load the full record if needed.\n $this->init();\n\n // If there's a getter method on the UserIdentifiers object\n // (getBarcode, getPrimaryId), call it.\n if (method_exists($this->identifiers, $method)) {\n return $this->identifiers->$method();\n }\n\n // Re-check if there's a property on our data object\n if (isset($this->data->{$key})) {\n return $this->data->{$key};\n }\n }", "public function get($name) {\n\t\t$arguments = func_get_args();\n\t\t$raw = array_shift($arguments);\n\t\t$exploded = explode(':', $name);\n\t\tif (count($exploded) == 2 && intval($exploded[1]) > 0) {\n\t\t\t// likelihood: DomainObject with UID as string representation - detect further\n\t\t\t$uid = intval(array_pop($exploded));\n\t\t\t$name = array_pop($exploded);\n\t\t\t$argument = $this->get('Tx_Extbase_MVC_Controller_Argument', 'content', $raw);\n\t\t\t$instance = $argument->setValue($uid)->getValue(); // hopefully a transformation to an object\n\t\t\tif ($object instanceof Tx_Extbase_DomainObject_DomainObjectInterface) {\n\t\t\t\t// certainty; is DomainObject - return it\n\t\t\t\treturn $instance;\n\t\t\t}\n\t\t} else if (count($arguments) == 1 && strpos($name, '_Domain_Model_')) {\n\t\t\t$arg = array_shift($arguments);\n\t\t\tif (is_array($arg) && count($arg) > 0) {\n\t\t\t\t// likelihood: $arg is an array of UIDs - detect further. Instanciate \n\t\t\t\t// an ObjectStorage in case we need to attach loaded candidates.\n\t\t\t\t$objectStorage = $this->get('Tx_WildsideExtbase_Persistence_ObjectStorage');\n\t\t\t\t$isUidArray = TRUE;\n\t\t\t\tforeach ($arg as $possibleUid) {\n\t\t\t\t\t// absolutely only positive integers are accepted - a single value which is not \n\t\t\t\t\t// a positive integer means this is NOT an array of UIDs\n\t\t\t\t\tif (intval($possibleUid) < 1) {\n\t\t\t\t\t\t$isUidArray = FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($isUidArray) {\n\t\t\t\t\t// certainty: UID array specified. Load the instances we can. Respect Repository\n\t\t\t\t\t// for loading - storagePid etc also. Repository with wrong/missing storagePid\n\t\t\t\t\t// returns empty QueryResult; this method with wrong/missing storagePid returns\n\t\t\t\t\t// empty ObjectStorage\n\t\t\t\t\tforeach ($arg as $uid) {\n\t\t\t\t\t\t$instance = $this->get($name, $uid);\n\t\t\t\t\t\tif ($instance) {\n\t\t\t\t\t\t\t$objectStorage->attach($instance);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn $objectStorage;\n\t\t\t\t} else {\n\t\t\t\t\treturn $this->get($name, $arg);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$uid = intval($arg);\n\t\t\tif ($uid > 0) {\n\t\t\t\t// is DomainObject and possible UID was only argument; retry as string representation\n\t\t\t\treturn $this->get(\"{$name}:{$uid}\");\n\t\t\t}\n\t\t}\n\t\treturn $this->objectContainer->getInstance($name, $arguments);\n\t}", "public function __get($childKey);", "public function __get($key){\n return $this->get($key);\n }", "function get($key);", "function &get($key) {\n\t\tif ($key=='_id')\n\t\t\treturn $this->id;\n\t\tif (array_key_exists($key,$this->document))\n\t\t\treturn $this->document[$key];\n\t\tuser_error(sprintf(self::E_Field,$key),E_USER_ERROR);\n\t}", "public function retrieve($key) {\n return apc_fetch($key);\n }", "public function __get($key)\n\t{\n\t\t// See if we are requesting a foreign key\n\t\tif (isset($this->_data[$key.'_id']))\n\t\t{\n\t\t\tif (isset($this->_lazy[$key])) // See if we've lazy loaded it\n\t\t\t{\n\t\t\t\t$model = AutoModeler::factory($key);\n\t\t\t\t$model->process_load($this->_lazy[$key]);\n\t\t\t\t$model->process_load_state();\n\t\t\t\treturn $model;\n\t\t\t}\n\n\t\t\t// Get the row from the foreign table\n\t\t\treturn AutoModeler::factory($key, $this->_data[$key.'_id']);\n\t\t}\n\t\telse if (isset($this->_data[$key]))\n\t\t\treturn $this->_data[$key];\n\t}", "protected function findPkSimple($key, $con)\n {\n $sql = 'SELECT ID, PARENT_ID, CIVILITY_ID, SERVICE_ID, ROLE, TITLE, FIRST_NAME, LAST_NAME, MAIDEN_NAME, COMPLEMENT_NAME, NAME, SHORT_NAME, ZONE_ID, ADDRESS1, ADDRESS2, CITY, POSTAL_CODE, COUNTRY, PHONE, FAX, MOBILE, EMAIL, WEB, COMMENT, HIDDEN_COMMENT, BIRTH_DATE, BIRTH_PLACE, BIRTH_PLACE_CODE, IS_ARCHIVE, ARCHIVE_DATE, ARCHIVE_COMMENT, SECU_NUMBER, SIRET, SIREN, NAF_CODE, APE_CODE, TYPE, CREATED_AT, CREATED_BY, UPDATED_AT, UPDATED_BY FROM sfc_abk_contact WHERE ID = :p0';\n try {\n $stmt = $con->prepare($sql);\n\t\t\t$stmt->bindValue(':p0', $key, PDO::PARAM_INT);\n $stmt->execute();\n } catch (Exception $e) {\n Propel::log($e->getMessage(), Propel::LOG_ERR);\n throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);\n }\n $obj = null;\n if ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n $cls = ContactPeer::getOMClass($row, 0);\n $obj = new $cls();\n $obj->hydrate($row);\n ContactPeer::addInstanceToPool($obj, (string) $key);\n }\n $stmt->closeCursor();\n\n return $obj;\n }", "public function __get($key)\n {\n \tassert(null !== $key);\n \t\n $keyLower = strtolower($key);\n if ('uid' === $keyLower)\n {\n return $this->getUIDAsProperty();\n }\n if (!array_key_exists($keyLower, $this->data))\n return null;\n return $this->data[$keyLower];\n }", "public function fetch($key);", "public function fetch($key);", "public function fetch($key);", "public function findFirstByKey($key);", "abstract public function getKey();", "abstract public function getKey();", "public function get(string $key): mixed;" ]
[ "0.699394", "0.6757122", "0.67072475", "0.6671864", "0.6461263", "0.6456062", "0.64468956", "0.6444349", "0.6444349", "0.64203864", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6341895", "0.6311274", "0.6299188", "0.62751603", "0.6264303", "0.62566674", "0.625502", "0.62522846", "0.62465054", "0.62141466", "0.62098944", "0.6186617", "0.617735", "0.6166387", "0.6166387", "0.6166387", "0.6166387", "0.6166387", "0.6166387", "0.6166387", "0.6166387", "0.61539197", "0.61539197", "0.6147499", "0.6118509", "0.6107563", "0.6098002", "0.60886925", "0.60885864", "0.6088564", "0.60828656", "0.6077164", "0.60760415", "0.6075637", "0.60704154", "0.6064799", "0.60563236", "0.60423756", "0.60403574", "0.60329413", "0.6004042", "0.597699", "0.59741294", "0.59689724", "0.59689724", "0.59689724", "0.59689724", "0.5968694", "0.59658295", "0.59603316", "0.59471464", "0.5942361", "0.59401006", "0.5931678", "0.592814", "0.5924192", "0.5916098", "0.5910929", "0.5910929", "0.5910929", "0.590355", "0.5900536", "0.5900536", "0.5892805" ]
0.0
-1
Get all records from table
public function queryAll(){ $sql = 'SELECT * FROM cst_tech_req'; $sqlQuery = new SqlQuery($sql); return $this->getList($sqlQuery); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllRecords();", "function get_all_records(){\n\t\tglobal $db;\n\t\t$sql=\"SELECT * FROM $this->table order by id asc\";\n\t\t$db->query($sql);\n\t\t$row=$db->fetch_assoc_all();\n\t\treturn $row;\n\t}", "public function getAll()\n {\n $sql = \"SELECT * FROM `%s`\";\n $this->_sql[] = sprintf($sql, $this->_table);\n $this->_parameters[] = array();\n return $this->run();\n }", "public function table_get_all($table);", "public function getAll()\n {\n $sql = \"SELECT * FROM $this->table\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll();\n }", "public static function all()\n {\n self::select(self::tableName());\n return self::fetchAll();\n }", "public function getAll()\n {\n return $this->db->table($this->tableName)->select('*')->findAll();\n }", "public function getAll() {\n return $this->db->getAllFromTable($this->table);\n }", "public function queryAll() {\r\n $sql = \"SELECT * FROM $this->table\";\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->execute();\r\n return $stmt->fetchAll();\r\n }", "public function getAll(){\n\t\treturn $this->db->get($this->table);\n\t}", "public function all()\r\n {\r\n return $this->db->table($this->table)->get();\r\n }", "public function getAll()\n {\n $sql = \"SELECT * FROM \".$this->table;\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_OBJ);\n \n }", "public function all()\n {\n $sql = \"SELECT * FROM {$this->table()}\";\n return $this->db->query($sql)->fetchAll();\n }", "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 TemparioData());\n\t}", "public function getAll()\n {\n return $this->prepare(DB::findAll($this->table));\n }", "public function getAll()\n {\n $sql = \"SELECT * FROM \" . self::table . \";\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "function get_all()\n {\n return $this->db->get($this->table)->result();\n }", "public function fetchAll()\n { \n $resultSet = $this->tableGateway->select();\n return $resultSet;\n }", "public function fetchAll(){\n $resultSet = $this->tableGateway->select();\n return $resultSet;\n }", "public function fetchAll() {\n\t\t$queryBuilder = $this->db->createQueryBuilder();\n\t\t$queryBuilder\n\t\t\t->select('*')\n\t\t\t->from($this->table_name, 't1')\n\t\t;\n\t\t$result = $queryBuilder->execute()->fetchAll();\n\n\t\treturn $result;\n\t}", "public function all(): ResultSetContract;", "public function All()\n {\n $query = \"SELECT * FROM $this->table\";\n $result = $this->query($query);\n return $this->convertArray($result);\n }", "public function fetchRecords() {\n return self::all();\n }", "function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}", "public function fetchAll()\n {\n return $this->tableGateway->select();\n }", "public function fetchAll()\n {\n return $this->tableGateway->select();\n }", "public function getRecords()\n {\n $result = $this->fetchAll($this->select()->order('id ASC'))->toArray();\n return $result;\n }", "public function getAll()\r\n {\r\n $stmt = $this->conn->prepare(\"SELECT * FROM $this->table ORDER BY id DESC\");\r\n $stmt->execute();\r\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public function getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}", "public function findAll(){\n \n\t\t$sql = 'SELECT * FROM ' . self::TABLENAME;\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n\t\t$stmt = $db->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll();\n\t\n\t\treturn $results; \n }", "public function findAll(){\n \n\t\t$sql = 'SELECT * FROM ' . self::TABLENAME;\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n\t\t$stmt = $db->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll();\n\t\n\t\treturn $results; \n }", "public static function getAll() {\n $conn = self::connect();\n $row = $conn->getAll(self::baseQuery());\n return $row;\n }", "public function all()\n {\n $records = R::findAll( $this->table_name(), \" order by id \");\n\n $object = array_map( function($each_record) {\n return $this->map_reford_to_object( $each_record );\n },\n $records\n );\n\n return array_values( $object );\n }", "public abstract function fetchAll($table);", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM recibo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public static function find_all()\n {\n return self::find_by_sql(\"SELECT * from \".self::$table_name);\n }", "public function getAll()\r\n {\r\n $data = $this->select()\r\n ->from($this->_name);\r\n return $this->fetchAll($data);\r\n }", "public static function find_all() {\r\n\t\treturn self::find_by_sql(\"SELECT * FROM \".self::$table_name);\r\n\t}", "public function getAll($table){\n\t\treturn $this->db->get($table);\n\t}", "protected function getAll()\n {\n $statement = $this->connection->query($this->sqlToString());\n return $this->fetchAll($statement);\n }", "function selectAll() {\n $query = $this->getStatement(\n \"SELECT * FROM `$this->table` WHERE 1 ORDER BY id\"\n );\n $query->execute();\n return $query->fetchAll();\n }", "public function get_all(){\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->TABLENAME);\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }", "public function fetchAll()\r\n {\r\n $sql = new Sql($this->dbAdapter);\r\n $select = $sql->select();\r\n $select\r\n ->from(array('a_s' => $this->table))\r\n ->order('a_s.sector_order ASC');\r\n \r\n $selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result = $execute->toArray();\r\n return $result;\r\n }", "public function getAll(){\n $adapter = $this->createAdapter();\n $results = $adapter->query($this->getSelectStatement());\n return $results;\n $adapter = null;\n }", "public function findAll() {\r\n $sql = \"SELECT * FROM $this->tabela\";\r\n $stm = DB::prepare($sql);\r\n $stm->execute();\r\n return $stm->fetchAll();\r\n }", "public function all()\r\n {\r\n return new IteratorResult(R::findAll($this->table),'redbean');\r\n }", "public function fetchAll()\n {\n // LEFT JOIN patient ON patient.patientId = doc_calendar.patientId\n $select = new \\Zend\\Db\\Sql\\Select ;\n $select->from('doc_calendar');\n $user_session = new Container('user');\n\n $select->where(\" doc_calendar.doctorId = '{$user_session['user']->getId()}'\");\n $select->join(array(\"p\" => \"patient\"), \"doc_calendar.patientId = p.patientId\");\n\n $dbAdapter = $this->tableGateway->getAdapter();\n $statement = $dbAdapter->createStatement();\n\n $select->prepareStatement($dbAdapter, $statement);\n $driverResult = $statement->execute(); // execute statement to get result\n\n $resultSet = new ResultSet();\n $resultSet->initialize($driverResult);\n $rows = array();\n foreach($resultSet as $row) {\n $rows[] = $row->getArrayCopy();\n }\n\n return $rows;\n }", "public static function findAll()\n\t\t{\n\t\t\t$tb = self::get('tabla') ;\n\t\t\t\n\t\t\treturn Database::getInstance()\n\t\t\t\t\t->query(\"SELECT * FROM $tb ;\")\n\t\t\t\t\t->getObjects(get_called_class()) ;\n\t\t}", "function all($table)\n {\n $sql = \"SELECT * FROM $table\";\n $statement = $this->pdo->prepare($sql);\n $statement->execute();\n $results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n return $results;\n }", "public function fetchAll()\r\n {\r\n $this->query();\r\n return $this->sth->fetchAll();\r\n }", "function getallrecord()\n\t{\n\t\treturn $this->db->get(\"tblteman\");\n\t\t// fungsi get(\"namatable\") adalah active record ci\n\t}", "function get_all()\n {\n $this->db->order_by($this->id, $this->order);\n return $this->db->get($this->table)->result();\n }", "public function getAll()\n {\n $records = $this->getRecordsModel()->getAll();\n \n return $records;\n }", "function readAll(){\n\n\t\t$query = \"SELECT * FROM \" . $this->table_name .\"\";\n\t\t$stmt = $this->conn->prepare($query);\n\t\t$stmt->execute();\n\t\treturn $stmt;\n\t}", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "function getAllData($table){\n\t\ttry {\n\t\t\t$sql = \"SELECT * FROM $table\";\n\t\t\t$query = $this->executeQuery($sql);\n\t\t\t$list = $query->fetchAll(PDO::FETCH_ASSOC);\n\t\t}catch(Exception $e){\n\t\t\t$this->logger->error($sql, $e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t\treturn $list;\n\t}", "public function getAll($table){\n $query = $this->pdo->prepare(\"SELECT * FROM {$table}\");\n $query->execute();\n return $query->fetchAll(\\PDO::FETCH_OBJ);\n }", "public static function get_all_records() {\n\t\tglobal $wpdb;\n\n\t\t$query = 'select * from ' . self::TABLE_NAME . ' order by email asc;';\n\n\t\t$results = $wpdb->get_results( $query, ARRAY_A );\n\n\t\tif ( ! is_array( $results ) ) {\n\t\t\t$results = array();\n\t\t\treturn $results;\n\t\t}\n\n\t\treturn $results;\n\t}", "public static function find_all(){\n global $database;\n $result_set = static::find_by_sql(\"SELECT * FROM \".static::$table_name);\n return $result_set;\n }", "public function getAll(): array\n {\n $this->setReqSql(\"SELECT * FROM {$this->table}\");\n return $this->outCast($this->fetchAll());\n }", "public function getRecords($table, $where=false){// method getRecords body start\n\t\t\n\t\tif($where){\n\t\t\t$where = $this->makeWhere($where);\n\t\t}\n\t\t$query = \"SELECT * FROM $table \".$where;\n\t\treturn $this->exeQuery($query);\n\t\t\n\t}", "public function getAll()\n {\n return $this->queryBuilder->select($this->table);\n }", "public function fetchAll(){\r\n$table=$this->getTable();\r\nreturn $this->fetch_array($this->query(\"SELECT * FROM {$table}\"));\r\n}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public static function all()\n {\n self::getAllByTableName();\n return parent::getAllByTableName();\n }", "protected function getAll(){\n\t\t\n\t\t$connection = DB::connect();\n\t\t\n\t\t$sql = \"SELECT * FROM $this->_tableName\";\n\t\t$result = '';\n\t\t\n\t\ttry {\n\t\t\t$stmt = $connection->query($sql);\n\t\t\t$result = $stmt->fetchAll();\n\t\t\n\t\t\treturn $result;\n\t\t\n\t\t} catch (PDOException $e){\n\t\t\tdie('Error: '.$e->getMessage().'<br/>');\n\t\t}\n\t}", "public function getAll() {\n\t\treturn $this->rows;\n\t}", "public function fetchAll($params = [])\n { \n var_dump($params);\n return $this->table->tableGateway->select();\n }", "public function fetchAll() {\r\n\t\treturn $this->getMapper()->fetchAll();\r\n\t\t\r\n\t}", "function QueryAll()\n\t{\n\t\t$dalSQL = \"select * from \".$this->_connection->addTableWrappers( $this->m_TableName );\n\t\treturn $this->_connection->query( $dalSQL );\n\t}", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t ;\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM patient_info';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public static function findAll() {\n $cons = \"select * from `\".ApplicationADO::$tableName.\"`\";\n return ApplicationADO::findByQuery( $cons, [] );\n }", "public function fetchAll(string $table)\n {\n $query = \"SELECT * FROM $table\";\n return $this->conn->query($query);\n }", "public function all()\n {\n return $this->db->query('SELECT * FROM '.$this->table.' ORDER by created_at DESC')->get();\n }", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();" ]
[ "0.80387056", "0.8035785", "0.7974995", "0.786513", "0.78617007", "0.7850022", "0.7838028", "0.78341025", "0.781332", "0.7755192", "0.77521724", "0.774303", "0.77249324", "0.7686146", "0.76735526", "0.76643276", "0.76399314", "0.759483", "0.75834936", "0.7570823", "0.753629", "0.7529295", "0.75087214", "0.75008786", "0.7500836", "0.7500836", "0.74910676", "0.74855787", "0.7455125", "0.74538606", "0.74538606", "0.7439278", "0.74373716", "0.7429767", "0.74261826", "0.74128115", "0.74114245", "0.7408748", "0.73747265", "0.7372642", "0.7360126", "0.7356874", "0.73545396", "0.7352505", "0.7342665", "0.7342535", "0.73383886", "0.7337685", "0.7328948", "0.7324207", "0.73203206", "0.73168045", "0.7312664", "0.7307537", "0.7306824", "0.7302053", "0.7302053", "0.7302053", "0.7302053", "0.72920424", "0.72883254", "0.72803986", "0.7277902", "0.72749186", "0.7268368", "0.7236042", "0.72326905", "0.7230895", "0.7220001", "0.72179353", "0.7206436", "0.72048694", "0.7197854", "0.71842855", "0.718207", "0.7178316", "0.7174382", "0.716206", "0.7159574", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786", "0.71580786" ]
0.0
-1
Get all records from table ordered by field
public function queryAllOrderBy($orderColumn){ $sql = 'SELECT * FROM cst_tech_req ORDER BY '.$orderColumn; $sqlQuery = new SqlQuery($sql); return $this->getList($sqlQuery); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllPlayersOrderBy($field){\n\t$query = \"SELECT * FROM aquigaza_fsutt_local.players ORDER by \".$field;\n $resource = runQuery($query);\n\treturn ozRunQuery($resource);\n}", "public function orderby(){\n\n $rows = $this\n ->db\n ->order_by(\"title\", \"asc\")\n ->order_by(\"id\", \"random\")\n ->get(\"personel\")\n ->result();\n\n print_r($rows);\n\n }", "function get_all_records(){\n\t\tglobal $db;\n\t\t$sql=\"SELECT * FROM $this->table order by id asc\";\n\t\t$db->query($sql);\n\t\t$row=$db->fetch_assoc_all();\n\t\treturn $row;\n\t}", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function orderBy($field) {\n\t$this->parseQuery->orderBy($field);\n }", "public function selectRowsOrderByPagging($fields='*', $table='users',$orderByClause='',$order='ASC',$page=1,$perpage=10) {\n\t\tif(is_array($fields))\n\t\t{\n\t\t\t$fields = implode(\",\",$fields);\n\t\t}\n\t\tif($orderByClause=='')\n\t\t{\n\t\t\tdie(\"Order By Clause Should Not Be Blanked\");\n\t\t}\n\t $sql = \"SELECT $fields from $table ORDER BY $orderByClause $order\"; \n $result = DB::select($sql,$page,$perpage,6,2,0);\n\t\t$returnArray = array();\n\t\tif($result[0]>0)\n\t\t{\n\t\t\twhile($row = mysql_fetch_assoc($result[1]))\n\t\t\t{\n\t\t\t\t$returnArray[] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $returnArray;\n }", "function getRecords($table, $fields=\"\", $condition=\"\", $orderby=\"\", $single_row=false) //$condition is array \n\t{\n//\t\tif($fields != \"\")\n//\t\t{\n//\t\t\t$this->db->select($fields);\n//\t\t}\n\n $rs = $this->db->table($table);\n\n\t\tif($orderby != \"\")\n\t\t{\n $rs->orderBy($orderby,'DESC');\n\t\t}\n\n\t\tif($condition != \"\")\n\t\t{\n\t\t\t$rs->getWhere($condition);\n\t\t}\n\t\t\n\t\tif($single_row)\n\t\t{ \n\t\t\treturn $rs->get()->getResultArray();\n\t\t}\n\t\treturn $rs->get()->getResultArray();\n\n\t}", "public function selectRowsOrderBy($fields='*', $table='users' ,$limit=10,$orderByClause='',$order='ASC') {\n\t\tif(is_array($fields))\n\t\t{\n\t\t\t$fields = implode(\",\",$fields);\n\t\t}\n\t\tif($orderByClause=='')\n\t\t{\n\t\t\tdie(\"Order By Clause Should Not Be Blanked\");\n\t\t}\n\t $sql = \"SELECT $fields from $table ORDER BY $orderByClause $order LIMIT $limit\"; \n $result = mysql_query($sql);\n\t\t$returnArray = array();\n\t\twhile($row = mysql_fetch_assoc($result))\n\t\t{\n\t\t\t$returnArray[] = $row;\n\t\t}\n\t\treturn $returnArray;\n }", "public function &getOrderBy();", "public function orderBy($field, $direction = 'ASC');", "public function getRecords()\n {\n $result = $this->fetchAll($this->select()->order('id ASC'))->toArray();\n return $result;\n }", "private static function findAllOrderedBy($value_id, $field) {\n $table = new Cms_Model_Db_Table_Application_Page();\n $select = $table->select(Zend_Db_Table::SELECT_WITH_FROM_PART);\n $select->setIntegrityCheck(false);\n $select->join('cms_application_page_block', 'cms_application_page_block.page_id = cms_application_page.page_id')\n ->join('cms_application_page_block_address', 'cms_application_page_block_address.value_id = cms_application_page_block.value_id')\n ->where(\"cms_application_page.value_id = ?\", $value_id)\n ->order(\"cms_application_page_block_address.\" . $field . \" asc\");\n return $table->fetchAll($select);\n }", "function get_all()\n {\n $this->db->order_by($this->id, $this->order);\n return $this->db->get($this->table)->result();\n }", "public function findAllByOrder()\n {\n return $this->findBy(array(), array('updatedAt'=>'desc', 'createdAt'=>'desc'));\n }", "public function getAllOrderedByName()\n {\n return $this->model->orderBy('name', 'asc')->get();\n }", "public function order($field, $order = 'desc');", "protected function getRecords()\r\n {\r\n $records = null;\r\n $model = $this->controller->reorderGetModel();\r\n $query = $model->newQuery();\r\n\r\n $this->controller->reorderExtendQuery($query);\r\n\r\n if ($this->sortMode == 'simple') {\r\n $query = $query\r\n ->orderBy($model->getSortOrderColumn());\r\n $records = $query->get();\r\n $records = $records->groupBy($model->getGroupColumn());\r\n }\r\n elseif ($this->sortMode == 'nested') {\r\n $records = $query->getNested();\r\n }\r\n\r\n return $records;\r\n }", "protected function get_ordered_records()\n\t{\n\t\t$records = array();\n\n\t\t$ordering = function(array $branch) use(&$ordering, &$records) {\n\n\t\t\tforeach ($branch as $node)\n\t\t\t{\n\t\t\t\t$records[$node->nid] = $node->record;\n\n\t\t\t\tif ($node->children)\n\t\t\t\t{\n\t\t\t\t\t$ordering($node->children);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t$node = current($this->index);\n\n\t\tif (empty($node->record))\n\t\t{\n\t\t\t$this->populate();\n\t\t}\n\n\t\t$ordering($this->tree);\n\n\t\treturn $records;\n\t}", "function record_sort($records, $field, $reverse=false){\n\n $hash = array();\n \n foreach($records as $key => $record){\n $hash[$record[$field].$key] = $record;\n }\n \n ($reverse)? krsort($hash) : ksort($hash);\n \n $records = array();\n \n foreach($hash as $record){\n $records []= $record;\n }\n \n return $records;\n}", "public function allRecordsByTitle(){\n\t $news = collect(DB::table('news')->get());\n\t return $news->sortBy('title');\n }", "function find($table, $where=\"1=1\", $fields=\"*\", $orderBy=\"1\"){\n\t\tActiveRecord::sql_item_sanizite($table);\n\t\tActiveRecord::sql_sanizite($fields);\n\t\tActiveRecord::sql_sanizite($orderBy);\n\t\t$q = $this->query(\"select $fields from $table where $where order by $orderBy\");\n\t\t$results = array();\n\t\twhile($row=$this->fetch_array($q)){\n\t\t\t$results[] = $row;\n\t\t}\n\t\treturn $results;\n\t}", "function getList($fieldName='', $searchValue='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}", "function getList($fieldName='', $searchValue='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}", "public function it_sorts_by_field_in_ascending_order(): void\n {\n $results = Client::filter([\n 'sorts' => [\n [\n 'column' => 'name',\n 'direction' => 'asc',\n ],\n ],\n ])->get();\n\n self::assertEquals($results->sortBy('name')->pluck('id'), $results->pluck('id'));\n }", "function all($table, $order='DESC')\n{\n return connect()->query(\"SELECT * FROM $table ORDER By id $order\");\n}", "public function orderByAsc($field, $overwrite = false);", "public function queryAllOrderBy($orderColumn){\n\t\t$sql = 'SELECT * FROM recibo ORDER BY '.$orderColumn;\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function orderBy($sql);", "function GetData($Field, $Table, $where = NULL, $and = NULL, $OrderField, $Order = \"DESC\") {\r\n global $con;\r\n $getAll = $con->prepare(\"SELECT $Field FROM $Table $where $and ORDER BY $OrderField $Order\");\r\n $getAll->execute();\r\n $AllData = $getAll->fetchAll();\r\n return $AllData;\r\n }", "public static function find_all(){\n $result = array();\n static::setConnection();\n $keyColumn = static::$keyColumn;\n $table = static::$table;\n $sql = \"SELECT * FROM \".$table.\" ORDER BY \".$keyColumn.\" DESC\";\n $res = mysqli_query(static::$conn,$sql);\n while($row = mysqli_fetch_object($res,get_called_class())){\n $result[] = $row;\n }\n return $result;\n }", "public function getAllFrom($fields,$table,$where=null,$orderby=null,$sort=null,$limit=null,$offset=null,$fetchOne=FALSE){\r\n\r\n $_orderby = !empty($orderby) ? \"order by $orderby\" : \"\";\r\n $_limit = !empty($limit) ? \"limit $limit\" : \"\";\r\n $_offset = !empty($offset) ? \"offset $offset\" : \"\";\r\n\r\n $stmp = $this->connection->prepare(\"SELECT $fields FROM $table $where $_orderby $sort $_limit $_offset\");\r\n \r\n $stmp->execute();\r\n if(!$fetchOne)\r\n return $stmp->fetchAll();\r\n else\r\n return $stmp->fetch();\r\n\r\n }", "public static function get_all_records() {\n\t\tglobal $wpdb;\n\n\t\t$query = 'select * from ' . self::TABLE_NAME . ' order by email asc;';\n\n\t\t$results = $wpdb->get_results( $query, ARRAY_A );\n\n\t\tif ( ! is_array( $results ) ) {\n\t\t\t$results = array();\n\t\t\treturn $results;\n\t\t}\n\n\t\treturn $results;\n\t}", "public function orderByAscending($field) {\n\t$this->parseQuery->orderByAscending($field);\n }", "function selTableDataDesc($table,$optfield=\"\", $pdo){\n $qry = ($optfield!=\"\")? \"SELECT * FROM \".$table.\" ORDER BY \".$optfield.\" DESC\": \"SELECT * FROM \".$table;\n //echo $qry;\n $result = array();\n $stm = $pdo->query($qry);\n $rows = $stm->fetchAll(PDO::FETCH_ASSOC);\n foreach($rows as $row) {\n array_push($result,$row);\n }\n return $result;\n}", "function getListOfRecords(){\n // the orders will be display and the receipts from there \n \n $element = new Order();\n \n $receipts_filter_orders = cisess(\"receipts_filter_orders\");\n \n if ($receipts_filter_orders===FALSE){\n $receipts_filter_orders = \"Abierta\"; // default to abiertas\n }\n \n if (!empty($receipts_filter_orders))\n {\n $element->where(\"status\",$receipts_filter_orders);\n }\n \n \n $element->order_by(\"id\",\"desc\");\n \n $all = $element->get()->all;\n //echo $element->check_last_query();\n ///die();\n $table = $this->entable($all);\n \n return $table;\n \n \n }", "function getAllFromAll($feild , $table , $where = NULL , $and= NULL , $orderBy , $ordering = 'DESC') {\n\n\t\tglobal $con\t;\n\n\t\t$getAll = $con->prepare(\"SELECT $feild FROM $table $where $and ORDER BY $orderBy $ordering\");\n\n\t\t$getAll->execute();\n\n\t\t$all = $getAll->fetchAll();\n\n\t\treturn $all;\n\t}", "function getDataListWhere($table,$fields = null,$where = null,$order = null,$limit_start,$limit_limit) {\r\n\t\t\r\n\t\t$db = self::getDatabaseDataWhere($table,$fields,$where,$order,$limit_start,$limit_limit);\r\n\t\t\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db->loadAssocList();\r\n\t}", "public function allRecordsByDate(){\n\t\t\t$news = collect(DB::table('news')->get());\n\t\t\treturn $news->sortBy('createdat');\n\t\t}", "public function getAll()\r\n {\r\n $stmt = $this->conn->prepare(\"SELECT * FROM $this->table ORDER BY id DESC\");\r\n $stmt->execute();\r\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }", "function fPosts($orderCol=\"id\",$orderType=\"DESC\"){\n \n $sql = \"SELECT * FROM post ORDER BY $orderCol $orderType\";\n \n return fetchAll($sql);\n}", "public function queryAllOrderBy($orderColumn){\n\t\t$sql = 'SELECT * FROM patient_info ORDER BY '.$orderColumn;\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function select($table, $fields, $where, $order, $start);", "public function loadFromDb()\n {\n $this->getLogger()->debug(\"Reading {$this->tableName} from DB.\");\n $query = $this->getQueryFactory()->createSelectAllQuery($this->tableName);\n $res = $query->execute();\n $fields = array();\n foreach ($res->fetchAll(\\PDO::FETCH_ASSOC) as $row) {\n $fields[$row['id']] = $row;\n }\n ksort($fields);\n return $fields;\n }", "function get_ordered_all_data($order)\n {\n $this->db->select('*')->from($this->table)->order_by($order);\n $query = $this->db->get();\n return $query->result();\n\n }", "public function orderBy($fields, $overwrite = false);", "public function queryAllOrderBy($orderColumn){\n\t\t$sql = 'SELECT * FROM tbl_journal_lines ORDER BY '.$orderColumn;\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function all()\n {\n return $this->orderBy('id', 'DESC')->fetchAll($this->table);\n }", "public function getAllList(array $fieldsOrderBy)\n {\n }", "public function getListePriorite(){\n $sql = 'SELECT t.*\n FROM '.$this->nameTable.' as t\n ORDER BY id DESC';\n\n $requete = $this->dao->query($sql);\n\n return $this->fecthAssoc_data($requete, $this->name);\n }", "public function queryAllOrderBy($orderColumn){\n\t\t$sql = 'SELECT * FROM timesheet ORDER BY '.$orderColumn;\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function orderBy(array $fields, $order = null);", "public function getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}", "function getData($orderBys = null)\n{\n global $dbh;\n\n $SQL = $this->getListSQL();\n $SQL .= $this->getOrderBySQL($orderBys);\n\n $result = $dbh->getAll($SQL, DB_FETCHMODE_ASSOC);\n dbErrorCheck($result);\n\n return $result;\n}", "public function getAll($orderBy = ['column' => 'id', 'dir' => 'Asc'])\n {\n return $this->model->orderBy($orderBy['column'], $orderBy['dir'])->get();\n }", "public function queryAllOrderBy($orderColumn){\n\t\t$sql = 'SELECT * FROM cst_hit ORDER BY '.$orderColumn;\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function fetchFields();", "public function orderBy(string $field, string $direction): self;", "function records( $table_name, $where, $order_by = '', $output = OBJECT ) {\n global $wpdb;\n\n $where = self::where( $where );\n\n $sql = <<< SQL\nSELECT * FROM `{$table_name}`\n{$where}\nORDER BY {$order_by}\nSQL;\n $result = $wpdb->get_results( $sql, $output );\n\n return $result;\n\n }", "public function all()\n {\n $records = R::findAll( $this->table_name(), \" order by id \");\n\n $object = array_map( function($each_record) {\n return $this->map_reford_to_object( $each_record );\n },\n $records\n );\n\n return array_values( $object );\n }", "public function get_all($value='', $field='', $order_by='', $field_type='%d', $order_direction='ASC',$only_fields=array()) {\r\n\t \tglobal $wpdb;\r\n\t \t\r\n\t \tif ($field=='')\r\n\t \t\t$field = 'id';\r\n\t \t\r\n\t \t// Special cases for ordering that requires innerjoins\r\n\t \t$extra_sql = '';\r\n\t \t// Special case for categories\r\n\t \tif ($order_by=='term_id') {\r\n\t \t\t// \"left outer join\" is used to take in care the case of category ID \"0\"\r\n\t \t\t$extra_sql = \"left outer join `$wpdb->terms` on (`$wpdb->terms`.term_id=`$this->table`.term_id)\";\r\n\t \t\t$order_by = \"`$wpdb->terms`.name\";\r\n\t \t}\r\n\t \telseif ($order_by!='') {\r\n\t \t\t// Set order by ` where is a simple column\r\n\t \t\t$order_by = \"`$order_by`\";\r\n\t \t}\r\n\t \t\t\r\n\t \tif ($order_by!='') $order_by = \" order by $order_by $order_direction\";\r\n\t \t\r\n\t \t// Specify the fields to return\r\n\t \tif (count($only_fields)==0) {\r\n\t \t\t// Add\r\n\t \t\t$fields_to_return = \"`$this->table`.*\";\r\n\t \t}\r\n\t \telse {\r\n\t \t\t// Only specified\r\n\t \t\t$fields_to_return = \"`$this->table`.\" . implode(\",`$this->table`.\",$only_fields);\t \t\t\r\n\t \t}\r\n\t \t\t\r\n\t \tif ($value!=='' && $value!==null)\r\n\t \t{\r\n\t \t\tif ($field_type=='%d') // %d\r\n\t\t \t\t$query = $wpdb->prepare( \"SELECT $fields_to_return from `$this->table` $extra_sql WHERE `$this->table`.`$field` = %d $order_by\", $value );\r\n\t\t \telse // %s\r\n\t\t \t\t$query = $wpdb->prepare( \"SELECT $fields_to_return from `$this->table` $extra_sql WHERE `$this->table`.`$field` = %s $order_by\", $value );\r\n\t \t}\r\n\t \telse \r\n\t \t\t$query = \"SELECT $fields_to_return from `$this->table` $extra_sql $order_by\";\r\n\t \t\r\n\t \t\r\n\t \t$results = $wpdb->get_results($query);\r\n\t\t\t\r\n\t \t// Parse returned fields to strip slashes\r\n\t \t$parsed_results = array();\r\n\t \tforeach ($results as $result) {\r\n\t \t\t$tmp_result = (array) $result;\r\n\t\t \t$parsed_result = WPPostsRateKeys_Validator::parse_array_output($tmp_result);\r\n\t\t \t$parsed_result = (object) $parsed_result;\r\n\t\t \t\r\n\t\t \t$parsed_results[] = $parsed_result;\r\n\t \t}\r\n\t \t// End: Parse returned fields to strip slashes\r\n\t \t\r\n\t \treturn $parsed_results;\r\n\t }", "function getAllRows($select, $tblName, $where = NULL , $and = NULL , $orderFeild = 'created_at' , $ordering = 'DESC')\n{\n global $conn;\n $rowStmt = $conn->prepare(\"SELECT $select FROM $tblName\n $where $and ORDER BY $orderFeild $ordering\");\n $rowStmt->execute();\n $rows = $rowStmt->fetchAll();\n return $rows;\n}", "public function queryAllOrderBy($orderColumn){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado ORDER BY '.$orderColumn;\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "function getFields($table,$fields=\"\",$condition=\"\",$limit=\"\",$calculateRows=false,$fastHint=false);", "function getList($fieldName='', $searchValue='', $searchStatus='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $searchStatus, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}", "public function queryAllOrderBy($orderColumn){\n\t\t$sql = 'SELECT * FROM aluno ORDER BY '.$orderColumn;\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function all()\n {\n return $this->db->query('SELECT * FROM '.$this->table.' ORDER by created_at DESC')->get();\n }", "public function queryAllOrderBy($orderColumn){\n\t\t$sql = 'SELECT * FROM telefonos ORDER BY '.$orderColumn;\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function queryAllOrderBy($orderColumn){\n\t\t$sql = 'SELECT * FROM tbl_task ORDER BY '.$orderColumn;\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "protected function prepareOrderByStatement() {}", "function wisataone_X1_get_all_order() {\n global $wpdb, $wisataone_X1_tblname;\n $wp_track_table = $wpdb->prefix . $wisataone_X1_tblname;\n\n return $wpdb->get_results( \n \"\n SELECT *\n FROM {$wp_track_table}\n \"\n );\n}", "public function getList()\n\t{\n\t\treturn $this->crud->orderby('id DESC')\n\t\t\t\t\t->read(10)\n\t\t;\t\n\t}", "public function getEntries($table, $fields = '*', $limit = 10, $offset = 0);", "private function sql_orderBy()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Short var\n $arr_order = null;\n $arr_order = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'order.' ];\n\n // Order field\n switch ( true )\n {\n case( $arr_order[ 'field' ] == 'uid' ):\n $orderField = $this->sql_filterFields[ $this->curr_tableField ][ 'uid' ];\n break;\n case( $arr_order[ 'field' ] == 'value' ):\n default:\n $orderField = $this->sql_filterFields[ $this->curr_tableField ][ 'value' ];\n break;\n }\n // Order field\n // Order flag\n switch ( true )\n {\n case( $arr_order[ 'orderFlag' ] == 'DESC' ):\n $orderFlag = 'DESC';\n break;\n case( $arr_order[ 'orderFlag' ] == 'ASC' ):\n default:\n $orderFlag = 'ASC';\n break;\n }\n // Order flag\n // Get ORDER BY statement\n $orderBy = $orderField . ' ' . $orderFlag;\n\n // RETURN ORDER BY statement\n return $orderBy;\n }", "public function getAllSortByDate()\n\t{\n\t\t$table = \"\";\n\t\t$table = $this->getTableName();\n\t\t$db_connection = get_db_connection();\n\t\t$dataArray = array();\n\t\t\n\t\t$query = \"select * from $table order by year_posted, month_posted\";\t\t\n\t\t$result = mysqli_query($db_connection, $query);\n\t\t$dataArray = $this->getData($result, $db_connection);\n\t\tmysqli_close($db_connection);\n\t\t\n\t\treturn $dataArray;\n\t}", "public function getOrderBy($table_name, $table_key_field, $decision) {\n return $this->db->order_by($table_key_field, $decision)->get($table_name)->result();\n }", "function getAllFrom($tableName, $orderBy){\n global $con;\n\n $getAll = $con->prepare(\"Select * From $tableName ORDER BY $orderBy DESC\");\n\n $getAll->execute();\n\n $all = $getAll->fetchAll();\n\n return $all;\n}" ]
[ "0.6830705", "0.6698041", "0.65617657", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.6559512", "0.639717", "0.6387449", "0.6370943", "0.6366565", "0.6355493", "0.635175", "0.63289535", "0.62955856", "0.6290862", "0.62788767", "0.6241239", "0.62095785", "0.61769307", "0.61670166", "0.61424774", "0.612399", "0.61088115", "0.60892653", "0.60892653", "0.6088091", "0.6085826", "0.60640377", "0.60577345", "0.601285", "0.5993983", "0.5992533", "0.5991536", "0.5970969", "0.59657335", "0.5965461", "0.5963874", "0.5960093", "0.5956269", "0.5945933", "0.5942604", "0.5940195", "0.5933842", "0.59268826", "0.5918698", "0.59184754", "0.59032667", "0.59014046", "0.5862657", "0.58555055", "0.5848069", "0.58398706", "0.5830727", "0.58214605", "0.58056015", "0.58018625", "0.5793238", "0.5783882", "0.5774352", "0.57742643", "0.5772741", "0.57706326", "0.57620776", "0.5759087", "0.5758415", "0.5752959", "0.57500184", "0.57476324", "0.5745553", "0.574202", "0.57294333", "0.5729262", "0.5728126", "0.57241744", "0.57226", "0.5716983", "0.57069266", "0.57045805" ]
0.0
-1
Delete record from table
public function delete($ID){ $sql = 'DELETE FROM cst_tech_req WHERE ID = ?'; $sqlQuery = new SqlQuery($sql); $sqlQuery->setNumber($ID); return $this->executeUpdate($sqlQuery); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "public function deleteRecord()\n { \n $sql = \"DELETE FROM Cubans WHERE Id = :Id\";\n $statement = $this->connect->prepare($sql);\n $statement->bindValue(':Id', $this->id);\n $statement->execute();\n }", "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public function delete() {\n\t\ttry {\n\t\t\tif($this->_state == self::STATE_UNCHANGED) {\n\t\t\t\t$sql = 'DELETE FROM ' . self::sanitize($this->_table->getProperty('name')) . ' WHERE ' . self::sanitize($this->_key_primary->name) . ' = ' . self::sanitize($this->_data[$this->_key_primary->name]);\n\t\t\t\t\\Bedrock\\Common\\Logger::info('Deleting record with query: ' . $sql); echo $sql;\n\t\t\t\t$this->_connection->exec($sql);\n\t\t\t}\n\t\t\telseif($this->_state == self::STATE_CHANGED) {\n\t\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('Unsaved changes found, cannot delete record.');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('Record not found in database.');\n\t\t\t}\n\t\t}\n\t\tcatch(\\PDOException $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('A database error was encountered, the record could not be deleted.');\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('The record could not be deleted.');\n\t\t}\n\t}", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n }", "public function delete()\n {\n Db::getInstance()->delete($this->getTableName(), ['id' => $this->getId()]);\n }", "function deleteRecord($table,$where) \t{\n\t\t$query = \"DELETE FROM \".$this->tablePrefix .$table.' WHERE '.$where ;\n $res = $this->execute($query);\n\n\t}", "protected function delete() {\n $this->db->deleteRows($this->table_name, $this->filter);\n storeDbMsg($this->db);\n }", "public function delete()\n\t{\n\t\tDatabase::query(\"\n\t\t\tDELETE FROM\n\t\t\t\t\". $this->tableName .\"\n\t\t\tWHERE\n\t\t\t\tid = '\". $this->id .\"'\n\t\t\");\n\t}", "public function delete() {\n\t\tif (!empty($this->originalData)) {\n\t\t\t$query = $this->connection->query(\"DELETE FROM {$this->table} WHERE \".self::$primaryKey[$this->table].\"='{$this->originalData[self::$primaryKey[$this->table]]}'\");\n\t\t\t$query = $this->connection->query(\"ALTER TABLE $this->table AUTO_INCREMENT = 1\");\n\t\t\t$this->originalData = array();\n\t\t}\t\n\t\telse \n\t\t\tthrow new Exception('You are trying to delete an inexistent row');\n\t}", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }", "public function deleteRow($row);", "function delete_record () { //deletes a record\n\t\t\n\t\t//deletes record\n\t\t$pdo = Database::connect();\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t$sql = \"DELETE FROM customers WHERE id = ?\";\n\t\t$q = $pdo->prepare($sql);\n\t\t$q->execute(array($_GET['id']));\n\t\tDatabase::disconnect();\n\t\theader(\"Location: customer.php\");\n\t\t\t\n\t}", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "public function delete()\n\t{\n\t\tif ($this->data['id'])\n\t\t{\n\t\t\treturn $this->db->delete($this->table_name, array('id' => $this->data['id']));\n\t\t}\n\t}", "public function deleteRecord ($id);", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }", "public function delete() {\n global $db;\n $this->_predelete();\n $result = $db->query(\"DELETE FROM \".$this->table.\" WHERE \".$this->id_field.\"=?\", array($this->{$this->id_field}));\n $this->_postdelete($result);\n return $result;\n }", "public function delete(){\r\n\t\t$this->db->delete();\r\n\t}", "public function deleteRecord($id){\n\t}", "public function deleteRecord($table ,$where = false){\n\t\tif($where){\n\t\t\t$where = $this->makeWhere($where);\n\t\t}\n\t\t$query = \"DELETE FROM $table \".$where;\n\t\t$this->query($query);\n\t}", "public function delete()\n {\n $class = strtolower(get_called_class());\n $table = self::$_table_name != null ? self::$_table_name : $class . 's';\n\n $pdo = PDOS::getInstance();\n\n $whereClause = '';\n foreach (static::$_primary_keys as $pk)\n $whereClause .= $pk . ' = :' . $pk . ' AND ';\n $whereClause = substr($whereClause, 0, -4);\n $sql = 'DELETE FROM ' . $table . ' WHERE ' . $whereClause;\n $query = $pdo->prepare($sql);\n $attributes = $this->getAttributes(new \\ReflectionClass($this));\n foreach ($attributes as $k => $v)\n {\n if (in_array($k, static::$_primary_keys))\n $query->bindValue(':' . $k, $v);\n }\n $query->execute();\n }", "public function delete($entity){ \n //TODO: Implement remove record.\n }", "public function delete()\n {\n self::deleteById( $this->db, $this->id, $this->prefix );\n\n if( $this->inTransaction )\n {\n //$this->db->commit();\n $this->inTransaction = false;\n }\n }", "public function delete() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"DELETE FROM \".$this->getTableName();\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}", "public function delete_record($table,$id)\r\n {\r\n // echo $table.\",\".$id;\r\n\r\n $sql = \"DELETE FROM \".$table.\" WHERE id='\".$id.\"'\";\r\n $query = mysqli_query($this->con,$sql);\r\n if($query)\r\n {\r\n return true;\r\n }\r\n }", "public function delete($table);", "abstract public function deleteRecord($tableName, $where);", "public function delete (){\n\n $table = new simple_table_ops();\n $table->set_id_column('timetable_id');\n $table->set_table_name('timetables');\n $table->delete();\n\n header(\"Location: http://\".WEBSITE_URL.\"/index.php?controller=timetable&action=show&submit=yes&timetable_period_id={$_GET['timetable_period_id']}\");\n }", "public final function delete() {\n\t\t$sql = \"\n\tDELETE FROM\n\t\t\" . $this->table . \"\n\tWHERE\n\t\t\" . $this->primaryField . \" = ?\n\t;\";\n\n\t\t$db = new MySQL();\n\t\t$statement = $db->prepare($sql);\n\t\t$status = $statement->execute(array($this->{$this->primaryField}));\n\t\t$statement = NULL;\n\n\t\treturn $status;\n\t}", "public function delete()\n {\n $stmt = $this->_db->prepare(\"DELETE FROM score;\");\n $stmt->execute();\n }", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "public function delete(){\n \t\ttry{\n \t\t\t$db = DB::get();\n \t\t\t$sql = \"UPDATE t_\" . self::$Table . \" \n \t\t\t\t\tSET \" . self::$Table . \"_supprime='1' \n \t\t\t\t\tWHERE \" . self::$Table . \"_id = '\".$this->Id.\"' \";\n \t\t\n \t\t\t$result = $db->query($sql);\n \t\t}\n \t\tcatch(Exception $e){\n \t\t\tvar_dump($e->getMessage());\n \t\t}\n }", "public function delete(){\r\n\t\t// goi den phuong thuc delete cua tableMask voi id cua man ghi hien hanh\r\n\t\t$mask = $this->mask();\r\n\t\treturn $mask->delete(array($mask->idField=>$this->id));\r\n\t\t// $query = \"DELETE FROM $this->tableName WHERE id='$this->id'\";\r\n\t\t// $conn = self::getConnect()->prepare($query);\r\n\t}", "function deleteRecord($id)\n\t{\n\t\t$this->form->deleteRecord($this->tablename, $id);\n\t}", "function delete_data($table, $id){\n\n $query = $this->db->delete($table, array('id' => $id));\n\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function destroy($id)\n {\n //delete specific record\n }", "public function delete() {\n\t\t\t$query = \"DELETE FROM $this->table_name WHERE id=?\";\n\n\t\t\t// prepare biatch\n\t\t\t$stmt = $this->conn->prepare($query);\n\n\t\t\t// bind id biatch\n\t\t\t$stmt->bindParam(1, $this->id);\n\n\t\t\t// execute query\n\t\t\tif ($stmt->execute()) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function delete($id){\n\t\t$this->db->where('id', $id);\n\t\t$this->db->delete($this->table);\n }", "function row_delete()\n\t{\n\t $this->db->where('id', $id);\n\t $this->db->delete('testimonials'); \n\t}", "public function delete($table, $id)\n {\n $del = \"DELETE FROM $table WHERE id=:id\";\n $stmt = $this->connect(\"student\")->prepare($del);\n $stmt->bindValue(\":id\", $id);\n $exec = $stmt->execute();\n if ($exec) {\n header(\"location:record.php\");\n }\n }", "function doRealDelete()\n {\n $this->assignSingle();\n /* Delete the record */\n DatabaseBean::dbDeleteById();\n }", "function deleteRecord($table_name,$uid,$conn){\n\t\t$sql = \"DELETE FROM $table_name WHERE uid=$uid\";\n\n\t\tif ($conn->query($sql) === TRUE) {\n\t\t echo \"Record deleted successfully\";\n\t\t} else {\n\t\t echo \"Error deleting record: \" . $conn->error;\n\t\t}\n\t}", "public function destroy() {\n\t\t$sql = 'DELETE FROM ' . static::$table . ' WHERE id = ' . $this->get('id') . ';';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute();\n\t}", "public function delete()\n{//delete\n $sql = \"DELETE FROM pefs_database.pef_assessor WHERE ase_id = ?\";\n $this->db->query($sql,array($this->ase_id)); \n}", "public function delete(){\n\t\tglobal $db;\n\t\t$response = array('success' => false);\n\t\t$response['success']=$db->delete($this->table, \"id = $this->id\");\n\t return $response;\n\t}", "public function delete_row($id) { \n $database = new Database();\t\n $sql = NULL;\n $sql .= \"DELETE FROM \" . TABLE_NAME . \" WHERE \" . PRIMARY_KEY . \" = \" . $id; \t\t\n $database->query($sql); \t \n $database->execute();\n $this->move_along(); // move to database class? \n }", "public function delete()\n {\n $database = cbSQLConnect::adminConnect('object');\n if (isset($database))\n {\n return ($database->SQLDelete(self::$table_name, 'id', $this->id));\n }\n }", "public function DELETE() {\n #\n }", "function DeleteRecord($tabel_name='',$where='')\n {\n $param = ['is_delete'=>1];\n $this->db\n ->where($where)\n ->update($tabel_name,$param);\n }", "public function delete(){\n\n $query = 'DELETE FROM ' . $this->table . ' WHERE id=:id';\n $stmt = $this->conn->prepare($query);\n $this->id = htmlspecialchars(strip_tags($this->id));\n $stmt->bindParam(':id', $this->id);\n if($stmt->execute()){\n return true;\n }\n else{\n printf(\"Error: %s.\\n\", $stmt->error);\n return false;\n }\n }", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "public function remove()\n {\n database()->run('DELETE FROM ' . $this->table . ' WHERE ' . $this->primaryKey . ' = ?', [ $this->{$this->primaryKey} ]);\n $this->__destruct();\n }", "public function delete_record($id){\n\t\t$this->db->where('training_id', $id);\n\t\t$this->db->delete('training');\n\t\t\n\t}", "public function deleteRow(Request $request)\n {\n $result=MyRow::where('id',$request->id)->delete();\n if ($result) echo 'Data Deleted';\n }", "public function deleteRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getDeleteRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check owner\n\t\t\t\tif(!$this->isOwner($record))\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('You are not the owner of the record');\n\t\t\t\t}\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// delete\n\t\t\t\t$this->getHandler()->delete($record);\n\n\n\t\t\t\t$msg = new Message('You have successful delete a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "function delete()\r\n\t{\r\n\t\t// Check for request forgeries\r\n\t\tJRequest::checkToken() or die( 'Invalid Token' );\r\n\t\tglobal $mainframe;\r\n\t\t$model\t= &$this->getModel( 'table' );\r\n\t\t$ids = JRequest::getVar('ids', array(), 'request', 'array');\r\n\t\t$model->deleteRows( $ids );\r\n\t\tif ( JRequest::getVar('format') == 'raw') {\r\n\t\t\tJRequest::setVar( 'view', 'table' );\r\n\t\t\t$this->display();\r\n\t\t} else {\r\n\t\t\t//@TODO: test this\r\n\t\t\t$ref = JRequest::getVar( 'fabrik_referrer', \"index.php\", 'post' );\r\n\t\t\t$mainframe->redirect( $ref, count($ids) . \" \" . JText::_( 'RECORDS DELETED' ) );\r\n\t\t}\r\n\t}", "public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }", "public function delete() {}", "public function delete() {}", "public function delete()\n\t{\n\t \tif (!Validate::isTableOrIdentifier($this->identifier) OR !Validate::isTableOrIdentifier($this->table))\n\t \t\tdie(Tools::displayError());\n\n\t\t$this->clearCache();\n\n\t\t/* Database deletion */\n\t\t$result = Db::getInstance()->Execute('DELETE FROM `'.pSQL($this->table).'` WHERE `'.pSQL($this->identifier).'` = '.(int)($this->id));\n\t\tif (!$result)\n\t\t\treturn false;\n\t\t\n\t\treturn $result;\n\t}", "public function delete() {}", "public function delete() {}", "function delete( $id )\n\t{\n\t\t// where clause\n\t\t$this->db->where( $this->primary_key, $id );\n\n\t\t// delete the record\n\t\treturn $this->db->delete( $this->table_name );\n\t\t// print_r($this->db->last_query());die;\n \t}", "public function delete()\n {\n $this->execute(\n $this->syntax->deleteSyntax(get_object_vars($this))\n );\n }", "public function delete($id){\n\t\t$this->db->delete($this->_table_name, array('id'=>$id));\n }", "public function delete() {\n // Create query\n $query = \"DELETE FROM \" . $this->table .\n \" WHERE MID = :mid AND Spot = :spot \";\n \n // Prepare the statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the query\n $this->attr[\"mid\"] = htmlspecialchars(strip_tags($this->attr[\"mid\"]));\n $this->attr[\"spot\"] = htmlspecialchars(strip_tags($this->attr[\"spot\"]));\n\n // Bind the data\n $stmt->bindValue(\":mid\", $this->attr[\"mid\"]);\n $stmt->bindValue(\":spot\", $this->attr[\"spot\"]);\n \n // Execute the prepared statement and check for errors in running it\n return $this->runPrepStmtChkErr($stmt);\n }", "public function delete_record()\n {\n $id = $this->input->get('tpid');\n\n $result = $this->PumpModel->delete_data(array('tpid'=>$id));\n // print_r($result);die;\n redirect(base_url(). 'Pump');\n }", "public function delete( ) {\n\t $query = \"DELETE FROM stat WHERE id=?\";\n\t return $this->db->execute( $query, array($this->id) ); \t\n\t }", "function delete($id) {\r\n $this->db->where('id', $id);\r\n $this->db->delete($this->tbl);\r\n }", "public function deleteMatch(){\n\t\t$this->getDbTable()->delete(\"\");\n\t}", "function delete($table, $field, $key)\n {\n\t\t$this->db->where($field, $key);\n $this->db->delete($table);\n }", "public function delete()\r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"DELETE FROM puesto WHERE idPue = {$this->idPue};\");\r\n }", "public function delete($id){\n\t\t$sql = \"DELETE FROM {$this->table} WHERE {$this->primaryKey} = $id\";\n\t\t$this->db->query($sql);\n\t}", "public function delete(int $id): void{\r\n \r\n $maRequete = $this->pdo->prepare(\"DELETE FROM {$this->table} WHERE id =:id\");\r\n\r\n $maRequete->execute(['id' => $id]);\r\n\r\n\r\n}", "private function delete(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check if there are permission to execute delete command.\n\t\t$result = $this->clsAccessPermission->toDelete();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to delete!\");\n\t\t\treturn;\n\t\t}\n\t\tif(!$this->objAccessCrud->delete($id)){\n\t\t\t$this->msg->setError (\"There was an issue to delete, because this register has some relation with another one!\");\n\t\t\treturn;\n\t\t}\n\t\t// Cleaner all class values.\n\t\t$this->objAccessCrud->setAccessCrud(null);\n\t\t// Cleaner session primary key.\n\t\t$_SESSION['PK']['ACCESSCRUD'] = null;\n\n\t\t$this->msg->setSuccess (\"Delete the record with success!\");\n\t\treturn;\n\t}", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_amphur\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_id));\n\t}", "public static function delete($id){\n $conexion = new Conexion();\n $sql = $conexion->prepare('DELETE FROM'. self::TABLA .' WHERE id = :id');\n $sql->bindValue(':id', $id);\n $sql->execute();\n return $sql; \n}", "public function delete($table, $id) {\n $sth = $this->prepare(\"DELETE FROM $table WHERE id = $id\");\n $sth->execute();\n }", "function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}" ]
[ "0.80528164", "0.8038927", "0.8011362", "0.8006034", "0.7851699", "0.784622", "0.7725801", "0.76525426", "0.7643797", "0.7640737", "0.75768113", "0.75688297", "0.75386626", "0.74974877", "0.74665475", "0.74657536", "0.7432057", "0.74077684", "0.7391852", "0.7388047", "0.7366247", "0.7352956", "0.72969276", "0.72947127", "0.72891563", "0.72846055", "0.726875", "0.7259515", "0.7247061", "0.7246635", "0.7236414", "0.7177174", "0.717235", "0.716997", "0.71628636", "0.7149032", "0.71226686", "0.70877016", "0.7035956", "0.7034221", "0.7028812", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.7025993", "0.70218086", "0.7021404", "0.70170605", "0.7004079", "0.69966805", "0.6993408", "0.6976034", "0.69713753", "0.6962677", "0.6959918", "0.6958736", "0.6955724", "0.69525385", "0.69519144", "0.6949007", "0.6948673", "0.6948629", "0.69440335", "0.6942566", "0.69255763", "0.69250077", "0.6924954", "0.6912536", "0.6912536", "0.6912375", "0.69120795", "0.69101125", "0.6906249", "0.6904009", "0.69035304", "0.6903232", "0.68983066", "0.68970907", "0.6896559", "0.6896483", "0.6891029", "0.6885842", "0.68847513", "0.68845004", "0.68833166", "0.6874669", "0.68737686", "0.68734086", "0.687147", "0.68659985" ]
0.0
-1
Insert record to table
public function insert($cstTechReq){ $sql = 'INSERT INTO cst_tech_req (CREATED, CREATED_BY, LAST_UPD, LAST_UPD_BY, CST_ID, SERV_ID, TECH_ID, PRICE_FROM, PRICE_TO, CITY_ID, STATE_ID, COUNTRY_ID, REQ_STAT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; $sqlQuery = new SqlQuery($sql); $sqlQuery->set($cstTechReq->cREATED); $sqlQuery->set($cstTechReq->cREATEDBY); $sqlQuery->set($cstTechReq->lASTUPD); $sqlQuery->set($cstTechReq->lASTUPDBY); $sqlQuery->setNumber($cstTechReq->cSTID); $sqlQuery->setNumber($cstTechReq->sERVID); $sqlQuery->setNumber($cstTechReq->tECHID); $sqlQuery->setNumber($cstTechReq->pRICEFROM); $sqlQuery->setNumber($cstTechReq->pRICETO); $sqlQuery->setNumber($cstTechReq->cITYID); $sqlQuery->setNumber($cstTechReq->sTATEID); $sqlQuery->setNumber($cstTechReq->cOUNTRYID); $sqlQuery->set($cstTechReq->rEQSTAT); $id = $this->executeInsert($sqlQuery); $cstTechReq->iD = $id; return $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function insertRecord($tableName, $record);", "public function insert(Table $table, $row);", "protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }", "public function insertRow($row);", "public function recInsert($record) {\n $conn = Query::connect();\n $col = $conn->SelectLimit(\"select*from \".static::getTable(),1);\n $sql = $conn->GetInsertSQL($col,$record);\n $rs = $conn->Execute($sql);\n return $conn->ErrorNo();\n }", "public function insertRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getAddRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// insert\n\t\t\t\t$this->getHandler()->create($record);\n\n\n\t\t\t\t$msg = new Message('You have successful create a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "protected function insert()\n\t{\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tinsert into\n\t\t\t\tBooth (BoothNum)\n\t\t\t\tvalues (?)\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}", "function insert_record($data){\n\t$this->db->insert('tblname', $data);\n\t}", "public function insert($tableName, $data);", "public function insert()\n {\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $columlList = \" (\";\n $valuelList = \" (\";\n foreach ($this->attributes as $column => $value) {\n $columlList .= $column . \", \";\n $valuelList .= \":\".$column . \", \";\n }\n $columlList = str_last_replace(\", \", \")\", $columlList);\n $valuelList = str_last_replace(\", \", \")\", $valuelList);\n $sqlQuery = \"INSERT INTO \" . $this->table . $columlList . \" VALUES\" . $valuelList;\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n #println($sqlQuery, \"blue\");\n }\n }", "public function insert(){\r\n\t\tif (!$this->new){\r\n\t\t\tMessages::msg(\"Cannot insert {$this->getFullTableName()} record: already exists.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\t$vals[\"`$name`\"] = $value->getSQLValue();\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$sql = 'INSERT INTO '.$this->getFullTableName().' ('.implode(', ',array_keys($vals)).') VALUES ('.implode(', ',$vals).')';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to insert record into '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t// Get this here, because getPrimaryKey can call other SQL queries and thus override this value\r\n\t\t$auto_id = SQL::getInsertId();\r\n\t\t\r\n\t\t$table = $this->getTable();\r\n\t\t// Load the AUTO_INCREMENT value, if any, before marking record as not new (at which point primary fields cannot be changed)\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\tif ($table->getColumn($name)->isAutoIncrement()){\r\n\t\t\t\t$this->$name = $auto_id;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->new = false;\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "public function insert($data);", "public function insertRecord ($sqlString);", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$insertCols .= \"lp_userid, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$insertCols .= \"lp_random, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$insertCols .= \"lp_deadline, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the id property\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\t\t\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "protected function insertRow()\n { \n $assignedValues = $this->getAssignedValues();\n\n $columns = implode(', ', $assignedValues['columns']);\n $values = '\\''.implode('\\', \\'', $assignedValues['values']).'\\'';\n\n $tableName = $this->getTableName($this->className);\n\n $connection = Connection::connect();\n\n $insert = $connection->prepare('insert into '.$tableName.'('.$columns.') values ('.$values.')');\n var_dump($insert);\n if ($insert->execute()) { \n return 'Row inserted successfully'; \n } else { \n var_dump($insert->errorInfo()); \n } \n }", "public function insert()\n {\n $this->id = insert($this);\n }", "private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }", "function insert() {\n\t\t$sql = \"INSERT INTO cost_detail (cd_fr_id, cd_seq, cd_start_time, cd_end_time, cd_hour, cd_minute, cd_cost, cd_update, cd_user_update)\n\t\t\t\tVALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq, $this->cd_start_time, $this->cd_end_time, $this->cd_hour, $this->cd_minute, $this->cd_cost, $this->cd_update, $this->cd_user_update));\n\t\t$this->last_insert_id = $this->ffm->insert_id();\n\t}", "protected function insert() {\n $dbh = $this->getDbh();\n $table = $this->tableName;\n $data = [];\n\n foreach ($this->fillable as $key => $value) {\n $data[$key] = $this->$key;\n }\n\n $query = 'INSERT INTO `' . $table . '` VALUES (NULL,';\n $first = true;\n foreach ($data AS $k => $value) {\n if (!$first)\n $query .= ', ';\n else\n $first = false;\n $query .= ':'.$k;\n }\n $query .= ')';\n\n $msc = microtime(true);\n\n $sth = $dbh->prepare($query);\n $sth->execute($data);\n\n $msc = microtime(true) - $msc;\n $line = \"insert() => \" . $query . \" with \" . implode(\"', '\", $data);\n $this->writeRequestLog($line, $msc);\n\n return true;\n }", "abstract public function insert();", "abstract public function insert(string $table, array $row, array $options = []);", "public abstract function insert();", "public function insert($table, array $data);", "public function insert() {\n $this->observer->idchangemoney = $this->connection->insert(\"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), $this->user->iduser);\n }", "protected function saveInsert()\n {\n }", "public function insert($table);", "public function insert() {\n \n }", "public function createRecord()\n {\n $sql = sprintf(\n \"INSERT INTO %s (%s) values (%s)\", \"Cubans\",\n implode(\", \", array_keys($this->arrayKeysValues())),\n \":\" . implode(\", :\", array_keys($this->arrayKeysValues()))\n );\n $statement = $this->connect->prepare($sql);\n\t\t$statement->execute($this->arrayKeysValues());\n }", "public static function insertRecord(string $table, array $data)\n {\n try {\n return Capsule::table($table)->insert($data);\n } catch (Exception $ex) {\n logActivity(\"Can not insert data into {$table}, error: {$ex->getMessage()}\");\n }\n }", "public function insert($tblUpdate);", "protected abstract function insertRow($tableName, $data);", "function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_amphur (amph_name, amph_name_en, amph_pv_id, amph_active)\n\t\t\t\tVALUES(?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array( $this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_active));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}", "public function insert($connection, $table, $rows);", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function insert_student($row)\n\t\t{\n\t\t\t$this->conn->insert($this->create_student($row));\n\t\t}", "function insert($data)\n {\n $this->db->insert($this->table, $data);\n }", "function insert() {\n\t\t$sql = \"INSERT INTO lessons\n\t\t\t\tVALUES (?, ?, ?, ?, ?)\";\n\t\t\n\t\t$this->db->query($sql, array($this->lessons_id, $this->name, $this->date, $this->active, $this->rank));\n\t\t$this->last_insert_id = $this->db->insert_id();\t\t\n\t\t\n\t}", "function insert() {\n\t \t \n\t \t$sql = \"INSERT INTO evs_database.evs_identification (idf_identification_detail_en, idf_identification_detail_th, idf_pos_id, idf_ctg_id)\n\t \t\t\tVALUES(?, ?, ?, ?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->idf_identification_detail_en, $this->idf_identification_detail_th, $this->idf_pos_id, $this->idf_ctg_id));\n\t\n\t }", "public abstract function Insert();", "public function insert(\n SugarBean $bean\n )\n {\n $sql = $this->getHelper()->insertSQL($bean);\n $this->tableName = $bean->getTableName();\n $msg = \"Error inserting into table: \".$this->tableName;\n $this->query($sql,true,$msg);\n }", "protected function _insert()\n\t{\n\t}", "protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }", "protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t\t$this->last_online = $this->date_modified;\n\t\t$this->activity_open = $this->date_modified;\n\t\t$this->language_id = \\Core\\Base\\Action::getModule('Language')->getLanguageId();\n\t}", "public final function insert()\n {\n // Run beforeCreate event methods and stop when one of them return bool false\n if ($this->runBefore('create') === false)\n return false;\n\n // Create tablename\n $tbl = '{db_prefix}' . $this->tbl;\n\n // Prepare query and content arrays\n $fields = array();\n $values = array();\n $keys = array();\n\n // Build insert fields\n foreach ( $this->data as $fld => $val )\n {\n // Skip datafields not in definition\n if (!$this->isField($fld))\n continue;\n\n // Regardless of all further actions, check and cleanup the value\n $val = $this->checkFieldvalue($fld, $val);\n\n // Put fieldname and the fieldtype to the fields array\n $fields[$fld] = $this->getFieldtype($fld);\n\n // Object or array values are stored serialized to db\n $values[] = is_array($val) || is_object($val) ? serialize($val) : $val;\n }\n\n // Add name of primary key field\n $keys[0] = $this->pk;\n\n // Run query and store insert id as pk value\n $this->data->{$this->pk} = $this->db->insert('insert', $tbl, $fields, $values, $keys);\n\n return $this->data->{$this->pk};\n }", "function insert_record () {\n // validate input\n $valid = true;\n if (empty($this->name)) {\n $this->nameError = 'Please enter Name';\n $valid = false;\n }\n\n if (empty($this->email)) {\n $this->emailError = 'Please enter Email Address';\n $valid = false;\n } \n\n if (empty($this->mobile)) {\n $this->mobileError = 'Please enter Mobile Number';\n $valid = false;\n }\n\n // insert data\n if ($valid) {\n $pdo = Database::connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = \"INSERT INTO customers (name,email,mobile) values(?, ?, ?)\";\n $q = $pdo->prepare($sql);\n $q->execute(array($this->name,$this->email,$this->mobile));\n Database::disconnect();\n header(\"Location: customer.php\");\n }\n else {\n $this->create_record();\n }\n }", "public function insert()\n {\n \n }", "public function insert($data)\r\n {\r\n \r\n }", "public function insert_entry()\r\n\t{\r\n\t\t$this->db->insert(\"email_workflow\", $this);\r\n\t}", "public function insert()\n {\n }", "public function insert()\n {\n }", "public static function insert()\n {\n }", "function insert($data)\n {\n $this->db->insert($this->table, $data);\n }", "public function insert(){\n\n global $db;\n\n /** Insert sql query */\n $sql = \"INSERT INTO tbl_calculator (num1, num2, oper, answer)\n VALUES (\" . $this->num1 .\", \" . $this->num2 . \", '\" .$this->oper. \"', \" .$this->answer. \" )\";\n\n /** insert result maintain in log file */ \n error_log($sql);\n\n if ($db->query($sql) === TRUE) {\n error_log(\"New record created successfully\");\n } else {\n error_log(\"Error: \" . $sql . \"<br>\" . $db->error);\n }\n return;\n }", "public function insert($table, array $fields);", "public function insert_into_table(){\n // VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->activity', '$this->date_time')\";\n $query = \"INSERT INTO $this->table_name (item_id, user_id, project_id, user2_id, post_id, post_type, date_time) \n VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->date_time')\";\n $result = mysql_query($query);\n\n $err = mysql_error();\n if($err){\n $file = 'errors.txt';\n file_put_contents($file, $err, FILE_APPEND | LOCK_EX);\n }\n }", "public function insert(...$field_values);", "public function insertRecords($table, $data) \n {\n \t// setup some variables for fields and values\n \t$fields = \"\";\n $values = \"\";\n\t\t\n // sets attributes and values\n foreach ($data as $f => $v) {\t\t\t\n $fields .= \"`$f`,\";\n $values .= ( is_numeric( $v ) && ( intval( $v ) == $v ) ) ? $v.\",\" : \"'$v',\";\t\t\n }\n\t\t\n // remove last ',' \n \t$setfields = substr($fields, 0, -1);\n \t$setvalues = substr($values, 0, -1);\n \t\n $insert = \"INSERT INTO $table ({$setfields}) VALUES({$setvalues})\";\n $this->executeQuery( $insert );\n return true;\n }", "public function _insert($data)\n {\n $this->insert($data);\n }", "public function insert() {\n\t\t\t\n\t\t\t$insert_array = $this->buildInsertFields();\n\t\t\t$query = \"INSERT INTO \" . $this->table_name . \" (\" . $insert_array['insert_statement'] . \") VALUES (\" . \n\t\t\t\t\t\t\t\t\t$insert_array['values_statement'] . \")\";\n\t\t\treturn $this->query($query, $insert_array['bind_params']);\n\n\t\t}", "public function insert($data)\n {\n if (isset($this->columns[\"created\"])) {\n $data[\"created\"] = date(\"Y-m-d H:i:s\");\n }\n return $this->schema->insert($this->name, $data);\n }", "public function insert(stubObject $entity);", "public function insert($medAccount);", "public function insert()\n {\n $sql = new Sql();\n $result = $sql->select(\"CALL sp_usuario_insert(:LOGIN, :PASSWORD)\", array(\n \":LOGIN\"=>$this->getDeslogin(),\n \":PASSWORD\"=>$this->getDessenha()\n ));\n\n if(count($result) > 0){\n $row = $result[0];\n $this->setIdusuario($row['idusuario']);\n $this->setDeslogin($row['deslogin']);\n $this->setDessenha($row['dessenha']);\n $this->setDataCadastro(new DateTime($row['dataCadastro']));\n }\n }", "function insert($conn,$table,$data)\n {\n }", "public function insert()\n {\n # code...\n }", "function dbase_add_record($dbase_identifier, $record)\n{\n}", "public function insert()\n\t{\n\t\t$crud = $this->crud->data([\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t]);\n\t\t$crud->insert();\n\t\t$this->redirect('crud');\n\t}", "public function insert(){\n\t\t$sql = new Sql();\n\t\t$results = $sql->select(\"CALL sp_insert_usuario(:LOGIN, :PASS)\", array(\n\t\t\t':LOGIN'=>$this->getDeslogin(),\n\t\t\t':PASS'=>$this->getDessenha()\n\t\t));\n\n\t\tif (isset($results[0])) {\n\t\t\t\n\t\t\t$this->setData($results[0]);\n\n\t\t}\n\t}", "function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_person_detail (psd_ps_id, psd_dp_id, psd_tax_no, psd_id_card_no, psd_passport_no, psd_picture, psd_blood_id, psd_reli_id, psd_nation_id, psd_race_id, psd_psst_id, psd_birthdate, psd_birth_pv_id, psd_gd_id, psd_account_no, psd_ba_id, psd_facebook, psd_twitter, psd_website, psd_email, psd_cellphone, psd_phone, psd_ex_phone, psd_work_phone, psd_lodge_id, psd_lodge_no, psd_lodge_phone, psd_addcur_no, psd_addcur_pv_id, psd_addcur_amph_id, psd_addcur_dist_id, psd_addcur_zipcode, psd_addhome_no, psd_addhome_pv_id, psd_addhome_amph_id, psd_addhome_dist_id, psd_addhome_zipcode)\n\t\t\t\tVALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array($this->psd_ps_id, $this->psd_dp_id, $this->psd_tax_no, $this->psd_id_card_no, $this->psd_passport_no, $this->psd_picture, $this->psd_blood_id, $this->psd_reli_id, $this->psd_nation_id, $this->psd_race_id, $this->psd_psst_id, $this->psd_birthdate, $this->psd_birth_pv_id, $this->psd_gd_id, $this->psd_account_no, $this->psd_ba_id, $this->psd_facebook, $this->psd_twitter, $this->psd_website, $this->psd_email, $this->psd_cellphone, $this->psd_phone, $this->psd_ex_phone, $this->psd_work_phone, $this->psd_lodge_id, $this->psd_lodge_no, $this->psd_lodge_phone, $this->psd_addcur_no, $this->psd_addcur_pv_id, $this->psd_addcur_amph_id, $this->psd_addcur_dist_id, $this->psd_addcur_zipcode, $this->psd_addhome_no, $this->psd_addhome_pv_id, $this->psd_addhome_amph_id, $this->psd_addhome_dist_id, $this->psd_addhome_zipcode));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}", "protected function insert()\n {\n $insert = 'INSERT INTO users (first_name, last_name, email, password)\n VALUES (:first_name, :last_name, :email, :password)';\n $statement = self::$dbc->prepare($insert);\n unset($this->attributes['id']);\n foreach ($this->attributes as $key => $value) {\n $statement->bindValue(\":$key\", $value, PDO::PARAM_STR);\n }\n $statement->execute();\n $this->attributes['id'] = self::$dbc->lastInsertId();\n }", "public function insert() {\n\t\t$this->insert_user();\n\t}", "public function insert()\n\t{\n\t\treturn $this->getModel()->insert($this);\n\t}", "public function Do_insert_Example1(){\n\n\t}", "public function insertData($table, $data) {\n $this->db->insert($table, $data);\n }", "public function insertRow($table, $data){\n\n\t \t$this->db->insert($table, $data);\n\t \treturn $this->db->insert_id();\n\t}", "public function insertRecord( $table, $record, $updateIfKeyExists=false, $updateSQL=\"\" )\n {\n \t$fields = \"\";\n\t\t$values = \"\";\n\t\t\n\t\t// populate them\n\t\tforeach ($record as $f => $v)\n\t\t{\n\t\t\t$fields .= \"`$f`,\";\n\t\t\t$values .= ( is_numeric( $v ) && ( intval( $v ) === $v ) ) ? $v.\",\" : \"'$v',\";\n\t\t}\n\t\t\n\t\t// remove our trailing ,\n \t$fields = substr( $fields, 0, -1 );\n \t// remove our trailing ,\n \t$values = substr( $values, 0, -1 );\n \t\n\t\t$insert = \"INSERT INTO $table ({$fields}) VALUES({$values})\";\n\t\tif( $updateIfKeyExists )\n\t\t{\n\t\t\t$insert .= \" ON DUPLICATE KEY UPDATE {$updateSQL} \";\n\t\t}\n\t\t$this->executeQuery( $insert );\n\t\treturn true;\n }", "function insert($rowindex) {\r\n $tf = array();\r\n $tv = array();\r\n #~ $value = '';\r\n $um = NULL;\r\n foreach ($this->properties as $colvar=>$col) {\r\n if ($col->colname == '') continue; # a virtual field, usually used for display purpose\r\n $value = $this->ds->{$colvar}[$rowindex];\r\n if ($col->on_insert_callback != '')\r\n $value = eval($col->on_insert_callback);\r\n if ($col->inputtype == 'file' and $col->datatype == 'int') {\r\n if (!$um) $um = instantiate_module('upload_manager');\r\n $value = $um->put_file($colvar, $rowindex, $this->module);\r\n }\r\n\r\n $tf[] = '`'.$col->colname.'`';\r\n if ($value == 'Now()') {\r\n $tv[] = myaddslashes($value);\r\n }\r\n else {\r\n $tv[] = \"'\".myaddslashes($value).\"'\";\r\n }\r\n }\r\n $sql_fields = join(',',$tf);\r\n $sql_values = join(',',$tv);\r\n $sql = 'insert into `'.$this->db_table.'` ('.$sql_fields.') values ('.$sql_values.')';\r\n #~ echo $sql;exit();\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n $ret = mysql_insert_id(); # new!\r\n return $ret;\r\n }", "public function queryInsert($table, $data) : bool;", "public function insertRecords(){\n // Get the sql statement\n $sql = $this->insertSql();\n // Prepare the query\n $stmt = $this->db->prepare($sql);\n\n foreach ($this->paramsValues as $key=>$value) {\n $stmt->bindParam($this->params['columnNamePdo'][$key], $this->paramsValues[$key]);\n }\n \n $stmt->execute();\n \n return true;\n \n }", "public static function Insert(){\r\n }", "protected function _insert() {\n $def = $this->_getDef();\n if(!isset($def) || !$def){\n return false;\n }\n \n foreach ($this->_tableData as $field) {\n $fields[] = $field['field_name'];\n $value_holder[] = '?';\n $sql_fields[] = '`' . $field['field_name'] . '`';\n $field_name = $field['field_name'];\n \n if(false !== ($overrideKey = $this->_getOverrideKey($field_name))){\n $field_name = $overrideKey;\n }\n \n $$field_name = $this->$field_name;\n \n if($$field_name instanceof \\DateTime){\n $$field_name = $$field_name->format('Y-m-d H:i:s');\n }\n \n if(is_array($$field_name)){\n $$field_name = json_encode($$field_name);\n }\n \n $values[] = $$field_name;\n }\n \n $this->setLastError(NULL);\n \n $sql = \"INSERT INTO `{$this->_table}` (\" . implode(',', $sql_fields) . \") VALUES (\" . implode(',', $value_holder) . \")\";\n $stmt = Database::connection($this->_connection)->prepare($sql, $values);\n $stmt->execute();\n $success = true;\n if ($stmt->error !== '') {\n $this->setLastError($stmt->error);\n $success = false;\n }\n \n $id = $stmt->insert_id;\n \n $stmt->close();\n \n $primaryKey = $this->_getPrimaryKey();\n \n $this->{$primaryKey} = $id;\n \n return $success;\n }", "public function insertRow($table, $data){\n\n\t \t$this->db->insert($table, $data);\n\t \treturn $this->db->last_query();\n\t \t // $this->db->insert_id();\n\t}", "public function insert($loyPrg);", "abstract protected function doInsert($subject, Statement $insertStatement);", "function insert_transaction_record()\n\t{\n\t\t$invoice_id = strtotime('now');\n\t\t\n\t\t$data = array(\n\t\t 'user_id' => $this->user_id,\n\t\t 'invoice_id' => $invoice_id,\n\t\t 'product_id' => $this->auction_id,\t\t \t\t\n\t\t 'credit_debit' => 'DEBIT',\t\t \n\t\t 'transaction_name' =>'Bid Fee For auction ID: '.$this->auction_id,\n\t\t 'transaction_date' => $this->general->get_local_time('time'),\n\t\t 'transaction_type' => 'bid',\n\t\t 'transaction_status' => 'Completed',\t\t \n\t\t 'payment_method' => 'direct',\n\t\t 'amount'=>$this->user_bid_amt,\n\t\t 'pay_type' => $this->payment_type,\n\t \t);\n\t\t\n\t\t$this->db->insert('transaction', $data);\n\t\treturn $this->db->insert_id(); \t\n\t}", "public function insert(array $params);", "public function insert() {\n $sql = \"INSERT INTO contratos (numero_contrato, objeto_contrato, presupuesto, fecha_estimada_finalizacion)\n VALUES (:numero_contrato, :objeto_contrato, :presupuesto, :fecha_estimada_finalizacion)\";\n $args = array(\n \":numero_contrato\" => $this->numeroContrato,\n \":objeto_contrato\" => $this->objetoContrato,\n \":presupuesto\" => $this->presupuesto,\n \":fecha_estimada_finalizacion\" => $this->fechaEstimadaFinalizacion,\n );\n $stmt = $this->executeQuery($sql, $args);\n\n if ($stmt) {\n $this->id = $this->getConnection()->lastInsertId();\n }\n\n return !$stmt ? false : true;\n }", "public function insertRow($table, $data){\n\t\t$this->db->insert($table, $data);\n\t\treturn $this->db->insert_id();\n\t}", "public function Insert(){\n //Instancia conexao com o PDO\n $pdo = Conecta::getPdo();\n //Cria o sql passa os parametros e etc\n $sql = \"INSERT INTO $this->table (idcidade, cidade) VALUES (?, ?)\";\n $consulta = $pdo->prepare($sql);\n $consulta ->bindValue(1, $this->getIdCidade());\n $consulta ->bindValue(2, $this->getCidade());\n $consulta ->execute();\n $last = $pdo->lastInsertId();\n }", "public function insert() {\r\n // Rôle : insérer l'objet courant dans la base de données\r\n // Retour : true / false\r\n // Paramètre : aucun\r\n \r\n // Vérification de l'id\r\n if (!empty($this->getId())) {\r\n debug(get_class($this).\"->insert() : l'objet courant a déjà un id\");\r\n return false;\r\n }\r\n \r\n // Construction de la requête\r\n $sql = \"INSERT INTO `\".$this->getTable().\"` SET \";\r\n $param = [];\r\n $start = true;\r\n \r\n foreach ($this->getChamps() as $nom => $champs) {\r\n if ($nom === $this->getPrimaryKey() or !$champs->getAttribut(\"inBdd\")) {\r\n continue;\r\n }\r\n if ($start) {\r\n $sql .= \"`$nom` = :$nom\";\r\n $start = false;\r\n } else {\r\n $sql .= \", `$nom` = :$nom\";\r\n }\r\n \r\n $param[\":$nom\"] = $champs->getValue();\r\n }\r\n \r\n $sql .= \";\";\r\n \r\n // Préparation de la requête\r\n $req = self::getBdd()->prepare($sql);\r\n \r\n // Exécution de la requête\r\n if (!$req->execute($param)) {\r\n debug(get_class($this).\"->insert() : échec de la requête $sql\");\r\n return false;\r\n }\r\n \r\n // Assignation de l'id\r\n if ($req->rowCount() === 1) {\r\n $this->set($this->getPrimaryKey(), self::getBdd()->lastInsertId());\r\n return true;\r\n } else {\r\n debug(get_class($this).\"->insert() : aucune entrée, ou bien plus d'une entrée, créée\");\r\n return false;\r\n }\r\n }", "private function _insert($data){\n if($lastId = $this->insert($data)){\n return $lastId;\n }else{\n // Error\n Application_Core_Logger::log(\"Could not insert into table {$this->_name}\", 'Error');\n return false;\n } \t\n }", "public function insert(){\n\n }", "public function insert($table, $data, $format = \\null)\n {\n }", "public function insert() {\n\t$stmt = $this->_database->prepare('INSERT INTO planetterrains (planetid, terrainid, x, y) VALUES (?, ?, ?, ?)');\n\t$stmt->bind_param('iiii', $this->planetid, $this->terrainid, $this->x, $this->y);\n\t$stmt->execute();\n\t$this->refid = $this->_database->insert_id;\n\tif (\\is_array($this->deposit) && \\count($this->deposit) > 0) {\n\t $this->deposit[$this->refid]->terrainid = $this->refid;\n\t $this->deposit[$this->refid]->commit();\n\t}\n\telse if (!\\is_array($this->deposit)) {\n\t $this->deposit->terrainid = $this->refid;\n\t $this->deposit->commit();\n\t}\n }", "function insert($table, $data) {\n $respose = false;\n if ($this->db->insert($table, $data)) {\n $respose = true;\n }\n return $respose;\n }", "public function insert()\n {\n $db = new Database();\n $db->insert(\n \"INSERT INTO position (poste) VALUES ( ? )\",\n [$this->poste]\n );\n }", "public function insert($gunBbl);", "public function insert($conn, $data){\n\t\t$sql_fields=\"\";\n\t\t$sql_vals=\"\";\n\t\t$id_included=false;\n\t\t\n\t\tforeach($data as $field => $val){\n\t\t\tif (!array_key_exists($field, $this->fields)){\n\t\t\t\tthrow new Exception(\"Field \" . $field . \" does not exists\");\n\t\t\t}\n\t\t\t\n\t\t\t$field_info=$this->fields[$field];\n\t\t\tif (!$id_included && $field_info[\"id\"]){\n\t\t\t\t$id_included=true;\n\t\t\t}\n\t\t\t\n\t\t\tif ($sql_fields!=\"\"){\n\t\t\t\t$sql_fields = $sql_fields . \", \";\n\t\t\t}\n\t\t\t$sql_fields = $sql_fields . \"`\" . $field . \"`\";\n\t\t\t\n\t\t\tif ($sql_vals!=\"\"){\n\t\t\t\t$sql_vals = $sql_vals . \", \";\n\t\t\t}\n\t\t\t\n\t\t\t$sql_vals = $sql_vals . $this->quote($conn, $val, $field_info[\"type\"]);\n\t\t}\n\t\t\n\t\t$sql=\"INSERT INTO `\" . $this->table_name . \"` (\" . $sql_fields . \") VALUES (\" . $sql_vals . \")\";\n\t\t\n\t\t$res=$conn->exec($sql);\n\t\tif ($res===FALSE){ \n\t\t\treturn $res;\n\t\t}\n\t\tif (!$id_included && $this->id!=\"\"){\n\t\t\tif ($this->fields[$this->id][\"auto\"]){\n\t\t\t\treturn $conn->lastInsertId();\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}" ]
[ "0.7685388", "0.7316209", "0.7308117", "0.72028816", "0.7151534", "0.71222115", "0.7078297", "0.7018812", "0.69969875", "0.69710904", "0.69630677", "0.6915893", "0.69100106", "0.6899835", "0.6890404", "0.6882674", "0.68491775", "0.673935", "0.6726214", "0.6705877", "0.67035675", "0.6687033", "0.6679439", "0.6671234", "0.66577977", "0.6644069", "0.66361713", "0.6613585", "0.66096133", "0.6604891", "0.6602122", "0.6599409", "0.6597979", "0.6581989", "0.6580863", "0.6580366", "0.6580366", "0.6575646", "0.6572799", "0.65617824", "0.6554051", "0.6545884", "0.6535294", "0.6528425", "0.65136296", "0.6508318", "0.64898586", "0.64891374", "0.64680684", "0.6467333", "0.64620113", "0.6459173", "0.6459173", "0.6448554", "0.64379513", "0.64266825", "0.64249814", "0.6396727", "0.63843304", "0.637384", "0.6369424", "0.6360551", "0.63582766", "0.6353617", "0.63490283", "0.63458145", "0.6344934", "0.6340467", "0.6330202", "0.6329621", "0.63291293", "0.6305872", "0.63023597", "0.6299808", "0.6297611", "0.62903434", "0.62894654", "0.62868357", "0.6286472", "0.6279198", "0.6275431", "0.6275069", "0.62722313", "0.62719005", "0.62696147", "0.6266646", "0.6259413", "0.6256643", "0.6252223", "0.6248319", "0.62482125", "0.6242196", "0.6238284", "0.6221462", "0.6220285", "0.62148225", "0.6208982", "0.62012386", "0.6198071", "0.6197603", "0.61965114" ]
0.0
-1
Update record in table
public function update($cstTechReq){ $sql = 'UPDATE cst_tech_req SET CREATED = ?, CREATED_BY = ?, LAST_UPD = ?, LAST_UPD_BY = ?, CST_ID = ?, SERV_ID = ?, TECH_ID = ?, PRICE_FROM = ?, PRICE_TO = ?, CITY_ID = ?, STATE_ID = ?, COUNTRY_ID = ?, REQ_STAT = ? WHERE ID = ?'; $sqlQuery = new SqlQuery($sql); $sqlQuery->set($cstTechReq->cREATED); $sqlQuery->set($cstTechReq->cREATEDBY); $sqlQuery->set($cstTechReq->lASTUPD); $sqlQuery->set($cstTechReq->lASTUPDBY); $sqlQuery->setNumber($cstTechReq->cSTID); $sqlQuery->setNumber($cstTechReq->sERVID); $sqlQuery->setNumber($cstTechReq->tECHID); $sqlQuery->setNumber($cstTechReq->pRICEFROM); $sqlQuery->setNumber($cstTechReq->pRICETO); $sqlQuery->setNumber($cstTechReq->cITYID); $sqlQuery->setNumber($cstTechReq->sTATEID); $sqlQuery->setNumber($cstTechReq->cOUNTRYID); $sqlQuery->set($cstTechReq->rEQSTAT); $sqlQuery->setNumber($cstTechReq->iD); return $this->executeUpdate($sqlQuery); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($record);", "public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connect->prepare($sql);\n $statement->execute(array_merge([\":Id\" => $this->id], $this->arrayKeysValues()));\n }", "public function updateRow($row);", "private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',';\n }\n }\n $queryString .= ' updated_at = sysdate() WHERE 1 = 1 AND ' . self::ID . ' =:' . self::ID;\n $this->query = $this->pdo->prepare($queryString);\n }", "public function updateRecord(){\n\t\tglobal $db;\n $data = array('email'=>$this->email);\n\t\t\t\t$response = $db->update($this->table,$data,\"id = $this->id\");\n\t\treturn $response;\n\t}", "abstract public function updateRecord($tableName, $record, $where = '');", "public function update(){\r\n\t\tif (!$this->hasChanged) return self::RES_UNCHANGED;\r\n\t\t$table = $this->getTable();\r\n\t\tif ($this->new){\r\n\t\t\tMessages::msg(\"Cannot update record in {$this->getFullTableName()}, because the record doesn't exist.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\tif (!$table->hasPrimaryKey()){\r\n\t\t\tMessages::msg(\"Cannot update record in {$this->getFullTableName()}, because the table does not have a primary key.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$where = array();\r\n\t\t$changeCount = 0;\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\tif ($value->hasChanged()){\r\n\t\t\t\t$vals[] = \"`$name` = \".$value->getSQLValue();\r\n\t\t\t\t$changeCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\t$where[] = \"`$name` = \".$this->values[$name]->getSQLValue();\r\n\t\t}\r\n\t\t$sql = 'UPDATE '.$this->getFullTableName().' SET '.implode(', ',$vals).' WHERE '.implode(' AND ',$where).' LIMIT 1';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to update record in '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",email1=\\\"$this->email1\\\",address1=\\\"$this->address1\\\",lastname=\\\"$this->lastname\\\",phone1=\\\"$this->phone1\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "function update() {\n\t\t\t$updateQuery = \"UPDATE \".$this->table.\" SET \";\n\n\t\t\t$keysAR = array_keys($this->activeRecord);\n\n\t\t\tfor ($loopUp = 0; $loopUp < count($this->activeRecord); $loopUp++) {\n\n $updateQuery .= $keysAR[$loopUp] . \" = ?, \";\n $paramArray[] = $this->activeRecord[$keysAR[$loopUp]];\n\n\t\t\t}\n\n\t\t\t$updateQuery = substr($updateQuery, 0, -2); // Haal de laatste komma weg.\n\n\t\t\t$updateQuery .= \" WHERE \";\n\n\t\t\t// Fetch de primary key van de tabel.\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n $updateQuery .= $kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\n\t\t\t$this->lastQuery = $updateQuery;\n\n $updateTable = $this->mysqlConnection->prepare($this->lastQuery);\n $updateTable->execute($paramArray);\n\n\t\t}", "public function update(){\n\t\t$this->beforeSave();\n\t\t$tableName = $this->tableName();\n\t\t$fields = $this->fields();\n\t\t// Remove fields set as ignored by rules validation.\n\t\t$fields = $this->removeIgnored($fields);\n\t\t// Create PDO placeholders.\n\t\t$params = implode(', ', array_map(fn($name) => $name . ' = :' . $name, $fields));\n\t\t$primaryKey = $this->getPrimaryKey();\n\t\t$where = $primaryKey . ' = :' . $primaryKey;\n\t\t$statement = $this->db->prepare('UPDATE ' . $tableName . ' SET ' . $params . ' WHERE ' . $where);\n\t\t// Bind values to placeholders.\n\t\tforeach($fields as $field){\n\t\t\t$this->binder($statement, ':' . $field, $this->{$field});\n\t\t}\n\t\t$statement->bindValue(':' . $primaryKey, $this->{$primaryKey});\n\t\tif($statement->execute()){\n\t\t\t$this->afterSave();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function update($entity){ \n //TODO: Implement update record.\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",lastname=\\\"$this->lastname\\\",username=\\\"$this->username\\\",email=\\\"$this->email\\\",kind=\\\"$this->kind\\\",status=\\\"$this->status\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function update($tblUpdate);", "protected function _update() {\n $this->_getDef();\n \n //prepare\n foreach ($this->_tableData as $field) {\n if($field['primary']) {\n $primaryKey = $field['field_name'];\n $primaryValue = $this->$primaryKey;\n continue;\n }\n \n $sql_fields[] = '`' . $field['field_name'] . '` =?';\n \n $field_name = $field['field_name'];\n \n if(false !== ($overrideKey = $this->_getOverrideKey($field_name))){\n $field_name = $overrideKey;\n }\n \n if($this->$field_name instanceof \\DateTime){\n $$field_name = $this->$field_name->format('Y-m-d H:i:s');\n } elseif(is_array($$field_name)){\n $$field_name = json_encode($$field_name);\n } else {\n $$field_name = $this->$field_name;\n }\n \n $values[] = $$field_name;\n }\n \n $values[] = $primaryValue;\n \n $sql = \"UPDATE `{$this->_table}` SET \" . implode(',', $sql_fields) . \" WHERE `{$primaryKey}` =?\";\n $stmt = Database::connection($this->_connection)->prepare($sql, $values);\n $stmt->execute();\n $this->setLastError(NULL);\n if($stmt->error !== ''){\n $this->setLastError($stmt->error);\n }\n \n $stmt->close();\n \n return $this->getLastError() === NULL ? true : false;\n }", "protected function update() {\n $this->db->updateRows($this->table_name, $this->update, $this->filter);\n storeDbMsg($this->db,ucwords($this->form_ID) . \" successfully updated!\");\n }", "public function update() {\n\t\tif (isset($this->params['updated'])) {\n\t\t\t$this->params['updated'] = null;\n\t\t} // 'updated' is an auto timestamp\n\n\t\t$columns = array();\n\t\tforeach (array_keys($this->params) as $key) {\n\t\t\tarray_push($columns, $key . ' = ?');\n\t\t}\n\t\t$bindings = implode(', ', $columns);\n\t\t$sql = 'UPDATE ' . static::$table . ' SET ' . $bindings . ' WHERE id = ' . $this->get('id') . ' ;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}", "function adv_update($table, array $data, array $where);", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function update(Tinebase_Record_Interface $_record) {\n }", "public function update(){\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $fieldsList = \" SET \";\n foreach ($this->attributes as $column => $value) {\n $fieldsList.=$column.\"=\".'\\''.$value.'\\''.\", \";\n }\n $fieldsList = str_last_replace(\", \", \"\", $fieldsList);\n $sqlQuery = \"UPDATE \".$this->table.$fieldsList.\" WHERE \".$this->idName.\"=\".$this->attributes[$this->idName];\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n }\n }", "public function db_update() {}", "function UpdateRecord($tabel_name='',$where='', $param)\n {\n $this->db\n ->where($where)\n ->update($tabel_name, $param);\n }", "public function update($table);", "public function update($table);", "function updateField() {\n DATABASE::INIT_TABLE($this->database, $this->table);\n $fname = $this->urlParam('fname');\n $fvalue = $this->urlParam('fvalue');\n $id = $this->urlParam('id');\n DATABASE::UPDATE($this->table, [$fname], [$fvalue], $id);\n }", "public function update() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t\r\n\t\t\tif (! isset ( $this->id )) { \r\n\t\t\t\techo \"Fatal Error: Id is not set for the object! Please do \\$objA->setId(\\$id); in: \" . __METHOD__;\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t//check if record exists\r\n\t\t\tif(! $this->exists ()) {\r\n\t\t\t\techo \"Fatal Error: No record found with id of ($this->id)\";\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t$sql = \"UPDATE $this->sqlTable SET \";\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$sql .= \"lp_userid = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$sql .= \"lp_random = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$sql .= \"lp_deadline = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\r\n\t\t\t$sql = preg_replace ( '/, $/', '', $sql);\r\n\t\t\t$sql .= \" WHERE lp_id = ?\";\r\n\t\t\t$arrBindings[] = $this->id;\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "function update($idMedicalRecord) // Implementation \r\n\t\t{\r\n\t\t\t$this->idMedicalRecord = $idMedicalRecord;\r\n\t\t\t$dbo = database::getInstance(); // pass back that database object already created perhaps\r\n\t\t\t$sql = $this->buildQuery('update'); // what we want to do (update records)\r\n\r\n\t\t\t$dbo->doQuery($sql); // execute query statement\r\n\t\t}", "public function updateRecord ($sqlString);", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",comments=\\\"$this->comments\\\",price=\\\"$this->price\\\",brand=\\\"$this->brand\\\",model=\\\"$this->model\\\",y=\\\"$this->y\\\",link=\\\"$this->link\\\",in_existence=\\\"$this->in_existence\\\",is_public=\\\"$this->is_public\\\",is_featured=\\\"$this->is_featured\\\",category_id=\\\"$this->category_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function SQL_UPDATE() {\r\n\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",short_name=\\\"$this->short_name\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "protected function update()\n\t{\n\t\t//append ID to fields\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tupdate Booth\n\t\t\tset BoothNum = ?\n\t\t\twhere BoothID = ?\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }", "protected function updateRow()\n { \n $tableName = $this->getTableName($this->className);\n $assignedValues = $this->getAssignedValues();\n $updateDetails = [];\n\n for ($i = 0; $i < count($assignedValues['columns']); $i++) { \n array_push($updateDetails, $assignedValues['columns'][$i] .' =\\''. $assignedValues['values'][$i].'\\'');\n }\n\n $connection = Connection::connect();\n\n $allUpdates = implode(', ' , $updateDetails);\n $update = $connection->prepare('update '.$tableName.' set '. $allUpdates.' where id='.$this->resultRows[0]['id']);\n \n if ($update->execute()) { \n return 'Row updated';\n } else { \n throw new Exception(\"Unable to update row\"); \n }\n }", "function updateRecord($table_name,$uid,$update_field,$update_value,$conn){\n\t\t$update_echo = '';\n\n\t\tfor($i=0;$i<count($update_field);$i++){\n\n\t\t\tif ($i==(count($update_field)-1)) {\n\t\t\t\t$update_echo = $update_echo.$update_field[$i].\"='\".$update_value[$i].\"'\";\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$update_echo = $update_echo.$update_field[$i].\"='\".$update_value[$i].\"', \";\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t$sql = \"UPDATE $table_name SET $update_echo WHERE uid=$uid\";\n\n\t\techo $sql;\n\t\t\n\t\tif ($conn->query($sql) === TRUE) {\n\t\t echo \"Record updated successfully\";\n\t\t} else {\n\t\t echo \"Error updating record: \" . $conn->error;\n\t\t}\n\t}", "function update( \\gb\\domain\\DomainObject $object ) {\n //$this->updateStmt->execute( $values );\n }", "function EditRow() {\r\n\t\tglobal $Security, $Language;\r\n\t\t$sFilter = $this->KeyFilter();\r\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\r\n\t\t$conn = &$this->Connection();\r\n\t\t$this->CurrentFilter = $sFilter;\r\n\t\t$sSql = $this->SQL();\r\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\r\n\t\t$rs = $conn->Execute($sSql);\r\n\t\t$conn->raiseErrorFn = '';\r\n\t\tif ($rs === FALSE)\r\n\t\t\treturn FALSE;\r\n\t\tif ($rs->EOF) {\r\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // Set no record message\r\n\t\t\t$EditRow = FALSE; // Update Failed\r\n\t\t} else {\r\n\r\n\t\t\t// Save old values\r\n\t\t\t$rsold = &$rs->fields;\r\n\t\t\t$this->LoadDbValues($rsold);\r\n\t\t\t$rsnew = array();\r\n\r\n\t\t\t// Nro_Serie\r\n\t\t\t$this->Nro_Serie->SetDbValueDef($rsnew, $this->Nro_Serie->CurrentValue, \"\", $this->Nro_Serie->ReadOnly || $this->Nro_Serie->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// SN\r\n\t\t\t$this->SN->SetDbValueDef($rsnew, $this->SN->CurrentValue, NULL, $this->SN->ReadOnly || $this->SN->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Cant_Net_Asoc\r\n\t\t\t$this->Cant_Net_Asoc->SetDbValueDef($rsnew, $this->Cant_Net_Asoc->CurrentValue, NULL, $this->Cant_Net_Asoc->ReadOnly || $this->Cant_Net_Asoc->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Id_Marca\r\n\t\t\t$this->Id_Marca->SetDbValueDef($rsnew, $this->Id_Marca->CurrentValue, 0, $this->Id_Marca->ReadOnly || $this->Id_Marca->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Id_Modelo\r\n\t\t\t$this->Id_Modelo->SetDbValueDef($rsnew, $this->Id_Modelo->CurrentValue, 0, $this->Id_Modelo->ReadOnly || $this->Id_Modelo->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Id_SO\r\n\t\t\t$this->Id_SO->SetDbValueDef($rsnew, $this->Id_SO->CurrentValue, 0, $this->Id_SO->ReadOnly || $this->Id_SO->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Id_Estado\r\n\t\t\t$this->Id_Estado->SetDbValueDef($rsnew, $this->Id_Estado->CurrentValue, 0, $this->Id_Estado->ReadOnly || $this->Id_Estado->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// User_Server\r\n\t\t\t$this->User_Server->SetDbValueDef($rsnew, $this->User_Server->CurrentValue, NULL, $this->User_Server->ReadOnly || $this->User_Server->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Pass_Server\r\n\t\t\t$this->Pass_Server->SetDbValueDef($rsnew, $this->Pass_Server->CurrentValue, NULL, $this->Pass_Server->ReadOnly || $this->Pass_Server->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// User_TdServer\r\n\t\t\t$this->User_TdServer->SetDbValueDef($rsnew, $this->User_TdServer->CurrentValue, NULL, $this->User_TdServer->ReadOnly || $this->User_TdServer->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Pass_TdServer\r\n\t\t\t$this->Pass_TdServer->SetDbValueDef($rsnew, $this->Pass_TdServer->CurrentValue, NULL, $this->Pass_TdServer->ReadOnly || $this->Pass_TdServer->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Cue\r\n\t\t\t// Fecha_Actualizacion\r\n\r\n\t\t\t$this->Fecha_Actualizacion->SetDbValueDef($rsnew, ew_CurrentDate(), NULL);\r\n\t\t\t$rsnew['Fecha_Actualizacion'] = &$this->Fecha_Actualizacion->DbValue;\r\n\r\n\t\t\t// Usuario\r\n\t\t\t$this->Usuario->SetDbValueDef($rsnew, CurrentUserName(), NULL);\r\n\t\t\t$rsnew['Usuario'] = &$this->Usuario->DbValue;\r\n\r\n\t\t\t// Call Row Updating event\r\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\r\n\t\t\tif ($bUpdateRow) {\r\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\r\n\t\t\t\tif (count($rsnew) > 0)\r\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\r\n\t\t\t\telse\r\n\t\t\t\t\t$EditRow = TRUE; // No field to update\r\n\t\t\t\t$conn->raiseErrorFn = '';\r\n\t\t\t\tif ($EditRow) {\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\r\n\r\n\t\t\t\t\t// Use the message, do nothing\r\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\r\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\r\n\t\t\t\t\t$this->CancelMessage = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\r\n\t\t\t\t}\r\n\t\t\t\t$EditRow = FALSE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call Row_Updated event\r\n\t\tif ($EditRow)\r\n\t\t\t$this->Row_Updated($rsold, $rsnew);\r\n\t\tif ($EditRow) {\r\n\t\t\t$this->WriteAuditTrailOnEdit($rsold, $rsnew);\r\n\t\t}\r\n\t\t$rs->Close();\r\n\t\treturn $EditRow;\r\n\t}", "private function update(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check permission to update.\n\t\t$result = $this->clsAccessPermission->toUpdate();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to update!\");\n\t\t\treturn;\n\t\t}\n\t\t// Execute Update.\n\t\tif (! $this->objAccessCrud->update ()) {\n\t\t\t$this->msg->setError (\"There were issues on update the record!\");\n\t\t\treturn;\n\t\t}\n\t\t$this->msg->setSuccess (\"Updated the record with success!\");\n\t\treturn;\n\t}", "function update_record () {\n\t\t\n\t\t// validate input\n $valid = true;\n if (empty($this->name)) {\n $this->nameError = 'Please enter Name';\n $valid = false;\n }\n\n if (empty($this->email)) {\n $this->emailError = 'Please enter Email Address';\n $valid = false;\n } \n\n\n if (empty($this->mobile)) {\n $this->mobileError = 'Please enter Mobile Number';\n $valid = false;\n }\n\n // update data\n if ($valid) {\n $pdo = Database::connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = \"UPDATE customers SET name = ?, email = ?, mobile = ? WHERE id=\".$_GET['id'];\n $q = $pdo->prepare($sql);\n $q->execute(array($this->name,$this->email,$this->mobile));\n Database::disconnect();\n header(\"Location: customer.php\");\n }\n else {\n $this->update();\n }\n\t\n\t}", "public function update($table, array $data, array $identifier);", "function updateRecord()\n\t{\n\t\t$data['roleName'] = $this->roleName;\n\t\t$data['roleDesc'] = $this->roleDesc;\n\t\t\n\t $this->db->where('roleID', $this->roleID);\n\t\t$this->db->update('roles', $data); \n\t\t\n\t\tif ($this->db->_error_message())\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public function update_tranasction_record()\n\t{\n\t\t$data = array(\n\t\t 'amount'\t\t\t\t=> $this->user_bid_amt,\t\n\t\t 'pay_type' => $this->payment_type,\t\t \t\t\t \n\t\t 'transaction_date'\t=> $this->general->get_local_time('time'),\t\t \n\t \t);\n\t\t\n\t\t$this->db->where('user_id', $this->user_id);\n\t\t$this->db->where('product_id', $this->auction_id);\n\t\t$this->db->where('transaction_type', 'bid');\n\t\t$this->db->where('transaction_status', 'Completed');\n\t\t$this->db->where('payment_method', 'direct');\n\t\t$this->db->update('transaction', $data);\n\t}", "function updateData($table,$data,$id){\n\t\treturn $this->db->update($table,$data,$id);\n\t}", "public function update($row)\n\t{\n\t\t$this->db->where('tournamentId', $row['tournamentId']);\n\t\treturn $this->db->update('tournaments', $row);\n\t}", "public function updateRow(Request $request)\n {\n $result=MyRow::where('id',$request->id)->update([$request->column_name=>$request->value]);\n if ($result) echo 'Data Updated';\n }", "public function update() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"UPDATE \".$this->getTableName().\"\n\t\t\t\t SET \";\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(!in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= (($fl) ? \"\" : \", \").$column.\" = \".((is_bool($val)) ? (($val) ? \"TRUE\" : \"FALSE\") : ((is_null($val)||($val === \"\")) ? \"null\" : \"'\".$val.\"'\"));\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}", "public final function update() {\n\t\t$properties = self::getProperties($this);\n\t\t$columns = array_keys($properties);\n\t\t$values = array_values($properties);\n\n\t\t$setArray = array();\n\t\tfor ($i = 0; $i < count($properties); $i++) {\n\t\t\t$column = $columns[$i];\n\t\t\tif (strcmp($column, $this->primaryField) == 0 ||\n\t\t\t\tin_array($column, $this->uniqueFields)\n\t\t\t) {\n\t\t\t\t// Remove the value for binding\n\t\t\t\tunset($values[$i]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$setArray[] = $column . \" = ?\";\n\t\t}\n\n\t\t$sql = \"\n\tUPDATE\n\t\t\" . $this->table . \"\n\tSET\n\t\t\" . implode(\", \", $setArray) . \"\n\tWHERE\n\t\t\" . $this->primaryField . \" = ?\n\t;\";\n\t\t// Adds the primary key binding\n\t\t$values[] = $this->{$this->primaryField};\n\n\t\t$db = new MySQL();\n\t\t$statement = $db->prepare($sql);\n\t\t$status = $statement->execute($values);\n\t\t$statement = NULL;\n\n\t\treturn $status;\n\t}", "public function update(){\n static::setConnection();\n $table = static::$table;\n $keyColumn = static::$keyColumn;\n $sql = \"UPDATE \".$table.\" SET \";\n foreach($this as $k=>$v){\n $sql .= $k.\" = '\".$v.\"',\";\n }\n $sql = trim($sql, ',');\n $sql .= \" WHERE \".$keyColumn.\" = \".$this->keyColumn;\n mysqli_query(static::$conn, $sql);\n }", "function update($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\t\t// update the collection appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\tif (isset($this->_data[$key]))\n\t\t{\n\t\t\t$this->_data[$key] = $record;\n\t\t\t$this->store();\n\t\t}\n\t}", "function my_update_record( $table_name , $primary_key , $data_id , $datas ){\r\n\r\n\tglobal $connection;\r\n\r\n\t$build_query = \" UPDATE `\".$table_name .\"` SET \" ;\r\n\tforeach( $datas as $field => $value ){\r\n\t\r\n\t\t$build_query .= \"`\".$field .\"` = \". $value . \", \";\r\n\t\r\n\t}\r\n\t\r\n\t$query = rtrim( trim($build_query) , \",\" );\r\n\t\r\n\t$update_query = $query .\" WHERE `\".$primary_key.\"` = \". $data_id ; \r\n \r\n\t$result = my_query( $update_query );\r\n\t \r\n\treturn $connection->affected_rows ; \r\n\r\n}", "function UpdateRecord($id,$param) {\n $this->db->where('id_form_bd',$id);\n $this->db->update('form_bd',$param);\n }", "public function update_record_by_id($table, $data, $where)\n {\n $query = $this->db->update($table, $data, $where);\n return $this->db->affected_rows();\n }", "public function update_record($data, $id){\n\t\t$this->db->where('training_id', $id);\n\t\tif( $this->db->update('training',$data)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "abstract protected function updateModel();", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set nombre=\\\"$this->name\\\", razon_social=\\\"$this->razon\\\", status=$this->is_active where id_banco=$this->id_banco\";\n\t\tExecutor::doit($sql);\n\t}", "public function updateData()\n {\n try {\n// echo \"<pre>\";\n// print_r($this->where);\n// print_r($this->insertUpdateArray);\n// exit;\n DB::table($this->dbTable)\n ->where($this->where)\n ->update($this->insertUpdateArray);\n } catch (Exception $ex) {\n throw new Exception($ex->getMessage(), 10024, $ex);\n }\n }", "function update(){\n\t\t$this->model->update();\n\t}", "public function updateRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getEditRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check owner\n\t\t\t\tif(!$this->isOwner($record))\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('You are not the owner of the record');\n\t\t\t\t}\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// update\n\t\t\t\t$this->getHandler()->update($record);\n\n\n\t\t\t\t$msg = new Message('You have successful edit a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "function updateOneFieldFromTable($table, $field, $value, $id)\n{\n $result = DatabaseHandler::Execute(\"UPDATE `$table` SET `$field` = '\" . $value . \"' WHERE `id` = $id ;\");\n if($result)\n {\n return true;\n }\n else\n {\n return false;\n }\n \n}", "public function update(){\n\t\techo $sql = \"update \".self::$tablename.\" set title=\\\"$this->title\\\",description=\\\"$this->description\\\",skills=\\\"$this->skills\\\",area_id=$this->area_id,jobtype_id=$this->jobtype_id,jobperiod_id=$this->jobperiod_id,duration=$this->duration,is_public=$this->is_public,is_finished=$this->is_finished,created_at=$this->created_at where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "function update($id, $data)\n {\n $this->db->where($this->id,$id);\n $this->db->update($this->table, $data);\n }", "public function DoUpdate()\n\t{\n\n\t\treturn db_update_records($this->fields, $this->tables, $this->values, $this->filters);\n\t}", "public function update() {\n // Get the values that are currently in the database\n $curr_vals = $this->read_single();\n\n // Set the values that will be added to the table\n foreach ($curr_vals as $key => $value) {\n // Convert key from the Database's capitalization to\n // this model's attribute capitalization style (all lowercase)\n $local_key = strtolower($key);\n // If user didn't specify property\n if (($this->attr[$local_key] === \"\") || ($this->attr[$local_key] === null)){\n // Then use the value that's already in the database\n $this->attr[$local_key] = $curr_vals[$key];\n }\n }\n\n // Create query\n $query = \"UPDATE \" . $this->table .\n \" SET = \" .\n \" WHERE MID = :mid AND Spot = :spot \";\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the data (reduce malicious SQL injection, etc.)\n foreach ($this->attr as $key => $value) {\n $this->attr[$key] = htmlspecialchars(strip_tags($value));\n }\n \n // Bind the data to a variable for an SQL attribute\n foreach ($this->attr as $key => $value) {\n $stmt->bindValue((\":\" . $key), $value);\n }\n\n // Execute the prepared statement and check for errors in running it\n return $this->runPrepStmtChkErr($stmt);\n }", "public function update($data) {}", "public function update($data) {}", "public function update() {\n global $DB;\n $record = array(\n 'sortorder' => $this->sortorder,\n 'criterion' => $this->criterion,\n 'addinfo' => json_encode($this->addinfo)\n );\n if ($this->id) {\n $record['id'] = $this->id;\n $DB->update_record($this->get_table_name(), $record);\n } else {\n $record['instantquizid'] = $this->instantquiz->id;\n $this->id = $DB->insert_record($this->get_table_name(), $record);\n }\n }", "function update_data($where,$data,$table){\n\t\t$this->db->where($where);\n\t\t$this->db->update($table,$data);\n\t}", "function update_data($where,$data,$table){\n $this->db->where($where);\n $this->db->update($table,$data);\n }", "abstract function update (\\Database\\Query\\Query $query);", "public function update_student($row)\n\t\t{\n\t\t\t$student = new Student();\n\t\t\t$student->setId($row['id']);\n\t\t\t$student->setFirstName($row['firstName']);\n\t\t\t$student->setLastName($row['lastName']);\n\t\t\t$student->setGender($row['gender']);\n\t\t\t$student->setAge($row['age']);\n\t\t\t$student->setGroup($row['sgroup']);\n\t\t\t$student->setFaculty($row['faculty']);\n\t\t\t$this->conn->update($student);\n\t\t}", "protected function update() {\n if ($this->_isLoaded()) {\n $this->db->where('id', $this->id);\n $this->db->update($this->tableName, $this->mapToDatabase());\n } else {\n throw new Exception(\"Model is not loaded\");\n }\n }", "public function testUpdate()\n {\n $id = $this->tester->grabRecord('common\\models\\Comentario', ['id_receita' => 2]);\n $receita = Comentario::findOne($id);\n $receita->descricao = 'novo Comentario';\n $receita->update();\n $this->tester->seeRecord('common\\models\\Comentario', ['descricao' => 'novo Comentario']);\n }", "function updateRowById ($tablename, $idField, $updatedRow)\n\t{\n\t\t$this->updateSetWhere($tablename, $updatedRow, \n\t\t\tnew SimpleWhereClause($idField, '=', $updatedRow[$idField]));\n\t}", "public function queryUpdate($table, $data, $where) : int;", "public function update() {\n\t\tTournamentDBClient::update($this);\n\t}", "function update($tbl, $where, $data)\n {\n $this->db->where($where);\n $this->db->update($tbl, $data);\n $affectedRows = $this->db->affected_rows();\n if ($affectedRows) {\n return true;\n } else {\n return $this->db->error();\n }\n }", "public function updateRecord($table = NULL , $columns = NULL, $where = NULL)\n\t{\n\t//echo $table;die;\n\t\t\tif($table == NULL || $columns == NULL)\n\t\t\t{\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\t\n\t\t if($where){\n\t\t\t $this->db->where($where);\n\t\t }\n\t\t \n\t\t //print_r($this->db->last_query()). '<hr>';\n\t\t $result = $this->db->update($table, $columns);\n\t\t return $result;\n\t\t$this->db->close();\t\t\n\t}", "function update($taak)\n {\n $this->db->where('id', $taak->id);\n $this->db->update('taak', $taak);\n }", "function UpdateRecord($values)\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = $this->path;\n //dprint_r($_FILES);\n if ( !isset($values[$this->primarykey]) )\n return false;\n $unirecid = $values[$this->primarykey];\n return $this->UpdateRecordBypk($values,$this->primarykey,$values[$this->primarykey]);\n }", "public function put()\n {\n $this->layout = 'ajax';\n\n $this->Row->id = $this->request->data['id'];\n\n //if the row has a feed that belongs to the user\n $this->Feed->id = $this->Row->field('feed_id');\n\n // check if row belongs to the user\n if ($this->Auth->user('id') != $this->Feed->field('user_id')) {\n die('ERROR');\n }\n $this->Row->saveField(trim($this->request->data['columnName']), $this->request->data['value']);\n\n die($this->data['value']); // datatables wants this\n }", "function EditRow() {\n\t\tglobal $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$conn = &$this->Connection();\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // Set no record message\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold = &$rs->fields;\n\t\t\t$this->LoadDbValues($rsold);\n\t\t\t$this->featured_image->OldUploadPath = \"../uploads/product/\";\n\t\t\t$this->featured_image->UploadPath = $this->featured_image->OldUploadPath;\n\t\t\t$rsnew = array();\n\n\t\t\t// cat_id\n\t\t\t$this->cat_id->SetDbValueDef($rsnew, $this->cat_id->CurrentValue, 0, $this->cat_id->ReadOnly || $this->cat_id->MultiUpdate <> \"1\");\n\n\t\t\t// company_id\n\t\t\t$this->company_id->SetDbValueDef($rsnew, $this->company_id->CurrentValue, 0, $this->company_id->ReadOnly || $this->company_id->MultiUpdate <> \"1\");\n\n\t\t\t// pro_model\n\t\t\t$this->pro_model->SetDbValueDef($rsnew, $this->pro_model->CurrentValue, NULL, $this->pro_model->ReadOnly || $this->pro_model->MultiUpdate <> \"1\");\n\n\t\t\t// pro_name\n\t\t\t$this->pro_name->SetDbValueDef($rsnew, $this->pro_name->CurrentValue, NULL, $this->pro_name->ReadOnly || $this->pro_name->MultiUpdate <> \"1\");\n\n\t\t\t// pro_description\n\t\t\t$this->pro_description->SetDbValueDef($rsnew, $this->pro_description->CurrentValue, NULL, $this->pro_description->ReadOnly || $this->pro_description->MultiUpdate <> \"1\");\n\n\t\t\t// pro_condition\n\t\t\t$this->pro_condition->SetDbValueDef($rsnew, $this->pro_condition->CurrentValue, NULL, $this->pro_condition->ReadOnly || $this->pro_condition->MultiUpdate <> \"1\");\n\n\t\t\t// pro_features\n\t\t\t$this->pro_features->SetDbValueDef($rsnew, $this->pro_features->CurrentValue, NULL, $this->pro_features->ReadOnly || $this->pro_features->MultiUpdate <> \"1\");\n\n\t\t\t// post_date\n\t\t\t$this->post_date->SetDbValueDef($rsnew, ew_CurrentDateTime(), NULL);\n\t\t\t$rsnew['post_date'] = &$this->post_date->DbValue;\n\n\t\t\t// ads_id\n\t\t\t$this->ads_id->SetDbValueDef($rsnew, $this->ads_id->CurrentValue, NULL, $this->ads_id->ReadOnly || $this->ads_id->MultiUpdate <> \"1\");\n\n\t\t\t// pro_base_price\n\t\t\t$this->pro_base_price->SetDbValueDef($rsnew, $this->pro_base_price->CurrentValue, NULL, $this->pro_base_price->ReadOnly || $this->pro_base_price->MultiUpdate <> \"1\");\n\n\t\t\t// pro_sell_price\n\t\t\t$this->pro_sell_price->SetDbValueDef($rsnew, $this->pro_sell_price->CurrentValue, NULL, $this->pro_sell_price->ReadOnly || $this->pro_sell_price->MultiUpdate <> \"1\");\n\n\t\t\t// featured_image\n\t\t\tif ($this->featured_image->Visible && !$this->featured_image->ReadOnly && strval($this->featured_image->MultiUpdate) == \"1\" && !$this->featured_image->Upload->KeepFile) {\n\t\t\t\t$this->featured_image->Upload->DbValue = $rsold['featured_image']; // Get original value\n\t\t\t\tif ($this->featured_image->Upload->FileName == \"\") {\n\t\t\t\t\t$rsnew['featured_image'] = NULL;\n\t\t\t\t} else {\n\t\t\t\t\t$rsnew['featured_image'] = $this->featured_image->Upload->FileName;\n\t\t\t\t}\n\t\t\t\t$this->featured_image->ImageWidth = 875; // Resize width\n\t\t\t\t$this->featured_image->ImageHeight = 665; // Resize height\n\t\t\t}\n\n\t\t\t// folder_image\n\t\t\t$this->folder_image->SetDbValueDef($rsnew, $this->folder_image->CurrentValue, \"\", $this->folder_image->ReadOnly || $this->folder_image->MultiUpdate <> \"1\");\n\n\t\t\t// pro_status\n\t\t\t$tmpBool = $this->pro_status->CurrentValue;\n\t\t\tif ($tmpBool <> \"Y\" && $tmpBool <> \"N\")\n\t\t\t\t$tmpBool = (!empty($tmpBool)) ? \"Y\" : \"N\";\n\t\t\t$this->pro_status->SetDbValueDef($rsnew, $tmpBool, \"N\", $this->pro_status->ReadOnly || $this->pro_status->MultiUpdate <> \"1\");\n\n\t\t\t// branch_id\n\t\t\t$this->branch_id->SetDbValueDef($rsnew, $this->branch_id->CurrentValue, NULL, $this->branch_id->ReadOnly || $this->branch_id->MultiUpdate <> \"1\");\n\n\t\t\t// lang\n\t\t\t$this->lang->SetDbValueDef($rsnew, $this->lang->CurrentValue, \"\", $this->lang->ReadOnly || $this->lang->MultiUpdate <> \"1\");\n\t\t\tif ($this->featured_image->Visible && !$this->featured_image->Upload->KeepFile) {\n\t\t\t\t$this->featured_image->UploadPath = \"../uploads/product/\";\n\t\t\t\t$OldFiles = ew_Empty($this->featured_image->Upload->DbValue) ? array() : array($this->featured_image->Upload->DbValue);\n\t\t\t\tif (!ew_Empty($this->featured_image->Upload->FileName) && $this->UpdateCount == 1) {\n\t\t\t\t\t$NewFiles = array($this->featured_image->Upload->FileName);\n\t\t\t\t\t$NewFileCount = count($NewFiles);\n\t\t\t\t\tfor ($i = 0; $i < $NewFileCount; $i++) {\n\t\t\t\t\t\t$fldvar = ($this->featured_image->Upload->Index < 0) ? $this->featured_image->FldVar : substr($this->featured_image->FldVar, 0, 1) . $this->featured_image->Upload->Index . substr($this->featured_image->FldVar, 1);\n\t\t\t\t\t\tif ($NewFiles[$i] <> \"\") {\n\t\t\t\t\t\t\t$file = $NewFiles[$i];\n\t\t\t\t\t\t\tif (file_exists(ew_UploadTempPath($fldvar, $this->featured_image->TblVar) . $file)) {\n\t\t\t\t\t\t\t\t$OldFileFound = FALSE;\n\t\t\t\t\t\t\t\t$OldFileCount = count($OldFiles);\n\t\t\t\t\t\t\t\tfor ($j = 0; $j < $OldFileCount; $j++) {\n\t\t\t\t\t\t\t\t\t$file1 = $OldFiles[$j];\n\t\t\t\t\t\t\t\t\tif ($file1 == $file) { // Old file found, no need to delete anymore\n\t\t\t\t\t\t\t\t\t\tunset($OldFiles[$j]);\n\t\t\t\t\t\t\t\t\t\t$OldFileFound = TRUE;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ($OldFileFound) // No need to check if file exists further\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t$file1 = ew_UploadFileNameEx($this->featured_image->PhysicalUploadPath(), $file); // Get new file name\n\t\t\t\t\t\t\t\tif ($file1 <> $file) { // Rename temp file\n\t\t\t\t\t\t\t\t\twhile (file_exists(ew_UploadTempPath($fldvar, $this->featured_image->TblVar) . $file1) || file_exists($this->featured_image->PhysicalUploadPath() . $file1)) // Make sure no file name clash\n\t\t\t\t\t\t\t\t\t\t$file1 = ew_UniqueFilename($this->featured_image->PhysicalUploadPath(), $file1, TRUE); // Use indexed name\n\t\t\t\t\t\t\t\t\trename(ew_UploadTempPath($fldvar, $this->featured_image->TblVar) . $file, ew_UploadTempPath($fldvar, $this->featured_image->TblVar) . $file1);\n\t\t\t\t\t\t\t\t\t$NewFiles[$i] = $file1;\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\t$this->featured_image->Upload->DbValue = empty($OldFiles) ? \"\" : implode(EW_MULTIPLE_UPLOAD_SEPARATOR, $OldFiles);\n\t\t\t\t\t$this->featured_image->Upload->FileName = implode(EW_MULTIPLE_UPLOAD_SEPARATOR, $NewFiles);\n\t\t\t\t\t$this->featured_image->SetDbValueDef($rsnew, $this->featured_image->Upload->FileName, \"\", $this->featured_image->ReadOnly || $this->featured_image->MultiUpdate <> \"1\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\tif (count($rsnew) > 0)\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\n\t\t\t\telse\n\t\t\t\t\t$EditRow = TRUE; // No field to update\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($EditRow) {\n\t\t\t\t\tif ($this->featured_image->Visible && !$this->featured_image->Upload->KeepFile) {\n\t\t\t\t\t\t$OldFiles = ew_Empty($this->featured_image->Upload->DbValue) ? array() : array($this->featured_image->Upload->DbValue);\n\t\t\t\t\t\tif (!ew_Empty($this->featured_image->Upload->FileName) && $this->UpdateCount == 1) {\n\t\t\t\t\t\t\t$NewFiles = array($this->featured_image->Upload->FileName);\n\t\t\t\t\t\t\t$NewFiles2 = array($rsnew['featured_image']);\n\t\t\t\t\t\t\t$NewFileCount = count($NewFiles);\n\t\t\t\t\t\t\tfor ($i = 0; $i < $NewFileCount; $i++) {\n\t\t\t\t\t\t\t\t$fldvar = ($this->featured_image->Upload->Index < 0) ? $this->featured_image->FldVar : substr($this->featured_image->FldVar, 0, 1) . $this->featured_image->Upload->Index . substr($this->featured_image->FldVar, 1);\n\t\t\t\t\t\t\t\tif ($NewFiles[$i] <> \"\") {\n\t\t\t\t\t\t\t\t\t$file = ew_UploadTempPath($fldvar, $this->featured_image->TblVar) . $NewFiles[$i];\n\t\t\t\t\t\t\t\t\tif (file_exists($file)) {\n\t\t\t\t\t\t\t\t\t\tif (@$NewFiles2[$i] <> \"\") // Use correct file name\n\t\t\t\t\t\t\t\t\t\t\t$NewFiles[$i] = $NewFiles2[$i];\n\t\t\t\t\t\t\t\t\t\tif (!$this->featured_image->Upload->ResizeAndSaveToFile($this->featured_image->ImageWidth, $this->featured_image->ImageHeight, EW_THUMBNAIL_DEFAULT_QUALITY, $NewFiles[$i], TRUE, $i)) {\n\t\t\t\t\t\t\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UploadErrMsg7\"));\n\t\t\t\t\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\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} else {\n\t\t\t\t\t\t\t$NewFiles = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$OldFileCount = count($OldFiles);\n\t\t\t\t\t\tfor ($i = 0; $i < $OldFileCount; $i++) {\n\t\t\t\t\t\t\tif ($OldFiles[$i] <> \"\" && !in_array($OldFiles[$i], $NewFiles))\n\t\t\t\t\t\t\t\t@unlink($this->featured_image->OldPhysicalUploadPath() . $OldFiles[$i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t\t// Use the message, do nothing\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$this->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\n\t\t// featured_image\n\t\tew_CleanUploadTempPath($this->featured_image, $this->featured_image->Upload->Index);\n\t\treturn $EditRow;\n\t}", "public function modifyRecords(){\n \n // Get the sql statement\n $sql = $this->updateSql();\n // Prepare the query\n $stmt = $this->db->prepare($sql);\n\n foreach ($this->requestUpdateValues as $key => $value) {\n $stmt->bindParam($this->params['columnName_Pdo'][$key], $this->requestUpdateValues[$key]);\n }\n \n $stmt->execute();\n \n return true;\n \n }", "function _update($entity)\n {\n $key = $this->object->get_primary_key_column();\n return $this->object->_wpdb()->update($this->object->get_table_name(), $this->object->_convert_to_table_data($entity), array($key => $entity->{$key}));\n }", "public function update() {\n $Sql = \"UPDATE \" . $this->tableName[0] . \" SET \";\n foreach ($this->fieldListArray as $Key_ => $Value_) {\n $Sql = $Sql . \"$Key_='$Value_', \";\n }\n $Sql = substr($Sql, 0, strlen($Sql) - 2);\n $Sql = $Sql . \" WHERE \";\n foreach ($this->conditionArray as $Key_ => $Value_) {\n $Sql = $Sql . \"$Key_='$Value_' AND \";\n }\n $Sql = substr($Sql, 0, strlen($Sql) - 4);\n //echo $Sql;\n return mysqli_query($this->dataBaseConnect->getConnection(), $Sql);\n }", "public function update_data($where,$data,$table){\r\n $this->db->where($where);\r\n $this->db->update($table,$data);\r\n }", "public function updateRow($data)\r\n\t{\r\n\t\t$data = (array)$data;\r\n\t\t$data = $this->cleanupFieldNames($data);\r\n\t\t\r\n\t\t// Build SQL\r\n\t\t$sql = 'UPDATE `'.$this->name.'` SET ';\r\n\t\t$values = array();\r\n\t\t$pkFound = false;\r\n\t\tforeach($data as $key => $val)\r\n\t\t{\r\n\t\t\t// Ignore if field is not in table\r\n\t\t\tif (!$this->hasField($key))\r\n\t\t\t{\r\n\t\t\t\tunset($data[$key]);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Include value, but not if primary key and table has auto-incr PK\r\n\t\t\t$include = true;\r\n\t\t\tif ($key == $this->primaryKey)\r\n\t\t\t{\r\n\t\t\t\tif ($this->primaryKeyIsAutoIncrement)\r\n\t\t\t\t{\r\n\t\t\t\t\t$include = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Found non-empty primary key\r\n\t\t\t\tif (!empty($val))\r\n\t\t\t\t{\r\n\t\t\t\t\t$pkFound = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Include and process special value\r\n\t\t\tif ($include)\r\n\t\t\t{\r\n\t\t\t\tif ($val === 'NULL')\r\n\t\t\t\t{\r\n\t\t\t\t\t$values[] = \"`$key` = NULL\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$values[] = \"`$key` = :$key\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// Quit if has no primary key\r\n\t\tif (!$pkFound)\r\n\t\t{\r\n\t\t\tthrow new \\Exception('Cannot update: The supplied data does not contain a primary key');\r\n\t\t}\r\n\t\r\n\t\t// No fields were found - update makes no sense\r\n\t\tif (count($values) == 0)\r\n\t\t{\r\n\t\t\tthrow new \\Exception('No fields were added to the UPDATE query');\r\n\t\t}\r\n\t\t\t\r\n\t\t// Add values to query\r\n\t\t$sql .= implode(', ', $values);\r\n\t\r\n\t\t// Add where\r\n\t\t$sql .= ' WHERE `'.$this->primaryKey.'` = :' . $this->primaryKey;\r\n\r\n\t\t// Execute\r\n\t\t$result = $this->db->runQuery($sql, $data);\r\n\t\t\r\n\t\treturn $this->db->getAffectedRows();\r\n\t}", "private function crud_put($record = null)\n {\n $key = $record['id'];\n // Make sure the new record has an ID\n if (!isset($key))\n {\n $this->response(array('error' => 'Update: No item specified'), 406);\n return;\n }\n // make sure the item is real\n if (!$this->supplies->exists($key))\n {\n $this->response(array('error' => 'Update: Item ' . $key . ' not found'), 406);\n return;\n }\n // proceed with update\n $this->supplies->update($record);\n // check for DB errors\n $oops = $this->db->error();\n if (empty($oops['code']))\n $this->response(array('ok'), 200);\n else\n $this->response($oops, 400);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update_record($data, $id){\n\t\t$this->db->where('award_id', $id);\n\t\tif( $this->db->update('awards',$data)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "public function update( $sql, $params=array());", "function editRecord($rec)\r\n\t\t{\r\n\t\t\t// Create associative array of key fields and data values\r\n\t\t\t$data = array(\"idMedicalRecord\"=>$rec[0],\"medicalRec_weight\"=>$rec[1],\"medicalRec_height\"=>$rec[2],\"medicalRec_bloodPressure\"=>$rec[3],\"medicalRec_temperature\"=>$rec[4],\"medicalRec_bloodIronLevel\"=>$rec[5],\"medicalRec_time\"=>$rec[6],\"medicalRec_date\"=>$rec[7],\"medicalRec_medicalHistory\"=>$rec[8],\"medicalRec_rejectionReason\"=>$rec[9]);\r\n\t\t\t// Bind values to object's attributes\r\n\t\t\t$this->bind($data);\r\n\t\t\t// Add new updated values to table in database to location of given Primary key\r\n\t\t\t$this->update($rec[0]);\r\n\t\t}", "function update_data($where,$data,$table){\n $this->db->where($where);\n $this->db->update($table,$data);\n }", "public function update():void\n {\n $id = $this->id;\n $first_name = $this->first_name;\n $last_name = $this->last_name;\n $image = $this->image;\n $user_type = $this->user_type;\n $address = $this->address;\n\t\t$phone = $this->phone;\n $this->fetch(\n 'UPDATE user\n SET first_name = ?,\n last_name = ?,\n image = ?,\n user_type = ?,\n address=?,\n phone=?\n WHERE id = ?;',\n [$first_name, $last_name,$image, $user_type,$address ,$phone , $id]\n );\n }", "public function updateRecord($arrDatos) {\n\t\t\t\t$data = array(\n\t\t\t\t\t$arrDatos [\"column\"] => $arrDatos [\"value\"]\n\t\t\t\t);\n\t\t\t\t$this->db->where($arrDatos [\"primaryKey\"], $arrDatos [\"id\"]);\n\t\t\t\t$query = $this->db->update($arrDatos [\"table\"], $data);\n\t\t\t\tif ($query) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}", "private function update_record($table, Array $columns, Array $records, Array $where_columns, Array $where_records, $printSQL = false) {\n\t\treturn $this->get_database_utils ()->update_record ( $table, $columns, $records, $where_columns, $where_records, $printSQL );\n\t}", "private function update_record($table, Array $columns, Array $records, Array $where_columns, Array $where_records, $printSQL = false) {\n\t\treturn $this->get_database_utils ()->update_record ( $table, $columns, $records, $where_columns, $where_records, $printSQL );\n\t}", "private function update_record($table, Array $columns, Array $records, Array $where_columns, Array $where_records, $printSQL = false) {\n\t\treturn $this->get_database_utils ()->update_record ( $table, $columns, $records, $where_columns, $where_records, $printSQL );\n\t}", "public function Save()\r\n\t\t{\r\n\t\t\tif ($this->id == -1) {\r\n\t\t\t\tunset($this->columns[\"id\"]);\r\n\t\t\t\t$sqlCol = null;\r\n\t\t\t\t$sqlKey = null;\r\n\t\t\t\tforeach ($this->columns as $column => $value) {\r\n\t\t\t\t\t$data[$column] = $this->$column;\r\n\t\t\t\t\t$sqlCol .= \",\" . $column;\r\n\t\t\t\t\t$sqlKey .= \",:\" . $column;\r\n\t\t\t\t}\r\n\t\t\t\t$sqlCol = ltrim($sqlCol, \",\");\r\n\t\t\t\t$sqlKey = ltrim($sqlKey, \",\");\r\n\t\t\t\t$query = $this->db->prepare(\r\n\t\t\t\t\t\"INSERT INTO \" . $this->table . \" (\" . $sqlCol . \")\r\n\t\t\t\t\t\tVALUES (\" . $sqlKey . \") ;\"\r\n\t\t\t\t);\r\n\t\t\t\t$query->execute($data);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t// Sinon faire un update dynamique\r\n\t\t\t\t$sqlSet = null;\r\n\t\t\t\tforeach ($this->columns as $column => $value) {\r\n\t\t\t\t\t$data[$column] = $this->$column;\r\n\t\t\t\t\t$sqlSet[] .= $column . \"=:\" . $column;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Suppression de la mise à jour de la date d'update \r\n\t\t\t\t// la mise à jour des dates est maintenant faites en BDD.\r\n\t\t\t\t$query = $this->db->prepare(\r\n\t\t\t\t\t\"UPDATE \" . $this->table . \" SET \r\n\t\t\t\t\t\t\" . implode(\",\", $sqlSet) . \"\r\n\t\t\t\t\t\tWHERE id=:id;\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$query->execute($data);\r\n\t\t\t}\r\n\t\t}" ]
[ "0.79042345", "0.77664155", "0.74877346", "0.72845757", "0.7220152", "0.72146136", "0.71019787", "0.7017114", "0.6999028", "0.6981327", "0.6949352", "0.69181615", "0.6915977", "0.6895396", "0.68547875", "0.68230116", "0.681958", "0.67935467", "0.6790511", "0.6779492", "0.67596304", "0.67510855", "0.67374414", "0.67374414", "0.6715787", "0.6701779", "0.66925573", "0.6691368", "0.6689188", "0.6681201", "0.66229224", "0.6616671", "0.66120833", "0.6609063", "0.66025317", "0.6577835", "0.65717655", "0.6569056", "0.65670323", "0.65649295", "0.65454364", "0.65235615", "0.6512063", "0.6506478", "0.6499202", "0.6491762", "0.6488132", "0.6483528", "0.6482787", "0.6475009", "0.64622545", "0.6458547", "0.64541674", "0.644366", "0.64408785", "0.6431788", "0.6423489", "0.6419601", "0.6419021", "0.64178133", "0.6407153", "0.6403231", "0.6396207", "0.6390887", "0.6385937", "0.6385937", "0.6383919", "0.63825786", "0.637033", "0.6367925", "0.63678765", "0.6367509", "0.63649154", "0.63473564", "0.63439286", "0.6341738", "0.6341637", "0.63295114", "0.63248646", "0.6318097", "0.6311667", "0.63027847", "0.6302308", "0.63000894", "0.6298572", "0.62913114", "0.6287568", "0.6276772", "0.62749934", "0.62749934", "0.62749934", "0.6272395", "0.6264955", "0.626488", "0.6262422", "0.62436", "0.6242292", "0.6237878", "0.6237878", "0.6237878", "0.62355506" ]
0.0
-1
Query for one row and one column
protected function querySingleResult($sqlQuery){ return QueryExecutor::queryForString($sqlQuery); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exec_SELECTgetSingleRow() {}", "public function queryRow()\n\t{\n\t\treturn $this->queryInternal('fetch',$this->_fetchMode);\n\t}", "public function fetchRow();", "abstract public function getSpecificRow();", "public function queryRow($sql, $params = array());", "abstract public function getRow($query);", "private function query($query, $singleColumn=false, $singleRow=false)\n\t{\n\t\tdebug(\"SQL: query\", $query);\n\t\tif($this->debug)\n\t\t\t$this->sqlLog[] = $query;\n\n\t\tif($this->offline) return;\n\n\t $this->connect(); //if connection not already open \n\t $result = $this->mysqlConnection->query($query);\n\t $rows = SqlManager::getResultData($result, $singleColumn, $singleRow);\n\t return $rows;\n\t}", "abstract public function FetchRow();", "abstract public function GetRow($query, $type = DBA::ASSOC);", "public function get_row();", "public abstract function FetchRow();", "function FetchRow() {}", "public function testSingleResultQueryWithDuplicateColumns() {\r\n $record = ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'];\r\n // Write data to the database\r\n\t\t$this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n $query = 'select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE, STRING_VALUE as UUID from POTEST where UUID = \\'uuid1tRMR2\\'';\r\n $result = $this->getPersistenceAdapter()->executeSingleResultQuery($query);\r\n\t\t$this->assertEquals($record['string'], $result->UUID, 'Uuid should contain the string value but it does not.');\r\n\t\t$this->assertEquals($record['bool'] ? 1 : 0, $result->BOOLEAN_VALUE, 'Boolean value from persistent object differs from the boolean value of the database.');\r\n\t\t$this->assertEquals($record['int'], $result->INT_VALUE, 'Integer value from persistent object differs from the int value of the database.');\r\n\t\t$this->assertEquals($record['string'], $result->STRING_VALUE, 'String value from persistent object differs from the string value of the database.');\r\n }", "function selectRowByColumnValue($table_name, $column_name, $column_value)\n {\n $sql = sprintf(\n \"SELECT * FROM %s WHERE %s=\\\"%s\\\"\",\n $table_name,\n $column_name,\n SQLite3::escapeString($column_value));\n //echo $sql;\n $query_result = $this->query($sql);\n //echo count($query_result->fetchArray());\n $num_columns = $query_result->numColumns();\n // echo \"<br>num columns: \".$num_columns;\n // echo \"<br>column 0 type: \".$query_result->columnType(0);\n // echo \"<br>SQLITE3_NULL: \".SQLITE3_NULL.\"<br>\";\n return $query_result->fetchArray(SQLITE3_ASSOC);\n }", "public function row() {\n\t\tif ($this->returned) return false;\n\t\t$this->returned = true;\n\t\treturn $this->query;\n\t}", "function sql_result($res, $row = 0, $col = 0)\n {\n $results = array();\n if (intval($row) < 1) {\n $results = $res->fetch(PDO::FETCH_BOTH);\n return $results[$col];\n }\n else {\n for ($i = 0; $i < intval($row); $i++) {\n $results = $res->fetch(PDO::FETCH_BOTH);\n }\n $results = $res->fetch(PDO::FETCH_BOTH);\n return $results[$col];\n }\n }", "public function one($sql, $col = 0) {\n return $this->oneFromArray($this->rowx($sql, true), $col);\n }", "function FetchOneRowDataByTwoField($tableName,$fieldName,$fieldValue,$fieldName2,$fieldValue2)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"' and $fieldName2='\".$fieldValue2.\"' \");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->row();\n }\n \n}", "function query_one_only($query,$file='Unknown',$line='Unknown')\n {\n $result = $this->query($query,$file,$line,0);\n if($result && $this->how_many_results($result) == 1) {\n return $this->get_result_array($result);\n }\n return FALSE;\n }", "public function singleRow(){\n $this->execute();\n return $this->statement->fetch(PDO::FETCH_OBJ);\n }", "public function getFromCache_queryRow() {}", "public function queryRow($params = array())\n {\n \treturn $this->queryInternal('fetch',$this->_fetchMode, $params);\n }", "public function cell($row=0, $column=0) {\n\t\tif ($row || $column) return false;\n\t\treturn $this->query;\n\t}", "function fetchSingleRow($query) \t{\n\t\tif($query != '') \t\t{\n\t $res = $this->execute($query);\n\t $data = $this->fetchAll($res);\n\t if($data) return $data[0]; \n\t\t}\n\t}", "public function fetchRow($sql);", "public function fetchRow($sql);", "public function testQueryFetchRow()\n {\n $row = $this->getConnection()->query()('SELECT \"Hello World\"')()('fetch')();\n return $this->assertTrue(count($row['rows']) === 1);\n }", "public function selectRow($row);", "abstract protected function _getRowBoth($rs);", "function mswGetTableData($table,$row,$val,$and='',$params='*') {\n $q = mysql_query(\"SELECT $params FROM `\".DB_PREFIX.$table.\"`\n WHERE `\".$row.\"` = '{$val}'\n $and\n LIMIT 1\n \") or die(mswMysqlErrMsg(mysql_errno(),mysql_error(),__LINE__,__FILE__));\n return mysql_fetch_object($q);\n}", "public function query_col($sql) {\r\n\t return $this->query_select_single( $sql );\r\n\t}", "function getResRow($tsql,$method=PDO::FETCH_ASSOC){ \n $rs=$this->DBH->prepare($tsql);\n $rs->execute();\n $row=$rs->fetch($method);\n \n return $row;\n }", "function query_one($query,$file='Unknown',$line='Unknown')\n {\n $result = $this->query($query,$file,$line,0);\n if($result && $this->how_many_results($result) > 0) {\n return $this->get_result_array($result);\n }\n return FALSE;\n }", "public function executeRow1(string $query): array\n {\n $result = $this->query($query);\n $row = $result->fetch_assoc();\n $n = $result->num_rows;\n $result->free();\n\n if ($this->mysqli->more_results()) $this->mysqli->next_result();\n\n if ($n!=1)\n {\n throw new ResultException('1', $n, $query);\n }\n\n return $row;\n }", "protected function mysqlRow($query){\n \treturn $this->sp->db->fetchRow($query);\n }", "function DatosRow($tabla,$columna,$valor){\n\t\t\t\t\t$this->db->where($columna,$valor);\n\t\t\t\t\t$query = $this->db->get($tabla);\n\n\t\t\t\t\tif ($query->num_rows() > 0) {\n\t\t\t\t\t\treturn $query->result();\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}", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "public function get()\n {\n $args = func_get_args();\n if (count($args) === 1) {\n if (is_array($args[0])) {\n $this->getByIds($args[0]);\n } else {\n $this->getById($args[0]);\n }\n } else {\n if (is_string($args[0])) {\n $this->getByColumn($args[0], $args[1]);\n } else {\n $this->getByIds($args);\n }\n }\n return $this->run();\n }", "abstract public function get_rows();", "public function first($columns = ['*']);", "function FetchOneRowDataByOneField($tableName,$fieldName,$fieldValue)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"'\");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->row();\n }\n \n}", "function selectRow($table,$field,$where) {\n\t\tif($where!='')\n\t\t\t$where= ' WHERE '.$where;\n \t$query = \"SELECT \".$field.\"\n \t FROM \".$this->tablePrefix .$table.$where ;\n $res = $this->execute($query);\n \treturn $this->fetchOne($res);\n }", "protected abstract function getRow($sql);", "public function getRow();", "public function row(string $query = null): ?array;", "public function testResultGetColumn()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test WHERE status='ACTIVE'\");\n \t$this->assertEquals(array('first row', 'next row'), $result->getColumn(2), \"Get column 2\");\n \t$this->assertEquals(array('first row', 'next row'), $result->getColumn('title'), \"Get column 'title'\");\n \t$this->assertEquals(array(1, 2), $result->getColumn(0), \"Get column 0\");\n }", "function sql_fetch_row($query) {\n\t\treturn pg_fetch_row($query);\n\t}", "public function selectRow ($sql,$array) {\n $this->quick_prepare($sql,$array);\n return $this->fetch();\n }", "public function queryRowByField($conditions = array(), $params=array(), $columns = \"*\") {\n if ( is_array($columns) ) {\n $columns = implode(\",\", $columns);\n }\n \n $dbkey = $this->getDbKey();\n $selectObj = Yii::app()->$dbkey->createCommand() \n\t\t\t->select($columns)\n\t\t\t->from($this->tableName());\t\n if (! empty($conditions) ) {\n $selectObj->where($conditions, $params);\n }\n \n $result = $selectObj->queryRow();\n if ( empty($result) ) return null;\n \n if ( strpos($columns, \",\") === false && \n strpos($columns, \"*\") === false ) {\n $result = $result[$columns]; \n } \n \n return $result; \n }", "public function single($query,$params = null)\n {\n $this->Init($query,$params);\n return $this->sQuery->fetchColumn();\n }", "public function getRow() {}", "function getSpecificValue($con, $table, $column1, $column2, $value1)\n{\n $result = mysqli_query($con, \"SELECT $column2 \"\n . \"FROM $table \"\n . \"WHERE $column1='$value1'\");\n $valueArray = mysqli_fetch_array($result);\n\n return $valueArray[0];\n}", "public function query_and_fetch_one($sql=\"\")\n {\n $rows = $this->query_and_fetch($sql);\n return ($rows) ? array_shift($rows) : false;\n }", "function eeps_MySQL_getOneRow($db, $query, $params)\n{\n $result = eeps_MySQL_getQueryResult($db, $query . \" LIMIT 1\", $params);\n if (is_array($result)) {\n if (count($result) > 0) {\n return $result[0];\n }\n }\n return null;\n}", "public function fetchOne($sql, $params = array());", "public function testQueryFetchColumn()\n {\n $column = $this->getConnection()->query()('SELECT \"Hello World\"')()('fetch-column')();\n return $this->assertTrue(count($column['rows']) < 1);\n }", "function oneQuery($sql){\n\t\treturn $this->fetch($this->query($sql))[0];\n\t}", "function get_one_by( $conds = array()) {\n\n\t\t// where clause\n\t\t$this->custom_conds( $conds );\n\n\t\t// query the record\n\t\t$query = $this->db->get( $this->table_name );\n\n\t\tif ( $query->num_rows() == 1 ) {\n\t\t// if there is one row, return the record\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t// if there is no row or more than one, return the empty object\n\t\t\t return $this->get_empty_object( $this->table_name );\n\t\t\t\n\t\t}\n\n\t}", "public function getOne($sql, array $args = array())\n {\n //获取所有实参\n $args=func_get_args();\n //从实参里面获取sql语句,第一个就是sql语句,用array_shift弹出第一个\n $sql=array_shift($args);\n //将sql语句分割成数组的形式,循环去拼接\n $matchs=preg_split('/\\?[NFT]/',$sql);\n //最后一个数据没用,将它弹出\n array_pop($matchs);\n $sql='';\n foreach($matchs as $key=>$val){\n $sql.=$val.$args[$key];\n }\n $rows = M()->query($sql);\n $row=array_shift($rows);\n //这里是getrow,所以返回第一个\n return array_shift($row);\n }", "function selectEqualTo($table_name, $column_name, $column_value)\n {\n $sql = sprintf(\n \"SELECT * FROM %s WHERE %s = \\\"%s\\\"\",\n $table_name,\n $column_name,\n $column_value);\n\n $rows = array();\n $result = $this->query($sql);\n while($row = $result->fetchArray(SQLITE3_ASSOC))\n {\n array_push($rows, $row);\n }\n return $rows;\n }", "abstract public function query();", "public function getOne($query, $col = 0) {\n\t\t$result = $this->query($query);\n\t\tif ($result->num_rows < 1) {\n $one = false;\n } else {\n $row = $result->fetch_array();\n $one = $row[$col];\n }\n\t\t$result->free();\n\t\treturn $one;\n\t}", "function KM_getSingleRow($where=array(),$options=array())\n\t { \t\t\t\n\t\tif(is_array($where))\n\t\t{\n\t\t\t$where_cond=\"\";\n\t\t\tforeach($where as $key=>$value)\n\t\t\t{\n\t\t\t\tif($where_cond !=\"\") $where_cond.=\" and \";\n\t\t\t\t$where_cond.=$key.\"='\".$value.\"'\";\n\t\t\t}\n\t\t\t$where=$where_cond;\n\t\t}\t\t\n\t\tif(isset($options['class']))\t\t \n\t\t\t$table = $this->db->dbprefix($options['class']);\t\t \n\t\telse\n\t\t\t$table = $this->table;\n\t \t\n\t\t$sql=\"select * from $table where $where limit 0,1 \";\t\t\n\t\t\n\t\t$query = $this->db->query($sql);\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t return $query->row();\t\t \n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t} \n\t\t \n\t }", "public static function QuerySingle($query, ...$args /*, $entire_row = true */)\n\t{\n\t\t$entire_row = is_bool(end($args)) ? array_pop($args) : true;\n\n\t\tif ($q = self::Query($query, ...$args)) {\n\t\t\tif ($row = $q->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\tif (self::$queryLogging) self::$queries[self::$num_queries]['fetch'] = 1;\n\t\t\t\treturn $entire_row ? $row : reset($row);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function getOne($_sTable, $_mWhere = NULL, $_bConnectWhereArrayWithOrInsteadOfAnd = FALSE) {\n $aTemp = get($_sTable, $_mWhere, $_bConnectWhereArrayWithOrInsteadOfAnd);\n return count($aTemp) > 0 ? $aTemp[0] : NULL;\n}", "public static function queryRow($sql)\n\t{\n\t\t$sql = $sql . ' LIMIT 0,1'; //TODO check not already in $sql!\n\t\t\n\t\t$result = self::$link->query($sql);\n\t\t\n\t\tif(!$result)\n\t\t{\n\t\t\tself::handleError($sql);\n //TODO should probably return here\n\t\t}\n\t\t\n\t\t$row = $result->fetch_assoc();\n\t\t\n\t\t$result->close();\n\t\t\n\t\treturn $row;\n\t}", "function query_values($sql, $parameters = null) {\n $query = $this->query($sql, $parameters);\n return $query->fetchAll(PDO::FETCH_COLUMN, 0);\n }", "function pdo_result($stmt, $row, $field=0) {\r\n \r\n // Scroll to and retrieve the given $row (maybe it's buffered even)\r\n if (PDO_SEEKABLE) {\r\n $rows = array(\r\n $row => pdo_stmt($stmt)->fetch(PDO::FETCH_BOTH, PDO::FETCH_ORI_ABS, $row)\r\n );\r\n }\r\n \r\n // workaround: fetch everything, works just once\r\n else {\r\n pdo_trigger_error(\"pdo_result() Can currently only be used once, for fetching a value from the first \\$row. Scrolling only works with PDO_SEEKABLE enabled.\", E_USER_WARNING);\r\n\r\n $rows = pdo_stmt($stmt)->fetchAll(PDO::FETCH_BOTH);\r\n #static $rows[hash(stmt)]; //would otherwise bind the result set here\r\n }\r\n \r\n // check if found\r\n if (isset($rows[$row][$field])) {\r\n return $rows[$row][$field];\r\n }\r\n else {\r\n pdo_trigger_error(\"pdo_result() Couldn't find row [$row] and column `$field`.\", E_USER_NOTICE);\r\n }\r\n \r\n }", "public function rowx($sql, $both = false) {\n return $this->mfa($this->data($sql), $both);\n }", "public function firstRow()\n {\n $query = clone $this;\n $offset = $this->limit ? $this->limit['start'] : 0;\n $query->setLimit(1, $offset);\n return $query;\n }", "public static function select_value($query)\n {\n $column = self::select_column($query);\n if ($column == null)\n return null;\n if (count($column) == 1)\n return $column[0];\n throw new DbTooManyRowsException(\"Invalid query. Db::select_value returned more than one row for:\\n\\n\".$query.\"\\n\");\n }", "public function fetchColumn(int $column = 0);", "public function get_col($query = \\null, $x = 0)\n {\n }", "abstract public function getRow();", "abstract public function getRow();", "function queryRow($query, $type)\n {\n $result = $this->dbc->getRow($query, null, DB_FETCHMODE_ASSOC);\n if (PEAR::isError($result)) {\n return Tree::raiseError(TREE_ERROR_DB_ERROR, null, null, $result->getMessage() . '-' . $result->getUserInfo());\n }\n return $result;\n }", "public function testMultipleResultQueryWithSingleResultStatement() {\r\n $uuid = 'abcdefg';\r\n $bool = true;\r\n $int = 1234567;\r\n $string = 'avorium';\r\n // Write data to the database\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$uuid.'\\','.($bool ? 1:0).','.$int.', \\''.$string.'\\')');\r\n // Read data out and cast it to persistent object\r\n $query = 'select * from POTEST where UUID = \\'abcdefg\\'';\r\n $pos = $this->getPersistenceAdapter()->executeMultipleResultQuery($query);\r\n $this->assertEquals(1, count($pos), 'Wrong number of database records found.');\r\n }", "public function getOneDataset()\n\t{\t\n\t\tglobal $ilDB;\n\t\t\n\t\t$data_type = array();\n\t\t$data_value = array();\n\t\t\n\t\t$query = 'SELECT * FROM '.$this->dbTable.' WHERE ';\n\t\t\n\t\tif($this->getMDB2Query() != '' && $this->getMDB2DataType() != '' && $this->getMDB2DataValue() != '')\n\t\t{\n\t\t\t$query .= $this->getMDB2Query();\n\t\t\tif ($this->orderField != \"\")\n\t\t\t{\n\t\t\t\t$query .= \" ORDER BY \".$this->orderField;\n\t\t\t}\n\t\t\t$data_type = $data_type + $this->getMDB2DataType();\n\t\t\t$data_value = $data_value + $this->getMDB2DataValue();\n\t\t\t\n\t\t\t\n\t\t\t$res = $ilDB->queryf($query, $data_type, $data_value);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query .= '1';\n\t\t\t\n\t\t\tif ($this->orderField != \"\")\n\t\t\t{\n\t\t\t\t$query .= \" ORDER BY \".$this->orderField;\n\t\t\t}\n\t\t\t\n\t\t\t$res = $ilDB->query($query);\n\t\t\t\n\t\t}\n\t\t$row = $ilDB->fetchAssoc($res);\n\t\t\n\t\treturn $row;\n\n\t}", "function db_getone($sql, $index){\n\t\t$row = $this->db->query($sql)->row_array();\n\t\tif(!empty($row[$index])){\n\t\t\treturn $row[$index];\n\t\t}\n\t}", "function getOne($query, array $binds = [], $conn)\n{\n $statement = $conn->prepare($query);\n foreach($binds as $key => $value) {\n $statement->bindValue($key, $value);\n }\n $statement->execute();\n $result = $statement->fetch();\n $statement->closeCursor();\n return $result;\n}", "private function Select()\n {\n $return = false;\n $action = $this->Action();\n $columns = $this->Columns();\n $table = $this->Table();\n $where = (Checker::isArray($this->Where(), false))?$this->Where():array(Where::QUERY => \"\", Where::VALUES => array());\n $order = (Checker::isString($this->Order()))?$this->Order():\"\";\n $limit = (Checker::isInt($this->Limit()))?\" LIMIT \".$this->Limit():\"\";\n if($columns && $table && Checker::isArray($where, false))\n {\n $return[Where::QUERY] = \"$action $columns FROM $table\".$where[Where::QUERY].\"$order$limit\";\n\n if(Checker::isArray($where, false) && isset($where[Where::VALUES])) $return[Where::VALUES] = $where[Where::VALUES];\n else $return[Where::VALUES] = array();\n }\n return $return;\n }", "public function queryOne(string $sql)\n {\n return $this->wpdb->get_row($sql, ARRAY_A);\n }", "public function selectOne(string $table, array $columns = ['*'], array $predicate = []): array\n {\n $paramValues = [];\n $sql = $this->buildSelectQuery($table, $columns, $predicate, $paramValues) . ' limit 1';\n return $this->db->query($sql, $paramValues);\n }", "function query($sql,$calculateRows=false,$fastHint=false);", "public function rows(string $query = null): array;", "private function _selSingleRow($arr=NULL,$tablename,$where=NULL)\n\t{\n\t\tglobal $con;\n\t\tif(!empty($arr))\n\t\t{\n\t\t\t$selstr=implode(\",\",$arr);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$selstr=\"*\";\n\t\t}\n\t\tif(!empty($where))\n\t\t{\n\t\t\t$wherearr=array();\n\t\t\tforeach($where as $wherekey=>$whereval)\n\t\t\t{\n\t\t\t\t$wherearr[] = $wherekey.\"='\".$whereval.\"'\";\n\t\t\t}\n\t\t\t$wherestr=\" where \".implode(' AND ',$wherearr);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$wherestr=\"\";\n\t\t}\n\t\t$sql=\"select \".$selstr.\" from `\".$tablename.\"`\".$wherestr;\n\t\t$query=mysqli_query($con,$sql);\n\n\t\t$result=mysqli_fetch_object($query);\n\t\tif(!empty($result))\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}", "protected function _createColumnQuery()\n\t{\n\t\n\t}", "protected function row($row)\n { \n return DB::table($this->table)\n ->where('personal_access_client', 0)\n ->first()\n ->$row;\n }", "public function testMultipleResultQueryWithDuplicateColumns() {\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n // Write data to the database\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n $query = 'select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE, STRING_VALUE as UUID from POTEST';\r\n $result = $this->getPersistenceAdapter()->executeMultipleResultQuery($query);\r\n $this->assertEquals(count($records), count($result), 'Wrong number of database records found.');\r\n for($i = 0; $i < count($result); $i++) {\r\n $this->assertEquals($records[$i]['string'], $result[$i]->UUID, 'Uuid should contain the string value but it does not.');\r\n $this->assertEquals($records[$i]['bool'] ? 1 : 0, $result[$i]->BOOLEAN_VALUE, 'Boolean value from persistent object differs from the boolean value of the database.');\r\n $this->assertEquals($records[$i]['int'], $result[$i]->INT_VALUE, 'Integer value from persistent object differs from the int value of the database.');\r\n $this->assertEquals($records[$i]['string'], $result[$i]->STRING_VALUE, 'String value from persistent object differs from the string value of the database.');\r\n }\r\n }", "public function select($columns);", "public function get_query_result()\n\t{\n\t\t$sql = \"select * from test_db\";\n\t\t$query = $this->db->query($sql);\n\n\t\t//Complete array result\n\t\t$result = $query->result_array();\n\n\t\t//result of first row\n\t\t$firsts_row = $query->first_row();\n\t}", "function getOne(String $tblname, array $where, array $fetchOnly = null, String $operator = null)\n {\n $cmd = \"SELECT * FROM {$tblname} WHERE \";\n\n // >> Checking for FetchOnly Params:\n if (!is_null($fetchOnly)) {\n $keys = \"\";\n foreach ($fetchOnly as $key) {\n $keys .= \"{$key}, \";\n }\n $cmd = str_replace('*', substr($keys, 0, strrpos($keys, \", \")), $cmd);\n }\n\n // Looping through Params:\n foreach ($where as $key => $value) {\n $cmd .= strtoupper($key) . \"='\" . $this->__sanitize($value) . \"' AND \";\n }\n if (!is_null($operator)) {\n $cmd = str_replace('=', $operator, $cmd);\n }\n\n $cmd = substr($cmd, 0, strrpos($cmd, \" AND \"));\n // >> Send Query and return Results:\n $this->send($cmd);\n return ($this->count > 0) ? $this->result[0] : $this->result;\n }", "function FetchDataByTwoField($tableName,$fieldName,$fieldValue,$fieldName2,$fieldValue2)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"' and $fieldName2='\".$fieldValue2.\"' \");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->result_array();\n }\n \n}", "public function QueryOne($sql, array $parameters = null){\n\t\tif($this->Execute($sql, $parameters)){\n\t\t\treturn $this->statement->fetch(PDO::FETCH_COLUMN, 0);\n\t\t}\n\t}", "function queryRow($queryString)\n\t{\n\t\t$result = $this->query($queryString);\n\t\t\n\t\tif($this->numRows($result) > 0) {\n\t\t\treturn $this->fetch($result);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "abstract protected function _getRowAssoc($rs);", "protected function export_rows() {\n\t\t\t// Check if table exists to prevent SQL injection.\n\t\t\t$wpda_dictionary_exists = new WPDA_Dictionary_Exist( $this->schema_name, $this->table_list );\n\t\t\tif ( ! $wpda_dictionary_exists->table_exists() ) {\n\t\t\t\twp_die();\n\t\t\t}\n\n\t\t\t// Get table columns and data types.\n\t\t\t$wpda_list_columns = WPDA_List_Columns_Cache::get_list_columns( $this->schema_name, $this->table_list );\n\t\t\t$table_columns = $wpda_list_columns->get_table_columns();\n\n\t\t\t// Create array for fast column_name based access.\n\t\t\t$column_data_types = $this->column_data_types( $table_columns );\n\n\t\t\t// Get primary key columns.\n\t\t\t$table_primary_key = $wpda_list_columns->get_table_primary_key();\n\n\t\t\t// Check validity request. All primary key columns must be supplied. Return error if\n\t\t\t// primary key columns are missing.\n\t\t\tforeach ( $table_primary_key as $key ) {\n\t\t\t\tif ( ! isset( $key ) ) {\n\t\t\t\t\t$this->wrong_arguments();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tglobal $wpdb;\n\n\t\t\t// Build where clause based on primary key.\n\t\t\t$where = '';\n\n\t\t\t// Use first column of the primary key to loop through arguments. Add additional arguments in the loop.\n\t\t\t// A mismatch in the number of argument is possible as long as the columns match based on the first column\n\t\t\t// of the primary key. Other mismatches won't be taken into account.\n\t\t\t$count_pk = count( $_REQUEST[ $table_primary_key[0] ] );\n\t\t\tfor ( $i = 0; $i < $count_pk; $i ++ ) {\n\t\t\t\t$and = '';\n\t\t\t\tforeach ( $table_primary_key as $key ) {\n\t\t\t\t\t$and .= '' === $and ? '(' : ' and ';\n\t\t\t\t\tif ( $this->is_numeric( $column_data_types[ $key ] ) ) {\n\t\t\t\t\t\t$and .= $wpdb->prepare( \"`$key` = %d\", $_REQUEST[ $key ][ $i ] ); // WPCS: unprepared SQL OK.\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$and .= $wpdb->prepare( \"`$key` = %s\", stripslashes( $_REQUEST[ $key ][ $i ] ) ); // WPCS: unprepared SQL OK.\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$and .= '' === $and ? '' : ')';\n\n\t\t\t\t$where .= '' === $where ? ' where ' : ' or ';\n\t\t\t\t$where .= $and;\n\t\t\t}\n\n\t\t\t$this->header( $this->table_list );\n\t\t\t$this->db_begin();\n\t\t\t$this->insert_rows( $this->table_list, $where );\n\t\t\t$this->db_end();\n\t\t}", "public function read_one(){\n $query = \"SELECT * FROM {$this->table} WHERE {$this->table}.cat_id = {$this->cat_id}\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n return $stmt;\n }", "function Select_Record_By_One_Filter($data, $table_name) {\r\n global $con;\r\n $key = array_keys($data);\r\n $value = array_values($data);\r\n $sql = \"select * from $table_name where $key[0] = '$value[0]'\";\r\n try {\r\n $stmt = $con->query($sql);\r\n return $stmt;\r\n } catch (PDOException $e) {\r\n print $e->getMessage();\r\n }\r\n}", "protected function get_result_from_query(){\n\t\t$this ->open_connection();\n\t\t$result = $this -> conn -> query($this -> query);\n\t\twhile($this -> rows[] = $result ->fetch_assoc());\n\t\t$result -> close();\n\t\t$this -> close_connection();\n\t\tarray_pop($this -> rows); // Extraé y devuelve el último valor\n\t}", "abstract public function hasRow();" ]
[ "0.6886992", "0.67126423", "0.65816855", "0.64302504", "0.6425761", "0.62377536", "0.6234224", "0.6234007", "0.62218374", "0.6192749", "0.6187849", "0.6176964", "0.6174449", "0.6145193", "0.6144158", "0.6081508", "0.60548586", "0.604489", "0.60378903", "0.60350907", "0.60112625", "0.60050404", "0.5986258", "0.5980687", "0.5961794", "0.5961794", "0.5960265", "0.59494776", "0.593436", "0.59071773", "0.590599", "0.58931875", "0.5884165", "0.58705986", "0.58556837", "0.58523846", "0.5818563", "0.5807381", "0.5798214", "0.57952434", "0.5781069", "0.57686305", "0.57510585", "0.57244414", "0.57227963", "0.5720829", "0.57165986", "0.5712167", "0.570517", "0.57002175", "0.5695292", "0.5692947", "0.568877", "0.5684957", "0.567645", "0.5674383", "0.5668758", "0.56649315", "0.56635135", "0.5661312", "0.56598794", "0.56567484", "0.5647236", "0.5636972", "0.56328076", "0.5630817", "0.562548", "0.5623347", "0.56215334", "0.5620958", "0.56197774", "0.56195337", "0.5618217", "0.5615504", "0.5615504", "0.56019014", "0.5596628", "0.5594718", "0.55937135", "0.5589891", "0.55818456", "0.5580906", "0.55760175", "0.55733526", "0.5571592", "0.5571492", "0.55677605", "0.5564965", "0.5564239", "0.55614454", "0.55512476", "0.55387574", "0.55372596", "0.5532132", "0.5527443", "0.5527054", "0.5525547", "0.5522665", "0.5522277", "0.5517384", "0.5516578" ]
0.0
-1
Insert row to table
protected function executeInsert($sqlQuery){ return QueryExecutor::executeInsert($sqlQuery); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertRow($row);", "public function insert(Table $table, $row);", "public function insertRow(TableRow $row, $position = null);", "protected abstract function insertRow($tableName, $data);", "abstract public function insert(string $table, array $row, array $options = []);", "protected function insertRow()\n { \n $assignedValues = $this->getAssignedValues();\n\n $columns = implode(', ', $assignedValues['columns']);\n $values = '\\''.implode('\\', \\'', $assignedValues['values']).'\\'';\n\n $tableName = $this->getTableName($this->className);\n\n $connection = Connection::connect();\n\n $insert = $connection->prepare('insert into '.$tableName.'('.$columns.') values ('.$values.')');\n var_dump($insert);\n if ($insert->execute()) { \n return 'Row inserted successfully'; \n } else { \n var_dump($insert->errorInfo()); \n } \n }", "public function addRow(TableRow $row);", "function insertRow($row)\n {\n $column_names_sql = '';\n $column_values_sql = '';\n $i = 0;\n $len = count($row);\n foreach($row as $column_name=>$column_value)\n {\n $i = $i + 1;\n $column_names_sql.=$column_name;\n $column_values_sql.=\"\\\"\".sprintf(\"%s\", SQLite3::escapeString($column_value)).\"\\\"\";\n\n if ($i < ($len))\n {\n $column_names_sql.=\", \";\n $column_values_sql.=\", \";\n }\n }\n\n\n $sql = sprintf(\"INSERT INTO PRODUCT_INVENTORY (%s) VALUES (%s);\", $column_names_sql, $column_values_sql);\n $this->exec($sql);\n\n return $this->lastInsertRowId();\n\n }", "public function insert($connection, $table, $rows);", "public function insert_student($row)\n\t\t{\n\t\t\t$this->conn->insert($this->create_student($row));\n\t\t}", "public function insertRow($table, $data){\n\n\t \t$this->db->insert($table, $data);\n\t \treturn $this->db->insert_id();\n\t}", "public function insertRow($table, $data){\n\t\t$this->db->insert($table, $data);\n\t\treturn $this->db->insert_id();\n\t}", "public function insertRow($table, $data){\n\n\t \t$this->db->insert($table, $data);\n\t \treturn $this->db->last_query();\n\t \t // $this->db->insert_id();\n\t}", "public function insert($row)\n {\n $entry = '<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:gsx=\"http://schemas.google.com/spreadsheets/2006/extended\">';\n foreach($row as $colName => $value) {\n $entry .= sprintf(\n '<gsx:%s>%s</gsx:%s>',\n $colName,\n $value,\n $colName\n );\n }\n $entry .= '</entry>';\n\n ServiceRequestFactory::getInstance()->post($this->getPostUrl(), $entry);\n }", "public function insertRow($row_start, $row_end) {\n\t}", "public function insert($tableName, $data);", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "public function insert()\n {\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $columlList = \" (\";\n $valuelList = \" (\";\n foreach ($this->attributes as $column => $value) {\n $columlList .= $column . \", \";\n $valuelList .= \":\".$column . \", \";\n }\n $columlList = str_last_replace(\", \", \")\", $columlList);\n $valuelList = str_last_replace(\", \", \")\", $valuelList);\n $sqlQuery = \"INSERT INTO \" . $this->table . $columlList . \" VALUES\" . $valuelList;\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n #println($sqlQuery, \"blue\");\n }\n }", "public function insertRow($table) {\n $merge = array_merge($this->fields, $this->newFields);\n return ( self::getDb()->insert($table, $merge) > 0 );\n }", "public function insertRow($row)\n {\n $sql = 'INSERT INTO data (sity, date, temp_curr, humidity, wind_spid, wind_dirn, icon, description) '\n . 'VALUES(:sity, :date, :temp_curr, :humidity, :wind_spid, :wind_dirn, :icon, :description)';\n\n $stmt = $this->pdo->prepare($sql);\n try {\n $stmt->execute([\n ':sity' => $row['sity'],\n ':date' => $row['date'],\n ':temp_curr' => $row['temp_curr'],\n ':humidity' => $row['humidity'],\n ':wind_spid' => $row['wind_spid'],\n ':wind_dirn' => $row['wind_dirn'],\n ':icon' => $row['icon'],\n ':description' => $row['description'],\n ]);\n } catch (\\PDOException $e) {\n $err_text = 'Error Insert Data!' . $e->getMessage();\n $this->errLoger($err_text, 'error');\n return null;\n }\n return $this->pdo->lastInsertId();\n }", "public function insertRow($data) {\n $result = DB::table($this->table)\n ->insertGetId($data);\n return $result;\n }", "function insert ($tablename, $newRow) \n\t{\n\t\t$lockfp = $this->getLock($tablename);\t\t\t\n\t\t$this->tables[$tablename][] = $newRow;\n\t\t$this->writeTable($tablename);\n\t\t$this->releaseLock($lockfp);\n\t}", "public function insert(phpDataMapper_Model_Row $row)\n\t{\n\t\t$rowData = $row->getData();\n\t\t\n\t\t// Fields that exist in the table\n\t\t$tableFields = array_keys($this->fields);\n\t\t\n\t\t// Fields that have been set/updated on the row that also exist in the table\n\t\t$rowFields = array_intersect($tableFields, array_keys($rowData));\n\t\t\n\t\t// Get \"col = :col\" pairs for the update query\n\t\t$insertFields = array();\n\t\t$binds = array();\n\t\tforeach($rowData as $field => $value) {\n\t\t\tif($this->fieldExists($field)) {\n\t\t\t\t$insertFields[] = $field;\n\t\t\t\t// Empty values will be NULL (easier to be handled by databases)\n\t\t\t\t$binds[$field] = $this->isEmpty($value) ? null : $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Ensure there are actually values for fields on THIS table\n\t\tif(count($insertFields) > 0) {\n\t\t\t// build the statement\n\t\t\t$sql = \"INSERT INTO \" . $this->getTable() .\n\t\t\t\t\" (\" . implode(', ', $rowFields) . \")\" .\n\t\t\t\t\" VALUES(:\" . implode(', :', $rowFields) . \")\";\n\t\t\t\n\t\t\t// Add query to log\n\t\t\t$this->logQuery($sql, $binds);\n\t\t\t\n\t\t\t// Prepare update query\n\t\t\t$stmt = $this->adapter->prepare($sql);\n\t\t\t\n\t\t\tif($stmt) {\n\t\t\t\t// Bind values to columns\n\t\t\t\t$this->bindValues($stmt, $binds);\n\t\t\t\t\n\t\t\t\t// Execute\n\t\t\t\tif($stmt->execute()) {\n\t\t\t\t\t$rowPk = $this->adapter->lastInsertId();\n\t\t\t\t\t$pkField = $this->getPrimaryKeyField();\n\t\t\t\t\t$row->$pkField = $rowPk;\n\t\t\t\t\t$result = $rowPk;\n\t\t\t\t} else {\n\t\t\t\t\t$result = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$result = false;\n\t\t\t}\n\t\t} else {\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\t// Save related rows\n\t\tif($result) {\n\t\t\t$this->saveRelatedRowsFor($row);\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function insert($table, array $data);", "private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }", "abstract public function insertRecord($tableName, $record);", "protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }", "public function doInsert( $data ) {\t\t\r\n\r\n\t\t\r\n\t\t\t\t$newRow = $this->createRow();\r\n\t\t\t\r\n\t\t\t\tforeach ( $newRow->toArray() as $key => $v ) {\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t$newRow[ $key ] = Class_array::getValue( $data, $key );\r\n\t\t\t\t\r\n }\r\n\t\t\t\t$newRow->save();\t\t\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\treturn $newRow;\r\n\t\t\t\r\n\t\t//}\r\n\t}", "public function addRow($row)\n {\n $this->rows[] = $row;\n }", "public function insert($table);", "private function AddRow($row) {\n $this->_table .= $this->Tpl2HTML($this->_rowtpl, array('RowContent' => $row));\n $this->_rown++;\n }", "abstract public function insert();", "function add_row()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->rows[] = $this->_prep_args($args);\n\t}", "public function saveRow( $row );", "public function addRow($data)\n\t{\n\t\t$struct = isset($this->table) ? $this->table->structure() : null;\n\t\t\n\t\tif (is_array($data)) {\n\t\t\t$model = $this->generateModel($data);\n\t\t\t$row = new Row($model, $struct);\n\t\t} else if ($data instanceof ModelInterface) {\n\t\t\t$row = new Row($data, $struct);\n\t\t} else if ($data instanceof Row) {\n\t\t\t$row = $data;\n\t\t}\n\t\t\n\t\tif (!isset($row)) {\n\t\t\tthrow new \\Exception(\"No valid row data was provided.\");\n\t\t}\n\t\t\n\t\t$this->rows[] = $row;\n\t}", "public function insert($data);", "public abstract function insert();", "function insert($rowindex) {\r\n $tf = array();\r\n $tv = array();\r\n #~ $value = '';\r\n $um = NULL;\r\n foreach ($this->properties as $colvar=>$col) {\r\n if ($col->colname == '') continue; # a virtual field, usually used for display purpose\r\n $value = $this->ds->{$colvar}[$rowindex];\r\n if ($col->on_insert_callback != '')\r\n $value = eval($col->on_insert_callback);\r\n if ($col->inputtype == 'file' and $col->datatype == 'int') {\r\n if (!$um) $um = instantiate_module('upload_manager');\r\n $value = $um->put_file($colvar, $rowindex, $this->module);\r\n }\r\n\r\n $tf[] = '`'.$col->colname.'`';\r\n if ($value == 'Now()') {\r\n $tv[] = myaddslashes($value);\r\n }\r\n else {\r\n $tv[] = \"'\".myaddslashes($value).\"'\";\r\n }\r\n }\r\n $sql_fields = join(',',$tf);\r\n $sql_values = join(',',$tv);\r\n $sql = 'insert into `'.$this->db_table.'` ('.$sql_fields.') values ('.$sql_values.')';\r\n #~ echo $sql;exit();\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n $ret = mysql_insert_id(); # new!\r\n return $ret;\r\n }", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "protected function insert()\n\t{\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tinsert into\n\t\t\t\tBooth (BoothNum)\n\t\t\t\tvalues (?)\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}", "function insertRow($insertObject){\n $dbh = dbConnect();\n if(!$dbh){\n return false;\n }\n $keystring = $insertObject->colString();\n $valuesString = \"\";\n for ($i=0; $i < $insertObject->getTableSize(); $i++)\n {\n $valuesString .= \"?\";\n if($i < $insertObject->getTableSize() - 1){\n $valuesString .= \",\";\n }\n }\n $sql = \"INSERT INTO \".$insertObject::TABLENAME.\"($keystring)\".\" VALUES ($valuesString)\";\n $stmt = mysqli_prepare($dbh, $sql); //creates a statement, a container we can pass back and forth from database\n //$args = array(buildtypestring($dbh, $insertObject::TABLENAME));\n $values = $insertObject->getArray();\n array_unshift($values, buildtypestring($dbh, $insertObject::TABLENAME));\n call_user_func_array(array($stmt,\"bind_param\"), $values); //call bind param on stmt with args\n $result = $stmt->execute();\n if(!$result){\n logSQLError($stmt);\n mysqli_close($dbh);\n return false;\n }\n mysqli_close($dbh);\n return true;\n }", "function insertRow($table, $names, $values) {\n return mysql_query(sprintf('INSERT INTO %s (`%s`) VALUES (\"%s\")', $table, $names, $values));\n }", "public function addRow($row) {\n array_push($this->rows, $row);\n }", "public function addInsert() {\n if(count($this->cols) != 0) {\n // Only use the parameters that match with columns\n $params = array_slice($this->params, 0, count($this->cols));\n $this->sql .= \" (\" . implode(\", \", $this->cols) . \")\";\n $this->sql .= \" VALUES (\" . implode(\", \", $this->params) . \")\";\n }\n }", "public function insertRow() {\n global $schema;\n date_default_timezone_set(\"America/New_York\");\n $datetime = date('Y-m-d H:i:s');\n\n $statement = \"INSERT INTO $this->table (shortUrl,\";\n $marks = \"VALUES ('$this->shortUrl',\";\n $id = 0;\n foreach ($schema as $col) {\n $statement .= $col . \",\";\n $marks .=\"'\" . $this->response[$id++]['path'] . \"',\";\n }\n $statement .= 'entered) ';\n $marks .= '\"' . $datetime . '\")';\n $statement .= $marks;\n\n // Prepared statement for inserting row\n $stmt = $this->mysqli->prepare($statement);\n if (!$stmt->execute()) {\n $response = array('success' => FALSE, 'error' => 'Inserting failed!');\n header('Content-Type: application/json');\n echo json_encode($response);\n error_log($this->mysqli->error());\n }\n $stmt->close();\n }", "public function insert() {\n \n }", "public function insertRow($table_id, $data) {\n\t\t$values = (array)$data;\n\t\t$sql = $this->sqlInsert($table_id, array_keys($values), $values);\n\t\t$response = $this->_query($sql);\n\t\tif ($response) {\n\t\t\treturn (int)$response->get_value();\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function insert_one_row($table, $data)\n {\n $query = $this->db->insert($table, $data);\n return $this->db->insert_id();\n }", "function addRowToTable(&$table, $row) {\n\t\tglobal $TCA, $BACK_PATH;\n\t\t$uid = $row['uid'];\n\t\t$hidden = $row['hidden'];\n\n\t\tif ($row[$TCA[$this->tableName]['ctrl']['languageField']]==0) {\n\t\t\t$catnum = $this->categories[$row['category']] . sprintf ('%02d', $row['number']);\n\t\t} else {\n\t\t\t$catnum = '';\n\t\t}\n\t\t// Get language flag\n\t\tlist($imglang, $imgtrans) = $this->makeLocalizationPanel($this->tableName,$row);\n\n\t\t// If deleted show the delete icon instead of the delete link\n\t\tif ('DELETED!' == $row['t3ver_label']) {\n\t\t\t$deleteIcon = '<img'\n\t\t\t\t. t3lib_iconWorks::skinImg(\n\t\t\t\t\t$BACK_PATH,\n\t\t\t\t\t'gfx/i/shadow_delete.png',\n\t\t\t\t\t'width=\"16\" height=\"14\"'\n\t\t\t\t\t)\n\t\t\t\t. '>';\n\t\t} else {\n\t\t\t$deleteIcon = $this->getDeleteIcon($uid);\n\t\t}\n\t\t\n\t\t// Add the result row to the table array.\n\t\t$table[] = array(\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $catnum . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. t3lib_div::fixed_lgd_cs(\n\t\t\t\t\t$row['name'],\n\t\t\t\t\t50\n\t\t\t\t) . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $imglang . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $imgtrans . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $row['timeslots'] . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $this->getEditIcon($uid) . LF\n\t\t\t\t. TAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $deleteIcon . LF\n\t\t\t\t. TAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $this->getHideUnhideIcon($uid,$hidden) . LF,\n\t\t);\n\t}", "public function insert($tblUpdate);", "public function insertRow($query,$params=[]){\r\n\t\t\ttry {\r\n\t\t\t\t$dbquery=$this->db->prepare($query);\r\n\t\t\t\t$dbquery->execute($params);\r\n\t\t\t\treturn true;\r\n\t\t\t} catch (PDOException $e) {\r\n\t\t\tthrow new Exception($e->getMessage());\r\n\t\t\t}\r\n\t\t}", "public function insert($data)\n {\n $insertResult = $this->selection->insert($data);\n return $insertResult instanceof IRow ? $this->prepareRecord($insertResult) : $insertResult;\n }", "public static function insert_row($dataDir)\n {\n $workbook = new Workbook($dataDir . 'Book1.xls');\n\n # Accessing the first worksheet in the Excel file\n $worksheet = $workbook->getWorksheets()->get(0);\n\n # Inserting a row into the worksheet at 3rd position\n $worksheet->getCells()->insertRows(2,1);\n\n # Saving the modified Excel file in default (that is Excel 2003) format\n $workbook->save($dataDir . \"Insert Row.xls\");\n\n print \"Insert Row Successfully.\" . PHP_EOL;\n\n }", "public function addRow($tabela, $name, $type, $pkey, $notnull, $ai, $keys, $size, $default, $index, $unique);", "protected function insert ($table, $row = [], $val = []){\n \t$a = \"\" ; $b = \"\";\n \tif (sizeof($row)==sizeof($val)&&isset($table, $row, $val)) {\n\t\t\tfor ($i=0; $i < sizeof($row) ; $i++) { \n\t\t\t\tif ($i != 0) {\n\t\t\t\t\t$a .= \" ,$row[$i]\";\n\t\t\t\t\t$b .= \" ,?\";\n\t\t\t\t}else{\n\t\t\t\t\t$a .= $row[$i];\n\t\t\t\t\t$b .= \"?\";\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->runQuery(\"INSERT INTO $table ($a) VALUES ($b);\",$val);\n \t}else{\n \t\techo $this->errText;\n \t}\n\n }", "public function addRow($row){\n\t\t\t$fn = \"addRow\";\n\t\t\tif(is_array($row) && count($row) == count($this->db[\"COLUMNS_NAME\"]) && $this->status){\n\t\t\t\tif(self::checkType($row)){\n\t\t\t\t\t$this->db[\"ROWS\"][] = $row;\n\t\t\t\t} else {\n\t\t\t\t\tself::printErr($fn, \"Invalid type value.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tself::printErr($fn, \"Error adding row\");\n\t\t\t}\n\t\t}", "public function addRow($data){\n $data = (array)$data;\n $this->counter++;\n $newRow = [];\n $newRow = array_merge($newRow, $this->saveMetaData($data));\n $newRow = array_merge($newRow, $this->saveGeoData($data));\n $newRow = array_merge($newRow, $this->saveCoreData($data));\n $this->rowData[]=$newRow;\n }", "function addRow($row, $attributes = null)\n {\n $key = sizeof($this->_rows);\n $this->_rows[$key] = $row;\n\n //if updateValue has been called make sure to update the values of each added element\n foreach (array_keys($this->_rows[$key]) as $key2) {\n if (isset($this->_form)) {\n $this->_rows[$key][$key2]->onQuickFormEvent('updateValue', null, $this->_form);\n }\n if ($this->isFrozen()) {\n $this->_rows[$key][$key2]->freeze();\n }\n }\n \n if (isset($attributes)) $this->_rowAttributes[$key] = $attributes;\n }", "public static function insert(PdoMysqlSession $sqlSess, $table, array $row, $replace = false) {\r\n\t\tself::insertMany($sqlSess, $table, array($row), false, $replace);\r\n\t}", "public function post()\n {\n if ($this->request->is('post')) {\n\n $this->Row->create();\n $this->request->data['Row']['feed_id'] = (int)$this->request->data['Row']['feed_id'];\n\n $this->Row->save(\n array(\n 'Row' => $this->request->data['Row']\n )\n );\n\n $this->log(\n 'created row by datatables, ' . '(' . __CLASS__ . ':' . __FUNCTION__ . '=' . $this->Row->id . ')',\n LOG_DEBUG\n );\n\n }\n die($this->Row->id); //datatables wants this\n }", "public function insertRow($datos)\n {\n // section -64--88-0-100-1ad45ed3:133a1020fe1:-8000:0000000000001167 begin\n\n \t$sql = \"\n \t\tINSERT INTO `ventadetalle` (\n \t\t`folio` ,\n\t\t\t`cveprod` ,\n\t\t\t`descripcion` ,\n\t\t\t`precio` ,\n\t\t\t`cantidad` ,\n\t\t\t`importe`\n\t\t\t) VALUES (\n\t\t\t'\".$datos[\"folio\"].\"',\n\t\t\t'\".$datos[\"cveprod\"].\"', \n\t\t\t'\".$datos[\"descripcion\"].\"',\n\t\t\t'\".$datos[\"precio\"].\"',\t\t\t\n\t\t\t'\".$datos[\"cantidad\"].\"',\n\t\t\t'\".$datos[\"importe\"].\"'\n\t\t\t);\t\t\t\t\t\t\n \t\";\n\t\t\t$row0 = $this->ejecutarQuery($sql);\n // section -64--88-0-100-1ad45ed3:133a1020fe1:-8000:0000000000001167 end\n }", "public function addRow(array $row) {\n\t\t$this->tableInfo['rows'][] = $row;\t\n\t}", "public function insert($table, $data) \n {\n // Empty out the old junk\n $this->clear();\n \n // Define our table\n $this->table = $this->clean($table);\n \n // Make sure our data is in an array format\n if(!is_array($data))\n {\n show_error(2, 'non_array', array('data', 'Querybuilder::insert'));\n $data = array();\n }\n \n // Loop through, and seperate the array into 2 arrays\n foreach($data as $key => $value)\n {\n // Check to see if the key is numeric, if not, then escape it\n if(!is_numeric($key))\n {\n $this->columns[] = $this->clean($key);\n }\n \n // Also Check to see if the value is numeric, if not, add quotes around the value\n if(!is_numeric($value))\n {\n $this->values[] = \"'\". $this->clean($value) .\"'\";\n }\n else\n {\n $this->values[] = $this->clean($value);\n }\n }\n \n // If we entered columns, then we use them, otherwise we do a plain insert\n if(count($this->columns) > 0)\n {\n $this->sql = \"INSERT INTO \". $this->table .\" (\". implode(',', $this->columns) .\") VALUES (\". implode(',', $this->values) .\")\";\n }\n else\n {\n $this->sql = \"INSERT INTO \". $this->table .\" VALUES (\". implode(',', $this->values) .\")\";\n }\n\n return $this;\n }", "public function insert($row, $options=array()) {\n\t\t$options = array_merge(array('lastid'=>true), $options);\n\t\t$schema = $this->schema();\n\n\t\t$columns = $values = array();\n\t\tforeach($row as $column => $value) {\n\t\t\tif(array_key_exists($column, $schema)) {\n\t\t\t\t$columns[] = '`'.$column.'`';\n\t\t\t\t$values[] = \"'\".$this->escape($value).\"'\"; // todo: handle var types\n\t\t\t}\n\t\t}\n\n\t\t$stmt = $this->db->prepare($qs = 'INSERT INTO `'.$this->table.'`('.implode(', ', $columns).') VALUES ('.implode(',', $values).')');\n\n\t\tif($success = $stmt->execute()) {\n\t\t\t$this->loggit($qs);\n\t\t\tif($options['lastid']) {\n\t\t\t\t$success = $stmt->insert_id;\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new DisplayableException($this->db->error);\n\t\t}\n\n\t\t$stmt->free_result();\n\t\treturn $success;\n\t}", "public function insert_rows($row=1, $numrows=1) {\n $this->worksheet->insertNewRowBefore($row, $numrows);\n }", "public function insert(array $data);", "public function insert(array $data);", "public static function insert()\n {\n }", "public abstract function Insert();", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function addRow($row, $file)\n { }", "function insert($table, $columns);", "function addRow($tabName, $tabData) {\n\tglobal $mysqli;\n\t$keys = \"(\".implode(\", \",array_keys($tabData)).\")\";\n\t$values = \"'\".implode(\"','\",array_values($tabData)).\"'\";\n\t\n\t$sql = \"INSERT INTO $tabName $keys VALUES ($values)\";\n\tif (!$mysqli->query($sql)) {\n\t\tshowErrors();\n\t}\n return true;\n}", "public function insert()\n {\n \n }", "public function insert(string $table, array $data): int;", "public function insert_into_table(){\n // VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->activity', '$this->date_time')\";\n $query = \"INSERT INTO $this->table_name (item_id, user_id, project_id, user2_id, post_id, post_type, date_time) \n VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->date_time')\";\n $result = mysql_query($query);\n\n $err = mysql_error();\n if($err){\n $file = 'errors.txt';\n file_put_contents($file, $err, FILE_APPEND | LOCK_EX);\n }\n }", "public function save()\n {\n array_push($this->table, $this->value);\n }", "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "public function bulkinsert(Table $table, $rows);", "public function addRows()\n {\n }", "public function insert($table, array $fields);", "protected function _insert($table, $arr)\r\n {\r\n return pg_insert($this->_adapter, $table, $arr);\r\n }", "function insert($table,$data){\n\t\t$j=0;\n\t\t$c=count($data);\n\t\tforeach($data as $key=>$value){\n\t\t\t$j++;\n\t\t\tif($c==$j){\n\t\t\t\t$line_1.='`'.$key.'`';\n\t\t\t\t$line_2.=\"'\".rce_remove_quotes(mysql_real_escape_string($value)).\"'\";\n\t\t\t} else {\n\t\t\t\t$line_1.='`'.$key.'`, ';\n\t\t\t\t$line_2.=\"'\".rce_remove_quotes(mysql_real_escape_string($value)).\"', \";\n\t\t\t}\n\t\t}\n\t\t$r=mysql_query(\"\n\t\t\tINSERT INTO `$table`\n\t\t\t(\".$line_1.\") VALUES\n\t\t\t(\".$line_2.\")\n\t\t\");\n\t\treturn $r;\n\t}", "public function insertData($table, $data) {\n $this->db->insert($table, $data);\n }", "public function insert() {\n $this->observer->idchangemoney = $this->connection->insert(\"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), $this->user->iduser);\n }", "public function insert($table, $data)\n {\n\n ksort($data);\n\n $fieldNames = implode(',', array_keys($data));\n $fieldValues = ':'.implode(', :', array_keys($data));\n $query = \"INSERT INTO $table ($fieldNames) VALUES($fieldValues)\";\n\n $this->prepareQuery($query);\n\n foreach ($data as $key => $value) {\n $this->bind(\":$key\", $value);\n }\n $this->executeQuery($this->statement);\n }", "private function insertRows ()\n {\n \n // guest\n $data = array(\n 'acl_role_id' => 1,\n 'acl_role_name' => 'guest',\n 'acl_role_display' => 'Guest',\n 'acl_role_child' => 0\n );\n $this->insert($data);\n \n // member\n $data = array(\n 'acl_role_id' => 2,\n 'acl_role_name' => 'member',\n 'acl_role_display' => 'Member',\n 'acl_role_child' => 1\n );\n $this->insert($data);\n \n // admin\n $data = array(\n 'acl_role_id' => 3,\n 'acl_role_name' => 'admin',\n 'acl_role_display' => 'Admin',\n 'acl_role_child' => 2\n );\n $this->insert($data);\n }", "public function insert($data = []) {\n\t\t\t// Get the target table\n\t\t\t$table = $this->table;\n\n\t\t\t// Get columns names [col1, col2, col3] => \"col1, col2, col3\"\n\t\t\t$columns = implode(', ', array_keys($data));\n\t\t\t// Get columns values\n\t\t\t$params = array_values($data);\n\t\t\t// Create placeholder for values [val1, val2, val3] => \"?, ?, ?\"\n\t\t\t$values = substr(str_repeat('?, ', count($params)), 0, -2);\n\n\t\t\t// Execute the query and return affected rows number\n\t\t\treturn $this->query(\"INSERT INTO $table ($columns) VALUES ($values)\", $params);\n\t\t}", "function insert($table, $data, $format = null){\n\t\treturn $this->_insert_replace_helper($table, $data, $format, 'INSERT');\n\t}", "public function testSaveDataTableInsertNewRows() {\r\n\t\t// Prepare some database contents via SQL\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n\t\t$nonullvaluerecord = ['UUID' => 'uuid2nvr1', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3'];\r\n\t\t$nullvaluerecord = ['UUID' => 'uuid2nvr2', 'bool' => null, 'int' => null, 'string' => null];\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n\t\t// Prepare datatable\r\n\t\t$datatable = new avorium_core_data_DataTable(1, 4);\r\n\t\t$datatable->setHeader(0, 'UUID');\r\n\t\t$datatable->setHeader(1, 'BOOLEAN_VALUE');\r\n\t\t$datatable->setHeader(2, 'INT_VALUE');\r\n\t\t$datatable->setHeader(3, 'STRING_VALUE');\r\n\t\t// Store a new record without any null values\r\n\t\t$datatable->setCellValue(0, 0, $nonullvaluerecord['UUID']);\r\n\t\t$datatable->setCellValue(0, 1, $nonullvaluerecord['bool']);\r\n\t\t$datatable->setCellValue(0, 2, $nonullvaluerecord['int']);\r\n\t\t$datatable->setCellValue(0, 3, $nonullvaluerecord['string']);\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t\t// Check for the new record\r\n\t\t$resultwithoutnullvalues = $this->executeQuery('select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE from POTEST order by UUID');\r\n\t\t$this->assertEquals(4, count($resultwithoutnullvalues), 'Wrong row count');\r\n\t\t$this->assertEquals($nonullvaluerecord['UUID'], $resultwithoutnullvalues[3]['UUID'], 'UUID from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['bool']?1:0, $resultwithoutnullvalues[3]['BOOLEAN_VALUE'], 'Boolean value from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['int'], $resultwithoutnullvalues[3]['INT_VALUE'], 'Integer value from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['string'], $resultwithoutnullvalues[3]['STRING_VALUE'], 'String value from database is not as expected.');\r\n\t\t// Store a new record with null values\r\n\t\t$datatable->setCellValue(0, 0, $nullvaluerecord['UUID']);\r\n\t\t$datatable->setCellValue(0, 1, $nullvaluerecord['bool']);\r\n\t\t$datatable->setCellValue(0, 2, $nullvaluerecord['int']);\r\n\t\t$datatable->setCellValue(0, 3, $nullvaluerecord['string']);\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t\t// Check for the new record, must contain null values, because when inserting the parameter is irrelevant\r\n\t\t$resultwithnullvaluesignoring = $this->executeQuery('select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE from POTEST order by UUID');\r\n\t\t$this->assertEquals(5, count($resultwithnullvaluesignoring), 'Wrong row count');\r\n\t\t$this->assertEquals($nullvaluerecord['UUID'], $resultwithnullvaluesignoring[4]['UUID'], 'UUID from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['bool'], $resultwithnullvaluesignoring[4]['BOOLEAN_VALUE'], 'Boolean value from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['int'], $resultwithnullvaluesignoring[4]['INT_VALUE'], 'Integer value from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['string'], $resultwithnullvaluesignoring[4]['STRING_VALUE'], 'String value from database is not as expected.');\r\n\t}", "protected function _insert()\n\t{\n\t}", "public function insert(array $data)\n {\n return $this->_tableGateway->insert($data);\n }", "public function queryInsert($table, $data) : bool;", "public function insert($loyPrg);", "public function insert($table, $data) {\n\t\t$fields = $values = array();\n\n\t\tforeach ($data as $key => $val) {\n\t\t\t$fields[] = $this->escape_identifiers($key);\n\t\t\t$values[] = $this->escape($val);\n\t\t}\n\n\t\treturn $this->_insert($this->protect_identifiers($table, NULL, FALSE), $fields, $values);\n\t}", "function insert($data)\n {\n $this->db->insert($this->table, $data);\n }", "public function insert($index, $value);", "public function insertRecords($table, $data) \n {\n \t// setup some variables for fields and values\n \t$fields = \"\";\n $values = \"\";\n\t\t\n // sets attributes and values\n foreach ($data as $f => $v) {\t\t\t\n $fields .= \"`$f`,\";\n $values .= ( is_numeric( $v ) && ( intval( $v ) == $v ) ) ? $v.\",\" : \"'$v',\";\t\t\n }\n\t\t\n // remove last ',' \n \t$setfields = substr($fields, 0, -1);\n \t$setvalues = substr($values, 0, -1);\n \t\n $insert = \"INSERT INTO $table ({$setfields}) VALUES({$setvalues})\";\n $this->executeQuery( $insert );\n return true;\n }", "public function insertRow($table, $data){\n\t\t//Insert into Income Table first \n\t\t//log_message('debug',print_r($data['member_name'],TRUE));\n\t\t\n\t\t\n\t\t//Prepare Array for Income Table Insert \n\t\t$data_income['user_id'] = $data['user_id'];\n $data_income['date'] = $data['payment_date'];\n $member_name = $this->get_member_name(isset($data['member_name'])?$data['member_name']:'');\n $data_income['description'] = $member_name;\n $data_income['amount'] = $data['amount'];\n $data_income['category'] = $data['category_id'];\n \t \t$this->db->insert('income', $data_income);\n\t \t$income_id = $this->db->insert_id();\n\n //Prepare Array for Income Table Insert \n\t \t$data_membership['payment_date'] = $data['payment_date'];\n\t\t$data_membership['income_id'] = $income_id;\n $data_membership['user_id'] = $data['user_id'];\n $data_membership['date'] = $data['date'];\n $data_membership['member_name'] = $data['member_name'];\n $data_membership['amount'] = $data['amount'];\n $data_membership['category_id'] = $data['category_id'];\n \t \t$this->db->insert($table, $data_membership);\n\t \treturn $data_membership_id = $this->db->insert_id();\n\n\t}", "public function insert()\n {\n $this->id = insert($this);\n }" ]
[ "0.8524152", "0.8122841", "0.7525435", "0.7365124", "0.73412824", "0.73238397", "0.7174292", "0.69942963", "0.69341296", "0.6775082", "0.6701545", "0.6697676", "0.66236615", "0.6622789", "0.6612113", "0.6603765", "0.6586274", "0.65716964", "0.6530304", "0.6514776", "0.6431834", "0.6427498", "0.64263535", "0.6418395", "0.6417253", "0.6386519", "0.6375665", "0.63638693", "0.63568133", "0.63453597", "0.6334258", "0.63046247", "0.630248", "0.629862", "0.6287352", "0.62798864", "0.62763566", "0.6266874", "0.6259105", "0.6257479", "0.62359107", "0.6223385", "0.6222569", "0.62173027", "0.62115073", "0.62102586", "0.6192439", "0.61901057", "0.61404806", "0.61349475", "0.61108667", "0.60997325", "0.60978234", "0.60960627", "0.60948634", "0.6060486", "0.60565203", "0.6054212", "0.60536563", "0.60395133", "0.6037477", "0.60098904", "0.6001317", "0.60008013", "0.598749", "0.5982137", "0.5982137", "0.59809583", "0.59712505", "0.5962559", "0.5962559", "0.59623075", "0.5960377", "0.5956645", "0.59439373", "0.5935876", "0.5933956", "0.5931514", "0.5930748", "0.59274566", "0.5922658", "0.59192586", "0.59173965", "0.5913444", "0.59007585", "0.58989066", "0.5897031", "0.58957267", "0.58933944", "0.5892752", "0.58814526", "0.5881212", "0.5880484", "0.5878299", "0.58761704", "0.5872873", "0.5870546", "0.58684355", "0.586161", "0.58603984", "0.585578" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'id' => 'required', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Work out a price for a 12month period.
public function getAnnualPrice(): float { $ratio = $this->getMonths() / 12; return $this->getPrice() / $ratio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMonthlyFee();", "public function getPricePerMonth($price) {\n $xml = $this->getXml($price);\n if ($xml != null && $xml->calcSuccess == 'true') {\n $ranges = $xml->ranges->range;\n\n foreach ($ranges as $range) {\n if ($range->start == '1') {\n return round((float) $range->installment, 2);\n }\n }\n } else {\n return null;\n }\n }", "public function testTotalMonthlyPrice()\n {\n }", "public function showPricePerMonth() {\n $prijsPerMaand = Mage::getStoreConfig('santander/general/prijs_maand');\n if($prijsPerMaand) {\n return true;\n } else {\n return false;\n }\n }", "public function getPricePerMonth($_product) {\n $price = $_product->getResource()->getAttribute('santanderpricemonth')->getFrontend()->getValue($_product);\n return Mage::helper('core')->currency(round($price, 2));\n }", "public function getMonthlyFee(): float { return 2.0; }", "public function getProfitMonth(){\n\t\tglobal $db;\n\t\t$date_now = date('Y-m').'-01';\n\t\t$last_month = date('Y-m', strtotime('-1 month')).'-01';\n\n\t\t$sql = $db->prepare(\"SELECT SUM(price) FROM project01_report WHERE date_init BETWEEN '$last_month' AND '$date_now' \");\n\t\t$sql->execute();\n\t\tif ($sql->rowCount()>0) {\n\t\t\t$profit = $sql->fetch();\n\t\t\treturn $profit;\n\t\t}\n\t}", "public function takePostBaseOnMonth();", "public function get_month_permastruct()\n {\n }", "public function computePriceProvider(){\n\n /*Price once a child is < 4 years full day 0€*/\n yield [Booking::TYPE_DAY, '2019-01-01' , false, 0];\n /*Price once a child is < 4 years full day \"reduce\" 0€*/\n yield [Booking::TYPE_DAY, '2019-01-01', true, 0];\n /*Price once a child is < 4 years half day 0€*/\n yield [Booking::TYPE_HALF_DAY, '2019-01-01', false, 0];\n /*Price once a child is < 4 years half day \"reduce\" 0€*/\n yield [Booking::TYPE_HALF_DAY, '2019-01-01', true, 0];\n\n\n /*Price once a child is 4 - 12 years full day 8€*/\n yield [Booking::TYPE_DAY, '2014-01-01', false, 8];\n /*Price once a child is 4 - 12 years full day \"reduce\" 8€*/\n yield [Booking::TYPE_DAY, '2014-01-01', true, 8];\n /*Price once a child is 4 - 12 years half day 4€*/\n yield [Booking::TYPE_HALF_DAY, '2014-01-01', false, 4];\n /*Price once a child is 4 - 12 years half day \"reduce\" 4€*/\n yield [Booking::TYPE_HALF_DAY, '2014-01-01', true, 4];\n\n\n /*Price normal full day 16€*/\n yield [Booking::TYPE_DAY, '1980-01-01', false, 16];\n /*Price normal full day \"reduce\" 10€*/\n yield [Booking::TYPE_DAY, '1980-01-01', true, 10];\n /*Price normal half day 8€*/\n yield [Booking::TYPE_HALF_DAY, '1980-01-01', false, 8];\n /*Price normal half day \"reduce\" 5€*/\n yield [Booking::TYPE_HALF_DAY, '1980-01-01', true, 5];\n\n\n /*Price senior >60 years full day 12€*/\n yield [Booking::TYPE_DAY, '1955-01-01', false, 12];\n /*Price senior >60 years full day \"reduce\" 10€*/\n yield [Booking::TYPE_DAY, '1955-01-01', true, 10];\n /*Price senior >60 years half day 6€*/\n yield [Booking::TYPE_HALF_DAY, '1955-01-01', false, 6];\n /*Price senior >60 years half day \"reduce\" 5€*/\n yield [Booking::TYPE_HALF_DAY, '1955-01-01', true, 5];\n\n }", "function total_monthly_cost($sum, $months, $monthfee, $rate, $startfee, $cur)\n{\n\t$sum_j_to_N = 0;\n\t// reference: Avbetalningsplaner.pdf\n\t$K0 = $sum;\n\t$A = $monthfee;\n\t$S = $startfee;\n\t$R = (pow(1.0+$rate/10000, 1.0/12.0));\n\t$N = $months;\n\tif ($rate == 0)\n\t$T = (1 / $N)*($K0 + ($N * $A) + $S);\n\telse\n\t{\n\t\t// the total cost of fees plus the cost of paying off the monthly fee first and after that amortize\n\t\tfor ($j = 2; $j < $N+1; $j++)\n\t\t{\n\t\t\t$sum_j_to_N = $sum_j_to_N + pow($R, $N - $j) * $A;\n\t\t}\n\t\t$T = (($R - 1) / (pow($R, $N) - 1)) * (pow($R, $N) * $K0 + $sum_j_to_N + pow($R, $N - 1) * ($A + $S));\n\t}\n\n\treturn round($T, 0);\n}", "function monthlyBalancedData(){\n\t\t//results to be returned\n\t\t$results= [];\n\t\t//the total expense of all the month of all users\n\t\t$results['total'] = $this->getMonthTotal();\n\t\t//the fair amount to be paid by each member\n\t\t// total/number of members on household\n\t\t$results['fairAmount'] = $results['total']/$this->getNumberOfMembers();\n\t\tforeach ($this->members as $member) {\n\t\t\t//retrieves the individual expenses\n\t\t\t$name = $member->getUserFirstName();\n\t\t\t$results['members'][$name] = $member->billsDistribution();\n\t\t}\n\t\treturn $results;\n\t}", "public function calculate_package_period($period)\n {\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +1 day\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +1 week\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +2 week\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +1 month\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +30 days\");\n $today=Date('Y-m-d');\n if($period==1){\n $date = strtotime(date(\"Y-m-d\", strtotime($today)) . \" +3 month\");\n $membership_end = date(\"Y-m-d\", $date);\n }else if($period==0){\n $membership_end='';\n }\n return array('membership_end'=>$membership_end);\n }", "function it_calculates_ec_calculator_example_33_part_2()\n {\n $this->beConstructedWith(30000);\n $this->addPayment(600, 0);\n\n $owed = 30000;\n $principal = $owed / 12;\n\n for ($month = 1; $month <= 12; $month++) {\n $interest = $owed * (pow(1.0839, 1 / 12) - 1);\n $this->addPayment(\n round($principal + $interest, 2),\n Calculator::FREQUENCY_MONTHLY * $month\n );\n $owed -= $principal;\n }\n\n $this->calculate()->shouldReturn(12.6);\n }", "function totalDollarToCashMonth($date){\n \n \n$query_change_mony = \"SELECT doller_in, doller_out,date FROM `history` WHERE `date` like '%$date%' \"; \n \n if(@$query_run = mysql_query($query_change_mony)){\n \n $doll_out_total_cash = 0;\n $doll_in_total_cash = 0; \n while($sql_row = mysql_fetch_assoc($query_run)){\n $m_doller_in = $sql_row['doller_in'];\n $m_doller_out = $sql_row['doller_out']; \n $m_dayDate = explode(\"@\",$sql_row['date']); \n \n $currentRate = mysql_result(mysql_query(\"SELECT dollarRate FROM `oppen_day` WHERE `date` = '\".trim($m_dayDate['0']).\"' \"),0); \n // change all \n $doll_in_total_cash += $m_doller_in * $currentRate;\n $doll_out_total_cash += $m_doller_out * $currentRate;\n \n }\n\n }\n return array('dollarInToCash'=>$doll_in_total_cash,'dollarOutToCash'=>$doll_out_total_cash);\n}", "public function getMonthlyInstalment();", "public function getCurrentMonthTotalRevenue() : float;", "public function hasPrice()\n {\n return $this->amount_month || $this->amount_year;\n }", "public function checkSecondDate($blockedTimeSp, $hourlyBasedSpecialPrice, $month, $pIn, $totalHours, $price) {\n $available = array ();\n /**\n * Check the Value of $blockedTimeSp\n */\n if (! empty ( $blockedTimeSp )) {\n $available [$month] [$pIn] = $hourlyBasedSpecialPrice;\n } else {\n $available [$month] [$pIn] = $totalHours * $price;\n }\n return $available;\n }", "public function monthly()\n {\n return $this->cron('0 0 1 * * *');\n }", "public function BuildMonthlySpoil()\n {\n }", "static public function mdlVtaUlt12Meses($tabla, $item, $valor){\t\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT id, DATE_FORMAT(fecha_salida,'%m') AS fechaventa, round(sum(cantidad*precio_venta),2) as totalvta FROM $tabla WHERE $item=$valor GROUP BY MONTH(fecha_salida) ORDER BY fecha_salida ASC LIMIT 0,12\");\n \n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetchAll();\n\n\t\t$stmt = null;\n\n}", "protected function getMonthBalanceData($month, $year, $employee) {\n $rows = array();\n\n //number of day in the month selected according to the year\n $nbreOfDay = date(\"t\",mktime(0,0,0,$month,1,$year));\n\n $todoMonth = 0;\n $doneMonth = 0;\n $overTimeMonth = 0;\n $timeCode = array();\n\n /*\n * Representaiton of the array to be displayed\n * line['date'] => date of the current day\n * line['sign'] => liste of the booking for the current day\n */\n\n for($day=1; $day<=$nbreOfDay;$day++)\n {\n // create a line\n $line = array();\n\n //------------------------------- DATE ---------------------------------------------------------------------------------------------------\n // create the date\n $date = $year.\"-\".$month.\"-\".$day;\n $line['date'] = $date;\n\n //------------------------------- BOOKINGS -----------------------------------------------------------------------------------------------\n $bookingsDay = $employee->getBookingsDay($day, $month, $year);\n\n // when 4 bookings are displayed, add a new line\n $index_br = 1;\n\n foreach($bookingsDay as $b) {\n\n // add an * if the booking was modified by hand\n if($b['internet'] == 1) $line['sign'].= \"*\";\n\n $inout = $employee->isBookingIn($b) ? Prado::localize(\"in\") : Prado::localize(\"out\");\n\n $line['sign'] .= substr($b['roundBooking'],0,5).\"/\".$inout.\"&nbsp;&nbsp;&nbsp;\";\n\n if($index_br % 4 == 0) $line['sign'] .= \"<br/>\";\n\n $index_br++;\n }\n\n if(substr($line['sign'],-5,5) == \"<br/>\")\n $line['sign'] = substr($line['sign'], 0, strlen($line['sign'])-5);\n\n //------------------------------- TIME TO DO -----------------------------------------------------------------------------------------\n\n $todo = $employee->getDayTodo($day, $month, $year);\n if($todo == 0)\n $line['todo'] = '';\n else {\n $line['todo'] = sprintf(\"%.02f\",$todo);\n $todoMonth = bcadd($todoMonth, $todo,4);\n }\n\n //------------------------------- TIME DONE -----------------------------------------------------------------------------------------\n\n $done = $employee->getDayDone($day, $month, $year);\n if($done['done'] == 0)\n $line['done'] = '';\n else {\n $line['done'] = sprintf(\"%.02f\",$done['done']);\n $doneMonth = bcadd($doneMonth, $done['done'],4);\n }\n\n if($done['compensation'] > 0) {\n $tc['timecodeName'] = $done['timecodeName'];\n $tc['compensation'] = bcadd($timeCode[$done['timecodeId']]['compensation'], $done['compensation'],4);\n $timeCode[$done['timecodeId']] = $tc;\n\n }\n\n //------------------------------- OVERTIME -----------------------------------------------------------------------------------------\n\n $overtime = bcsub($done['done'],$todo,4);\n if($overtime == 0)\n $line['overtime'] = '';\n else {\n $line['overtime'] = sprintf(\"%.02f\",$overtime);\n $overTimeMonth = bcadd($overTimeMonth, $overtime,4);\n }\n\n //------------------------------- REMARKS -----------------------------------------------------------------------------------------\n\n $isNWD = false;\n //inform when it is a non working day\n if($employee->isNonWorkingDay($day, $month, $year) && $employee->isWorking($year, $month, $day)) {\n if($line['remark'] != '') $line['remark'].=\"<br>\";\n\n $line['remark'] .= Prado::localize('Non working day');\n $isNWD = true;\n }\n\n $bookingIn = 0;\n $bookingOut = 0;\n //inform when the booking is a special time code\n foreach($bookingsDay as $b) {\n\n if($employee->isBookingIn($b))\n $bookingIn++;\n else\n $bookingOut++;\n\n if($employee->isSpecialTimeCode($b))\n {\n if($line['remark'] != '') $line['remark'].=\"<br>\";\n if($employee->isBookingIn($b))\n {\n $line['remark'].= '&larr; ';\n $line['remark'].= substr($b['roundBooking'],0,5).\" \".$employee->getBookingTimeCode($b);\n }\n else\n {\n $line['remark'].= '&rarr; ';\n $line['remark'].= substr($b['roundBooking'],0,5).\" \".$employee->getBookingTimeCode($b);\n\n }\n }\n\n }\n\n $isMiddleNwd = false;\n //check if the day is a absent request\n $requests = $employee->getDayRequest($day, $month, $year);\n\n if($requests && !$isNWD && $employee->isWorking($year, $month, $day)) {\n foreach($requests as $request) {\n if($request['period'] === 'allday')\n {\n if($line['remark'] != '') $line['remark'].=\"<br>\";\n $line['remark'] .= $request['name'];\n }\n elseif($request['period'] === 'morning')\n {\n if($line['remark'] != '') $line['remark'].=\"<br>\";\n $line['remark'] .= $request['name'].' / '.Prado::localize('morning');\n }\n elseif($request['period'] === 'afternoon')\n {\n if($line['remark'] != '') $line['remark'].=\"<br>\";\n $line['remark'] .= $request['name'].' / '.Prado::localize('afternoon');\n }\n }\n }\n\n // check the missing bookings\n if(count($bookingsDay) % 2 > 0)\n {\n if($line['remark'] != '') $line['remark'].=\"<br>\";\n $line['remark'] .= \"<span style=\\\"color:red\\\">\".Prado::localize('Signing missing').\"</span>\";\n }\n else {\n // check the error booking\n if($bookingIn != $bookingOut)\n {\n if($line['remark'] != '') $line['remark'].=\"<br>\";\n $line['remark'] .= \"<span style=\\\"color:red\\\">\".Prado::localize('Signing error').\"</span>\";\n } else {\n\n $nextB = 'IN';\n foreach($bookingsDay as $b) {\n $type = $employee->isBookingIn($b) ? 'IN' : 'OUT';\n\n if($type != $nextB) {\n if($line['remark'] != '') $line['remark'].=\"<br>\";\n $line['remark'] .= \"<span style=\\\"color:red\\\">\".Prado::localize('Signing error').\"</span>\";\n break;\n }\n\n $nextB = $nextB == 'IN' ? 'OUT' : 'IN';\n }\n\n }\n }\n\n if($minBreak = $employee->isBreakOk($bookingsDay))\n {\n if($line['remark'] != '') $line['remark'].=\"<br>\";\n $line['remark'] .= \"<span style=\\\"color:red\\\">\".$minBreak.\" \".Prado::localize('min. for the break are required').\"</span>\";\n }\n\n\n // add a line in the rows\n $rows[] = $line;\n\n }\n\n //------------------------------- RESUME TIME -----------------------------------------------------------------------------------------\n\n if($todoMonth>0)\n $this->hoursDue = sprintf(\"+%.02f\",$todoMonth);\n elseif($todoMonth<0 || $todoMonth==0)\n $this->hoursDue = sprintf(\"%.02f\",$todoMonth);\n\n if($doneMonth>0)\n $this->signed = sprintf(\"+%.02f\",$doneMonth);\n elseif($doneMonth<0 || $doneMonth==0)\n $this->signed = sprintf(\"%.02f\",$doneMonth);\n\n $this->overTimeMonth = $overTimeMonth;\n\n\n if($overTimeMonth>0)\n $this->balanceForTheMonth = sprintf(\"+%.02f\",$overTimeMonth);\n elseif($overTimeMonth<0 || $overTimeMonth==0)\n $this->balanceForTheMonth = sprintf(\"%.02f\",$overTimeMonth);\n\n $overTimeLastMonth = $employee->getOvertimeLastMonth($month, $year);\n $this->overTimeLastMonth = $overTimeLastMonth;\n if($overTimeLastMonth>0)\n $this->lastMonth = sprintf(\"+%.02f\",$overTimeLastMonth);\n elseif($overTimeLastMonth<0 || $overTimeLastMonth==0)\n $this->lastMonth = sprintf(\"%.02f\",$overTimeLastMonth);\n\n $solde = bcadd($overTimeLastMonth,$overTimeMonth,4);\n\n $overtTimeActivityCounter = $employee->getActivityCounter($year, $month, $employee->getDefaultOvertimeCounter() );\n\n if($overtTimeActivityCounter != 0) {\n $solde = bcadd($solde, $overtTimeActivityCounter, 4);\n }\n\n if($solde>0) {\n if($overtTimeActivityCounter != 0)\n $this->balances = sprintf(\"* +%.02f\",$solde);\n else\n $this->balances = sprintf(\"+%.02f\",$solde);\n }\n elseif($solde<0 || $solde==0) {\n if($overtTimeActivityCounter != 0)\n $this->balances = sprintf(\"* %.02f\",$solde);\n else\n $this->balances = sprintf(\"%.02f\",$solde);\n }\n\n\n //------------------------------- RESUME HOLIDAYS -----------------------------------------------------------------------------------------\n\n //Balance of holiday fot the last year\n $balanceHolidaysLastYear = $employee->geHolidaystMonth($year-1,12);\n $this->balanceHolidaysLastYear = sprintf(\"%.02f\",$balanceHolidaysLastYear);\n\n\n // compute in this way when the 12 month of the last year is not closed\n\n if(!$employee->isLastMonthLastYeatClosed($year)) {\n $wt = $employee->getWorkingTime(1, $month, $year);\n\n // get the holiday for this month\n $defaultHolidayTimeCode = $employee->getDefaultHolidaysCounter();\n \n for($i=1; $i<$month ;$i++) {\n $holidays = $employee->getRequest($year,$i,$defaultHolidayTimeCode); \n $wt['holidaysByYear'] = bcsub($wt['holidaysByYear'], $holidays['nbre'],4);\n }\n\n $this->holidayForTheYear = sprintf(\"%.02f\",$wt['holidaysByYear']);\n\n\n $holidaysLastMonth = bcadd($wt['holidaysByYear'],$balanceHolidaysLastYear,4);\n if($holidaysLastMonth>0)\n $this->holidaysLastMonth = sprintf(\"+%.02f\",$holidaysLastMonth);\n elseif($holidaysLastMonth<0 || $holidaysLastMonth==0)\n $this->holidaysLastMonth = sprintf(\"%.02f\",$holidaysLastMonth);\n\n\n $holidays = $employee->getRequest($year,$month,$defaultHolidayTimeCode);\n if($holidays['nbre']>0)\n $this->holidaysThisMonth = sprintf(\"-%.02f\",$holidays['nbre']);\n elseif($holidays['nbre']==0)\n $this->holidaysThisMonth = sprintf(\"%.02f\",$holidays['nbre']);\n\n\n $holidayActivityCounter = $employee->getActivityCounter($year, $month, $employee->getDefaultHolidaysCounter() );\n $holidaysTotal = bcsub($holidaysLastMonth,$holidays['nbre'],4);\n\n if($holidaysTotal>0) {\n if($holidayActivityCounter)\n $this->holidaysTotal = sprintf(\"* +%.02f\",$holidaysTotal);\n else\n $this->holidaysTotal = sprintf(\"+%.02f\",$holidaysTotal);\n }\n elseif($holidaysTotal<0 || $holidaysTotal==0) {\n if($holidayActivityCounter)\n $this->holidaysTotal = sprintf(\"* %.02f\",$holidaysTotal);\n else\n $this->holidaysTotal = sprintf(\"%.02f\",$holidaysTotal);\n }\n\n } else {\n\n $holidaysTotal = $employee->geHolidaystMonth($year,$month);\n\n $holidayActivityCounter = $employee->getActivityCounter($year, $month, $employee->getDefaultHolidaysCounter() );\n\n\n if($holidaysTotal>0) {\n if($holidayActivityCounter)\n $this->holidaysTotal = sprintf(\"* +%.02f\",$holidaysTotal);\n else\n $this->holidaysTotal = sprintf(\"+%.02f\",$holidaysTotal);\n }\n elseif($holidaysTotal<0 || $holidaysTotal==0) {\n if($holidayActivityCounter)\n $this->holidaysTotal = sprintf(\"* %.02f\",$holidaysTotal);\n else\n $this->holidaysTotal = sprintf(\"%.02f\",$holidaysTotal);\n }\n\n // get the holiday for this month\n $defaultHolidayTimeCode = $employee->getDefaultHolidaysCounter();\n $holidays = $employee->getRequest($year,$month,$defaultHolidayTimeCode);\n\n if($holidays['nbre']>0)\n $this->holidaysThisMonth = sprintf(\"-%.02f\",$holidays['nbre']);\n elseif($holidays['nbre']==0)\n $this->holidaysThisMonth = sprintf(\"%.02f\",$holidays['nbre']);\n\n $holidaysLastMonth = $holidaysTotal + $holidays['nbre'];\n\n // display the value\n if($holidaysLastMonth>0)\n $this->holidaysLastMonth = sprintf(\"+%.02f\",$holidaysLastMonth);\n elseif($holidaysLastMonth<0 || $holidaysLastMonth==0)\n $this->holidaysLastMonth = sprintf(\"%.02f\",$holidaysLastMonth);\n\n\n $this->holidayForTheYear = sprintf(\"%.02f\",$this->holidaysLastMonth - $balanceHolidaysLastYear);\n }\n\n\n /*//Balance of holiday fot the last year\n $balanceHolidaysLastYear = $employee->geHolidaystMonth($year-1,12);\n $this->balanceHolidaysLastYear = sprintf(\"%.02f\",$balanceHolidaysLastYear);\n\n\n $holidaysTotal = $employee->geHolidaystMonth($year,$month);\n\n $holidayActivityCounter = $employee->getActivityCounter($year, $month, $employee->getDefaultHolidaysCounter() );\n\n\n if($holidaysTotal>0) {\n if($holidayActivityCounter)\n $this->holidaysTotal = sprintf(\"* +%.02f\",$holidaysTotal);\n else\n $this->holidaysTotal = sprintf(\"+%.02f\",$holidaysTotal);\n }\n elseif($holidaysTotal<0 || $holidaysTotal==0) {\n if($holidayActivityCounter)\n $this->holidaysTotal = sprintf(\"* %.02f\",$holidaysTotal);\n else\n $this->holidaysTotal = sprintf(\"%.02f\",$holidaysTotal);\n }\n\n // get the holiday for this month\n $defaultHolidayTimeCode = $employee->getDefaultHolidaysCounter();\n $holidays = $employee->getRequest($year,$month,$defaultHolidayTimeCode);\n\n if($holidays['nbre']>0)\n $this->holidaysThisMonth = sprintf(\"-%.02f\",$holidays['nbre']);\n elseif($holidays['nbre']==0)\n $this->holidaysThisMonth = sprintf(\"%.02f\",$holidays['nbre']);\n\n\n $holidaysLastMonth = $holidaysTotal + $holidays['nbre'];\n\n // display the value\n if($holidaysLastMonth>0)\n $this->holidaysLastMonth = sprintf(\"+%.02f\",$holidaysLastMonth);\n elseif($holidaysLastMonth<0 || $holidaysLastMonth==0)\n $this->holidaysLastMonth = sprintf(\"%.02f\",$holidaysLastMonth);\n\n\n $this->holidayForTheYear = sprintf(\"%.02f\",$this->holidaysLastMonth - $balanceHolidaysLastYear);*/\n\n\n\n\n\n\n //------------------------------- RESUME NON WORKING DAY -------------------------------------------------------------------------\n\n\n $nonWorkingDay = $employee->getAllNonWorkingDay($year, $month);\n if($nonWorkingDay>0)\n $this->nonworkingday = sprintf(\"%.02f\",$nonWorkingDay);\n elseif($nonWorkingDay==0)\n $this->nonworkingday = sprintf(\"%.02f\",$nonWorkingDay);\n\n\n // number of n.w.d. until the end of the year\n $this->nonworkingdayendofyear = sprintf(\"%.02f\",$employee->getNonWorkingDayEndOfYear($month,$year));\n\n\n //------------------------------- RESUME OTHER REQUEST -------------------------------------------------------------------------\n\n $absences = $employee->getMonthAbsence($month, $year);\n\n foreach($timeCode as $k=>$v) {\n for($i=0; $i< count($absences); $i++) {\n if($absences[$i]['name'] == $v['timecodeName'] ) {\n if($absences[$i]['disp'] == 'day') {\n //convert in day\n $v['compensation'] = bcdiv($v['compensation'],$employee->getHoursByDay($month, $year),4);\n $absences[$i]['nbre'] = bcadd($absences[$i]['nbre'],$v['compensation'],4);\n } else {\n $absences[$i]['nbre'] = bcadd($absences[$i]['nbre'],$v['compensation'],4);\n }\n }\n }\n }\n\n $tc = array();\n foreach($absences as $v)\n {\n $disp = $v['disp'] == 'day' ? Prado::localize('days') : Prado::localize('hours');\n if($v['nbre']>0) {\n $tc[] = array('name'=>$v['name'], 'value'=>sprintf(\"%.02f $disp\",$v['nbre']) );\n }\n }\n\n\n $ac = $employee->getAllActivityCounter($year,$month);\n\n foreach($ac as $v) {\n $disp = $v['formatDisplay'] == 'day' ? Prado::localize('days') : Prado::localize('hours');\n $remark = $v['remark'];\n $tc[] = array('name'=>$v['name'], 'value'=>sprintf(\"%.02f $disp / $remark\",$v['nbre']) );\n }\n\n $this->TimeCode=$tc;\n\n return $rows;\n }", "function sales_report_month($month){\n \t\t$this->db->select('products.PRODUCT, SUM(sales.QUANTITY_SOLD) SALES, products.COST_PRICE, products.SALES_PRICE');\n \t\t$this->db->from('sales');\n \t\t$this->db->join('products', 'products.PRODUCT_ID=sales.PRODUCT_ID', 'left');\n \t\t$this->db->where('MONTH(sales.SALES_DATE)', $month['MONTH']);\n \t\t$this->db->where('YEAR(sales.SALES_DATE)', $month['YEAR']);\n \t\t$this->db->where('sales.STATUS', 'Confirmed');\n \t\t$this->db->group_by('sales.PRODUCT_ID');\n \t\t$query=$this->db->get();\n \t\tif($query->num_rows()>0){\n \t\t\treturn $query->result();\n \t\t}\n \t\telse{\n \t\t\treturn false;\n \t\t}\n \t}", "public function perMonth (){\n $data = Auction::totalPreMonth();\n return view(\"welcome\")->with('totalPerMonth',$data); \n }", "function carton_scheduled_sales() {\n\tglobal $carton, $wpdb;\n\n\t// Sales which are due to start\n\t$q2 = \"\n\t\tSELECT\n\t\t pr.post_id,\n\t\t pr.meta_value AS price,\n\t\t sp.meta_value AS sale_price,\n\t\t (df.meta_value > 0 OR dt.meta_value > 0)::int AS dates,\n\t\t rp.meta_value AS regular_price,\n\t\t CASE\n\t\t\tWHEN (tf.meta_value != '' AND tf.meta_value IS NOT NULL AND tt.meta_value != '' AND tt.meta_value IS NOT NULL AND NOT fn.time_between(tf.meta_value, tt.meta_value)) THEN rp.meta_value\n\t\t\tWHEN fn.time_between(tf.meta_value, tt.meta_value) THEN sp.meta_value\n\t\t\tWHEN df.meta_value::bigint <= ti.stamp AND ti.stamp <= dt.meta_value::bigint THEN sp.meta_value\n\t\t\tWHEN df.meta_value::bigint <= ti.stamp AND (dt.meta_value = '' OR dt.meta_value IS NULL) THEN sp.meta_value\n\t\t\tWHEN (df.meta_value = '' OR df.meta_value IS NULL) AND ti.stamp <= dt.meta_value::bigint THEN sp.meta_value\n\t\t\tWHEN df.meta_value::bigint >= ti.stamp AND (dt.meta_value = '' OR dt.meta_value IS NULL) THEN rp.meta_value\n\t\t\tWHEN (df.meta_value = '' OR df.meta_value IS NULL) AND ti.stamp >= dt.meta_value::bigint THEN rp.meta_value\n\t\t\tWHEN (df.meta_value = '' OR df.meta_value IS NULL) AND (dt.meta_value = '' OR dt.meta_value IS NULL) THEN sp.meta_value\n\t\t END AS required_price\n\t\tFROM\n\t\t wp_postmeta AS pr, wp_postmeta AS sp, wp_postmeta AS rp,\n\t\t wp_postmeta AS df, wp_postmeta AS dt,\n\t\t wp_postmeta AS tf, wp_postmeta AS tt,\n\t\t (SELECT EXTRACT(EPOCH FROM now())::bigint AS stamp) AS ti\n\t\tWHERE\n\t\t\t pr.meta_key = '_price'\n\t\t AND sp.post_id = pr.post_id AND sp.meta_key = '_sale_price'\n\t\t AND rp.post_id = pr.post_id AND rp.meta_key = '_regular_price'\n\t\t AND df.post_id = pr.post_id AND df.meta_key = '_sale_price_dates_from'\n\t\t AND dt.post_id = pr.post_id AND dt.meta_key = '_sale_price_dates_to'\n\t\t AND tf.post_id = pr.post_id AND tf.meta_key = '_sale_price_time_from'\n\t\t AND tt.post_id = pr.post_id AND tt.meta_key = '_sale_price_time_to'\n\t\t AND sp.meta_value::numeric > 0\n\t\";\n\n\t$q = $wpdb->prepare( \"\n\t\tSELECT postmeta.post_id FROM {$wpdb->postmeta} as postmeta\n\t\tLEFT JOIN {$wpdb->postmeta} as postmeta_2 ON postmeta.post_id = postmeta_2.post_id\n\t\tLEFT JOIN {$wpdb->postmeta} as postmeta_3 ON postmeta.post_id = postmeta_3.post_id\n\t\tWHERE postmeta.meta_key = '_sale_price_dates_from'\n\t\tAND postmeta_2.meta_key = '_price'\n\t\tAND postmeta_3.meta_key = '_sale_price'\n\t\tAND postmeta.meta_value > 0\n\t\tAND postmeta.meta_value < %s\n\t\tAND postmeta_2.meta_value != postmeta_3.meta_value\n\t\", current_time( 'timestamp' ) );\n\n\t$products = $wpdb->get_results( $q2 );\n\tif ( $products ) {\n\t\tforeach ( $products as $product ) {\n\t\t\t$product_id = $product->post_id;\n\t\t\t$price = $product->price;\n\t\t\t$sale_price = $product->sale_price;\n\t\t\t$regular_price = $product->regular_price;\n\t\t\t$required_price= $product->required_price;\n\t\t\t\n\t\t\tif( $required_price == $sale_price ) {\n\t\t\t\t// Product in on SALE now\n\t\t\t\t// Nothing to do\n\t\t\t} elseif( $required_price == $regular_price ) {\n\t\t\t\t// Product is not on SALE now\n\t\t\t\tif( $product->dates ) {\n\t\t\t\t\t// Delete sale price and dates only if it was dates based rule.\n\t\t\t\t\tupdate_post_meta( $product_id, '_sale_price', '' );\n\t\t\t\t\tupdate_post_meta( $product_id, '_sale_price_dates_from', '' );\n\t\t\t\t\tupdate_post_meta( $product_id, '_sale_price_dates_to', '' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Set required price \n\t\t\tupdate_post_meta( $product_id, '_price', $required_price );\n\n\t\t\t$carton->clear_product_transients( $product_id );\n\t\t\t$parent = wp_get_post_parent_id( $product_id );\n\n\t\t\t// Sync parent\n\t\t\tif ( $parent ) {\n\t\t\t\t// We can force varaible product price to sync up by removing their min price meta\n\t\t\t\tdelete_post_meta( $parent, 'min_variation_price' );\n\n\t\t\t\t// Grouped products need syncing via a function\n\t\t\t\t$this_product = get_product( $product_id );\n\t\t\t\tif ( $this_product->is_type( 'simple' ) )\n\t\t\t\t\t$this_product->grouped_product_sync();\n\t\t\t\t$carton->clear_product_transients( $parent );\n\t\t\t}\n\t\t}\n\t}\n}", "function get_amount($date) {\n global $debug;\n $val = null;\n $money = 0;\n //if ($debug) { echo \"comparing value range for this object: \"; print_r($item); }\n foreach ($this->list as $item) {\n if ($item->includes($date)) {\n $val = $item;\n }\n }\n if (!$val) {\n return $money;\n }\n $period = $val->period;\n switch ($period) {\n case 'weekly':\n // this is only debited once every week.\n // make sure it is a multiple of 1 week offset from $val->extra\n $offset_seconds = strtotime($date) - strtotime($val->extra);\n $offset_days = floor($offset_seconds / 86400);\n if ($offset_days % 7 == 0) {\n $money = $val->amount;\n }\n break;\n case 'biweekly':\n // this is only debited once every 2 weeks.\n // make sure it is a multiple of 2 weeks offset from $val->extra\n $offset_seconds = strtotime($date) - strtotime($val->extra);\n $offset_days = floor($offset_seconds / 86400);\n if ($offset_days % 14 == 0) {\n $money = $val->amount;\n }\n break;\n case 'monthly': \n // this is debited once per month\n // make sure the day of month matches the day from $val->extra\n $day_amount = date('d', strtotime($val->extra));\n $day_this = date('d', strtotime($date));\n if ($day_this == $day_amount) {\n $money = $val->amount;\n }\n break;\n case 'semiannual': \n // this is debited once per year\n // make sure the day matches the day from $val->extra\n $day_amount = date('m-d', strtotime($val->extra));\n $day_amount_semi = date('m-d', strtotime(\"+6 months\", strtotime($val->extra)));\n $day_this = date('m-d', strtotime($date));\n if ($day_this == $day_amount || $day_this == $day_amount_semi) {\n $money = $val->amount;\n }\n break;\n case 'annual': \n // this is debited once per year\n // make sure the day matches the day from $val->extra\n $day_amount = date('m-d', strtotime($val->extra));\n $day_this = date('m-d', strtotime($date));\n if ($day_this == $day_amount) {\n $money = $val->amount;\n }\n break;\n case 'once':\n // make sure date matches exactly with $val->extra\n if ($date == $val->extra) {\n $money = $val->amount;\n }\n break;\n case 'daily':\n // always return the same value\n $money = $val->amount;\n break;\n default:\n throw new Exception(\"unkown period '$period'\");\n }\n if ($debug) {\n printf(\"get_amount($date) $val->period, $val->amount, $val->extra -> $money\\n\");\n }\n return $money;\n }", "function monthlySales($year){\n global $db;\n $sql = \"SELECT s.qty,\";\n $sql .= \" DATE_FORMAT(s.date, '%Y-%m-%e') AS date,p.name,\";\n $sql .= \"SUM(p.sale_price * s.qty) AS total_saleing_price\";\n $sql .= \" FROM sales s\";\n $sql .= \" LEFT JOIN products p ON s.product_id = p.id\";\n $sql .= \" WHERE DATE_FORMAT(s.date, '%Y' ) = '{$year}'\";\n $sql .= \" GROUP BY DATE_FORMAT( s.date, '%c' ),s.product_id\";\n $sql .= \" ORDER BY date_format(s.date, '%c' ) ASC\";\n return find_by_sql($sql);\n}", "public function calculate_end_month_bonus()\n {\n $year = (new DateTime)->format(\"Y\");\n $month = (new DateTime)->format(\"n\");\n\n if($month == 1){\n $month = 12;\n $year = $year - 1;\n } else {\n $month = $month - 1;\n }\n\n //count for DO Rank Members\n $do_members = ActiveDo::all();\n $sdo_members = ActiveSdo::all();\n //$userPurchases = UserPurchase::all(); // originall\n $userPurchases = UserPurchase::groupBy('user_id', 'product_id')\n ->selectRaw('user_id, product_id, sum(price) as price, sum(pv) as pv, count(*) as quantity')\n ->whereMonth('created_at', $month)\n ->whereYear('created_at', $year)\n ->get();\n //$userStores = Store::all(); // originall\n $userStores = Store::groupBy('user_id', 'product_id')\n ->selectRaw('user_id, product_id, sum(price) as price, sum(pv) as pv, count(*) as quantity')\n ->whereMonth('created_at', $month)\n ->whereYear('created_at', $year)\n ->get();\n \n $next_do_members= $do_members;\n $i = 0;\n $n = count($do_members);\n\n $total_sales1 = UserPurchase::sum('price');\n $total_sales2 = Store::sum('price');\n $total_sales = $total_sales1 + $total_sales2;\n\n $total_pv1 = UserPurchase::sum('pv');\n $total_pv2 = Store::sum('pv');\n $total_pv = $total_pv1 + $total_pv2;\n\n //$sale = Sale::where('year', $year)->where('month', $month)->first();\n $sale = Sale::firstOrCreate([]);\n $sale->re_total_sale = $total_sales;\n $sale->re_total_pv = $total_pv;\n $sale->save();\n\n // echo '<br>';\n // echo '<pre>';\n // print_r($userStores);\n // echo '<pre>';\n // echo '<br>';\n\n foreach ($userPurchases as $userPurchase) \n {\n $this->retail_price($userPurchase->user_id, $userPurchase->price, $userPurchase->product_id);\n //$this->upline_personal_rebate($userPurchase->user_id, $userPurchase->pv);\n $this->personal_rebate($userPurchase->user_id, $userPurchase->pv, $userPurchase->product_id);\n }\n\n foreach($userStores as $store)\n {\n $this->retail_price($store->user_id, $store->price, $store->product_id);\n //$this->pay_valid_upline_for_personal_rebate($store->user_id, $store->pv);\n //$this->upline_personal_rebate($store->user_id, $store->pv);\n $this->personal_rebate($store->user_id, $store->pv, $store->product_id);\n }\n\n foreach($do_members as $member)\n {\n $this->calculate_active_do_personal_gpv($member->user_id);\n // $this->group_bonus($member->user_id);\n }\n\n foreach($do_members as $member)\n {\n // $this->calculate_active_do_personal_gpv($member->user_id);\n $this->group_bonus($member->user_id);\n }\n\n $this->calculate_total_group_pv();\n\n foreach ($sdo_members as $smember) {\n $this->calculate_active_sdo_personal_gpv($smember->user_id);\n // $this->sdo_bonus($smember->user_id); //need to separate\n // $this->sdo_to_sdo_bonus($smember->user_id); //need to separate\n }\n\n foreach ($sdo_members as $smember) {\n $this->sdo_bonus($smember->user_id); \n $this->sdo_to_sdo_bonus($smember->user_id); \n }\n\n // foreach($next_do_members as $next_member)\n // {\n // //$this->calculate_active_do_personal_gpv($member->user_id);\n // $this->group_bonus($next_member->user_id);\n // }\n\n $ewallets = Wallet::all();\n\n foreach ($ewallets as $wallet) {\n //$this->direct_sponsor_bonus($wallet->user_id, $wallet->pv, $wallet->first_purchased);\n $this->direct_sponsor_bonus($wallet->user_id, $wallet->pv);\n }\n\n $do_cto_bonus = $this->do_cto_bonus();\n $sdo_cto_bonus = $this->sdo_cto_bonus();\n\n //$this->countTotalBonus();\n $this->recordUserBonuses();\n //$this->countTotalBonus();\n }", "function month_total($type, $filter1 = '', $filter_val1 = '', $filter2 = '', $filter_val2 = '', $notmatch = '', $notmatch_val = '')\n {\n $ago = time() - (86400 * 30);\n $a = 0;\n if ($type == 'sale') {\n $result = $this->db->get_where('sale', array(\n 'sale_datetime >= ' => $ago,\n 'sale_datetime <= ' => time()\n ))->result_array();\n foreach ($result as $row) {\n if($this->session->userdata('title') == 'admin'){\n if($this->sale_payment_status($row['sale_id'],'admin') == 'fully_paid'){\n //make version for vendor\n $res_cat = $this->db->get_where('product', array(\n 'category' => $filter_val1\n ))->result_array();\n foreach ($res_cat as $row1) {\n if ($p = $this->product_in_sale($row['sale_id'], $row1['product_id'], 'subtotal')) {\n $a += $p;\n }\n }\n }\n }\n if($this->session->userdata('title') == 'vendor'){\n if($this->sale_payment_status($row['sale_id'],'vendor',$this->session->userdata('vendor_id')) == 'fully_paid'){\n //make version for vendor\n $res_cat = $this->db->get_where('product', array(\n 'category' => $filter_val1\n ))->result_array();\n foreach ($res_cat as $row1) {\n if ($p = $this->vendor_share_in_sale($row['sale_id'],$this->session->userdata('vendor_id'),'paid')) {\n $p = $p['total'];\n $a += $p;\n }\n }\n }\n }\n }\n } else if ($type == 'stock') {\n $result = $this->db->get_where('stock', array(\n 'datetime >= ' => $ago,\n 'datetime <= ' => time()\n ))->result_array();\n foreach ($result as $row) {\n if ($row[$filter2] == $filter_val2) {\n if ($row[$filter1] == $filter_val1) {\n if ($notmatch == '') {\n $a += $row['total'];\n } else {\n if ($row[$notmatch] !== $notmatch_val) {\n $a += $row['total'];\n }\n }\n }\n }\n }\n }\n return $a;\n }", "function get_next_month_symbol($symbol, $month)\n\t{\n\t\t$symbol_delivery_months = explode(',', $this->delivery_months[$symbol]);\n\t\t// set default to first contract month next year\n\t\t$next_month = reset($symbol_delivery_months) . strftime(\"%y\", time() + 31536000);\n\t\t\n\t\tforeach($symbol_delivery_months as $month_symbol) {\n\t\t\tif($this->month_symbols[$month] < $month_symbol) {\t\n\t\t\t\t$next_month = $month_symbol . strftime(\"%y\"); \n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\treturn $next_month;\n\t}", "function dailySales($year,$month){\n global $db;\n $sql = \"SELECT s.qty,\";\n $sql .= \" DATE_FORMAT(s.date, '%Y-%m-%e') AS date,p.name,\";\n $sql .= \"SUM(p.sale_price * s.qty) AS total_saleing_price\";\n $sql .= \" FROM sales s\";\n $sql .= \" LEFT JOIN products p ON s.product_id = p.id\";\n $sql .= \" WHERE DATE_FORMAT(s.date, '%Y-%m' ) = '{$year}-{$month}'\";\n $sql .= \" GROUP BY DATE_FORMAT( s.date, '%e' ),s.product_id\";\n return find_by_sql($sql);\n}", "function calculateProrate($recurring_amount, $current_date, $cycle)\n {\n $next_due_date = $this->utils->getXmonthsAfter($cycle, $this->utils->getDateArray($current_date));\n $prorate_array = array();\n $prorate_array['prorate_amount']= 0;\n $prorate_array['due_date'] = $current_date;\n $prorate_array['next_bill_date']= $next_due_date['year'] . \"-\" . $next_due_date['mon'] . \"-\" . $next_due_date['mday'];\n if ($this->BL->conf['en_prorate'])\n {\n $d1 = $this->utils->getDateArray($current_date);\n $d2 = $this->utils->getDateArray($prorate_array['next_bill_date']);\n $prorate_day = $d1['year'] . \"-\" . $d1['mon'] . \"-\" . $this->BL->conf['prorate_date'];\n if ($d1['mday'] > $this->BL->conf['prorate_date'])\n {\n $prorate_day = $this->utils->beginOfNextMonth($d1['mday'], $d1['mon'], $d1['year'], '%Y-%m') . \"-\" . $this->BL->conf['prorate_date'];\n }\n $d3 = $this->utils->getDateArray($prorate_day);\n $days_in_cycle = $this->utils->dateDiff($d1['mday'], $d1['mon'], $d1['year'], $d2['mday'], $d2['mon'], $d2['year']);\n $prorate_days = $this->utils->dateDiff($d1['mday'], $d1['mon'], $d1['year'], $d3['mday'], $d3['mon'], $d3['year']);\n $amount_per_day= $recurring_amount / $days_in_cycle;\n $next_due_date = $this->utils->getXmonthsAfter($cycle, $this->utils->getDateArray($prorate_day));\n $prorate_array['prorate_amount'] = $this->utils->toFloat($amount_per_day * $prorate_days);\n $prorate_array['due_date'] = $prorate_day;\n $prorate_array['next_bill_date'] = $next_due_date['year'] . \"-\" . $next_due_date['mon'] . \"-\" . $next_due_date['mday'];\n $prorate_array['prorate_day'] = $prorate_day;\n }\n return $prorate_array;\n }", "function _getAmountByMonth($year, $sql, $format=0)\r\n\t{\r\n\t\tglobal $langs;\r\n\r\n\t\t$result=array();\r\n\t\t$res=array();\r\n\r\n\t\tdol_syslog(get_class($this).'::'.__FUNCTION__.\"\", LOG_DEBUG);\r\n\r\n\t\t$resql=$this->db->query($sql);\r\n\t\tif ($resql)\r\n\t\t{\r\n\t\t\t$num = $this->db->num_rows($resql);\r\n\t\t\t$i = 0;\r\n\t\t\twhile ($i < $num)\r\n\t\t \t{\r\n\t\t \t\t$row = $this->db->fetch_row($resql);\r\n\t\t \t\t$j = $row[0] * 1;\r\n\t\t \t\t$result[$j] = $row[1];\r\n\t\t \t\t$i++;\r\n\t\t \t}\r\n\t\t \t$this->db->free($resql);\r\n\t\t}\r\n else dol_print_error($this->db);\r\n\r\n\t\tfor ($i = 1 ; $i < 13 ; $i++)\r\n\t\t{\r\n\t\t\t$res[$i] = (int) round((isset($result[$i])?$result[$i]:0));\r\n\t\t}\r\n\r\n\t\t$data = array();\r\n\r\n\t\tfor ($i = 1 ; $i < 13 ; $i++)\r\n\t\t{\r\n\t\t\t$month='unknown';\r\n\t\t\tif ($format == 0) $month=$langs->transnoentitiesnoconv('MonthShort'.sprintf(\"%02d\", $i));\r\n\t\t\telseif ($format == 1) $month=$i;\r\n\t\t\telseif ($format == 2) $month=$langs->transnoentitiesnoconv('MonthVeryShort'.sprintf(\"%02d\", $i));\r\n\t\t\t//$month=dol_print_date(dol_mktime(12,0,0,$i,1,$year),($format?\"%m\":\"%b\"));\r\n\t\t\t//$month=dol_substr($month,0,3);\r\n\t\t\t$data[$i-1] = array($month, $res[$i]);\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "function getMonthTotal(){\n\t\t$total = $this->hhRentAmount;\n\t\tforeach ($this->members as $member){\n\t\t\tforeach ($member->getBills() as $bill){\n\t\t\t\t$total += $bill->getBillAmount();\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t}", "function get_indicator_price($price,$vat){\r\n $full_price = $price + ($price * $vat);\r\n return $full_price;\r\n}", "function add_months(&$t, $m)\n{\n $t['tm_mon'] += $m;\n if ($t['tm_mon'] > 12) \n {\n $t['tm_mon'] -= 12;\n $t['tm_year'] ++;\n }\n elseif ($t['tm_mon'] < 1) \n {\n $t['tm_mon'] += 12;\n $t['tm_year'] --;\n }\n return;\n}", "public function calculate_price(Request $request){\n\n if($request->start_date != '' and $request->end_date != ''){\n $start_date = $request->start_date;\n $end_date = $request->end_date;\n\n $start_date = new DateTime($start_date);\n $end_date = new DateTime($end_date);\n\n $agar = Agar::where('id',$request->agar_id)->join('agar_price','agar.id','agar_price.agar_id')->first();\n // calculate the deffrence bettwen start date and end date\n $diff_date = date_diff($start_date,$end_date);\n $formated_diff_date = intval($diff_date->format('%R%a days'));\n if($formated_diff_date > 29){\n $reservation_price = ($agar->month / 30) * $formated_diff_date;\n return response()->json(round($reservation_price * $formated_diff_date));\n }\n else{\n $reservation_price = $agar->day;\n return response()->json($reservation_price * $formated_diff_date);\n }\n\n }\n\n }", "public function totalOfMonth() {\n\n $query = \"SELECT SUM(TOTAL) AS TOTAL_MONTH FROM BUY WHERE\" .\n \" MONTH(BUYDATE) = MONTH(NOW()) AND YEAR(BUYDATE) = YEAR(NOW()) \";\n\n $result = parent::query($query);\n\n if ($row = $result->fetch_assoc()) {\n return $row['TOTAL_MONTH'];\n }\n\n return null;\n }", "function nextMonth($interval=1){ return $this->_getDate(0,$interval); }", "function getOutletDiscountRate()\n {\n $dayOfMonth = date('j');\n return 20 + $dayOfMonth;\n }", "public static function getMonthlySales()\n\t{\n\t\tTools::displayAsDeprecated();\n\t\t$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('\n\t\tSELECT SUM(`total_paid`) as nb\n\t\tFROM `'._DB_PREFIX_.'orders`\n\t\tWHERE MONTH(`date_add`) = MONTH(NOW())\n\t\tAND YEAR(`date_add`) = YEAR(NOW())');\n\n\t\treturn isset($result['nb']) ? $result['nb'] : 0;\n\t}", "public function getMonthPartnersIncome($year, $month) {\n //$vydaje = $this->db->table('translator_project')->where('accounted', 1)->where('translator_id=? OR translator_id=?', 1, 2)->where('project_id', $this->db->table('project')->select('id')->where('invoice_date LIKE ?', $year.'-'.$month.'%'))->sum('payment');\n //return $prijmy - $vydaje;\n return 0;\n }", "public function display_variable_billing_periods( $product, $suffix ) {\r\n\r\n\t\t$product = WC_Name_Your_Price_Helpers::maybe_get_product_instance( $product );\r\n\r\n\t\tif ( WC_Name_Your_Price_Helpers::is_billing_period_variable( $product ) ) {\r\n\r\n\t\t\t// Create the dropdown select element.\r\n\t\t\t$period = WC_Name_Your_Price_Helpers::get_period_value_attr( $product, $suffix );\r\n\r\n\t\t\t// The pre-selected value.\r\n\t\t\t$selected = $period ? $period : 'month';\r\n\r\n\t\t\t// Get list of available periods from Subscriptions plugin.\r\n\t\t\t$periods = WC_Name_Your_Price_Helpers::get_subscription_period_strings();\r\n\r\n\t\t\tif ( $periods ) {\r\n\r\n\t\t\t\tprintf( '<span class=\"nyp-billing-period\"><span class=\"per\"> / </span><select id=\"nyp-period%s\" name=\"%s\" class=\"nyp-period\">', intval( WC_Name_Your_Price_Helpers::get_counter() ), esc_attr( 'nyp-period' . $suffix ) );\r\n\r\n\t\t\t\tforeach ( $periods as $i => $period ) :\r\n\t\t\t\t\tprintf( '<option value=\"%s\" %s>%s</option>', esc_attr( $i ), selected( $i, $selected, false ), esc_html( $period ) );\r\n\t\t\t\tendforeach;\r\n\r\n\t\t\t\techo '</select></span>';\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Filter wc_nyp_subscription_period_input\r\n\t\t\t\t *\r\n\t\t\t\t * @param string $period_input - the resulting input's html.\r\n\t\t\t\t * @param obj $product - the product object.\r\n\t\t\t\t * @param string $suffix - needed for grouped, composites, bundles, etc.\r\n\t\t\t\t * @return string\r\n\t\t\t\t * @deprecated 3.0.0\r\n\t\t\t\t */\r\n\t\t\t\tif ( has_filter( 'wc_nyp_subscription_period_input' ) ) {\r\n\t\t\t\t\twc_doing_it_wrong( __FUNCTION__, 'woocommerce_get_price_input filter has been removed for security reasons!', '3.0' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function calculatePrices()\n {\n }", "public function setMonth($month){\n\t\tif($month>12){\n\t\t\t$this->_month = $month%12;\n\t\t\t$this->_year += ((int)($month/12));\n\t\t} else {\n\t\t\tif($month<1){\n\t\t\t\t$this->_month = 13-(abs($month)%12);\n\t\t\t\t$this->_year -= (((int)(abs($month)/12))+1);\n\t\t\t} else {\n\t\t\t\t$this->_month = (int) $month;\n\t\t\t}\n\t\t}\n\t\t$monthDays = self::$_monthTable[$this->_month-1];\n\t\tif($this->isLeapYear()==true&&$this->_month==2){\n\t\t\t++$monthDays;\n\t\t}\n\t\tif($this->_day>$monthDays){\n\t\t\t$this->_day = self::$_monthTable[$this->_month-1];\n\t\t}\n\t\t$this->_mktime();\n\t\t$this->_setDate();\n\t}", "function hospital_payment_calculation($number_of_beds,$application)\n{\n\n\tif ($application->application_type == 2) $peneltyOnTotalMonth = getDiffrentBetweenTwoDatesInMonth($application->date_of_expiry_certificate,date('Y-m-d'));\n\n\t$payment_array = array();\n\tif ($number_of_beds <= 5) {\n\t\t$payment_array['amount'] = ($application->application_type == 1) ? 1000*2 : 500*3 + $peneltyOnTotalMonth*100 ;\n\t\t$payment_array['form_chargis'] = ($application->application_type == 1) ? 200 : 100 ;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['amount'];\n\n\t} elseif ($number_of_beds >= 6 && $number_of_beds <= 10) {\n\t\t$payment_array['amount'] = ($application->application_type == 1) ? 1500*2 : 750*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['form_chargis'] = ($application->application_type == 1) ? 200 : 100 ;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['amount'];\n\n\t} elseif ($number_of_beds >= 11 && $number_of_beds <= 15) {\n\t\t$payment_array['amount'] = ($application->application_type == 1) ? 2000*2 : 1000*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['form_chargis'] = ($application->application_type == 1) ? 200 : 100 ;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['amount'];\n\n\t} else if ($number_of_beds >= 16) {\n\t\t$payment_array['amount'] = ($application->application_type == 1) ? 5000*2 : 2500*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['form_chargis'] = ($application->application_type == 1) ? 200 : 100 ;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['amount'];\n\n\t} else {\n\t\t$payment_array['amount'] = ($application->application_type == 1) ? 0*3 : 1*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['form_chargis'] = ($application->application_type == 1) ? 200 : 100 ;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['amount'] + $beds_renewal_charges;\n\t}\n\treturn json_decode(json_encode($payment_array));\n}", "public function computeSalary()\n {\n /**\n * Payments are done every 15th and 30th of every month\n * For 15th:\n * Day 1 to 14th of the month plus day 30 and 31st of the previous month\n * For 30th:\n * Day 15th to 29th\n */\n\n // check if today is the 15th or 30th / 28th for Feb\n $today = new \\DateTime();\n $day_today = $today->format( 'd' );\n $is_leap_year = intval( date('Y') ) % 4 == 0;\n\n // compute salary only on the 15th and the 30th\n if( $day_today == 15 ){\n // get teacher whose salary was not computed yet\n $teachers = ( new TeacherPivot )->getSalaryUnprocessedAsOf( $today->format('Y-m-d') );\n foreach( $teachers as $teacher ){\n $teacher->processDailyIncome();\n }\n }elseif( $day_today == 30 ){\n\n }elseif( $day_today == 28 && date('m') == 2 && !$is_leap_year ){\n\n }elseif( $day_today == 29 && date('m') == 2 && $is_leap_year ){\n\n }\n\n }", "function add_month($start, $months)\n{\n $date1 = new DateTime($start->format(\"Y-m-d\\TH:i:sP\"));\n $day1 = intval($date1->format(\"d\"));\n\n $date2 = $date1->add(new DateInterval('P'.strval($months).'M'));\n $year2 = intval($date2->format(\"Y\"));\n $month2 = intval($date2->format(\"m\"));\n $day2 = intval($date1->format(\"d\"));\n\n if ($day1 <= $day2)\n {\n return $date2;\n }\n $date2->setDate($year2, $month2, 0);\n return $date2;\n}", "public function monthly_sales_report()\n\t{\n\t\t$query1 = $this->db->query(\"\n\t\t\tSELECT \n\t\t\t\tdate,\n\t\t\t\tEXTRACT(MONTH FROM date) as month, \n\t\t\t\tCOUNT(invoice_id) as total\n\t\t\tFROM \n\t\t\t\tinvoice\n\t\t\tWHERE \n\t\t\t\tEXTRACT(YEAR FROM date) >= EXTRACT(YEAR FROM NOW())\n\t\t\tGROUP BY \n\t\t\t\tEXTRACT(YEAR_MONTH FROM date)\n\t\t\tORDER BY\n\t\t\t\tmonth ASC\n\t\t\")->result();\n\n\t\t$query2 = $this->db->query(\"\n\t\t\tSELECT \n\t\t\t\tpurchase_date,\n\t\t\t\tEXTRACT(MONTH FROM purchase_date) as month, \n\t\t\t\tCOUNT(purchase_id) as total_month\n\t\t\tFROM \n\t\t\t\tproduct_purchase\n\t\t\tWHERE \n\t\t\t\tEXTRACT(YEAR FROM purchase_date) >= EXTRACT(YEAR FROM NOW())\n\t\t\tGROUP BY \n\t\t\t\tEXTRACT(YEAR_MONTH FROM purchase_date)\n\t\t\tORDER BY\n\t\t\t\tmonth ASC\n\t\t\")->result();\n\n\t\treturn [$query1,$query2];\n\t}", "function get_totals(){\r\n $this_month = date('n', time()) - 1;\r\n\r\n $this->payments_this_month = $this->payment_totals_by_month[$this_month];\r\n\r\n $last_month = $this_month > 0 ? $this_month - 1 : false;\r\n if($last_month){\r\n $payments_last_month = $this->payment_totals_by_month[$last_month];\r\n\r\n if($payments_last_month > 0)\r\n $this->payments_this_month_change_percentage = (($this->payments_this_month/$payments_last_month) - 1) * 100;\r\n else $this->payments_this_month_change_percentage = 0;\r\n }\r\n }", "function obtain_invested_means_first_period_month($acc_number)\n\t{\n\t return $this->db->select()\n\t\t ->from('pamm_clients_statement') \n\t\t ->where(\"pamm_clients_stat_acc_number\",$acc_number)\n\t\t ->where(\"pamm_clients_stat_date < date_sub(curdate(),INTERVAL 30 DAY)\")\n\t\t ->get()->result();\n\t}", "public function monthly()\n {\n $submenu_code = 'monthly';\n $permits = $this->_check_menu_access( $submenu_code, 'view');//kalau tidak ada permission untuk view langsung redirect & return permits\n $this->_set_title('Monthly');\n\n //SET VARIABLE\n $from = set_var($this->input->get('from'), date('Y-m-d', strtotime('-1 day')));\n $to = set_var($this->input->get('to'), date('Y-m-d'));\n\n $cst_status = $this->config->item('order')['status']['completed'];\n $cst_delivery_type = $this->config->item('order')['delivery_type'];\n $ios = $this->config->item('user_download')['usrd_type']['ios'];\n $android = $this->config->item('user_download')['usrd_type']['android'];\n\n $url_query = '&from='.$from.'&to='.$to;\n\n //ADDITIONAL FILTER\n\n $arr_data = [\"from_date\" => $from, \"to_date\" => $to.' 23:59:59', \"negation\" => true, \"status\" => $cst_status];\n $arr_data_usrd_android = $arr_data;\n $arr_data_usrd_ios = $arr_data;\n $arr_data_usrd_android['usrd_type'] = $android;\n $arr_data_usrd_ios['usrd_type'] = $ios;\n\n $arr_data_negation = $arr_data;\n $arr_data_pickup = $arr_data;\n $arr_data_delivery = $arr_data;\n $arr_data_negation[\"negation\"] = false;\n $arr_data_pickup['delivery_type'] = $cst_delivery_type['pickup'];\n $arr_data_delivery['delivery_type'] = $cst_delivery_type['delivery'];\n\n\n $total_android = $this->reportdb->get_total_download_apps($arr_data_usrd_android);\n $total_ios = $this->reportdb->get_total_download_apps($arr_data_usrd_ios);\n $total_download = (int) $total_android->total + (int) $total_ios->total;\n\n //--------------------------------------------------------------------------------------------------------------------------\n $data_total_order = $this->reportdb->get_total_complete($arr_data);\n $data_total_pickup = $this->reportdb->get_total_complete($arr_data_pickup);\n $data_total_delivery = $this->reportdb->get_total_complete($arr_data_delivery);\n //-------------------------------------------------------------------------------------------------------------------------------------------------\n $user = $this->reportdb->get_total_user($arr_data);\n $user_not_order = $this->reportdb->get_total_user_not_order($arr_data);\n $user_topup_in_same_month = $this->reportdb->get_total_user_topup_month($arr_data);\n $user_topup_not_in_same_month = $this->reportdb->get_total_user_topup_month($arr_data_negation);\n $user_have_balance = $this->reportdb->get_total_user_have_balance_in_end_month($arr_data);\n //-------------------------------------------------------------------------------------------------------------------------------------------------\n $user_reff = $this->reportdb->get_total_user_referral($arr_data);\n $user_reff_not_claim = $this->reportdb->get_total_user_referral_claim($arr_data_negation);\n $user_reff_claim = $this->reportdb->get_total_user_referral_claim($arr_data);\n $user_reff_claim_not_repeat = $this->reportdb->get_total_user_referral_claim_repeat($arr_data_negation);\n $user_reff_claim_repeat = $this->reportdb->get_total_user_referral_claim_repeat($arr_data);\n $user_reff_not_free = $this->reportdb->get_total_user_referral_not_free($arr_data);\n //--------------------------------------------------------------------------------------------------------------------------\n $claim_free = $this->reportdb->get_total_claim_free($arr_data);\n $claim_free_repeat = $this->reportdb->get_total_claim_free_repeat($arr_data);\n $claim_free_not_order = $this->reportdb->get_total_claim_free_repeat($arr_data_negation);\n $not_claim_free = $this->reportdb->get_not_claim_free($arr_data);\n //--------------------------------------------------------------------------------------------------------------------------\n $user_topup = $this->reportdb->get_total_user_topup($arr_data);\n\n // SELECT DATA & ASSIGN VARIABLE $DATA\n $config['base_url'] = ADMIN_URL.'report/monthly'.($url_query != '' ? '?'.$url_query : '');\n $data['form_url'] = $config['base_url'];\n $data['page_url'] = str_replace($url_query, '', $config['base_url']);\n $data['permits'] = $permits;\n $data['from'] = $from;\n $data['to'] = $to;\n //-----------------------------------------------------------------------\n $data['total_order'] = $data_total_order->total;\n $data['total_pickup'] = $data_total_pickup->total;\n $data['total_delivery'] = $data_total_delivery->total;\n //-----------------------------------------------------------------------\n $data['user'] = $user;\n $data['user_not_order'] = $user_not_order;\n $data['user_topup_in_same_month'] = $user_topup_in_same_month;\n $data['user_topup_not_in_same_month'] = $user_topup_not_in_same_month;\n $data['user_have_balance'] = $user_have_balance;\n //----------------------------------------------------------------------\n $data['user_reff'] = $user_reff;\n $data['reff_not_claim'] = $user_reff_not_claim;\n $data['reff_claim'] = $user_reff_claim;\n $data['reff_claim_not_repeat'] = $user_reff_claim_not_repeat;\n $data['reff_claim_repeat'] = $user_reff_claim_repeat;\n $data['reff_not_free'] = $user_reff_not_free;\n //----------------------------------------------------------------------\n $data['claim_free'] = $claim_free;\n $data['claim_free_repeat'] = $claim_free_repeat;\n $data['claim_free_not_order'] = $claim_free_not_order;\n $data['not_claim_free'] = $not_claim_free;\n //----------------------------------------------------------------------\n $data['user_topup'] = $user_topup;\n $data['total_download'] = $total_download;\n $data['total_android'] = $total_android->total;\n $data['total_ios'] = $total_ios->total;\n\n if($this->input->get('export') == 'xls'){\n $permits = $this->_check_menu_access( $submenu_code, 'export');\n //mulai dari set header dan filename\n $filename = 'monthly.xls';\n $this->set_header_xls($filename);\n\n $this->_render('report/monthly_xls', $data);\n\n }else{\n $this->_render('report/monthly', $data);\n }\n }", "function obtain_month_profitable($acc_number)\n\t{\n\t return $this->db->select('AVG(pamm_tp_profitable) AS ptp,monthname(pamm_tp_timestamp) AS month, year(pamm_tp_timestamp) AS year')\n\t\t ->from('pamm_tp_results') \n\t\t ->where(\"pamm_tp_account\",$acc_number)\n\t\t ->group_by('monthname(pamm_tp_timestamp)')\n\t\t ->order_by('pamm_tp_timestamp','ASC')\n\t\t ->get()->result();\n\t}", "public function resolvePrice();", "function getOvertime($month, $year, $comp_id, $branchinfo_id) {\n \t$qry = \"\";\n \t$objClsSSS = new clsSSS($this->conn);\n \tif($objClsSSS->getSettings($comp_id,12) && $branchinfo_id != 0){\n \t\t$qry = \" AND branchinfo_id='$branchinfo_id' \";\n \t}\n \t$sql = \"SELECT entry_amt+amm_amt AS total\n\t\t\t\tFROM \n\t\t\t\t(SELECT COALESCE(SUM(a.ppe_amount), 0) AS entry_amt FROM payroll_paystub_entry a\n\t\t\t\tJOIN payroll_pay_stub b ON (b.paystub_id=a.paystub_id)\n\t\t\t\tJOIN payroll_pay_period c ON (c.payperiod_id=b.payperiod_id)\n\t\t\t\tJOIN payroll_paystub_report d ON (d.paystub_id=b.paystub_id)\n\t\t\t\tJOIN payroll_ps_account e ON (e.psa_id=a.psa_id)\n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=d.emp_id)\n\t\t\t\tJOIN period_benloanduc_sched f ON (d.emp_id=f.emp_id)\n\t\t\t\tWHERE c.payperiod_period_year='{$year}' AND em.comp_id='{$comp_id}' $qry AND a.psa_id='16' AND c.payperiod_period='{$month}' AND f.empdd_id = '5' AND f.bldsched_period = '2') entry_tbl,\n\t\t\t\t\n\t\t\t\t(select COALESCE(sum(a.amendemp_amount),0) as amm_amt \n\t\t\t\tfrom payroll_ps_amendemp a \n\t\t\t\tjoin payroll_ps_amendment b on (b.psamend_id=a.psamend_id) \n\t\t\t\tjoin payroll_pay_stub c on (c.paystub_id=a.paystub_id) \n\t\t\t\tjoin payroll_pay_period d on (d.payperiod_id=c.payperiod_id)\n\t\t\t\tJOIN payroll_ps_account e ON (e.psa_id=b.psa_id)\n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=a.emp_id) \n\t\t\t\tJOIN period_benloanduc_sched f ON (a.emp_id=f.emp_id)\n\t\t\t\tWHERE d.payperiod_period_year='{$year}' AND em.comp_id='{$comp_id}' $qry AND b.psa_id='16' AND d.payperiod_period='{$month}' AND f.empdd_id = '5' AND f.bldsched_period = '2'\n\t\t\t\tAND a.paystub_id NOT IN (SELECT a.paystub_id FROM payroll_paystub_entry a\n\t\t\t\tJOIN payroll_pay_stub b ON (b.paystub_id=a.paystub_id)\n\t\t\t\tJOIN payroll_pay_period c ON (c.payperiod_id=b.payperiod_id)\n\t\t\t\tJOIN payroll_paystub_report d ON (d.paystub_id=b.paystub_id)\n\t\t\t\tJOIN payroll_ps_account e ON (e.psa_id=a.psa_id)\n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=d.emp_id)\n\t\t\t\tJOIN period_benloanduc_sched f ON (d.emp_id=f.emp_id)\n\t\t\t\tWHERE c.payperiod_period_year='{$year}' AND em.comp_id='{$comp_id}' $qry AND a.psa_id='16' AND c.payperiod_period='{$month}' AND f.empdd_id = '5' AND f.bldsched_period = '2')) amm_tbl\";\n \t$rsResult = $this->conn->Execute($sql);\n \twhile (!$rsResult->EOF) {\n \t\tif ($rsResult->fields['total'] != '' or $rsResult->fields['total'] != NULL or $rsResult->fields['total'] != 0.00) {\n \t\t\treturn $rsResult->fields['total'];\n \t\t} else {\n \t\t\treturn 0.00;\n \t\t}\n \t}\n }", "public static function getSalePerDay($i,$month,$year,$branch)\n {\n $str = $i. '-' . $month . '-' . $year;\n $date = date('Y-m-d', strtotime($str));\n $data = DB::table('month_sales')->where('branch_id', $branch)->where('_date', $date)->first();\n\n $with_receipt_total = 0;\n $with_out_receipt_total = 0;\n $credit_total = 0;\n $expense_total = 0;\n $return_total = 0;\n $total_amount = 0;\n $taken_total = 0;\n $deposit_total = 0;\n $is_check = 2;\n $coh = 0;\n\n\n $expense_string = '';\n $firstRec ='' ;\n $lastRec ='' ;\n\n $number_of_check = 0;\n\n if($data != null){\n $json_data = json_decode($data->data,TRUE);\n\n\n $rec_no = [];\n foreach ($json_data['with_receipt'] as $key => $val){\n $total =0;\n if($val['rec_amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['rec_amount'];\n }\n $with_receipt_total = $with_receipt_total + $total ;\n array_push($rec_no,$val['rec_no']);\n\n $number_of_check = $number_of_check + (isset($val['is_check']) ? 1 : 0 );\n }\n\n $firstRec = $rec_no[0];\n $lastRec = $rec_no[count($rec_no) - 1];\n\n foreach ($json_data['without_receipt'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $with_out_receipt_total = $with_out_receipt_total + $total ;\n }\n foreach ($json_data['credit'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $credit_total = $credit_total + $total ;\n }\n foreach ($json_data['expense'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $expense_total = $expense_total + $total ;\n\n $expense_string .= $val['details'].' ';\n\n }\n foreach ($json_data['return'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $return_total = $return_total + $total ;\n }\n\n\n $amount_1000 = ($json_data['amount_1000'] != null) ? json_decode($data->data,TRUE)['amount_1000'] * 1000 : 0;\n $amount_500 = ($json_data['amount_500'] != null) ? json_decode($data->data,TRUE)['amount_500'] * 500 : 0;\n $amount_100 = ($json_data['amount_100'] != null) ? json_decode($data->data,TRUE)['amount_100'] * 100 : 0;\n $amount_50 = ($json_data['amount_50'] != null) ? json_decode($data->data,TRUE)['amount_50'] * 50 : 0;\n $amount_20 = ($json_data['amount_20'] != null || json_decode($data->data,TRUE)['amount_20'] != '') ? json_decode($data->data,TRUE)['amount_20'] * 20 : 0;\n $amount_coins = ($json_data['amount_coins'] != null) ? json_decode($data->data,TRUE)['amount_coins'] : 0;\n $total_amount = $amount_1000 + $amount_500 + $amount_100 + $amount_50 +$amount_20+ $amount_coins;\n $is_check = (isset($json_data['is_check'])) ? json_decode($data->data,TRUE)['is_check'] : $is_check;\n $coh = (isset($json_data['coh'])) ? json_decode($data->data,TRUE)['coh'] : $coh;\n\n foreach (json_decode($data->data,TRUE)['taken'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $taken_total = $taken_total + $total ;\n }\n foreach (json_decode($data->data,TRUE)['deposit'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $deposit_total = $deposit_total + $total ;\n }\n\n }\n\n\n $_data =[\n 'with_receipt_total' =>$with_receipt_total,\n 'with_out_receipt_total' =>$with_out_receipt_total,\n 'credit_total' =>$credit_total,\n 'expense_total' =>$expense_total,\n 'return_total' =>$return_total,\n 'amount_total' =>$total_amount,\n 'taken_total' =>$taken_total,\n 'deposit_total' =>$deposit_total,\n 'data' =>($data != null) ? $data->data : '',\n 'date' =>$date,\n 'is_check'=>$is_check,\n 'coh'=>$coh,\n 'expense_details'=>$expense_string,\n 'rec_no'=>$firstRec.'-'.$lastRec,\n 'number_of_check' =>$number_of_check\n\n\n ];\n\n\n return json_encode($_data);\n\n }", "public function sumCashTransactionPerMonths(): array\n {\n $months = ['jan', 'feb', 'mar', 'apr', 'mei', 'jun', 'jul', 'agu', 'sep', 'okt', 'nov', 'des'];\n\n for ($i = 1; $i <= 12; $i++) {\n // Looping dari angka 1-12 karena setiap tahun ada 12 bulan dan menghitung kolom amount\n // berdasarkan bulannya.\n $cashTransactions = $this->model\n ->select('is_paid', 'amount', 'date')\n ->whereMonth('date', \"{$i}\")\n ->whereYear('date', date('Y'))\n ->sum('amount');\n\n $results[$months[$i - 1]] = $cashTransactions;\n }\n\n /**\n * Output yang akan dihasilkan seperti dibawah ini\n * \n * $results = [\n * 'jan' => 10000,\n * 'feb' => 10000,\n * 'mar' => 10000,\n * 'apr' => 10000,\n * 'mei' => 10000,\n * 'jun' => 10000,\n * 'jul' => 10000,\n * 'agu' => 10000,\n * 'sep' => 10000,\n * 'okt' => 10000,\n * 'nov' => 10000,\n * 'des' => 10000\n * ];\n */\n\n return $results;\n }", "function sub_realized_margin($sub,$month=0,$year=0){\n\tglobal $sql;\n\tif ($month == 0)\n\t\t$month = date(\"m\");\n\tif ($year == 0)\n\t\t$year = date(\"Y\");\n\n\t$counts = select_counts($month,$year);\n\n\t$countQ = \"select p.normal_price,q.cost,c.count from\n\t\t products as p left join prodExtra as q\n\t\t on p.upc = q.upc left join $counts as c\n\t\t on p.upc = c.upc left join departments as d\n\t\t on c.department = d.dept_no\n\t\t left join MasterSuperDepts AS s ON\n\t\t s.dept_ID=d.dept_no\n\t\t where s.superID = $sub\n\t\t and q.cost <> 0 order by c.count desc\";\n\t$countR = $sql->query($countQ);\n\n\t$num = 0;\n\t$denom = 0;\t\n\n\twhile($countW = $sql->fetch_array($countR)){\n\t\t$num += $countW[2] * margin($countW[0],$countW[1]);\n\t\t$denom += $countW[2];\n\t}\n\n\treturn $num / $denom;\n}", "function monthPeriod_start_end($begin, $end)\n{\n $begin = (new DateTime($begin.'-01-01'))->modify('first day of this month');\n $end = (new DateTime($end.'-12-01 +1 month'))->modify('first day of this month');\n $daterange = new DatePeriod($begin, new DateInterval('P1M'), $end);\n\n foreach ($daterange as $date) {\n $dates[] = $date->format(\"m\");\n }\n return $dates;\n}", "function mesec($rBrMeseca)\n{\nswitch($rBrMeseca)\n{\n case ($rBrMeseca % 12 == 1):\n echo \"januar\";\n break;\n case ($rBrMeseca % 12 == 2):\n echo \"februar\";\n break;\n case ($rBrMeseca % 12 == 3):\n echo \"mart\";\n break;\n case ($rBrMeseca % 12 == 4):\n echo \"april\";\n break;\n case ($rBrMeseca % 12 == 5):\n echo \"maj\";\n break;\n case ($rBrMeseca % 12 == 6):\n echo \"jun\";\n break;\n case ($rBrMeseca % 12 == 7):\n echo \"jul\";\n break;\n case ($rBrMeseca % 12 == 8):\n echo \"avgust\";\n break;\n case ($rBrMeseca % 12 == 9):\n echo \"septembar\";\n break;\n case ($rBrMeseca % 12 == 10):\n echo \"oktobar\";\n break;\n case ($rBrMeseca % 12 == 11):\n echo \"novembar\";\n break;\n case ($rBrMeseca % 12 == 0):\n echo \"decembar\";\n break;\n default:\n echo \"greska\";\n break; \n}\n}", "public function get_month($month_number)\n {\n }", "static public function possibleKmInOneMonth($roundForInt = 10) {\r\n\t\treturn self::possibleKmInDays(365/12, $roundForInt);\r\n\t\t\r\n\t}", "function it_calculates_ec_calculator_example_17()\n {\n $this->beConstructedWith(200000);\n $this->addPayment(4000, 0);\n $owed = 200000;\n\n for ($month = 1; $month < 12 * 15; $month++) {\n $repayment = max($owed * 0.02, 100);\n $interest = $owed * 0.06 / 12;\n $this->addPayment(\n round($repayment + $interest, 2),\n Calculator::DAYS_IN_YEAR / 12 * $month\n );\n $owed -= $repayment;\n }\n\n $interest = $owed * 0.06 / 12;\n $this->addPayment(\n round($owed + $interest, 2),\n Calculator::DAYS_IN_YEAR / 12 * $month\n );\n\n $this->calculate()->shouldReturn(6.8);\n }", "public function getCurrentMonthTotalOrder() : int;", "public static function getMonth(){\n\t\t// this represents the number of seconds ni a month\n\t\t// editing this will lead to false values\n\t\treturn 2419200;\n\t}", "function totalHari($month,$year){\n $jumlah = cal_days_in_month(CAL_GREGORIAN,$month,$year);\n return $jumlah;\n}", "public function calcPaidThru($months = null, $op = null)\n {\n \tif ($months === null)\n \t\t$months = $this->calcMonths();\n \tif ($op === null)\n \t\t$op = OpDate::OP_ADD;\n \t$paid_thru = (new OpDate)->setFromMySql($this->getStartDt());\n \t$paid_thru->modify($op . $months . ' month');\n \t$paid_thru->setToMonthEnd();\n \treturn $paid_thru->getMySqlDate();\n }", "public function deliveryPriceDhaka()\n {\n }", "public function getNextMonth(){\n\t\tif($this->getMonth() == 12){return 1;}\n\t\telse{return $this->getMonth()+1;}\n\t}", "function process_target_daily_amount($start,$end,$amount){\n\t$days_diff = cal_days($start, $end);\n\t//Divide the target amount by the set amount\n\t$calculator = $amount/$days_diff;\n\treturn $calculator;\n}", "function\nquery_for_month($language, $target_area, $season, $start_date, $stop_date, $freeze_date, $status)\n{\n $obs_query = \"SELECT ob.frequency, ob.\\\"date\\\", ob.\\\"time\\\", ob.o\"\n .\" FROM parsed_observations ob JOIN ms_use ms USING (stn)\"\n .\" WHERE status='$status'\"\n .\" AND ob.\\\"date\\\" BETWEEN '$start_date' AND '$stop_date'\"\n \t .\" AND ob.\\\"language\\\" = '$language' AND ms.\\\"language\\\" = '$language'\";\n if($freeze_date != \"\")\n $obs_query .= \" AND ob.row_timestamp <= TIMESTAMP '$freeze_date'\";\n\n // this sub query returns the sla targets for the ta, language and month\n $sla_query =\n \"SELECT start_time, min(target) AS target, primary_frequency, secondary_frequency FROM sla\"\n .\" WHERE season = '$season'\".\" AND target_area = '$target_area'\"\n .\" AND valid_from <= '$stop_date'\"\n .\" AND(valid_to IS NULL OR valid_to >= '$start_date')\"\n .\" AND \\\"language\\\" = '$language'\"\n .\" GROUP BY start_time, primary_frequency, secondary_frequency\";\n\n // this sub query collects the obervations into the sla bins and finds the max score for each bin\n return\n \" SELECT s.start_time, target, o.\\\"date\\\", max(o.o) AS o\"\n .\" FROM($sla_query) AS s LEFT JOIN($obs_query) AS o\"\n .\" ON o.\\\"time\\\" BETWEEN s.start_time AND(s.start_time + '00:30:00'::interval)\"\n .\" WHERE (o.frequency = ANY(s.primary_frequency) OR o.frequency = ANY(s.secondary_frequency))\"\n .\" GROUP BY s.start_time, s.target, o.\\\"date\\\"\";\n}", "function getNonTaxable($month, $year, $emp_id){\n \t$sql = \"SELECT (pe_entry_amt+amm_amt)-(statutory_amt+pe_entry_deduct_amt+amm_deduct_amt) AS nontax\n\t\t\t\tFROM \n\t\t\t\t\n\t\t\t\t(SELECT COALESCE(sum(a.ppe_amount),0) as pe_entry_amt \n\t\t\t\tFROM payroll_paystub_entry a \n\t\t\t\tJOIN payroll_paystub_report b on (b.paystub_id=a.paystub_id) \n\t\t\t\tJOIN payroll_pay_period c on (c.payperiod_id=b.payperiod_id) \n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=b.emp_id)\n\t\t\t\tWHERE a.psa_id IN (select distinct a.psa_id \n\t\t\t\tFROM payroll_ps_account a \n\t\t\t\tJOIN payroll_paystub_entry b on (b.psa_id=a.psa_id) \n\t\t\t\tJOIN payroll_pay_stub c on (c.paystub_id=b.paystub_id) \n\t\t\t\tJOIN payroll_pay_period d on (d.payperiod_id=c.payperiod_id)\n\t\t\t\tJOIN payroll_paystub_report e on (e.paystub_id=b.paystub_id) \n\t\t\t\tWHERE a.psa_type=1 and a.psa_procode!=6 and e.emp_id='{$emp_id}' and d.payperiod_period = '{$month}' and d.payperiod_period_year = '{$year}' AND a.psa_tax=0) \n\t\t\t\tAND b.emp_id='{$emp_id}' AND c.payperiod_period = '{$month}' and c.payperiod_period_year = '{$year}') pe_entry_tbl,\n\t\t\t\t\n\t\t\t\t(select COALESCE(sum(a.amendemp_amount),0) as amm_amt \n\t\t\t\tFROM payroll_ps_amendemp a \n\t\t\t\tJOIN payroll_ps_amendment b on (b.psamend_id=a.psamend_id)\n\t\t\t\tJOIN payroll_pay_stub c on (c.paystub_id=a.paystub_id)\n\t\t\t\tJOIN payroll_pay_period d on (d.payperiod_id=c.payperiod_id)\n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=a.emp_id)\n\t\t\t\tWHERE b.psa_id IN (select distinct a.psa_id \n\t\t\t\tFROM payroll_ps_account a \n\t\t\t\tJOIN payroll_ps_amendment b on (b.psa_id=a.psa_id) \n\t\t\t\tJOIN payroll_ps_amendemp c on (c.psamend_id=b.psamend_id) \n\t\t\t\tJOIN payroll_pay_stub d on (d.paystub_id=c.paystub_id) \n\t\t\t\tJOIN payroll_pay_period e on (e.payperiod_id=d.payperiod_id) \n\t\t\t\tWHERE a.psa_type=1 and a.psa_procode!=6 and c.emp_id='{$emp_id}' and e.payperiod_period = '{$month}' and e.payperiod_period_year = '{$year}' AND a.psa_tax=0) \n\t\t\t\tAND a.emp_id='{$emp_id}' AND a.paystub_id!=0 AND d.payperiod_period = '{$month}' AND d.payperiod_period_year = '{$year}') amm_tbl,\n\t\t\t\t\n\t\t\t\t(SELECT COALESCE(sum(a.ppe_amount),0) as statutory_amt \n\t\t\t\tFROM payroll_paystub_entry a \n\t\t\t\tJOIN payroll_paystub_report b on (b.paystub_id=a.paystub_id) \n\t\t\t\tJOIN payroll_pay_period c on (c.payperiod_id=b.payperiod_id) \n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=b.emp_id)\n\t\t\t\tWHERE a.psa_id IN (7,14,15) \n\t\t\t\tAND b.emp_id='{$emp_id}' AND c.payperiod_period = '{$month}' and c.payperiod_period_year = '{$year}') statutory_tbl,\n\t\t\t\t\n\t\t\t\t(SELECT COALESCE(sum(a.ppe_amount),0) as pe_entry_deduct_amt \n\t\t\t\tFROM payroll_paystub_entry a \n\t\t\t\tJOIN payroll_paystub_report b on (b.paystub_id=a.paystub_id) \n\t\t\t\tJOIN payroll_pay_period c on (c.payperiod_id=b.payperiod_id) \n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=b.emp_id)\n\t\t\t\tWHERE a.psa_id IN (select distinct a.psa_id \n\t\t\t\tFROM payroll_ps_account a \n\t\t\t\tJOIN payroll_paystub_entry b on (b.psa_id=a.psa_id) \n\t\t\t\tJOIN payroll_pay_stub c on (c.paystub_id=b.paystub_id) \n\t\t\t\tJOIN payroll_pay_period d on (d.payperiod_id=c.payperiod_id)\n\t\t\t\tJOIN payroll_paystub_report e on (b.paystub_id=e.paystub_id)\n\t\t\t\tWHERE a.psa_type=2 and a.psa_procode!=6 and e.emp_id='{$emp_id}' and d.payperiod_period = '{$month}' and d.payperiod_period_year = '{$year}' AND a.psa_tax=1) \n\t\t\t\tAND b.emp_id='{$emp_id}' AND c.payperiod_period = '{$month}' and c.payperiod_period_year = '{$year}') pe_entry_deduct_tbl,\n\t\t\t\t\n\t\t\t\t(select COALESCE(sum(a.amendemp_amount),0) as amm_deduct_amt \n\t\t\t\tFROM payroll_ps_amendemp a \n\t\t\t\tJOIN payroll_ps_amendment b on (b.psamend_id=a.psamend_id)\n\t\t\t\tJOIN payroll_pay_stub c on (c.paystub_id=a.paystub_id)\n\t\t\t\tJOIN payroll_pay_period d on (d.payperiod_id=c.payperiod_id)\n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=a.emp_id)\n\t\t\t\tWHERE b.psa_id IN (select distinct a.psa_id \n\t\t\t\tFROM payroll_ps_account a \n\t\t\t\tJOIN payroll_ps_amendment b on (b.psa_id=a.psa_id) \n\t\t\t\tJOIN payroll_ps_amendemp c on (c.psamend_id=b.psamend_id) \n\t\t\t\tJOIN payroll_pay_stub d on (d.paystub_id=c.paystub_id) \n\t\t\t\tJOIN payroll_pay_period e on (e.payperiod_id=d.payperiod_id) \n\t\t\t\tWHERE a.psa_type=2 and a.psa_procode!=6 and c.emp_id='{$emp_id}' and e.payperiod_period = '{$month}' and e.payperiod_period_year = '{$year}' AND a.psa_tax=1) \n\t\t\t\tAND a.emp_id='{$emp_id}' AND a.paystub_id!=0 AND d.payperiod_period = '{$month}' AND d.payperiod_period_year = '{$year}') amm_deduct_tbl\";\n \t$rsResult = $this->conn->Execute($sql);\n \twhile(!$rsResult->EOF){\n \t\treturn $rsResult->fields['nontax'];\n \t}\n }", "public function calcMonths($overage = 0.00)\n {\n // Can't use standard add on FP numbers\n $tab = bcadd($this->allocation_amt, $overage, 2);\n $result = FeeCalendar::getPeriodsCovered($this->getLobCd(), $this->getRateClass(), $this->getStartDt(), $tab);\n $this->unalloc_remainder = $result['overage'];\n return $result['periods'];\n }", "public function getMonths();", "function calculatePrice($price, $discount){\n\t$DollarsOFF = $price * ($discount/100);\n\t$finalPrice = $price - $DollarsOFF;\n\treturn $finalPrice;\n}", "public function testGetSalaryDateForMonth($month, $year, $expected) \n {\n $actualDate = DateCalculator::getSalaryDateForMonth($month, $year);\n $this->assertSame(\n $expected,\n $actualDate->format('Y-m-d')\n );\n }", "public function getTwelveMonth() {\n $result = array();\n $cur = strtotime(date('Y-m-01', time()));\n for ($i = 0; $i <= 11; $i++) {\n $result[$i] = date('M', $cur);\n $cur = strtotime('next month', $cur);\n }\n\n return $result;\n }", "function _golfpass_cal_total_price($order)\n {\n $out_total_price = 0;\n $start_date = $order->start_date;\n $end_date = $order->end_date;\n $obj_start_date = date_create($start_date);\n $obj_end_date = date_create($end_date);\n $period = date_diff($obj_start_date, $obj_end_date)->days;\n $period += 1;\n $num_singleroom = $order->num_singleroom;\n //시작 날자 ~끝날자 * 인 === 총가격 변조 있는지 체크 시작\n $product =$this->db->where(\"id\",$order->product_id)->from(\"products\")->get()->row();\n if(true)\n {\n $config['groups']= $order->groups;\n $config['start_date']= $order->start_date;\n $config['end_date']= $order->end_date;\n $config['product_id']= $order->product_id;\n $config['num_people']= $order->num_people;\n $out_total_price += modules::run(\"golfpass/p_daily_price/_cal_by_group\",$config);\n }\n //옵션가격 추가시작\n foreach($order as $key=>$val)\n {\n $$key= $val;\n }\n \n // 총합계애 옵션가격더하기\n $this->load->model(\"product_option_model\");\n for($i=0; $i < count($options); $i++)\n {\n \n $option =$this->product_option_model->_get($options[$i]);\n $option_name = $option->name;\n\n for($j=0;$j<count($groups);$j++)\n {\n \n $row=$this->db->select(\"*\")\n ->where(\"product_id\",$product_id)\n ->where(\"kind\",\"main_option\")\n ->where(\"name\",$option_name)\n ->where(\"option_1\",$groups[$j])\n ->from(\"product_option\")->get()->row();\n $out_total_price += (int)$row->price*(int)$groups[$j];\n }\n }\n \n \n \n \n \n //홀추가 가격 더하기\n if($hole_option_id !== null && $hole_option_id !== \"\"){\n $this->load->library(\"date\");\n $result =$this->date->number_of_days($start_date,$end_date);\n $num_workingdays= $result->num_workingdays;\n $num_weekenddays= $result->num_weekenddays;\n\n if($num_workingdays === 1)\n {\n $day = \"work_day\";\n }\n else if($num_weekenddays ===1)\n {\n $day =\"week_day\";\n }\n $hole_option_name = $this->product_option_model->_get($hole_option_id)->name;\n for($i=0;$i<count($groups);$i++)\n {\n \n $row=$this->db->select(\"*\")\n ->where(\"product_id\",$product_id)\n ->where(\"kind\",\"hole_option\")\n ->where(\"name\",$hole_option_name)\n ->where(\"option_1\",$groups[$i])\n ->where(\"option_2\",$day)\n ->from(\"product_option\")->get()->row();\n $out_total_price +=(int)$row->price*(int)$groups[$i];\n }\n // $hole_option_price = $this->product_option_model->_get($hole_option_id)->price;\n // $added_hole_price = $hole_option_price * $num_people;\n // $out_total_price += $added_hole_price;\n }\n \n //싱글룸 가격 더하기\n $this->load->model(\"products_model\");\n \n if($num_singleroom !== null && $num_singleroom !== \"\"){\n $singleroom_price = $this->products_model->_get($product_id)->singleroom_price;\n $out_total_price += $singleroom_price * $num_singleroom *($period -1);\n }\n return $out_total_price;\n //옵션가격 추가끝\n\n\n }", "public static function get_total_price_remain($repair_staff_id, $month, $year)\n\t{\n\t\t$month = $month < 10 ? '0'.$month : $month;\n\t\t$past_date = date(\"Y-m-d\", strtotime(\"first day of last month\"));\n\t\t$last_month = date('m', strtotime($past_date));\n\n\t\t//if is last month\n\t\tif($month == $last_month)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\t$query = DB::select(DB::expr(\"SUM(price) as total\"))\n\t\t\t\t->from(self::$_table_name)\n\t\t\t\t->where('repair_staff_id', $repair_staff_id)\n\t\t\t\t->where(DB::expr(\"DATE_FORMAT(arrival_time,'%Y-%m-%d') > '\".date('Y-m-d').\"' AND DATE_FORMAT(arrival_time,'%Y-%m-%d') <= '\".date('Y-m-t').\"'\"));\n\n\t\t$result = $query->execute()->as_array();\n\t\tif($result[0]['total'])\n\t\t{\n\t\t\treturn $result[0]['total'];\n\t\t}\n\n\t\treturn 0;\n\t}", "function lab_payment_calculation($appliaction)\n{\n\tif ($appliaction->application_type == 1) {\n\t\t$payment_array['form_chargis'] = 200;\n\t\t$payment_array['registration_chargis'] = 500;\n\t\t$payment_array['renual_charges'] = 250*2;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['registration_chargis'] + $payment_array['renual_charges'];\n\t} else {\n\t\t$peneltyOnTotalMonth = getDiffrentBetweenTwoDatesInMonth($appliaction->date_of_expiry_certificate,date('Y-m-d'));\n\t\t$payment_array['form_chargis'] = 100;\n\t\t$payment_array['registration_chargis'] = 250*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['registration_chargis'];\n\t}\n\treturn json_decode(json_encode($payment_array));\n}", "public function viewMonthlyRpt()\n {\n return view('Activities.Reports.monthlyRpt(PNL)');\n }", "public function shopSaleM( $val, $itm ) {\n\t\t$proc = 0;\n\t\t//if( $vip == false ) {\n\t\t//\t$proc = 10;\t\n\t\t//}\t\t\t\n\t\t$val = round(($val/100*(100-$proc)),2);\n\t\treturn $val;\n\t}", "public function getPeriod($data,$date2 = null){\n\n if($date2 != null){\n\n $firstDay = $data;\n $lastDay = $date2;\n $periodos[0] = \"$data,$date2\";\n $dataMax = strtotime($date2);\n }else{\n # Get first day of month\n $firstDay = date(\"j-n-Y\",strtotime($data));\n # Get last day of month\n $lastDay = date(\"t-n-Y\",strtotime($data));\n # First period\n $periodos[0] = $firstDay.','.$lastDay;\n #Define the last date\n $dataMax = strtotime($lastDay);\n }\n\n $z = 1;\n\n $current=0;\n # Get first month\n $month = date(\"n\",strtotime($data));\n # Get first year\n $year = date(\"Y\", strtotime($data));\n # While the current date is less than max date, then continue\n while($current <= $dataMax){\n # Get next month\n $month = $month+1;\n # First date's period\n $p1 = \"1-$month-$year\"; //2014-02-01\n # Last day of date's period\n $p2D = date(\"t\",strtotime($p1)); // 28\n # Get second date's period\n $p2 = \"$p2D-$month-$year\";\n #\n $limit1 = strtotime($p1);\n # Check if first date of this period is bigger than max date\n if( $limit1 >= $dataMax){\n break;\n }\n $periodos[$z] = \"$p1,$p2\";\n if($month >= 12)\n {\n $month = 0;\n $year = $year+1;\n }\n\n $current = strtotime($p2);\n if($current >= $dataMax)\n {\n $p2 = date(\"j-n-Y\",$dataMax);\n $periodos[$z] = \"$p1,$p2\";\n break;\n }\n ++$z;\n\n }\n\n return $periodos;\n // $x = 0;\n\n // # Get current month\n // $mon = date(\"m\",strtotime($data));\n // # Get current year\n // $year = date(\"Y\",strtotime($data));\n // # Get periods previous\n // for($i=1;$i < 7;$i++){\n // # Changes of year\n // if($mon-1 == 0){$mon = 12;$year -= 1;}\n // else{--$mon;}\n\n // # Get first day of month\n // $ini = \"1-$mon-$year\";\n // # Get last day of month\n // $end = date(\"t-n-Y\",strtotime($ini));\n // # Get Period\n // $periodos[$i] = \"$ini,$end\";\n // }\n // # Set period\n // $this->periodos = $periodos;\n // # Return period\n // return $periodos;\n }", "protected function calculatePeriods()\n {\n foreach ($this->periods as $period) {\n if ($this->isPeriodAssociatedToBooking($period)) {\n // If this period was already associated to the booking, then we will\n // have to use the pricing at the point when the booking was created\n // for the calculation.\n\n $total = $this->getBookingPeriodPricing($period) * $this->quantity;\n }\n else {\n // If it isn't we will use the period's latest pricing.\n\n $total = $period->pivot->unit_price * $this->quantity;\n }\n\n $this->periodsTotal += $total;\n\n $this->addCalculatedPeriod($period, $total);\n }\n }", "public function get_month_data($month = \"January\", $year = 2015){\n\t\t/* if($year==2015)\n\t\t$year = date('y'); */\n\t\t// echo date( 'F Y');\n\t\t$this->loadModel(\"Invoice.Invoice\");\n\t\t$this->loadModel(\"Transaction.Transaction\");\n\t\t$month_first_day = strtotime( 'first day of ' . $month.' '.$year);\n\t\t$month_last_day = strtotime( 'last day of ' . $month.' '.$year);\n\t\t// echo date('Y-m-d',$month_last_day);\n\t\t// $dt = new DateTime('first Monday of this month');\n\t\t$dt = new DateTime('first Monday of '.$month.' '.$year);\n\t\t// echo $dt->format('Y-m-d');\n\t\t$first_week_start = $dt->getTimestamp(); \n\t\t$week_last = $first_week_start;\n\t\t$this->Invoice->belongsTo = array('Client' => array('className'=>\"Usermgmt.Client\",'foreignKey'=>'client_id'));\n\t\t$this->Transaction->belongsTo = array('Invoice' => array('className'=>\"Invoice.Invoice\",'foreignKey'=>'invoice_id'));\n\t\t$this->Transaction->recursive = 2;\n\t\t$this->Transaction->Behaviors->load('Containable');\n\t\t\n\t\t$all_transactoins = array();\n\t\tfor($current =$month_first_day; ($week_last<$month_last_day && $week_last<time()); $week_last += (7*86400)){\n\t\t\t\n\t\t\t\t$transactions = $this->Transaction->find(\"all\",array(\"conditions\"=>array(\"UNIX_TIMESTAMP(STR_TO_DATE(Transaction.payment_date, '%m-%d-%Y')) >\"=>$current,\"UNIX_TIMESTAMP(STR_TO_DATE(Transaction.payment_date, '%m-%d-%Y')) <\"=>$week_last,'Transaction.status'=>1),'contain'=>array(\"Invoice\"=>array(\"fields\"=>array(\"title\",\"client_id\",\"payment\",\"tax\",\"total\")),\"Invoice.Client\"=>array(\"fields\"=>array(\"first_name\",\"last_name\"))),\"fields\"=>array(\"invoice_id\",\"payment_date\",\"method\")));\n\t\t\t\t\n\t\t\t\t$all_transactoins[date('m/d/Y',$current).'-'.date('m/d/Y',$week_last)] = $transactions;\n\t\t\t\t\n\t\t\t\t// pr($transactions); die;\n\t\t\t\n\t\t\t$current =$week_last;\n\t\t}\n\t\treturn $all_transactoins;\n\t\t\n\t}", "public function testYearlyByMonthLoop()\n {\n $this->parse(\n 'FREQ=YEARLY;INTERVAL=1;UNTIL=20120203T225959Z;BYMONTH=2;BYSETPOS=1;BYDAY=SU,MO,TU,WE,TH,FR,SA',\n '2012-01-01 15:45:00',\n [\n '2012-02-01 15:45:00',\n ],\n 'yearly', null, 1, new DateTime('2012-02-03 22:59:59'),\n '2012-01-29 23:00:00'\n );\n }", "public function checkFirstDate($blockedTimeSp, $propertyOverNightFee, $hourlyBasedSpecialPrice, $price, $totalHours, $month, $pIn) {\n $available = array ();\n /**\n * Make sure the $blockedTimeSp is not an empty\n */\n if (! empty ( $blockedTimeSp )) {\n $available [$month] [$pIn] = $propertyOverNightFee + $hourlyBasedSpecialPrice;\n } else {\n $available [$month] [$pIn] = $totalHours * $price + $propertyOverNightFee;\n }\n return $available;\n }", "public function addMonths($month){\n\t\t$month = abs($month);\n\t\tif($this->_month+$month>12){\n\t\t\t$year = ceil(($month+$this->_month)/12) - 1;\n\t\t\t$this->_month = ($year * 12) - $this->_month + $month;\n\t\t\t$this->_year+= $year;\n\t\t} else {\n\t\t\t$this->_month+=$month;\n\t\t}\n\t\tif($this->_day>30||($this->_day>28&&$this->_month==2)){\n\t\t\t$this->_day = substr(self::getLastDayOfMonth($this->_month, $this->_year),-2);\n\t\t}\n\t\t$this->_consolideDate();\n\t\treturn $this->_date;\n\t}", "public static function paymentsForMonth($yearMonth)\n {\n $Paid = Invoice::find_by_sql(\"SELECT \n SUM(`sum`) as summary\n FROM\n ((SELECT \n SUM(`sum`) AS `sum`\n FROM\n invoices\n WHERE\n `status` = 'Paid' \n AND \n `paid` = '0' \n AND \n paid_date BETWEEN '$yearMonth-01' AND '$yearMonth-31'\n Group By \n `sum`\n ) \n UNION ALL (SELECT \n SUM(T3.`amount`) AS `sum`\n FROM\n invoice_has_payments AS T3\n LEFT JOIN\n invoices AS T4\n ON \n T3.invoice_id = T4.id \n WHERE \n (T4.`status` = 'PartiallyPaid' OR (T4.`status` = 'Paid' AND T4.`paid` != '0'))\n AND \n T3.`date` BETWEEN '$yearMonth-01' AND '$yearMonth-31' \n GROUP BY \n `sum`\n ) ) t1\n \");\n\n return $Paid[0]->summary;\n }", "public function export_sales_monthwise(){\n $tenant_id = $this->tenant_id;\n $yearVal = $this->input->get('yearVal');\n $monthVal = $this->input->get('monthVal');\n $result = $this->reportsModel->salessummary_monthwise($tenant_id,$yearVal,$monthVal);\n $this->load->helper('export_helper');\n export_tms_report_sales_monthwise($result);\n }", "function _erpal_projects_helper_get_timetracking_price_of_billable($nid, $check_permissions=true) {\n \n //we dont call this if projects billable module is not enabled\n if (!module_exists('erpal_projects_billable')) \n return false;\n \n $billables = _billable_get_billables_by_subject(array($nid));\n\n if ($check_permissions && !user_access('field view pricing')) {\n return false;\n }\n\n $sum = 0;\n foreach ($billables as $billable_id) {\n $billable = billable_load($billable_id);\n\n //we add only price form billables where the contractor is the own company, because if a freelancer tracked time, there will also be a billable where the freelancer is the contractor.\n $contractor_nid = $billable->contractor_nid;\n $own_company_nid = _erpal_basic_helper_get_own_company_nid(false);\n if ($contractor_nid != $own_company_nid)\n continue;\n\n $sum += $billable->total_price_no_vat;\n }\n\n return $sum;\n}", "public function monthlyReport($year, $month){\n\t\t$result = collect();\n\t\tforeach(Employee::getActiveEmployee(true, $year, $month) as $employee){\n\t\t\t$result->put($employee->nip, $employee->getAttendanceSummaryByMonth($year, $month));\n\t\t}\n\t\t\n\t\t$return = collect();\n\t\t$returnCount = $result->count();\n\t\tforeach($this->resutlKeys as $key){\n\t\t\t$val = collect($result->map(function($summary) use($key, $returnCount) {\n\t\t\t\t\t\treturn isset($summary[$key])? $summary[$key] : 0;\n\t\t\t\t\t}))->sum();\n\t\t\t$return->put($key, $val);\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "public function getBookingCountsByMonth(ProductModel $product, int $month, int $year)\n {\n $firstDay = mktime(0, 0, 0, $month, 1, $year);\n $monthDays = date('t', mktime(0, 0, 0, $month, 1, $year));\n $lastDay = mktime(23, 59, 59, $month, $monthDays, $year);\n\n $bookingList = [];\n $bookingList['booked'] = $bookingList['blocked'] = $bookingList['reserved'] = array_fill(1, $monthDays, 0);\n $items = $this->getBookedItemsInTimeRange($product, $firstDay, $lastDay);\n if (!$items) {\n return $bookingList;\n }\n foreach ($items as $item) {\n $range = $this->getRange($item->bookingStart, $item->bookingStop, $product->bookingBlock ?: 0);\n $startDay = date('j', $item->bookingStart);\n $endDay = date('j', $item->bookingStop);\n foreach ($range as $tstamp) {\n if ($year == date('Y', $tstamp) && ($month == date('n', $tstamp))) {\n $selectedDay = date('j', $tstamp);\n if ($selectedDay < $startDay || $selectedDay > $endDay) {\n ++$bookingList['blocked'][$selectedDay];\n continue;\n }\n ++$bookingList['booked'][$selectedDay];\n }\n }\n }\n $reservedDates = $this->getReservedDates($product);\n foreach ($reservedDates as $reserved) {\n foreach ($reserved as $tstamp) {\n if ($year == date('Y', $tstamp) && ($month == date('n', $tstamp))) {\n ++$bookingList['reserved'][date('j', $tstamp)];\n }\n }\n }\n\n return $bookingList;\n }", "public function monthlyTurnoverTotals($month, $year, $currency = \"EUR\")\n {\n if ($month == \"\" || !is_numeric($month))\n throw new Exception('Please enter a valid month');\n if ($year == \"\" || !is_numeric($year))\n throw new Exception('Please enter a valid year');\n\n $obj = new stdClass();\n\n // Must be in specific order for checksum ------\n $obj->Timestamp = $this->getTimeStamp();\n $obj->SessionID = $this->getSessionID();\n $obj->ReportingPinCode = $this->getPinCode();\n $obj->UserAgent = $this->getUserAgent();\n $obj->MerchantID = $this->getMerchantID();\n $obj->CurrencyCode = $currency;\n $obj->Year = $year;\n $obj->Month = $month;\n // ---------------------------------------------\n // Generate Checksum\n $obj->Checksum = $this->generateChecksum($obj);\n\n // PinCode only used for the Checksum\n unset($obj->PinCode);\n\n // Ask for MonthlyTurnoverTotals and get response\n $result = $this->client->MonthlyTurnoverTotals($obj);\n $result = $result->MonthlyTurnoverTotalsResult;\n $dayStats = $result->Days->DayStatistics;\n\n $obj->Timestamp = $result->Timestamp;\n\n // Assign all properties of the DayStatistics object as property of mainObject\n $obj = $this->parseForChecksum($obj, $dayStats, true, array(\"Year\", \"Month\", \"Day\", \"Duration\", \"TransactionsCount\", \"Turnover\"));\n\n // Unset properties for new Checksum\n unset($obj->MerchantID, $obj->Checksum);\n\n // Verify response data by making a new Checksum\n $Checksum = $this->generateChecksum($obj);\n\n // Compare Checksums\n if ($result->Checksum != $Checksum)\n throw new Exception('Data could not be verified');\n\n return (array) $dayStats;\n }", "public function nextMonth(): Month{\n $month = $this->month +1;\n $year=$this->year;\n if($month > 12){\n $month = 1;\n $year += 1;\n }\n return new Month($month, $year);\n }", "public function monthlyConsumption(Request $request){\n $year = date('Y');\n //List all registered ModBus Gateway\n $gateway = Gateway::where('MANUFACTURER_ID',2)->get();\n //Loop all registered ModBus Gateway\n foreach ($gateway as $modBusIP) {\n $gatewayID = $modBusIP->GATEWAY_ID;\n $floorID = $modBusIP->FLOOR_ID;\n //List all registered Electric Meters in a modbus gateway\n $meters = ElectricMeter::where('GATEWAY_ID',$gatewayID)\n ->where('REG_FLAG',1)->get();\n $months = [];\n //Loop 12times (January to December)\n for($i=1;$i<=12; $i++){\n $perMonthData = 0;\n // Get data of each electric meter per month\n foreach ($meters as $meter) {\n $meterID = $meter->SLAVE_ID;\n //Get the latest reading of electric meter in current month iteration\n $res = EMeterData::where('METER_ID', $meterID)\n ->whereMonth('CREATED_AT', '=', $i)\n ->whereYear('CREATED_AT', '=', $year)\n ->latest()->first();\n if(!empty($res) || $res == !null ){\n //Sum of electric meters\n $perMonthData += $res->CURRENT_MONTH_KWH;\n $perMonthData = round($perMonthData, 4);\n }\n }\n //Random floating number of 1.00 to 10.00 for no month data\n if($perMonthData == 0){\n // $perMonthData = number_format((float)(1 + mt_rand() / mt_getrandmax() * (10 - 1)), 2, '.', '');\n }\n $json = array('months' => substr(date('F', mktime(0, 0, 0,\n $i, 1)),0,3), 'floor_data' => $perMonthData);\n array_push($months, $json);\n }\n return $months;\n }\n }", "public function calculatePayment()\n {\n }", "function getDays_ym($month, $year){\n // Start of Month\n $start = new DateTime(\"{$year}-{$month}-01\");\n $month = $start->format('F');\n\n // Prepare results array\n $results = array();\n\n // While same month\n while($start->format('F') == $month){\n // Add to array\n $day = $start->format('D');\n $sort_date = $start->format('j');\n $date = $start->format('Y-m-d');\n $results[$date] = ['day' => $day,'sort_date' => $sort_date,'date' => $date];\n\n // Next Day\n $start->add(new DateInterval(\"P1D\"));\n }\n // Return results\n return $results;\n}", "public function cal_sell_price_by_price_break(){\n\t\t$price_break = $this->price_break_from_to;\n\t\tif(!isset($price_break['sell_price_plus']))\n\t\t\t$price_break['sell_price_plus'] = 0;\n\t\t//Dò trong bảng company_price_break trước\n\t\tif(isset($price_break['company_price_break']) && is_array($price_break['company_price_break']) && count($price_break['company_price_break'])>0){\n\n\t\t\t$price_break['company_price_break'] = $this->aasort($price_break['company_price_break'],'range_from');\n\n\t\t\tforeach($price_break['company_price_break'] as $keys=>$value){\n\t\t\t\tif($this->arr_product_items['adj_qty']<=(float)$value['range_to'] && $this->arr_product_items['adj_qty']>=(float)$value['range_from']){\n\t\t\t\t\t//neu thoa dieu kien\n\t\t\t\t\tif(!isset($value['unit_price']))\n\t\t\t\t\t\t$value['unit_price'] = 0;\n\t\t\t\t\t$this->arr_product_items['sell_price'] = (float)$value['unit_price'] + (float)$price_break['sell_price_plus'];\n\t\t\t\t\t$this->price_break_from_to = $price_break; //luu lai bang price_break da sort\n\t\t\t\t\treturn 'company_price_break';\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\n\t\t//Nếu không có trong company_price_break thì tìm trong product_price_break\n\t\tif(isset($price_break['product_price_break']) && is_array($price_break['product_price_break']) && count($price_break['product_price_break'])>0){\n\t\t\t$price_break['product_price_break'] = $this->aasort($price_break['product_price_break'],'range_from');\n\t\t\tforeach($price_break['product_price_break'] as $keys=>$value){\n\t\t\t\tif($this->arr_product_items['adj_qty']<=(float)$value['range_to'] && $this->arr_product_items['adj_qty']>=(float)$value['range_from']){\n\t\t\t\t\t//neu thoa dieu kien\n\t\t\t\t\tif(!isset($value['unit_price']))\n\t\t\t\t\t\t$value['unit_price'] = 0;\n\t\t\t\t\t$this->arr_product_items['sell_price'] = (float)$value['unit_price'] + (float)$price_break['sell_price_plus'];\n\t\t\t\t\t$this->discount(); //và tính discount\n\t\t\t\t\t$this->price_break_from_to = $price_break; //luu lai bang price_break da sort\n\t\t\t\t\treturn 'product_price_break';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t//Ngược lại thì lấy sell_price trong price_break_from_to\n\t\tif(isset($price_break['sell_price'])){\n\t\t\t$this->arr_product_items['sell_price'] = (float)$price_break['sell_price'];\n\t\t\t$this->discount();//và tính discount\n\t\t\treturn 'sell_price';\n\t\t}\n\n\n\n\t}" ]
[ "0.6315765", "0.6140269", "0.6086709", "0.5895955", "0.5737585", "0.57263523", "0.5637207", "0.5632779", "0.5547676", "0.5388719", "0.53816485", "0.5379543", "0.5372904", "0.5358155", "0.5324431", "0.5285788", "0.5230145", "0.52122", "0.52066183", "0.51939476", "0.51776093", "0.51673067", "0.5109337", "0.5090706", "0.50899917", "0.50629514", "0.50343907", "0.50227445", "0.5021601", "0.4998293", "0.49891278", "0.49885756", "0.49749094", "0.49707553", "0.49704432", "0.49658585", "0.49631616", "0.49564812", "0.49537683", "0.49513677", "0.49453112", "0.4943901", "0.4931717", "0.49264553", "0.4922529", "0.49185136", "0.48932517", "0.48746717", "0.48651052", "0.4858511", "0.4856667", "0.4855732", "0.48429915", "0.4842654", "0.48388463", "0.48370576", "0.48369884", "0.4829011", "0.48282868", "0.48248875", "0.4822446", "0.48215318", "0.48178098", "0.48103753", "0.48095557", "0.4808607", "0.48074296", "0.48042408", "0.48033175", "0.4800371", "0.48001355", "0.47959086", "0.4793165", "0.479047", "0.4789092", "0.47883496", "0.47849566", "0.4783782", "0.4783474", "0.47773483", "0.47687337", "0.47671902", "0.4763935", "0.4761295", "0.47480145", "0.47461182", "0.47438115", "0.47345924", "0.47302985", "0.47284093", "0.47282642", "0.4722805", "0.47205576", "0.47189596", "0.4705745", "0.47026098", "0.47008777", "0.47006848", "0.46974534", "0.46958295" ]
0.5206779
18
Convert to an array suitable for use with json_encode().
public function toJson(): array { return [ 'title' => $this->getTitle(), 'description' => $this->getDescription(), 'price' => $this->formatPrice(), 'discount' => $this->formatDiscount(), ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function asArray(): array\n {\n return json_decode($this->result, true);\n }", "abstract public function to_array();", "public function toArray()\n\t{\n\t\treturn (array) json_decode($this->json);\n\t}", "private function arrayify(): array\n {\n return $this->toArray();\n }", "public function getAsArray(): array\n {\n return \\GuzzleHttp\\json_decode(\\GuzzleHttp\\json_encode($this->values), true);\n }", "protected function asArray()\n\t{\n\t\treturn \\json_decode($this->response, true);\n\t}", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function getAsArray();", "public function jsonSerialize(): array;", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray()\n {\n $_data = array();\n \n foreach ($this->_data as $key=>$val) {\n $_data[$key] = method_exists($val, 'toArray') ? $val->toArray() : $val;\n }\n \n return $_data;\n }", "public function jsonSerialize(): array\n {\n return array_map(function ($value) {\n if ($value instanceof JsonSerializable) {\n return $value->jsonSerialize();\n } elseif ($value instanceof Arrayable) {\n return $value->toArray();\n }\n \n return $value;\n }, $this->all());\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function toArray()\n {\n return array_values(\n array_filter(\n $this->jsonSerialize()\n )\n );\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;" ]
[ "0.7846992", "0.7648737", "0.76342577", "0.76055664", "0.75912386", "0.7551858", "0.7534978", "0.7534978", "0.7534978", "0.7534978", "0.7534978", "0.7534978", "0.74430573", "0.74103224", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.73907655", "0.7378768", "0.73588777", "0.73253995", "0.73253995", "0.73253995", "0.73253995", "0.73253995", "0.7281082", "0.7280903", "0.7280903", "0.7280903", "0.7280903", "0.72807044", "0.72807044", "0.72807044", "0.72807044", "0.72807044", "0.72807044", "0.72807044", "0.72807044", "0.72807044", "0.72807044", "0.7279198", "0.7279198", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605", "0.72755605" ]
0.0
-1
Replace HTML newlines with regular space characters.
protected function replaceBrs(string $input): string { return str_replace(['<br>', '<br/>'], ' ', $input); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cropHtmlWorksWithLinebreaks() {}", "function formatHTML($s) {\n return str_replace('\\n',\"\\n\",$s);\n}", "function formatHTML($s) {\n return str_replace('\\n',\"\\n\",$s);\n}", "function fix_newlines($text) {\n\n#return str_replace('&#xD;', '', $text);\nreturn str_replace(\"\\r\", \"\", $text);\n\n}", "function br2nl($html){\r\n\t\t$nl = preg_replace('#<br\\s*/?>#i', \"\\n\", $html);\r\n\t\treturn $nl;\r\n\t}", "function formathtml($text){\n $text=stripslashes($text);\n $text=str_replace(\"\\r\\n\",\"<BR>\\n\",$text);\n $text=str_replace(\"\\n\",\"<BR>\\n\",$text);\n //$text=\"<html><body>\".$text.\"</body></html>\";\nreturn $text;\n}", "function br2nl( $input ) {\n return preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $input);\n}", "function nl2br2($content){\n $content = stripslashes(str_replace(\"\\\\r\\\\n\", \"<br>\", $content));\n return $content;\n}", "function removelinebreaks($str) {\n $str = str_replace(\"\\r\", '', str_replace(\"\\n\", '', $str));\n //$str = str_ireplace(\"&lt;br /&gt;\", \"<br />\");\n return $str;\n }", "public static function remove_html_breaks(string $str, string $replacement = ''): string\n {\n return (string) \\preg_replace(\"#/\\r\\n|\\r|\\n|<br.*/?>#isU\", $replacement, $str);\n }", "static function formatText($text){\n return str_replace(\"\\n\",'<br>',htmlspecialchars($text));\n }", "function nl2br2( $text )\n{\n $text = str_replace( array( '\\r\\n', '\\r', '\\n'), '<br />', $text ) ;\n return $text ;\n}", "function pun_linebreaks2($str)\r\n{\r\n\treturn str_replace(\"\\r\", \"\\n\", str_replace(\"\\r\\n\", \"<br>\", $str));\r\n}", "function mc_newline_replace( $string ) {\n\n\treturn (string) str_replace( array( \"\\r\", \"\\r\\n\", \"\\n\" ), '', $string );\n}", "function g()\r\n\t{\r\n\t\t$this->str_html = str_replace(array(\"\\r\\n\",\"\\n\",\"\\r\",\"\\t\"), ' ', $this->str_html);\r\n\t\t$this->str_html = preg_replace(\"/(\\s{2,})/\", ' ', $this->str_html);\r\n\t\treturn $this->replace_vars($this->str_html, $this->html_a, 1);\r\n#\t\treturn $this->str_html;\r\n\t}", "public static function stripNL($value){\n return preg_replace('/[\\r\\n]+/', ' ', $value);\n }", "private function makeLineBreaksHTML(): void {\n\t\t$this->setMsg(str_replace([PHP_EOL, '\\r\\n'], '<br />', $this->getMsg()));\n\n\t\tif($this->getMaxLineLength()) {\n\t\t\t$this->setMsg(wordwrap($this->getMsg(), $this->getMaxLineLength(), '<br />' . PHP_EOL));\n\t\t}\n\t}", "function __replaceWithNewlines() {\n\t\t$args = func_get_args();\n\t\t$numLineBreaks = count(explode(\"\\n\", $args[0][0]));\n\t\treturn str_pad('', $numLineBreaks - 1, \"\\n\");\n\t}", "function sloodle_strip_new_lines($data) {\n $data=str_replace(\"\\r\",\"\",$data);\n $data=str_replace(\"\\n\",\"\",$data); \n return $data;\n }", "function newline2br($txt){\n\n $texto0= ereg_replace(\"(\\r)\",'<br/>',$txt);\n $texto = ereg_replace(\"(\\n)\",'',$texto0);\n $txt = ereg_replace(\"/(<br\\s*\\/?>\\s*)+/\",'<br/>',$texto);\n\n return $txt;\n\n }", "public static function stripWhitespace($html){\n\t\t$replace = array(\n\t\t\tarray(\"this\"=>\"\\n\", \"that\"=>\" \"),\n\t\t\tarray(\"this\"=>\"\\r\", \"that\"=>\" \"),\n\t\t\tarray(\"this\"=>\"\\t\", \"that\"=>\" \"),\n\t\t\tarray(\"this\"=>\" \", \"that\"=>\" \")\n\t\t);\n\t\tforeach($replace as $r) while(strpos($html,$r['this'])!==false) $html = str_replace($r['this'], $r['that'], $html);\n\t\treturn $html;\n\t}", "function &nl2Br( $text ) {\n $text = preg_replace( \"/(\\015\\012)|(\\015)|(\\012)/\", \"<br />\", $text );\n return $text;\n }", "function fix_quotes($string, $new_lines = true)\n{\n\tif ($new_lines)\n\t{\n\t\treturn strtr(htmlspecialchars($string, ENT_QUOTES), array(\"\\n\" => '<br />'));\n\t}\n\n\treturn htmlspecialchars($string);\n}", "function textAreaNewlinesToSimpleNewline($string)\n {\n $string = str_replace([\"\\n\", \"\\r\\n\", \"\\r\"],\"\\n\",$string);\n return $string;\n }", "function remove_junk($str){\n $str = nl2br($str);\n $str = htmlspecialchars(strip_tags($str, ENT_QUOTES));\n return $str;\n}", "function strReformat($str){\r\n\t$str = str_replace(\"\\r\\n\",HTTP_CRLF,$str);\r\n\t$str = str_replace(\"<br>\",HTTP_CRLF,$str);\r\n\t$str = strip_tags($str);\r\n\t\r\n\treturn $str;\r\n}", "function br2nl ( $string )\r\n{\r\n return preg_replace('/\\<br(\\s*)?\\/?\\>/i', PHP_EOL, $string);\r\n}", "private static function html() : string\n {\n return '<(.|\\n)*?>';\n }", "function strip_html_tags( $text )\r\n{\r\n $text = preg_replace(\r\n array(\r\n // Remove invisible content\r\n '@<head[^>]*?>.*?</head>@siu',\r\n '@<style[^>]*?>.*?</style>@siu',\r\n '@<script[^>]*?.*?</script>@siu',\r\n '@<object[^>]*?.*?</object>@siu',\r\n '@<embed[^>]*?.*?</embed>@siu',\r\n '@<applet[^>]*?.*?</applet>@siu',\r\n '@<noframes[^>]*?.*?</noframes>@siu',\r\n '@<noscript[^>]*?.*?</noscript>@siu',\r\n '@<noembed[^>]*?.*?</noembed>@siu',\r\n // Add line breaks before and after blocks\r\n '@</?((address)|(blockquote)|(center)|(del))@iu',\r\n '@</?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))@iu',\r\n '@</?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))@iu',\r\n '@</?((table)|(th)|(td)|(caption))@iu',\r\n '@</?((form)|(button)|(fieldset)|(legend)|(input))@iu',\r\n '@</?((label)|(select)|(optgroup)|(option)|(textarea))@iu',\r\n '@</?((frameset)|(frame)|(iframe))@iu',\r\n ),\r\n array(\r\n ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',\r\n $nl.\"\\$0\", $nl.\"\\$0\", $nl.\"\\$0\", $nl.\"\\$0\", $nl.\"\\$0\", $nl.\"\\$0\",\r\n $nl.\"\\$0\", $nl.\"\\$0\",\r\n ),\r\n $text );\r\n return strip_tags( $text );\r\n}", "function string_restore_valid_html_tags( $p_string, $p_multiline = true ) \r\n{\r\n\t$t_html_valid_tags = config_get( $p_multiline ? 'html_valid_tags' : 'html_valid_tags_single_line' );\r\n\r\n\tif ( OFF === $t_html_valid_tags || is_blank( $t_html_valid_tags ) ) {\r\n\t\treturn $p_string;\r\n\t}\r\n\r\n\t$tags = explode( ',', $t_html_valid_tags );\r\n\tforeach ($tags as $key => $value) \r\n\t{ \r\n \tif ( !is_blank( $value ) ) {\r\n \t$tags[$key] = trim($value); \r\n }\r\n }\r\n $tags = implode( '|', $tags);\r\n\r\n\t$p_string = preg_replace( '/&lt;(' . $tags . ')\\s*&gt;/ui', '<\\\\1>', $p_string );\r\n\t$p_string = preg_replace( '/&lt;\\/(' . $tags . ')\\s*&gt;/ui', '</\\\\1>', $p_string );\r\n\t$p_string = preg_replace( '/&lt;(' . $tags . ')\\s*\\/&gt;/ui', '<\\\\1 />', $p_string );\r\n\r\n\r\n\treturn $p_string;\r\n}", "function br2nl($string){\n\treturn preg_replace('/\\<br(\\s*)?\\/?\\>/i', \"\\n\", $string);\n}", "function convertlinebreaks ($str) {\r\n return preg_replace (\"/\\015\\012|\\015|\\012/\", \"\\n\", $str);\r\n}", "static function convert_html_breaks($html){\n\n\t// Convert break elements to newline elements (\\n)\n\t\t$converted = preg_replace(\"/<br[\\/\\s]*>/i\", \"\\n\", $html);\n\n\t// Convert paragraph elements to markdown paragraph elements (\\n\\n)\n\t\tif( preg_replace(\"/<p[^>]*>/i\", \"\\n\\n\", $converted) ) {\n\t\t\t$converted = preg_replace(\"/<\\/p>/i\", \"\\n\", $converted);\n\t\t}\n\t\treturn $converted;\n\t}", "public static function normalize_newlines( $str ) {\n\t\treturn preg_replace( '/(\\r\\n|\\r|\\n)/', \"\\n\", $str );\n\t}", "function text_tidy($txt = \"\") {\n \n \t$trans = get_html_translation_table(HTML_ENTITIES);\n \t$trans = array_flip($trans);\n \t\n \t$txt = strtr( $txt, $trans );\n \t\n \t$txt = preg_replace( \"/\\s{2}/\" , \"&nbsp; \" , $txt );\n \t$txt = preg_replace( \"/\\r/\" , \"\\n\" , $txt );\n \t$txt = preg_replace( \"/\\t/\" , \"&nbsp;&nbsp;\" , $txt );\n \t//$txt = preg_replace( \"/\\\\n/\" , \"&#92;n\" , $txt );\n \t\n \treturn $txt;\n }", "protected function _format_newlines($str)\n\t{\n\t\tif ($str === '' OR (strpos($str, \"\\n\") === FALSE && ! in_array($this->last_block_element, $this->inner_block_required)))\n\t\t{\n\t\t\treturn $str;\n\t\t}\n\n\t\t// Convert two consecutive newlines to paragraphs\n\t\t$str = str_replace(\"\\n\\n\", \"</p>\\n\\n<p>\", $str);\n\n\t\t// Convert single spaces to <br /> tags\n\t\t$str = preg_replace(\"/([^\\n])(\\n)([^\\n])/\", '\\\\1<br />\\\\2\\\\3', $str);\n\n\t\t// Wrap the whole enchilada in enclosing paragraphs\n\t\tif ($str !== \"\\n\")\n\t\t{\n\t\t\t// We trim off the right-side new line so that the closing </p> tag\n\t\t\t// will be positioned immediately following the string, matching\n\t\t\t// the behavior of the opening <p> tag\n\t\t\t$str = '<p>'.rtrim($str).'</p>';\n\t\t}\n\n\t\t// Remove empty paragraphs if they are on the first line, as this\n\t\t// is a potential unintended consequence of the previous code\n\t\treturn preg_replace('/<p><\\/p>(.*)/', '\\\\1', $str, 1);\n\t}", "function _autop_newline_preservation_helper( $matches ) {\n\t\t\treturn str_replace(\"\\n\", \"<WPPreserveNewline />\", $matches[0]);\n\t\t}", "function treat($text) {\n $s1 = str_replace(\"\\n\\r\", \"\\n\", $text);\n return str_replace(\"\\r\", \"\", $s1);\n}", "function my_br2nl($t=\"\")\n\t{\n\t\t$t = preg_replace( \"#(?:\\n|\\r)?<br />(?:\\n|\\r)?#\", \"\\n\", $t );\n\t\t$t = preg_replace( \"#(?:\\n|\\r)?<br>(?:\\n|\\r)?#\" , \"\\n\", $t );\n\t\t\n\t\treturn $t;\n\t}", "public function check_html_no_space($html) {\r\n\t\t$html = str_replace(array(\"\\r\", \"\\r\\n\", \"\\n\", \" \", \"\\t\"), '', $html);\r\n\t\treturn $html;\r\n\t}", "function my_br2nl($s_string)\r\n{\r\n\t$sRet=\"\";\r\n\t$sRet = str_replace(BR_STRING,NEWLINE_STRING,$s_string);\r\n\t\r\n \treturn $sRet;\r\n}", "private function removeNewLinesAndWhitespace($string, $replace = \" \")\n {\n return str_replace([\"\\n\\r\", \"\\n\\n\", \"\\n\", \"\\r\"], $replace, trim(strip_tags($string)));\n }", "public function test_gc_replace_in_html_tags( $input, $output ) {\n\t\treturn $this->assertSame( $output, gc_replace_in_html_tags( $input, array( \"\\n\" => ' ' ) ) );\n\t}", "function add_br(&$output)\n{\n\t$output = preg_replace(\"~\\n~\", \"<br />\\n\", $output);\n}", "public static function normalizeLineBreaks($text) {}", "function filterHTMLTags( $text )\n{\n $text = preg_replace(\n array(\n // Remove invisible content\n '@<head[^>]*?>.*?</head>@siu',\n '@<style[^>]*?>.*?</style>@siu',\n '@<script[^>]*?.*?</script>@siu',\n '@<object[^>]*?.*?</object>@siu',\n '@<embed[^>]*?.*?</embed>@siu',\n '@<applet[^>]*?.*?</applet>@siu',\n '@<noframes[^>]*?.*?</noframes>@siu',\n '@<noscript[^>]*?.*?</noscript>@siu',\n '@<noembed[^>]*?.*?</noembed>@siu',\n // Add line breaks before and after blocks\n '@</?((address)|(blockquote)|(center)|(del))@iu',\n '@</?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))@iu',\n '@</?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))@iu',\n '@</?((table)|(th)|(td)|(caption))@iu',\n '@</?((form)|(button)|(fieldset)|(legend)|(input))@iu',\n '@</?((label)|(select)|(optgroup)|(option)|(textarea))@iu',\n '@</?((frameset)|(frame)|(iframe))@iu',\n ),\n array(\n ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',\n \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\",\n \"\\n\\$0\", \"\\n\\$0\",\n ),\n $text );\n return strip_tags( $text );\n}", "function br2nl($str) {\n\t\t$str = str_replace(\"\\r\\n\", \"\\n\", $str);\n\t\t$str = str_replace(\"<br />\\n\", \"\\n\", $str);\n\t\treturn $str;\n\t}", "function br2nl($str)\n {\n return preg_replace('/\\<br\\s*\\/?\\>/i', \"\\r\\n\", $str);\n }", "public function _strip_newlines($html, $data, $url)\n {\n }", "function my_nl2br($s_string)\r\n{\r\n\t$sRet=\"\";\r\n\t$sRet = str_replace(NEWLINE_STRING,BR_STRING,$s_string);\r\n\r\n \treturn $sRet;\r\n}", "function convertText($b){\r\n\t\t$b = htmlspecialchars($b);\r\n\t\t$b = str_replace(\"\\011\", ' &nbsp;&nbsp;&nbsp;', str_replace(' ', ' &nbsp;', $b));\r\n\t\t$b = ereg_replace(\"((\\015\\012)|(\\015)|(\\012))\", '<br />', $b);\r\n\t\treturn $b;\r\n\t}", "private static function replaceLineBreaksInsideTagsForBr(string $text): string\n {\n $regex = '/<(p|a|strong|b|em|i|li|ins|h2|h3|h4|td)\\b(?:[^>]*)>[^<]*<\\/\\1>/m';\n\n preg_match_all($regex, $text, $matches, PREG_SET_ORDER, 0);\n\n foreach ($matches as $match) {\n $replaced = preg_replace('/\\r\\n|\\r|\\n/', '<br />', $match[0]);\n $text = str_replace($match[0], $replaced, $text);\n }\n\n return $text;\n }", "function entify_nonprinting_chars($text)\n{\n $text = str_replace(\"\\r\\n\", \"<br />\", $text);\n $text = str_replace(\"\\n\", \"<br />\", $text);\n $text = str_replace(\"\\r\", \"<br />\", $text); //unnecessary b/c of wordbreak, but included for completeness\n $text = str_replace(\"\\t\", \"&nbsp;&nbsp;&nbsp;&nbsp;\", $text);\n\n return $text;\n}", "function br2nl( $text )\n{\n $nl = '\\n' ; # new line character\n $text = str_replace( '<br />', $nl, $text ) ; # XHTML <br />\n $text = str_replace( '<br>', $nl, $text ) ; # HTML <br>\n $text = str_replace( '<br/>', $nl, $text ) ; # bad break!\n return $text ;\n /* reference (unsused)\n $cr = chr(13); // 0x0D [\\r] (carriage return)\n $lf = chr(10); // 0x0A [\\n] (line feed)\n $crlf = $cr . $lf; // [\\r\\n] carriage return/line feed)\n */\n}", "function text_filter($text)\r\n\t{\r\n\t\t$text = htmlspecialchars($text);\r\n\t\t$text = nl2br($text);\r\n\t\treturn $text;\r\n\t}", "public static function applyInitialSourceHtmlTransformations($html)\n {\n // Since <br>'s don't seem to be used in any of the actual table structures, we replace\n // them to avoid text being stuck together when tags are stripped from text content.\n $html = str_replace(['<br>'], [' '], $html);\n\n return $html;\n }", "public function FormatWYSIWYGHTML($HTML)\n\t{\n\n\t\tif(GetConfig('UseWYSIWYG')) {\n\t\t\treturn $HTML;\n\t\t}\n\t\telse {\n\t\t\t// We need to sanitise all the line feeds first to 'nl'\n\t\t\t$HTML = SanatiseStringToUnix($HTML);\n\n\t\t\t// Now we can use nl2br()\n\t\t\t$HTML = nl2br($HTML);\n\n\t\t\t// But we still need to strip out the new lines as nl2br doesn't really 'replace' the new lines, it just inserts <br />before it\n\t\t\t$HTML = str_replace(\"\\n\", \"\", $HTML);\n\n\t\t\t// Fix up new lines and block level elements.\n\t\t\t$HTML = preg_replace(\"#(</?(?:html|head|body|div|p|form|table|thead|tbody|tfoot|tr|td|th|ul|ol|li|div|p|blockquote|cite|hr)[^>]*>)\\s*<br />#i\", \"$1\", $HTML);\n\t\t\t$HTML = preg_replace(\"#(&nbsp;)+(</?(?:html|head|body|div|p|form|table|thead|tbody|tfoot|tr|td|th|ul|ol|li|div|p|blockquote|cite|hr)[^>]*>)#i\", \"$2\", $HTML);\n\t\t\treturn $HTML;\n\t\t}\n\t}", "function string_nl2br( $p_string, $p_wrap = 100 ) \r\n{\r\n\t\t$p_string = nl2br( $p_string );\r\n\r\n\t\t// fix up eols within <pre> tags\r\n\t\t$pre2 = array();\r\n\t\tpreg_match_all(\"/<pre[^>]*?>(.|\\n)*?<\\/pre>/\", $p_string, $pre1);\r\n\t\tfor ( $x = 0; $x < count($pre1[0]); $x++ ) \r\n\t\t{\r\n\t\t\t$pre2[$x] = preg_replace(\"/<br[^>]*?>/\", \"\", $pre1[0][$x]);\r\n\t\t\t// this may want to be replaced by html_entity_decode (or equivalent)\r\n\t\t\t// if other encoded characters are a problem\r\n\t\t\t$pre2[$x] = preg_replace(\"/&nbsp;/\", \" \", $pre2[$x]);\r\n\t\t\tif ( ON == config_get( 'wrap_in_preformatted_text' ) ) \r\n\t\t\t{\r\n\t\t\t\t$pre2[$x] = preg_replace(\"/([^\\n]{\".$p_wrap.\"})(?!<\\/pre>)/\", \"$1\\n\", $pre2[$x]);\r\n\t\t\t}\r\n\t\t\t$pre1[0][$x] = \"/\" . preg_quote($pre1[0][$x], \"/\") . \"/\";\r\n\t\t}\r\n\r\n\t\treturn preg_replace( $pre1[0], $pre2, $p_string );\r\n}", "function remove_junk($string){\n /*Inserta un salto de linea por linea*/\n $string = nl2br($string);\n /*Traduccion de comilla doble y etiquetas*/\n $string = htmlspecialchars(strip_tags($string, ENT_QUOTES));\n return $string;\n}", "function treat($text) {\n\t$s1 = str_replace(\"\\n\\r\", \"\\n\", $text);\n\treturn str_replace(\"\\r\", \"\", $s1);\n}", "function strip_nlEx($str)\n {\n return str_replace(\"\\n\", \"\", str_replace(\"\\r\", \"\", $str));\n }", "public function disableRemoveLineBreaksFromTemplate() {}", "public static function reduceDuplicateBr($html) {\n $html = preg_replace('#<br\\s*/?>(?:\\s*<br\\s*/?>)+#i', '<br />', $html);\n\n return $html;\n }", "public function testRenderNewlines() {\n\t\t$result = $this->View->render('newlines');\n\t\t$expected = \"There should be a newline about here: \\n\";\n\t\t$expected .= \"And this should be on the next line.\\n\";\n\t\t$expected .= \"\\n\";\n\t\t$expected .= \"There should be a single new line after this\\n\";\n\n\t\t$this->assertSame(\n\t\t\t$expected,\n\t\t\t$result,\n\t\t\t'Tags at the end of a line should not swallow new lines when rendered',\n\t\t);\n\t}", "public function testNewlines() {\n $this->assertEquals(\"Testing\\rCarriage\\rReturns\", Sanitize::newlines(\"Testing\\rCarriage\\r\\rReturns\"));\n $this->assertEquals(\"Testing\\r\\rCarriage\\rReturns\", Sanitize::newlines(\"Testing\\r\\rCarriage\\r\\r\\rReturns\", array('limit' => 3)));\n $this->assertEquals(\"TestingCarriageReturns\", Sanitize::newlines(\"Testing\\r\\rCarriage\\r\\r\\rReturns\", array('limit' => 0)));\n\n $this->assertEquals(\"Testing\\nLine\\nFeeds\", Sanitize::newlines(\"Testing\\nLine\\n\\nFeeds\"));\n $this->assertEquals(\"Testing\\nLine\\n\\nFeeds\", Sanitize::newlines(\"Testing\\n\\n\\nLine\\n\\nFeeds\", array('limit' => 3)));\n $this->assertEquals(\"TestingLineFeeds\", Sanitize::newlines(\"Testing\\n\\nLine\\n\\nFeeds\", array('limit' => 0)));\n\n $this->assertEquals(\"Testing\\r\\nBoth\\r\\nLineFeeds\\r\\n\\r\\nAnd\\r\\nCarriageReturns\", Sanitize::newlines(\"Testing\\r\\nBoth\\r\\r\\n\\nLineFeeds\\r\\n\\r\\r\\n\\nAnd\\r\\nCarriageReturns\"));\n $this->assertEquals(\"Testing\\r\\nBoth\\r\\nLineFeeds\\r\\nAnd\\r\\nCarriageReturns\", Sanitize::newlines(\"Testing\\r\\nBoth\\r\\n\\r\\nLineFeeds\\r\\n\\r\\n\\r\\nAnd\\r\\nCarriageReturns\"));\n $this->assertEquals(\"Testing\\r\\nBoth\\r\\n\\r\\nLineFeeds\\r\\n\\r\\n\\r\\nAnd\\r\\nCarriageReturns\", Sanitize::newlines(\"Testing\\r\\nBoth\\r\\n\\r\\nLineFeeds\\r\\n\\r\\n\\r\\nAnd\\r\\nCarriageReturns\", array('crlf' => false)));\n }", "private function nl2br($text) {\r\n return nl2br($text); // Not needed, but here to keep logic in Filter method intact.\r\n }", "function pun_linebreaks($str)\r\n{\r\n\treturn str_replace(\"\\r\", \"\\n\", str_replace(\"\\r\\n\", \"\\n\", $str));\r\n}", "function br2line($item) {\n\t\treturn preg_replace('/<br[^>]*>/i', ' ', $item);\n\t}", "function html($text) {\n\t\t// Sanitizing html text\n\t\t$text = Sanitize::html($text);\n\t\t// Adding <br />\n\t\t$text = nl2br($text);\n\t\t// Transform http:// into links\n\t\t$text = $this->convertLinks($text);\n\n\t\treturn $text;\n\t}", "function encodehtml($s, $linebreaks = true)\n{\n $s = str_replace(\"<\", \"&lt;\", str_replace(\"&\", \"&amp;\", $s));\n if ($linebreaks) {\n $s = nl2br($s);\n }\n return $s;\n}", "protected function br2nl($content) {\n\t\t$array = array(\n\t\t\t'<br >',\n\t\t\t'<br>',\n\t\t\t'<br/>',\n\t\t\t'<br />'\n\t\t);\n\t\t// replacer\n\t\t$content = str_replace($array, \"\\n\", $content);\n\n\t\treturn $content;\n\t}", "function br($string){\n return str_replace(\"\\n\", \"<br />\", $string);\n}", "protected function stripHtmlTags($text)\n {\n $text = preg_replace(\n [\n // Remove invisible content\n /** @lang php */\n '@<head[^>]*?>.*?</head>@siu',\n /** @lang php */\n '@<style[^>]*?>.*?</style>@siu',\n /** @lang php */\n '@<script[^>]*?.*?</script>@siu',\n /** @lang php */\n '@<object[^>]*?.*?</object>@siu',\n /** @lang php */\n '@<embed[^>]*?.*?</embed>@siu',\n /** @lang php */\n '@<applet[^>]*?.*?</applet>@siu',\n /** @lang php */\n '@<noframes[^>]*?.*?</noframes>@siu',\n /** @lang php */\n '@<noscript[^>]*?.*?</noscript>@siu',\n /** @lang php */\n '@<noembed[^>]*?.*?</noembed>@siu',\n // Add line breaks before and after blocks\n '@</?((address)|(blockquote)|(center)|(del))@iu',\n '@</?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))@iu',\n '@</?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))@iu',\n '@</?((table)|(th)|(td)|(caption))@iu',\n '@</?((form)|(button)|(fieldset)|(legend)|(input))@iu',\n '@</?((label)|(select)|(optgroup)|(option)|(textarea))@iu',\n '@</?((frameset)|(frame)|(iframe))@iu',\n ],\n [\n ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',\n \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\",\n \"\\n\\$0\", \"\\n\\$0\",\n ],\n $text\n );\n\n return strip_tags($text);\n }", "function nohtml($nohtml) {\n\t\t$nohtml = str_replace(\"&#124;\", \"|\", $nohtml);\n\t\treturn nl2br(stripslashes(strip_tags($nohtml)));\n\t}", "function _prepareText($text, $highlight = '') {\n $html = htmlspecialchars($text);\n $html = str_replace( \"\\n\", '<br />', $html);\n\n if ($highlight != '') {\n $html = '<span class=\"' . $highlight . '\">' . $html . '</span>';\n }\n\n return $html;\n }", "protected function lineBreaks() {\n\t\t$this->text = $this->removeUnneccesaryLinebreaks($this->text);\n\t\t$this->text = nl2br($this->text);\n\t\tReturn $this;\n\t}", "public function convertlinebreaks($text)\r\n {\r\n return preg_replace(\"#\\015\\012|\\015|\\012#\", \"\\n\", $text);\r\n }", "function nl2p($str)\n{\n\treturn str_replace(array(\"\\r\\n\",\"\\n\"),array(\"<br />\",\"</p>\"),$str);\n}", "function remove_empty_lines($str) {\n\t\t\treturn preg_replace(\"/(^[\\r\\n]*|[\\r\\n]+)[\\s\\t]*[\\r\\n]+/\", \"\\n\", $str);\n\t\t}", "function sanitize($str, $remove_nl=true) {\n $str = $this->stripSlashes($str);\n\n if($remove_nl)\n {\n $injections = array('/(\\n+)/i',\n '/(\\r+)/i',\n '/(\\t+)/i',\n '/(%0A+)/i',\n '/(%0D+)/i',\n '/(%08+)/i',\n '/(%09+)/i'\n );\n $str = preg_replace($injections,'',$str);\n }\n\n return $str;\n }", "public function enableRemoveLineBreaksFromTemplate() {}", "function qa_html($string, $multiline = false)\n{\n\t$html = htmlspecialchars((string)$string);\n\n\tif ($multiline) {\n\t\t$html = preg_replace('/\\r\\n?/', \"\\n\", $html);\n\t\t$html = preg_replace('/(?<=\\s) /', '&nbsp;', $html);\n\t\t$html = str_replace(\"\\t\", '&nbsp; &nbsp; ', $html);\n\t\t$html = nl2br($html);\n\t}\n\n\treturn $html;\n}", "function cleanUp($str_to_clean, $newlines, $spaces){\n\t\t\n\t\t\t//build list of whitespace chars to be removed\n\t\t\t$bad_chars = array('\\r', '\\t', ';');\n\t\t\n\t\t\t//if newlines are false, add that to the list of bad chars\n\t\t\tif(!$newlines){array_push($bad_chars, '\\n');}\n\t\t\t\n\t\t\t//if spaces are false, strip them too\n\t\t\tif(!$spaces){array_push($bad_chars, ' ');}\n\t\t\t\n\t\t\t$str_to_clean_a = str_replace($bad_chars, '', $str_to_clean);\n\t\t\t$str_to_clean_b = strip_tags($str_to_clean_a);\n\t\t\treturn $str_to_clean_b;\n\t\t}", "function ptobr_content($content) {\n global $post;\n\t\n $content = str_replace('<p>&nbsp;</p>', '<br />', $content);\n\t\n return $content;\n}", "final protected function _textToHtml($text)\n\t{\n\t\treturn nl2br(str_replace(\"\\t\", '&nbsp;&nbsp;&nbsp;&nbsp;', htmlspecialchars($text)));\n\t}", "public function getRemoveLineBreaksFromTemplate() {}", "public function removeHTML($text){\n $text = html_entity_decode($text);\n\n\n // Alle Tags entfernen\n $text = strip_tags($text);\n\n $text = str_replace(\"&lt;br&gt;\", \"\", $text);\n $text = str_replace(\"&amp;lt;br&amp;gt;\", \"\", $text);\n\n\n return $text;\n }", "function remake($s)\n{\n $s = str_replace('&nbsp;',' ',$s);\n $s = str_replace(\"&nbsp;\",' ',$s);\n $s = html_entity_decode(strip_tags($s,ENT_COMPAT));\n $s = str_replace('&nbsp;',' ',$s);\n $s = str_replace(\"&nbsp;\",' ',$s);\n return $s;\n}", "public function HTMLizeErrlog(){\n\t\t\treturn str_replace(\"\\n\", \"<br />\", $this->errlog);\n\t\t}", "public function HTMLizeErrlog(){\n\t\t\treturn str_replace(\"\\n\", \"<br />\", $this->errlog);\n\t\t}", "function my_nl2br($t=\"\")\n\t{\n\t\treturn str_replace( \"\\n\", \"<br />\", $t );\n\t}", "function restore_pre_code_tags( $p_string, $p_multiline = true ) {\n\t\t\t$t_string = $p_string;\n\t\t\t$tags = '';\n\t\t\t$t_html_pre_code_tags = \"br, pre, code\";\n\n\t\t\tif( is_blank( $t_html_pre_code_tags ) ) {\n\t\t\t\treturn $t_string;\n\t\t\t}\n\n\t\t\t$tags = explode( ',', $t_html_pre_code_tags );\n\t\t\tforeach( $tags as $key => $value ) {\n\t\t\t\tif( !is_blank( $value ) ) {\n\t\t\t\t\t$tags[$key] = trim( $value );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tags = implode( '|', $tags );\n\t\t\n\t\t\t$t_string = preg_replace_callback('/&lt;(' . $tags . ')(.*?)&gt;/ui',\n\t\t\tcreate_function('$m', '\n\t\t\t\treturn \"<\" . $m[1] . str_replace(\"&quot;\", \"\\\"\", $m[2]) . \">\";\n\t\t\t')\n\t\t\t, $t_string);\n\t\t\t\n\t\t\t$t_string = preg_replace( '/&lt;\\/(' . $tags . ')\\s*&gt;/ui', '</\\\\1>', $t_string );\t\t\t\n\t\t\t$t_string = preg_replace( '/&lt;a\\shref=&quot;(\\S+)&quot;&gt;.+&lt;\\/a&gt;\\s\\[&lt;a\\shref=&quot;(\\S+)&quot;\\starget=&quot;_blank&quot;&gt;\\^&lt;\\/a&gt;\\]/ui', '<a href=\"\\\\1\">\\\\1</a> [<a href=\"\\\\1\" target=\"_blank\">^</a>]', $t_string );\n\n\t\t\treturn $t_string;\n\t\t}", "public function retourChariot(string $txt)\n {\n return str_replace(\" \",\"<br>\",$txt);\n }", "function prep_diff_text($string, $wrap = true)\n\t{\n\t\tif (trim($string) === '')\n\t\t{\n\t\t\treturn '&nbsp;';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($wrap)\n\t\t\t{\n\t\t\t\t$string = nl2br(htmlspecialchars_uni($string));\n\t\t\t\t$string = preg_replace('#( ){2}#', '&nbsp; ', $string);\n\t\t\t\t$string = str_replace(\"\\t\", '&nbsp; &nbsp; ', $string);\n\t\t\t\treturn \"<code>$string</code>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn '<pre style=\"display:inline\">' . \"\\n\" . htmlspecialchars_uni($string) . '</pre>';\n\t\t\t}\n\t\t}\n\t}", "function StripHTML($s_str,$s_line_feed = \"\\n\")\n{\n\t\t//\n\t\t// strip HTML comments (s option means include new lines in matches)\n\t\t//\n\t$s_str = preg_replace('/<!--([^-]*([^-]|-([^-]|-[^>])))*-->/s','',$s_str);\n\t\t//\n\t\t// strip any scripts (i option means case-insensitive)\n\t\t//\n\t$s_str = preg_replace('/<script[^>]*?>.*?<\\/script[^>]*?>/si','',$s_str);\n\t\t//\n\t\t// replace paragraphs with new lines (line feeds)\n\t\t//\n\t$s_str = preg_replace('/<p[^>]*?>/i',$s_line_feed,$s_str);\n\t\t//\n\t\t// replace breaks with new lines (line feeds)\n\t\t//\n\t$s_str = preg_replace('/<br[[:space:]]*\\/?[[:space:]]*>/i',$s_line_feed,$s_str);\n\t\t//\n\t\t// overcome this bug: http://bugs.php.net/bug.php?id=21311\n\t\t//\n\t$s_str = preg_replace('/<![^>]*>/s','',$s_str);\n\t\t//\n\t\t// get rid of all HTML tags\n\t\t//\n\t$s_str = strip_tags($s_str);\n\treturn ($s_str);\n}", "function replaceWhitespace($str) {\n $result = $str;\n foreach (array(\n \" \", \" \\t\", \" \\r\", \" \\n\",\n \"\\t\\t\", \"\\t \", \"\\t\\r\", \"\\t\\n\",\n \"\\r\\r\", \"\\r \", \"\\r\\t\", \"\\r\\n\",\n \"\\n\\n\", \"\\n \", \"\\n\\t\", \"\\n\\r\",\n ) as $replacement) {\n $result = str_replace($replacement, $replacement[0], $result);\n }\n return $str !== $result ? replaceWhitespace($result) : $result;\n}", "function bbcode_stripcontents ($text) {\r\n return preg_replace (\"/[^\\n]/\", '', $text);\r\n}", "function n2br($string) {\r\n\r\n $stuff = array('\\r\\n', '\\n', '\\r');\r\n $string = str_replace($stuff, \"<br/>\", $string);\r\n\r\n return trim($string);\r\n}", "function bbcode_stripcontents ($text) {\r\n\r\n return preg_replace (\"/[^\\n]/\", '', $text);\r\n}", "public function minify_html($html)\n {\n $html = str_replace([\"\\t\", \"\\r\", \"\\n\"], '', $html);\n\n // This is over twice the speed of a RegExp\n // (removes > 2 spaces and concatentate strings if there are 2 spaces between them)\n while (strpos($html, ' ') !== false)\n {\n $html = str_replace(' ', '', $html);\n }\n\n // while (strpos($html, ' ') !== false)\n // {\n // $html = str_replace(' ', '', $html);\n // }\n //\n // $text = preg_replace('|[\\s]+|s', ' ', $text1);\n\n\n $search = array(\n '#(?://)?<!\\[CDATA\\[(.*?)(?://)?\\]\\]>#s', //leave CDATA alone\n '/<!--(?!\\s*(?:\\[if [^\\]]+]|<!|>))(?:(?!-->).)*-->/s' // Remove html comments\n );\n\n $replace = array(\n \"//&lt;![CDATA[\\n\" . '\\1' . \"\\n//]]>\",\n ''\n );\n\n return preg_replace($search, $replace, $html);\n }", "function format_text($text, $convert_to_html = true)\r\n{\r\n\tGLOBAL $TRENNZEICHEN;\r\n \tif ($convert_to_html) $text = htmlentities($text);\r\n\t$text = nl2br($text);\r\n\t$text = str_replace(\"\\n\",\"\",$text);\r\n\t$text = str_replace(chr(13),\"\",$text);\r\n\t$text = str_replace($TRENNZEICHEN,\"\",$text);\r\n\t$text = do_ubb($text);\r\n\t$text = trim($text);\r\n\treturn($text);\r\n}" ]
[ "0.7096225", "0.7042641", "0.7042641", "0.673939", "0.67391676", "0.67341924", "0.65867466", "0.65296066", "0.6473843", "0.64437395", "0.6411175", "0.6367723", "0.63422436", "0.62652725", "0.6264267", "0.62277055", "0.62138116", "0.6198913", "0.6196727", "0.61956614", "0.61661035", "0.61510575", "0.61336565", "0.6117711", "0.61041516", "0.6086954", "0.60812247", "0.6072153", "0.6065783", "0.6064434", "0.606109", "0.6052032", "0.60451967", "0.6032952", "0.60282207", "0.6015228", "0.5985867", "0.59821886", "0.59801924", "0.596927", "0.5964864", "0.5956664", "0.5903852", "0.5903012", "0.58959866", "0.58955735", "0.58855855", "0.5880278", "0.5871674", "0.58560085", "0.5833936", "0.58329546", "0.5832828", "0.58233297", "0.58195573", "0.5813606", "0.58073056", "0.58068895", "0.5797471", "0.5791107", "0.5788989", "0.5787185", "0.5772997", "0.57638353", "0.57621026", "0.5755635", "0.5748728", "0.57294077", "0.57029635", "0.56996155", "0.5698504", "0.5687171", "0.5684918", "0.568135", "0.56660706", "0.56652665", "0.56599975", "0.56503695", "0.5642713", "0.5637253", "0.5636993", "0.56349367", "0.5631875", "0.56265336", "0.5623449", "0.5615723", "0.56120825", "0.5611117", "0.5604696", "0.5604696", "0.556466", "0.5559706", "0.55575556", "0.5553755", "0.5551349", "0.5540672", "0.5540103", "0.55365866", "0.55283844", "0.55283123", "0.55217624" ]
0.0
-1
Format a float as a currency with 2 decimal places.
protected function formatAsCurrency(float $input, string $symbol = '£'): string { if ($input >= 0) { return $symbol . number_format($input, 2); } else { return '-' . $symbol . abs(number_format($input, 2)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function FMoney($v) { return number_format($v,2,',','.'); }", "function formatPrice2($price)\n{\n\t$price = @number_format($price, 2, '.', ' '); // Igor\n\treturn $price;\n}", "function currency_format($amount) {\n\t$amount_ok = number_format($amount,2,',','.');\n\treturn $amount_ok;\n}", "function number_format( $price, $decimals = 2 ) {\n return number_format_i18n( floatval($price), $decimals );\n }", "function tPrice( $fPrice ){\n return sprintf( '%01.2f', $fPrice );\n }", "public static function formatMoney(float $value): string\n\t{\n\t\treturn number_format($value, 2, ',', '.');\n\t}", "function money($price,$decimals = 2)\n {\n return number_format($price,$decimals);\n }", "public static function formatToFixed($float) {}", "protected function priceFormat($price)\n {\n return number_format((float)$price, 2, '.', '') * 100;\n }", "public static function round2f($val)\n {\n return sprintf('%.2f', (double)$val);\n }", "static function currency_format($value) {\n $value = number_format($value, 2, ',', '.');\n $value = str_replace(',00', '', $value);\n return $value;\n }", "function formatCurrency($number, $decimals = 2, $currency = 'Ksh')\n{\n return $currency . \" \" . format_num($number, $decimals, '.', ',');\n}", "public function formatAmount ($number) {\n return (float) number_format($number, 2, '.', '');\n }", "protected function _formatFloat($fIn)\n {\n return sprintf(\"%.2f\", $fIn);\n }", "function formatMoney2($number, $cents = 1) { // cents: 0=never, 1=if needed, 2=always\n if (is_numeric($number)) { // a number\n if (!$number) { // zero\n $money = ($cents == 2 ? '0.00' : '0'); // output zero\n } else { // value\n if (floor($number) == $number) { // whole number\n $money = number_format($number, ($cents == 2 ? 2 : 0)); // format\n } else { // cents\n $money = number_format(round($number, 2), ($cents == 0 ? 0 : 2)); // format\n } // integer or decimal\n } // value\n return $money.' zĹ‚';\n } // numeric\n}", "private static function moneyFormat($price)\r\n {\r\n return addCurrency(number_format($price, 2, ',', ' '));\r\n }", "function moneyFormat($amount) {\n try {\n return number_format($amount, 2, '.', ',');\n } catch (Exception $e) {\n return $amount;\n }\n }", "function convertToDollar($localAmount, $rate){\n return round ($localAmount/$rate, 3);\n //return number_format(round ($localAmount/$rate, 3), 3, \".\", \",\");\n\n}", "function currency( $c_f_x )\t\r\n {\r\n \t$c_f_x = round($c_f_x, 2);\t//THIS WILL ROUND THE ACCEPTED PARAMETER TO THE \r\n \t\t\t\t\t\t\t //PRECISION OF 2\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n \t$temp_c_f_variable = strstr(round($c_f_x,2), \".\");\t//THIS WILL ASSIGN THE \".\" AND WHAT EVER \r\n \t\t\t\t\t\t\t\t//ELSE COMES AFTER IT. REMEMBER DUE TO \r\n \t\t\t\t\t\t\t\t//ROUNDING THERE ARE ONLY THREE THINGS\r\n \t\t\t\t\t\t\t\t//THIS VARIABLE CAN CONTAIN, A PERIOD \r\n \t\t\t\t\t\t\t\t//WITH ONE NUMBER, A PERIOD WITH TWO NUMBERS,\r\n \t\t\t\t\t\t\t\t//OR NOTHING AT ALL\r\n \t\t\t\t\t\t\t\t//EXAMPLE : \".1\",\".12\",\"\"\r\n\t\t\t\t\t\t\t\t\t\r\n \tif (strlen($temp_c_f_variable) == 2)\t//THIS IF STATEMENT WILL CHECK TO SEE IF \r\n \t\t\t\t\t\t//LENGTH OF THE VARIABLE IS EQUAL TO 2. IF\r\n \t\t\t\t\t\t//IT IS, THEN WE KNOW THAT IT LOOKS LIKE \r\n \t\t\t\t\t\t//THIS \".1\" SO YOU WOULD ADD A ZERO TO GIVE IT \r\n \t\t\t\t\t\t// A NICE LOOKING FORMAT \r\n \t{\r\n \t\t$c_f_x = $c_f_x . \"0\";\r\n \t}\r\n\t\t\r\n \tif (strlen($temp_c_f_variable) == 0)\t//THIS IF STATEMENT WILL CHECK TO SEE IF \r\n \t\t\t\t\t\t//LENGTH OF THE VARIABLE IS EQUAL TO 2. IF\r\n \t\t\t\t\t\t//IT IS, THEN WE KNOW THAT IT LOOKS LIKE \r\n \t\t\t\t\t\t//THIS \"\" SO YOU WOULD ADD TWO ZERO'S TO GIVE IT \r\n \t\t\t\t\t\t// A NICE LOOKING FORMAT\r\n \t{\r\n \t\t$c_f_x = $c_f_x . \".00\";\r\n \t}\r\n\t\t\r\n\t\t$c_f_x = \"$\" . $c_f_x;\t//THIS WILL ADD THE \"$\" TO THE FRONT \r\n\r\n \treturn $c_f_x;\t//THIS WILL RETURN THE VARIABLE IN A NICE FORMAT\r\n \t\t\t\t\t//BUT REMEMBER THIS NEW VARIABLE WILL BE A STRING \r\n \t\t\t\t\t//THEREFORE CAN BE USED IN ANY FURTHER CALCULATIONS\r\n \t\t\r\n }", "function format_price($price)\n{\n $price = number_format(ceil($price), 0, \".\", \" \");\n return $price . \" \" . \"₽\";\n}", "private function numberFormat($value) : float\n {\n return round($value, 2);\n }", "public static function formatAndRound($amount)\n {\n return number_format(round($amount, 2), 2);\n }", "public function formatPrice($price)\n {\n // Suppress errors from formatting the price, as we may have EUR12,00 etc\n return @number_format($price, 2, '.', '');\n }", "function __formatCurrency($value)\n {\n if ($this->__init['definitions']['currency_type'] === 'dolar') {\n if (preg_match('/(([0-9]+)\\.([0-9]{1,2}))/', $value)) {\n $value.= 00;\n list($val, $decimal) = explode('.', $value);\n $decimal = substr($decimal, 0, 2);\n return $val . $decimal;\n } else return $value . '00';\n } else if ($this->__init['definitions']['currency_type'] === 'real') {\n if (preg_match('/(([0-9]+)\\,([0-9]{1,2}))/', $value)) {\n $value.= 00;\n list($val, $decimal) = explode(',', $value);\n $decimal = substr($decimal, 0, 2);\n return $val . $decimal;\n } else return $value . '00';\n } else return $value;\n }", "static function currency_format_en($value) {\n $value = number_format($value, 2, '.', ',');\n $value = str_replace('.00', '', $value);\n return $value;\n }", "public function formatCurrency($amount);", "public static function money_format($amount){\n\t\treturn number_format($amount,2,'.',',');\n\t}", "function price () {\n global $value;\n $pricefloat = ceil($value['price']);\n\n if ($pricefloat <= 999) {\n echo $pricefloat;\n } elseif ($pricefloat >= 1000) {\n $num_format = number_format($pricefloat, 0, '.', ' ');\n echo $num_format . \" &#8381;\";\n }\n }", "function carton_format_decimal( $number, $dp = '' ) {\n\tif ( $dp == '' )\n\t\t$dp = intval( get_option( 'carton_price_num_decimals' ) );\n\n\t$number = number_format( (float) $number, (int) $dp, '.', '' );\n\n\tif ( strstr( $number, '.' ) )\n\t\t$number = rtrim( rtrim( $number, '0' ), '.' );\n\n\treturn $number;\n}", "function currencyFormatDecimal($decimal) {\n $count = explode('.', $decimal);\n\n return count($count) > 1 ? number_format($decimal, 2) : number_format($decimal, 0);\n }", "function formatAmountSimply($v,$t=1){\n return number_format($v,2,'.',',');\n}", "public function viewPrice()\n {\n return number_format($this->price/100, 2);\n }", "function display_money_format($money)\n\t{\n\t\t$money_r = $this->money_split($money);\n\t\t$money_r = number_format($money_r, 2, ',', '.');\n\t\treturn $money_r; // output : 5.000,00\n\t}", "function formatPrice($vlprice)\n{\n\tif(!$vlprice>0) $vlprice = 0;//trantando nao tem nada no carrinho, o valor do frete vem NULL e assim daria erro\n\treturn number_format($vlprice, 2, \",\", \".\");\n}", "public static function dbFormatMoney(string $value): float\n\t{\n\t\t// Remove the dots thousands separator\n\t\t$valueWithoutDots = str_replace('.', '', $value);\n\n\t\t// Change the comma thousands separator to commas\n\t\t$valueWithDotDecimal = str_replace(',', '.', $valueWithoutDots);\n\n\t\t// Return as float\n\t\treturn number_format($valueWithDotDecimal, 2, '.', '');\n\t}", "protected function _numberFormat($float)\n {\n return number_format($float, 2, '', '');\n }", "function formatcurrency($floatcurr, $curr = \"USD\")\n{\n $currencies['ARS'] = array(2,',','.'); // Argentine Peso\n $currencies['AMD'] = array(2,'.',','); // Armenian Dram\n $currencies['AWG'] = array(2,'.',','); // Aruban Guilder\n $currencies['AUD'] = array(2,'.',' '); // Australian Dollar\n $currencies['BSD'] = array(2,'.',','); // Bahamian Dollar\n $currencies['BHD'] = array(3,'.',','); // Bahraini Dinar\n $currencies['BDT'] = array(2,'.',','); // Bangladesh, Taka\n $currencies['BZD'] = array(2,'.',','); // Belize Dollar\n $currencies['BMD'] = array(2,'.',','); // Bermudian Dollar\n $currencies['BOB'] = array(2,'.',','); // Bolivia, Boliviano\n $currencies['BAM'] = array(2,'.',','); // Bosnia and Herzegovina, Convertible Marks\n $currencies['BWP'] = array(2,'.',','); // Botswana, Pula\n $currencies['BRL'] = array(2,',','.'); // Brazilian Real\n $currencies['BND'] = array(2,'.',','); // Brunei Dollar\n $currencies['CAD'] = array(2,'.',','); // Canadian Dollar\n $currencies['KYD'] = array(2,'.',','); // Cayman Islands Dollar\n $currencies['CLP'] = array(0,'','.'); // Chilean Peso\n $currencies['CNY'] = array(2,'.',','); // China Yuan Renminbi\n $currencies['COP'] = array(2,',','.'); // Colombian Peso\n $currencies['CRC'] = array(2,',','.'); // Costa Rican Colon\n $currencies['HRK'] = array(2,',','.'); // Croatian Kuna\n $currencies['CUC'] = array(2,'.',','); // Cuban Convertible Peso\n $currencies['CUP'] = array(2,'.',','); // Cuban Peso\n $currencies['CYP'] = array(2,'.',','); // Cyprus Pound\n $currencies['CZK'] = array(2,'.',','); // Czech Koruna\n $currencies['DKK'] = array(2,',','.'); // Danish Krone\n $currencies['DOP'] = array(2,'.',','); // Dominican Peso\n $currencies['XCD'] = array(2,'.',','); // East Caribbean Dollar\n $currencies['EGP'] = array(2,'.',','); // Egyptian Pound\n $currencies['SVC'] = array(2,'.',','); // El Salvador Colon\n $currencies['ATS'] = array(2,',','.'); // Euro\n $currencies['BEF'] = array(2,',','.'); // Euro\n $currencies['DEM'] = array(2,',','.'); // Euro\n $currencies['EEK'] = array(2,',','.'); // Euro\n $currencies['ESP'] = array(2,',','.'); // Euro\n $currencies['EUR'] = array(2,',','.'); // Euro\n $currencies['FIM'] = array(2,',','.'); // Euro\n $currencies['FRF'] = array(2,',','.'); // Euro\n $currencies['GRD'] = array(2,',','.'); // Euro\n $currencies['IEP'] = array(2,',','.'); // Euro\n $currencies['ITL'] = array(2,',','.'); // Euro\n $currencies['LUF'] = array(2,',','.'); // Euro\n $currencies['NLG'] = array(2,',','.'); // Euro\n $currencies['PTE'] = array(2,',','.'); // Euro\n $currencies['GHC'] = array(2,'.',','); // Ghana, Cedi\n $currencies['GIP'] = array(2,'.',','); // Gibraltar Pound\n $currencies['GTQ'] = array(2,'.',','); // Guatemala, Quetzal\n $currencies['HNL'] = array(2,'.',','); // Honduras, Lempira\n $currencies['HKD'] = array(2,'.',','); // Hong Kong Dollar\n $currencies['HUF'] = array(0,'','.'); // Hungary, Forint\n $currencies['ISK'] = array(0,'','.'); // Iceland Krona\n $currencies['INR'] = array(2,'.',','); // Indian Rupee\n $currencies['IDR'] = array(2,',','.'); // Indonesia, Rupiah\n $currencies['IRR'] = array(2,'.',','); // Iranian Rial\n $currencies['JMD'] = array(2,'.',','); // Jamaican Dollar\n $currencies['JPY'] = array(0,'',','); // Japan, Yen\n $currencies['JOD'] = array(3,'.',','); // Jordanian Dinar\n $currencies['KES'] = array(2,'.',','); // Kenyan Shilling\n $currencies['KWD'] = array(3,'.',','); // Kuwaiti Dinar\n $currencies['LVL'] = array(2,'.',','); // Latvian Lats\n $currencies['LBP'] = array(0,'',' '); // Lebanese Pound\n $currencies['LTL'] = array(2,',',' '); // Lithuanian Litas\n $currencies['MKD'] = array(2,'.',','); // Macedonia, Denar\n $currencies['MYR'] = array(2,'.',','); // Malaysian Ringgit\n $currencies['MTL'] = array(2,'.',','); // Maltese Lira\n $currencies['MUR'] = array(0,'',','); // Mauritius Rupee\n $currencies['MXN'] = array(2,'.',','); // Mexican Peso\n $currencies['MZM'] = array(2,',','.'); // Mozambique Metical\n $currencies['NPR'] = array(2,'.',','); // Nepalese Rupee\n $currencies['ANG'] = array(2,'.',','); // Netherlands Antillian Guilder\n $currencies['ILS'] = array(2,'.',','); // New Israeli Shekel\n $currencies['TRY'] = array(2,'.',','); // New Turkish Lira\n $currencies['NZD'] = array(2,'.',','); // New Zealand Dollar\n $currencies['NOK'] = array(2,',','.'); // Norwegian Krone\n $currencies['PKR'] = array(2,'.',','); // Pakistan Rupee\n $currencies['PEN'] = array(2,'.',','); // Peru, Nuevo Sol\n $currencies['UYU'] = array(2,',','.'); // Peso Uruguayo\n $currencies['PHP'] = array(2,'.',','); // Philippine Peso\n $currencies['PLN'] = array(2,'.',' '); // Poland, Zloty\n $currencies['GBP'] = array(2,'.',','); // Pound Sterling\n $currencies['OMR'] = array(3,'.',','); // Rial Omani\n $currencies['RON'] = array(2,',','.'); // Romania, New Leu\n $currencies['ROL'] = array(2,',','.'); // Romania, Old Leu\n $currencies['RUB'] = array(2,',','.'); // Russian Ruble\n $currencies['SAR'] = array(2,'.',','); // Saudi Riyal\n $currencies['SGD'] = array(2,'.',','); // Singapore Dollar\n $currencies['SKK'] = array(2,',',' '); // Slovak Koruna\n $currencies['SIT'] = array(2,',','.'); // Slovenia, Tolar\n $currencies['ZAR'] = array(2,'.',' '); // South Africa, Rand\n $currencies['KRW'] = array(0,'',','); // South Korea, Won\n $currencies['SZL'] = array(2,'.',', '); // Swaziland, Lilangeni\n $currencies['SEK'] = array(2,',','.'); // Swedish Krona\n $currencies['CHF'] = array(2,'.','\\''); // Swiss Franc \n $currencies['TZS'] = array(2,'.',','); // Tanzanian Shilling\n $currencies['THB'] = array(2,'.',','); // Thailand, Baht\n $currencies['TOP'] = array(2,'.',','); // Tonga, Paanga\n $currencies['AED'] = array(2,'.',','); // UAE Dirham\n $currencies['UAH'] = array(2,',',' '); // Ukraine, Hryvnia\n $currencies['USD'] = array(2,'.',','); // US Dollar\n $currencies['VUV'] = array(0,'',','); // Vanuatu, Vatu\n $currencies['VEF'] = array(2,',','.'); // Venezuela Bolivares Fuertes\n $currencies['VEB'] = array(2,',','.'); // Venezuela, Bolivar\n $currencies['VND'] = array(0,'','.'); // Viet Nam, Dong\n $currencies['ZWD'] = array(2,'.',' '); // Zimbabwe Dollar\n\n function formatinr($input){\n //CUSTOM FUNCTION TO GENERATE ##,##,###.##\n $dec = \"\";\n $pos = strpos($input, \".\");\n if ($pos === false){\n //no decimals \n } else {\n //decimals\n $dec = substr(round(substr($input,$pos),2),1);\n $input = substr($input,0,$pos);\n }\n $num = substr($input,-3); //get the last 3 digits\n $input = substr($input,0, -3); //omit the last 3 digits already stored in $num\n while(strlen($input) > 0) //loop the process - further get digits 2 by 2\n {\n $num = substr($input,-2).\",\".$num;\n $input = substr($input,0,-2);\n }\n return $num . $dec;\n }\n\n\n if ($curr == \"INR\"){ \n return formatinr($floatcurr);\n } else {\n return number_format($floatcurr,$currencies[$curr][0],$currencies[$curr][1],$currencies[$curr][2]);\n }\n \n\n}", "public function decimalFormat($value, $locale = null, $symbol = null);", "function format($val) {\r\n //setlocale(LC_MONETARY, 'en_US');\r\n return number_format(money_format('%i', $val), 2);\r\n }", "public static function formatNumber(float $str): string\n {\n return number_format($str, 2, '.', ',');\n }", "function formatCurrency($amount, $config, $currencySymbol = null) {\r\n\t\t$decimals = isset($config->decimals) ? $config->decimals : 2 ;\r\n\t\t$dec_point = isset($config->dec_point) ? $config->dec_point : '.' ;\r\n\t\t$thousands_sep = isset($config->thousands_sep) ? $config->thousands_sep : ',' ;\r\n\t\t$symbol = $currencySymbol ? $currencySymbol : $config->currency_symbol ;\r\n\t\r\n\t\treturn $config->currency_position ? (number_format($amount, $decimals, $dec_point, $thousands_sep).$symbol) : ($symbol.number_format($amount, $decimals, $dec_point, $thousands_sep)) ;\r\n\t}", "public function pricer($price)\n {\n $string_price = number_format($price,2,',','.');\n return $string_price;\n }", "function to_price($amount = 0.00, $symbol = \"$\", $currency_code = \"USD\"){\n $amount = floatval($amount);\n return sprintf(\"%s%.2f %s\", $symbol, $amount, $currency_code);\n}", "public static function formatCurrencyUsing($callback)\n {\n static::$formatCurrencyUsing = $callback;\n }", "function carton_format_total( $number ) {\n\treturn number_format( (float) $number, (int) get_option( 'carton_price_num_decimals' ), '.', '' );\n}", "public function formatedPrice()\n {\n // if I format total amount of cart, use cart->total_price\n $amount = $this->price ? $this->price : $this->total_price;\n $fmt_price = new NumberFormatter('en', NumberFormatter::CURRENCY);\n \n return $fmt_price->formatCurrency($amount, \"EUR\");\n }", "public function formatPrice($value)\n\t{\n\t\treturn Mage::getSingleton('adminhtml/session_quote')->getStore()->formatPrice($value);\n\t}", "function acadp_format_amount( $amount, $decimals = true, $currency_settings = array() ) {\n\n\tif( empty( $currency_settings ) ) {\n\t\t$currency_settings = get_option( 'acadp_currency_settings' );\n\t}\n\n\t$currency = ! empty( $currency_settings[ 'currency' ] ) ? $currency_settings[ 'currency' ] : 'USD';\n\t$thousands_sep = ! empty( $currency_settings[ 'thousands_separator' ] ) ? $currency_settings[ 'thousands_separator' ] : ',';\n\t$decimal_sep = ! empty( $currency_settings[ 'decimal_separator' ] ) ? $currency_settings[ 'decimal_separator' ] : '.';\n\n\t// Format the amount\n\tif( $decimal_sep == ',' && false !== ( $sep_found = strpos( $amount, $decimal_sep ) ) ) {\n\t\t$whole = substr( $amount, 0, $sep_found );\n\t\t$part = substr( $amount, $sep_found + 1, ( strlen( $amount ) - 1 ) );\n\t\t$amount = $whole . '.' . $part;\n\t}\n\n\t// Strip , from the amount (if set as the thousands separator)\n\tif( $thousands_sep == ',' && false !== ( $found = strpos( $amount, $thousands_sep ) ) ) {\n\t\t$amount = str_replace( ',', '', $amount );\n\t}\n\n\t// Strip ' ' from the amount (if set as the thousands separator)\n\tif( $thousands_sep == ' ' && false !== ( $found = strpos( $amount, $thousands_sep ) ) ) {\n\t\t$amount = str_replace( ' ', '', $amount );\n\t}\n\n\tif( empty( $amount ) ) {\n\t\t$amount = 0;\n\t}\n\n\tif( $decimals ) {\n\t\t$decimals = acadp_currency_decimal_count( 2, $currency );\n\t} else {\n\t\t$decimals = 0;\n\t}\n\n\t$formatted = number_format( $amount, $decimals, $decimal_sep, $thousands_sep );\n\n\treturn apply_filters( 'acadp_format_amount', $formatted, $amount, $decimals, $decimal_sep, $thousands_sep );\n\n}", "public static function formatMoney($value)\n {\n return number_format($value, 4, '.', '');\n }", "public static function format($value, $dec = 2)\n {\n $dec = intval($dec);\n\n return number_format($value, $dec, ',', '.');\n }", "static function toCurrency($amount)\r\n {\r\n return \"$\" . number_format((double) $amount, 2);\r\n }", "public function format(float $number, ?int $decimals = 0, ?string $dec_point = \".\", ?string $thousands_sep = \",\"): string\n {\n return number_format($number, $decimals, $dec_point, $thousands_sep);\n }", "public function price_to_s(){\n return number_format($this->price, 2, '€', '');\n }", "public static function format($number, $decimals = 2, $dec_point = \",\", $thousands_sep = \".\")\n {\n return self::decimal($number, $decimals, $dec_point, $thousands_sep);\n }", "function currency($decimal) {\n\t\tif ($decimal != 0) {\n\t\t\t$currency = number_format($decimal, 2, '.', ',');\n\t\t\treturn \"$\".$currency;\n\t\t} else {\n\t\t\treturn '0';\n\t\t}\n\t}", "function format_money($amount) {\r\n // prefixes the result with 'GBP', we remove that here.\r\n return substr(money_format(\"%.0i\", $amount), 3);\r\n}", "function convert_price_default_currency($price,$rate=1)\n{\n\treturn sprintf('%0.2f',($price/$rate));\n}", "function format_price($price, string $currency = null)\n{\n return sprintf(\n config('vanilo.framework.currency.format'),\n $price,\n $currency ?? config('vanilo.framework.currency.sign')\n );\n}", "public static function currency($value, int $decimalPlaces = 2): string\n {\n if (empty($value)) {\n return '';\n }\n return number_format((float)$value, $decimalPlaces);\n }", "public function getFormattedPrice(): string\n {\n\n return number_format($this->price, 0, '', ' ');\n\n }", "function couponxl_format_price_number( $price ){\n\n\tif( !is_numeric( $price ) ){\n\t\treturn $price;\n\t}\n\t$unit_position = couponxl_get_option( 'unit_position' );\n\t$unit = '₹';\n\n\tif( $unit_position == 'front' ){\n\t\treturn $unit.number_format( $price, 2 );\n\t}\n\telse{\n\t\treturn $unit.number_format( $price, 2 );\n\t}\n}", "public static function format($value, $currency)\n {\n //smallest currency item differs in currencies.\n switch ($currency) {\n case 'JPY':\n $result = number_format(ceil($value), 0, '.', '');\n break;\n\n default:\n $result = number_format(\n round(ceil($value * 100) / 100, 2),\n 2,\n '.',\n ''\n );\n break;\n }\n\n return $result;\n }", "function format2dollars($num)\n{\n\t$num = number_format($num,2);\n\t$num = \"\\$\".$num;\n\treturn($num);\n}", "public function getPriceValue($value)\n {\n return number_format($value, 2, null, '');\n }", "function pms_format_price( $price = 0, $currency = '', $args = array() ) {\r\n\r\n $currency = pms_get_currency_symbol( $currency );\r\n\r\n //format number based on current locale with 2 decimals\r\n $price = number_format_i18n( $price, 2 );\r\n\r\n //remove any decimal 0s that are irrelevant; will match: x,00, x.00 and also x,10 or x.10\r\n $price = preg_replace('/(\\.|\\,)?0*$/', '', $price);\r\n\r\n $price = ( !empty( $args['before_price'] ) && !empty( $args['after_price'] ) ? $args['before_price'] . $price . $args['after_price'] : $price );\r\n $currency = ( !empty( $args['before_currency'] ) && !empty( $args['after_currency'] ) ? $args['before_currency'] . $currency . $args['after_currency'] : $currency );\r\n\r\n $settings = get_option( 'pms_payments_settings' );\r\n\r\n $output = ( !isset( $settings['currency_position'] ) || ( isset( $settings['currency_position'] ) && $settings['currency_position'] == 'after' ) ? $price . $currency : $currency . $price );\r\n\r\n return apply_filters( 'pms_format_price', $output, $price, $currency, $args );\r\n\r\n }", "function format_currency($value, $symbol=true)\r\n{\r\n\r\n\tif(!is_numeric($value))\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$CI = &get_instance();\r\n\t\r\n\tif($value < 0 )\r\n\t{\r\n\t\t$neg = '- ';\r\n\t} else {\r\n\t\t$neg = '';\r\n\t}\r\n\t\r\n\tif($symbol)\r\n\t{\r\n\t\t$formatted\t= number_format(abs($value), 2,'.', ',');\r\n\t\t\r\n\t\t\t$formatted\t= $neg.'$'.$formatted;\r\n\t}\r\n\telse\r\n\t{\r\n\t\r\n\t\t//traditional number formatting\r\n\t\t$formatted\t= number_format(abs($value), 2, '.', ',');\r\n\t}\r\n\t\r\n\treturn $formatted;\r\n}", "public static function Money ($amount) {\n\t\t\n\t\t\treturn sprintf('$%.2f',round(floatval($amount),2));\n\t\t\n\t\t}", "function formatTotal($input,$decimal=2){\n return number_format($input,1,'.','');\n }", "function format_price($number)\n{\n return number_format($number, 0, '', '&thinsp;');\n}", "function formatPrice($price){\n$explodePrice = explode('.', $price);\n\nreturn $explodePrice[0]. '<span class =\"card-price-cents\">€'. $explodePrice[1]. '</span>';\n\n}", "public static function decimal($number, $decimals = 2, $dec_point = \",\", $thousands_sep = \".\")\n {\n return number_format(floatval($number), $decimals, $dec_point, $thousands_sep);\n }", "function getFormatNumericDecimal( $n, $p=2 )\n{\n // $r = round( $n, $p );\n $r = number_format($n, 2, '.', '');\n if( $r == '' or $r == 0 or $r == 0.00 )\n {\n $r = '0.00';\n }\n return $r;\n}", "function getWithCurrency($amount, $decimals = 2)\n{\n return FormatNumber($amount, $decimals) . \\Config::get('website.currency');\n}", "public function formatPrice($value, $format = true, $includeContainer = true)\n {\n return $this->priceHelper->currency($value, $format, $includeContainer);\n }", "public function getPrice()\n\t{\n\t\t$total = intval($this->var['price']);\n\t\t$d = $total/100;\n\t\t$c = $total%100;\n\t\treturn sprintf(\"%d.%02d\",$d,$c);\n\t\t//return \"$d.$c\";\n\t}", "protected function priceFormat($value)\n\t{\n\t\treturn '$' . $value;\n\t}", "public function currency($value)\n {\n return config(\"customer_portal.currency_symbol\") . number_format($value, 2, config(\"customer_portal.decimal_separator\"), config(\"customer_portal.thousands_separator\"));\n }", "function konv_to_money($money)\n\t{\n\t\t$money_r = number_format($money, 2, '.', ',');\n\t\treturn $money_r; // output : $5,000.00\n\t}", "public static function formatValue($value, $currency) :string\n {\n $value = floatval($value);\n\n $thousand = $currency->thousand_separator;\n $decimal = $currency->decimal_separator;\n $precision = $currency->precision;\n\n return number_format($value, $precision, $decimal, $thousand);\n }", "private static function renderFloat($value)\n {\n return Yii::$app->formatter->asDecimal($value);\n }", "function formatPrice($number)\n {\n $price = number_format($number, 2, '.', ',') . \"\";\n $parts = explode('.', $price);\n return $parts[0] . \"<sup>\" . $parts[1] . \"</sup>\";\n }", "public function format()\n {\n $separator = $this->object->config('separator');\n $decimals = $this->object->config('decimals');\n $point = $this->object->config('point');\n\n $decimal_value = $this->getDecimalValue($this->object->getValue());\n\n if (setting_value('visiosoft.field_type.decimal::showDecimalMaxPrice') < intval($this->object->getValue()) and $decimal_value == 0) {\n if (!setting_value('visiosoft.field_type.decimal::showDecimal')) {\n $decimals = 0;\n }\n }\n\n return number_format($this->object->getValue(), $decimals, $point, str_replace('&#160;', ' ', $separator));\n }", "function approximate($val, $decimal_points = 2) {\n return number_format($val, $decimal_points);\n}", "function convertMoneyToCents($value){\n $value = preg_replace(\"/\\,/i\",\"\",$value);\n\n //to remove anything that is not a number, a dot or dash and replace it with an empty string\n $value = preg_replace(\"/([^0-9\\.\\-])/i\", \"\", $value);\n\n if(!is_numeric($value)){\n return 0.00;\n }\n\n $value = (float) $value;\n return round($value, 2) * 100;\n}", "public function formatCurrency($dValue, $oActCur = null)\n {\n if (!$oActCur) {\n $oActCur = $this->getConfig()->getActShopCurrencyObject();\n }\n $sValue = \\OxidEsales\\Eshop\\Core\\Registry::getUtils()->fRound($dValue, $oActCur);\n\n\n // OXID-Design, Rafig - 15.09.2020\n $oActCur->decimal = 2;\n\n return number_format((double) $sValue, $oActCur->decimal, $oActCur->dec, $oActCur->thousand);\n }", "function Currency2Decimal($number, $reverse=0) {\n\n\n if($reverse===1) {\n $number = preg_replace('/[^0-9,]/', '', $number);\n $number = preg_replace('/[, ]/', '.', $number);\n $number = number_format($number, 2, '.', '');\n return $number;\n\n } else return number_format($number, 2, ',', '.');\n\n\n}", "protected function decimalCurrencyFloat($decimal, $amount)\n {\n if ($decimal == 1) {\n return $amount/10;\n }\n\n return $amount/100;\n }", "public static function price(/* Decimal */ $a_price, /* Decimal */ $default = 0) {\n return $a_price !== null ? sprintf(\"%01.2f\", $a_price) : $default;\n }", "function kwh(float $number)\n{\n return number_format($number, '2', ',', '');\n}", "public function getFormattedPriceAttribute()\n {\n //attributes['price']\n return number_format(($this->attributes['price'] / 100), 2, '.', '');\n }", "public static function formatShareDecimalPlaces(\n ?float $share,\n int $decimalPlaces,\n string $decimalSeparator = ','\n ): string {\n return $share === null ? '' : number_format($share * 100, $decimalPlaces, $decimalSeparator, '');\n }", "function convertToNative($dollarAmount, $rate){\n return round((double)$dollarAmount * (double)$rate, 3);\n //return number_format(round((double)$dollarAmount * (double)$rate, 3), 3, \".\", \",\");\n}", "private function getFormattedCurrency( $nb, $nbDecimal=-1){\r\n\r\n\t\tif($nbDecimal===-1) $nbDecimal = $this->_nbDecimal;\r\n\t\tif($nb>=0){\r\n\t\t\t$format = $this->_positivePos;\r\n\t\t\t$sign = '+';\r\n\t\t} else {\r\n\t\t\t$format = $this->_negativePos;\r\n\t\t\t$sign = '-';\r\n\t\t\t$nb = abs($nb);\r\n\t\t}\r\n\r\n\t\t//$res = $this->formatNumber($nb, $nbDecimal, $this->_thousands, $this->_decimal);\r\n\t\t$res = number_format((float)$nb,$nbDecimal,$this->_decimal,$this->_thousands);\r\n\t\t$search = array('{sign}', '{number}', '{symbol}');\r\n\t\t$replace = array($sign, $res, $this->_symbol);\r\n\r\n\t\t$formattedRounded = str_replace ($search, $replace, $format);\r\n\r\n\t\treturn $formattedRounded;\r\n\t}", "function dinheiroParaBr($valor) {\n \t$valor = number_format($valor, 2, ',', '.');\n \treturn $valor;\n}", "public function getPrice()\n {\n return '£' . number_format($this->price, 2);\n }", "protected function _formatAmount($amount, $currency)\n\t{\n\t\t$amount = (double)$amount;\n\t\t$noDecimalsCurrencies = array('HUF', 'TWD');\n\t\tif(in_array($currency, $noDecimalsCurrencies))\n\t\t{\n\t\t\t$decimalDigits = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$decimalDigits = 2;\n\t\t}\n\t\t$formattedAmount = number_format($amount, $decimalDigits, '.', '');\n\t\treturn $formattedAmount;\n\t}", "public static function prepareMoney($value)\n {\n $value = static::prepareNumeric($value);\n\n return number_format($value, 2, '.', '');\n }", "function format($number) {\r\n\t$number = bcdiv($number, 100000000, 8);\r\n\t$point = strpos($number,\".\");\r\n\tif($point != -1) {\r\n\t\t$after = substr($number,$point+1);\r\n\t\t$after = strlen($after);\r\n\t\t$after = 8-$after;\r\n\t\tfor($i=0;$i<$after;$i++) {\r\n\t\t\t$number .= \"0\";\r\n\t\t}\r\n\t} else {\r\n\t\t$number .= \".00000000\";\r\n\t}\r\n\treturn($number);\r\n}", "public function formatMoney($price) {\r\n $price = preg_replace('/[^0-9.,]/i','', $price);\r\n\r\n if ($pv = strpos($price, ',')) {\r\n if ($pp = strpos($price, '.')) {\r\n if ($pv < $pp) {\r\n $price = str_replace(',', '', $price);\r\n } else if ($pv > $pp) {\r\n $price = str_replace(',', '#', $price);\r\n $price = str_replace('.', '', $price);\r\n $price = str_replace('#', '.', $price);\r\n }\r\n\r\n $priceNumber = preg_replace('/[^0-9]/i','', $price);\r\n if (strlen($price) - strlen($priceNumber) > 1) {\r\n return 'error:1';\r\n }\r\n } else {\r\n $priceNumber = preg_replace('/[^0-9]/i','', $price);\r\n if (strlen($price) - strlen($priceNumber) > 1) {\r\n return 'error:2';\r\n } else {\r\n $price = str_replace(',', '.', $price);\r\n }\r\n }\r\n }\r\n return $price;\r\n }", "public static function asFloat($value)\n {\n $v = round($value, 2);\n\n return (strpos($v, '.') and self::$formats[self::P_DECIMAL_CHAR] != '.')\n ? str_replace('.', self::$formats[self::P_DECIMAL_CHAR], $v)\n : $v;\n }" ]
[ "0.7246127", "0.724395", "0.70256114", "0.69597805", "0.69483554", "0.6881804", "0.68288213", "0.6802354", "0.6796028", "0.67227817", "0.6649403", "0.6648683", "0.66185063", "0.6585389", "0.6563245", "0.656237", "0.6552552", "0.6547088", "0.6539423", "0.65215915", "0.65193075", "0.6508973", "0.64700264", "0.6445509", "0.63530284", "0.6342978", "0.63395953", "0.63101816", "0.6309919", "0.62665075", "0.62336916", "0.61601025", "0.6145959", "0.6142762", "0.61387134", "0.6106441", "0.61035043", "0.60963696", "0.60935247", "0.60902727", "0.6087669", "0.6075575", "0.60654867", "0.60592514", "0.604475", "0.60098964", "0.6007955", "0.6000291", "0.5993004", "0.5988961", "0.59817404", "0.59807", "0.5979215", "0.5960373", "0.5947782", "0.59461343", "0.5943725", "0.59201664", "0.5918918", "0.59175056", "0.5902553", "0.5898072", "0.58840835", "0.58773386", "0.58571386", "0.5839962", "0.5825592", "0.5823887", "0.5815823", "0.5815663", "0.57851166", "0.57823116", "0.57737005", "0.57589626", "0.5757036", "0.5756559", "0.57534635", "0.575345", "0.5753006", "0.57529324", "0.57513225", "0.57431006", "0.57420605", "0.5730302", "0.5729999", "0.57214147", "0.5707789", "0.5702723", "0.568218", "0.5681073", "0.56798404", "0.5679477", "0.5676429", "0.56581295", "0.56562054", "0.56543934", "0.5642631", "0.5639798", "0.56377053", "0.5610805" ]
0.5745104
81
Get the validation rules that apply to the request.
public function rules() { return array_merge(parent::rules(), [ 'device_name' => 'required', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Get the needed authorization credentials from the request.
public function getCredentials() { $credentials = parent::getCredentials(); unset($credentials['password']); return $credentials; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCredentials(Request $request)\n {\n $extractor = new AuthorizationHeaderTokenExtractor(\n 'Bearer',\n 'Authorization'\n );\n\n $token = $extractor->extract($request);\n\n if (!$token) {\n return;\n }\n\n return $token;\n }", "protected function getCredentials(Request $request)\n\t{\n\t\treturn $request->all();\n\t}", "protected function credentials(Request $request)\n\t{\n\t return $request->only($this->username(), 'password');\n\t}", "protected function credentials(Request $request)\n {\n return $request->only($this->username(), $this->password());\n }", "public function retrieveAuthCredentials()\n\t{\n\t\t// Since PHP saves the HTTP Password in a bunch of places, we have to be able to test for all of them\n\t\t$username = $password = NULL;\n\t\t\n\t\t// mod_php\n\t\tif (isset($_SERVER['PHP_AUTH_USER'])) \n\t\t{\n\t\t $username = (isset($_SERVER['PHP_AUTH_USER'])) ? $_SERVER['PHP_AUTH_USER'] : NULL;\n\t\t $password = (isset($_SERVER['PHP_AUTH_PW'])) ? $_SERVER['PHP_AUTH_PW'] : NULL;\n\t\t}\n\n\t\t// most other servers\n\t\telseif ($_SERVER['HTTP_AUTHENTICATION'])\n\t\t{\n\t\t\tif (strpos(strtolower($_SERVER['HTTP_AUTHENTICATION']),'basic') === 0)\n\t\t\t{\n\t\t\t\tlist($username,$password) = explode(':',base64_decode(substr($_SERVER['HTTP_AUTHENTICATION'], 6)));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check them - if they're null a/o empty, they're invalid.\n\t\tif ( is_null($username) OR is_null($password) OR empty($username) OR empty($password))\n\t\t\treturn FALSE;\n\t\telse\n\t\t\treturn array('username' => $username, 'password' => $password);\n\t}", "protected function getCredentials(Request $request)\n {\n return $request->only('email', 'password');\n }", "public function getCredentials(Request $request)\n {\n }", "public function getAuth()\n {\n $this->getRequestHeaders([\n 'X-User-Id', 'X-Auth-Token'\n ]);\n }", "protected function credentials(Request $request)\n {\n return $request->only($this->username());\n }", "protected function credentials(Request $request)\n {\n return $request->only($this->username());\n }", "protected function credentials(Request $request)\n {\n return $request->only($this->username(), 'password');\n }", "protected function credentials(Request $request)\n {\n return $request->only($this->username(), 'password');\n }", "protected function credentials(Request $request)\n {\n return $request->only($this->username(), 'password');\n }", "protected function credentials(Request $request)\n {\n return $request->only($this->username(), 'password');\n }", "public function getCredentials()\n { return $this->get('credentials'); }", "function getUserFromRequest() {\n return array_key_exists('HTTP_AUTHORIZATION', $_SERVER) ? intval($_SERVER['HTTP_AUTHORIZATION']) : NULL;\n}", "public function getCredentials(Request $request)\n {\n return [\n// 'username' => trim($request->headers->get('X-DOMjudge-Login')),\n 'username' => $this->getEmailFromSchematics(trim($request->request->get('token', ''))),\n 'password' => $password = base64_decode(trim($request->request->get('token', ''))),\n ];\n }", "public function getAuthorizationDetails($requestParameters = array());", "protected function credentials(Request $request)\n {\n return $request->only('email', 'password');\n }", "protected function credentials(Request $request)\n {\n return $request->only('email', 'password');\n }", "protected function credentials(Request $request)\n {\n return $request->only(\n 'email', 'password', 'password_confirmation', 'token'\n );\n }", "protected function credentials(Request $request)\n {\n return $request->only(\n 'email',\n 'password',\n 'password_confirmation',\n 'token'\n );\n }", "private function getAuthHeader()\n\t\t{\n\t\t\tif (isset($_SERVER['Authorization'])) {\n\t\t\t\treturn $_SERVER['Authorization'];\n\t\t\t} elseif (function_exists('apache_request_headers')) {\n\t\t\t\t$headers = apache_request_headers();\n\t\t\t\tif (isset($headers['Authorization'])) {\n\t\t\t\t\treturn $headers['Authorization'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthrow new Exception(\"No authorization data!\");\n\t\t}", "protected function getCredentials(Request $request) {\n return [\n 'email' => $request->input('email'),\n 'password' => $request->input('password'),\n 'role_type' => 'admin'\n ];\n }", "protected function credentials(Request $request)\n {\n // return $request->only($this->username(), 'password');\n $credentials = $request->only($this->username(), 'password'); \n $credentials['active'] = 1; \n return $credentials;\n }", "private function getCredentials(AuthenticateRequest $request)\n {\n return [\n 'email' => $request->input('email'),\n 'password' => $request->input('password'),\n ];\n }", "public function getCredentials(Request $request) {\n $uri = $request->server->get('REQUEST_URI');\n preg_match('/\\/[i,b,u,g]\\/[0-9A-z]{8}\\//', $uri, $matches); // get page id from url\n// $prefered = $request->getPreferredLanguage();\n// $lang = ($prefered == 'cs' || $prefered == 'cz') ? 'cz' : 'en';\n return array(\n 'clientId' => $request->cookies->get('clientId'),\n 'googleId' => $request->cookies->get('googleId'),\n 'pageId' => sizeof($matches) > 0 ? substr($matches[0], 3, 8) : null,\n 'pageType' => sizeof($matches) > 0 ? substr($matches[0], 1, 1) : null,\n 'shareLink' => key($request->query->all()),\n// 'language' => $lang\n );\n }", "public function auth() {\n \n // state 1 requires a GET variable to exist\n if($this->state == 1 && !isset($_GET['oauth_verifier'])) {\n $this->state = 0;\n }\n\n // Step 1: Get a request token\n if($this->state == 0) {\n return $this->getRequestToken();\n }\n\n // Step 2: Get an access token\n elseif($this->state == 1) {\n return $this->getAccessToken();\n }\n\n // Step 3: Verify the access token\n return $this->verifyAccessToken();\n }", "protected function credentials(Request $request)\n {\n return $request->only('email');\n }", "abstract public function getCredentials();", "protected function getCredentials(Request $request)\n {\n $credentials = $request->only($this->loginUsername(), 'password');\n \n return array_merge($credentials, ['site_id' => site()->getCurrent()->id]);\n }", "protected function credentials(Request $request) {\n return [\n 'username' => $request->input('username'),\n 'password' => $request->input('password'),\n 'isactive' => 1,\n 'isdeleted' => 0\n ];\n }", "public function requestAuth()\n {\n return null;\n }", "protected function getCredentials(Request $request)\n \n {\n //if ('active' != false){\n return [\n 'email' => $request->input('email'),\n 'password' => $request->input('password')\n //'active' => 1\n ];\n }", "protected function credentials(Request $request)\n {\n return $request->only($this->username(), 'pincode');\n }", "protected function credentials(Request $request)\n {\n $user_credentials = $request->only($this->username(), 'password');\n $user_credentials['active'] = 1;\n\n return $user_credentials;\n }", "public function auth_request()\n {\n // request the user information\n $url = $this->tmhOAuth->url('1.1/account/verify_credentials');\n $file = $this->sanitize($url);\n\n if ($cached_file = $this->get_cached_file($file)) {\n return json_decode($cached_file, true);\n } else {\n $code = $this->tmhOAuth->user_request([\n 'url' => $url\n ]);\n\n // If the request fails, check to see if there's an older cached file we can use\n if ($code <> 200) {\n if ($cached_file = $this->get_cached_file($file, true)) {\n return json_decode($cached_file, true);\n } else {\n if ($code == 429) {\n die(\"Exceeded Twitter API rate limit\");\n }\n\n die(\"verify_credentials connection failure\");\n }\n }\n\n // Decode JSON\n $json = $this->tmhOAuth->response['response'];\n\n $this->set_cached_file($file, $json);\n\n return json_decode($json, true);\n }\n }", "public function getCredentials(Request $request) {\n $data = json_decode($request->getContent(), TRUE);\n\n $fields = [\n 'time' => 'is_numeric',\n 'nonce' => 'is_string',\n 'hash' => 'is_string',\n ];\n $result = $this->basicAuthenticator($fields, $data);\n if (!empty($result['error'])) {\n return new JsonResponse($result, self::ACQTEST_SUBSCRIPTION_SERVICE_UNAVAILABLE);\n }\n\n if (!empty($data['body']['email'])) {\n $account = user_load_by_mail($data['body']['email']);\n \\Drupal::logger('getCredentials password')->debug($account->getPassword());\n if (empty($account) || $account->isAnonymous()) {\n return new JsonResponse($this->errorResponse(self::ACQTEST_SUBSCRIPTION_VALIDATION_ERROR, t('Account not found')), self::ACQTEST_SUBSCRIPTION_SERVICE_UNAVAILABLE);\n }\n }\n else {\n return new JsonResponse($this->errorResponse(self::ACQTEST_SUBSCRIPTION_VALIDATION_ERROR, t('Invalid arguments')), self::ACQTEST_SUBSCRIPTION_SERVICE_UNAVAILABLE);\n }\n\n $hash = CryptConnector::acquiaHash($account->getPassword(), $data['authenticator']['time'] . ':' . $data['authenticator']['nonce']);\n if ($hash === $data['authenticator']['hash']) {\n $result = [];\n $result['is_error'] = FALSE;\n $result['body']['subscription'][] = [\n 'identifier' => self::ACQTEST_ID,\n 'key' => self::ACQTEST_KEY,\n 'name' => self::ACQTEST_ID,\n ];\n return new JsonResponse($result);\n }\n else {\n return new JsonResponse($this->errorResponse(self::ACQTEST_SUBSCRIPTION_VALIDATION_ERROR, t('Incorrect password.')), self::ACQTEST_SUBSCRIPTION_SERVICE_UNAVAILABLE);\n }\n }", "public function getCredentials(Request $request)\n {\n $credentials = [\n 'username' => $request->request->get('_username'),\n 'password' => $request->request->get('_password'),\n 'csrf_token' => $request->request->get('_csrf_token'),\n ];\n\n $request->getSession()->set(\n Security::LAST_USERNAME,\n $credentials['username']\n );\n\n return $credentials;\n }", "public function getCredentials()\n {\n return $this->credentials;\n }", "public function getCredentials()\n {\n return $this->credentials;\n }", "private function getAuthorization()\n {\n // Post id_token\n if (new DateTime() > $this->tokenExpire) {\n $this->refreshToken();\n }\n $data = [\n 'authenticationToken' => $this->idToken,\n ];\n $url = \"https://api2.ov-chipkaart.nl/femobilegateway/v1/api/authorize\";\n $authorizationResponse = (self::Execute($url, $data));\n\n // Returns string\n $this->authorizationToken = $authorizationResponse['o'];\n }", "public function getAuth();", "public function getAuth();", "private function getAuthenticatedUser(){\n\t\t\n\t\tprint_r($this->Request\t);\n\n\t}", "public static function getServerAuthentication() {\n $header = array();\n // PHP as Apache module provides a SAPI function.\n // PHP 5.4+ enables getallheaders() also for FastCGI.\n if (function_exists('getallheaders')) {\n $headers = getallheaders();\n if (isset($headers['Authorization'])) {\n $input = $headers['Authorization'];\n }\n }\n // PHP as CGI with server/.htaccess configuration (e.g., via mod_rewrite)\n // may transfer/forward HTTP request data into server variables.\n elseif (isset($_SERVER['HTTP_AUTHORIZATION'])) {\n $input = $_SERVER['HTTP_AUTHORIZATION'];\n }\n // PHP as CGI may provide HTTP request data as environment variables.\n elseif (isset($_ENV['HTTP_AUTHORIZATION'])) {\n $input = $_ENV['HTTP_AUTHORIZATION'];\n }\n if (isset($input)) {\n preg_match_all('@([^, =]+)=\"([^\"]*)\"@', $input, $header);\n $header = array_combine($header[1], $header[2]);\n }\n return $header;\n }", "public function getCredentials()\n {\n return $this->provider . '_' . $this->oAuthId;\n }", "protected function getCredentials(Request $request)\n {\n return [\n 'email' => $request->get('email'),\n 'password'=>$request->get('password'),\n 'active'=> 1,\n 'confirmation_token'=> null\n ];\n\n }", "public function get_authorization(){\n\t\t$bvars = $this->get_bvars();\n\t\tif ( array_key_exists( 'Authorization', $bvars ) ) {\n\t\t\treturn $bvars[ 'Authorization' ];\t\n\t\t}\n\t\t\n\t\treturn 'Basic Kjo=';\n\t}", "public static function getAccessToken()\n {\n $authorization = request()->header('Authorization');\n // $authorization = @getallheaders()['Authorization'];\n // before running unit tests...\n //$authorization = '$2y$10$tSM.PiN9BnMfyonqjHlwTONa1DPHbyQSAMOtmt4chJYXenGeYySHC';\n return (isset($authorization))?$authorization:null;\n }", "public static function auth()\n {\n return (new Authenticator(request()));\n }", "public function getCredentials() {\r\n\t\t\r\n\t\treturn $this->_credentials;\r\n\t\t\r\n\t}", "public function getCredentials(Request $request)\n {\n $code = $request->query->get('code');\n\n $application = $this->commonGroundService->cleanUrl(['component'=>'wrc', 'type'=>'applications', 'id'=>$this->params->get('app_id')]);\n $providers = $this->commonGroundService->getResourceList(['component' => 'uc', 'type' => 'providers'], ['type' => 'id-vault', 'application' => $this->params->get('app_id')])['hydra:member'];\n $provider = $providers[0];\n\n $backUrl = $request->query->get('backUrl', false);\n if ($backUrl) {\n $this->session->set('backUrl', $backUrl);\n }\n\n $accessToken = $this->idVaultService->authenticateUser($code, $provider['configuration']['app_id'], $provider['configuration']['secret']);\n\n $json = base64_decode(explode('.', $accessToken['id_token'])[1]);\n $json = json_decode($json, true);\n\n $credentials = [\n 'username' => $json['email'],\n 'email' => $json['email'],\n 'givenName' => $json['given_name'],\n 'familyName' => $json['family_name'],\n 'id' => $json['jti'],\n 'authorization' => $accessToken['access_token'],\n 'newUser' => $accessToken['newUser'],\n 'groups' => $json['groups'],\n 'organizations' => $json['organizations']\n ];\n\n $request->getSession()->set(\n Security::LAST_USERNAME,\n $credentials['username']\n );\n\n return $credentials;\n }", "protected function credentials(Request $request)\n {\n $credentials = array('email' => $request->input('email'), 'password' => $request->input('password'), 'is_active' => 1);\n return $credentials;\n }", "public function getCredential();", "public function _setRawCredentials()\n\t{\n\t\t/* Check if an API Key or Access Token has been passed as a parameter in the query string. Because of the\n\t\t\tobvious security issues with this, we do not recommend it, but sometimes it is the only choice */\n\t\tif ( isset( \\IPS\\Request::i()->key ) )\n\t\t{\n\t\t\t$this->rawApiKey = \\IPS\\Request::i()->key;\n\t\t\treturn;\n\t\t}\n\t\tif ( isset( \\IPS\\Request::i()->access_token ) and ( !\\IPS\\OAUTH_REQUIRES_HTTPS or \\IPS\\Request::i()->isSecure() ) )\n\t\t{\n\t\t\t$this->rawAccessToken = \\IPS\\Request::i()->access_token;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* Look for an API key in an automatically decoded HTTP Basic header */\n\t\tif ( isset( $_SERVER['PHP_AUTH_USER'] ) )\n\t\t{\n\t\t\t$this->rawApiKey = $_SERVER['PHP_AUTH_USER'];\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* If we're still here, try to find an Authorization header - start with $_SERVER... */\n\t\t$authorizationHeader = NULL;\n\t\tforeach ( $_SERVER as $k => $v )\n\t\t{\n\t\t\tif ( mb_substr( $k, -18 ) == 'HTTP_AUTHORIZATION' )\n\t\t\t{\n\t\t\t\t$authorizationHeader = $v;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* ...if we didn't find anything there, try apache_request_headers() */\n\t\tif ( !$authorizationHeader and \\function_exists('apache_request_headers') )\n\t\t{\n\t\t\t$headers = @apache_request_headers();\n\t\t\tif ( isset( $headers['Authorization'] ) )\n\t\t\t{\n\t\t\t\t$authorizationHeader = $headers['Authorization'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* If we managed to get one, set if it's an API Key or an Access Token */\n\t\tif ( $authorizationHeader )\n\t\t{\n\t\t\tif ( mb_substr( $authorizationHeader, 0, 7 ) === 'Bearer ' and ( !\\IPS\\OAUTH_REQUIRES_HTTPS or \\IPS\\Request::i()->isSecure() ) )\n\t\t\t{\n\t\t\t\t$this->rawAccessToken = mb_substr( $authorizationHeader, 7 );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$exploded = explode( ':', base64_decode( mb_substr( $authorizationHeader, 6 ) ) );\n\t\t\t\tif ( isset( $exploded[0] ) )\n\t\t\t\t{\n\t\t\t\t\t$this->rawApiKey = $exploded[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getCredentialsFetcher()\n {\n if ($this->credentialsFetcher) {\n return $this->credentialsFetcher;\n }\n\n if ($this->keyFile) {\n return CredentialsLoader::makeCredentials($this->scopes, $this->keyFile);\n }\n\n return ApplicationDefaultCredentials::getCredentials($this->scopes, $this->authHttpHandler);\n }", "function authGet() { }", "public function getCredentials()\n\t{\n\t\treturn $this->credentials;\n\t}", "public function getCredentials() {\n\t\t\n\t\treturn $this->_getResponse(self::URL_USERS_VERIFY_CREDENTIALS, $this->_query);\n\t}", "public static function getRequest(){\n return \\Illuminate\\Auth\\Guard::getRequest();\n }", "public function getAuthorization(): string\n {\n return self::PREFIX . base64_encode($this->username . ':' . $this->password);\n }", "protected function credentials(Request $request)\n {\n $credentials = $request->only($this->username(), 'password');\n $credentials['password'] .= UserService::STATIC_PASSWORD_SALT;\n\n return $credentials;\n }", "public function authorize(): ExternalOauth2Credential {\n if (!$this->currentlyHasAToken()) {\n $_credentials = $this->_getAuthenticationCredentialsFromExternalApplication();\n $this->_writeCredentialsToDatabase($_credentials);\n }\n $_credentials = $this->getCredentials();\n if ($this->isTokenExpired()) {\n $this->refreshOauth2Token();\n }\n return $_credentials;\n }", "public function getCredentials() {\n\t\treturn $this->_credentials;\n\t}", "private function credentialByRequest()\n {\n $isSandboxed = $this->isSandboxed();\n\n $clientIdKey = $isSandboxed ? Storable::OPTION_CLIENT_ID_SANDBOX : Storable::OPTION_CLIENT_ID;\n $clientSecretKey = $isSandboxed ? Storable::OPTION_SECRET_ID_SANDBOX : Storable::OPTION_SECRET_ID;\n\n $clientIdKey = Storable::OPTION_PREFIX . $clientIdKey;\n $clientSecretKey = Storable::OPTION_PREFIX . $clientSecretKey;\n\n $clientId = (string)filter_input(INPUT_POST, $clientIdKey, FILTER_SANITIZE_STRING);\n $clientSecret = (string)filter_input(INPUT_POST, $clientSecretKey, FILTER_SANITIZE_STRING);\n\n return new Credential($clientId, $clientSecret);\n }", "public function authenticate($request);", "public function getUserCredential()\n {\n return $this->userCredentials;\n }", "public function getCredentials(): OAuthCredentials\n {\n return $this->credentials;\n }", "private function _getAuth()\n {\n if (!isset($_SERVER['PHP_AUTH_USER'])) {\n header('WWW-Authenticate: Basic realm=\"My Realm\"');\n header('HTTP/1.0 401 Unauthorized');\n echo 'Sorry this action is not allowed for you';\n return false;\n } else {\n \n if ($_SERVER['PHP_AUTH_USER'] == 'testUser' && $_SERVER['PHP_AUTH_PW'] == 'testPassword') {\n return true;\n }\n \n return false;\n \n }\n }", "protected function credentials(Request $request)\n {\n $domain = Domain::where('domain', getDomainOfEmailAddress($request->get('email')))->first();\n return [\n 'local_part' => getLocalPartOfEmailAddress($request->get('email')),\n 'domain_id' => $domain ? $domain->id : null,\n 'password' => $request->get('password'),\n 'password_confirmation' => $request->get('password_confirmation'),\n 'token' => $request->get('token'),\n 'active' => 1\n ];\n }", "protected function credentials(Request $request)\n {\n return array_merge($request->only($this->username(), 'password'), ['is_enabled' => true]);\n }", "protected function credentials(Request $request): array\n {\n return $request->only('username', 'email', 'password');\n }", "public function authorize($scope)\n {\n return CredentialsLoader::makeHttpClient($this->getCredentials($scope));\n }", "private function getUserByRequestCredentials(Request $request)\n {\n if (null !== $u = $request->get('u')) {\n $username = str_replace('\\40', '@', $u);\n if (null !== $user = $this->getRepository('user')->findOneByEmailPro($username)) {\n return $user;\n }\n } else {\n $credentialsHeader = $request->headers->get('Authorization');\n $encodedCredentials = str_replace('Basic ', '', $credentialsHeader);\n if (null !== $userId = $this->get('session')->get('chat.auth.'.$encodedCredentials)) {\n return $this->getRepository('user')->find($userId);\n } else {\n if (false !== $credentialsHeader = base64_decode($encodedCredentials)) {\n $credentialsHeader = explode(':', $credentialsHeader);\n $username = isset($credentialsHeader[0]) ? $credentialsHeader[0] : '';\n $username = str_replace('\\40', '@', $username);\n $password = isset($credentialsHeader[1]) ? $credentialsHeader[1] : '';\n }\n\n if (!empty($username) && !empty($password) && filter_var($username, FILTER_VALIDATE_EMAIL)) {\n if (null !== $user = $this->getRepository('user')->findOneByEmailPro($username)) {\n if ((null !== $userToken = $user->getMeta($user::META_TOKEN_CHAT)) && $userToken->getValue() === $password) {\n if ($user->isEnabled()) {\n $this->get('session')->set('chat.auth.'.$encodedCredentials, $user->getId());\n return $user;\n }\n }\n }\n }\n }\n }\n\n\n return null;\n }", "public static function getAuthenticationParameters(): array\n {\n return FoodDatabase::getApiCredentials();\n }", "public function getOtherAuthorizationRequestParams() {\n }", "function authorize($request) {\n return $this->Session->get('auth-valid');\n }", "protected function credentials(Request $request)\n\t{\n\t\t$credentials = $request->only(\n\t\t\t'email', 'password', 'resetToken'\n\t\t);\n\t\t$credentials['token'] = $credentials['resetToken'];\n\t\t$credentials['password_confirmation'] = $credentials['password'];\n\t\tunset($credentials['resetToken']);\n\t\treturn $credentials;\n\t}", "public function getCredentials()\n {\n if ($this->login) return array( $this->login, $this->password);\n\n //Using static PureBilling as fallback\n if (class_exists('\\PureBilling') && \\PureBilling::getPrivateKey()) {\n return array('api', \\PureBilling::getPrivateKey());\n }\n }", "protected function credentials(Request $request)\n {\n return array_merge($request->only($this->username(), 'password'), ['confirmed' => 1, 'is_social' => 0]);\n }", "public function authenticationReqd(){\n\t\theader('HTTP/1.0 401 Unauthorized');\n\t\t$this['app']['hologram']->setModule(\"WWW\")->log(\\Bakery\\Utilities\\Hologram::NORMAL, \"Response: Page requires authentication\");\r\n\t\t\n\t\t$_SESSION['redirect_to'] = $this['request']['uri'];\n\t\t\n\t\tif($this->isJson()){\n\n\t\t\treturn array(\"response\" => \"authentication required\");\n\t\t\t\n\t\t}\n\t\t\n\t\theader(\"Location: {$this['app']['security.login']['handler']}\");\n\t\t\n\t}", "function wp_populate_basic_auth_from_authorization_header()\n {\n }", "public function getUserCredentials() {\n $rawUsername;\n $rawPassword;\n\n if ($this->userRequest->registrationPOST()) {\n $rawUsername = \n $this->userRequest->getRegisterUsername();\n $rawPassword =\n $this->userRequest->getRegisterPassword();\n }\n\n if ($this->userRequest->wantsToLogIn()) {\n $rawUsername =\n $this->userRequest->getLoginUsername();\n $rawPassword =\n $this->userRequest->getLoginPassword();\n }\n\n $userCredentials = new UserCredentials($rawUsername, $rawPassword);\n\n return $userCredentials;\n }", "public function authenticatedRequest(Google_Http_Request $request)\n {\n $request = $this->sign($request);\n return $this->io->makeRequest($request);\n }", "public function getAuthHeader()\n {\n return [\n 'auth' => [\n $this->username,\n $this->password,\n ],\n ];\n }", "public function getAuth()\n {\n return $this->get('core.auth');\n }", "public static function GetSessionAuthorization ();", "private function get_auth_cookie() {\r\n $postfields = http_build_query([\r\n 'username' => $this->username,\r\n 'password' => $this->password,\r\n 'csrfmiddlewaretoken' => $this->csrf_token\r\n ]);\r\n curl_setopt_array($this->curl_handle, [\r\n CURLOPT_URL => $this->auth_url,\r\n CURLOPT_COOKIEJAR => self::COOKIE_FILE,\r\n CURLOPT_COOKIEFILE => self::COOKIE_FILE,\r\n CURLOPT_POST\t => false,\r\n CURLOPT_POSTFIELDS => $postfields,\r\n CURLOPT_FAILONERROR => true,\r\n CURLOPT_FOLLOWLOCATION => true,\r\n CURLOPT_REFERER => $this->auth_url,\r\n CURLOPT_AUTOREFERER => true,\r\n CURLOPT_HTTPHEADER => ['User-Agent: '.self::USER_AGENT],\r\n //CURLOPT_VERBOSE => true,\r\n CURLOPT_RETURNTRANSFER => true\r\n ]);\r\n\r\n curl_exec($this->curl_handle);\r\n }", "private function getCreds()\n {\n $store = Craft::$app->request->getQueryParam('store');\n $suffix = $store ? '_'.$store : '';\n if (!$url = getenv('SHOPIFY_URL'.$suffix)) {\n throw new Exception('Missing SHOPIFY_URL');\n }\n if (!$token = (getenv('SHOPIFY_ADMIN_API_ACCESS_TOKEN'.$suffix) ?:\n getenv('SHOPIFY_API_PASSWORD'.$suffix))) {\n throw new Exception('Missing SHOPIFY_ADMIN_API_ACCESS_TOKEN');\n }\n return [$url, $token];\n }", "private static function getAuthoriza()\n\t{\n\t\t$data = ['Authorization' => 'Basic '.base64_encode(self::api_key)];\n\t\treturn $data;\n\t}", "public function authentication()\n {\n $response = new RESTAPI_CLASS_Response();\n $headers = self::getRequestHeaders();\n if (!isset($headers['Authorization'])) {\n return $response->error(401, \"Token is not exist.\");\n }\n\n $auth = explode(' ', $headers['Authorization']);\n if ($model = RESTAPI_BOL_Service::getInstance()->checkToken($auth[1])) {\n $this->token = $auth[1];\n return $model;\n } else {\n return $response->error(401, \"Your access denied.\");\n }\n }", "protected function autoAuthenticate(Request $request)\n {\n $accessRepository = $this->getDoctrine()->getRepository('ApiBundle:Access');\n $securityProvider = $this->get('icetig_api.provider.security');\n\n if (\n null !== ($authorizationHeader = $request->headers->get('Authorization'))\n && ($authorizationHeader = explode(' ', $authorizationHeader))\n && 2 === count($authorizationHeader)\n && ($hmacOptions = explode(',', $authorizationHeader[1]))\n && 'HMAC' === $authorizationHeader[0]\n && null !== ($accessToken = $request->cookies->get(self::ACCESS_TOKEN_COOKIE_NAME))\n && ($access = $accessRepository->findOneBy(['accessToken' => $accessToken])) instanceof Access\n ) {\n $hmacOptionsArray = [];\n foreach ($hmacOptions as $hmacOption) {\n if (\n ($hmacOptionArray = explode('=', $hmacOption))\n && 2 === count($hmacOptionArray)\n ) {\n $hmacOptionsArray[$hmacOptionArray[0]] = $hmacOptionArray[1];\n }\n }\n\n $hmacOptionsArray['key'] = $access->getSignatureToken();\n\n if ($securityProvider->isWellSignedRequest($hmacOptionsArray, $request)) {\n return $access;\n }\n }\n\n return null;\n }", "public function getAuth() {\n\t\treturn $this->auth;\n\t}", "function getAuthQueryString(Request $request)\n {\n $clientId = $request->query->get('client_id');\n $scope = $request->query->get('scope');\n $state = $request->query->get('state');\n $redirectUrl = $request->query->get('redirect_uri');\n\n $result = [];\n if (!empty($clientId)) {\n $result['client_id'] = $clientId;\n }\n\n if (!empty($scope)) {\n $result['scope'] = $scope;\n }\n\n if (!empty($state)) {\n $result['state'] = $state;\n }\n\n if (!empty($redirectUrl)) {\n $result['redirect_uri'] = $redirectUrl;\n }\n\n return $result;\n }", "protected function getToken()\n {\n // We have a stateless app without sessions, so we use the cache to\n // retrieve the temp credentials for man in the middle attack\n // protection\n $key = 'oauth_temp_'.$this->request->input('oauth_token');\n $temp = $this->cache->get($key, '');\n\n return $this->server->getTokenCredentials(\n $temp,\n $this->request->input('oauth_token'),\n $this->request->input('oauth_verifier')\n );\n }", "public function authorize()\n {\n return $this->json();\n }", "public function credential()\n {\n return $this->credentials();\n }", "public function extractAccessToken(Request $request)\n {\n $accessToken = null;\n\n if($this->getIn() == 'query') {\n $obj = $request->query;\n }\n else {\n $obj = $request->headers;\n }\n\n if($obj->has($this->getName())) {\n $accessToken = $obj->get($this->getName());\n }\n\n return $accessToken;\n }", "abstract protected function _handleAuthRequest(Zend_Controller_Request_Abstract $request);", "protected function credentials(Request $request)\n {\n $field = filter_var($request->get($this->username()), FILTER_VALIDATE_EMAIL)\n ? $this->username()\n : 'username';\n\n return [\n $field => $request->get($this->username()),\n 'password' => $request->password,\n ];\n }" ]
[ "0.6970765", "0.6699935", "0.6676629", "0.6652321", "0.6644149", "0.66351587", "0.6632175", "0.65567905", "0.6520056", "0.6520056", "0.64988875", "0.64988875", "0.64988875", "0.64988875", "0.6435129", "0.63794345", "0.63547355", "0.63226014", "0.6320854", "0.6320854", "0.63159364", "0.62832075", "0.6268926", "0.6264894", "0.6262388", "0.62594265", "0.6253316", "0.62448126", "0.6177306", "0.61688966", "0.6161872", "0.6144314", "0.6133229", "0.6113497", "0.6086378", "0.60469145", "0.6042002", "0.60355914", "0.6024661", "0.5984554", "0.5984554", "0.59824425", "0.59643346", "0.59643346", "0.59622854", "0.59593415", "0.5952339", "0.59522617", "0.594089", "0.59376955", "0.59084064", "0.5905077", "0.5902109", "0.5891528", "0.58784735", "0.5872548", "0.58715624", "0.5868684", "0.5867798", "0.5859606", "0.58574504", "0.5852124", "0.58351403", "0.5810494", "0.58088636", "0.58013076", "0.5792608", "0.5772093", "0.57577586", "0.57465434", "0.5746169", "0.5739025", "0.5729237", "0.56920695", "0.5685769", "0.56715864", "0.5671303", "0.5670936", "0.56556594", "0.5651151", "0.5650092", "0.5644658", "0.563716", "0.562878", "0.5614996", "0.56107765", "0.5580381", "0.55757505", "0.55715376", "0.5565636", "0.55550164", "0.5551056", "0.5547894", "0.5541492", "0.55176187", "0.5514163", "0.5512534", "0.55076516", "0.55031294", "0.5502893", "0.5494863" ]
0.0
-1
Applies one or more operations before children of the node are visited.
public function visitEnter(NodeInterface $node);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function compute(): void\n {\n try {\n $this->emit(new Group\\Start($this->parser));\n $this->getLeftNode()->compute();\n $this->emit($this);\n $this->getRightNode()->compute();\n $this->emit(new Group\\End($this->parser));\n } catch (NodeHandledException $e) {\n return;\n }\n }", "protected function preorder($nodes){\n if(empty($nodes)){\n return;\n }\n\n foreach($nodes as $node){\n $this->visit_root($node);\n\n $this->visit_children($node);\n }\n }", "public function evaluateChildNodes();", "public function beginChildren()\n {\n parent::beginChildren();\n\n $this->call($this->descendCallback);\n }", "public function applyToNode(Node $node);", "function add_children(){\n\t\t\t\t\t//if the array has a parent add it to the parents child array\n\t\tforeach ($this->nodes as $node){\n\t\t\tif($node->parent!=-1){\n\t\t\t\tif(isset($this->nodes[$node->parent])){\n\t\t\t\t\t$parent=$this->nodes[$node->parent];\n\t\t\t\t\t$parent->add_child($node->id);\n\t\t\t\t}else{\n\t\t\t\t\tprint_error('nonode','socialwiki');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function inOrder(): void\n {\n $this->_inOrder($this->root);\n }", "function _modifyTree () {\r\n return true;\r\n }", "public function iterateChildren();", "function apply($node)\r\n\t\t{\r\n\t\t\t$this->address = $node->address;\r\n\t\t\t$this->elements = $node->elements;\r\n\t\t\t$this->size = $node->size;\r\n\t\t\t$this->parent = $node->parent;\r\n\t\t\t$this->less = $node->less;\r\n\t\t\t$this->previous = $node->previous;\r\n\t\t\t$this->next = $node->next;\r\n\t\t}", "protected function processFileTree () {\n\t\t$files = $this->populateFileTree();\n\t\tforeach ($files as $file) {\n\t\t\t$this->processFile($file);\n\t\t}\n\t}", "public function calc_tree()\n\t{\n\t\t$this->readTree(TRUE);\t\t\t// Make sure we have accurate data\n\t\tforeach ($this->class_parents as $cp)\n\t\t{\n\t\t\t$rights = array();\n\t\t\t$this->rebuild_tree($cp,$rights);\t\t// increasing rights going down the tree\n\t\t}\n\t}", "protected function execute()\n {\n // Try to execute nodes while there are executable nodes on the stack.\n do\n {\n // Flag that indicates whether a node has been executed during the\n // current iteration of the loop.\n $executed = false;\n\n // Iterate the stack of activated nodes.\n foreach ($this->activatedNodes as $key => $node) {\n \n // Only try to execute a node if the execution of the\n // workflow instance has not ended yet.\n if ($this->cancelled && $this->ended) {\n // @codeCoverageIgnoreStart\n break;\n // @codeCoverageIgnoreEnd\n }\n\n // The current node is an end node but there are still\n // activated nodes on the stack.\n if ( $node instanceof End && !$node instanceof Cancel &&\n $this->numActivatedNodes != $this->numActivatedEndNodes) {\n continue;\n }\n\n // Execute the current node and check whether it finished\n // executing.\n if ($node->execute($this)) {\n \n // Remove current node from the stack of activated\n // nodes.\n unset($this->activatedNodes[$key]);\n $this->numActivatedNodes--;\n\n // Notify plugins that the node has been executed.\n if (!$this->cancelled && !$this->ended) {\n foreach ($this->plugins as $plugin) {\n $plugin->afterNodeExecuted($this, $node);\n }\n }\n\n // Toggle flag (see above).\n $executed = true;\n }\n }\n }\n\n while (!empty($this->activatedNodes) && $executed);\n\n // The stack of activated nodes is not empty but at the moment none of\n // its nodes can be executed.\n if (!$this->cancelled && !$this->ended) {\n $this->suspend();\n }\n }", "public function calc() {\n $this->getChildNodes(0, 0, 0);\n }", "public function traverse(): void\n {\n // Register data hooks on the table\n $this->registerHandlerDefinitions($this->definition->tableName, $this->definition->tca);\n \n // Register data hooks on the types and fields\n $this->traverseTypes();\n $this->traverseFields();\n \n // Allow externals\n $this->eventBus->dispatch(new CustomDataHookTraverserEvent($this->definition, function () {\n $this->registerHandlerDefinitions(...func_get_args());\n }));\n }", "function loadedChildren()\r\n {\r\n //Calls childrens loaded recursively\r\n reset($this->components->items);\r\n while (list($k,$v)=each($this->components->items))\r\n {\r\n $v->loaded();\r\n }\r\n }", "function preinit()\r\n {\r\n //Calls children's init recursively\r\n reset($this->components->items);\r\n while (list($k,$v)=each($this->components->items))\r\n {\r\n $v->preinit();\r\n }\r\n }", "public function beforeSave()\n {\n $this->rebuildTree();\n }", "function FixTree(&$tree)\r\n\t{\r\n\t\tusort($tree->children, array($this, \"SortByChild\"));\r\n\t\tif (!empty($tree->children))\r\n\t\tforeach ($tree->children as $cnode) $this->FixTree($cnode);\r\n\t}", "public function reorderChildren()\n {\n $sql = \"select ID_PAGE from \" . $this->mode . \"PAGE where PAG_IDPERE=\" . $this->getID() . \" order by PAG_POIDS\";\n $stmt = $this->dbh->prepare(\"update \" . $this->mode . \"PAGE set PAG_POIDS=:PAG_POIDS where ID_PAGE=:ID_PAGE\");\n $PAG_POIDS = 1;\n $stmt->bindParam(':PAG_POIDS', $PAG_POIDS, PDO::PARAM_INT);\n foreach ($this->dbh->query($sql)->fetchAll(PDO::FETCH_COLUMN) as $ID_PAGE) {\n $stmt->bindValue(':ID_PAGE', $ID_PAGE, PDO::PARAM_INT);\n $stmt->execute();\n $PAG_POIDS ++;\n }\n }", "public function afterUpdate(): void\n {\n if ($this->oldParentId != $this->owner->getAttribute($this->ownerParentIdAttribute)) {\n $this->rebuildTreePath();\n }\n }", "protected function actionPostLoadingEvent()\n {\n if (self::$child_data === null) {\n self::$child_data = [];\n foreach ($this->getParentModel()->children->child->iterateItems() as $node_uuid => $node) {\n if (empty((string)$node->enabled)) {\n continue;\n }\n $conn_uuid = (string)$node->connection;\n if (!isset(self::$child_data[$conn_uuid])) {\n self::$child_data[$conn_uuid] = [];\n }\n foreach (self::$child_attrs as $key) {\n if (!isset(self::$child_data[$conn_uuid][$key])) {\n self::$child_data[$conn_uuid][$key] = [];\n }\n self::$child_data[$conn_uuid][$key][] = (string)$node->$key;\n }\n }\n }\n foreach ($this->internalChildnodes as $node) {\n if (!$node->getInternalIsVirtual()) {\n $extra_attr = ['local_ts' => '', 'remote_ts' => ''];\n $conn_uuid = (string)$node->getAttribute('uuid');\n foreach (self::$child_attrs as $key) {\n $child_node = new TextField();\n $child_node->setInternalIsVirtual();\n if (isset(self::$child_data[$conn_uuid]) && !empty(self::$child_data[$conn_uuid][$key])) {\n $child_node->setValue(implode(',', array_unique(self::$child_data[$conn_uuid][$key])));\n }\n $node->addChildNode($key, $child_node);\n }\n }\n }\n return parent::actionPostLoadingEvent();\n }", "private function brokeTree()\n {\n $i = 0;\n foreach ($this->nodeIdList as $node) {\n $this->getDb()->createCommand()->update(\n self::tableName(),\n [\n $this->leftAttribute => ++$i,\n $this->rightAttribute => ++$i,\n $this->depthAttribute => 0,\n '_tree' => $this->globalParentNode,\n ],\n ['=', 'id', $node]\n )->query();\n }\n }", "protected function resolveChildren()\n {\n foreach ($this->unresolvedChildren as $name => $info) {\n $this->children[$name] = $this->create($name, $info['type'], $info['init_options'], $info['exec_options']);\n }\n\n $this->unresolvedChildren = array();\n }", "public function _templateProcessing($attrs, $children) {\r\n $this->processingFunction = function($controller) use($children) {\r\n foreach($children as $child) {\r\n $child->__invoke($controller);\r\n }\r\n };\r\n }", "protected function deleteChildren() {}", "abstract public function walk(callable $func, $recursively = false);", "function addChildren(array $children) : void;", "public function removeChildNodes() {}", "function walk($parent_id, $callback) {\n $callback($this, $parent_id);\n $children = $this->children($parent_id);\n foreach($children as $c) {\n $this->walk($c, $callback);\n }\n }", "public function optimizeIteration( ) {\n\t\tif ( ( ( self::ALTERNATE === $this->mType )\n\t\t && ( 1 === count( $this->mChildNodes ) )\n\t\t )\n\t\t || ( ( self::SEQUENCE === $this->mType )\n\t\t\t && ( 1 === count( $this->mChildNodes ) )\n\t\t\t )\n\t\t ){\n\t\t\t$son = $this->mChildNodes[0];\n\t\t\t\n\t\t\t$this->mType \t\t\t= $son->mType;\n\t\t\t$this->mToken \t\t\t= $son->mToken;\n\t\t\t$this->mChildNodes \t\t= $son->mChildNodes;\n\t\t\t$this->mLookAheadSet \t= $son->mLookAheadSet;\n\t\t\t$this->mASTSymbol \t= $son->mASTSymbol;\n\t\t\t$this->mEnclosingRule \t= $son->mEnclosingRule;\n\n\t\t\tforeach( $this->mChildNodes as $key => $value ) {\n\t\t\t\t$value->mParentNode = $this;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tif ( ( ( self::ALTERNATE === $this->mType )\n\t\t && ( 0 < count( $this->mChildNodes ) ) \n\t\t && ( self::ALTERNATE === $this->mChildNodes[0]->mType ) \n\t\t && ( 0 < count( $this->mChildNodes[0]->mChildNodes ) ) \n\t\t )\n\t\t ){\n\t\t\t\n\t\t\t$son = $this->mChildNodes[0]->mChildNodes[0];\n\t\t\t$this->appendChild( $son );\n\t\t\t\n\t\t\t$son->mParentNode = $this;\n\n\t\t\tarray_shift( $this->mChildNodes[0]->mChildNodes );\n\t\t\t\n\t\t}\n\n\n\n\t\tforeach( $this->mChildNodes as $key => $value ) {\n\t\t\t$value->optimizeIteration();\n\t\t}\n\t\t\n\t}", "public function getChildActions() {}", "public function processActionExpressions()\n {\n foreach( $this->getChildren() as $child ) {\n if( $child->getCode() == T_WLG_PAREN_START ) {\n // Ignore if parent is already an expression\n if( $child->getParent()->getCode() == T_WLG_EXPRESSION ) {\n continue;\n }\n $prev = $child->getPreviousSibling();\n $next = $child->getNextSibling();\n if( !$next || $next->getCode() != T_WLG_PAREN_STOP || !$prev ) {\n throw new Exception('Parse error!');\n }\n $token = Engine_Template_Token::factory(T_WLG_EXPRESSION);\n// $this->addChildBefore($token, $child);\n $prev->addChild($token);\n\n $child->remove();\n $next->remove();\n\n $token->addChild($child);\n $token->addChild($next);\n }\n }\n\n // Recurse\n foreach( $this->getChildren() as $child ) {\n $child->processActionExpressions();\n }\n\n return $this;\n }", "protected function _unmarkInternalTree(): void\n {\n $config = $this->getConfig();\n $this->_table->updateAll(\n function (QueryExpression $exp) use ($config) {\n $leftInverse = clone $exp;\n $leftInverse->setConjunction('*')->add('-1');\n $rightInverse = clone $leftInverse;\n\n return $exp\n ->eq($config['leftField'], $leftInverse->add($config['leftField']))\n ->eq($config['rightField'], $rightInverse->add($config['rightField']));\n },\n fn (QueryExpression $exp) => $exp->lt($config['leftField'], 0)\n );\n }", "public function PreOrderTraversal($node) {\r\n if($node != null){\r\n echo $node->data.\" \";\r\n $this->PreOrderTraversal($node->left);\r\n $this->PreOrderTraversal($node->right);\r\n }\r\n }", "public function preDelete(BaseObject $node)\n {\n $peer_name = get_class($node->getPeer());\n $node->reload(); // load the current node state\n\n $this->addPreDeleteStackEntries(self::shiftRLRange($peer_name,\n $node->getLeftValue(),\n $node->getRightValue(),\n -1,\n $node->getScopeIdValue()));\n\n $this->addPreDeleteStackEntries(self::shiftRLValues($peer_name,\n $node->getRightValue() + 1,\n -2,\n $node->getScopeIdValue()));\n\n // Take care of adjacency parameters\n if ($node->hasChildren())\n {\n $peer_name = get_class($node->getPeer());\n $node_class = get_class($node);\n $query = sprintf('UPDATE %s SET %s = %s WHERE %s = %s',\n constant(\"$peer_name::TABLE_NAME\"),\n self::getColumnConstant($node_class, 'parent', true),\n ($node->getParentIdValue() == Null)?'NULL':$node->getParentIdValue(),\n self::getColumnConstant($node_class, 'parent'),\n $node->getPrimaryKey());\n\n $con = Propel::getConnection();\n $statement = $con->prepareStatement($query);\n $statement->executeQuery();\n }\n\n $this->processPreDeleteStack();\n }", "private function apply_node_instructions() {\n // Add a new node visitor to the traverser\n $this->get_traverser()->addVisitor(new class($this) extends \\PhpParser\\NodeVisitorAbstract {\n public function __construct($file) {\n $this->file = $file;\n }\n\n /**\n * Applies all instructions to a node for a given type\n *\n * @param string $type The instruction type to be applied\n * @param \\PhpParser\\Node $node The node to be actioned\n * @return \\PhpParser\\Node\n */\n private function apply_instructions(string $type, \\PhpParser\\Node $node): \\PhpParser\\Node {\n // Retrieve all instructions by type\n $instructions = $this->file->get_instructions($type);\n\n // Check if has no leave instructions\n if (empty($instructions)) {\n return $node;\n }\n\n // Iterate over all instructions\n foreach($instructions as $instruction) {\n // Get the node type\n $instruction_node = $instruction->node;\n\n // Check if it's not the same as the current node\n if (!($node instanceof $instruction_node)) {\n continue;\n }\n\n // Extract the parameters\n $if = (array) $instruction->if;\n $do = (array) $instruction->do;\n\n // Check for all instructions\n foreach($if as $index => $cnd) {\n // Variable that will later handle if the condition was met\n $condition = false;\n\n // Check if condition is a callback\n if (is_callable($cnd)) {\n // Try matching it with the current node\n $condition = call_user_func_array($cnd, [$node]);\n } else {\n // Retrieve the index value\n $node_index = $node->{$index};\n\n // Check if the condition value is a string, and node index has a toString() method\n if (is_string($cnd[1]) && is_callable([$node_index, \"toString\"])) {\n // Call it\n $node_index = $node_index->toString();\n }\n\n // Evaluate the condition\n eval(\"\\$condition = \\$node_index \" . $cnd[0] . \" \" . escapeshellarg($cnd[1]) . \";\");\n }\n\n // Check if the condition was not met\n if (!$condition) {\n // Assert the failed condition\n $instruction->do_assertion(File\\Instruction::ASSERT_FAILED_CONDITION_NOT_MET, null);\n\n // Break the instruction\n break 2;\n }\n }\n\n // Do all instructions\n foreach($do as $action) {\n // Check if it's callable\n if (is_callable($action)) {\n // Just call the action\n call_user_func_array($action, [$node]);\n continue;\n }\n\n // Extract the action name\n $action_name = $action[\"action\"];\n unset($action[\"action\"]);\n\n // Check if is settings variables\n if ($action_name === \"set\") {\n // Iterate over all variables\n foreach($action[\"vars\"] ?? $action[\"variables\"] as $var => $value) {\n // Set the node variable value\n $node->{$var} = $value;\n }\n }\n }\n }\n\n return $node;\n }\n\n public function leaveNode(\\PhpParser\\Node $node) {\n return $this->apply_instructions(\"leave\", $node);\n }\n\n public function enterNode(\\PhpParser\\Node $node) {\n return $this->apply_instructions(\"enter\", $node);\n }\n });\n }", "public function preSave(BaseObject $node)\n {\n $this->processPreSaveStack();\n }", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "protected function optimizing()\n {\n if ($this->type !== 'delete') {\n $fields = $this->getMeta()->getFields(AttributeField::class);\n $unorderedNodes = $this->nodes;\n $this->nodes = [];\n\n foreach ($fields as $field) {\n $attname = $field->getAttname();\n\n foreach ($unorderedNodes as $key => $node) {\n if ($node->getAttname() === $attname) {\n $this->nodes[] = $node;\n unset($unorderedNodes[$key]);\n\n break;\n }\n }\n }\n\n $this->nodes = \\array_merge($this->nodes, $unorderedNodes);\n }\n }", "public function compileAll()\n {\n foreach ($this->pageViewsFlattened as &$pageView)\n {\n $this->compilePageView($pageView);\n }\n }", "public function visitNodes(\\Solr\\Domain\\Result\\Explanation\\Visitors\\ExplainNodeVisitorInterface $visitor) {\n\t\t$visitor->visit($this);\n\t\tforeach($this->getChildren() as $child) {\n\t\t\t$child->visitNodes($visitor);\n\t\t}\n\t}", "public function endChildren()\n {\n parent::endChildren();\n\n $this->call($this->ascendCallback);\n }", "function SetAllHierarchyPositions()\n\t{\n\t\tglobal $gCms;\n\t\t$db = $gCms->GetDb();\n\n\t\t$query = \"SELECT content_id FROM \".cms_db_prefix().\"content\";\n\t\t$dbresult = &$db->Execute($query);\n\n\t\twhile ($dbresult && !$dbresult->EOF)\n\t\t{\n\t\t\tContentOperations::SetHierarchyPosition($dbresult->fields['content_id']);\n\t\t\t$dbresult->MoveNext();\n\t\t}\n\t\t\n\t\tif ($dbresult) $dbresult->Close();\n\t}", "function mktree_ops(array &$ops, replica $r, $parent_id, $depth=2, $max_depth=12) {\n if($depth > $max_depth) {\n return;\n }\n for($i=0; $i < 2; $i++) {\n $name = sprintf( \"%s\", $i == 0 ? 'a' : 'b' );\n $ops[] = new op_move($r->tick(), $parent_id, $name, $child_id = new_id());\n mktree_ops($ops, $r, $child_id, $depth+1, $max_depth);\n }\n}", "private function undo_cleanup_actions() {\n global $db;\n $elements_locked = array();\n $undo_nodes = $db->fetch_table(\"SELECT * FROM `\".$this->table.\"_undo` ORDER BY ID_UNDO DESC\");\n for ($i = 0; $i < count($undo_nodes); $i++) {\n $node = $undo_nodes[$i];\n foreach ($elements_locked as $id => $lock) {\n if (($node[\"FK_PARENT\"] == $id) ||\n (!$this->element_read($id)) ||\n ($this->element_is_child($node[\"FK_PARENT\"], $id)) ||\n ($this->element_is_child($node[\"FK_PARENT_PREV\"], $id))) {\n $db->querynow(\"DELETE FROM `\".$this->table.\"_undo` WHERE ID_UNDO=\".$node[\"ID_UNDO\"]);\n }\n }\n if ($node[\"ACTION\"] == \"MOVE\") {\n // Element wurde verschoben\n $elements_locked[$node[\"FK_PARENT\"]] = true;\n $elements_locked[$node[\"FK_PARENT_PREV\"]] = true;\n }\n }\n }", "public function enableRecursiveFilters()\n {\n $this->enableRecursiveFilters = true;\n }", "public function visit(Node $n) {\n parent::visit($n);\n }", "public function getChildNodes() {}", "public function getChildNodes() {}", "public function PostOrderTraversal($node) {\r\n if($node != null) {\r\n $this->PostOrderTraversal($node->left);\r\n $this->PostOrderTraversal($node->right);\r\n echo $node->data.\" \";\r\n }\r\n }", "final public function addBefore(CtkBuildable $node, CtkBuildable $before) {\n\t\tthrow new CakeException(sprintf('Cannot add children to %s', get_class($this)));\n\t}", "private function tree_apply_changes($changes) {\n global $db;\n\n foreach ($changes as $id => $change) {\n $change[\"ID_KAT\"] = $id;\n if ($updateid = $db->update($this->table, $change))\n unset($this->cache_nodes[$updateid]);\n }\n\n return $this->tree_create_nestedset();\n }", "public function prune()\n {\n if (!$this->isEmpty()) {\n $this->root->prune();\n $this->root = null;\n }\n }", "public function shiftChild(MenuPresenceInterface $presence): void\n {\n $children = $this->children ?: [];\n\n if ($children instanceof Collection) {\n $children->prepend($presence);\n } else {\n $children = Arr::prepend($children, $presence);\n }\n\n $this->children = $children;\n }", "protected function collectChildren(): void\n {\n $this->collection = new Collection();\n foreach ($this->rawResults as $blockChildContent) {\n $this->collection->add(Block::fromResponse($blockChildContent));\n }\n }", "public static final function inject_trees(&$parent_array,&$children_trees,$parent_ident_field,$kids_field){\n\t\tforeach($children_trees as $kid){\n\t\t\tif(isset($parent_array[$kid->$parent_ident_field])){\n\t\t\t\t$parent_array[$kid->$parent_ident_field]->insert_kids($kid,'e'); //insert at end.\n\t\t\t}\n\t\t}\n\t}", "abstract protected function getCurrentChildren(): array ;", "public function clearChildren(): void\n {\n if ($this->children instanceof Collection) {\n $this->children = new Collection;\n return;\n }\n\n $this->children = [];\n }", "protected function addActionsForRelatedEntities()\n {\n if (! $this->mapper) {\n return;\n }\n\n foreach ($this->mapper->getRelations() as $name) {\n $this->mapper->getRelation($name)->addActions($this);\n }\n }", "public function applyFilters() {\n\t\tforeach ($this->filters as $filter) {\n\t\t\t$filter->apply($this);\n\t\t}\n\t\t$this->removeFilters();\n\t}", "protected function preProcess() {}", "protected function resetNestedElementCalls() {}", "private function sort(array &$children): void\n {\n $c = [];\n $i = 0;\n $needsSorting = false;\n foreach ($children as $name => $child) {\n $c[$name] = ['p' => $child->vars['priority'] ?? 0, 'i' => $i++];\n\n if (0 !== $c[$name]['p']) {\n $needsSorting = true;\n }\n }\n\n if (!$needsSorting) {\n return;\n }\n\n uksort($children, static fn ($a, $b): int => [$c[$b]['p'], $c[$a]['i']] <=> [$c[$a]['p'], $c[$b]['i']]);\n }", "public function process()\n {\n $this->addCategory(self::ROOT_CATEGORY_ID, $this->_categories);\n }", "public function reSetDepth()\n\t{\t\t\n\t\tif ($this->getParentId() !== 0 && $this->getParentId() != null)\n\t\t{\n\t\t\t$parentCat = $this->getParentCategory();\n\t\t\t$this->setDepth($parentCat->getDepth() + 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setDepth(0);\n\t\t}\n\t}", "function sort(){\n\t\t$leaves=$this->find_leaves();\n\t\t$sorted=array();\n\t\t//sort leaves in order of priority\n\t\t$leaves=socialwiki_merge_sort_nodes($leaves);\n\t\t\n\t\tfor($i=0;$i<count($leaves);$i++){\n\t\t\t//if the parent is already in the tree add the leaf in the proper position\n\t\t\tif(array_key_exists($leaves[$i]->parent,$sorted)){\n\t\t\t\t$keyindex=$this->find_index($leaves[$i]->parent,$sorted);\n\t\t\t\t$copy=$sorted;\n\t\t\t\t$sorted=array_splice($sorted,0,$keyindex)+array($leaves[$i]->id=>$leaves[$i])+array_splice($copy,$keyindex);\n\t\t\t}else{\n\t\t\t\t$sorted[$leaves[$i]->id]=$leaves[$i];\n\t\t\t\tif($leaves[$i]->parent!=-1){\n\t\t\t\t\t$sorted=$this->add_parent($leaves[$i]->id,$sorted,1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->nodes=$sorted;\n\t\tforeach($this->nodes as $node){\n\t\t\tif($node->parent==-1){\n\t\t\t\t$this->add_levels($node->id,1);\n\t\t\t}\n\t\t}\n\t}", "protected function buildRenderChildrenClosure() {}", "public function inOrder (Callable $preOp, Callable $inOp, Callable $postOp)\r\n {\r\n $this->_inOrder($this->root, $preOp, $inOp, $postOp);\r\n }", "public function traverse()\n {\n return $this->doTraverse($this->tree);\n }", "public function testSetChildByNodes() {\n\n\t\t$objBuilder = new LeftRightTreeTraversal\\TreeBuilder();\n\n\t\t$objNode1 = new LeftRightTreeTraversal\\Node(1);\n\t\t$objNode2 = new LeftRightTreeTraversal\\Node(2);\n\n\t\t$this->boolean($objBuilder->setChildByNodes($objNode2, $objNode1))->isTrue();\n\t\t$hashChecks = array(\n\t\t\t\t1 => array(\n\t\t\t\t\t\t'id' \t\t=> 1,\n\t\t\t\t\t\t'parent'\t=> null,\n\t\t\t\t\t\t'left'\t\t=> 0,\n\t\t\t\t\t\t'right'\t\t=> 3\n\t\t\t\t),\n\t\t\t\t2 => array(\n\t\t\t\t\t\t'id' \t\t=> 2,\n\t\t\t\t\t\t'parent'\t=> 1,\n\t\t\t\t\t\t'left'\t\t=> 1,\n\t\t\t\t\t\t'right'\t\t=> 2\n\t\t\t\t)\n\t\t);\n\n\t\t$arrayResult = $objBuilder->compute()->export();\n\t\t$this->array($arrayResult)->size->isEqualTo(2);\n\t\tforeach ($arrayResult as $hashNode) {\n\t\t\t$this\n\t\t\t->array($hashNode)\n\t\t\t->hasKey('id')\n\t\t\t->hasKey('left')\n\t\t\t->hasKey('right')\n\t\t\t->integer($hashNode['id'])\n\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['id'])\n\t\t\t->integer($hashNode['left'])\n\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['left'])\n\t\t\t->integer($hashNode['right'])\n\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['right'])\n\t\t\t;\n\t\t}\n\t}", "function df_traversal($node,$parent){\n\tif(!$node) return;\t\n\tif($node == $parent) return;\n\t\n\tif($node->level <= $parent->level) $node->level=$parent->level+1;\n\t$node->is_root=false;\n\tif(isset($node->downLink)) foreach($node->downLink as $child) {\n\t\tdf_traversal(find_node($child),$node);\n\t}\n\t$node->visited=true;\n}", "public function setChildren(array $children)\n {\n $this->children = [];\n foreach ($children as $child) {\n if ($child instanceof Node) {\n $this->addChild($child);\n }\n }\n }", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n }", "function _relocate_children($old_ID, $new_ID)\n {\n }", "public function implement_all_effects()\n\t{\n\t\tforeach ($this->collection as $image)\n\t\t{\n\t\t\t$image->implement_effects();\n\t\t}\n\t}", "public function traverse(callable $callable)\n {\n }", "public function get_children();", "public function preAnalyzeNode(\n CodeBase $code_base,\n Context $context,\n Node $node\n );", "public function accept(IdmlVisitor $visitor, $depth = 0)\n {\n $visitor->visitProcessingInstruction($this, $depth);\n }", "function cognitivefactory_tree_updateordering($cognitivefactoryid, $groupid, $userid, $id, $istree) {\n\n // getting ordering value of the current node\n global $CFG, $DB;\n\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n if (!$res) return;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid);\n $treeClause = ($istree) ? \" AND itemdest = {$res->itemdest} \" : '';\n\n // getting subsequent nodes that have same father\n $sql = \"\n SELECT \n id \n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue > {$res->intvalue}\n {$treeClause}\n {$accessClause}\n ORDER BY \n intvalue\n \";\n\n // reordering subsequent nodes using an object\n if ( $nextsubs = $DB->get_record_sql($sql)) {\n $ordering = $res->intvalue + 1;\n foreach ($nextsubs as $asub) {\n $opdata = new StdClass();\n $opdata->id = $asub->id;\n $opdata->intvalue = $ordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n $ordering++;\n }\n }\n}", "private function preOrderAnalyze(Context $context, Node $node): Context\n {\n // Visit the given node populating the code base\n // with anything we learn and get a new context\n // indicating the state of the world within the\n // given node\n // Equivalent to (new PostOrderAnalysisVisitor(...)($node)) but faster than using __invoke()\n $context = (new PreOrderAnalysisVisitor(\n $this->code_base,\n $context\n ))->{Element::VISIT_LOOKUP_TABLE[$node->kind] ?? 'handleMissingNodeKind'}($node);\n\n // Let any configured plugins do a pre-order\n // analysis of the node.\n ConfigPluginSet::instance()->preAnalyzeNode(\n $this->code_base,\n $context,\n $node\n );\n return $context;\n }", "function appendChildren () {\n $this->menu[]=new Marker('start');\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $this->current->id() ) {\n $this->menu[]=$item;\n }\n }\n $check=end($this->menu);\n if ( $check->isStart() )\n array_pop($this->menu);\n else\n $this->menu[]=new Marker('end');\n }", "function cognitivefactory_tree_left($cognitivefactoryid, $userid, $groupid, $id) {\n global $CFG, $DB;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n\n $sql = \"\n SELECT \n itemdest, \n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n id = $id\n \";\n $res = $DB->get_record_sql($sql);\n $ordering = $res->intvalue;\n $fatherid = $res->itemdest;\n\n $sql = \"\n SELECT \n id,\n itemdest\n FROM \n {cognitivefactory_opdata} as od\n WHERE \n id = $fatherid\n \";\n $resfatherid = $DB->get_record_sql($sql);\n if (!$resfatherid) return; // this protects against bouncing left request\n $fatheridbis = $resfatherid->itemdest; //id grandpa...\n\n $sql = \"\n SELECT \n id,\n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue > $ordering AND \n itemdest = $fatherid\n {$accessClause}\n ORDER BY \n intvalue\n \";\n $newbrotherordering = $ordering;\n\n if ($ress = $DB->get_records_sql($sql)) {\n foreach ($ress as $res) {\n $opdata = new StdClass();\n $opdata->id = $res->id;\n $opdata->intvalue = $newbrotherordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n $newbrotherordering = $newbrotherordering + 1;\n }\n }\n\n // getting father's ordering\n $sql = \"\n SELECT\n id, \n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n id = $fatherid\n {$accessClause}\n \";\n $resorderingfather = $DB->get_record_sql($sql);\n $orderingfather = $resorderingfather->intvalue;\n\n // reordering uncles\n $select = \"\n cognitivefactoryid = ? AND\n operatorid = 'hierarchize' AND\n intvalue > ? AND \n itemdest = ?\n {$accessClause}\n \";\n if ($resbrotherfathers = $DB->get_records_select('cognitivefactory_opdata', $select, array($cognitivefactoryid, $orderingfather, $fatheridbis), 'id, intvalue', 'intvalue')) {\n foreach ($resbrotherfathers as $resbrotherfather) {\n $idbrotherfather = $resbrotherfather->id;\n $nextordering = $resbrotherfather->intvalue + 1;\n\n $opdata = new StdClass();\n $opdata->id = $idbrotherfather;\n $opdata->intvalue = $nextordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n }\n }\n\n // reordering\n $newordering = $orderingfather + 1;\n\n $opdata = new StdClass();\n $opdata->id = $id;\n $opdata->intvalue = $newordering;\n $opdata->itemdest = $fatheridbis;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n}", "public function getChildNodes();", "public function apply(): void {\n\t\t// can we safely execute this?\n\t\t$entity_types = $this->getRegisteredEntityTypes();\n\t\t$tag_names = $this->getTagNames();\n\t\t\n\t\tif (empty($entity_types) || empty($tag_names)) {\n\t\t\t// no, we could remove too much\n\t\t\t// quit\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// prepare\n\t\t$this->preApply();\n\t\t\n\t\telgg_call(ELGG_IGNORE_ACCESS | ELGG_SHOW_DISABLED_ENTITIES, function() {\n\t\t\ttry {\n\t\t\t\tswitch ($this->tag_action) {\n\t\t\t\t\tcase 'delete':\n\t\t\t\t\t\t$this->applyDelete();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'replace':\n\t\t\t\t\t\t$this->applyReplace();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\telgg_log($e->getMessage(), 'ERROR');\n\t\t\t}\n\t\t});\n\t\t\n\t\t// restore\n\t\t$this->postApply();\n\t}", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n // Inspired by module SymconTest/HookServe\n // Only call this in READY state. On startup the WebHook instance might not be available yet\n if (IPS_GetKernelRunlevel() == KR_READY) {\n $this->RegisterHook('/hook/webgraph');\n }\n\n // Update reference search\n $refs = $this->GetReferenceList();\n foreach ($refs as $ref) {\n $this->UnregisterReference($ref);\n }\n\n foreach (json_decode($this->ReadPropertyString('AccessList')) as $item) {\n $this->RegisterReference($item->ObjectID);\n }\n }", "function do_op(op_move $op, tree $t): array {\n\n // When a replica applies a Move op to its tree, it also records\n // a corresponding LogMove op in its log. The t, p, m, and c\n // fields are taken directly from the Move record, while the oldp\n // field is filled in based on the state of the tree before the move.\n // If c did not exist in the tree, oldp is set to None. Otherwise\n // oldp records the previous parent and metadata of c.\n $oldp = $t->find($op->child_id);\n $log = new log_op_move($op, $oldp);\n\n // ensures no cycles are introduced. If the node c\n // is being moved, and c is an ancestor of the new parent\n // newp, then the tree is returned unmodified, ie the operation\n // is ignored.\n // Similarly, the operation is also ignored if c == newp\n if($op->child_id === $op->parent_id ||\n is_ancestor($t, $op->parent_id, $op->child_id)) {\n// echo \"tree unchanged!\\n\";\n return [$log, $t];\n }\n\n // Otherwise, the tree is updated by removing c from\n // its existing parent, if any, and adding the new\n // parent-child relationship (newp, m, c) to the tree.\n $t->rm_child($op->child_id);\n $tt = new tree_node($op->parent_id, $op->metadata);\n $t->add_node($op->child_id, $tt);\n// echo \"tree changed!\\n\";\n return [$log, $t];\n}", "public function accept($visitor){\n\n if( $this->features ){\n $this->features = $visitor->visitObj($this->features);\n }\n $this->path = $visitor->visitObj($this->path);\n\n if( !$this->options['inline'] && $this->root ){\n $this->root = $visitor->visit($this->root);\n }\n }", "public function postFlush()\n {\n $currentDeepLevel = $this->deepLevel;\n\n if (!empty($this->entitiesScheduledForWorkflowStart[$currentDeepLevel])) {\n $this->deepLevel++;\n $massStartData = $this->entitiesScheduledForWorkflowStart[$currentDeepLevel];\n unset($this->entitiesScheduledForWorkflowStart[$currentDeepLevel]);\n $this->workflowManager->massStartWorkflow($massStartData);\n $this->deepLevel--;\n }\n }", "private function executeExtraUpdates()\n {\n foreach ($this->extraUpdates as $oid => $update) {\n list ($entity, $changeset) = $update;\n $this->entityChangeSets[$oid] = $changeset;\n $this->getEntityPersister(get_class($entity))->update($entity);\n }\n $this->extraUpdates = [];\n }", "private function call($callback)\n {\n if ($this->getInnerIterator()->hasChildren()) {\n $this->callIfExists($callback);\n }\n }", "function getChildNodes() ;", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}", "function initChildrenRecursive() {\n $this->initChildControls();\n if ($this->HasControls()) {\n $keys = array_keys($this->Controls);\n $count = count($this->Controls);\n for ($i = 0; $i < $count; $i++) {\n @$control = &$this->Controls[$keys[$i]];\n $control->initChildrenRecursive();\n }\n }\n\n }", "abstract protected function _preProcess();", "public function _responseProcessing($attrs, $children) {\n $this->processingFunction = function($controller) use($children) {\n foreach($children as $child) {\n $child->__invoke($controller);\n }\n };\n }", "function walk_page_tree($pages, $depth, $current_page, $args)\n {\n }", "public function sortLoop()\n {\n $flags = [];\n $node = $this->root;\n $this->nodesPerKey = [];\n\n while ($node !== null) {\n $key = $node->key;\n\n if (! isset($flags[$key])) {\n $flags[$key] = 0;\n }\n\n if ($flags[$key] < 1) {\n $flags[$key] = 1;\n\n if ($node->left) {\n $node = $node->left;\n continue;\n }\n }\n\n if ($flags[$key] < 2) {\n $flags[$key] = 2;\n \n $this->nodesPerKey[$key] = $node;\n }\n\n if ($flags[$key] < 3) {\n $flags[$key] = 3;\n\n if ($node->right) {\n $node = $node->right;\n continue;\n }\n }\n\n $node = $node->parent;\n }\n }", "function walk_category_tree(...$args)\n {\n }", "public function testInclusiveCostsWithNewChildren()\n {\n $node = new CallTreeNode(\n 'file1', 'func1', self::toCostArray(2, 3, 5, 7)\n );\n $nodeChild = new CallTreeNode(\n 'file2', 'func2', self::toCostArray(11, 14, 17, 19)\n );\n $nodeSubChild = new CallTreeNode(\n 'file3', 'func3', self::toCostArray(1, 3, 7, 29)\n );\n $nodeSubSubChild = new CallTreeNode(\n 'file4', 'func4', self::toCostArray(2, 97, 2, 3)\n );\n\n $node->addChild($nodeChild);\n $nodeChild->addChild($nodeSubChild);\n $nodeChild->addChild($nodeSubSubChild);\n $costs = $node->getInclusiveCosts();\n $this->assertEquals(16, $costs['time']);\n $this->assertEquals(97, $costs['mem']);\n $this->assertEquals(31, $costs['cycles']);\n $this->assertEquals(29, $costs['peakmem']);\n }" ]
[ "0.59177184", "0.57239574", "0.55320066", "0.55222136", "0.5377389", "0.52540845", "0.5242355", "0.52392584", "0.523242", "0.51672727", "0.5163566", "0.5160301", "0.51334316", "0.50935656", "0.50865555", "0.50688636", "0.5055253", "0.5035682", "0.5019806", "0.5015941", "0.50076455", "0.49749622", "0.49487403", "0.4939566", "0.49258143", "0.48996654", "0.48973575", "0.48874947", "0.4870163", "0.4862713", "0.4829481", "0.48233545", "0.48060417", "0.48029134", "0.4800056", "0.4789647", "0.47852927", "0.47651556", "0.47609743", "0.47459683", "0.47335792", "0.47113386", "0.47104105", "0.47047776", "0.46914825", "0.46870255", "0.46774015", "0.467695", "0.46694848", "0.46691814", "0.4655768", "0.46529454", "0.46460533", "0.46422255", "0.4624528", "0.4623383", "0.46127528", "0.46114033", "0.4609327", "0.46086204", "0.46022865", "0.45933565", "0.45756757", "0.4569088", "0.4567165", "0.45561868", "0.45468462", "0.4543736", "0.45427513", "0.45409077", "0.4534629", "0.45123357", "0.45033002", "0.4498896", "0.44945344", "0.44853014", "0.4482786", "0.44795668", "0.447707", "0.4476348", "0.44738278", "0.44691414", "0.44686174", "0.446579", "0.44599533", "0.44599187", "0.44591632", "0.44566956", "0.44562227", "0.44525662", "0.44499066", "0.4449817", "0.44489622", "0.44448245", "0.4444277", "0.4443346", "0.4440709", "0.44405144", "0.44402188", "0.44352424", "0.44342458" ]
0.0
-1
Applies one or more operations after children of the node have been visited.
public function visitLeave(NodeInterface $node);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function compute(): void\n {\n try {\n $this->emit(new Group\\Start($this->parser));\n $this->getLeftNode()->compute();\n $this->emit($this);\n $this->getRightNode()->compute();\n $this->emit(new Group\\End($this->parser));\n } catch (NodeHandledException $e) {\n return;\n }\n }", "public function iterateChildren();", "public function endChildren()\n {\n parent::endChildren();\n\n $this->call($this->ascendCallback);\n }", "public function evaluateChildNodes();", "protected function execute()\n {\n // Try to execute nodes while there are executable nodes on the stack.\n do\n {\n // Flag that indicates whether a node has been executed during the\n // current iteration of the loop.\n $executed = false;\n\n // Iterate the stack of activated nodes.\n foreach ($this->activatedNodes as $key => $node) {\n \n // Only try to execute a node if the execution of the\n // workflow instance has not ended yet.\n if ($this->cancelled && $this->ended) {\n // @codeCoverageIgnoreStart\n break;\n // @codeCoverageIgnoreEnd\n }\n\n // The current node is an end node but there are still\n // activated nodes on the stack.\n if ( $node instanceof End && !$node instanceof Cancel &&\n $this->numActivatedNodes != $this->numActivatedEndNodes) {\n continue;\n }\n\n // Execute the current node and check whether it finished\n // executing.\n if ($node->execute($this)) {\n \n // Remove current node from the stack of activated\n // nodes.\n unset($this->activatedNodes[$key]);\n $this->numActivatedNodes--;\n\n // Notify plugins that the node has been executed.\n if (!$this->cancelled && !$this->ended) {\n foreach ($this->plugins as $plugin) {\n $plugin->afterNodeExecuted($this, $node);\n }\n }\n\n // Toggle flag (see above).\n $executed = true;\n }\n }\n }\n\n while (!empty($this->activatedNodes) && $executed);\n\n // The stack of activated nodes is not empty but at the moment none of\n // its nodes can be executed.\n if (!$this->cancelled && !$this->ended) {\n $this->suspend();\n }\n }", "public function afterUpdate(): void\n {\n if ($this->oldParentId != $this->owner->getAttribute($this->ownerParentIdAttribute)) {\n $this->rebuildTreePath();\n }\n }", "protected function deleteChildren() {}", "function add_children(){\n\t\t\t\t\t//if the array has a parent add it to the parents child array\n\t\tforeach ($this->nodes as $node){\n\t\t\tif($node->parent!=-1){\n\t\t\t\tif(isset($this->nodes[$node->parent])){\n\t\t\t\t\t$parent=$this->nodes[$node->parent];\n\t\t\t\t\t$parent->add_child($node->id);\n\t\t\t\t}else{\n\t\t\t\t\tprint_error('nonode','socialwiki');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function beginChildren()\n {\n parent::beginChildren();\n\n $this->call($this->descendCallback);\n }", "public function applyToNode(Node $node);", "protected function resolveChildren()\n {\n foreach ($this->unresolvedChildren as $name => $info) {\n $this->children[$name] = $this->create($name, $info['type'], $info['init_options'], $info['exec_options']);\n }\n\n $this->unresolvedChildren = array();\n }", "protected function processFileTree () {\n\t\t$files = $this->populateFileTree();\n\t\tforeach ($files as $file) {\n\t\t\t$this->processFile($file);\n\t\t}\n\t}", "function loadedChildren()\r\n {\r\n //Calls childrens loaded recursively\r\n reset($this->components->items);\r\n while (list($k,$v)=each($this->components->items))\r\n {\r\n $v->loaded();\r\n }\r\n }", "function addChildren(array $children) : void;", "protected function actionPostLoadingEvent()\n {\n if (self::$child_data === null) {\n self::$child_data = [];\n foreach ($this->getParentModel()->children->child->iterateItems() as $node_uuid => $node) {\n if (empty((string)$node->enabled)) {\n continue;\n }\n $conn_uuid = (string)$node->connection;\n if (!isset(self::$child_data[$conn_uuid])) {\n self::$child_data[$conn_uuid] = [];\n }\n foreach (self::$child_attrs as $key) {\n if (!isset(self::$child_data[$conn_uuid][$key])) {\n self::$child_data[$conn_uuid][$key] = [];\n }\n self::$child_data[$conn_uuid][$key][] = (string)$node->$key;\n }\n }\n }\n foreach ($this->internalChildnodes as $node) {\n if (!$node->getInternalIsVirtual()) {\n $extra_attr = ['local_ts' => '', 'remote_ts' => ''];\n $conn_uuid = (string)$node->getAttribute('uuid');\n foreach (self::$child_attrs as $key) {\n $child_node = new TextField();\n $child_node->setInternalIsVirtual();\n if (isset(self::$child_data[$conn_uuid]) && !empty(self::$child_data[$conn_uuid][$key])) {\n $child_node->setValue(implode(',', array_unique(self::$child_data[$conn_uuid][$key])));\n }\n $node->addChildNode($key, $child_node);\n }\n }\n }\n return parent::actionPostLoadingEvent();\n }", "public function calc() {\n $this->getChildNodes(0, 0, 0);\n }", "public function removeChildNodes() {}", "public function traverse(): void\n {\n // Register data hooks on the table\n $this->registerHandlerDefinitions($this->definition->tableName, $this->definition->tca);\n \n // Register data hooks on the types and fields\n $this->traverseTypes();\n $this->traverseFields();\n \n // Allow externals\n $this->eventBus->dispatch(new CustomDataHookTraverserEvent($this->definition, function () {\n $this->registerHandlerDefinitions(...func_get_args());\n }));\n }", "public function reorderChildren()\n {\n $sql = \"select ID_PAGE from \" . $this->mode . \"PAGE where PAG_IDPERE=\" . $this->getID() . \" order by PAG_POIDS\";\n $stmt = $this->dbh->prepare(\"update \" . $this->mode . \"PAGE set PAG_POIDS=:PAG_POIDS where ID_PAGE=:ID_PAGE\");\n $PAG_POIDS = 1;\n $stmt->bindParam(':PAG_POIDS', $PAG_POIDS, PDO::PARAM_INT);\n foreach ($this->dbh->query($sql)->fetchAll(PDO::FETCH_COLUMN) as $ID_PAGE) {\n $stmt->bindValue(':ID_PAGE', $ID_PAGE, PDO::PARAM_INT);\n $stmt->execute();\n $PAG_POIDS ++;\n }\n }", "private function brokeTree()\n {\n $i = 0;\n foreach ($this->nodeIdList as $node) {\n $this->getDb()->createCommand()->update(\n self::tableName(),\n [\n $this->leftAttribute => ++$i,\n $this->rightAttribute => ++$i,\n $this->depthAttribute => 0,\n '_tree' => $this->globalParentNode,\n ],\n ['=', 'id', $node]\n )->query();\n }\n }", "public function processActionExpressions()\n {\n foreach( $this->getChildren() as $child ) {\n if( $child->getCode() == T_WLG_PAREN_START ) {\n // Ignore if parent is already an expression\n if( $child->getParent()->getCode() == T_WLG_EXPRESSION ) {\n continue;\n }\n $prev = $child->getPreviousSibling();\n $next = $child->getNextSibling();\n if( !$next || $next->getCode() != T_WLG_PAREN_STOP || !$prev ) {\n throw new Exception('Parse error!');\n }\n $token = Engine_Template_Token::factory(T_WLG_EXPRESSION);\n// $this->addChildBefore($token, $child);\n $prev->addChild($token);\n\n $child->remove();\n $next->remove();\n\n $token->addChild($child);\n $token->addChild($next);\n }\n }\n\n // Recurse\n foreach( $this->getChildren() as $child ) {\n $child->processActionExpressions();\n }\n\n return $this;\n }", "public function getChildActions() {}", "public function clearChildren(): void\n {\n if ($this->children instanceof Collection) {\n $this->children = new Collection;\n return;\n }\n\n $this->children = [];\n }", "protected function collectChildren(): void\n {\n $this->collection = new Collection();\n foreach ($this->rawResults as $blockChildContent) {\n $this->collection->add(Block::fromResponse($blockChildContent));\n }\n }", "public function calc_tree()\n\t{\n\t\t$this->readTree(TRUE);\t\t\t// Make sure we have accurate data\n\t\tforeach ($this->class_parents as $cp)\n\t\t{\n\t\t\t$rights = array();\n\t\t\t$this->rebuild_tree($cp,$rights);\t\t// increasing rights going down the tree\n\t\t}\n\t}", "public function _templateProcessing($attrs, $children) {\r\n $this->processingFunction = function($controller) use($children) {\r\n foreach($children as $child) {\r\n $child->__invoke($controller);\r\n }\r\n };\r\n }", "private function undo_cleanup_actions() {\n global $db;\n $elements_locked = array();\n $undo_nodes = $db->fetch_table(\"SELECT * FROM `\".$this->table.\"_undo` ORDER BY ID_UNDO DESC\");\n for ($i = 0; $i < count($undo_nodes); $i++) {\n $node = $undo_nodes[$i];\n foreach ($elements_locked as $id => $lock) {\n if (($node[\"FK_PARENT\"] == $id) ||\n (!$this->element_read($id)) ||\n ($this->element_is_child($node[\"FK_PARENT\"], $id)) ||\n ($this->element_is_child($node[\"FK_PARENT_PREV\"], $id))) {\n $db->querynow(\"DELETE FROM `\".$this->table.\"_undo` WHERE ID_UNDO=\".$node[\"ID_UNDO\"]);\n }\n }\n if ($node[\"ACTION\"] == \"MOVE\") {\n // Element wurde verschoben\n $elements_locked[$node[\"FK_PARENT\"]] = true;\n $elements_locked[$node[\"FK_PARENT_PREV\"]] = true;\n }\n }\n }", "abstract protected function getCurrentChildren(): array ;", "function apply($node)\r\n\t\t{\r\n\t\t\t$this->address = $node->address;\r\n\t\t\t$this->elements = $node->elements;\r\n\t\t\t$this->size = $node->size;\r\n\t\t\t$this->parent = $node->parent;\r\n\t\t\t$this->less = $node->less;\r\n\t\t\t$this->previous = $node->previous;\r\n\t\t\t$this->next = $node->next;\r\n\t\t}", "public function PostOrderTraversal($node) {\r\n if($node != null) {\r\n $this->PostOrderTraversal($node->left);\r\n $this->PostOrderTraversal($node->right);\r\n echo $node->data.\" \";\r\n }\r\n }", "function appendChildren () {\n $this->menu[]=new Marker('start');\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $this->current->id() ) {\n $this->menu[]=$item;\n }\n }\n $check=end($this->menu);\n if ( $check->isStart() )\n array_pop($this->menu);\n else\n $this->menu[]=new Marker('end');\n }", "function _modifyTree () {\r\n return true;\r\n }", "function submit() {\n foreach ($this->submit_callbacks as $callback) {\n call_user_func($callback, $this);\n }\n foreach ($this->children as $element) {\n $element->submit();\n }\n }", "public function traverse()\n {\n return $this->doTraverse($this->tree);\n }", "function walk($parent_id, $callback) {\n $callback($this, $parent_id);\n $children = $this->children($parent_id);\n foreach($children as $c) {\n $this->walk($c, $callback);\n }\n }", "private function doWorkChild() {\n Log5PHP_MDC::put('Generation', 'child');\n $this->doWorkChildImpl();\n $this->childCleanup();\n exit();\n }", "private function tree_apply_changes($changes) {\n global $db;\n\n foreach ($changes as $id => $change) {\n $change[\"ID_KAT\"] = $id;\n if ($updateid = $db->update($this->table, $change))\n unset($this->cache_nodes[$updateid]);\n }\n\n return $this->tree_create_nestedset();\n }", "public function get_children();", "protected function emitPostProcessTreeDataSignal() {}", "public function _responseProcessing($attrs, $children) {\n $this->processingFunction = function($controller) use($children) {\n foreach($children as $child) {\n $child->__invoke($controller);\n }\n };\n }", "public function afterFind()\r\n {\r\n parent::afterFind();\r\n foreach ($this->getRelatedRecords() as $relation) {\r\n if (is_array($relation)) {\r\n foreach ($relation as $record) {\r\n $record->afterFind();\r\n }\r\n } else {\r\n $relation->afterFind();\r\n }\r\n }\r\n }", "public function process()\n {\n $this->addCategory(self::ROOT_CATEGORY_ID, $this->_categories);\n }", "private function iterate($children , &$all )\n\t{\n\t\t//in case of arrau has some elements\n\t\t// var_dump($children->attributes());echo \" Is Array :\".is_array($children->attributes()) ;die;\n\t\t//if($children->count() )\n\t\tif($children)\n\t\t\tforeach ($children as $key => $child) {\n\n\t\t\t\t//check if a node has key\n\t\t\t\tif(($child->attributes()[\"Key\"]) != null)\n\t\t\t\t{\n\t\t\t\t\t$all[] = $child;\n\t\t\t\t\t//echo \"in iterate :\".$child->attributes()[\"key\"].\"<br>\";\n\t\t\t\t}\n\t\t\t\t\t$this->iterate($child->AirSegmentRef , $all );\n\t\t}\n\t}", "public function compileAll()\n {\n foreach ($this->pageViewsFlattened as &$pageView)\n {\n $this->compilePageView($pageView);\n }\n }", "function mktree_ops(array &$ops, replica $r, $parent_id, $depth=2, $max_depth=12) {\n if($depth > $max_depth) {\n return;\n }\n for($i=0; $i < 2; $i++) {\n $name = sprintf( \"%s\", $i == 0 ? 'a' : 'b' );\n $ops[] = new op_move($r->tick(), $parent_id, $name, $child_id = new_id());\n mktree_ops($ops, $r, $child_id, $depth+1, $max_depth);\n }\n}", "public function getChildNodes() {}", "public function getChildNodes() {}", "public function optimizeIteration( ) {\n\t\tif ( ( ( self::ALTERNATE === $this->mType )\n\t\t && ( 1 === count( $this->mChildNodes ) )\n\t\t )\n\t\t || ( ( self::SEQUENCE === $this->mType )\n\t\t\t && ( 1 === count( $this->mChildNodes ) )\n\t\t\t )\n\t\t ){\n\t\t\t$son = $this->mChildNodes[0];\n\t\t\t\n\t\t\t$this->mType \t\t\t= $son->mType;\n\t\t\t$this->mToken \t\t\t= $son->mToken;\n\t\t\t$this->mChildNodes \t\t= $son->mChildNodes;\n\t\t\t$this->mLookAheadSet \t= $son->mLookAheadSet;\n\t\t\t$this->mASTSymbol \t= $son->mASTSymbol;\n\t\t\t$this->mEnclosingRule \t= $son->mEnclosingRule;\n\n\t\t\tforeach( $this->mChildNodes as $key => $value ) {\n\t\t\t\t$value->mParentNode = $this;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tif ( ( ( self::ALTERNATE === $this->mType )\n\t\t && ( 0 < count( $this->mChildNodes ) ) \n\t\t && ( self::ALTERNATE === $this->mChildNodes[0]->mType ) \n\t\t && ( 0 < count( $this->mChildNodes[0]->mChildNodes ) ) \n\t\t )\n\t\t ){\n\t\t\t\n\t\t\t$son = $this->mChildNodes[0]->mChildNodes[0];\n\t\t\t$this->appendChild( $son );\n\t\t\t\n\t\t\t$son->mParentNode = $this;\n\n\t\t\tarray_shift( $this->mChildNodes[0]->mChildNodes );\n\t\t\t\n\t\t}\n\n\n\n\t\tforeach( $this->mChildNodes as $key => $value ) {\n\t\t\t$value->optimizeIteration();\n\t\t}\n\t\t\n\t}", "public function processActionBlocks()\n {\n foreach( $this->getChildren() as $child ) {\n if( $child->getCode() == T_WLG_BRACE_START ) {\n // Ignore if parent is already a block\n if( $child->getParent()->getCode() == T_WLG_BLOCK ) {\n continue;\n }\n $prev = $child->getPreviousSibling();\n $next = $child->getNextSibling();\n if( !$next || $next->getCode() != T_WLG_BRACE_STOP || !$prev ) {\n throw new Exception('Parse error!');\n }\n $token = Engine_Template_Token::factory(T_WLG_BLOCK);\n// $this->addChildBefore($token, $child);\n $prev->addChild($token);\n\n $child->remove();\n $next->remove();\n\n $token->addChild($child);\n $token->addChild($next);\n }\n }\n\n // Recurse\n foreach( $this->getChildren() as $child ) {\n $child->processActionBlocks();\n }\n\n return $this;\n }", "protected function buildRenderChildrenClosure() {}", "abstract public function walk(callable $func, $recursively = false);", "function FixTree(&$tree)\r\n\t{\r\n\t\tusort($tree->children, array($this, \"SortByChild\"));\r\n\t\tif (!empty($tree->children))\r\n\t\tforeach ($tree->children as $cnode) $this->FixTree($cnode);\r\n\t}", "function _recursiveMoveMenuItem($result)\n\t{\n\t\t$i = 0;\n\t\twhile(count($result->child))\n\t\t{\n\t\t\tunset($node);\n\t\t\t$node = array_shift($result->child);\n\n\t\t\t$this->moveMenuItem($this->menuSrl, $node->parent_node, $i, $node->node, 'move');\n\t\t\t$this->_recursiveMoveMenuItem($node);\n\t\t\t$i = $node->node;\n\t\t}\n\t}", "public function apply(): void {\n\t\t// can we safely execute this?\n\t\t$entity_types = $this->getRegisteredEntityTypes();\n\t\t$tag_names = $this->getTagNames();\n\t\t\n\t\tif (empty($entity_types) || empty($tag_names)) {\n\t\t\t// no, we could remove too much\n\t\t\t// quit\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// prepare\n\t\t$this->preApply();\n\t\t\n\t\telgg_call(ELGG_IGNORE_ACCESS | ELGG_SHOW_DISABLED_ENTITIES, function() {\n\t\t\ttry {\n\t\t\t\tswitch ($this->tag_action) {\n\t\t\t\t\tcase 'delete':\n\t\t\t\t\t\t$this->applyDelete();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'replace':\n\t\t\t\t\t\t$this->applyReplace();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\telgg_log($e->getMessage(), 'ERROR');\n\t\t\t}\n\t\t});\n\t\t\n\t\t// restore\n\t\t$this->postApply();\n\t}", "public function completeNode() {\n $this->current = $this->current->parent();\n }", "public function afterDelete()\n {\n foreach (static::find()->where(['parent_id' => $this->id])->all() as $item) {\n $item->delete();\n }\n }", "function SetAllHierarchyPositions()\n\t{\n\t\tglobal $gCms;\n\t\t$db = $gCms->GetDb();\n\n\t\t$query = \"SELECT content_id FROM \".cms_db_prefix().\"content\";\n\t\t$dbresult = &$db->Execute($query);\n\n\t\twhile ($dbresult && !$dbresult->EOF)\n\t\t{\n\t\t\tContentOperations::SetHierarchyPosition($dbresult->fields['content_id']);\n\t\t\t$dbresult->MoveNext();\n\t\t}\n\t\t\n\t\tif ($dbresult) $dbresult->Close();\n\t}", "public function visitNodes(\\Solr\\Domain\\Result\\Explanation\\Visitors\\ExplainNodeVisitorInterface $visitor) {\n\t\t$visitor->visit($this);\n\t\tforeach($this->getChildren() as $child) {\n\t\t\t$child->visitNodes($visitor);\n\t\t}\n\t}", "function _relocate_children($old_ID, $new_ID)\n {\n }", "protected function addActionsForRelatedEntities()\n {\n if (! $this->mapper) {\n return;\n }\n\n foreach ($this->mapper->getRelations() as $name) {\n $this->mapper->getRelation($name)->addActions($this);\n }\n }", "public function setChildren(Collection $children): void\n {\n $this->children = $children;\n }", "public function updateChildren(Collection $children)\n {\n foreach ($children as $child) {\n $this->update($child, ['parent_slug' => null]);\n }\n }", "public function getChildrenQuery();", "protected function postVisitExpression(Expression $element)\n\t{\n\t\t\n\t}", "public function addChildren(array $children);", "public function setChildren(array $children)\n {\n $this->children = [];\n foreach ($children as $child) {\n if ($child instanceof Node) {\n $this->addChild($child);\n }\n }\n }", "public function prune()\n {\n if (!$this->isEmpty()) {\n $this->root->prune();\n $this->root = null;\n }\n }", "function remove_children(&$node) {\n\twhile ($node->firstChild) {\n\t\twhile ($node->firstChild->firstChild) {\n\t\t\tremove_children($node->firstChild);\n\t\t}\n\t\t$node->removeChild($node->firstChild);\n\t}\n}", "function RenderChildren() {\n if ($this->HasControls()) {\n foreach($this->Controls as $control) {\n $control->Render();\n }\n }\n }", "function get_category_children($id, $before = '/', $after = '', $visited = array())\n {\n }", "public function getChildren() {}", "public function getChildren() {}", "public function getChildren() {}", "private function call($callback)\n {\n if ($this->getInnerIterator()->hasChildren()) {\n $this->callIfExists($callback);\n }\n }", "public function countChildren();", "abstract protected function doWorkChildImpl();", "public function getChildNodes();", "public function collapseAll()\n {\n foreach ($this->_tree as $key => $val) {\n if ($key !== self::BASE_ELT) {\n $this->collapse($val['v']);\n }\n }\n }", "public function setChildren(array $children);", "public function rebuildtree(){\n\t\t//Rebuild categories ads trigger count.\n\n\t\t//Rebuild nested set - get cat\n\t\tBLog::addToLog('[Items] rebuilding nested sets...');\n\t\t//\n\t\t$bcache=\\Brilliant\\BFactory::getCache();\n\t\tif($bcache){\n\t\t\t$bcache->invalidate();\n\t\t\t}\n\t\t//\n\t\t$catslist=$this->itemsFilter(array());\n\t\tBLog::addToLog('[Items] Total categories count:'.count($catslist).'...');\n\n\t\t$rootcats=array();\n\t\t//\n\t\tforeach($catslist as $cat){\n\t\t\t$cat->level=0;\n\t\t\t$cat->lft=0;\n\t\t\t$cat->rgt=0;\n\t\t\tif(empty($cat->{$this->parentKeyName})){\n\t\t\t\t$rootcats[]=$cat;\n\t\t\t\t}\n\t\t\t}\n\t\t//Sort root categories.\n\t\t$n=count($rootcats);\n\t\tBLog::addToLog('[Items] Root categories count:'.$n.'...');\n\t\tfor($i=0; $i<$n; $i++){\n\t\t\t$m=$i;\n\t\t\tfor($j=$i+1; $j<$n; $j++){\n\t\t\t\tif($rootcats[$j]->ordering < $rootcats[$m]->ordering){\n\t\t\t\t\t$m=$j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif($m!=$i){\n\t\t\t\t$t=$rootcats[$i];\n\t\t\t\t$rootcats[$i]=$rootcats[$m];\n\t\t\t\t$rootcats[$m]=$t;\n\t\t\t\t}\n\t\t\t}\n\n\t\t//Foreach by root categories...\n\t\tforeach($rootcats as $rcat){\n\t\t\tBLog::addToLog('[Items] Processing root category ['.$rcat->id.']');\n\n\t\t\t$rcat->level=1;\n\t\t\t$lft=1; $rgt=2;\n\t\t\t$this->rebuildtree_recursive($rcat,$lft,$rgt);\n\t\t\t$rcat->lft=1;\n\t\t\t$rcat->rgt=$rgt;\n\t\t\t}\n\t\t$db=\\Brilliant\\BFactory::getDBO();\n\t\tif(empty($db)){\n\t\t\treturn false;\n\t\t\t}\n\t\tBLog::addToLog('[Items] Updating nested set...');\n\t\tforeach($catslist as $ct){\n\t\t\t$qr='UPDATE `'.$this->tableName.'` set `'.$this->leftKeyName.'`='.$ct->lft.', `'.$this->rightKeyName.'`='.$ct->rgt.', `'.$this->levelKeyName.'`='.$ct->level.' WHERE `'.$this->primaryKeyName.'`='.$ct->id;\n\t\t\t$q=$db->query($qr);\n\t\t\tif(empty($q)){\n\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t//Invalidate all cache.\n\t\t$bcache=\\Brilliant\\BFactory::getCache();\n\t\tif($bcache){\n\t\t\t$bcache->invalidate();\n\t\t\t}\n\t\treturn true;\n\t\t}", "public function applyFilters() {\n\t\tforeach ($this->filters as $filter) {\n\t\t\t$filter->apply($this);\n\t\t}\n\t\t$this->removeFilters();\n\t}", "function children() {\n\t\t$this->load_children();\n\t\treturn $this->_children;\n\t}", "public function inOrder(): void\n {\n $this->_inOrder($this->root);\n }", "function do_op(op_move $op, tree $t): array {\n\n // When a replica applies a Move op to its tree, it also records\n // a corresponding LogMove op in its log. The t, p, m, and c\n // fields are taken directly from the Move record, while the oldp\n // field is filled in based on the state of the tree before the move.\n // If c did not exist in the tree, oldp is set to None. Otherwise\n // oldp records the previous parent and metadata of c.\n $oldp = $t->find($op->child_id);\n $log = new log_op_move($op, $oldp);\n\n // ensures no cycles are introduced. If the node c\n // is being moved, and c is an ancestor of the new parent\n // newp, then the tree is returned unmodified, ie the operation\n // is ignored.\n // Similarly, the operation is also ignored if c == newp\n if($op->child_id === $op->parent_id ||\n is_ancestor($t, $op->parent_id, $op->child_id)) {\n// echo \"tree unchanged!\\n\";\n return [$log, $t];\n }\n\n // Otherwise, the tree is updated by removing c from\n // its existing parent, if any, and adding the new\n // parent-child relationship (newp, m, c) to the tree.\n $t->rm_child($op->child_id);\n $tt = new tree_node($op->parent_id, $op->metadata);\n $t->add_node($op->child_id, $tt);\n// echo \"tree changed!\\n\";\n return [$log, $t];\n}", "protected function preorder($nodes){\n if(empty($nodes)){\n return;\n }\n\n foreach($nodes as $node){\n $this->visit_root($node);\n\n $this->visit_children($node);\n }\n }", "protected function _unmarkInternalTree(): void\n {\n $config = $this->getConfig();\n $this->_table->updateAll(\n function (QueryExpression $exp) use ($config) {\n $leftInverse = clone $exp;\n $leftInverse->setConjunction('*')->add('-1');\n $rightInverse = clone $leftInverse;\n\n return $exp\n ->eq($config['leftField'], $leftInverse->add($config['leftField']))\n ->eq($config['rightField'], $rightInverse->add($config['rightField']));\n },\n fn (QueryExpression $exp) => $exp->lt($config['leftField'], 0)\n );\n }", "public function cleanUp()\n\t{\n\t\tif (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'elements-tree.php')) {\n\t\t\tinclude(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'elements-tree.php');\n\t\t\tif (!isset($elements) or !is_array($elements))\n\t\t\t\treturn;\n\n\t\t\t$db = \\Model\\Db\\Db::getConnection();\n\n\t\t\tforeach ($elements as $el => $elData) {\n\t\t\t\tif (!$elData['table'])\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif ($elData['order_by'] and $elData['order_by']['custom']) {\n\t\t\t\t\t$qryOrderBy = [];\n\t\t\t\t\tforeach ($elData['order_by']['depending_on'] as $field)\n\t\t\t\t\t\t$qryOrderBy[] = $field;\n\t\t\t\t\t$qryOrderBy[] = $elData['order_by']['field'];\n\n\t\t\t\t\t$righe = $db->selectAll($elData['table'], [], [\n\t\t\t\t\t\t'order_by' => $qryOrderBy,\n\t\t\t\t\t\t'stream' => true,\n\t\t\t\t\t]);\n\n\t\t\t\t\t$lastParent = null;\n\t\t\t\t\t$currentOrder = 0;\n\t\t\t\t\tforeach ($righe as $r) {\n\t\t\t\t\t\t$parentString = [];\n\t\t\t\t\t\tforeach ($elData['order_by']['depending_on'] as $field)\n\t\t\t\t\t\t\t$parentString[] = $r[$field];\n\t\t\t\t\t\t$parentString = implode(',', $parentString);\n\t\t\t\t\t\tif ($parentString and $parentString !== $lastParent) {\n\t\t\t\t\t\t\t$lastParent = $parentString;\n\t\t\t\t\t\t\t$currentOrder = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$currentOrder++;\n\n\t\t\t\t\t\tif ($r[$elData['order_by']['field']] != $currentOrder) {\n\t\t\t\t\t\t\t$db->update($elData['table'], $r[$elData['primary']], [\n\t\t\t\t\t\t\t\t$elData['order_by']['field'] => $currentOrder,\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\t\t}\n\t}", "public function postFlush()\n {\n $currentDeepLevel = $this->deepLevel;\n\n if (!empty($this->entitiesScheduledForWorkflowStart[$currentDeepLevel])) {\n $this->deepLevel++;\n $massStartData = $this->entitiesScheduledForWorkflowStart[$currentDeepLevel];\n unset($this->entitiesScheduledForWorkflowStart[$currentDeepLevel]);\n $this->workflowManager->massStartWorkflow($massStartData);\n $this->deepLevel--;\n }\n }", "public function traverse(callable $transformation);", "abstract protected function getNewChildren(): array ;", "function recursiveVisit($target)\n {\n if (is_array($target)) {\n foreach ($target as $t) {\n $this->recursiveVisit($t);\n }\n } else {\n if ($target && ($target instanceof T_Visitorable)) $target->accept($this);\n }\n }", "private function executeExtraUpdates()\n {\n foreach ($this->extraUpdates as $oid => $update) {\n list ($entity, $changeset) = $update;\n $this->entityChangeSets[$oid] = $changeset;\n $this->getEntityPersister(get_class($entity))->update($entity);\n }\n $this->extraUpdates = [];\n }", "public function traverse(bool $self = true);", "function getChildNodes() ;", "private function apply_node_instructions() {\n // Add a new node visitor to the traverser\n $this->get_traverser()->addVisitor(new class($this) extends \\PhpParser\\NodeVisitorAbstract {\n public function __construct($file) {\n $this->file = $file;\n }\n\n /**\n * Applies all instructions to a node for a given type\n *\n * @param string $type The instruction type to be applied\n * @param \\PhpParser\\Node $node The node to be actioned\n * @return \\PhpParser\\Node\n */\n private function apply_instructions(string $type, \\PhpParser\\Node $node): \\PhpParser\\Node {\n // Retrieve all instructions by type\n $instructions = $this->file->get_instructions($type);\n\n // Check if has no leave instructions\n if (empty($instructions)) {\n return $node;\n }\n\n // Iterate over all instructions\n foreach($instructions as $instruction) {\n // Get the node type\n $instruction_node = $instruction->node;\n\n // Check if it's not the same as the current node\n if (!($node instanceof $instruction_node)) {\n continue;\n }\n\n // Extract the parameters\n $if = (array) $instruction->if;\n $do = (array) $instruction->do;\n\n // Check for all instructions\n foreach($if as $index => $cnd) {\n // Variable that will later handle if the condition was met\n $condition = false;\n\n // Check if condition is a callback\n if (is_callable($cnd)) {\n // Try matching it with the current node\n $condition = call_user_func_array($cnd, [$node]);\n } else {\n // Retrieve the index value\n $node_index = $node->{$index};\n\n // Check if the condition value is a string, and node index has a toString() method\n if (is_string($cnd[1]) && is_callable([$node_index, \"toString\"])) {\n // Call it\n $node_index = $node_index->toString();\n }\n\n // Evaluate the condition\n eval(\"\\$condition = \\$node_index \" . $cnd[0] . \" \" . escapeshellarg($cnd[1]) . \";\");\n }\n\n // Check if the condition was not met\n if (!$condition) {\n // Assert the failed condition\n $instruction->do_assertion(File\\Instruction::ASSERT_FAILED_CONDITION_NOT_MET, null);\n\n // Break the instruction\n break 2;\n }\n }\n\n // Do all instructions\n foreach($do as $action) {\n // Check if it's callable\n if (is_callable($action)) {\n // Just call the action\n call_user_func_array($action, [$node]);\n continue;\n }\n\n // Extract the action name\n $action_name = $action[\"action\"];\n unset($action[\"action\"]);\n\n // Check if is settings variables\n if ($action_name === \"set\") {\n // Iterate over all variables\n foreach($action[\"vars\"] ?? $action[\"variables\"] as $var => $value) {\n // Set the node variable value\n $node->{$var} = $value;\n }\n }\n }\n }\n\n return $node;\n }\n\n public function leaveNode(\\PhpParser\\Node $node) {\n return $this->apply_instructions(\"leave\", $node);\n }\n\n public function enterNode(\\PhpParser\\Node $node) {\n return $this->apply_instructions(\"enter\", $node);\n }\n });\n }", "public function children(array $query = []): Collection\n {\n $children = static::all(array_merge($query, ['post_parent' => $this->id()]));\n\n return $this->setAttribute(__METHOD__, $children);\n }", "public function archiveWithChildren()\n {\n $workflow = $this->getWorkflow();\n if ($workflow->can($this->getNode(), 'archive')) {\n $workflow->apply($this->getNode(), 'archive');\n }\n\n /** @var Node $node */\n foreach ($this->getNode()->getChildren() as $node) {\n $handler = $this->createSelf();\n $handler->setNode($node);\n $handler->archiveWithChildren();\n }\n\n return $this;\n }", "protected function resetNestedElementCalls() {}", "public function add_children(HTMLCollection $collection){\n $this -> children = $collection;\n }", "private function parse()\n {\n $this->parseChildrenNodes($this->_dom, $this->_rootNode);\n }", "public function setChildren(array $children) {\n\t\t$this->tmpSetChildren($children);\n\t}" ]
[ "0.621006", "0.5681871", "0.5651157", "0.5570745", "0.55096895", "0.53944993", "0.5390069", "0.53714585", "0.5290246", "0.52661663", "0.51977086", "0.51630896", "0.5120858", "0.5095957", "0.5089917", "0.50742984", "0.5050676", "0.5042267", "0.5016429", "0.5015059", "0.50016564", "0.49915093", "0.49879467", "0.4960112", "0.49397546", "0.49244535", "0.4911534", "0.49027136", "0.48897567", "0.4887647", "0.48312315", "0.48280215", "0.4826601", "0.48130205", "0.48091054", "0.48080432", "0.47854394", "0.47823614", "0.47793078", "0.47682953", "0.47592327", "0.47449663", "0.47104633", "0.47033083", "0.4692323", "0.46806568", "0.4680509", "0.4676313", "0.465347", "0.4652545", "0.46517298", "0.46467978", "0.4640525", "0.46380228", "0.46257284", "0.46251622", "0.46186444", "0.46176225", "0.4616283", "0.46153325", "0.46100748", "0.45983246", "0.45846823", "0.45759696", "0.45721453", "0.45522964", "0.455139", "0.45490742", "0.45439067", "0.45406595", "0.45401907", "0.45401907", "0.45401907", "0.45351255", "0.4532824", "0.4531925", "0.45296454", "0.4523306", "0.45112017", "0.45070577", "0.45062193", "0.45038518", "0.45018083", "0.44936532", "0.4492808", "0.4478218", "0.44779497", "0.44759065", "0.44745183", "0.44622603", "0.4460959", "0.4459817", "0.44583276", "0.4457833", "0.44539464", "0.44527104", "0.445158", "0.4450915", "0.44505274", "0.44440424", "0.44422758" ]
0.0
-1
Connect to a database
public function reconnect(){ $connString = "mysql:host=" . $this->host; try { $this->pdo = new \PDO( $connString, $this->username, $this->password ); $this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); if($this->name){ $this->conn = new \PDO( $connString . ";dbname=" . $this->name , $this->username, $this->password ); $this->conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); } } catch(PDOException $e){ die ('Connection failed: ' . $e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\t}", "public function connectToDB() {}", "public function connectDB() {}", "public function connectToDatabase(){\n\t\t$dbinfo=$this->getDBinfo();\n\n\t\t$host=$dbinfo[\"host\"];\n\t\t$dbname=$dbinfo[\"dbname\"];\n\t\t$user=$dbinfo[\"user\"];\n\t\t\n $pass=$this->getPassword();//don't share!!\n\n try{\n $DBH = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $pass);\n $DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n }catch(PDOException $e){\n $this->processException($e);\n }\n \n $this->setDBH($DBH);\n }", "private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }", "private function connect()\n {\n if ($this->configuration->get('db.connector') == 'PDO') {\n $dsn = \"mysql:host=\" . $this->configuration->get('db.host') . \";dbname=\" . $this->configuration->get('db.name');\n $options = array();\n $this->db = new PDO(\n $dsn, $this->configuration->get('db.username'), $this->configuration->get('db.password'), $options\n );\n } elseif ($this->configuration->get('db.connector') == 'mysqli') {\n $this->db = mysqli_connect(\n $this->configuration->get('db.host'), $this->configuration->get('db.username'), $this->configuration->get('db.password'), $this->configuration->get('db.name')\n );\n }\n }", "private function connect()\n {\n if (! is_null(self::$db)) {\n return;\n }\n\n // $this->host \t= $Database->host;\n // $this->user \t= $Database->user;\n // $this->pass \t= $Database->pass;\n // $this->database\t= $Database->database;\n\n $conn = 'mysql:dbname=' . $this->dbInfo->database . ';host=' . $this->dbInfo->host.';charset=utf8';\n try {\n self::$db = new PDO($conn, $this->dbInfo->user, $this->dbInfo->pass);\n } catch (PDOException $e) {\n die('Could not connect to database (' . $conn . ')');\n }\n }", "private function connectToDatabase()\n {\n return DbConnection::connectToDatabase($this->link);\n }", "private function connectDB()\n\t{\n\t\t$this->db = ECash::getMasterDb();\n\t\t\n\t//\t$this->dbconn = $this->db->getConnection();\n\t}", "function connect_to_db(){\n\t\t//Fun Fact: @ suppresses errors of the expression it prepends\n\t\t\n\t\t//Connect to the database and select the database\t\t\t\n\t\ttry{\n\t\t\t$this->connection = new PDO(\"mysql:host=$DATABASE_HOST;dbname=DATABASE_NAME\", DATABASE_USER, DATABASE_PASS);\n\t\t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}catch(PDOException $err){\n\t\t\tdie('Could not connect to database' . $err->getMessage());\n\t\t}\t\t\n\t}", "public function connect_db() {\n }", "public function connect() {\n if ($this->link = mysql_connect($this->host, $this->user, $this->pass)) {\n if (!empty($this->name)) {\n if (!mysql_select_db($this->name)) {\n $this->exception(\"Could not connect to the database!\");\n }\n }\n } else {\n $this->exception(\"Could not create database connection!\");\n }\n }", "private function dbConnect(){\n $database=new \\Database();\n return $database->getConnection();\n }", "public function connect()\n {\n $driver = 'DB'; // default driver\n $dsn = $this->getParameter('dsn');\n\n $do = $this->getParameter('dataobject');\n if ($do && isset($do['db_driver'])) {\n $driver = $do['db_driver'];\n }\n\n if ('DB' == $driver) {\n\n if (!class_exists('DB')) {\n include('DB.php');\n }\n\n $options = PEAR::getStaticProperty('DB', 'options');\n if ($options) {\n $this->connection = DB::connect($dsn, $options);\n } else {\n $this->connection = DB::connect($dsn);\n }\n \n } else {\n\n if (!class_exists('MDB2')) {\n include('MDB2.php');\n }\n \n $options = PEAR::getStaticProperty('MDB2', 'options');\n $this->connection = MDB2::connect($dsn, $options);\n }\n\n if (PEAR::isError($this->connection)) {\n\n throw new AgaviDatabaseException($this->connection->getMessage());\n $this->connection = Null;\n }\n }", "protected function connectDB () {\n $host=$this->Parameters['db_host'];\n $username=$this->Parameters['db_username'];\n\t\t$password=$this->Parameters['db_userpassword'];\n\t\t$dbname=$this->Parameters['db_name'];\n\t\t\n $this->Conn = new mysqli ($host,$username,$password,$dbname);\n if($this->Conn->connect_errno > 0){\n throw new Exception('Unable to connect to database [' . $this->Conn->connect_error . ']');\n }\n }", "private function connectToDB()\n {\n $this->handler = new DBConnect();\n $this->handler = $this->handler->startConnection();\n }", "private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private function connectToDb()\n {\n //home connect\n $link =pg_connect(\"host=localhost dbname=user1 user=postgres\");\n if(!$link)\n {\n die('Connect Error');\n }\n $this->dbConnect = $link;\n }", "public function connect($db_properties);", "protected function db_connect() {\n \n // Data source name\n $this->dsn = 'mysql:host=' . $this->db_host . ';dbname=' . $this->db_name . ';charset=' . $this->db_charset;\n\n // Makes a connection to the database\n $this->db_conn = new PDO( $this->dsn, $this->db_user, $this->db_password );\n\n // When fetching an SQL row it turn into an object\n $this->db_conn->setAttribute( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ );\n // Gives the Error reporting atribute and throws exeptions\n $this->db_conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n \n // Returns the connection\n return $this->db_conn;\n\n }", "public function openConnection() {\n if($this->database != null) return;\n\n $config = $this->getDatabaseConfig();\n\n try {\n $this->database = new \\PDO(\n 'mysql:dbname=' . $config['database'] . ';host=' . $config['host'] . ':' . $config['port'],\n $config['username'],\n $config['password'],\n [\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC\n ]\n );\n } catch(\\PDOException $exception) {\n die('Connection to mysql-server failed: ' . $exception->getMessage());\n }\n }", "function connectToDatabase() {\n\n $host = self::servername;\n $databaseName = self::dbname;\n $password = self::password;\n $username = self::username;\n //To create the connection\n $conn = new mysqli($host, $username, $password, $databaseName);\n self::$conn = $conn;\n //Connection Checking, if there is a connection error, print the error\n if ($conn->connect_error) {\n exit(\"Failure\" . $conn->connect_error);\n }\n }", "private function connect()\n {\n $connection_string = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';';\n $this->connection = new PDO($connection_string, DB_USER, DB_PASS);\n }", "public static function databaseConnect()\n {\n self::$mysqli->connect(self::$dbHost, self::$dbUser, self::$dbPass, self::$dbName);\n }", "private function connecDb()\n {\n try{\n $dsn = \"{$this->db_type}:host={$this->db_host};port={$this->db_port};\";\n $dsn .= \"dbname={$this->db_name};charset={$this->db_charset}\";\n //echo \"$dsn, $this->db_user, $this->db_pass\";\n $this->pdo = new PDO($dsn,$this->db_user,$this->db_pass);\n }catch(PDOException $e){\n echo\"<h2>创建POD对象失败</h2>\";\n $this->ShowErrorMessage($e);\n die();\n }\n }", "public function connectdb()\n {\n $this->db = mysql_connect($this->host,$this->port, $this->user, $this->pass)\n if (!$db)\n {\n die('Could not connect: ' . mysql_error());\n }\n\n mysql_select_db($this->database, $this->db);\n }", "private function connect() {\r\n\t\tunset($this->dbLink);\r\n\t\t/* create connection to database host */\r\n\t\t// $dbLink = mysql_connect(\"mysql.localhost\", \"de88623\", \"proberaum1\");\r\n\t\t$dbLink = mysql_connect(\"localhost\", \"robert\", \"YMbHFY+On2\");\r\n\t\t/* select database */\r\n\t\tmysql_select_db(\"robert_www_parkdrei_de\");\r\n\t\t/* set link to database as a object attribute */\r\n\t\t$this->dbLink = $dbLink;\r\n\t}", "function db_connect(){\n\t\tif(SQ_DEBUG){\n\t\t\t$this->dbh = mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}else{\n\t\t\t$this->dbh = @mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}\n\t\t\n\t\tif (!$this->dbh){\n\t\t\t$error_message = sprintf(SQ_DB_CONN_ERROR_MESSAGE, $this->dbhost, $this->dbuser);\n\t\t\tthrow new SQ_Exception($error_message, SQ_DB_CONN_ERROR_CODE);\n\t\t}\n\t\t$this->ready = true;\n\t\t\n\t\ttry{\n\t\t\t$this->select($this->dbname, $this->dbh);\n\t\t}catch(SQ_Exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function connect() {\n $this->database = new mysqli(\n $this->dbinfo['host'],\n $this->dbinfo['user'],\n $this->dbinfo['pass'],\n $this->dbinfo['name']\n );\n if ($this->database->connect_errno > 0)\n return $this->fail(\"Could not connect to database: [{$this->database->connect_error}]\");\n }", "protected function connect()\n\t{\n\t\t$strDSN = 'mysql:';\n\t\t$strDSN .= 'dbname=' . $GLOBALS['TL_CONFIG']['dbDatabase'] . ';';\n\t\t$strDSN .= 'host=' . $GLOBALS['TL_CONFIG']['dbHost'] . ';';\n\t\t$strDSN .= 'port=' . $GLOBALS['TL_CONFIG']['dbPort'] . ';';\n\t\t$strDSN .= 'charset=' . $GLOBALS['TL_CONFIG']['dbCharset'] . ';'; // supported only in PHP 5.3.6+\n\n\t\t$arrOptions = array(\n\t\t\tPDO::ATTR_PERSISTENT => $GLOBALS['TL_CONFIG']['dbPconnect'],\n\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => 'SET sql_mode=\\'\\'; SET NAMES ' . $GLOBALS['TL_CONFIG']['dbCharset'],\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n\t\t);\n\n\t\t$this->resConnection = new PDO($strDSN, $GLOBALS['TL_CONFIG']['dbUser'], $GLOBALS['TL_CONFIG']['dbPass'], $arrOptions);\n\t}", "public function connect()\n {\n $config = $this->config;\n $config = array_merge($this->_baseConfig, $config);\n\n $conn = \"DATABASE='{$config['database']}';HOSTNAME='{$config['host']}';PORT={$config['port']};\";\n $conn .= \"PROTOCOL=TCPIP;UID={$config['username']};PWD={$config['password']};\";\n\n if (!$config['persistent']) {\n $this->connection = db2_connect($conn, PGSQL_CONNECT_FORCE_NEW);\n } else {\n $this->connection = db2_pconnect($conn);\n }\n $this->connected = false;\n\n if ($this->connection) {\n $this->connected = true;\n $this->query('SET search_path TO '.$config['schema']);\n }\n if (!empty($config['charset'])) {\n $this->setEncoding($config['charset']);\n }\n\n return $this->connection;\n }", "private function openDatabaseConnection()\n {\n\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(\\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_OBJ, \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new \\PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }", "function connectDB();", "public static function connect() {\n $databaseConfig = Config::getDatabase();\n $databaseClass = $databaseConfig['class'];\n $databaseFile = SRC.'lib/db/databases/'.$databaseClass.'.php';\n if (!file_exists($databaseFile)) {\n throw new SynopsyException(\"Database class file '$databaseFile' doesn't exist!\");\n }\n require_once($databaseFile);\n $c = \"\\Synopsy\\Db\\Databases\\\\$databaseClass\";\n self::$instance = new $c();\n if (!self::$instance instanceof DatabaseInterface) {\n throw new SynopsyException(\"Database class '$databaseClass' doesn't implement DatabaseInterface interface!\");\n }\t\n self::$instance->connect($databaseConfig);\n }", "public function connect()\n {\n if ($this->pdo !== null) {\n return;\n }\n\n $db = $this->configs['database'] ?? '';\n $hostname = $this->configs['hostname'] ?? '';\n $port = $this->configs['port'] ?? '';\n $charset = $this->configs['charset'] ?? '';\n $username = $this->configs['username'] ?? '';\n $password = $this->configs['password'] ?? '';\n\n $this->pdo = new PDO(\n \"mysql:dbname={$db};host={$hostname};port={$port};charset={$charset}\",\n $username,\n $password\n );\n }", "private function connect() {\n $this->load->database();\n }", "function connect()\n\t{\n\t\t$this->link = mysql_connect( $this->hostname, $this->username, $this->password );\n\t\t\n\t\tif( $this->link === FALSE )\n\t\t\tthrow new Exception('MySQLDatabase: Failed to connect to database.');\t\n\t\t\t\n\t\t$db_selected = mysql_select_db( $this->database, $this->link );\n\t\t\n\t\tif( $db_selected === FALSE )\n\t\t\tthrow new Exception('MySQLDatabase: Failed to select database: '.$this->database );\t\n\t}", "private function connect()\n {\n global $config, $conn;\n if (!isset($conn))\n {\n try\n {\n $conn = new PDO('mysql:host=' . $config['mysql_hostname'] . ';dbname=' . $config['mysql_database'] . ';', $config['mysql_user'], $config['mysql_password']);\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch (PDOException $e)\n {\n error_log($e->getMessage());\n print 'We were unable to connect to the database. Please check your error logs.';\n die();\n }\n }\n }", "public function connect() {\n if ($this->db === null) {\n $this->db = new PDO($this->db_dsn, $this->db_user, $this->db_pass);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n\n if ($this->db_schema !== null && $this->db_schema !== '') {\n $this->db->exec('SET search_path = ' . $this->db_schema . ', public');\n }\n\n return $this->db;\n }", "private function connect()\n\t{\n\t\t$connectionData = $this->app->file->requireFile('config.php');\n\t\t\n\t\textract($connectionData);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tstatic::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\n\t\t\tstatic::$connection->exec('SET NAMES utf8');\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\t\t\t\t\n\t}", "public function connect()\n {\n $dsn = sprintf(\"mysql:host=%s;port=%s;dbname=%s\", $this->configuration['host'], $this->configuration['port'], $this->configuration['database']);\n $this->pdo = new PDO($dsn, $this->configuration['username'], $this->configuration['password']);\n }", "public function connect($host, $database, $user, $password);", "public function connect()\n {\n $data = $this->app->file->requireFile('config.php');\n extract($data);\n try {\n static::$DB = new PDO('mysql:host=' . $server . ';dbname=' . $dbname , $dbuser , $dbpass);\n\n static::$DB->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE , PDO::FETCH_OBJ);\n static::$DB->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);\n static::$DB->exec('SET NAMES utf8');\n\n }\n catch (PDOException $e){\n die($e->getMessage());\n }\n }", "private function dbconnect()\n {\n $this->db = new mysqli(Config::$dbhost, Config::$dbuser, Config::$dbpass, Config::$database);\n if (mysqli_connect_errno()) {\n Log::info(sprintf(\"Connect failed: %s\\n\", mysqli_connect_error()));\n exit();\n }\n }", "private function databaseConnection()\n {\n // Les connexions sont établies en créant des instances de la classe de base de PDO\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n }", "public function connect() {\r\n\t\t$this->connection = mysql_connect($this->host, $this->username, $this->password);\r\n\t\t$this->selectDB($this->squema);\r\n\t}", "private function dbConnection() {\r\n //if (!is_resource($this->connessione))\r\n // $this->connessione = mysql_connect($this->db_server,$this->db_username,$this->db_pass) or die(\"Error connectin to the DBMS: \" . mysql_error());\r\n if (!is_resource($this->connessione)) {\r\n try {\r\n $this->connessione = new PDO($this->db_type . \":dbname=\" . $this->db_name . \";host=\" . $this->db_server, $this->db_username, $this->db_pass);\r\n //echo \"PDO connection object created\";\r\n $this->setupSQLStatement();\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n die();\r\n }\r\n }\r\n }", "public function connectDatabase()\n {\n if($this->database !== null)\n {\n $this->disconnectDatabase();\n }\n\n $this->database = new mysqli(\n $this->DatabaseConfiguration['Host'],\n $this->DatabaseConfiguration['Username'],\n $this->DatabaseConfiguration['Password'],\n $this->DatabaseConfiguration['Name'],\n $this->DatabaseConfiguration['Port']\n );\n }", "public static function connectDatabase()\n {\n $database_config = require(__ROOT__ . 'config/database.php');\n\n try {\n\n return new \\PDO(\n 'mysql:host=' . $database_config['host'] . ';dbname=' . $database_config['db_name'] . ';charset=' . $database_config['db_charset'],\n $database_config['db_user'],\n $database_config['db_password']\n );\n\n } catch (\\PDOException $e) {\n\n }\n }", "public function getConnect()\n {\n $this->conn = Registry::get('db');\n }", "function dbConnect () {\n\t$con = mysql_connect($this -> host, $this -> user, $this -> pass);\n mysql_select_db($this->dbname,$con);\n\t}", "public function connect() {\n if (!$this->connected()) {\n tenant_connect(\n $this->db_name\n );\n }\n }", "public function connect($db = DB_DATABASE) {\n\t\t$host = DB_HOST;\n\t\t$db = DB_DATABASE;\n\t\ttry {\n\t\t\t$this->db_handle = new PDO(\"mysql:host=$host;dbname=$db\", DB_USER, DB_PASS);\n\t\t\t$this->db_handle->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); \n\t\t\t$this->db_handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t} catch(PDOException $e) {\n\t\t echo 'ERROR: ' . $e->getMessage();\n\t\t}\n\t}", "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "private function connect ()\n {\n $dbConfig = require_once 'config/configuration.php';\n list('host' => $host, 'port' => $port, 'database' => $database, 'username' => $username, 'password' => $password) = $dbConfig;\n\n $this->connection = new \\mysqli($host, $username, $password, $database, $port);\n\n if ($this->connection->connect_errno) {\n throw new \\Exception('Failed to connect to database');\n }\n }", "public function connect()\n\t{\n\t\ttry {\n\t\t\t$this->_connection = new PDO(\n\t\t\t\t\"mysql:host=\" . $this->_host . \n\t\t\t\t\";dbname=\" . $this->_database,\n\t\t\t\t$this->_username,\n\t\t\t\t$this->_password,\n\t\t\t\tarray(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')\n\t\t\t); \n\t\t}\n\t\tcatch(PDOException $error) {\n\t\t\tdie('<br />MySQL error: Failed to connect.<br />' . $error->getMessage());\n\t\t}\n\t}", "public function connect(){\n $this->database->connect($this->server, $this->login, $this->password, $this->db_name);\n if($this->database->connect_errno){\n return;\n }\n //nastavi kodovanie databazy na UTF-8\n $this->database->query(\"SET CHARACTER SET utf8\");\n $this->connected=true;\n }", "public function connect() {\r\n\t\t// connection parameters\r\n\t\t$host = App_Constant::$DATABASE_HOST;\r\n\t\t$user = App_Constant::$DATABASE_USER;\r\n\t\t$password = App_Constant::$DATABASE_PASSWORD;\r\n\t\t$database = App_Constant::$DATABASE_DB;\r\n\t\t$port = App_Constant::$DATABASE_PORT;\r\n\t\t// $socket = App_Constant::$DATABASE_SOCKET;\r\n\t\t\r\n\t\t// create new connection with specified database details.\r\n\t\ttry {\r\n\t\t\t$this->connection = mysqli_connect ( $host, $user, $password, $database, $port );\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\tthrow new Exception ( App_Constant::$ERROR_FAIL_DB_CONNECTION . mysqli_connect_error () );\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * if (mysqli_connect_errno()) { throw new Exception(App_Constant::$ERROR_FAIL_DB_CONNECTION . mysqli_connect_error()); }\r\n\t\t */\r\n\t}", "public function connectDB ($param);", "public static function connect() {\n $dsn = \"mysql:host=\" . Config::$DB_HOST\n . \";port=\" . Config::$DB_PORT\n . \";dbname=\" . Config::$DB_NAME\n . \";charset=\" . Config::$DB_CHAR;\n try {\n self::$PDO = new PDO($dsn, Config::$DB_USER, Config::$DB_PASS);\n self::$PDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Display SQL exceptions to the web page\n self::$PDO->setAttribute(PDO::MYSQL_ATTR_LOCAL_INFILE, true); // Allows use of MySQL 'LOAD DATA LOCAL INFILE' for mass data import\n } catch (PDOException $ex) {\n exit(\"Database failed to connect: \" . $ex->getMessage());\n }\n }", "function connect(\n\t\t$dbname)\n\t{\n\t\trequire 'config.php';\n\n\t\t$servername = $configs['db_servername'];\n\t\t$username = $configs['db_username'];\n\t\t$password = $configs['db_password'];\n\n\t\t// Create connection\n\t\t$this->connection = new mysqli($servername, $username, $password, $dbname);\n\n\t\t// Check connection\n\t\tif ($this->connection->connect_error) {\n\t\t\tdie(\"Connection failed: \" . $this->connection->connect_error);\n\t\t}\n\t}", "function connect_to_db () {\n\tglobal $conn;\n\tglobal $pdo_connection_string;\n\n\tif (!is_null($conn))\n\t\treturn $conn;\n\n\ttry {\n\t // connect to the database\n\t\t$conn = new PDO($pdo_connection_string, DB_USER, DB_PASS);\n\n\t\t// throw exceptions when errors occur\n\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\t// fetch rows as associative arrays (dictionaries)\n\t\t$conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n\t} catch (PDOException $e) {\n\t echo \"Database exception: \" . $e->getMessage() . \"\\n\";\n\t die;\n\t}\n\n\treturn $conn;\t\n}", "private function connect()\n {\n $this->db = new mysqli($this->host_name, $this->user_name, $this->password, $this->database_name);\n if ($this->db->connect_error) {\n die(\"Connect failed: \". $this->db->connect_error);\n exit();\n }\n }", "public static function connect()\n {\n try {\n $db_host = DbConfig::$host_url;\n $db_name = DbConfig::$database_name;\n $db_user = DbConfig::$database_user;\n $user_pw = DbConfig::$password;\n \n $con = new PDO('mysql:host='.$db_host.'; dbname='.$db_name, $db_user, $user_pw); \n $con->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n $con->setAttribute( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ );\n $con->setAttribute( PDO::ATTR_EMULATE_PREPARES, false );\n $con->exec(\"SET CHARACTER SET utf8\");\n\n return $con;\n }\n catch (PDOException $err) { \n $err->getMessage() . \"<br/>\";\n file_put_contents(__DIR__.'/log/PDOErrors.txt', $err.PHP_EOL.PHP_EOL, FILE_APPEND);\n die( $err->getMessage());\n }\n }", "public function connect () {\n\t\tif(!$this->con) {\n\t\t\t$this->db = mysqli_connect($this->db_host, $this->db_user, $this->db_pass, $this->db_name) or die(mysql_error());\n\t\t\t$this->con = true;\n\t\t}\n\t}", "protected function connect()\n\t\t{\n\t\t\t$conn = new PDO(\"mysql:dbname=$this->m_db;host=$this->m_host\", $this->m_username, $this->m_password); /* Create a new connection */\n\n\t\t\tif (DEBUG) /* If the global variable DEBUG is true */\n\t\t\t\techo 'Connecting to database.<br>'; /* Display debug messages */\n\t\t\t\n\t\t\treturn $conn; /* Return the database connection */\n\t\t}", "private static function _connect()\n {\n try {\n self::$_dbh = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\n }\n catch (PDOException $e) {\n echo \"Failure to connect to database. \".$e->getMessage();\n }\n }", "protected function connectDatabase() {\n\t\t\n\t\t/* check if tables need to be created */\n\t\t$createTables = !is_file(self::DATABASE_FILE);\n\t\t\n\t\t/* connect */\n\t\t$this->db = new SQLite3(self::DATABASE_FILE);\n\t\tif (!$this->db) {\n\t\t\tthrow new QuicksandException(\"Initializing SQLite database failed. Tell the admin.\");\n\t\t}\n\t\t\n\t\t/* create tables */\n\t\tif ($createTables) {\n\t\t\t$this->db->exec(\"CREATE TABLE image(\n\t\t\t\tid CHAR(\".self::ID_LENGTH_MAX.\") PRIMARY KEY,\n\t\t\t\tsize INTEGER,\n\t\t\t\ttype INTEGER,\n\t\t\t\tdelete_time INTEGER,\n\t\t\t\tdelete_code CHAR(32),\n\t\t\t\tgallery_id CHAR(\".self::ID_LENGTH_MAX.\")\n\t\t\t)\");\n\t\t}\n\t\t\n\t\t/* wait up to 20 seconds if another instance is using the db */\n\t\t$this->db->busyTimeout(20000);\n\t}", "public function connect()\n {\n try {\n\n $this->config = (new Config\\Config())->getConfig(); // load config file in config class\n\n // create pdo connection to DB by using config\n $this->_dbInstance = new \\PDO('mysql:host=' . $this->config['ServerName'] . ';dbname=' . $this->config['DBName'], $this->config['UserName'], $this->config['Password'],array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n\n // set attributes for this connection\n $this->_dbInstance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }catch(\\PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "public function connect()\n {\n if(is_null($this->client))\n {\n $this->client = new \\MongoClient($this->dsn);\n $parsedDsn = Utils::ParseDsn($this->dsn);\n if(is_null($this->dataDatabase)) {\n $this->db = $this->client->{$parsedDsn['database']};\n }else{\n $this->db = $this->client->{$this->dataDatabase};\n }\n //$this->collection = $this->client->selectCollection($this->dsn['database'], $this->dsn['table']);\n }\n }", "public static function connect()\n {\n // Only connect if we don't have a handle on the database\n if (!is_null(self::$_db))\n return self::$_db;\n \n try\n {\n // DSN FORMAT: \"mysql:host=localhost;dbname=test\"\n $dsn = Config::get('Database', 'Driver') . ':host=' . Config::get('Database', 'DBHost') . ';dbname=' . Config::get('Database', 'DB');\n self::$_db = new PDO($dsn, Config::get('Database','Username'), Config::get('Database','Password'), array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n self::$_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch (PDOException $e)\n {\n throw new DaoException(\"Error (Dao::connect): \" . $e->getMessage());\n }\n }", "function connectDB(){\n\t\tif(!$this->conId=mysql_connect($this->host,$this->user,$this->password)){\n trigger_error('Error connecting to the server '.mysql_error());\n exit();\n\t\t}\n\t\tif(!mysql_select_db($this->database,$this->conId)){\n\t\t\t trigger_error('Error selecting database '.mysql_error());\n\t\t\t exit();\n\t\t}\n\t}", "protected function dbConnect() {\n\t\trequire 'dblog.php';\n\t\t$db = new PDO($connect, $user, $pwd);\n\t\t$db->exec('SET NAMES UTF8');\n\t\treturn $db;\n\t}", "public static function connect() {\n\t\tif(!self::$conn) {\n\t\t\tnew Database();\n\t\t}\n\t\treturn self::$conn;\n\t}", "protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "private function connect()\n {\n try {\n self::$connection = new PDO($this->buildDSN(), $this->user, $this->pass, $this->options);\n } catch (PDOException $e) {\n die('Connection failed: ' . $e->getMessage());\n }\n\n }", "private function db_connect() {\n\n\t\t$new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : TRUE;\n\t\t$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;\n\n\t\t// Connect to database.\n\t\tif ( DEBUG_MODE ) {\n\t\t\t$this->dbcon = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport);\n\t\t} else {\n\t\t\t$this->dbcon = @mysqli_connect($this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport);\n\t\t}\n\n\t\tif ( mysqli_connect_errno () ) {\n\t\t\t/* ===== Bail ===== */\n\t\t\tif (DEBUG_DISPLAY) {\n\t\t\t\techo (\"Failed to connect to MySQL: \" . mysqli_connect_error() . '<br />');\n\t\t\t}\n\t\t}\n\n\t\t// Set charset.\n\t\tmysqli_set_charset ( $this->dbcon, $this->dbcharset );\n\n\t\t// Set collate.\n\t\t// mysqli_query ( $this->dbcon, \"COLLATE {$this->dbcollate}\" );\n\n\t\t// Set the database as ready for queries.\n\t\t$this->ready = TRUE;\n\t}", "public function connectDB()\n {\n // Early return if connected already\n if ($this->isConnected) {\n return;\n }\n\n if (! $this->databaseName) {\n throw new \\RuntimeException('TYPO3 Fatal Error: No database selected!', 1270853882);\n }\n\n if ($this->sql_pconnect()) {\n if (! $this->sql_select_db()) {\n throw new \\RuntimeException('TYPO3 Fatal Error: Cannot connect to the current database, \"' . $this->databaseName . '\"!', 1270853883);\n }\n } else {\n throw new \\RuntimeException('TYPO3 Fatal Error: The current username, password or host was not accepted when the connection to the database was attempted to be established!', 1270853884);\n }\n }", "public function connect() {\n if ($this->db == null) {\n $this->db = new mysqli($this->host_name, $this->user_name, $this->password, $this->db_name);\n if ($this->db->connect_errno > 0) {\n throw new Eccezione(\"C'è stato un errore nella connessione con il database. L'errore che si è verificato è il seguente: \" . $this->db->connect_error);\n } else {\n $this->is_connected = TRUE;\n }\n }\n }", "private static function connect(){\n try{\n $conn_data = json_decode(file_get_contents(__DIR__.\"/../config/connection.json\"), true);\n self::$connection = new PDO($conn_data['CONN_STRING'], $conn_data['DB_USER'], $conn_data['DB_PASS']);\n\t\t} catch (PDOException $e){\n\t\t\techo \"Database error: \".$e->getMessage();\n\t\t\tdie();\n\t\t}\n }", "private function _connect()\n\t{\n\t\t// persistent connection can lessen server load\n\t\tif ($this->_persistent === true)\n\t\t{\n\t\t\t$this->_connection = mysql_pconnect($this->_host.':'.$this->_port,\n\t\t\t\t$this->_user, $this->_password);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_connection = mysql_connect($this->_host.':'.$this->_port,\n\t\t\t\t$this->_user, $this->_password);\n\t\t}\n\n\t\t// verify that the connection is active\n\t\tif ($this->_connection == false ||\n\t\t\tis_resource($this->_connection) === false\n\t\t)\n\t\t{\n\t\t\tthrow new DatabaseException('',\n\t\t\t\tDatabaseException::CONNECTION_FAILED\n\t\t\t);\n\t\t}\n\n\t\t// only try to connect if there is a database given (with mysql\n\t\t// you don't need a database given\n\t\tif (!empty($this->_database))\n\t\t{\n\t\t\t// try to connect to the database\n\t\t\tif (mysql_select_db($this->_database, $this->_connection) === false)\n\t\t\t{\n\t\t\t\tthrow new DatabaseException('Error ('.\n\t\t\t\t\tmysql_errno($this->_connection).') '.\n\t\t\t\t\tmysql_error($this->_connection));\n\t\t\t}\n\t\t}\n\t}", "function connectToHostDb()\n {\n $this->setDb('host');\n $this->connect();\n if ($this->dbconnect)\n {\n return;\n }\n $this->setDb('postgres');\n $this->connect();\n if (!$this->dbconnect)\n {\n echo \"Error connecting to host postgres database.\\n\";\n echo \"Tried names 'host' and 'postgres'\\n\";\n }\n }", "function setDatabaseConnection($host,$database,$user,$pass);", "private function openDatabaseConnection()\n {\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n\n //UTF-8 encoding queries\n $this->db->exec(\"SET NAMES 'utf8'\");\n $this->db->exec(\"SET CHARACTER SET utf8\");\n $this->db->exec(\"SET COLLATION_CONNECTION='utf8_unicode_ci'\");\n }", "public function connect() {\n\t\t$cnn_string = 'host='.$this->_dbhost.' port='.$this->_dbport.' user='.$this->_dbuser.' password='.$this->_dbpass.' dbname='.$this->_dbname;\n\t\t\n\t\t$this->_instance = pg_connect($cnn_string) or PK_debug(__FUNCTION__, \"No se ha podido conectar con la DB\\n\\n\".pg_errormessage(), array('class'=>'error'));\n\t\t\n\t\tif (!$this->_instance) {\n\t\t\techo '<h1>Error en la aplicacion</h1><p>No se ha podido conectar con la base de datos</p>';\n\t\t\tPK_debug('', '', 'output');\n\t\t\texit();\n\t\t}\n\t\t\n\t\treturn $this->_instance;\n\t}", "private function openConnection()\n\t{\n if (!($this->link = mysql_connect($this->host, $this->user, $this->pass))){\n throw new DatabaseExceptions(302);\n }\n\n $db_selected = mysql_select_db($this->db, $this->link);\n if (!$db_selected) {\n throw new DatabaseExceptions(303);\n }\n\n\t}", "public function connect(){\n $this->con = oci_connect($this->user, $this->pass, $this->db, 'AL32UTF8');\n if( !$this->con){\n $e = oci_error();\n throw new Exception(\"Error al conectar db; \"\n . \"User: {$this->user}, Database: {$this->db}, Error: \"\n . $e);\n\n }\n\n }", "private function conectarDB(){\n\t\t$dsn = 'mysql:dbname='.self::nombre_db.' ;host='.self::servidor;\n\t\ttry {\n\t\t\t#metodo abstracto para la conexion a la bd\n\t\t\t$this->_conn = new PDO($dsn, self::usuario_db, self::pwd_db);\n\t\t \t\n\t\t } catch (PDOException $e) {\n\t\t \techo \"Falló la conexión: \".$e->getMessage();\n\t\t } \n\t}", "private static function connect() {\n try {\n $db = new PDO(\n \"mysql:host=\" . DB_HOST . \";dbname=\" . DB_NAME,\n DB_USER, DB_PASS\n );\n }\n catch (Exception $e) {\n $this->error_msg = \"There was a problem connecting to the database.\" . $e->getMessage();\n $db = null;\n }\n\n return $db;\n }", "public function connect()\r\n\t{\r\n\t\t$options = array(\r\n\t\t\t'driver' => $this->_driver,\r\n\t\t\t'host' => $this->_host,\r\n\t\t\t'user' => $this->_username,\r\n\t\t\t'password' => $this->_password,\r\n\t\t\t'database' => $this->_database,\r\n\t\t\t'prefix' => $this->_prefix\r\n\t\t);\r\n\t\t\r\n\t\t$this->_instance = JFlappConnectorTypeDatabase::getInstance( $options );\r\n\t\r\n\t\treturn $this->_instance;\r\n\t}", "protected function _initDbConnection() {\n\t\tif (!empty($this->db)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Create a new connection\n\t\tif (empty($this->config['datasource'])) {\n\t\t\tdie(\"FeedAggregatorPdoStorage: no datasource configured\\n\");\n\t\t}\n\n\t\t// Initialise a new database connection and associated schema.\n\t\t$db = new PDO($this->config['datasource']); \n\t\t$this->_initDbSchema();\n\t\t\n\t\t// Check the database tables exist\n\t\t$this->_initDbTables($db);\n\n\t\t// Database successful, make it ready to use\n\t\t$this->db = $db;\n\t}", "public function connect(){\n\t\tdefine(\"DB_SERVER\", \"localhost\");\n\t\tdefine(\"DB_USER\", \"root\");\n\t\tdefine(\"DB_PASS\", \"admin\");\n\t\tdefine(\"DB\", \"gpomara\");\n\t\t$this->con = mysqli_connect(DB_SERVER,DB_USER,DB_PASS,DB);\n\t\tif(mysqli_errno($this->con)){\n\t\t\tdie(\"Database connection failed: \".mysqli_connect_error().\"(\".mysqli_connect_error().\")\");\n\t\t}\n\t}", "public function connectToDB()\n {\n $this->dbConnection = @new mysqli(\"localhost\",\"root\", \"\",\"CMS_Project\");\n if (!$this->dbConnection)\n {\n die('Could not connect to the CMS Database: ' .\n $this->dbConnection->connect_errno);\n }\n }", "public function connect() {\n\n\t\t$db_info_string = $this->_db_info[0]. ':host=' . $this->_db_info[1] . ';';\n\t\t$db_info_string .= 'dbname='. $this->_db_info[4]; \n\n\t\ttry {\n\t\t\t$this->_db = new pdo($db_info_string, $this->_db_info[2], $this->_db_info[3] );\n\n\t\t//set Error mode to send out exceptions\n\t\t$this->_db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); \n\n\t\t} catch (PDOException $e) {\n\t\t\t//TODO Custom error reporting\n\t\t\techo $e->getMessage();\n\t\t}\n\n\t\t//TODO ATTEMPT TO CONNECT, IF PDO OBJECT CANNOT BE CREATED, return \n\t\t//false and use custome error reporting\n\t\t//TRY, CATCH that jazz tooo\n\t\t\n\t\t//Returns the object so that it can be chained\n\t\treturn $this;\n }", "function connectDatabase() {\n mysql_pconnect(SERVER, USERNAME, PASSWORD)\n or die('Could not connect: ' . mysql_error());\n\n mysql_select_db(DATABASE_NAME)\n or die('Could not select: ' . mysql_error());\n}", "public function db_connect(){\n $db_username = $this->db['username'];\n $db_password = $this->db['password'];\n $db_host = $this->db['host'];\n\n // Start Connection\n $mysql = mysqli_connect($db_host,$db_username,$db_password);\n (!$mysql ? die(\"ERROR: \" . mysqli_error($this->mysql)) : TRUE);\n // Return MySQL Resource\n return $mysql;\n }", "public function open_db_connection() {\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n // cgecking if the connection has errors\n if($this->connection->connect_errno) {\n die(\"Database connection failed\" . $this->connection->connect_error);\n }\n }", "public function connect(){\n try {\n $this->_dbh = new PDO('mysql:host='.$this->_host.';dbname='.$this->_db,$this->_user,$this->_pass);\n echo \"connexion reussi\";\n }\n catch(PDOException $e)\n {\n echo \"Connection failed: \" . $e->getMessage();\n }\n }", "private function Connect()\n {\n $config = ConfigDb::dbConfig();\n $dsn = 'mysql:dbname='.$config['database'].';host='.$config['host'];\n try\n {\n $this->pdo = new PDO($dsn, $config['username'], $config['password'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);\n $this->bConnected = true;\n }\n catch (PDOException $e)\n {\n echo $this->ExceptionLog($e->getMessage());\n die();\n }\n }", "private static function get_connect(){\n static::$db = pg_connect(static::$host . \" \" . static::$port . \" \" . static::$database . \" \" . static::$user . \" \" . static::$pass);\n }", "private function openConnection() {\n $this->db = new PDO(\"mysql:host=127.0.0.1;dbname=mvc\", \"gert\", \"becode\");\n }" ]
[ "0.82457006", "0.8232178", "0.7905681", "0.7794408", "0.7732543", "0.77242833", "0.7718842", "0.7718093", "0.7688021", "0.7610018", "0.75969654", "0.75835", "0.75525045", "0.75457305", "0.74540085", "0.7443921", "0.7435145", "0.7432224", "0.74272597", "0.74229467", "0.74090916", "0.74048686", "0.73847204", "0.73796463", "0.7321696", "0.7293503", "0.7278147", "0.727359", "0.72672945", "0.7250778", "0.72452253", "0.72342217", "0.7223773", "0.721463", "0.7206966", "0.71852684", "0.7180968", "0.7180113", "0.7168873", "0.7150334", "0.71494365", "0.7141605", "0.71299213", "0.7127411", "0.7109985", "0.71040815", "0.70971674", "0.70970595", "0.70926625", "0.70870423", "0.70782274", "0.7067032", "0.7066662", "0.70650715", "0.70639426", "0.7063906", "0.7057499", "0.7051439", "0.70411", "0.703473", "0.7026686", "0.70238835", "0.70156485", "0.70132816", "0.7011486", "0.7008593", "0.6998445", "0.6992795", "0.6989066", "0.6984107", "0.6982147", "0.6980703", "0.69800425", "0.6974546", "0.6973584", "0.69586515", "0.6955064", "0.69530106", "0.6950269", "0.69461334", "0.69401777", "0.69365543", "0.693282", "0.6930231", "0.6926751", "0.6922926", "0.69228566", "0.69204134", "0.69160664", "0.69121516", "0.6910867", "0.6908223", "0.6905545", "0.6901979", "0.68990475", "0.6891419", "0.68907833", "0.6888842", "0.68866485", "0.6883725", "0.68828887" ]
0.0
-1
Show all databases in hosts
public function getDatabases(){ $pdo = $this->pdo; $databases = $pdo->prepare("SHOW DATABASES;"); $databases->execute(); $databases = $databases->fetchAll($pdo::FETCH_NUM); foreach($databases as &$database) $database = $database[0]; return $databases; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showDatabases(){\n\t\treturn $this->instance->listDatabases();\n\t}", "function database_list(){\n\t\treturn($this->q2obj(\"show databases\"));\n\t}", "private function showDatabases()\n {\n $dbs = $this->mongoClient->listDatabases();\n foreach ($dbs as $db) {\n $padding = $this->cli->padding(20)->char('.');\n $padding->label($db->getName())->result($this->formatBytes($db->getSizeOnDisk()));\n }\n }", "public function listDatabases(){\n\t\treturn $this->instance->listDatabases();\n\t}", "public function showAllDatabase(){\n $stmt = $this->pdo->query('SHOW DATABASES');\n\n //Fetch the columns from the returned PDOStatement\n $databases = $stmt->fetchAll(PDO::FETCH_COLUMN);\n //var_dump($databases);\n //Loop through the database list and print it out.\n foreach($databases as $database){\n //$database will contain the database name\n //in a string format\n echo $database, '<br>';\n }\n return 1;\n }", "public function showdbs()\n {\n $this->_validate(array());\n $this->_QUERYCOUNT++;\n\n return $this->_query->showdatabases();\n }", "public function admin_get_dbs() {}", "public function list_databases() {\n $sql = \"SHOW DATABASES\";\n try {\n if ($this->conn == null) {\n echo \"conn is null<br>\";\n }\n $result = $this->conn->query($sql);\n $dbs = array();\n foreach($result as $row) {\n if ($row['Database'] != 'mysql' &&\n $row['Database'] != 'information_schema' &&\n $row['Database'] != 'performance_schema' &&\n $row['Database'] != 'sys') {\n array_push($dbs, $row['Database']);\n }\n }\n return $dbs;\n } catch (PDOException $e) {\n die(\"DB ERROR: \".$e->getMessage());\n }\n }", "public function get_databases() {\r\n\t\t$dbs = $this->query_select ( \"SHOW DATABASES;\" );\r\n\t\tif (! function_exists ( '__tmp_huy_db_databases' )) {\r\n\t\t\tfunction __tmp_huy_db_databases($val) {\r\n\t\t\t\treturn $val ['Database'];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array_map ( '__tmp_huy_db_databases', $dbs );\r\n\t}", "function databases(){\n $this->execute(\"SELECT datname FROM pg_database WHERE datistemplate = false;\");\n $aDatabases = array();\n while ($aReg = $this->fetchRow()){\n $aDatabases[] = $aReg[0];\n }\n return $aDatabases;\n }", "public function index()\n {\n return view('services.databases', ['databases' => databases::all()]);\n\n }", "public function get_dbs()\n\t{\n\t\treturn $this->driver_query('db_list');\n\t}", "public function databases()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/databases');\n }", "public function get_databases()\n\t{\n\t\treturn $this->databases;\n\t}", "public function getDatabases() {\n\t\treturn $this->databases;\n\t}", "function getDBs($host,$user,$pw,$pattern)\n{\n $returnArray=array();\n \n $pdo = new PDO( \"mysql:host=\".$host.\";\", $user,$pw);\t\n \n //select all databases like pattern sent in.\n $sql=\"SELECT SCHEMA_NAME as dbName FROM INFORMATION_SCHEMA.SCHEMATA where SCHEMA_NAME like '\".$pattern.\"'\";\n $resultArray=$pdo->query($sql);\n \n if ($resultArray !== false) {\n print_r($resultArray);\n if (count($resultArray)) {\n foreach ($resultArray as $row) {\n $returnArray[]=$row['dbName']; \n }\n }\n } \t\n \n //close connection.\n $pdo=null;\n \n \treturn $returnArray;\n}", "public static function all()\n {\n if( $call = Master::$cMaster->APICall('0.9.1/db') )\n {\n $result = array();\n foreach( json_decode( $call, true ) as $db ){ array_push( $result, Database::DBWithIDName( $db['ID'], $db['name'] ) ); }\n return $result;\n }\n else{ commandResult( 500, \"Could not lookup databases\" ); }\n }", "public function testListDatabases()\r\n {\r\n $this->_sm->listDatabases();\r\n }", "public function getAdministrativeDatabasesList() {\n return $this->_get(9);\n }", "function getDatabases($currentdatabase = NULL) {\n\t\tglobal $conf, $misc;\n\n\t\t$server_info = $misc->getServerInfo();\n\n\t\tif (isset($conf['owned_only']) && $conf['owned_only'] && !$this->isSuperUser()) {\n\t\t\t$username = $server_info['username'];\n\t\t\t$this->clean($username);\n\t\t\t$clause = \" AND pu.usename='{$username}'\";\n\t\t}\n\t\telse $clause = '';\n\n\t\tif ($currentdatabase != NULL) {\n\t\t\t$this->clean($currentdatabase);\n\t\t\t$orderby = \"ORDER BY pdb.datname = '{$currentdatabase}' DESC, pdb.datname\";\n\t\t}\n\t\telse\n\t\t\t$orderby = \"ORDER BY pdb.datname\";\n\n\t\tif (!$conf['show_system'])\n\t\t\t$where = ' AND NOT pdb.datistemplate';\n\t\telse\n\t\t\t$where = ' AND pdb.datallowconn';\n\n\t\t$sql = \"SELECT pdb.datname AS datname, pu.usename AS datowner, pg_encoding_to_char(encoding) AS datencoding,\n (SELECT description FROM pg_description pd WHERE pdb.oid=pd.objoid) AS datcomment\n FROM pg_database pdb, pg_user pu\n\t\t\tWHERE pdb.datdba = pu.usesysid\n\t\t\t{$where}\n\t\t\t{$clause}\n\t\t\t{$orderby}\";\n\n\t\treturn $this->selectSet($sql);\n\t}", "public function listPersistedDatabases(): array\n {\n return $this->dataReader->listPersistedDatabases();\n }", "public function list_dbs(){\n \t$db=array();\n \t$d=dir($this->_db_root_dir);\n \twhile ($tmp=$d->read()){\n if(is_dir($this->_db_root_dir.$tmp) && substr($tmp,0,1)!='.' )\n $db[]=$tmp;\n \t}\t\n \treturn $db;\n }", "function virtual_hosting_db_gethostnames($vroot = NULL)\n{\n $PHORUM = $GLOBALS[\"PHORUM\"];\n\n $sql = \"\n SELECT hostname,vroot\n FROM {$PHORUM[\"virtual_hosts_table\"]}\n \";\n if ($vroot !== NULL) {\n settype($vroot, \"int\");\n $sql .= \" WHERE vroot = $vroot\";\n }\n\n $return = phorum_db_interact(DB_RETURN_ROWS, $sql, 0);\n foreach ($return as $id => $row) $return[$id] = $row[1];\n\n return $return;\n}", "public function get_database_names() {\n return UPS_SUCCESS;\n }", "public function listDatabases(): array\n {\n if ($this->allDatabaseIdentifiers === null) {\n $this->allDatabaseIdentifiers = array_combine(\n $this->listPersistedDatabases(),\n $this->listPersistedDatabases()\n );\n }\n\n return array_values($this->allDatabaseIdentifiers);\n }", "public function getRemoteDatabases(RemoteInterface $remote);", "public function getListDb()\n {\n return $this->internalCall('db', 'list', []);\n }", "public function getDatabases($filterMysqlDb = true)\n {\n $query = $this->query('show databases');\n $dbs = $query->fetchAll(\\PDO::FETCH_COLUMN);\n\n\n if (true === $filterMysqlDb) {\n $filter = function ($v) {\n if (\n 'mysql' === $v ||\n 'sys' === $v ||\n 'performance_schema' === $v ||\n 'information_schema' === $v\n ) {\n return false;\n }\n return true;\n };\n $dbs = array_merge(array_filter($dbs, $filter)); // array_merge to restore indexes...\n }\n return $dbs;\n }", "private function showCollections()\n {\n $currentDB = $this->currentDB;\n if (!empty($currentDB)) {\n $collections = $this->mongoClient->selectDatabase($currentDB)->listCollections();\n foreach ($collections as $collection) {\n $this->cli->shout(' ' . $collection->getName());\n }\n } else {\n $this->cli->error('Please select db');\n }\n }", "public function testGetAllDbs()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n // First, create a DB\n Sopha_Db::createDb($dbname, $host, $port);\n \n // Make sure DB exists by looking for it in the list of all DBs\n $dbs = Sopha_Db::getAllDbs($host, $port);\n $this->assertType('array', $dbs);\n $this->assertTrue(in_array($dbname, $dbs));\n \n // Delete the DB and make sure it is no longer in the list\n Sopha_Db::deleteDb($dbname, $host, $port);\n $dbs = Sopha_Db::getAllDbs($host, $port);\n $this->assertType('array', $dbs);\n $this->assertFalse(in_array($dbname, $dbs));\n }", "function show_db_fields($db_name) {\n $query = db_select($db_name, 'db')\n ->fields('db')\n ->range(0,1);\n $results = $query->execute()->fetchAll();\n return $results;\n}", "public static function db_names() {\n return null;\n }", "function MetaDatabases() {}", "public function getDatabaseInfo();", "public function databases(string $serverId)\r\n {\r\n $data = $this->getAllData(\"servers/$serverId/databases\");\r\n return $this->transformCollection($data, Database::class);\r\n }", "function certificateapi_get_hosts() {\n global $CFG, $DB;\n return $DB->get_records_sql('SELECT\n h.id,\n h.ip_address,\n h.wwwroot,\n h.fullname,\n h.last_connect_time,\n h.clientid,\n h.public_key,\n h.public_key_validfrom,\n h.public_key_expires,\n h.permissions\n FROM\n {certificateapi_host} AS h' );\n}", "public function getAllDbHouses ()\n {\n $this->db->select( '*' );\n $this->db->from( 'tbld_distribution_house' );\n $query = $this->db->get()->result_array();\n return $query;\n }", "public function Clients()\n\t{\n\t\t//\n\t\t// Connect object.\n\t\t//\n\t\tif( ! $this->isConnected() )\n\t\t\t$this->Connect();\n\n\t\t//\n\t\t// Init local storage.\n\t\t//\n\t\t$databases = [];\n\n\t\t//\n\t\t// Ask client for list.\n\t\t//\n\t\t$list = $this->Connection()->listDatabases();\n\t\tforeach( $list as $element )\n\t\t\t$databases[ $element->getName() ] = $element;\n\n\t\treturn $databases;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\n\t}", "public function listInMemoryDatabases(): array\n {\n return array_diff($this->listDatabases(), $this->listPersistedDatabases());\n }", "function listCatalogs($args) {\n\n $conn = mysql_pconnect($args['server'], $args['username'], $args['password']);\n if($conn === false) {\n throw 'Connection failed.';\n }\n\n $results = mysql_list_dbs($conn);\n $catalogs = array();\n while( $row = mysql_fetch_assoc($results) ) {\n $catalogs[] = $row;\n }\n\n return array( 'catalogs' => $catalogs );\n }", "public function show(databases $databases)\n {\n $databases = databases::find($id);\n return view('services.databases', ['databases' => $databases]);\n }", "public function index()\n {\n return new HostCollection(Host::paginate(10));\n }", "public function actionDb()\n {\n preg_match('/host\\=([^;]+);dbname=(.*)$/', \\Yii::$app->db->dsn, $m);\n return static::runProgram('mysql', '-u'.\\Yii::$app->db->username . ' -p'.\\Yii::$app->db->password . ' -h'.$m[1] .' ' . $m[2]);\n }", "public static function db_names() {\n return array(\n array('id', 'book_chapters', 'timecreated', 'timemodified', 'standard'),\n );\n }", "public static function getSupportedDatabases()\n {\n return [\n 'mysql' => [\n 'id' => 'mysql',\n 'name' => 'MySQL/Percona'\n ],\n ];\n }", "public function getDbHost () {\n return $this->dbHost; \n }", "public function index()\n {\n $page_name = \"Database\";\n $breadcrumbs = \"Settings > Database\";\n\n return view('pages.settings.database', compact('page_name', 'breadcrumbs'));\n }", "public function getDatabaseHost()\n {\n return $this->settings['db_host'];\n }", "function get_dbname() { return reset(explode('.', $_SERVER['SERVER_NAME'])); }", "function dumpDB($database = HAR_ALL_DB, $tables = HAR_ALL_TABLES,$options = HAR_ALL_OPTIONS) \n {\n $this->_connect();\n \n if(empty($database))\n {\n $this->error = \"Specify the database.\";\n return false;\n }\n \n if(empty($tables))\n {\n $this->error = \"Specify the tables.\";\n return false;\n }\n \n if($database == HAR_ALL_DB)\n {\n $sql = \"SHOW DATABASES\";\n $this->result = @mysql_query($sql);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n \n while($row = mysql_fetch_array($this->result,MYSQL_NUM))\n {\n $this->database[]=$row[0];\n }\n }\n else if(is_string($database))\n {\n $this->database = @explode(\",\",$database);\n }\n \n $lineEnd = $this->lineEnd[$this->OS_local];\n $returnSql = \"# MySql Dump\".$lineEnd ;\n $returnSql .= \"# Host:\".$this->dbhost.$lineEnd;\n $returnSql .= \"# -------------------------------------------------\".$lineEnd;\n\n $sql = \"SELECT VERSION()\";\n $this->result = mysql_query($sql);\n $row = mysql_fetch_array($this->result,MYSQL_NUM);\n $returnSql .= \"# Server version \".$row[0].$lineEnd.$lineEnd;\n \n \n \n for($i=0; $i < count($this->database) ; $i++)\n {\n if(count($this->database)>1)\n $returnSql.= \"USE \".$this->database[$i].\";\".$lineEnd.$lineEnd;\n \n $this->result = @mysql_query(\"USE \".$this->database[$i]);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n \n $this->tables=array();\n if($tables == HAR_ALL_TABLES)\n {\n $sql = \"SHOW Tables\";\n $this->result = @mysql_query($sql);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n\n while($row = mysql_fetch_array($this->result,MYSQL_NUM))\n {\n $this->tables[]=$row[0];\n }\n }\n else if(is_string($tables))\n {\n $this->tables = @explode(\",\",$tables);\n }\n for($j=0 ; $j < count($this->tables) ; $j++)\n {\n if(($options & HAR_NO_STRUCT ) != HAR_NO_STRUCT)\n {\n $sql = \"SHOW CREATE TABLE \".$this->tables[$j];\n $this->result = @mysql_query($sql);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n $row = mysql_fetch_array($this->result,MYSQL_NUM);\n \n \n $returnSql .= \" #\".$lineEnd;\n $returnSql .= \" # Table structure for table '\".$this->tables[$j].\"'\".$lineEnd;\n $returnSql .= \" #\".$lineEnd.$lineEnd;\n \n if(($options & HAR_DROP_TABLE) == HAR_DROP_TABLE)\n $returnSql .= \"DROP TABLE IF EXISTS \".$this->tables[$j].\";\".$lineEnd;\n $returnSql .= $row[1].\";\".$lineEnd.$lineEnd.$lineEnd;\n }\n \n if(($options & HAR_NO_DATA ) != HAR_NO_DATA )\n {\n $returnSql .= \" #\".$lineEnd;\n $returnSql .= \" # Dumping data for table '\".$this->tables[$j].\"'\".$lineEnd;\n $returnSql .= \" #\".$lineEnd.$lineEnd;\n \n if(($options & HAR_LOCK_TABLE ) == HAR_LOCK_TABLE )\n $returnSql .= \"LOCK TABLES \".$this->tables[$j].\" WRITE;\".$lineEnd;\n\n $temp_sql = \"INSERT INTO \".$this->tables[$j];\n if(($options & HAR_FULL_SYNTAX == HAR_FULL_SYNTAX))\n {\n $sql=\"SHOW COLUMNS FROM \".$this->tables[$j];\n $this->result = @mysql_query($sql);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n $fields = array();\n while($row = mysql_fetch_array($this->result,MYSQL_NUM))\n {\n $fields[]=$row[0];\n }\n $temp_sql.=' ('.@implode(',',$fields).')';\n }\n\n $sql=\"SELECT * FROM \".$this->tables[$j];\n $this->result = @mysql_query($sql);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n while($row = mysql_fetch_array($this->result,MYSQL_NUM))\n {\n foreach($row as $key => $value)\n $row[$key] = mysql_escape_string($value);\n \n $returnSql .=$temp_sql.' VALUES (\"'.@implode('\",\"',$row).'\");'.$lineEnd;\n }\n if(($options & HAR_LOCK_TABLE ) == HAR_LOCK_TABLE )\n $returnSql .= \"UNLOCK TABLES;\".$lineEnd;\n\n }\n $returnSql .=$lineEnd.$lineEnd;\n }\n }\n return $returnSql;\n }", "public function hasAdministrativeDatabases() {\n return $this->_has(9);\n }", "function listAllHosts() {\n $execute = LIST_COMMAND;\n exec($execute, $output, $retVal);\n return $output;\n}", "function getAllSites(){\n\n if ($this->connection) {\n $rows = $this->connection->query(\"SELECT * FROM `sites`\");\n\n $this->checkError();\n\n $result = $rows->fetchAll();\n\n return $result;\n }\n }", "public function getConnectionNames();", "public function getDatabase(){\n $url = $this->urlWrapper() . URLResources::DATABASE;\n return $this->makeRequest($url, \"GET\", 2);\n }", "public function getDBHost(){\n\n\t\treturn $this->_host;\n\t}", "public function getDbHost()\n\t{\n\t\treturn $this->db_host;\n\t}", "public static function getServersList()\n {\n return CHtml::listData(self::model()->findAll(), 'host', 'host');\n }", "function listSources() {\n\t\t$db = $this->config['database'];\n\t\t$this->config['database'] = basename($this->config['database']);\n\n\t\t$cache = parent::listSources();\n\t\tif ($cache != null) {\n\t\t\treturn $cache;\n\t\t}\n\n\t\t$result = $this->fetchAll(\"SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;\");\n\n\t\tif (!$result || empty($result)) {\n\t\t\treturn array();\n\t\t} else {\n\t\t\t$tables = array();\n\t\t\tforeach ($result as $table) {\n\t\t\t\t$tables[] = $table[0]['name'];\n\t\t\t}\n\t\t\tparent::listSources($tables);\n\n\t\t\t$this->config['database'] = $db;\n\t\t\treturn $tables;\n\t\t}\n\t\t$this->config['database'] = $db;\n\t\treturn array();\n\t}", "public function index()\n {\n return view('servers.list',[\n 'servers' => $this->repository->getServersForAuth()\n ]);\n }", "public function viewAllBlogs(){\n $data = Blog::get();\n return view('allblog', compact('data'));\n }", "public function getDBConnections(): array {\n return $this->configVars['database-connections'];\n }", "public function connections()\n {\n $this->_display('connections');\n }", "public function qsGetDbTables()\n {\n $sql = 'show tables';\n $d = $this->qExecPluck($sql);\n\n return $d;\n }", "public function selectDb($dbName) {}", "function connectToHostDb()\n {\n $this->setDb('host');\n $this->connect();\n if ($this->dbconnect)\n {\n return;\n }\n $this->setDb('postgres');\n $this->connect();\n if (!$this->dbconnect)\n {\n echo \"Error connecting to host postgres database.\\n\";\n echo \"Tried names 'host' and 'postgres'\\n\";\n }\n }", "public function database($store)\n\t{\n\t\t$result = $this->Model->all($store);\n\t\tprint_r($result);\n\t}", "public function getSitesList()\n {\n return Db::fetchAll(\"SELECT idsite, name\"\n . \"\\n FROM \" . Common::prefixTable('site')\n . \"\\n ORDER BY idsite\");\n }", "public function getDatabaseInfo() {\n static $result;\n if (isset($result)) {\n return $result;\n }\n $sql = <<< EOF\n select name\n , db.snapshot_isolation_state\n , db.snapshot_isolation_state_desc\n , db.is_read_committed_snapshot_on\n , db.recovery_model\n , db.recovery_model_desc\n , db.collation_name\n from sys.databases db\n WHERE DB_NAME(db.database_id) = :database\nEOF;\n // Database is defaulted from active connection.\n $options = $this->connection->getConnectionOptions();\n $database = $options['database'];\n $result = $this->connection->query_direct($sql, [':database' => $database])\n ->fetchObject();\n return $result;\n }", "public static function getDatabaseInfo()\n\t{\n\t\treturn self::getConnection()->getDatabaseInfo();\n\t}", "private function getAllFromDatabase()\n {\n if ($this->config()->get('use_database')) {\n return $this->model->all();\n } else {\n return collect([]);\n }\n }", "public function index()\n {\n return view('admin.servers.index');\n }", "function displayMonitoredDatabaseList($infoData, $repository_name)\n{\n $target_db_list = array();\n\n /* Prepare list of repository DB and monitored DB */\n //if (isset($repository_name)) {\n //if (array_key_exists(\"monitor\", $infoData[$repository_name]))\n if (isset($repository_name)) {\n /* if connection could not be established already, do not input target connection list */\n if (count($infoData[$repository_name]) == 0)\n exit(1);\n if (array_key_exists(\"monitor\", $infoData[$repository_name]))\n $target_db_list[$repository_name] = $infoData[$repository_name]['monitor'];\n } else {\n foreach ($infoData as $key => $val) {\n /* if connection could not be established already, do not input target connection list */\n if (count($val) == 0)\n continue;\n if (array_key_exists(\"monitor\", $val))\n $target_db_list[$key] = $val['monitor'];\n }\n }\n\n /* Display title */\n echo str_repeat(\"-\", 40) . \"\\n\";\n echo \"Repository DB and Monitored DB List\\n\";\n echo str_repeat(\"-\", 40) . \"\\n\\n\";\n printf(\"%-20s %6s %-35s\\n\", \"Repository DB\", \"InstID\", \"Host:Port\");\n echo str_repeat(\"-\", 65) . \"\\n\";\n\n /* Display repository DB and monitored DB */\n foreach ($target_db_list as $section => $item) {\n if (count($item) == 0)\n continue;\n foreach ($item as $instid => $monitor_info) {\n printf(\"%-20s %6s %-35s\\n\", $section, $instid, $monitor_info);\n }\n }\n}", "public function GetHostInfo()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->host_info;\r\n }", "public function showTables($database = null){\n\t\treturn $this->instance->listTables($database);\n\t}", "public function gather_db($limit = null) {\n\t\tif ($this->get_db()) {\n\t\t\treturn array('db' => true);\n\t\t}\n\t\treturn array();\n\t}", "public function model()\n {\n return DatabaseHost::class;\n }", "public static function database()\n {\n return [\n 'connection' => 'mysql:host=' . getenv('DB_HOST'),\n 'name' => getenv('DB_NAME'),\n 'username' => getenv('DB_USER'),\n 'password' => getenv('DB_PASS'),\n 'options' => [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_EMULATE_PREPARES => false\n ]\n ];\n }", "public function host() {\n return $this->db['host'];\n }", "public function getDatabaseName()\n {\n return $this->settings['db_database'];\n }", "public function dbname() {\n return $this->db['dbname'];\n }", "function listSources() {\n\t\t$cache = parent::listSources();\n\t\tif ($cache != null) {\n\t\t\treturn $cache;\n\t\t}\n\t\t$result = $this->_execute('SHOW TABLES FROM ' . $this->name($this->config['database']) . ';');\n\n\t\tif (!$result) {\n\t\t\treturn array();\n\t\t} else {\n\t\t\t$tables = array();\n\n\t\t\twhile ($line = mysql_fetch_row($result)) {\n\t\t\t\t$tables[] = $line[0];\n\t\t\t}\n\t\t\tparent::listSources($tables);\n\t\t\treturn $tables;\n\t\t}\n\t}", "public function hosts()\n {\n return $this->morphedByMany('App\\Models\\Event\\Person\\EventHost', 'persona', 'pivot_persona_org', 'organization_id', 'persona_id');\n }", "public function getWithViewDetails(): Collection\n {\n return $this->getBuilder()->withCount('databases')->with('node')->get();\n }", "static function getAllHosts( $domain ) {\n\t\tglobal $wgAuth;\n\n\t\tOpenStackNovaLdapConnection::connect();\n\n\t\t$hosts = array();\n\t\t$result = LdapAuthenticationPlugin::ldap_search( $wgAuth->ldapconn, $domain->domainDN, '(dc=*)' );\n\t\tif ( $result ) {\n\t\t\t$entries = LdapAuthenticationPlugin::ldap_get_entries( $wgAuth->ldapconn, $result );\n\t\t\tif ( $entries ) {\n\t\t\t\t# First entry is always a count\n\t\t\t\tarray_shift( $entries );\n\t\t\t\tforeach ( $entries as $entry ) {\n\t\t\t\t\t$hosts[] = new OpenStackNovaHost( $entry['dc'][0], $domain );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $hosts;\n\t}", "public function listTables() {\r\n\t\tswitch ($this->getDbtype()) {\r\n\t\t\tcase 'mysql':\r\n\t\t\t\t$sql = \"SHOW FULL TABLES WHERE TABLE_TYPE = 'BASE TABLE'\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'pgsql':\r\n\t\t\t\t$sql = \"SELECT CONCAT(table_schema,'.',table_name) AS name FROM information_schema.tables \r\n WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog','information_schema')\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'sqlite':\r\n\t\t\t\t$sql = 'SELECT name FROM sqlite_master WHERE type = \"table\" AND name != \"sqlite_sequence\"';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'mssql':\r\n\t\t\t\t$sql = \"SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'\";\r\n\t\t\tcase 'oracle':\r\n\t\t\t\t$sql = \"SELECT * FROM dba_tables\";\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Exception($this->getDbtype() . ' does not support listing table');\r\n\t\t}\r\n\t\t$result = $this->query($sql);\r\n\t\t$result->setFetchMode(PDO::FETCH_NUM);\r\n\t\t$meta = array();\r\n\t\tforeach ($result as $row) {\r\n\t\t\t$meta[] = $row[0];\r\n\t\t}\r\n\t\treturn $meta;\r\n\t}", "public function getAllDomains();", "public function findAll()\n {\n return DatabaseBackup::where('status', 1)\n ->where('user_id', Auth::user()->id)\n ->orderBy('id','desc')\n ->get();\n }", "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 }", "public function getDbHost(): string\n {\n return (string) Config::get('DB_HOST');\n }", "public function showTables(){\n $resultQuery = $this->executeQuery(\"SHOW TABLES;\");\n echo \"Liste des tables : <br><br>\";\n while( $row = mysqli_fetch_row($resultQuery) ){\n echo \" - \".$row[0].\"<br>\";\n }\n echo \"<br>\";\n }", "public function serverList () {\n $servers = Server::all();\n return view('server/index', ['servers' => $servers]);\n }", "public function showTables()\n {\n switch($this->db_type){\n case 'mssql';\n case 'sqlsrv':\n $sql = 'SELECT * FROM sys.all_objects WHERE type = \\'U\\'';\n break;\n case 'pgsql':\n $sql = 'SELECT tablename FROM pg_tables WHERE tableowner = current_user';\n break;\n case 'sqlite':\n $sql = 'SELECT * FROM sqlite_master WHERE type=\\'table\\'';\n break;\n case 'oci':\n $sql = 'SELECT * FROM system.tab';\n break;\n case 'ibm':\n $schema = '';\n $sql = 'SELECT TABLE_NAME FROM qsys2.systables'.\n (($schema != '') ? ' WHERE TABLE_SCHEMA = \\''.$schema.'\\'' : '');\n break;\n case 'mysql':\n default:\n $sql = 'SHOW TABLES IN `'.$this->db_name.'`';\n break;\n }\n\n try{\n $sth = $this->query($sql);\n $result = $sth->fetchAll();\n }catch(PDOException $e){\n $this->error( $e->getMessage());\n $result = false;\n }\n return $result;\n }", "public static function all() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$liste = db::findAll(db::table($table));\n\t\treturn $liste;\n\t}", "public function schemas()\n\t{\n\t\treturn $this->execute(\"SELECT nspname as schema FROM pg_namespace WHERE nspname NOT LIKE 'pg_%' AND nspname<>'information_schema'\");\n\t}", "public function index()\n {\n return view('admin.connection.index');\n }", "public function actionDbDump()\n {\n $dsn = explode('=', \\Yii::$app->db->dsn);\n return static::runProgram('mysqldump --no-tablespaces', '-u'.\\Yii::$app->db->username . ' -p'.\\Yii::$app->db->password . ' ' . end($dsn) . ' >> dump.sql');\n }", "private function all_sites()\r\n {\r\n return $this->sites_repository()->all_sites();\r\n }", "function DBManager(){\n \t//foreach(func_get_args() as $k=>$n){\n \t//\techo $k.\"-\".$n.\"|\";\n \t//}\n }", "public function db_server_info()\n {\n }" ]
[ "0.7685594", "0.75828546", "0.7358004", "0.7313895", "0.7195896", "0.710725", "0.70850664", "0.7004501", "0.6891299", "0.68847716", "0.6775739", "0.67081565", "0.6656608", "0.65543014", "0.6441981", "0.6360407", "0.63537264", "0.6297594", "0.6277647", "0.62136585", "0.6207826", "0.61575025", "0.6063492", "0.5999007", "0.5998245", "0.59359026", "0.588511", "0.5863703", "0.5809918", "0.5806933", "0.57958966", "0.5755011", "0.56776893", "0.5663788", "0.56155574", "0.5607927", "0.5601552", "0.55350953", "0.55340356", "0.5516375", "0.55080044", "0.5506907", "0.5491108", "0.54720134", "0.54428935", "0.54209274", "0.54172575", "0.5405291", "0.53956956", "0.5368561", "0.5354417", "0.5349386", "0.53362346", "0.5323277", "0.5321087", "0.5266256", "0.5246406", "0.52279633", "0.5216435", "0.5205036", "0.52025056", "0.5190912", "0.5184448", "0.51798254", "0.51742536", "0.51702124", "0.51561046", "0.5148906", "0.51354194", "0.5134554", "0.51331276", "0.5129899", "0.51266843", "0.5126422", "0.5125524", "0.5118312", "0.51141286", "0.5111024", "0.5109324", "0.51039165", "0.51013035", "0.5095773", "0.5088469", "0.508634", "0.508009", "0.50748587", "0.50685316", "0.5062602", "0.5060474", "0.50512075", "0.50456697", "0.50418055", "0.5038854", "0.5034304", "0.5029613", "0.50247586", "0.5024758", "0.50238526", "0.50165343", "0.50164616" ]
0.6868598
10
Show all databases in hosts
public function getTables(){ $pdo = $this->pdo; $statement = $pdo->prepare("SHOW TABLES FROM $this->name;"); $statement->execute(); $tables = $statement->fetchAll($pdo::FETCH_NUM); foreach($tables as &$table) $table = $table[0]; return $tables; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showDatabases(){\n\t\treturn $this->instance->listDatabases();\n\t}", "function database_list(){\n\t\treturn($this->q2obj(\"show databases\"));\n\t}", "private function showDatabases()\n {\n $dbs = $this->mongoClient->listDatabases();\n foreach ($dbs as $db) {\n $padding = $this->cli->padding(20)->char('.');\n $padding->label($db->getName())->result($this->formatBytes($db->getSizeOnDisk()));\n }\n }", "public function listDatabases(){\n\t\treturn $this->instance->listDatabases();\n\t}", "public function showAllDatabase(){\n $stmt = $this->pdo->query('SHOW DATABASES');\n\n //Fetch the columns from the returned PDOStatement\n $databases = $stmt->fetchAll(PDO::FETCH_COLUMN);\n //var_dump($databases);\n //Loop through the database list and print it out.\n foreach($databases as $database){\n //$database will contain the database name\n //in a string format\n echo $database, '<br>';\n }\n return 1;\n }", "public function showdbs()\n {\n $this->_validate(array());\n $this->_QUERYCOUNT++;\n\n return $this->_query->showdatabases();\n }", "public function admin_get_dbs() {}", "public function list_databases() {\n $sql = \"SHOW DATABASES\";\n try {\n if ($this->conn == null) {\n echo \"conn is null<br>\";\n }\n $result = $this->conn->query($sql);\n $dbs = array();\n foreach($result as $row) {\n if ($row['Database'] != 'mysql' &&\n $row['Database'] != 'information_schema' &&\n $row['Database'] != 'performance_schema' &&\n $row['Database'] != 'sys') {\n array_push($dbs, $row['Database']);\n }\n }\n return $dbs;\n } catch (PDOException $e) {\n die(\"DB ERROR: \".$e->getMessage());\n }\n }", "public function get_databases() {\r\n\t\t$dbs = $this->query_select ( \"SHOW DATABASES;\" );\r\n\t\tif (! function_exists ( '__tmp_huy_db_databases' )) {\r\n\t\t\tfunction __tmp_huy_db_databases($val) {\r\n\t\t\t\treturn $val ['Database'];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array_map ( '__tmp_huy_db_databases', $dbs );\r\n\t}", "function databases(){\n $this->execute(\"SELECT datname FROM pg_database WHERE datistemplate = false;\");\n $aDatabases = array();\n while ($aReg = $this->fetchRow()){\n $aDatabases[] = $aReg[0];\n }\n return $aDatabases;\n }", "public function getDatabases(){\n $pdo = $this->pdo;\n $databases = $pdo->prepare(\"SHOW DATABASES;\");\n $databases->execute();\n $databases = $databases->fetchAll($pdo::FETCH_NUM);\n foreach($databases as &$database)\n $database = $database[0];\n return $databases;\n }", "public function index()\n {\n return view('services.databases', ['databases' => databases::all()]);\n\n }", "public function get_dbs()\n\t{\n\t\treturn $this->driver_query('db_list');\n\t}", "public function databases()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/databases');\n }", "public function get_databases()\n\t{\n\t\treturn $this->databases;\n\t}", "public function getDatabases() {\n\t\treturn $this->databases;\n\t}", "function getDBs($host,$user,$pw,$pattern)\n{\n $returnArray=array();\n \n $pdo = new PDO( \"mysql:host=\".$host.\";\", $user,$pw);\t\n \n //select all databases like pattern sent in.\n $sql=\"SELECT SCHEMA_NAME as dbName FROM INFORMATION_SCHEMA.SCHEMATA where SCHEMA_NAME like '\".$pattern.\"'\";\n $resultArray=$pdo->query($sql);\n \n if ($resultArray !== false) {\n print_r($resultArray);\n if (count($resultArray)) {\n foreach ($resultArray as $row) {\n $returnArray[]=$row['dbName']; \n }\n }\n } \t\n \n //close connection.\n $pdo=null;\n \n \treturn $returnArray;\n}", "public static function all()\n {\n if( $call = Master::$cMaster->APICall('0.9.1/db') )\n {\n $result = array();\n foreach( json_decode( $call, true ) as $db ){ array_push( $result, Database::DBWithIDName( $db['ID'], $db['name'] ) ); }\n return $result;\n }\n else{ commandResult( 500, \"Could not lookup databases\" ); }\n }", "public function testListDatabases()\r\n {\r\n $this->_sm->listDatabases();\r\n }", "public function getAdministrativeDatabasesList() {\n return $this->_get(9);\n }", "function getDatabases($currentdatabase = NULL) {\n\t\tglobal $conf, $misc;\n\n\t\t$server_info = $misc->getServerInfo();\n\n\t\tif (isset($conf['owned_only']) && $conf['owned_only'] && !$this->isSuperUser()) {\n\t\t\t$username = $server_info['username'];\n\t\t\t$this->clean($username);\n\t\t\t$clause = \" AND pu.usename='{$username}'\";\n\t\t}\n\t\telse $clause = '';\n\n\t\tif ($currentdatabase != NULL) {\n\t\t\t$this->clean($currentdatabase);\n\t\t\t$orderby = \"ORDER BY pdb.datname = '{$currentdatabase}' DESC, pdb.datname\";\n\t\t}\n\t\telse\n\t\t\t$orderby = \"ORDER BY pdb.datname\";\n\n\t\tif (!$conf['show_system'])\n\t\t\t$where = ' AND NOT pdb.datistemplate';\n\t\telse\n\t\t\t$where = ' AND pdb.datallowconn';\n\n\t\t$sql = \"SELECT pdb.datname AS datname, pu.usename AS datowner, pg_encoding_to_char(encoding) AS datencoding,\n (SELECT description FROM pg_description pd WHERE pdb.oid=pd.objoid) AS datcomment\n FROM pg_database pdb, pg_user pu\n\t\t\tWHERE pdb.datdba = pu.usesysid\n\t\t\t{$where}\n\t\t\t{$clause}\n\t\t\t{$orderby}\";\n\n\t\treturn $this->selectSet($sql);\n\t}", "public function listPersistedDatabases(): array\n {\n return $this->dataReader->listPersistedDatabases();\n }", "public function list_dbs(){\n \t$db=array();\n \t$d=dir($this->_db_root_dir);\n \twhile ($tmp=$d->read()){\n if(is_dir($this->_db_root_dir.$tmp) && substr($tmp,0,1)!='.' )\n $db[]=$tmp;\n \t}\t\n \treturn $db;\n }", "function virtual_hosting_db_gethostnames($vroot = NULL)\n{\n $PHORUM = $GLOBALS[\"PHORUM\"];\n\n $sql = \"\n SELECT hostname,vroot\n FROM {$PHORUM[\"virtual_hosts_table\"]}\n \";\n if ($vroot !== NULL) {\n settype($vroot, \"int\");\n $sql .= \" WHERE vroot = $vroot\";\n }\n\n $return = phorum_db_interact(DB_RETURN_ROWS, $sql, 0);\n foreach ($return as $id => $row) $return[$id] = $row[1];\n\n return $return;\n}", "public function get_database_names() {\n return UPS_SUCCESS;\n }", "public function listDatabases(): array\n {\n if ($this->allDatabaseIdentifiers === null) {\n $this->allDatabaseIdentifiers = array_combine(\n $this->listPersistedDatabases(),\n $this->listPersistedDatabases()\n );\n }\n\n return array_values($this->allDatabaseIdentifiers);\n }", "public function getRemoteDatabases(RemoteInterface $remote);", "public function getListDb()\n {\n return $this->internalCall('db', 'list', []);\n }", "public function getDatabases($filterMysqlDb = true)\n {\n $query = $this->query('show databases');\n $dbs = $query->fetchAll(\\PDO::FETCH_COLUMN);\n\n\n if (true === $filterMysqlDb) {\n $filter = function ($v) {\n if (\n 'mysql' === $v ||\n 'sys' === $v ||\n 'performance_schema' === $v ||\n 'information_schema' === $v\n ) {\n return false;\n }\n return true;\n };\n $dbs = array_merge(array_filter($dbs, $filter)); // array_merge to restore indexes...\n }\n return $dbs;\n }", "private function showCollections()\n {\n $currentDB = $this->currentDB;\n if (!empty($currentDB)) {\n $collections = $this->mongoClient->selectDatabase($currentDB)->listCollections();\n foreach ($collections as $collection) {\n $this->cli->shout(' ' . $collection->getName());\n }\n } else {\n $this->cli->error('Please select db');\n }\n }", "public function testGetAllDbs()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n // First, create a DB\n Sopha_Db::createDb($dbname, $host, $port);\n \n // Make sure DB exists by looking for it in the list of all DBs\n $dbs = Sopha_Db::getAllDbs($host, $port);\n $this->assertType('array', $dbs);\n $this->assertTrue(in_array($dbname, $dbs));\n \n // Delete the DB and make sure it is no longer in the list\n Sopha_Db::deleteDb($dbname, $host, $port);\n $dbs = Sopha_Db::getAllDbs($host, $port);\n $this->assertType('array', $dbs);\n $this->assertFalse(in_array($dbname, $dbs));\n }", "function show_db_fields($db_name) {\n $query = db_select($db_name, 'db')\n ->fields('db')\n ->range(0,1);\n $results = $query->execute()->fetchAll();\n return $results;\n}", "public static function db_names() {\n return null;\n }", "function MetaDatabases() {}", "public function getDatabaseInfo();", "public function databases(string $serverId)\r\n {\r\n $data = $this->getAllData(\"servers/$serverId/databases\");\r\n return $this->transformCollection($data, Database::class);\r\n }", "function certificateapi_get_hosts() {\n global $CFG, $DB;\n return $DB->get_records_sql('SELECT\n h.id,\n h.ip_address,\n h.wwwroot,\n h.fullname,\n h.last_connect_time,\n h.clientid,\n h.public_key,\n h.public_key_validfrom,\n h.public_key_expires,\n h.permissions\n FROM\n {certificateapi_host} AS h' );\n}", "public function getAllDbHouses ()\n {\n $this->db->select( '*' );\n $this->db->from( 'tbld_distribution_house' );\n $query = $this->db->get()->result_array();\n return $query;\n }", "public function Clients()\n\t{\n\t\t//\n\t\t// Connect object.\n\t\t//\n\t\tif( ! $this->isConnected() )\n\t\t\t$this->Connect();\n\n\t\t//\n\t\t// Init local storage.\n\t\t//\n\t\t$databases = [];\n\n\t\t//\n\t\t// Ask client for list.\n\t\t//\n\t\t$list = $this->Connection()->listDatabases();\n\t\tforeach( $list as $element )\n\t\t\t$databases[ $element->getName() ] = $element;\n\n\t\treturn $databases;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\n\t}", "public function listInMemoryDatabases(): array\n {\n return array_diff($this->listDatabases(), $this->listPersistedDatabases());\n }", "function listCatalogs($args) {\n\n $conn = mysql_pconnect($args['server'], $args['username'], $args['password']);\n if($conn === false) {\n throw 'Connection failed.';\n }\n\n $results = mysql_list_dbs($conn);\n $catalogs = array();\n while( $row = mysql_fetch_assoc($results) ) {\n $catalogs[] = $row;\n }\n\n return array( 'catalogs' => $catalogs );\n }", "public function show(databases $databases)\n {\n $databases = databases::find($id);\n return view('services.databases', ['databases' => $databases]);\n }", "public function index()\n {\n return new HostCollection(Host::paginate(10));\n }", "public function actionDb()\n {\n preg_match('/host\\=([^;]+);dbname=(.*)$/', \\Yii::$app->db->dsn, $m);\n return static::runProgram('mysql', '-u'.\\Yii::$app->db->username . ' -p'.\\Yii::$app->db->password . ' -h'.$m[1] .' ' . $m[2]);\n }", "public static function db_names() {\n return array(\n array('id', 'book_chapters', 'timecreated', 'timemodified', 'standard'),\n );\n }", "public static function getSupportedDatabases()\n {\n return [\n 'mysql' => [\n 'id' => 'mysql',\n 'name' => 'MySQL/Percona'\n ],\n ];\n }", "public function getDbHost () {\n return $this->dbHost; \n }", "public function index()\n {\n $page_name = \"Database\";\n $breadcrumbs = \"Settings > Database\";\n\n return view('pages.settings.database', compact('page_name', 'breadcrumbs'));\n }", "public function getDatabaseHost()\n {\n return $this->settings['db_host'];\n }", "function get_dbname() { return reset(explode('.', $_SERVER['SERVER_NAME'])); }", "function dumpDB($database = HAR_ALL_DB, $tables = HAR_ALL_TABLES,$options = HAR_ALL_OPTIONS) \n {\n $this->_connect();\n \n if(empty($database))\n {\n $this->error = \"Specify the database.\";\n return false;\n }\n \n if(empty($tables))\n {\n $this->error = \"Specify the tables.\";\n return false;\n }\n \n if($database == HAR_ALL_DB)\n {\n $sql = \"SHOW DATABASES\";\n $this->result = @mysql_query($sql);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n \n while($row = mysql_fetch_array($this->result,MYSQL_NUM))\n {\n $this->database[]=$row[0];\n }\n }\n else if(is_string($database))\n {\n $this->database = @explode(\",\",$database);\n }\n \n $lineEnd = $this->lineEnd[$this->OS_local];\n $returnSql = \"# MySql Dump\".$lineEnd ;\n $returnSql .= \"# Host:\".$this->dbhost.$lineEnd;\n $returnSql .= \"# -------------------------------------------------\".$lineEnd;\n\n $sql = \"SELECT VERSION()\";\n $this->result = mysql_query($sql);\n $row = mysql_fetch_array($this->result,MYSQL_NUM);\n $returnSql .= \"# Server version \".$row[0].$lineEnd.$lineEnd;\n \n \n \n for($i=0; $i < count($this->database) ; $i++)\n {\n if(count($this->database)>1)\n $returnSql.= \"USE \".$this->database[$i].\";\".$lineEnd.$lineEnd;\n \n $this->result = @mysql_query(\"USE \".$this->database[$i]);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n \n $this->tables=array();\n if($tables == HAR_ALL_TABLES)\n {\n $sql = \"SHOW Tables\";\n $this->result = @mysql_query($sql);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n\n while($row = mysql_fetch_array($this->result,MYSQL_NUM))\n {\n $this->tables[]=$row[0];\n }\n }\n else if(is_string($tables))\n {\n $this->tables = @explode(\",\",$tables);\n }\n for($j=0 ; $j < count($this->tables) ; $j++)\n {\n if(($options & HAR_NO_STRUCT ) != HAR_NO_STRUCT)\n {\n $sql = \"SHOW CREATE TABLE \".$this->tables[$j];\n $this->result = @mysql_query($sql);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n $row = mysql_fetch_array($this->result,MYSQL_NUM);\n \n \n $returnSql .= \" #\".$lineEnd;\n $returnSql .= \" # Table structure for table '\".$this->tables[$j].\"'\".$lineEnd;\n $returnSql .= \" #\".$lineEnd.$lineEnd;\n \n if(($options & HAR_DROP_TABLE) == HAR_DROP_TABLE)\n $returnSql .= \"DROP TABLE IF EXISTS \".$this->tables[$j].\";\".$lineEnd;\n $returnSql .= $row[1].\";\".$lineEnd.$lineEnd.$lineEnd;\n }\n \n if(($options & HAR_NO_DATA ) != HAR_NO_DATA )\n {\n $returnSql .= \" #\".$lineEnd;\n $returnSql .= \" # Dumping data for table '\".$this->tables[$j].\"'\".$lineEnd;\n $returnSql .= \" #\".$lineEnd.$lineEnd;\n \n if(($options & HAR_LOCK_TABLE ) == HAR_LOCK_TABLE )\n $returnSql .= \"LOCK TABLES \".$this->tables[$j].\" WRITE;\".$lineEnd;\n\n $temp_sql = \"INSERT INTO \".$this->tables[$j];\n if(($options & HAR_FULL_SYNTAX == HAR_FULL_SYNTAX))\n {\n $sql=\"SHOW COLUMNS FROM \".$this->tables[$j];\n $this->result = @mysql_query($sql);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n $fields = array();\n while($row = mysql_fetch_array($this->result,MYSQL_NUM))\n {\n $fields[]=$row[0];\n }\n $temp_sql.=' ('.@implode(',',$fields).')';\n }\n\n $sql=\"SELECT * FROM \".$this->tables[$j];\n $this->result = @mysql_query($sql);\n if(mysql_error()!==\"\")\n {\n $this->error=\"Error : \".mysql_error();\n return false;\n }\n while($row = mysql_fetch_array($this->result,MYSQL_NUM))\n {\n foreach($row as $key => $value)\n $row[$key] = mysql_escape_string($value);\n \n $returnSql .=$temp_sql.' VALUES (\"'.@implode('\",\"',$row).'\");'.$lineEnd;\n }\n if(($options & HAR_LOCK_TABLE ) == HAR_LOCK_TABLE )\n $returnSql .= \"UNLOCK TABLES;\".$lineEnd;\n\n }\n $returnSql .=$lineEnd.$lineEnd;\n }\n }\n return $returnSql;\n }", "public function hasAdministrativeDatabases() {\n return $this->_has(9);\n }", "function listAllHosts() {\n $execute = LIST_COMMAND;\n exec($execute, $output, $retVal);\n return $output;\n}", "function getAllSites(){\n\n if ($this->connection) {\n $rows = $this->connection->query(\"SELECT * FROM `sites`\");\n\n $this->checkError();\n\n $result = $rows->fetchAll();\n\n return $result;\n }\n }", "public function getConnectionNames();", "public function getDatabase(){\n $url = $this->urlWrapper() . URLResources::DATABASE;\n return $this->makeRequest($url, \"GET\", 2);\n }", "public function getDBHost(){\n\n\t\treturn $this->_host;\n\t}", "public function getDbHost()\n\t{\n\t\treturn $this->db_host;\n\t}", "public static function getServersList()\n {\n return CHtml::listData(self::model()->findAll(), 'host', 'host');\n }", "function listSources() {\n\t\t$db = $this->config['database'];\n\t\t$this->config['database'] = basename($this->config['database']);\n\n\t\t$cache = parent::listSources();\n\t\tif ($cache != null) {\n\t\t\treturn $cache;\n\t\t}\n\n\t\t$result = $this->fetchAll(\"SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;\");\n\n\t\tif (!$result || empty($result)) {\n\t\t\treturn array();\n\t\t} else {\n\t\t\t$tables = array();\n\t\t\tforeach ($result as $table) {\n\t\t\t\t$tables[] = $table[0]['name'];\n\t\t\t}\n\t\t\tparent::listSources($tables);\n\n\t\t\t$this->config['database'] = $db;\n\t\t\treturn $tables;\n\t\t}\n\t\t$this->config['database'] = $db;\n\t\treturn array();\n\t}", "public function index()\n {\n return view('servers.list',[\n 'servers' => $this->repository->getServersForAuth()\n ]);\n }", "public function viewAllBlogs(){\n $data = Blog::get();\n return view('allblog', compact('data'));\n }", "public function getDBConnections(): array {\n return $this->configVars['database-connections'];\n }", "public function connections()\n {\n $this->_display('connections');\n }", "public function qsGetDbTables()\n {\n $sql = 'show tables';\n $d = $this->qExecPluck($sql);\n\n return $d;\n }", "public function selectDb($dbName) {}", "function connectToHostDb()\n {\n $this->setDb('host');\n $this->connect();\n if ($this->dbconnect)\n {\n return;\n }\n $this->setDb('postgres');\n $this->connect();\n if (!$this->dbconnect)\n {\n echo \"Error connecting to host postgres database.\\n\";\n echo \"Tried names 'host' and 'postgres'\\n\";\n }\n }", "public function database($store)\n\t{\n\t\t$result = $this->Model->all($store);\n\t\tprint_r($result);\n\t}", "public function getSitesList()\n {\n return Db::fetchAll(\"SELECT idsite, name\"\n . \"\\n FROM \" . Common::prefixTable('site')\n . \"\\n ORDER BY idsite\");\n }", "public function getDatabaseInfo() {\n static $result;\n if (isset($result)) {\n return $result;\n }\n $sql = <<< EOF\n select name\n , db.snapshot_isolation_state\n , db.snapshot_isolation_state_desc\n , db.is_read_committed_snapshot_on\n , db.recovery_model\n , db.recovery_model_desc\n , db.collation_name\n from sys.databases db\n WHERE DB_NAME(db.database_id) = :database\nEOF;\n // Database is defaulted from active connection.\n $options = $this->connection->getConnectionOptions();\n $database = $options['database'];\n $result = $this->connection->query_direct($sql, [':database' => $database])\n ->fetchObject();\n return $result;\n }", "public static function getDatabaseInfo()\n\t{\n\t\treturn self::getConnection()->getDatabaseInfo();\n\t}", "private function getAllFromDatabase()\n {\n if ($this->config()->get('use_database')) {\n return $this->model->all();\n } else {\n return collect([]);\n }\n }", "public function index()\n {\n return view('admin.servers.index');\n }", "function displayMonitoredDatabaseList($infoData, $repository_name)\n{\n $target_db_list = array();\n\n /* Prepare list of repository DB and monitored DB */\n //if (isset($repository_name)) {\n //if (array_key_exists(\"monitor\", $infoData[$repository_name]))\n if (isset($repository_name)) {\n /* if connection could not be established already, do not input target connection list */\n if (count($infoData[$repository_name]) == 0)\n exit(1);\n if (array_key_exists(\"monitor\", $infoData[$repository_name]))\n $target_db_list[$repository_name] = $infoData[$repository_name]['monitor'];\n } else {\n foreach ($infoData as $key => $val) {\n /* if connection could not be established already, do not input target connection list */\n if (count($val) == 0)\n continue;\n if (array_key_exists(\"monitor\", $val))\n $target_db_list[$key] = $val['monitor'];\n }\n }\n\n /* Display title */\n echo str_repeat(\"-\", 40) . \"\\n\";\n echo \"Repository DB and Monitored DB List\\n\";\n echo str_repeat(\"-\", 40) . \"\\n\\n\";\n printf(\"%-20s %6s %-35s\\n\", \"Repository DB\", \"InstID\", \"Host:Port\");\n echo str_repeat(\"-\", 65) . \"\\n\";\n\n /* Display repository DB and monitored DB */\n foreach ($target_db_list as $section => $item) {\n if (count($item) == 0)\n continue;\n foreach ($item as $instid => $monitor_info) {\n printf(\"%-20s %6s %-35s\\n\", $section, $instid, $monitor_info);\n }\n }\n}", "public function GetHostInfo()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->host_info;\r\n }", "public function showTables($database = null){\n\t\treturn $this->instance->listTables($database);\n\t}", "public function gather_db($limit = null) {\n\t\tif ($this->get_db()) {\n\t\t\treturn array('db' => true);\n\t\t}\n\t\treturn array();\n\t}", "public function model()\n {\n return DatabaseHost::class;\n }", "public static function database()\n {\n return [\n 'connection' => 'mysql:host=' . getenv('DB_HOST'),\n 'name' => getenv('DB_NAME'),\n 'username' => getenv('DB_USER'),\n 'password' => getenv('DB_PASS'),\n 'options' => [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_EMULATE_PREPARES => false\n ]\n ];\n }", "public function host() {\n return $this->db['host'];\n }", "public function getDatabaseName()\n {\n return $this->settings['db_database'];\n }", "public function dbname() {\n return $this->db['dbname'];\n }", "function listSources() {\n\t\t$cache = parent::listSources();\n\t\tif ($cache != null) {\n\t\t\treturn $cache;\n\t\t}\n\t\t$result = $this->_execute('SHOW TABLES FROM ' . $this->name($this->config['database']) . ';');\n\n\t\tif (!$result) {\n\t\t\treturn array();\n\t\t} else {\n\t\t\t$tables = array();\n\n\t\t\twhile ($line = mysql_fetch_row($result)) {\n\t\t\t\t$tables[] = $line[0];\n\t\t\t}\n\t\t\tparent::listSources($tables);\n\t\t\treturn $tables;\n\t\t}\n\t}", "public function hosts()\n {\n return $this->morphedByMany('App\\Models\\Event\\Person\\EventHost', 'persona', 'pivot_persona_org', 'organization_id', 'persona_id');\n }", "public function getWithViewDetails(): Collection\n {\n return $this->getBuilder()->withCount('databases')->with('node')->get();\n }", "static function getAllHosts( $domain ) {\n\t\tglobal $wgAuth;\n\n\t\tOpenStackNovaLdapConnection::connect();\n\n\t\t$hosts = array();\n\t\t$result = LdapAuthenticationPlugin::ldap_search( $wgAuth->ldapconn, $domain->domainDN, '(dc=*)' );\n\t\tif ( $result ) {\n\t\t\t$entries = LdapAuthenticationPlugin::ldap_get_entries( $wgAuth->ldapconn, $result );\n\t\t\tif ( $entries ) {\n\t\t\t\t# First entry is always a count\n\t\t\t\tarray_shift( $entries );\n\t\t\t\tforeach ( $entries as $entry ) {\n\t\t\t\t\t$hosts[] = new OpenStackNovaHost( $entry['dc'][0], $domain );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $hosts;\n\t}", "public function listTables() {\r\n\t\tswitch ($this->getDbtype()) {\r\n\t\t\tcase 'mysql':\r\n\t\t\t\t$sql = \"SHOW FULL TABLES WHERE TABLE_TYPE = 'BASE TABLE'\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'pgsql':\r\n\t\t\t\t$sql = \"SELECT CONCAT(table_schema,'.',table_name) AS name FROM information_schema.tables \r\n WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog','information_schema')\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'sqlite':\r\n\t\t\t\t$sql = 'SELECT name FROM sqlite_master WHERE type = \"table\" AND name != \"sqlite_sequence\"';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'mssql':\r\n\t\t\t\t$sql = \"SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'\";\r\n\t\t\tcase 'oracle':\r\n\t\t\t\t$sql = \"SELECT * FROM dba_tables\";\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Exception($this->getDbtype() . ' does not support listing table');\r\n\t\t}\r\n\t\t$result = $this->query($sql);\r\n\t\t$result->setFetchMode(PDO::FETCH_NUM);\r\n\t\t$meta = array();\r\n\t\tforeach ($result as $row) {\r\n\t\t\t$meta[] = $row[0];\r\n\t\t}\r\n\t\treturn $meta;\r\n\t}", "public function getAllDomains();", "public function findAll()\n {\n return DatabaseBackup::where('status', 1)\n ->where('user_id', Auth::user()->id)\n ->orderBy('id','desc')\n ->get();\n }", "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 }", "public function getDbHost(): string\n {\n return (string) Config::get('DB_HOST');\n }", "public function showTables(){\n $resultQuery = $this->executeQuery(\"SHOW TABLES;\");\n echo \"Liste des tables : <br><br>\";\n while( $row = mysqli_fetch_row($resultQuery) ){\n echo \" - \".$row[0].\"<br>\";\n }\n echo \"<br>\";\n }", "public function serverList () {\n $servers = Server::all();\n return view('server/index', ['servers' => $servers]);\n }", "public function showTables()\n {\n switch($this->db_type){\n case 'mssql';\n case 'sqlsrv':\n $sql = 'SELECT * FROM sys.all_objects WHERE type = \\'U\\'';\n break;\n case 'pgsql':\n $sql = 'SELECT tablename FROM pg_tables WHERE tableowner = current_user';\n break;\n case 'sqlite':\n $sql = 'SELECT * FROM sqlite_master WHERE type=\\'table\\'';\n break;\n case 'oci':\n $sql = 'SELECT * FROM system.tab';\n break;\n case 'ibm':\n $schema = '';\n $sql = 'SELECT TABLE_NAME FROM qsys2.systables'.\n (($schema != '') ? ' WHERE TABLE_SCHEMA = \\''.$schema.'\\'' : '');\n break;\n case 'mysql':\n default:\n $sql = 'SHOW TABLES IN `'.$this->db_name.'`';\n break;\n }\n\n try{\n $sth = $this->query($sql);\n $result = $sth->fetchAll();\n }catch(PDOException $e){\n $this->error( $e->getMessage());\n $result = false;\n }\n return $result;\n }", "public static function all() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$liste = db::findAll(db::table($table));\n\t\treturn $liste;\n\t}", "public function schemas()\n\t{\n\t\treturn $this->execute(\"SELECT nspname as schema FROM pg_namespace WHERE nspname NOT LIKE 'pg_%' AND nspname<>'information_schema'\");\n\t}", "public function index()\n {\n return view('admin.connection.index');\n }", "public function actionDbDump()\n {\n $dsn = explode('=', \\Yii::$app->db->dsn);\n return static::runProgram('mysqldump --no-tablespaces', '-u'.\\Yii::$app->db->username . ' -p'.\\Yii::$app->db->password . ' ' . end($dsn) . ' >> dump.sql');\n }", "private function all_sites()\r\n {\r\n return $this->sites_repository()->all_sites();\r\n }", "function DBManager(){\n \t//foreach(func_get_args() as $k=>$n){\n \t//\techo $k.\"-\".$n.\"|\";\n \t//}\n }", "public function db_server_info()\n {\n }" ]
[ "0.7685594", "0.75828546", "0.7358004", "0.7313895", "0.7195896", "0.710725", "0.70850664", "0.7004501", "0.6891299", "0.68847716", "0.6868598", "0.6775739", "0.67081565", "0.6656608", "0.65543014", "0.6441981", "0.6360407", "0.63537264", "0.6297594", "0.6277647", "0.62136585", "0.6207826", "0.61575025", "0.6063492", "0.5999007", "0.5998245", "0.59359026", "0.588511", "0.5863703", "0.5809918", "0.5806933", "0.57958966", "0.5755011", "0.56776893", "0.5663788", "0.56155574", "0.5607927", "0.5601552", "0.55350953", "0.55340356", "0.5516375", "0.55080044", "0.5506907", "0.5491108", "0.54720134", "0.54428935", "0.54209274", "0.54172575", "0.5405291", "0.53956956", "0.5368561", "0.5354417", "0.5349386", "0.53362346", "0.5323277", "0.5321087", "0.5266256", "0.5246406", "0.52279633", "0.5216435", "0.5205036", "0.52025056", "0.5190912", "0.5184448", "0.51798254", "0.51742536", "0.51702124", "0.51561046", "0.5148906", "0.51354194", "0.5134554", "0.51331276", "0.5129899", "0.51266843", "0.5126422", "0.5125524", "0.5118312", "0.51141286", "0.5111024", "0.5109324", "0.51039165", "0.51013035", "0.5095773", "0.5088469", "0.508634", "0.508009", "0.50748587", "0.50685316", "0.5062602", "0.5060474", "0.50512075", "0.50456697", "0.50418055", "0.5038854", "0.5034304", "0.5029613", "0.50247586", "0.5024758", "0.50238526", "0.50165343", "0.50164616" ]
0.0
-1
Set database table prefix
public function setPrefixFromDB(){ foreach($this->getTables() as $table){ $prefix = explode('_', $table); if(isset($prefix[1])){ if($this->prefix==$prefix[0]) break; else $this->prefix = $prefix[0]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setTablePrefix()\n {\n }", "static function set_table_prefix($tp) {\n\t\tself::$table_prefix = $tp;\n\t}", "public static function getTablePrefix()\n {\n }", "public static function getTablePrefix()\n {\n return 'prefix_';\n }", "public function getTablePrefix();", "public function table_prefix(){\n return $this->db->dbprefix;\n }", "public static function setTablePrefix($prefix)\n {\n }", "public function db_changeTablePrefix( $table_prefix )\n\t{\n\t\tif ($table_prefix !== '?') {\n\t\t\t$this->table_prefix = $table_prefix;\n\t\t}\n\t}", "public function table_prefix()\n\t{\n\t\treturn $this->_config['table_prefix'];\n\t}", "protected function updateBaseTablePrefix()\n {\n //Do nothing since this is the single-site class\n }", "public function getTablePrefix(): string\n {\n return $this->tablePrefix;\n }", "function ajan_core_get_table_prefix() {\n\tglobal $wpdb;\n\n\treturn apply_filters( 'ajan_core_get_table_prefix', $wpdb->base_prefix );\n}", "public function prefix_table($table)\n\t{\n\t\t// Add the prefix to the table name\n\t\t// before quoting it\n\t\tif ( ! empty($this->table_prefix))\n\t\t{\n\t\t\t// Split indentifier by period, will split into:\n\t\t\t// database.schema.table OR\n\t\t\t// schema.table OR\n\t\t\t// database.table OR\n\t\t\t// table\n\t\t\t$idents = explode('.', $table);\n\t\t\t$segments = count($idents);\n\n\t\t\t// Quote the last item, and add the database prefix\n\t\t\t$idents[$segments - 1] = $this->_prefix(end($idents));\n\n\t\t\t// Rejoin\n\t\t\t$table = implode('.', $idents);\n\t\t}\n\n\t\treturn $table;\n\t}", "public function getTablePrefix()\n {\n return $this->tablePrefix;\n }", "public function db_prefix($tablename = '')\n {\n $ret = $this->_db->prefix($tablename);\n return $ret;\n }", "public function table_prefix($prefix) {\r\n\t\t$this->_prefix = $prefix;\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function tablePrefix( $prefix = null ) {\n\t\treturn wfSetVar( $this->mTablePrefix, $prefix );\n\t}", "function setUserTablePrefix($prefix=\"shared\") {\n\t\t$this->_db_user = $prefix . \"_sessions\"; \n\t}", "public function prefix() {\n return $this->db['prefix'];\n }", "public function set_dbprefix($prefix = '')\n\t{\n\t\treturn $this->dbprefix = $prefix;\n\t}", "function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }", "public function __construct($tblPrefix = \"\");", "public function dbprefix($table = '')\n\t{\n\t\tif ($table === '')\n\t\t{\n\t\t\t$this->display_error('db_table_name_required');\n\t\t}\n\n\t\treturn $this->dbprefix.$table;\n\t}", "public function getDbTableName(string $drupal_prefix, string $drupal_table_name): string;", "public function setColumnPrefix($solumnPrefix);", "public function init()\n\t{\n\t\tif (isset($_SERVER['DB_TABLE_PREFIX'])) {\n\t\t\t$this->setPrefix($_SERVER['DB_TABLE_PREFIX']);\n\t\t}\n\t}", "protected function setTable()\n {\n $class = explode('\\\\', get_called_class());\n $this->table = lcfirst(end($class)).'s';\n }", "function get_table_name()\n {\n global $table_prefix;\n return $table_prefix . 'posts';\n }", "public function getPrefix(): string\n {\n return config('linky.db.prefix');\n }", "protected function setTable() : void {\n\t\t$annotation = $this->annotationReader->getClassAnnotation($this->reflectionClass, 'Henri\\Framework\\Annotations\\Annotation\\DB');\n\t\tif ($annotation && isset($annotation->table)) {\n\t\t\t$this->tableName = $annotation->table;\n\t\t\t$this->tableNamePrefixed = $this->database->getPrefix() . $this->tableName;\n\t\t}\n\t}", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}", "function get_table_name () {\r\n\t\treturn $this->wpdb->prefix . $this->_table_name;\r\n\t}", "public function tablePrefix() {\n\t\t$prefix = $this->in('What table prefix would you like to use?');\n\n\t\tif (!$prefix) {\n\t\t\t$this->out('Please provide a table prefix, I recommend \"forum\".');\n\n\t\t\treturn $this->tablePrefix();\n\n\t\t} else {\n\t\t\t$prefix = trim($prefix, '_') . '_';\n\t\t\t$this->out(sprintf('You have chosen the prefix: %s', $prefix));\n\t\t}\n\n\t\t$answer = strtoupper($this->in('Is this correct?', array('Y', 'N')));\n\n\t\tif ($answer === 'Y') {\n\t\t\t$this->install['prefix'] = $prefix;\n\t\t} else {\n\t\t\treturn $this->tablePrefix();\n\t\t}\n\n\t\treturn true;\n\t}", "private function getDbPrefix()\n\t{\n\t\treturn ($this->userdata['db_prefix'] == '') ? 'exp_' : preg_replace(\"#([^_])/*$#\", \"\\\\1_\", $this->userdata['db_prefix']);\n\t}", "public function baseTableIdColumn($prefix = '');", "abstract public function setTableName();", "public function setPrefix() {\n\t}", "public function setTablePrefix(string $prefix)\n {\n $this->tablePrefix = $prefix;\n\n return $this;\n }", "public function setPrefix( $prefix );", "public function getTablePrefixName(string $table): string\n {\n $prefix = $this->grammar->getTablePrefix();\n return $prefix . $table;\n }", "public function get_drivered_table_prefix()\n {\n global $SITE_INFO;\n return $SITE_INFO['mybb_table_prefix'];\n }", "static public function wpdb_prefix(){\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix;\n\t}", "public function getTablePrefix($table)\r\n {\r\n return isset($this->tablePrefixes[$table]) ? $this->tablePrefixes[$table] : $this->tablePrefix;\r\n }", "public function getDrupalTableName(string $drupal_default_prefix, string $db_table_name): string;", "public function table_name($name=NULL){\n $table_name = $this->config->item('db_table_prefix').$this->table_name;\n if(NULL!=$name){\n $table_name = $this->config->item('db_table_prefix').$name;\n }\n return $table_name;\n }", "protected function _prefix($str)\n\t{\n\t\t// Don't prefix an already prefixed table\n\t\tif (strpos($str, $this->table_prefix) !== FALSE)\n\t\t{\n\t\t\treturn $str;\n\t\t}\n\n\t\treturn $this->table_prefix.$str;\n\t}", "private function setTableName()\n {\n // Get table name from name of entity if not defined\n if (!$this->tableName) {\n $path = explode('\\\\', get_class($entity));\n $this->tableName = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', array_pop($path))).'s';\n }\n\n // Set table to be used\n $this->adapter->setTable($this->tableName);\n }", "public function __construct()\n {\n $this->prefix = config('payment.table_names.table_prefix', null);\n }", "public function setTableNames() {\n $caseFormat = $this->settingsAll['Model'][self::$meta_model]['tablecaseformat'];\n $aliasFormat = $this->settingsAll['Model'][self::$meta_model]['tablealiasformat'];\n foreach ($this->settingsAll as $k => $v) {\n # do not process __meta\n if (in_array($k, array(self::$meta))) {\n continue;\n }\n $tableName = $this->getRealTableName($caseFormat, $k);\n # settingsAll.k.this->meta.tablename\n # - genTable responsible for having tableName set\n $custom_set = null;\n if (isset($this->settingsAll[$k][self::$meta]['tablename'])) {\n $custom_set = $this->settingsAll[$k][self::$meta]['tablename'];\n }\n $this->log(\"setTableNames / style: {$caseFormat} / k: {$k} / tableName: {$tableName} / custom-set: \" . $custom_set);\n # set correct tablename as defined in schema, but do not override individual defaults\n if (!isset($this->settingsAll[$k][self::$meta]['tablename'])) {\n $this->settingsAll[$k][self::$meta]['tablename'] = $tableName;\n }\n # ALIAS\n $this->settingsAll[$k][self::$meta]['alias'] = $this->getTableAlias($aliasFormat, $k);\n }\n }", "function sql_prefix() {\n\treturn var_get('sql/prefix');\n}", "public function baseTableUuidColumn($prefix = '');", "protected function _setupTableName()\n {\n parent::_setupTableName();\t\t\n\t\t $this->_name = $this->getTableName(USER_RSS); \n }", "protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }", "public function getPrefix()\n {\n return $this->wpdb->prefix . $this->config['namespace'];\n }", "public function setPrefix($prefix);", "public static function prefixModelTable( $table )\n {\n $table = trim( $table );\n\n if ( ns()->store->isMultiStore() && ! in_array( trim( $table ), self::$ignored_tables ) ) {\n return 'store_' . ns()->store->getCurrentStore()->id . '_' . $table;\n }\n\n return $table;\n }", "public function prefix($str = '')\n\t{\n\t\treturn $this->dbprefix . $str;\n\t}", "protected function getMainTablePrefix(): string\n {\n $prefixes = $this->getTablePrefixes();\n return array_shift($prefixes);\n }", "public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}", "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "public function baseTableColumns($prefix = '');", "public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }", "public function getTable(): string\n {\n return $this->prefix . $this->table;\n }", "public function setTable($table)\n {\n $this->tableWithPrefix = $table;\n\n return $this;\n }", "public function setPrefix($prefix)\n {\n $this->idPrefix = $prefix;\n }", "public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}", "public function prepareTableName()\n {\n $this->tableName = $this->getOption('tableName');\n\n if (empty($this->tableName)) {\n $this->tableName = $this->modelNames['snake_plural'];\n }\n }", "public function set_table_vars() {\n\t\tglobal $wpdb;\n\n\t\t$this->table = $wpdb->prefix . self::TABLE_NAME;\n\t\t$this->ms_table = $wpdb->base_prefix . self::MS_TABLE_NAME;\n\n\t\t/* Register the snippet table names with WordPress */\n\t\t$wpdb->snippets = $this->table;\n\t\t$wpdb->ms_snippets = $this->ms_table;\n\n\t\t$wpdb->tables[] = self::TABLE_NAME;\n\t\t$wpdb->ms_global_tables[] = self::MS_TABLE_NAME;\n\t}", "public static function prefix_table_dot($aurora) {\n\t\t// prepare variables\n\t\t$table = static::table($aurora);\n\t\t$config = static::config($aurora);\n\t\t// load database config\n\t\t$config = Kohana::$config->load(\"database\")->get($config);\n\t\t// Getting the var\n\t\t$fetch_table_names = Arr::path($config, 'connection.fetch_table_names', FALSE);\n\n\t\treturn $fetch_table_names ?\n\t\t $table . '.' : // table name and a dot\n\t\t ''; // empty string\n\t}", "function getTableName($with_prefix = true)\n {\n return $with_prefix ? TABLE_PREFIX . $this->table_name : $this->table_name;\n }", "protected function setPrefix()\n {\n if (array_key_exists('prefix', $this->config)) {\n $this->prefix = $this->config['prefix'];\n }\n }", "public function db_table( $name )\n\t{\n\t\t$name = config_item( $name );\n\n\t\treturn $this->db->dbprefix( $name );\n\t}", "public function setPrefix($prefix){\n\t\t$this->prefix = $prefix;\n\t}", "protected function _setupTableName()\n {\n parent::_setupTableName();\t\t\n\t\t $this->_name = $this->getTableName(COMMENT); \n }", "private function setStagingPrefix()\n {\n // Get & find a new prefix that does not already exist in database.\n // Loop through up to 1000 different possible prefixes should be enough here;)\n for ($i = 0; $i <= 10000; $i++) {\n $this->options->prefix = isset($this->options->existingClones) ?\n 'wpstg' . (count($this->options->existingClones) + $i) . '_' :\n 'wpstg' . $i . '_';\n\n $sql = \"SHOW TABLE STATUS LIKE '{$this->options->prefix}%'\";\n $tables = $this->db->get_results($sql);\n\n // Prefix does not exist. We can use it\n if (!$tables) {\n return $this->options->prefix;\n }\n }\n $this->returnException(\"Fatal Error: Can not create staging prefix. '{$this->options->prefix}' already exists! Stopping for security reasons. Contact [email protected]\");\n wp_die(\"Fatal Error: Can not create staging prefix. Prefix '{$this->options->prefix}' already exists! Stopping for security reasons. Contact [email protected]\");\n }", "public function prefix($table = '', $dirname = null)\n {\n if ($dirname && $prefix = Xoops_Zend_Db::getPrefix($dirname)) {\n $dirname = $prefix;\n }\n return $this->conn->prefix($table, $dirname);\n\n if (empty($table)) {\n return $this->prefix;\n }\n return empty($this->prefix) ? $table : ($this->prefix . '_' . $table);\n }", "public function setTableName($tablename)\n {\n $this->dbTable = $tablename;\n }", "public function setPrefix($prefix)\n\t{\n\t\tif (func_num_args() == 1) {\n\t\t\t$this->id_prefix = $prefix;\n\t\t} else {\n\t\t\t$args = func_get_args();\n\t\t\t$args = Arrays::castToType($args, 'string');\n\t\t\t$this->id_prefix = implode('.', $args);\n\t\t}\n\n\t\tif (substr($this->id_prefix, -1, 1) != '.') {\n\t\t\t$this->id_prefix .= '.';\n\t\t}\n\t}", "public function listTables($prefix = '');", "public static function prefixDBTableNames ($qry, $prefix, $tables = true) {\n\t\t\t# Prefix certain table names\n\t\t\tif (is_array($tables)) {\n\t\t\t\t$qry = preg_replace('/([^_])({)(' . implode('|', $tables) . ')(})([^_]|$)/', '$1' . $prefix . '$3$5', $qry);\n\t\t\t}\n\t\t\t# Prefix ALL table names... TODO\n\t\t\telse {\n\t\t\t\n\t\t\t}\n\n\t\t\treturn $qry;\n\t\t}", "private function getTableNames()\n {\n $this->tableNames = [\n 'eav_attribute' => $this->resource->getTableName('eav_attribute'),\n 'EnitureModules' => $this->resource->getTableName('EnitureModules'),\n ];\n }", "static function replaceDbPrefix($sql)\r\n{\r\n\t$app = JFactory::getApplication();\r\n\t$dbprefix = $app->getCfg('dbprefix');\r\n\treturn str_replace('#__',$dbprefix,$sql);\r\n}", "public function setTableName($table)\n {\n // 1. 尝试解析为 [数据库名.表名]\n if(strpos($table, '.') !== false) {\n list($database, $table) = explode('.', $table);\n if ($database) {\n $this->options['database'] = $database;\n $this->options['real_table_name'] = $table;\n }\n }\n // 2. 尝试分离出命名空间和表名\n else {\n $table = StringHelper::toClassLastName($table, 'model');\n }\n \n $table = StringHelper::toUnderscoreVariable($table);\n if (substr($table, 0, 1) === '#') {\n $this->options['real_table_name'] = $this->options['table_name'] = str_replace('#', '', $table);\n } else {\n $this->options['table_name'] = preg_replace('/^' . static::getTablePrefix() . '/i', '', $table);\n }\n \n return $this;\n }", "private function getTableCacheKey(){\n return $this->dataCacheKeyPrefix .'.' . strtoupper($this->table);\n }", "public function prefixKey($prefix);", "public function setTable(string $table);", "private static function genFullyQualifiedTableName($database_name, $table_name) {\n return \"{$database_name}.{$table_name}\";\n }", "public function generateTableName($tableName)\r\n {\r\n if (!$this->useTablePrefix) {\r\n return $tableName;\r\n }\r\n\r\n $db = $this->getDbConnection();\r\n if (preg_match(\"/^{$db->tablePrefix}(.*?)$/\", $tableName, $matches)) {\r\n $tableName = '{{%' . $matches[1] . '}}';\r\n } elseif (preg_match(\"/^(.*?){$db->tablePrefix}$/\", $tableName, $matches)) {\r\n $tableName = '{{' . $matches[1] . '%}}';\r\n }\r\n return $tableName;\r\n }", "function set_table(){\n $this->table = 'network_posts';\n }", "public function get_table_name(){\n return $this->table_name();\n }", "function setup_table($app,$table,$colum_prefix='')\n\t{\n\t\t$this->table_name = $table;\n\t\t$this->table_def = $this->db->get_table_definitions($app,$table);\n\t\tif (!$this->table_def || !is_array($this->table_def['fd']))\n\t\t{\n\t\t\tthrow new egw_exception_wrong_parameter(__METHOD__.\"('$app','$table'): No table definition for '$table' found !!!\");\n\t\t}\n\t\t$this->db_key_cols = $this->db_data_cols = $this->db_cols = array();\n\t\t$this->autoinc_id = '';\n\t\t$len_prefix = strlen($colum_prefix);\n\t\tforeach($this->table_def['fd'] as $col => $def)\n\t\t{\n\t\t\t$name = $col;\n\t\t\tif ($len_prefix && substr($name,0,$len_prefix) == $colum_prefix)\n\t\t\t{\n\t\t\t\t$name = substr($col,$len_prefix);\n\t\t\t}\n\t\t\tif (in_array($col,$this->table_def['pk']))\n\t\t\t{\n\t\t\t\t$this->db_key_cols[$col] = $name;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db_data_cols[$col] = $name;\n\t\t\t}\n\t\t\t$this->db_cols[$col] = $name;\n\n\t\t\tif ($def['type'] == 'auto')\n\t\t\t{\n\t\t\t\t$this->autoinc_id = $col;\n\t\t\t}\n\t\t\tif ($def['type'] == 'bool') $this->has_bools = true;\n\n\t\t\tforeach($this->table_def['uc'] as $k => $uni_index)\n\t\t\t{\n\t\t\t\tif (is_array($uni_index) && in_array($name,$uni_index))\n\t\t\t\t{\n\t\t\t\t\t$this->db_uni_cols[$k][$col] = $name;\n\t\t\t\t}\n\t\t\t\telseif($name === $uni_index)\n\t\t\t\t{\n\t\t\t\t\t$this->db_uni_cols[$col] = $name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function get_table($table)\n {\n return $GLOBALS ['ZUIZZ']->config->db ['prefix'] . $this->config ['tables'] [$table];\n }", "public static function get_table_name()\n {\n return self::TABLE_NAME;\n }", "public static function withTablePrefix(\\Illuminate\\Database\\Grammar $grammar)\n {\n }", "private function qualifiedTablename($table, $database= NULL) {\n $database= $this->database($database);\n if (NULL !== $database) return $database.'.'.$table;\n return $table;\n }", "public function setPrefix($prefix = \"\") {\n $this->_prefix = !empty($prefix) ? $prefix : '';\n }", "private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }", "public function setPrefix($prefix)\n\t{\n\t\t$this->prefix = $prefix;\n\t}", "public function generateTableName($tableName)\n {\n if (!$this->useTablePrefix) {\n return $tableName;\n }\n\n $db = $this->getDbConnection();\n if (preg_match(\"/^{$db->tablePrefix}(.*?)$/\", $tableName, $matches)) {\n $tableName = '{{%' . $matches[1] . '}}';\n } elseif (preg_match(\"/^(.*?){$db->tablePrefix}$/\", $tableName, $matches)) {\n $tableName = '{{' . $matches[1] . '%}}';\n }\n return $tableName;\n }" ]
[ "0.8772204", "0.82414293", "0.8106719", "0.8043617", "0.80148953", "0.7847606", "0.78414595", "0.76680994", "0.7622542", "0.7565888", "0.75385636", "0.74136823", "0.7413044", "0.74047804", "0.73862827", "0.73421973", "0.73334724", "0.7318997", "0.7288911", "0.7255832", "0.7249907", "0.7231649", "0.7226649", "0.7184351", "0.7156272", "0.7088366", "0.70190895", "0.69926226", "0.6975529", "0.69654363", "0.696269", "0.69569975", "0.69154704", "0.6914909", "0.6900153", "0.68872106", "0.68515396", "0.68497336", "0.68117976", "0.6699151", "0.66937935", "0.6690442", "0.66884464", "0.66520166", "0.6629944", "0.66281193", "0.6605178", "0.6604302", "0.65936947", "0.6577981", "0.6577701", "0.65750504", "0.65706176", "0.65702945", "0.6545839", "0.6539804", "0.6519534", "0.65071446", "0.6501488", "0.6499633", "0.64899415", "0.646982", "0.6463703", "0.6443665", "0.64331025", "0.64274585", "0.6412993", "0.64023024", "0.63845354", "0.6381973", "0.63787436", "0.6368615", "0.6366273", "0.6329351", "0.63279694", "0.63163626", "0.6293324", "0.6289469", "0.62772804", "0.6263591", "0.6260816", "0.6258396", "0.62545913", "0.62426835", "0.6239034", "0.62209994", "0.62171173", "0.6215156", "0.6209782", "0.62096906", "0.62027663", "0.62020427", "0.6196177", "0.6195015", "0.61916244", "0.61808467", "0.6177106", "0.61501795", "0.6144849", "0.6143555" ]
0.85105306
1
Execute query to a dabatase
public function execute($sql){ if ($this->conn->query($sql)) { // return $this->conn->query($sql)->fetch_assoc(); // return $this->conn->insert_id; // return $this->conn->query($sql); return $this->conn; } else { die('Error: ' . $sql . '<br>' . $this->conn->error); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }", "abstract public function query();", "abstract function executeQuery($cons);", "public function query();", "public function query();", "public function query();", "protected function execute_single_query(){\n\t\t$this -> open_connection();\n\t\t$this -> conn -> query($this -> query);\n\t\t$this -> close_connection();\n\t}", "public function execute() {\r\n // $this->connecxao = parent::getConnect();\r\n $stmt = $this->connecxao->prepare($this->getQuery());\r\n $this->transition = $stmt->execute($this->getBinds());\r\n $this->error = $stmt->errorInfo();\r\n\r\n if ($this->error[0] == \"00000\") {\r\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\r\n $this->data = $stmt;\r\n } else {\r\n $this->setMsgError(\"Code Aplic Error: \" . $this->error[0] . \"<br />Code BD Error: \" . $this->error[1] . \"<br />Msg BD Error: \" . $this->error[2]);\r\n }\r\n }", "public function query()\n\t{\n\t\t\n\t}", "function executeQuery($query);", "public function execute($query);", "private function executeQuery() {\n\t\t$recordset = $this->getConnection()->execute( $this );\n\t\t\n\t\tif( $recordset === false ) {\n\t\t\t$this->_recordset = array();\n\t\t} else {\n\t\t\t$this->_recordset = $recordset;\n\t\t}\n\n\t\t$this->_currentRow = 0;\n\t\t$this->isDirty( false );\n\t}", "public static function query();", "public function executeQuery() {\r\n\t\t$query = $this->query;\r\n\t\t$query->matching($query->logicalAnd($this->queryConstraints));\r\n//$parser = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\Storage\\\\Typo3DbQueryParser'); \r\n//$queryParts = $parser->parseQuery($query); \r\n//\\TYPO3\\CMS\\Core\\Utility\\DebugUtility::debug($queryParts, 'Query Content');\r\n\t\t$queryResult = $query->execute()->toArray();\r\n\t\t$this->setSelectedPageUids($queryResult);\r\n\t\t$this->resetQuery(); \r\n\t\treturn $queryResult;\r\n\t}", "abstract protected function query(Export $export);", "public function run(){\n $sql = $this->sql();\n return $this->query($sql,$this->args);\n }", "public function query()\n {\n }", "public function query()\n {\n }", "abstract public function execute($query);", "private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }", "private function ExecuteQuery()\n\t{\n\t\tswitch($this->querytype)\n\t\t{\n\t\t\tcase \"SELECT\":\n\t\t\t{\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$this->querydata = $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"INSERT\":\n\t\t\tcase \"UPDATE\":\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->beginTransaction();\n\t\t\t\t\t$this->stmt->execute();\n\t\t\t\t\t$this->commit();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch (PDOException $e)\n\t\t\t\t{\n\t\t\t\t\t$this->rollBack();\n\t\t\t\t\techo(\"Query failed: \" . $e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function ejecutar_una_consulta($query){\n $response=self::ConnectDB()->prepare($query);\n $response->execute();\n return $response;\n }", "protected function execute_single_query() \n\t\t{\n \t\t\t$this->open_connection();\n \t\t\t$this->conn->query($this->query);\n \t\t\t$this->close_connection();\n\t\t}", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "protected abstract function executeQuery(Result $result);", "public function execute () {\n $this->query->execute();\n }", "public function run()\n {\n $marks = [];\n\n foreach ($this->data as $field => $value) {\n $marks[\":{$field}\"] = $value;\n }\n\n return $this->entity->getDb()->execute((string) $this, $marks);\n }", "function query() {}", "function query($query){\r\n if($this->query = $this->connection->prepare($query)){\r\n $this->query->execute();\r\n //cek kalo error\r\n if ($this->query->errno){\r\n die(\"otak anda error: \". $this->query->error);\r\n }\r\n }else{\r\n die(\"Error execution: \". $this->query->error);\r\n }\r\n }", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "abstract public function execute() ;", "public function executeStatement()\n {\n \n }", "function db_execute($query)\n {\n /*\n * Execute the Query\n */\n $this->varifysql($query[\"SQL\"]);\n return $this->get_conn()->query($query[\"SQL\"], PDO::FETCH_ASSOC);\n }", "function db_run_query( $statement ) {\n\n $this->pm_clear_dataset();\n $this->pm_store_statement( $statement );\n $this->pm_debug_statement( $statement );\n if( ! $this->query_is_select ) $this->pm_write_logfile( $statement );\n\n $this->dataset_obj = $this->connection->query( $statement );\n $this->pm_die_if_error( 'dataset_obj' );\n\n if( is_object( $this->dataset_obj )) # updates/inserts/deletes seem to return an integer not an object\n $this->rowcount = $this->dataset_obj->numrows();\n else\n $this->rowcount = ROWCOUNT_NOT_SET;\n\n return $this->dataset_obj;\n }", "protected abstract function executeQuery($query);", "public function execute($query)\n {\n }", "public function ExecuteQuery($query){\n\t\treturn $this->db_con->query($query);\n\t}", "abstract public function query($sql);", "public static function query()\n {\n }", "private function runQuery () {\n\n // Prepare the constructed SQL statement\n if ($this->_query = $this->_pdo->prepare($this->_sql)) {\n\n // Set a counter to one to use when binding\n $x = 1;\n \n // Loop through the binding array\n foreach($this->_bindArray as $param) {\n \n // Run the bindValue function to match the correct value to the correct placing\n $this->_query->bindValue($x, $param);\n\n // Increment the counter\n $x++;\n \n }\n \n // Run the execute function\n $this->execute();\n }\n }", "public function query()\n {\n $args = func_get_args();\n\n $this->connect(atkDb::getQueryMode($args[0]));\n\n return call_user_method_array('query',$this->m_current_clusternode, $args);\n }", "public function run()\n {\n \\DB::statement(\" INSERT INTO indec.poblacion_departamentos(id_provincia, id_departamento, habitantes, habitantes_sumar)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge2 host=192.6.0.66 user=postgres password=110678',\n\t\t 'SELECT id_provincia, id_departamento, habitantes, coalesce(habitantes_sumar,0)\n\t\t\tFROM\n\t\t\t\tindec.poblacion_departamentos;')\n\t\t AS migracion(id_provincia char(2),\n\t\t\t\t id_departamento char(3),\n\t\t\t\t habitantes integer,\n\t\t\t\t habitantes_sumar integer\n\t\t\t\t)\n\t); \");\n }", "public function execute() {\n\t\t\t$connection = \\Leap\\Core\\DB\\Connection\\Pool::instance()->get_connection($this->data_source);\n\t\t\tif ($this->before !== NULL) {\n\t\t\t\tcall_user_func_array($this->before, array($connection));\n\t\t\t}\n\t\t\t$connection->execute($this->command());\n\t\t\tif ($this->after !== NULL) {\n\t\t\t\tcall_user_func_array($this->after, array($connection));\n\t\t\t}\n\t\t}", "function doQuery(&$sql,$dsn=\"default\") {\n\t\t//use this tableName\n\t\t$db = DB::getHandle($dsn);\n\n\t\t$db->query($sql);\n\n\t \treturn;\n\t}", "function doQuery(&$sql,$dsn=\"default\") {\n\t\t//use this tableName\n\t\t$db = DB::getHandle($dsn);\n\n\t\t$db->query($sql);\n\n\t \treturn;\n\t}", "public function _query()\n {\n }", "function executarSQLAction($query)\n\t {\n\t global $basedados;\n\t try\n\t {\n\t $stmt = $basedados->prepare($query);\n\t $stmt->execute();\n\n\t return( $stmt );\n\t }\n\t catch (PDOException $e)\n\t {\n\t imprimir($e->getMessage());\n\t return false;\n\t }\n\t }", "public function execSql(){\n\t\t$cant=func_num_args();\n\t\t$instSql=\"\";\n\t\t$instSql=$this->reemplazaParametro(func_get_args());\n//\t\techo \"<br>\".$instSql.\"<br>\";\n//\t\techo $this->tipodb.\"<br>\";\n//\t\t$this->registroLog($instSql,$_SESSION['PERMISO'][0],$_SESSION['PERMISO'][1]);\n\t\tswitch ($this->tipodb) {\n\t\t\tcase \"my\":\n\t\t\t\t$resultado=mysql_query($instSql,$this->conn);\n//echo mysql_errno().\"<br>\";\n\t\t\t\tbreak;\n\t\t\tcase \"pg\":\n\t\t\t\t$resultado=pg_query($this->conn,$instSql);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $resultado;\n\t}", "private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }", "public function dbAnalysisStoreExec() {}", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "public function execute(): Statement;", "private function execute() {\n $query = $this->db->query($this->sql);\n return $query->result();\n }", "public function query($sql);", "public function query($sql);", "public function query($sql);", "public function query($sql);", "public function execute() { \n return $this -> stmt -> execute();\n }", "function createQuery() ;", "public function execute()\n\t{\n\t\t$this->query->setFetchMode($this->fetchMode);\n\n\t\t$this->query->execute($this->params);\t\n\n\t\t// Fetch the data in the appropriate format\n\t\tswitch ($this->fetchMethod) {\n\t\t\tcase 'row':\n\t\t\t\t$this->result = $this->query->fetch();\n\t\t\t\tbreak;\n\t\t\tcase 'field':\n\t\t\t\t$this->result = $this->query->fetchColumn();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->result = $this->query->fetchAll();\n\t\t\t\tbreak;\n\t\t}\n\t}", "function query() {\n }", "protected function execute()\n{\n\t$this->result = $this->db->query($this->getSql());\n\t$this->position = 0;\n\t$this->data = array();\n\n\treturn $this->result;\n}", "public function doQuery() {\n // Selects all of ads' title and writer's name\n $queryString = \"SELECT title, name FROM advertisements INNER JOIN users ON users.id = advertisements.userid ORDER BY advertisements.id DESC\";\n\n $getAds = $this->sql->query($queryString);\n\n // Store the result array in the $data variable, which can be available by getData() later\n while($rows = $getAds->fetch_array(MYSQLI_ASSOC)) {\n array_push($this->data, $rows);\n }\n }", "public function execute(QueryObject $query);", "protected function execute_single_query() {\n\t\tif($_POST) {\n\t\t\t$this->open_connection();\n\t\t\t$this->conn->query($this->query);\n\t\t\t\n\t\t} else {\n\t\t\t$this->mensaje = 'Metodo no permitido';\n\t\t}\n\t}", "public function execute()\n {\n return $this->query($this->sSql);\n }", "abstract function execute();", "abstract function execute();", "public function run()\n {\n \\DB::statement(\" INSERT INTO solicitudes.estados(id, descripcion, css)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge3 host=192.6.0.118 user=postgres password=LatinoSandwich007',\n\t\t 'SELECT id, descripcion, css\n\t\t\t FROM solicitudes.estados')\n\t\t AS migracion( id integer,\n\t\t\t\t\t\t descripcion character varying(50),\n\t\t\t\t\t\t css character varying(20) )\t\t\t\n\t); \");\n }", "public function query() {\n\n }", "public function executeQuery($q){ $this->makeConnection();\n //check for SQL injection\n\n //execute query\n $results = $this->connection->query($q);\n\n return $results;\n\n }", "public function run() {\n\t\t\\DB::statement(\"INSERT INTO pss.codigos_sumar_nacer(codigo_prestacion,id_grupo_etario,codigo_prestacion_nacer,codigo_prestacion_rural)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t\t 'SELECT codigo_prestacion,id_grupo_etario,codigo_prestacion_nacer,codigo_prestacion_rural\n\t\t\t FROM pss.codigos_sumar_nacer')\n\t\t AS migracion(codigo_prestacion character varying(11),\n\t\t\t\t id_grupo_etario smallint,\n\t\t\t\t codigo_prestacion_nacer character varying(6),\n\t\t\t\t codigo_prestacion_rural character varying(11))\n\t);\");\n\t}", "public function executeGenericDQLQuery($query){\n try{\n if(!$this->db)\n {\n $this->db = mysql_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);\n }\n $result = mysql_query($query, $this->db);\n /* if(mysqli_errno($con) != 0){\n throw new Exception(\"Error :\".mysqli_errno($con).\" : \".mysqli_error($con));\n } */\n $rows = array();\n while($row = mysql_fetch_array($result)){\n array_push($rows,$row);\n }\n //mysqli_close($con);\n return $rows;\n \n }\n catch(Exception $e){\n $response = array();\n $response['status'] = false;\n $response['message'] = $e->getMessage();\n $this->response($this->json($response), 200);\n }\n \n }", "function execQuery($query){\n\t\ttry {\n\t\t\t\n\t\t\t$pdo = db_init();\n\n\t\t\t$pdo->exec($query);\n\n\t\t} catch (PDOException $e) {\n\t\t\tlogging($_SERVER['PHP_SELF'] . \", 22, Error Executing Query:\". $e->getMessage() .\" ,\" . date(\"Y-m-d\") . \" \" . date(\"h:i:sa\"));\n\t\t}\n\t}", "function tep_db_query($query){\n\t\tglobal $db;\n\t\treturn($db->Execute($query));\n\t}", "public function query($query){\n return $this->connection->query($query);\n }", "public function run() {\n\t\t\\DB::statement(\" INSERT INTO efectores.tipo_efector(id_tipo_efector,sigla,descripcion)\n(\n\tSELECT *\n\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t 'SELECT id_tipo_efector,sigla,descripcion\n\t\t FROM efectores.tipo_efector')\n\t AS migracion(id_tipo_efector integer,\n sigla character varying(4),\n descripcion character varying(50))\n);\");\n\t}", "abstract public function exec($query='');", "public function execute($sql);", "public function execute($sql);", "public abstract function operateDB($data);", "private function execute () {\n if($this->_query->execute()) {\n\n // It has been succesful so add the output to $this->results and set it as an object\n $this->_results = $this->_query->fetchAll(PDO::FETCH_OBJ);\n\n // Set the affected row count to $this->_count\n $this->_count = $this->_query->rowCount();\n\n } else {\n\n // The query failed so set $this->_error to true. MORE WORK NEEDED HERE\n $this->_error = true;\n\n }\n }", "public function executeQuery() \r\n\t{\r\n\t\t$Result = $this->objStatement->execute();\r\n\t\t\r\n\t\tif($Result)\r\n\t\t{\r\n\t\t\t$Result = new DatabaseStatement($this->objStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn $Result;\r\n\t}" ]
[ "0.7296713", "0.7170165", "0.70633703", "0.70601314", "0.70601314", "0.70601314", "0.70236903", "0.69872314", "0.68654704", "0.68625075", "0.6847991", "0.67696214", "0.6761143", "0.67424816", "0.66996473", "0.66882664", "0.6654651", "0.6654651", "0.66459364", "0.6573873", "0.6572427", "0.6571709", "0.65675163", "0.6555773", "0.6553714", "0.654745", "0.65457034", "0.65169626", "0.6513795", "0.6482461", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.6465953", "0.646244", "0.64294946", "0.6426086", "0.64249045", "0.6417876", "0.6415702", "0.640753", "0.64055663", "0.63789827", "0.6376737", "0.63722795", "0.6360436", "0.63485986", "0.6340315", "0.6340315", "0.63315845", "0.6331203", "0.63294303", "0.6308029", "0.6299321", "0.62984943", "0.62984943", "0.62984943", "0.62984943", "0.62917453", "0.6275891", "0.62757057", "0.62757057", "0.62757057", "0.62757057", "0.62755746", "0.62754184", "0.6274571", "0.6271044", "0.6270909", "0.6265157", "0.6262632", "0.62613505", "0.6258312", "0.6254065", "0.6254065", "0.62539905", "0.62429386", "0.62314403", "0.6228317", "0.6227559", "0.6215846", "0.6211677", "0.6211666", "0.62102926", "0.62099636", "0.6204766", "0.6204766", "0.6204475", "0.6203937", "0.6197493" ]
0.0
-1
Display a listing of the resource.
public function index() { Session::put('admin_page', 'event'); $events = Event::all(); return view('backend.events.index', compact('events')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET 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 //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { Session::put('admin_page', 'event'); $galleries = Gallery::all(); $categories = Category::all(); return view('backend.events.create', compact('galleries', 'categories')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request, [ 'title' => 'required|max:255', 'excerpt' => 'required|max:255', 'description' => 'required', 'feature_image' => 'required', ]); $data = $request->all(); $event = new Event(); $event->title = $data['title']; $event->location = $data['location']; $event->duration = $data['duration']; $event->no_of_seat = $data['no_of_seat']; $event->time_duration = $data['time_duration']; $event->excerpt = $data['excerpt']; $event->description = $data['description']; $event->gallery_id = $data['gallery_id']; $event->category_id = $data['category_id']; $event->status = $data['status']; $event->date = Carbon::create($data['date']); $random = Str::random(10); if ($request->hasFile('feature_image')) { $image_tmp = $request->file('feature_image'); if ($image_tmp->isValid()) { $extension = $image_tmp->getClientOriginalExtension(); $filename = $random . '.' . $extension; $path = 'storage/event/'; if(!File::isDirectory($path)){ File::makeDirectory($path, 0777, true, true); } $image_path = public_path($path . $filename); Image::make($image_tmp)->save($image_path); $event->feature_image = $filename; } } $event->save(); Session::flash('success_message', 'Event has been Added'); return redirect()->route('events.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "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 }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(Event $event) { Session::put('admin_page', 'event'); $images = $event->gallery->images->pluck('image'); // dd($image); return view('backend.events.show', compact('event', 'images')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "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}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Event $event) { Session::put('admin_page', 'event'); $galleries = Gallery::all(); $categories = Category::all(); return view('backend.events.edit', compact('event', 'galleries', 'categories')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Event $event) { $this->validate($request, [ 'title' => 'required|max:255', 'excerpt' => 'required|max:255', 'description' => 'required', ]); $data = $request->all(); $event->title = $data['title']; $event->location = $data['location']; $event->duration = $data['duration']; $event->no_of_seat = $data['no_of_seat']; $event->time_duration = $data['time_duration']; $event->excerpt = $data['excerpt']; $event->description = $data['description']; $event->gallery_id = $data['gallery_id']; $event->category_id = $data['category_id']; $event->status = $data['status']; $event->date = Carbon::create($data['date']); $random = Str::random(10); if ($request->hasFile('feature_image')) { $feature_image_tmp = $request->file('feature_image'); if ($feature_image_tmp->isValid()) { $extension = $feature_image_tmp->getClientOriginalExtension(); $filename = $random . '.' . $extension; $path = 'storage/event/'; if(!File::isDirectory($path)){ File::makeDirectory($path, 0777, true, true); } //code for remove old file if($event->feature_image != '' && $event->feature_image != null){ $file_old = $path.$event->feature_image; unlink($file_old); } $feature_image_path = public_path($path . $filename); Image::make($feature_image_tmp)->save($feature_image_path); } } else { $filename = $event->feature_image; } $event->feature_image = $filename; $event->save(); Session::flash('success_message', 'Event has been updated successfully'); return redirect()->route('events.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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 }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "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 }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "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 }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "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 }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "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}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "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 }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "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 }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "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 }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "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 }", "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 }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "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 }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "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}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "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 }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "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 }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "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 }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "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 }", "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 }", "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 }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "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 }", "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 }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "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 }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "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 }", "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 }", "public function update(Entity $entity);", "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 }", "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}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "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 }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Event $event) { $event->delete(); Session::flash('success_message', 'Event Deleted'); return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
This file adds the Portfolio template to the Modern Portfolio Pro Theme.
function be_portfolio_post_class( $classes ) { $columns = 3; // Set the number of columns here $column_classes = array( '', '', 'one-half', 'one-third', 'one-fourth', 'one-fifth', 'one-sixth' ); $classes[] = $column_classes[$columns]; global $wp_query; if( 0 == $wp_query->current_post || 0 == $wp_query->current_post % $columns ) $classes[] = 'first'; return $classes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function horizon_portfolio_section() {\n\t\tget_template_part('inc/partials/homepage', 'portfolio');\n\t}", "function me_theme_jetpack_portfolio_cpt() {\n\tadd_theme_support( 'jetpack-portfolio' );\n}", "function portfolio_web_setup() {\r\n /*\r\n * Make theme available for translation.\r\n * Translations can be filed in the /languages/ directory.\r\n * If you're building a theme based on Portfolio Web, use a find and replace\r\n * to change 'portfolio-web' to the name of your theme in all the template files.\r\n */\r\n load_theme_textdomain( 'portfolio-web', get_template_directory() . '/languages' );\r\n\r\n // Add default posts and comments RSS feed links to head.\r\n add_theme_support( 'automatic-feed-links' );\r\n\r\n /*\r\n * Let WordPress manage the document title.\r\n * By adding theme support, we declare that this theme does not use a\r\n * hard-coded <title> tag in the document head, and expect WordPress to\r\n * provide it for us.\r\n */\r\n add_theme_support( 'title-tag' );\r\n\r\n /*\r\n * Enable support for custom logo.\r\n *\r\n */\r\n add_theme_support( 'custom-logo', array(\r\n 'height' => 70,\r\n 'width' => 290,\r\n 'flex-height' => true,\r\n 'flex-width' => true\r\n ) );\r\n\r\n /*\r\n * Enable support for Post Thumbnails on posts and pages.\r\n *\r\n * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/\r\n */\r\n\t add_theme_support( 'customize-selective-refresh-widgets' );\r\n add_theme_support( 'post-thumbnails' );\r\n set_post_thumbnail_size( 340, 240, true );\r\n\r\n // Adding excerpt for page\r\n add_post_type_support( 'page', 'excerpt' );\r\n\r\n // This theme uses wp_nav_menu() in four location.\r\n register_nav_menus( array(\r\n\t 'top-menu' => esc_html__( 'Top Menu ( Support First Level Only )', 'portfolio-web' ),\r\n\t 'primary' => esc_html__( 'Primary Menu', 'portfolio-web' ),\r\n 'one-page' => esc_html__( 'One Page Menu for Front Page', 'portfolio-web' ),\r\n\t 'footer-menu' => esc_html__( 'Footer Menu ( Support First Level Only )', 'portfolio-web' )\r\n ) );\r\n\r\n /*\r\n * Switch default core markup for search form, comment form, and comments\r\n * to output valid HTML5.\r\n */\r\n add_theme_support( 'html5', array(\r\n 'gallery',\r\n 'caption',\r\n ) );\r\n \r\n // Set up the WordPress core custom background feature.\r\n add_theme_support( 'custom-background', apply_filters( 'portfolio_web_custom_background_args', array(\r\n 'default-color' => 'ffffff',\r\n 'default-image' => '',\r\n ) ) );\r\n\r\n // This theme styles the visual editor with editor-style.css to match the theme style.\r\n\t add_editor_style();\r\n\r\n /*woocommerce support*/\r\n add_theme_support( 'woocommerce' );\r\n\r\n\t /*Set up the woocommerce Gallery Lightbox*/\r\n\t add_theme_support( 'wc-product-gallery-zoom' );\r\n\t add_theme_support( 'wc-product-gallery-lightbox' );\r\n\t add_theme_support( 'wc-product-gallery-slider' );\r\n\r\n /*yoast breadcrumb*/\r\n add_theme_support( 'yoast-seo-breadcrumbs' );\r\n }", "function codex_portfolio_init() {\r\n\r\n $slug = get_theme_mod( 'sovenco_project_slug', 'portfolio' );\r\n if ( ! $slug ) {\r\n $slug = 'portfolio';\r\n }\r\n\r\n $labels = array(\r\n 'name' => _x( 'Portfolios', 'post type general name', 'sovenco-plus' ),\r\n 'singular_name' => _x( 'Portfolio', 'post type singular name', 'sovenco-plus' ),\r\n 'menu_name' => _x( 'Portfolios', 'admin menu', 'sovenco-plus' ),\r\n 'name_admin_bar' => _x( 'Portfolio', 'add new on admin bar', 'sovenco-plus' ),\r\n 'add_new' => _x( 'Add New', 'portfolio', 'sovenco-plus' ),\r\n 'add_new_item' => __( 'Add New Portfolio', 'sovenco-plus' ),\r\n 'new_item' => __( 'New Portfolio', 'sovenco-plus' ),\r\n 'edit_item' => __( 'Edit Portfolio', 'sovenco-plus' ),\r\n 'view_item' => __( 'View Portfolio', 'sovenco-plus' ),\r\n 'all_items' => __( 'All Portfolios', 'sovenco-plus' ),\r\n 'search_items' => __( 'Search Portfolios', 'sovenco-plus' ),\r\n 'parent_item_colon' => __( 'Parent Portfolios:', 'sovenco-plus' ),\r\n 'not_found' => __( 'No portfolios found.', 'sovenco-plus' ),\r\n 'not_found_in_trash' => __( 'No portfolios found in Trash.', 'sovenco-plus' )\r\n );\r\n\r\n $args = array(\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'show_ui' => true,\r\n 'show_in_menu' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => $slug ),\r\n 'capability_type' => 'post',\r\n 'has_archive' => false,\r\n 'hierarchical' => false,\r\n 'menu_position' => null,\r\n 'supports' => array( 'title', 'editor', 'thumbnail' )\r\n );\r\n\r\n register_post_type( 'portfolio', $args );\r\n\r\n // Portfolio category\r\n $labels = array(\r\n 'name' => _x( 'Categories', 'taxonomy general name', 'sovenco-plus' ),\r\n 'singular_name' => _x( 'Category', 'taxonomy singular name', 'sovenco-plus' ),\r\n 'search_items' => __( 'Search Categories', 'sovenco-plus' ),\r\n 'popular_items' => __( 'Popular Categories', 'sovenco-plus' ),\r\n 'all_items' => __( 'All Categories', 'sovenco-plus' ),\r\n 'parent_item' => null,\r\n 'parent_item_colon' => null,\r\n 'edit_item' => __( 'Edit Category', 'sovenco-plus' ),\r\n 'update_item' => __( 'Update Category', 'sovenco-plus' ),\r\n 'add_new_item' => __( 'Add New Category', 'sovenco-plus' ),\r\n 'new_item_name' => __( 'New Category Name', 'sovenco-plus' ),\r\n 'separate_items_with_commas' => __( 'Separate categories with commas', 'sovenco-plus' ),\r\n 'add_or_remove_items' => __( 'Add or remove categories', 'sovenco-plus' ),\r\n 'choose_from_most_used' => __( 'Choose from the most used categories', 'sovenco-plus' ),\r\n 'not_found' => __( 'No categories found.', 'sovenco-plus' ),\r\n 'menu_name' => __( 'Categories', 'sovenco-plus' ),\r\n );\r\n\r\n $args = array(\r\n 'hierarchical' => false,\r\n 'labels' => $labels,\r\n 'show_ui' => true,\r\n 'show_admin_column' => true,\r\n 'update_count_callback' => '_update_post_term_count',\r\n 'query_var' => false,\r\n 'rewrite' => array( 'slug' => 'portfolio_cat' ),\r\n );\r\n\r\n register_taxonomy( 'portfolio_cat', 'portfolio', $args );\r\n\r\n}", "public function showPortfolio() {\n Page::$title = 'Arthub - Portfolio';\n require(APP_NON_WEB_BASE_DIR . 'views/portfolio.php');\n }", "function fetch_portfolio_script() {\t\nwp_enqueue_style( 'portfolio-style', get_template_directory_uri() . '/inc/portfolio/css/portfolio.css' );\n}", "function digital_portfolio_setup() {\n\n\n\t//Output valid HTML5 for the template tags listed below.\n\tadd_theme_support( 'html5', array(\n\t\t'gallery', 'caption'\n\t) );\n\n\t//Adds support for a custom navigation menu.\n\tregister_nav_menu( 'primary', 'Navigation Menu' );\n\n\t//This theme supports the use of thumbnails.\n\tadd_theme_support( 'post-thumbnails' );\n\n}", "function portfolio_setup() {\r\n\r\n /* ----- Register nav menu's ----- */\r\n register_nav_menus( array(\r\n 'head-menu' => __( 'Hoofd menu', 'portfolio' ),\r\n ) );\r\n\r\n /* ----- Making strings available for translation ----- */\r\n load_theme_textdomain( 'portfolio', get_template_directory() . '/languages' );\r\n\r\n /* ----- Add post thumbnails and featured images ----- */\r\n add_theme_support( 'post-thumbnails' );\r\n\r\n /* ----- Enable support for the following post formats:\r\n * aside, gallery, quote, image, and video ----- */\r\n add_theme_support( 'post-formats', array ( 'aside', 'gallery', 'quote', 'image', 'video' ) );\r\n\r\n // Add theme support for Custom Logo\r\n add_theme_support( 'custom-logo', array(\r\n 'flex-width' => false,\r\n ));\r\n\r\n }", "function create_portfolio() {\n \n register_post_type( 'portfolio',\n // CPT Options\n array(\n 'labels' => array(\n 'name' => __('PORTFOLIO' ),\n 'singular_name' => __( 'gallery' ),\n ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'portfolio'),\n\t\t\t'menu_icon' => 'dashicons-format-gallery',\n 'show_in_rest' => true,\n \n )\n );\n}", "function portfolio_hl_setup() {\n add_theme_support('title-tag');\n\n\n\n\n /*\n * menu par default wordpress\n */\n register_nav_menus( array(\n 'primary' => esc_html__('Primary','portfolio_hl'),\n ));\n\n\n /*\n * Switch default core markup for search form, comment form, and comments\n * to output valid HTML5.\n */\n add_theme_support( 'html5', array(\n 'search-form',\n 'comment-form',\n 'comment-list',\n 'gallery',\n 'caption',\n ) );\n\n /*\n * Enable support for Post Thumbnails on posts and pages.\n *\n * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/\n */\n add_theme_support( 'post-thumbnails' );\n add_image_size( 'portfolio_hl-home-small', 200);\n add_image_size( 'portfolio_hl-home-large', 280, 280, true );\n add_image_size( 'portfolio_hl-blog-image', 690 );\n add_image_size( 'portfolio_hl-blog-thumb', 470);\n add_image_size( 'portfolio_hl-blog-header', 1920);\n\n /*\n * custum background wordpress function\n */\n add_theme_support('custum-background', apply_filters('portfolio_hl_custum_bakground_arg', array(\n 'default-color' =>'ffffff',\n 'default-image' => '',\n )));\n\n\n\n\n\n /**\n * Register widget area.\n *\n * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar\n */\nfunction portfolio_hl_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => esc_html__( 'Sidebar', 'portfolio_hl' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => esc_html__( 'Add widgets here.', 'portfolio_hl' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\n\n\n}\nadd_action( 'widgets_init', 'portfolio_hl_widgets_init' );\n /*\n * logo custum\n */\n add_theme_support('custom-logo',array(\n 'height' => 55,\n 'width' => 200,\n 'flex-height' => true,\n ));\n\n }", "function beuh_single_portfolio() {\r\n\tif( is_page_template( 'homepage-slider.php' ) || is_page_template( 'homepage-youtube.php' )|| is_page_template( 'homepage-video.php' )|| is_page_template( 'homepage-custom-layout.php' )){\r\n?>\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t(function ($) {\r\n\t\t\t\t\t\"use strict\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//portfolio ajax setting\r\n\t\t\t\t\t\t$(document).ready(function () {\r\n\t\t\t\t\t\t\t$('.port-ajax').click(function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tvar toLoad = $(this).attr('data-link') + ' .worksajax > *';\r\n\t\t\t\t\t\t\t\t$('.worksajax').slideUp('slow', loadContent);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tfunction loadContent() {\r\n\t\t\t\t\t\t\t\t\t$('.worksajax').load(toLoad, '', showNewContent)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tfunction showNewContent() {\r\n\t\t\t\t\t\t\t\t\t$.getScript(\"<?php echo get_template_directory_uri(); ?>/js/portfolio.js\");\r\n\t\t\t\t\t\t\t\t\t$('.worksajax').slideDown('slow');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t//portfolio scrolling\r\n\t\t\t\t\t\t$(function () {\r\n\t\t\t\t\t\t\t$('.port-ajax').bind('click', function (event) {\r\n\t\t\t\t\t\t\t\tvar $anchor = $('#work-ajax');\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$('html, body').stop().animate({\r\n\t\t\t\t\t\t\t\t\tscrollTop: $($anchor).offset().top - 93\r\n\t\t\t\t\t\t\t\t}, 1000, 'linear');\r\n\t\t\t\t\t\t\t\tevent.preventDefault();\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\t\t//isotope setting(portfolio)\r\n\t\t\t\t\t\tvar $container = $('.portfolio-body');\r\n\t\t\t\t\t\t$container.imagesLoaded(function () {\r\n\t\t\t\t\t\t\t$container.isotope();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t// filter items when filter link is clicked\r\n\t\t\t\t\t\t$('.port-filter a').click(function () {\r\n\t\t\t\t\t\t\tvar selector = $(this).attr('data-filter');\r\n\t\t\t\t\t\t\t$container.isotope({\r\n\t\t\t\t\t\t\t\titemSelector: '.port-item',\r\n\t\t\t\t\t\t\t\tfilter: selector\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t//adding active state to portfolio filtr\r\n\t\t\t\t\t\t$(\".port-filter a\").click(function (e) {\r\n\t\t\t\t\t\t\t$(\".port-filter a\").removeClass(\"active\");\r\n\t\t\t\t\t\t\t$(this).addClass(\"active\");\r\n\t\t\t\t\t\t});\r\n\t\r\n\t\t\t\t\t})(jQuery);\r\n\t\t</script>\r\n<?php }\r\n}", "function custom_post_portfolio() {\n\n $labels = array(\n 'name' => _x( 'Proyectos', 'Post Type General Name', 'ohmarketingtravel' ),\n 'singular_name' => _x( 'Proyecto', 'Post Type Singular Name', 'ohmarketingtravel' ),\n 'menu_name' => __( 'Portafolio', 'ohmarketingtravel' ),\n 'name_admin_bar' => __( 'Portafolio', 'ohmarketingtravel' ),\n 'archives' => __( 'Item Archives', 'ohmarketingtravel' ),\n 'attributes' => __( 'Item Attributes', 'ohmarketingtravel' ),\n 'parent_item_colon' => __( 'Parent Item:', 'ohmarketingtravel' ),\n 'all_items' => __( 'All Items', 'ohmarketingtravel' ),\n 'add_new_item' => __( 'Add New Item', 'ohmarketingtravel' ),\n 'add_new' => __( 'Add New', 'ohmarketingtravel' ),\n 'new_item' => __( 'New Item', 'ohmarketingtravel' ),\n 'edit_item' => __( 'Edit Item', 'ohmarketingtravel' ),\n 'update_item' => __( 'Update Item', 'ohmarketingtravel' ),\n 'view_item' => __( 'View Item', 'ohmarketingtravel' ),\n 'view_items' => __( 'View Items', 'ohmarketingtravel' ),\n 'search_items' => __( 'Search Item', 'ohmarketingtravel' ),\n 'not_found' => __( 'Not found', 'ohmarketingtravel' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'ohmarketingtravel' ),\n 'featured_image' => __( 'Featured Image', 'ohmarketingtravel' ),\n 'set_featured_image' => __( 'Set featured image', 'ohmarketingtravel' ),\n 'remove_featured_image' => __( 'Remove featured image', 'ohmarketingtravel' ),\n 'use_featured_image' => __( 'Use as featured image', 'ohmarketingtravel' ),\n 'insert_into_item' => __( 'Insert into item', 'ohmarketingtravel' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this item', 'ohmarketingtravel' ),\n 'items_list' => __( 'Items list', 'ohmarketingtravel' ),\n 'items_list_navigation' => __( 'Items list navigation', 'ohmarketingtravel' ),\n 'filter_items_list' => __( 'Filter items list', 'ohmarketingtravel' ),\n );\n $args = array(\n 'label' => __( 'Proyecto', 'ohmarketingtravel' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail' ),\n 'taxonomies' => array( 'category', 'post_tag' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-schedule',\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'Portafolio', $args );\n\n}", "function create_meta_portfolio_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-portfolio-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PORTFOLIO ITEM SETTINGS', 'new_meta_portfolio_boxes', PEXETO_PORTFOLIO_POST_TYPE, 'normal', 'high' );\n\t}\n}", "function genesisawesome_register_portfolio() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Portfolio', 'Portfolio Labels ', 'genesisawesome' ),\n\t\t'singular_name' => _x( 'Portfolio', 'Portfolio Label', 'genesisawesome' ),\n\t\t'menu_name' => _x( 'Portfolio', 'Portfolio Label', 'genesisawesome' ),\n\t\t'add_new_item' => _x( 'Add New Portfolio', 'Portfolio Label', 'genesisawesome' ),\n\t\t'edit_item' => _x( 'Edit Portfolio', 'Portfolio Label', 'genesisawesome' ),\n\t\t'new_item' => _x( 'New Portfolio', 'Portfolio Label', 'genesisawesome' ),\n\t\t'view_item' => _x( 'View Portfolio', 'Portfolio Label', 'genesisawesome' ),\n\t\t'search_items' => _x( 'Search Portfolio', 'Portfolio Label', 'genesisawesome' ),\n\t\t'not_found' => _x( 'No Portfolio items found', 'Portfolio Label', 'genesisawesome' ),\n\t\t'not_found_in_trash' => _x( 'No Portfolio items found in trash', 'Portfolio Label', 'genesisawesome' ),\n\n\t);\n\n\t$args = array(\n\t\t'label' => _x( 'Portfolio', 'Portfolio Label', 'genesisawesome' ),\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'exclude_from_search' => true,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'custom-fields', 'genesis-seo' ),\n\t\t'has_archive' => true\n\t);\n\n\tregister_post_type( 'portfolio', $args );\n\n\t$labels = array(\n\t\t'name' => _x( 'Portfolio Categories', 'Portfolio category labels', 'genesisawesome' ),\n\t\t'singular_name' => _x( 'Portfolio Category', 'Portfolio category labels', 'genesisawesome' ),\n\t\t'all_items' => _x( 'All Portfolio Categories', 'Portfolio category labels', 'genesisawesome' ),\n\t\t'edit_item' => _x( 'Edit Portfolio Category', 'Portfolio category labels', 'genesisawesome' ),\n\t\t'update_item' => _x( 'Update Portfolio Category', 'Portfolio category labels', 'genesisawesome' ),\n\t\t'add_new_item' => _x( 'Add Portfolio Category', 'Portfolio category labels', 'genesisawesome' ),\n\t\t'new_item_name' => _x( 'New Portfolio Category Name', 'Portfolio category labels', 'genesisawesome' ),\n\t\t'parent_item' => _x( 'Parent Portfolio Category', 'Portfolio category labels', 'genesisawesome' ),\n\t\t'search_items' => _x( 'Search Portfolio Categories', 'Portfolio category labels', 'genesisawesome' ),\n\t\t'popular_items' => _x( 'Popular Portfolio Categories', 'Portfolio category labels', 'genesisawesome' ),\n\n\t);\n\t\n\t$args = array(\n\t\t'label' => _x( 'Portfolio Categories', 'Portfolio category labels', 'genesisawesome' ),\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true\n\t);\n\n\tregister_taxonomy( 'portfolio-category', array( 'portfolio' ), $args );\n\n}", "function truethemes_generate_portfolio_image($image_src,$image_width,$image_height,$linkpost,$portfolio_full,$phototitle,$zoom_image_extension){\n\n//Allow plugins/themes to override this layout.\n//refer to http://codex.wordpress.org/Function_Reference/add_filter for usage\n$html = apply_filters('truethemes_generate_portfolio_image_filter','',$image_src,$image_width,$image_height,$linkpost,$portfolio_full,$phototitle,$zoom_image_extension);\nif ( $html != '' ){\n\treturn $html;\n}\n\n\t\t\n//began normal layout\t\t\n\nif(empty($linkpost)){\n//regular portfolio item.\n\n$html .= \"<a href='$portfolio_full' class='attachment-fadeIn' data-gal='prettyPhoto[gal]' title='$phototitle'>\";\n\n}else{\n//portfolio that links to url.\n\n$html .= \"<a href='$linkpost' class='attachment-fadeIn' title='$phototitle'>\";\n\n}\n\nif(empty($linkpost)){\n//regular portfolio item, we show zoom image.\n\n$template_directory_uri = get_template_directory_uri();\n\nglobal $post;\n$title = get_the_title($post->ID);\n\n$html .=\"<img src='$template_directory_uri/images/_global/img-zoom-$zoom_image_extension.png' style='position:absolute; display: none;' alt='$title' />\";\n\n}else{\n//post link to url, we show arrow image.\n\n$template_directory_uri = get_template_directory_uri();\n\nglobal $post;\n$title = get_the_title($post->ID);\n\n$html .=\"<img src='$template_directory_uri/images/_global/img-zoom-link-$zoom_image_extension.png' style='position:absolute; display: none;' alt='$title' />\";\n\n}\n\n//this is the actual image.\n$html .= \"<img src='$image_src' width='$image_width' height='$image_height' alt='$title' />\";\n\n\n//there is a link tag, we have to end it.\n$html .='</a>';\n\n\n//that's all!\nreturn $html;\n\n}", "function jk_portfolio() {\r\n\t\tparent::__construct( false, \"Joeleen's Portfolio Widget\" );\r\n\t}", "function portfolio_page_template( $template ) {\n $post_id = get_the_ID();\n if ( get_post_type( $post_id ) == 'actividad' && is_single() ) {\n $new_template = dirname( __FILE__ ) . '/includes/templates/single.php';\n if ( $new_template != '' ) {\n return $new_template ;\n }\n }\n return $template;\n}", "public function view_portfolio()\n {\n return view('dashboardpages.portfolio.portfolio');\n }", "protected function _content_template() {\n ?>\n\n\n\n <section id=\"intro\">\n\n <div class=\"intro-content\">\n <h2>{{{settings.title}}}</h2>\n <div>\n <a href=\"#about\" class=\"btn-get-started scrollto\">\n {{{settings.button1_text}}}\n </a>\n <a href=\"#portfolio\" class=\"btn-projects scrollto\">\n {{{settings.button2_text}}}\n </a>\n </div>\n </div>\n\n <div id=\"intro-carousel\" class=\"owl-carousel\" >\n\n <# _.each( settings.gallery, function( image ) { #>\n\n <div class=\"item\" style=\"background-image: url('{{ image.url }}');\"></div>\n <# }); #>\n\n </div>\n\n </section><!-- #intro -->\n \n <?php\n }", "function studio_setup() {\n\n load_theme_textdomain( 'studio', get_template_directory() . '/languages' );\n\n add_theme_support( 'automatic-feed-links' );\n\n /**\n * Enable support for Post Thumbnails on posts and pages\n *\n * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails\n */\n add_theme_support( 'post-thumbnails' );\n\n if ( function_exists( 'add_image_size' ) ) {\n add_image_size( 'portfolio', 600, 9999 );\n }\n\n /**\n * This theme uses wp_nav_menu() in one location.\n */\n register_nav_menus( array(\n 'primary' => __( 'Primary Menu', 'studio' ),\n ) );\n\n add_theme_support( 'custom-background', apply_filters( 'studio_custom_background_args', array(\n 'default-color' => 'ffffff',\n 'default-image' => '',\n ) ) );\n }", "protected function _content_template()\n {\n ?>\n <div>\n <ul class=\"elementor-portfolio__filters cat-filter-for-{{ settings.post_id }}\">\n <li class=\"elementor-portfolio__filter elementor-active\">{{{ settings.all_text }}}</li>\n <li class=\"elementor-portfolio__filter\">{{{ settings.taxonomy }}} 1</li>\n <li class=\"elementor-portfolio__filter\">{{{ settings.taxonomy }}} 2</li>\n </ul>\n </div>\n<?php\n }", "function pm_portfolio_shortcode( $atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t\t'number_of_portfolio'\t=> '',\n\t\t\t'class'\t=> '',\n\t), $atts));\n\n\t$result = '';\n\n\tob_start(); \n\n\t// Assigning a master css class and hooking into KC\n\t$master_class = apply_filters( 'kc-el-class', $atts );\n\t$master_class[] = 'pm_portfolio';\n\n\t// Retrieving user define classes\n\t$classes = array( 'row items' );\n\t(!empty($class)) ? $classes[] = $class : ''; ?>\n\n\t\t<div id=\"portfolio\" class=\"<?php echo esc_attr( implode( ' ', $master_class ) ); ?>\">\n\t\t\t<div class=\"<?php echo esc_attr( implode( ' ', $classes ) ); ?>\">\n\t\t\t\t<div class=\"twelve columns\">\n\t\t\t\t\t<div id=\"portfolio-wrapper\" class=\"bgrid-fourth s-bgrid-third mob-bgrid-half group\">\n\t\t\t\t\t<?php \n\t\t\t\t\t\t//start wp query..\n\t\t\t\t\t\t$args = array(\n\t\t\t\t\t\t\t'post_type'\t\t\t=> 'portfolio',\n\t\t\t\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t\t\t\t'order'\t\t\t\t=> 'DESC',\n\t\t\t\t\t\t\t'posts_per_page'\t=> $number_of_portfolio\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$data = new WP_Query( $args );\n\t\t\t\t\t\t//Check post\n\t\t\t\t\t\tif( $data->have_posts() ) :\n\t\t\t\t\t\t\t//startloop here..\n\t\t\t\t\t\t\twhile( $data->have_posts() ) : $data->the_post();\n\n\t\t\t\t\t\t\t$term_list = wp_get_post_terms( get_the_ID(), 'field' ); \n\t\t\t\t\t\t\tglobal $post;\n\t\t\t\t $image = wp_prepare_attachment_for_js( get_post_thumbnail_id( $post->ID ) );\n\t\t\t\t $image_alt = ( !empty( $image['alt'] ) ) ? 'alt=\"' . esc_attr( $image['alt'] ) . '\"' : 'alt=\"' .get_the_title() . '\"';\n\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<div class=\"bgrid item\">\n\t\t\t\t\t\t\t<div class=\"item-wrap\">\n\t\t\t\t\t\t\t\t<a href=\"<?php the_permalink(); ?>\">\n\t\t\t\t\t\t\t\t\t<img src=\"<?php esc_url( the_post_thumbnail_url('portfolio-small-thum') ); ?>\" alt=\"<?php echo esc_attr( $image_alt ); ?>\">\n\t\t\t\t\t\t\t\t\t<div class=\"overlay\"></div> \n\t\t\t\t\t\t\t\t\t<div class=\"portfolio-item-meta\">\n\t\t\t\t\t\t\t\t\t\t<h5><?php echo the_title(); ?></h5>\n\t\t\t\t\t\t\t\t\t\t<p><?php foreach ($term_list as $sterm) { echo $sterm->name.' '; } ?></p>\n\t\t\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div> <!-- /item -->\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\tendwhile;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\twp_reset_postdata();\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div> <!-- /portfolio-wrapper -->\n\t\t\t\t</div> <!-- /twelve -->\n\t\t\t</div> <!-- /row --> \n\t\t</div> <!-- /Portfolio -->\n\n\t<?php \n\t$result .= ob_get_clean();\n\treturn $result;\n\n}", "function _preview_theme_template_filter()\n {\n }", "function tcsn_theme_setup() {\n\t\n\t// Makes theme available for translation.\n\t// Translations can be added to the /languages/ directory.\n\tload_theme_textdomain( 'tcsn_theme', get_template_directory() . '/languages' );\n\t\n // Styles the visual editor to resemble the theme style,\n\tadd_editor_style('css/editor-style.css');\n\n // Adds RSS feed links to <head> for posts and comments.\n\tadd_theme_support( 'automatic-feed-links' );\n\n // Switches default core markup for search form, comment form, and comments \n\t// to output valid HTML5.\n\tadd_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );\n\n\t// This theme supports all available post formats by default.\n\tadd_theme_support( 'post-formats', array(\n\t\t'aside', 'audio', 'gallery', 'image', 'link', 'video'\n\t) );\n\n\t// Add Menu Support\n register_nav_menus( array(\n 'primary_menu' => 'Primary menu',\n 'secondary_menu' => 'Secondary Menu'\n ) );\n\n // Thumbnail support\n\tadd_theme_support( 'post-thumbnails' );\n\tadd_image_size('portfolio-thumb', 530, 370, true);\n\n}", "function ccac_2020_new_setup() {\n /* Pinegrow generated Load Text Domain Begin */\n load_theme_textdomain( 'ccac_2020', get_template_directory() . '/languages' );\n /* Pinegrow generated Load Text Domain End */\n\n // Add default posts and comments RSS feed links to head.\n add_theme_support( 'automatic-feed-links' );\n\n /*\n * Let WordPress manage the document title.\n */\n add_theme_support( 'title-tag' );\n \n /*\n * Enable support for Post Thumbnails on posts and pages.\n */\n add_theme_support( 'post-thumbnails' );\n set_post_thumbnail_size( 825, 510, true );\n\n // Add menus.\n register_nav_menus( array(\n 'primary' => __( 'Primary Menu', 'ccac_2020_new' ),\n 'social' => __( 'Social Links Menu', 'ccac_2020_new' ),\n ) );\n\n/*\n * Register custom menu locations\n */\n /* Pinegrow generated Register Menus Begin */\n\n /* Pinegrow generated Register Menus End */\n \n/*\n * Set image sizes\n */\n /* Pinegrow generated Image sizes Begin */\n\n /* Pinegrow generated Image sizes End */\n \n /*\n * Switch default core markup for search form, comment form, and comments\n * to output valid HTML5.\n */\n add_theme_support( 'html5', array(\n 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'\n ) );\n\n /*\n * Enable support for Post Formats.\n */\n add_theme_support( 'post-formats', array(\n 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'\n ) );\n\n /*\n * Enable support for Page excerpts.\n */\n add_post_type_support( 'page', 'excerpt' );\n}", "function sp_portfolio_sc( $atts ) {\n\n\t\t$atts = extract( shortcode_atts( array(\n\t\t\t'columns' => 'one-fourth',\n\t\t\t'limit' => -1,\n\t\t\t'categories' => ''\n\t\t), $atts ) );\n\n\t\tglobal $post;\n\t\t$output = '';\n\t\t$last_project = 1;\n\n\t\t$args = array('post_type' => 'portfolio',\n\t\t\t\t\t 'posts_per_page' => esc_attr( $limit ),\n\t\t\t\t\t 'order' => 'DESC',\n\t\t\t\t\t 'orderby' => 'date',\n\t\t\t\t\t 'post_status' => 'publish'\n\t\t\t\t );\n\t\t\n\t\tif( $categories ) {\n\t\t\n\t\t\t$categories = explode( ',', $categories );\n\t\t\t\n\t\t\tforeach ( $categories as $i => $category ) {\n\t\t\t\t\n\t\t\t\t$category_slugs[$i] .= get_term( $category, 'portfolio-categories' )->slug;\n\n\t\t\t}\n\t\t\t\n\t\t\t$categories = implode( ',', $category_slugs );\n\t\t\t\n\t\t\t$args = array_merge( $args, array( 'portfolio-categories' => esc_attr( $categories ) ) );\n\t\t\n\t\t}\n\t\t\t\n\t\tquery_posts( $args );\n\n\t\tif( have_posts() ) :\n\n\t\t\t$output .= '<section id=\"portfolio-items\" class=\"clearfix\">';\n\n\t\t\t$lightbox_class = null;\n\n\n\t\t\twhile ( have_posts() ) : the_post();\n\n\t\t\t\t// Remove any old data\n\t\t\t\t$data_categories = null;\n\t\t\t\t$category_names = null;\n\n\t\t\t\t$categories = get_the_terms( $post->ID, 'portfolio-categories' );\n\n\t\t\t\tif( $categories ) {\n\n\t\t\t\t\tforeach ( $categories as $category ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data_categories .= $category->slug . ' ';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$category_names .= $category->slug . ' / ';\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (($last_project % esc_attr( $limit )) == 0) \n\t\t\t\t\t$last_class = 'last';\n\n\t\t\t\t$post_thumbnail_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'portfolio-' . esc_attr( $columns ) );\n\t\t\t\t$post_thumbnail_data = sp_get_the_post_thumbnail_data( $post->ID );\n\t\t\t\t$permalink = $post_thumbnail_data['src'];\n\n\t\t\t\t$output .= '<article class=\"' . esc_attr( $columns ) . ' ' . $last_class . '\" data-categories=\"' . trim( $data_categories ) . '\">';\n\t\t\t\t\t\n\t\t\t\t\tif( $post_thumbnail_img ) {\n\t\t\t\t\t\t$output .= '<a href=\"' . $permalink . '\" title=\"' . get_the_title() . '\"' . $lightbox_class . '>';\n\t\t\t\t\t\t$output .= '<img src=\"' . $post_thumbnail_img[0] . '\" alt=\"' . $post_thumbnail_data['alt'] . '\" title=\"' . $post_thumbnail_data['title'] . '\" class=\"' . $post_thumbnail_data['class'] . '\">';\n\t\t\t\t\t\t$output .= '</a>';\n\t\t\t\t\t}\n\n\t\t\t\t$output .= '<a href=\"' . get_permalink() . '\" class=\"project-meta\">';\n\t\t\t\t$output .= '<h5 class=\"title\">' . get_the_title() . '</h5>';\n\t\t\t\t$output .= '<span class=\"categories\">' . substr( trim( $category_names ), 0, -2 ) . '</span>';\n\t\t\t\t$output .= '</a>';\n\t\t\t\t$output .= '</article><!-- end project -->';\n\t\t\t\t\n\t\t\t\t$last_project++;\n\t\t\t\t\n\t\t\tendwhile;\n\t\t\twp_reset_query();\n\t\t\t\n\t\t\t$output .= '</section><!-- end #portfolio-items -->';\n\n\t\tendif;\n\n\t\treturn $output;\n\n\t}", "protected function render()\r\n {\r\n //query variable\r\n $settings = $this->get_settings_for_display();\r\n $category = $settings['category'];\r\n $total = $settings['total'];\r\n $orderby = $settings['orderby'];\r\n $order = $settings['order'];\r\n $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;\r\n //other settings\r\n $pagination = $settings['pagination'] ? false : true;\r\n $pagination_alignment = $settings['pagination_alignment'];\r\n ?>\r\n <div class=\"Portfolio-grid-three-wrapper\">\r\n <div class=\"row\">\r\n <?php\r\n $args = array(\r\n 'post_type' => 'portfolio',\r\n 'posts_per_page' => $total,\r\n 'orderby' => $orderby,\r\n 'order' => $order,\r\n 'paged' => $paged,\r\n 'ignore_sticky_posts' => 1\r\n );\r\n if (!empty($category)) {\r\n $args['tax_query'] = array(\r\n array(\r\n 'taxonomy' => 'portfolio-cat',\r\n 'field' => 'term_id',\r\n 'terms' => $category\r\n )\r\n );\r\n }\r\n $result = new \\WP_Query($args);\r\n while ($result->have_posts()):\r\n $result->the_post();\r\n ?>\r\n <div class=\"col-lg-<?php echo esc_attr($settings['column']); ?> col-md-6\">\r\n <div class=\"hard-single-item-02 margin-bottom-30\">\r\n <?php if (has_post_thumbnail()): ?>\r\n <div class=\"thumb\">\r\n <?php\r\n the_post_thumbnail('appside_portfolio', array(\r\n 'alt' => the_title_attribute(array(\r\n 'echo' => false,\r\n )),\r\n ));\r\n ?>\r\n <?php endif; ?>\r\n <div class=\"content\">\r\n <a href=\"<?php the_permalink(); ?>\"><h4 class=\"title\"><?php the_title(); ?></h4></a>\r\n <div class=\"catagory\">\r\n <?php\r\n $all_portfolio_cat = get_the_terms(get_the_ID(), 'portfolio-cat');\r\n foreach ($all_portfolio_cat as $term) {\r\n printf('<a href=\"%1$s\">%2$s</a>', get_term_link($term, 'portfolio-cat'), esc_html($term->name));\r\n }\r\n ?>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <?php endwhile;\r\n wp_reset_query(); ?>\r\n <div class=\"col-lg-12\">\r\n <div class=\"portfolio-pagination text-<?php echo esc_attr($pagination_alignment) ?> margin-top-20\">\r\n <?php\r\n if (!$pagination) {\r\n appside_master()->post_pagination($result);\r\n }\r\n ?>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <?php\r\n }", "function quasar_call_portfolio_shortcode($atts=null){\n\t\tif(!$atts) return;\n\t\t\n\t\tif(!function_exists('rockthemes_make_swiperslider_shortcode') && $atts['use_swiper_for_thumbnails'] === 'true'){\n\t\t\t$atts['use_swiper_for_thumbnails'] = 'false';\n\t\t}\n\t\t\n\t\tif(function_exists('rockthemes_shortcode_make_portfolio')){\n\t\t\techo rockthemes_shortcode_make_portfolio($atts);\n\t\t}\n\t\t\n\t\treturn;\n\t}", "function portfolio_web_scripts() {\r\n global $portfolio_web_customizer_all_values;\r\n\r\n /*animation*/\r\n $portfolio_web_enable_animation = $portfolio_web_customizer_all_values['portfolio-web-enable-animation'];\r\n\r\n\t/*google font */\r\n\twp_enqueue_style( 'portfolio-web-googleapis', '//fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i|Work+Sans:100,200,300,400,500,600,700,800,900', array(), null );\r\n\r\n\t/*Bootstrap*/\r\n wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/library/bootstrap/css/bootstrap.min.css', array(), '3.3.6' );\r\n\twp_style_add_data( 'bootstrap', 'rtl', 'replace' );\r\n\r\n /*Font-Awesome-master*/\r\n wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/assets/library/Font-Awesome/css/font-awesome.min.css', array(), '4.5.0' );\r\n\twp_style_add_data( 'font-awesome', 'rtl', 'replace' );\r\n\r\n /*slick slider*/\r\n\twp_enqueue_style( 'slick', get_template_directory_uri() . '/assets/library/slick/slick.css', array(), '1.3.3' );\r\n wp_style_add_data( 'slick', 'rtl', 'replace' );\r\n\twp_enqueue_script('slick', get_template_directory_uri() . '/assets/library/slick/slick.min.js', array('jquery'), '1.1.2', 1);\r\n\r\n\t/*magnific-popup*/\r\n wp_enqueue_style( 'magnific-popup', get_template_directory_uri() . '/assets/library/magnific-popup/magnific-popup.css', array(), '1.1.0' );\r\n\twp_style_add_data( 'magnific-popup', 'rtl', 'replace' );\r\n\r\n /*Select2*/\r\n if( portfolio_web_is_woocommerce_active() ){\r\n wp_enqueue_style('select2');\r\n wp_enqueue_script('select2');\r\n }\r\n\r\n wp_enqueue_style( 'portfolio-web-style', get_stylesheet_uri() );\r\n\twp_style_add_data( 'portfolio-web-style', 'rtl', 'replace' );\r\n\r\n\twp_enqueue_script( 'portfolio-web-skip-link-focus-fix', get_template_directory_uri() . '/acmethemes/core/js/skip-link-focus-fix.js', array(), '20130115', true );\r\n\r\n\t/*jquery start*/\r\n /*html5*/\r\n wp_enqueue_script('html5', get_template_directory_uri() . '/assets/library/html5shiv/html5shiv.min.js', array('jquery'), '3.7.3', false);\r\n wp_script_add_data( 'html5', 'conditional', 'lt IE 9' );\r\n\r\n /*respond*/\r\n wp_enqueue_script('respond', get_template_directory_uri() . '/assets/library/respond/respond.min.js', array('jquery'), '1.1.2', false);\r\n wp_script_add_data( 'respond', 'conditional', 'lt IE 9' );\r\n\r\n /*Bootstrap*/\r\n wp_enqueue_script('bootstrap', get_template_directory_uri() . '/assets/library/bootstrap/js/bootstrap.min.js', array('jquery'), '3.3.6', 1);\r\n \r\n /*wow animation*/\r\n if( 1 != $portfolio_web_enable_animation ){\r\n wp_enqueue_script('wow', get_template_directory_uri() . '/assets/library/wow/js/wow.min.js', array('jquery'), '1.1.2', 1);\r\n }\r\n /*magnific-popup*/\r\n wp_enqueue_script('magnific-popup', get_template_directory_uri() . '/assets/library/magnific-popup/jquery.magnific-popup.min.js', array('jquery'), '1.1.0', 1);\r\n\r\n\t/*isotope*/\r\n\twp_enqueue_script('isotope', get_template_directory_uri() . '/assets/library/isotop/isotope.pkgd.js', array('jquery'), '3.0.1', 1);\r\n\r\n\twp_enqueue_script( 'masonry' );\r\n\r\n /*countup*/\r\n wp_enqueue_script('countup', get_template_directory_uri() . '/assets/library/countUp/countUp.js', array('jquery'), '1.0.0', 1);\r\n\r\n /*waypoint*/\r\n wp_enqueue_script('waypoint', get_template_directory_uri() . '/assets/library/waypoints/jquery.waypoints.min.js', array('jquery'), '1.0.0', 1);\r\n\r\n /*easypiechart*/\r\n wp_enqueue_script('easypiechart', get_template_directory_uri() . '/assets/library/jquery-easypiechart/jquery.easypiechart.js', array('jquery'), '1.0.0', 1);\r\n\r\n\t/*theme custom js*/\r\n wp_enqueue_script('portfolio-web-custom', get_template_directory_uri() . '/assets/js/portfolio-web-custom.js', array('jquery'), '1.0.5', 1);\r\n\r\n\twp_localize_script( 'portfolio-web-custom', 'portfolio_web_ajax', array(\r\n\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\r\n\t));\r\n\r\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\r\n wp_enqueue_script( 'comment-reply' );\r\n }\r\n}", "public function portfolio($catcode = null)\n\t{\n\t\t$this->sidebar_template = 'portfolio';\n\t\t$this->q = Flight::request()->query->q;\n\t\tif ( ! $this->oxuser) \n\t\t\t\t$this->content .= Flight::textile(I18n::__('mtg_login_to_see_details'));\n\t\t//$this->getOxidContent(Flight::get('language'));\n\t\t$this->getOxidContent('de', $catcode);\n\t\t$this->render();\n\t}", "function kp_theme_setup()\n{\n // register nav menu\n register_nav_menus( array(\n 'primary' => __( 'Primary Menu', 'kappe' )\n ) );\n\n // add theme support\n add_theme_support( 'post-thumbnails' );\n add_theme_support( 'post-formats', array(\n 'image',\n 'quote',\n 'aside',\n 'gallery'\n ) );\n\n add_image_size( 'portfolio-featured', 720, 560, array( 'center', 'top' ) );\n add_image_size( 'portfolio-related', 240, 182, array( 'center', 'top' ) );\n add_image_size( 'portfolio-grid', 405, 311, array( 'center', 'top' ) );\n add_image_size( 'about-featured', 720, 300, array( 'left', 'top' ) );\n add_image_size( 'certificate-thumb', 227, 180, array( 'center', 'center' ) );\n add_image_size( 'thumb-200x200', 100, 100, array( 'left', 'top' ) );\n add_image_size( 'thumb-80x80', 80, 80, array( 'left', 'top' ) );\n\n // register sidebars\n register_sidebar( array(\n 'name' => 'Common Sidebar',\n 'id' => 'common-sidebar',\n 'description' => 'Common Sidebar',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ) );\n\n register_sidebar( array(\n 'name' => 'Related Posts Area',\n 'id' => 'related-posts',\n 'description' => 'This sidebar displays related posts. Leave blank if you don\\'t need this option.',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ) );\n}", "function init_template() {\n /*aniade soporte a Image destacada en la bara superior*/\n add_theme_support('post-thumbnails');\n /* aniade soorte de : titulo en la barra superior*/\n add_theme_support('title-tag');\n /* registrar menu de navegacion en el panel admin*/\n register_nav_menus(\n array(\n 'top_menu' => 'Menu Principal'\n )\n );\n\n}", "function webimp_theme_setup() {\n\t\tload_theme_textdomain( THEME_TEXT_DOMAIN, get_template_directory() . '/languages' );\n\n\t\t// Add default posts and comments RSS feed links to head.\n\t\tadd_theme_support( 'automatic-feed-links' );\n\n\t\t/**\n\t\t * Let WordPress manage the document title.\n\t\t * By adding theme support, we declare that this theme does not use a\n\t\t * hard-coded <title> tag in the document head, and expect WordPress to\n\t\t * provide it for us.\n\t\t */\n\t\tadd_theme_support( 'title-tag' );\n\n\t\t/**\n\t\t * Enable support for Post Thumbnails on posts and pages.\n\t\t *\n\t\t * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails\n\t\t */\n\t\tadd_theme_support( 'post-thumbnails' );\n\t\tadd_image_size( 'background-cover', 1200, 500, true );\n\t\tadd_image_size( 'service-featured', 300, 200, true );\n\n\t\t// This theme uses wp_nav_menu() in two locations.\n\t\tregister_nav_menus(\n\t\t\t[\n\t\t\t\t'primary' => __( 'Primary Menu', THEME_TEXT_DOMAIN ),\n\t\t\t\t'secondary' => __( 'Secondary Menu', THEME_TEXT_DOMAIN ),\n\t\t\t]\n\t\t);\n\n\t\t/**\n\t\t * Switch default core markup for search form, comment form, and comments\n\t\t * to output valid HTML5.\n\t\t */\n\t\tadd_theme_support(\n\t\t\t'html5',\n\t\t\t[\n\t\t\t\t'search-form',\n\t\t\t\t'comment-form',\n\t\t\t\t'comment-list',\n\t\t\t\t'gallery',\n\t\t\t\t'caption',\n\t\t\t]\n\t\t);\n\n\t\t/**\n\t\t * Enable support for Post Formats.\n\t\t *\n\t\t * See: https://codex.wordpress.org/Post_Formats\n\t\t */\n\t\tadd_theme_support(\n\t\t\t'post-formats',\n\t\t\t[\n\t\t\t\t'aside',\n\t\t\t\t'image',\n\t\t\t\t'video',\n\t\t\t\t'quote',\n\t\t\t\t'link',\n\t\t\t\t'gallery',\n\t\t\t\t'status',\n\t\t\t\t'audio',\n\t\t\t\t'chat',\n\t\t\t]\n\t\t);\n\n\t\t/**\n\t\t * This theme styles the visual editor to resemble the theme style,\n\t\t * specifically font, colors, icons, and column width.\n\t\t */\n\t\tadd_editor_style(\n\t\t\t[\n\t\t\t\ttheme_fonts_url(),\n\t\t\t]\n\t\t);\n\n\t\t// hide Types' front-end display panel metabox.\n\t\tadd_filter( 'types_information_table', '__return_false' );\n\t}", "function _portfolio_carousel( $options )\n\t{\n\t\n\t\t\n\t\t$element_size = zn_get_size( $options['_sizer'] );\n\t\n\t\twp_reset_query();\n\t\tglobal $post;\n\n\t\t\n\t\t$posts_per_page = isset($options['ports_per_page']) ? $options['ports_per_page'] : '4'; // how many posts\n\n\t\t$query = array(\n\t\t\t'post_type' => 'portfolio',\n\t\t\t'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1,\n\t\t\t'posts_per_page' => $posts_per_page,\n\t\t\t'tax_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'project_category',\n\t\t\t\t\t'field' => 'id',\n\t\t\t\t\t'terms' => $options['portfolio_categories']\n\t\t\t\t)\n\t\t\t),\n\t\t\t'showposts' => $options['ports_per_page_visible']\n\t\t);\n\n\n\n\n\t\t// Start the query\n\t\tquery_posts( $query );\n\t\t$i = 1;\n\n\t\t?>\n\t\t\t\t\t\t<div class=\"span12\">\n\t\t\t\t\t\t\t<div class=\"row hg-portfolio-carousel\">\n\n\t\t\t\t\t\t\t<?php if ( have_posts() ): while ( have_posts() ): the_post(); \n\t\t\t\t\t\t\t\t// Get post meta information\n\t\t\t\t\t\t\t\t$post_meta_fields = get_post_meta($post->ID, 'zn_meta_elements', true);\n\t\t\t\t\t\t\t\t$post_meta_fields = maybe_unserialize( $post_meta_fields );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<div class=\"span6\">\n\t\t\t\t\t\t\t\t\t<div class=\"ptcontent\">\n\t\t\t\t\t\t\t\t\t\t<h3 class=\"title\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php the_permalink(); ?>\"><span class=\"name\"><?php the_title(); ?></span></a>\n\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t<div class=\"pt-cat-desc\">\n\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\tif ( preg_match('/<!--more(.*?)?-->/', $post->post_content) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tthe_content('');\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tthe_excerpt();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t</div><!-- end item desc -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"itemLinks\">\n\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\tif ( !empty ( $post_meta_fields['sp_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<span><a href=\"'.$post_meta_fields['sp_link']['url'].'\" target=\"'.$post_meta_fields['sp_link']['target'].'\" >'.__(\"Live Preview: \",THEMENAME).'<strong>'.$post_meta_fields['sp_link']['url'].'</strong></a></span>';\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"seemore\">\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php the_permalink(); ?>\" ><?php _e('See more &rarr;',THEMENAME);?></a>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div><!-- end item links -->\n\t\t\t\t\t\t\t\t\t</div><!-- end item content -->\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"span6\">\n\t\t\t\t\t\t\t\t\t<div class=\"ptcarousel\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"controls\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"prev\"><span class=\"icon-chevron-left icon-white\"></span></a>\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"next\"><span class=\"icon-chevron-right icon-white\"></span></a>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<ul class=\"ptcarousel1\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t\t\t\tif ( !empty ( $post_meta_fields['port_media'] ) && is_array( $post_meta_fields['port_media'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $post_meta_fields['port_media'] as $media ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// COMBINED\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( !empty ( $media['port_media_image_comb'] ) && !empty ( $media['port_media_video_comb'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$media['port_media_video_comb'].'\" rel=\"prettyPhoto\" data-type=\"image\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$size = zn_get_size( 'eight');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$image = vt_resize( '', $media['port_media_image_comb'] , $size['width'],$size['height'] , true );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$image['url'].'\" width=\"'.$image['width'].'\" height=\"'.$image['height'].'\" alt=\"'.get_the_title().'\" />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</a>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// IMAGE\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telseif ( !empty ( $media['port_media_image_comb'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$media['port_media_image_comb'].'\" data-type=\"image\" rel=\"prettyPhoto\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$size = zn_get_size( 'eight' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$image = vt_resize( '', $media['port_media_image_comb'] , $size['width'],$size['height'] , true );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$image['url'].'\" width=\"'.$image['width'].'\" height=\"'.$image['height'].'\" alt=\"'.get_the_title().'\" />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</a>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// VIDEO\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telseif ( !empty ( $media['port_media_video_comb'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<li>';\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$size = zn_get_size( 'eight' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo get_video_from_link( $media['port_media_video_comb'] , '' , $size['width'] , $size['height'] );\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</li>';\n\t\t\t\t\t\t\t\t\t\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\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</div><!-- end ptcarousel -->\n\t\t\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tif ( $i % $options['ports_per_page_visible'] != 0 ) {\n\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"span12\"><hr class=\"bs-docs-separator\"></div>';\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t\t?>\n\n\n\t\t\t\t\t\t\t<?php endwhile; ?>\n\t\t\t\t\t\t\t<?php endif; ?>\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</div><!-- end portfolio layout -->\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\t\techo '<div class=\"span12\" >';\n\t\t\t\t\t\t\t\t\tzn_pagination(); \n\t\t\t\t\t\t\t\t\twp_reset_query();\n\t\t\t\t\t\t\t\techo '</div>';\n\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\n\t\t<?php\n\n\t}", "function create_posttype() {\n\n register_post_type( 'portfolio',\n // CPT Options\n array(\n 'labels' => array(\n 'name' => __( 'Portfolio' ),\n 'singular_name' => __( 'Portfolio' ),\n 'menu_name' => __( 'Portfolio' )\n ),\n 'public' => true,\n 'has_archive' => true,\n 'menu_icon' => 'dashicons-format-image',\n 'rewrite' => array('slug' => 'portfolio'),\n 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions' )\n )\n );\n}", "function init_template()\n{\n // add theme support es una funcion que agrega\n // funcionalidades extrar al tema\n add_theme_support( 'post-thumbnails');\n // post Thumbnails se podrá usar una imagen destacada\n add_theme_support( 'title-tag');\n // permite añadir el titulo de la pagina\n\n // Registrar el MENU\n register_nav_menus(\n array(\n 'top_menu' => 'Menu de Principal',\n 'top_menu_secondary' => 'Menu secundario'\n )\n );\n}", "public function add_portfolio_metabox() {\n\n\t\tadd_meta_box(\n\t\t\t'portfolio-meta',\n\t\t\t__( 'Portfolio Meta', 'cpt-portfolio' ),\n\t\t\tarray( $this, 'metabox_content' ),\n\t\t\t'portfolio',\n\t\t\t'normal'\n\t\t);\n\n\t}", "function toolbox_add_portfolio_meta_box() {\n add_meta_box(\n 'toolbox_portfolio_metabox', // Unique ID (ID of Div Tag ** Note: DO NOT NAME same as field(s) below **)\n esc_html__( 'Portfolio Entry', 'lorainccc' ), // Title & Text Domain\n 'toolbox_show_portfolio_meta_box', // Callback function\n 'portfolio', // Admin Page or Post Type\n 'normal', // Context (Position)\n 'default' // Priority\n );\n}", "function kp_add_portfolio_metaboxes()\n{\n add_meta_box( 'kp_portfolio_link', 'Project URL', 'kp_portfolio_link', 'portfolio', 'side', 'high' );\n add_meta_box( 'kp_portfolio_client', 'Client', 'kp_portfolio_client', 'portfolio', 'side', 'high' );\n}", "public function index()\n {\n return view('admin.page_resources.portfolio.index');\n }", "public function create_template()\n\t{\n\t\t$shopUrl = session('myshopifyDomain');\n\t\t// dd($shopUrl);\n\t\t$accessToken = session('accessToken');\n\t\t$data = $this->shopify->setShopUrl($shopUrl)->setAccessToken($accessToken)->get('admin/themes.json');\n\t\t$objection = json_decode($data);\n // dd($data);\n\t\t$name_check = \"\";\n\t\t$theme_id;\n\t\tforeach ($data as $datas) {\n\t\t\tif ($datas->role == \"main\") {\n\t\t\t\t$theme_id = $datas->id;\n\t\t\t\t$name_check = $datas->name;\n\t\t\t}\n\t\t}\n\t\t$view = \"<style>\n\n\t\t/*\n\t ------------------------------------ WARNING ------------------------------------\n\t This file will be overwritten and should not be edited directly.\n\t In order to edit custom CSS for ecom Product Upsell you should:\n\t - Log into your Shopify Admin Panel\n\t - Go to Apps --> Installed --> Product Upsell\n\t - Go to Display Settings\n\t ------------------------------------ WARNING ------------------------------------\n\t */\n\t .ecom-modal {\n\t\tbox-sizing: border-box;\n\t\tposition: fixed;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tz-index: 99999999;\n\t\tdisplay: none; }\n\t \n\t\t.ecom-modal__window {\n\t\t box-sizing: border-box;\n\t\t padding: 30px;\n\t\t background-color: #fff;\n\t\t position: fixed;\n\t\t left: 0;\n\t\t right: 0;\n\t\t bottom: 0;\n\t\t overflow-y: auto; }\n\t \n\t\t.ecom-modal__btn-close {\n\t\t box-sizing: border-box;\n\t\t display: block;\n\t\t font-weight: 900;\n\t\t width: 40px;\n\t\t height: 40px;\n\t\t font-size: 20px;\n\t\t line-height: 40px;\n\t\t text-align: center;\n\t\t color: rgba(0,0,0,0.2);\n\t\t position: absolute;\n\t\t top: 0;\n\t\t right: 0;\n\t\t cursor: pointer; }\n\t \n\t\t .ecom-modal__btn-close:hover {\n\t\t\topacity: 0.5; }\n\t \n\t \n\t\t.ecom-modal__header {\n\t\t box-sizing: border-box;\n\t\t height: 40px;\n\t\t line-height: 40px;\n\t\t padding: 0 70px 0 30px;\n\t\t margin: -30px -30px 0px;\n\t\t overflow: hidden;\n\t\t text-overflow: ellipsis;\n\t\t white-space: nowrap; }\n\t \n\t\t.ecom-modal__content {\n\t\t box-sizing: border-box;\n\t\t padding: 30px;\n\t\t margin: -30px -30px 0; }\n\t \n\t\t .ecom-modal__header+.ecom-modal__content {\n\t\t\tmargin-top: 0; }\n\t \n\t\t .ecom-modal__content:last-child {\n\t\t\tmargin-bottom: -30px; }\n\t \n\t\t.ecom-modal__footer {\n\t\t box-sizing: border-box;\n\t\t padding: 30px;\n\t\t margin: 0px -30px -30px; }\n\t \n\t \n\t /* Showing and Hiding the Modal */\n\t body.ecom-modal--is-showing,\n\t div.ecom-modal--is-showing {\n\t\toverflow-y: hidden !important; }\n\t \n\t body.ecom-modal--is-showing .ecom-modal,\n\t div.ecom-modal--is-showing .ecom-modal {\n\t\tdisplay: block; }\n\t \n\t /* Transitions and Animations */\n\t .ecom-modal--animated {\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\t-webkit-transition: 0.3s ease;\n\t\t-moz-transition: 0.3s ease;\n\t\ttransition: 0.3s ease; }\n\t \n\t .ecom-modal--animated .ecom-modal__window {\n\t\ttop: 100vh;\n\t\t-webkit-transition: 0.3s ease;\n\t\t-moz-transition: 0.3s ease;\n\t\ttransition: 0.3s ease; }\n\t \n\t body.ecom-modal--is-showing .ecom-modal--animated,\n\t div.ecom-modal--is-showing .ecom-modal--animated {\n\t\tvisibility: visible;\n\t\topacity: 1; }\n\t \n\t @media only screen and (min-width: 499px) {\n\t\t.ecom-modal {\n\t\t background: rgba(0,0,0,0.8);\n\t\t overflow-y: auto; }\n\t \n\t\t .ecom-modal__window {\n\t\t\tposition: relative;\n\t\t\tmargin: 40px; }\n\t \n\t\t.ecom-modal--animated {\n\t\t opacity: 0; }\n\t \n\t\t .ecom-modal--animated .ecom-modal__window {\n\t\t\ttop: 200px; }\n\t }\n\t \n\t @media only screen and (min-width: 879px) {\n\t\t.ecom-modal__window {\n\t\t max-width: 800px;\n\t\t margin: 40px auto; }\n\t }\n\t \n\t /* ecom.grid.css */\n\t .ecom-grid {\n\t\tbox-sizing: border-box;\n\t\tmargin: 0px -15px; }\n\t \n\t .ecom-grid:after {\n\t\tbox-sizing: border-box;\n\t\tdisplay: table;\n\t\tcontent: '';\n\t\tclear: both; }\n\t \n\t .ecom-grid__column {\n\t\tbox-sizing: border-box;\n\t\tpadding: 15px;\n\t\tfloat: left;\n\t }\n\t \n\t .ecom-grid__column--half{\n\t\twidth: 50%;\n\t }\n\t \n\t .ecom-grid__column--third{\n\t\twidth: 33.3333%;\n\t }\n\t \n\t @media only screen and (max-width: 700px) {\n\t \n\t\t.ecom-grid__column--half,\n\t\t.ecom-grid__column--third,\n\t\t.ecom-grid__column--quarter {\n\t\t width: 100%; }\n\t \n\t\t.ecom-grid__column--third:first-child {\n\t\t width: 100%;\n\t\t}\n\t \n\t \n\t\t.flickity-slider .ecom-grid__column--half,\n\t\t.flickity-slider .ecom-grid__column--third,\n\t\t.flickity-slider .ecom-grid__column--quarter {\n\t\t width: 70%;\n\t\t}\n\t \n\t\t.flickity-slider .ecom-grid__column--third:first-child {\n\t\t width: 70%;\n\t\t}\n\t \n\t }\n\t \n\t \n\t \n\t /* ecom.grid.css */\n\t \n\t /* ecom.product.css */\n\t .ecom-product {\n\t\tbox-sizing: border-box; }\n\t \n\t .ecom-product__image-container {\n\t\tbox-sizing: border-box; }\n\t \n\t .ecom-product__image {\n\t\tbox-sizing: border-box;\n\t\tdisplay: inline-block;\n\t\tmax-width: 100%;\n\t\tmax-height: 300px;}\n\t \n\t /* BEGIN Trigger Product display styling */\n\t .ecom-upsell__triger-product-container{\n\t\tdisplay: flex;\n\t\tbox-sizing: border-box;\n\t\tmargin-bottom: 15px;\n\t }\n\t \n\t .ecom-upsell__triger-image-container{\n\t\twidth: 85px;\n\t\theight: 85px;\n\t }\n\t \n\t .ecom-upsell__triger-product-container .ecom-product__info{\n\t\twidth: calc(100% - 85px);\n\t\tdisplay: inline-block;\n\t\tmargin: 0 0 0 20px;\n\t }\n\t .ecom-upsell__triger-product-container .ecom-product__info div{\n\t\tmax-height: 20px;\n\t\tmargin-bottom: 3px;\n\t }\n\t \n\t .ecom-upsell__triger-product-container .ecom-product__info .ecom-product__quantity{\n\t\topacity: 0.7;\n\t }\n\t \n\t .ecom-upsell__triger-product-container .ecom-product__info .ecom-product__title{\n\t\tmax-height: 20px;\n\t\toverflow: hidden;\n\t\tmargin-bottom: 0px;\n\t }\n\t \n\t .ecom-upsell__triger-product-container .ecom-product__info .ecom-product__variant{\n\t\topacity: 0.7;\n\t }\n\t \n\t .ecom-upsell__triger-product-container .ecom-product__info .ecom-product__pricing{\n\t\tmargin-top: 0px;\n\t }\n\t \n\t .ecom-upsell__triger-product-container .ecom-product__info .ecom-product__price{\n\t\tfont-size: 100%;\n\t }\n\t /*---END Trigger Product display styling -----*/\n\t \n\t .ecom-product__control {\n\t\tbox-sizing: border-box; }\n\t \n\t .ecom-product__variant-selector {\n\t\tfont: inherit;\n\t\twidth: 100%; }\n\t /* ecom.product.css */\n\t \n\t /* ecom.upsell.css */\n\t .ecom-upsell {\n\t\tbox-sizing: border-box; }\n\t \n\t .ecom-upsell__intro {\n\t\tbox-sizing: border-box; }\n\t \n\t .ecom-upsell__products-list {\n\t\tbox-sizing: border-box; }\n\t \n\t .ecom-upsell__products-list .ecom-grid__column {\n\t\ttext-align: center; }\n\t \n\t .ecom-upsell__actions {\n\t\ttext-align: right; }\n\t \n\t .ecom-upsell__button {\n\t\tbox-sizing: border-box; }\n\t /* ecom.upsell.css */\n\t \n\t .ecom-grid__column--half .ecom-product .ecom-product__image,\n\t .ecom-grid__column--third .ecom-product .ecom-product__image {\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\t-webkit-transform: translate(-50%, -50%);\n\t\t-moz-transform: translate(-50%, -50%);\n\t\t-ms-transform: translate(-50%, -50%);\n\t\t-o-transform: translate(-50%, -50%);\n\t\ttransform: translate(-50%, -50%);\n\t }\n\t \n\t .ecom-grid__column--half .ecom-product .ecom-product__image-container,\n\t .ecom-grid__column--third .ecom-product .ecom-product__image-container {\n\t\tmax-height: 300px;\n\t\tmax-width: 300px;\n\t\twidth: 100%;\n\t\theight: 0;\n\t\tpadding-bottom: 100%;\n\t\tposition: relative;\n\t\tmargin: 0 auto;\n\t }\n\t \n\t /*Options Modal stuff*/\n\t #ecom-modal-second__window #ecom-modal__content .ecom-product__info {\n\t\tdisplay: inline-flex;\n\t }\n\t \n\t #ecom-modal-second__window #ecom-modal__content .ecom-product__info #option_product_info{\n\t\tpadding-left: 15px;\n\t }\n\t \n\t #ecom-modal-second__window #ecom-modal__content .ecom-product__image {\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\t-webkit-transform: translate(-50%, -50%);\n\t\t-moz-transform: translate(-50%, -50%);\n\t\t-ms-transform: translate(-50%, -50%);\n\t\t-o-transform: translate(-50%, -50%);\n\t\ttransform: translate(-50%, -50%);\n\t }\n\t \n\t #ecom-modal-second__window #ecom-modal__content .ecom-product__image {\n\t\tmax-height: 75px;\n\t\tmax-width: 75px;\n\t\tposition: relative;\n\t }\n\t \n\t #ecom-modal-second__window #ecom-modal__content #ecom_options {\n\t\ttext-align: center;\n\t }\n\t \n\t #ecom-modal-second__window #options_scroll_display{\n\t\tposition: absolute;\n\t\tpadding: 5px;\n\t\tborder-radius: 25px;\n\t\tbackground-color: #3498db;\n\t\tfont-size: 12px;\n\t\tleft: 50%;\n\t\tbottom: 20px;\n\t\tborder: 1px solid rgba(0,0,0,0.2);\n\t\tz-index: 2;\n\t\tcolor: #FFF;\n\t\ttransform: translateX(-50%);\n\t }\n\t \n\t #second_window_back_btn {\n\t\tfloat: left;\n\t\tpadding-top: 20px;\n\t }\n\t \n\t #ecom-modal-second__window .ecom-modal__footer .ecom-product__quantity-field {\n\t\twidth: 75px;\n\t }\n\t \n\t #loader {\n\t\tposition: relative;\n\t\tleft: 50%;\n\t\ttop: 50%;\n\t\tz-index: 1;\n\t\twidth: 120px;\n\t\theight: 120px;\n\t\tmargin: 25px 0 0 -75px;\n\t\tborder: 16px solid #f3f3f3;\n\t\tborder-radius: 50%;\n\t\tborder-top: 16px solid #3498db;\n\t\t-webkit-animation: spin 2s linear infinite;\n\t\tanimation: spin 2s linear infinite;\n\t }\n\t \n\t @-webkit-keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t }\n\t \n\t @keyframes spin {\n\t\t0% { transform: rotate(0deg); }\n\t\t100% { transform: rotate(360deg); }\n\t }\n\t \n\t @-webkit-keyframes animatebottom {\n\t\tfrom { bottom:-100px; opacity:0 }\n\t\tto { bottom:0px; opacity:1 }\n\t }\n\t \n\t @keyframes animatebottom {\n\t\tfrom{ bottom:-100px; opacity:0 }\n\t\tto{ bottom:0; opacity:1 }\n\t }\n\t \n\t \n\t /*Nate Styles... or whatever*/\n\t \n\t #ecom-modal-second__window .ecom-control-group__item{\n\t\tdisplay: inline-block;\n\t\twidth: initial;\n\t }\n\t \n\t #ecom-modal-second__window .ecom-product__control-label{\n\t\tfloat: left;\n\t\tmargin: 15px 10px 0 0 ;\n\t }\n\t \n\t #ecom-modal-second__window .ecom-modal__footer .ecom-product__quantity-field {\n\t\twidth: 75px;\n\t\tfloat: right;\n\t\tpadding: 18px 18px 17px;\n\t }\n\t \n\t #ecom-modal-second__window .scroll_visual::after{\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tbackground: linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(0,0,0,.4) 100%);\n\t\twidth: 100%;\n\t\theight: 60px;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\ttransition: all .4s ease-in-out;\n\t }\n\t \n\t #ecom-modal-second__window .ecom-upsell__products-list{\n\t\tposition: relative;\n\t }\n\t \n\t @media screen and (max-width: 550px){\n\t \n\t\t#ecom-modal-second__window .ecom-control-group__item{\n\t\t width: 100%;\n\t\t margin-bottom: 10px;\n\t\t}\n\t \n\t }\n\t \n\t \n\t /* =============================================================================\n\t\tResponsive Slider Styles\n\t ============================================================================= */\n\t \n\t .ecom-modal__slider{\n\t\tposition: relative;\n\t }\n\t \n\t .ecom-modal__slider:after{\n\t\tdisplay: none;\n\t\twidth: 200px;\n\t\theight: 100%;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tbackground: linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);\n\t\ttop: 0px;\n\t\tright: -15px;\n\t\topacity: 1;\n\t\tpointer-events: none;\n\t\tz-index: 10;\n\t\ttransition: opacity .4s ease-in-out;\n\t }\n\t \n\t @media screen and (max-width: 699px){\n\t\t.ecom-modal__slider:after{\n\t\t display: none;\n\t\t}\n\t }\n\t \n\t .ecom-modal__slider .flickity-prev-next-button{\n\t\tz-index: 11;\n\t\tbackground: #adadad !important;\n\t\twidth: 32px !important;\n\t\theight: 32px !important;\n\t\topacity: .85 !important;\n\t\ttransition: opacity .4s ease-in-out;\n\t\ttop: 40% !important;\n\t }\n\t \n\t .ecom-modal__slider .flickity-prev-next-button svg{\n\t\twidth: 40% !important;\n\t\tleft: 29% !important;\n\t }\n\t \n\t .ecom-modal__slider .flickity-prev-next-button svg *{\n\t\tfill: #fff !important;\n\t }\n\t \n\t .ecom-modal__slider .flickity-prev-next-button:disabled{\n\t\topacity: 0 !important;\n\t }\n\t \n\t .ecom-modal__slider .next{\n\t\tright: -5px !important;\n\t }\n\t \n\t .ecom-modal__slider .previous{\n\t\tleft: -5px !important;\n\t }\n\t \n\t .ecom-modal__slider .flickity-page-dots{\n\t\tbottom: -15px !important;\n\t }\n\t \n\t @media screen and (max-width: 499px){\n\t\t.ecom-modal__window{\n\t\t width: calc(100% - 40px);\n\t\t height: calc(100% - 40px);\n\t\t top: 20px !important;\n\t\t left: 20px;\n\t\t}\n\t }\n\t \n\t \n\t \n\t /* Options second window */\n\t \n\t #ecom-modal-second__window .ecom_option {\n\t\t display: flex;\n\t\t margin-bottom: 16px;\n\t\t text-align: left;\n\t\t padding: 0 40px;\n\t }\n\t \n\t @media screen and (max-width: 600px){\n\t\t#ecom-modal-second__window .ecom_option {\n\t\t\tpadding: 0 15px;\n\t\t}\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_title {\n\t\t flex: 1 0 35%;\n\t\t padding-right: 20px;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_element {\n\t\t flex: 1 0 65%;\n\t\t flex-wrap: wrap;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_dropdown label {\n\t\t display: flex;\n\t\t width: 100%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_element label {\n\t\t display: block;\n\t\t margin-bottom: 10px;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_element select {\n\t\t width: 100%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_product_title {\n\t\t display: none;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textbox label {\n\t\t width: 100%;\n\t\t display: flex;\n\t }\n\t \n\t \n\t \n\t #ecom-modal-second__window .ecom_option_textbox .ecom_option_element {\n\t\t display: block;\n\t\t width: 65%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textbox .ecom_option_element input {\n\t\t width: 100%;\n\t }\n\t \n\t \n\t \n\t #ecom-modal-second__window .ecom_option_radio input {\n\t\t margin-right: 8px;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_title {\n\t\t display: block;\n\t\t width: 35%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_value {\n\t\t margin-right: 0;\n\t\t display: block;\n\t\t width: 100%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_value label {\n\t\t display: flex;\n\t }\n\t \n\t #ecom-modal-second__window .with-options {\n\t\t font-size: 16px;\n\t\t padding: 0px;\n\t\t margin: 0;\n\t\t width: 100%;\n\t\t border: 0;\n\t\t overflow-x: hidden;\n\t }\n\t \n\t \n\t #second_window_back_btn {\n\t\t float: left;\n\t\t padding-top: 14px;\n\t\t}\n\t \n\t #ecom-modal-second__window .scroll_visual::after {\n\t\t background: linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(0,0,0,.14) 100%);\n\t }\n\t \n\t #ecom-modal-second__window .ecom-modal__content {\n\t\t padding: 0;\n\t }\n\t \n\t #ecom-modal-second__window .ecom-upsell__intro {\n\t\t padding: 10px 30px 10px;\n\t }\n\t \n\t #ecom-modal-second__window .ecom-upsell__intro .ecom-product__title {\n\t\t font-size: 26px;\n\t }\n\t \n\t #ecom-modal-second__window .ecom-upsell__intro .ecom-product__price {\n\t\t font-size: 16px;\n\t }\n\t \n\t #ecom-modal-second__window .ecom-upsell__actions {\n\t\t padding: 20px 30px\n\t ;\n\t }\n\t \n\t #ecom-modal-second__window .ecom-upsell__actions .ecom-upsell__button--primary {\n\t\t padding: 10px 20px\n\t ;\n\t }\n\t \n\t #ecom-modal-second__window .ecom-upsell__products-list {\n\t\t padding: 30px 0px 0;\n\t\t margin: 0;\n\t\t border-top: 1px solid rgba(0,0,0,.16);\n\t\t border-bottom: 1px solid rgba(0,0,0,.16);\n\t }\n\t \n\t #ecom-modal-second__window #ecom-modal__content .ecom-product__info {\n\t\t display: flex;\n\t\t margin: 0;\n\t }\n\t #ecom-modal-second__window .ecom_option_checkbox label{\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t }\n\t #ecom-modal-second__window .ecom_option_checkbox .ecom_option_title{\n\t \n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_checkbox .ecom_option_element {\n\t\t width: 35px;\n\t\t flex: 1 0 35px;\n\t }\n\t \n\t \n\t @media screen and (max-width: 600px){\n\t\t#ecom-modal-second__window .ecom_option_checkbox .ecom_option_title {\n\t\t\tflex: 1 0 70%;\n\t\t}\n\t \n\t\t#ecom-modal-second__window .ecom-upsell__products-list{\n\t\t padding: 10px;\n\t\t}\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_value_price::before {\n\t\t content: '+';\n\t }\n\t \n\t #ecom-modal-second__window #options_scroll_display {\n\t\t border: 0;\n\t\t padding: 5px 12px;\n\t\t box-shadow: 0px 4px 8px rgba(0,0,0,.1);\n\t\t /*animation: jiggle 3s linear infinite;*/\n\t\t bottom: 12px;\n\t }\n\t \n\t #ecom-upsell__button--primary {\n\t\t padding-top: 14px;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_swatch .ecom_option_element{\n\t\t display: flex;\n\t\t flex-wrap: wrap;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_swatch .ecom_option_value{\n\t\t display: block;\n\t\t width: 40px;\n\t\t\tmargin-right: 10px;\n\t\t\tmargin-bottom: 10px;\n\t \n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_dropdownmulti label{\n\t\t width: 100%;\n\t\t display: flex;\n\t }\n\t \n\t \n\t /* Product options: Textarea */\n\t \n\t #ecom-modal-second__window .ecom_option_textarea label {\n\t\t width: 100%;\n\t\t display: flex;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textarea .ecom_option_title {\n\t\t flex: 1 0 35%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textarea .ecom_option_element {\n\t\t flex: 1 0 65%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textarea textarea {\n\t\t width: 100%;\n\t\t max-width: 100%;\n\t }\n\t \n\t \n\t /* Product options: Textbox multi */\n\t \n\t #ecom-modal-second__window .ecom_option_textboxmulti{\n\t\tflex-wrap: wrap;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textboxmulti .ecom_option_title{\n\t\t flex: 1 0 35%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textboxmulti .ecom_option_element{\n\t\t flex: 1 0 65%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textboxmulti label{\n\t\tflex-wrap: wrap;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textboxmulti .ecom_help_text{\n\t\tflex: 1 0 100%;\n\t\tpadding-left: 35%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textboxmulti .ecom_option_value_title{\n\t\tdisplay: block;\n\t\tflex: 1 0 100%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textboxmulti .ecom_option_value_element{\n\t\tdisplay: block;\n\t\tflex: 1 0 100%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_textboxmulti .ecom_option_value_element input{\n\t\twidth: 100%;\n\t }\n\t \n\t \n\t /* Product options: Number */\n\t \n\t #ecom-modal-second__window .ecom_option_number label{\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_number input{\n\t\twidth: 100%;\n\t }\n\t \n\t \n\t /* Product options: Email */\n\t \n\t #ecom-modal-second__window .ecom_option_email label{\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_email input{\n\t\twidth: 100%;\n\t }\n\t \n\t \n\t \n\t /* Product options: Color */\n\t \n\t #ecom-modal-second__window .ecom_option_color label{\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t }\n\t \n\t \n\t /* Product options: Date */\n\t \n\t #ecom-modal-second__window .ecom_option_date label{\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_date input{\n\t\twidth: 100%;\n\t }\n\t \n\t \n\t /* Product options: Telephone */\n\t \n\t #ecom-modal-second__window .ecom_option_telephone label{\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_telephone input{\n\t\twidth: 100%;\n\t }\n\t \n\t \n\t /* ecom options file upload */\n\t \n\t #ecom-modal-second__window .ecom_option_uploadfile label{\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t }\n\t \n\t #ecom-modal-second__window .ecom_option_uploadfile input{\n\t\twidth: 100%;\n\t }\n\t \n\t @keyframes jiggle {\n\t\t0% {\n\t\t transform: translate(-50%,0);\n\t\t}\n\t\t65% {\n\t\t transform: translate(-50%,0);\n\t\t}\n\t\t70% {\n\t\t transform: translate(-50%,5px);\n\t\t}\n\t\t75% {\n\t\t transform: translate(-50%,-4px);\n\t\t}\n\t\t80% {\n\t\t transform: translate(-50%,3px);\n\t\t}\n\t\t85% {\n\t\t transform: translate(-50%,-2px);\n\t\t}\n\t\t90% {\n\t\t transform: translate(-50%,1px);\n\t\t}\n\t\t95% {\n\t\t transform: translate(-50%, 0px);\n\t\t}\n\t }\n\t \n\t /* =============================================================================\n\t\tTHIRD PARTY APPS STYLES\n\t ============================================================================= */\n\t \n\t #ecom-upsell-modal-window .yotpo{\n\t\tdisplay: inline-block;\n\t }\n\t \n\t /* =============================================================================\n\t\tMODAL STYLES\n\t ============================================================================= */\n\t .ecom-modal {\n\t\tbackground-color: rgba(0,0,0,0.8); }\n\t \n\t\t.ecom-modal__window {\n\t\t box-shadow: 0px 5px 15px rgba(0,0,0,0.2);\n\t\t border-radius: 5px; }\n\t \n\t\t.ecom-modal__header {\n\t\t font-size: 12px;\n\t\t color: rgba(0,0,0,0.4);\n\t\t text-transform: uppercase;\n\t\t border-bottom: 1px solid rgba(0,0,0,0.1); }\n\t \n\t\t.ecom-modal__footer {\n\t\t border-top: 1px solid rgba(0,0,0,0.1);\n\t\t background-color: rgba(0,0,0,0.02); }\n\t \n\t \n\t /* =============================================================================\n\t\tUPSELL STYLES\n\t ============================================================================= */\n\t .ecom-upsell {}\n\t \n\t\t.ecom-upsell__intro {\n\t\t font-size: 14px;\n\t\t line-height: 1.5; }\n\t \n\t\t.ecom-upsell__intro-heading {\n\t\t font-size: 24px; }\n\t \n\t .ecom-upsell__button--primary:link,\n\t .ecom-upsell__button--primary:visited,\n\t .ecom-upsell__button--primary:hover,\n\t .ecom-upsell__button--primary:active,\n\t .ecom-upsell__button--primary:focus {\n\t\tcolor: inherit;\n\t\ttext-decoration: none; }\n\t \n\t .ecom-upsell__button--primary {\n\t\tdisplay: inline-block;\n\t\tpadding: 15px 25px;\n\t\tborder: 1px solid rgba(0,0,0,0.3);\n\t\tbackground-color: rgba(0,0,0,0.03);\n\t\tborder-radius: 2px; }\n\t \n\t\t.ecom-upsell__button--primary:hover {\n\t\t background-color: rgba(0,0,0,0);\n\t\t border-color: rgba(0,0,0,0.2); }\n\t \n\t\t.ecom-upsell__button--primary:active {\n\t\t background-color: rgba(0,0,0,0.05);\n\t\t border-color: rgba(0,0,0,0.4); }\n\t \n\t .ecom-upsell__button--secondary {\n\t\tmargin-right: 20px;\n\t\tfont-size: 90%; }\n\t \n\t \n\t /* =============================================================================\n\t\tPRODUCT STYLES\n\t ============================================================================= */\n\t .ecom-product {\n\t\tmax-width: auto;\n\t\tfont-size: 13px;\n\t\tbackground-color: rgba(255,255,255, 0.5);\n\t\tborder: 1px solid rgba(0,0,0,0.2);\n\t\tpadding: 10px; }\n\t \n\t\t.ecom-product.ecom-grid {\n\t\t margin-left: 0;\n\t\t margin-right: 0; }\n\t \n\t\t.ecom-product__info,\n\t\t.ecom-product__variants,\n\t\t.ecom-product__actions {\n\t\t margin: 10px 0; }\n\t \n\t\t.ecom-product__pricing {\n\t\t margin: 15px 0; }\n\t \n\t\t.ecom-product__title {\n\t\t font-size: 15px;\n\t\t font-weight: ecom;\n\t\t margin-bottom: 5px; }\n\t \n\t\t.ecom-product__description {\n\t\t opacity: 0.6;\n\t\t margin-bottom: 10px; }\n\t \n\t .ecom-product__price {\n\t\tdisplay: inline;\n\t\tmargin: 0px 3px;\n\t\tfont-weight: ecom;\n\t\tfont-size: 150%; }\n\t \n\t .ecom-product__message {\n\t\topacity: 0.4; }\n\t \n\t\t.ecom-product__price--deleted {\n\t\t font-weight: normal;\n\t\t font-size: 90%;\n\t\t opacity: 0.4;\n\t\t text-decoration: line-through; }\n\t \n\t .ecom-control-group {\n\t\tbox-sizing: border-box;\n\t\tdisplay: block;\n\t\twidth: 100%; }\n\t \n\t .ecom-control-group__item {\n\t\tdisplay: block;\n\t\tvertical-align: bottom;\n\t\ttext-align: left;\n\t\twidth: 100%; }\n\t \n\t .ecom-product__control {\n\t\tpadding: 15px;\n\t\tdisplay: block;\n\t\tborder-radius: 2px;\n\t\tline-height: 1;\n\t\tcolor: inherit;\n\t\tborder: 1px solid rgba(0,0,0,0.3);\n\t\tbackground-color: rgba(0,0,0,0.03);\n\t\t-webkit-appearance: none;\n\t\t-moz-appearance: none;\n\t\tappearance: none; }\n\t \n\t .ecom-product__control-label {\n\t\tdisplay: inline-block;\n\t\tmargin-bottom: 3px; }\n\t \n\t .ecom-product__variant-selector {\n\t\tpadding-right: 36px;\n\t\tbackground-image: url('data:image/svg+xml;utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='16' viewBox='0 0 26 16'><path fill='CurrentColor' d='M8.02682426,8.99999532 L11.3523243,8.99999532 C11.7765243,8.99999532 12.0080243,9.49499532 11.7360243,9.82059532 L10.2242243,11.6301953 L8.41062426,13.8032953 C8.31564065,13.9171173 8.17504521,13.9829213 8.02679765,13.9829406 C7.87855009,13.9829599 7.73793751,13.9171926 7.64292426,13.8033953 L5.82942426,11.6315953 L4.31712426,9.82049532 C4.04532426,9.49489532 4.27682426,8.99999532 4.70102426,8.99999532 L8.02702426,8.99999532 L8.02682426,8.99999532 Z M8.02652426,6.98299532 L4.70102426,6.98299532 C4.27682426,6.98299532 4.04532426,6.48799532 4.31732426,6.16229532 L5.82902426,4.35269532 L7.64262426,2.17969532 C7.73759304,2.06586091 7.8781799,2.00003864 8.02642747,2.00000002 C8.17467503,1.9999614 8.31529617,2.06571041 8.41032426,2.17949532 L10.2238243,4.35129532 L11.7361243,6.16239532 C12.0079243,6.48799532 11.7764243,6.98289532 11.3523243,6.98289532 L8.02632426,6.98289532 L8.02652426,6.98299532 Z'/></svg>');\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: right center;\n\t\theight: auto;\n\t }\n\t \n\t\t.ecom-product__actions {\n\t\t margin-bottom: 0; }\n\t \n\t\t.ecom-product__button,\n\t\t .ecom-product__button:link,\n\t\t .ecom-product__button:visited,\n\t\t .ecom_product__button:hover,\n\t\t .ecom_product__button:active,\n\t\t .ecom_product__button:focus {\n\t\t\ttext-decoration: none;\n\t\t\tcolor: inherit; }\n\t \n\t\t .ecom-product__button:hover {\n\t\t\tbackground-color: rgba(0,0,0,0);\n\t\t\tborder-color: rgba(0,0,0,0.2); }\n\t \n\t\t .ecom-product__button:active {\n\t\t\tbackground-color: rgba(0,0,0,0.05);\n\t\t\tborder-color: rgba(0,0,0,0.4); }\n\t \n\t .ecom-product__quantity-field{\n\t\twidth: 100%;\n\t }\n\t /* custom css */\n\t #demo{\n\t\t font-size: 30px;\n\t }\n\t \n \tul.list_fonts{\n background: #fff;\n border: solid 1px #eaeaea;\n width: 340px;\n padding: 5px;\n margin: 0px;\n display: none;\n text-align: left;\n }\n\tul.list_fonts li{list-style:none;font-size:14px;cursor:pointer;}\n\t#display_fonts{\n background: #fff;\n border: solid 1px #eaeaea;\n width: 340px;\n padding: 5px;\n margin: 0px;\n cursor: pointer;\n text-align: left;\n \n }\n\t \n\t </style>\n\t<div id='ecom-upsell-modal-window'>\n\t <div id='ecom-modal' class='ecom-modal ecom-modal--' >\n\t\t <div id='ecom-modal__window' class='ecom-modal__window'>\n\t\t\t <div id='ecom-modal-first__window' style=''>\n <h4 style='text-align: center;'>We embroider exactly you entered including punctuation</h4>\n\t\t\t\t<a id='ecom-modal__btn-close' class='ecom-modal__btn ecom-modal__btn-close' aria-describedby='a11y-external-message'>x</a>\n \n\t\t\t <p id='embroidery_text_front' style='display: none;position: absolute;top: 185px;left: 204px;z-index: 9999;'>Texting 1</p>\n <p id='embroidery_text_front_second' style='display: none;position: absolute;top: 200px;left: 204px;z-index: 9999;'>Texting 1</p>\n \n \n <p id='embroidery_text_back' style='display: none;position: absolute;top: 185px;left: 204px;z-index: 9999;'>Texting 1</p>\n <p id='embroidery_text_back_second' style='display: none;position: absolute;top: 200px;left: 204px;z-index: 9999;'>Texting 1</p>\n\t\t\t\t\n <div class='ecom-modal__footer ecom-upsell__actions' style='background-color: #fff;'>\n \n <div class='col-md-6'>\n <img id='custom_image_front' style='display:none;' src='https://cdn.shopify.com/s/files/1/0067/6941/0113/products/[email protected]?v=1536049876'>\n <img id='custom_image_back' style='display:none;' src='https://cdn.shopify.com/s/files/1/0067/6941/0113/products/[email protected]?v=1536049876'>\n </div>\n <div class='col-md-6'>\n <div class='form-group'>\n <h4 class='changing_price' style='display:none;'>Rs: 15.00</h4>\n <label class='form-group'>Select Embroidery Type</label>\n <select id='personlize_select' class='form-control' style='height:50px;'>\n <option disabled selected>Personalize</option>\n <option value='front_embroidery'>Front Embroidery</option>\n <option value='back_embroidery'>Back Embroidery</option>\n <option value='front_back_embroidery'>Front & Back Embroidery</option>\n </select>\n </div>\n </div>\n <div class='col-md-6 front_embroidery' style='display:none;'>\n<!-- <h2>Front Embroidery</h2> -->\n \t\t\t <br>\n <div class='form-group'>\n <input type='text' maxlength='11' name='front_only' class='form-control' id='from_embroidery' placeholder='Enter Text for Front Embroidery (+$7.95)'>\n </div>\n <div class='form-group'>\n <input type='text' maxlength='11' name='second_front_only' class='form-control' id='from_second_embroidery' placeholder='Enter Text for Second Front Embroidery (+$4)'>\n </div>\n </div> \n\n <div class='col-md-6 back_embroidery' style='display:none;'>\n<!-- <h2>Back Embroidery</h2> -->\n \t\t\t <br>\n <div class='form-group'>\n <input type='text' maxlength='11' name='back_only' class='form-control' id='from_back_embroidery' placeholder='Enter Text for Back Embroidery (+$12.95)'>\n </div>\n <div class='form-group'>\n <input type='text' maxlength='11' name='second_back_only' class='form-control' id='from_second_back_embroidery' placeholder='Enter Text for Second Back Embroidery (+$6.00)'>\n </div>\n </div>\n \n <div class='col-md-6 front_back_embroidery' style='display:none;'>\n<!-- <h2>Front & Back Embroidery</h2> -->\n \t\t\t <br>\n <div class='form-group'>\n <input type='text' maxlength='11' name='front_both' class='form-control' id='from_front2_embroidery' placeholder='Enter Text for Front Embroidery'>\n </div>\n <div class='form-group'>\n <input type='text' maxlength='11' name='back_both' class='form-control' id='from_back2_embroidery' placeholder='Enter Text for Back Embroidery'>\n </div>\n </div>\n <div class='col-md-6' style='display:none'>\n <div class='form-group'>\n <input type='text' name='color' id='color_of_embroidery' class='form-control' placeholder='Choose Text Color'>\n </div>\n </div>\n <div class='col-md-6 show_select' style='display:none'>\n <div class='form-group'>\n <label class='form-group'>Select Font Style:</label>\n \t\t{% include 'swatch-lip' with 'Ivory, Pink, Blue, Olive, black.png' %}\n </div>\n </div>\n <div class='col-md-6 show_select' style='display:none'>\n <div class='form-group'>\n \t <ul id='display_fonts'></ul>\n <ul class='list_fonts'>\n <li style='font-family:Arial'>Arial</li>\n <li style='font-family:Verdana'>Verdana</li>\n <li style='font-family:Fearless'>Fearless</li>\n <li style='font-family:Anton'>Anton</li>\n <li style='font-family:Baloo Tammudu'>Baloo Tammudu</li>\n <li style='font-family:Dancing Script'>Dancing Script</li>\n <li style='font-family:Fjalla One'>Fjalla One</li>\n <li style='font-family:Gamja Flower'>Gamja Flower</li>\n <li style='font-family:Lato'>Lato</li>\n <li style='font-family:Lobster'>Lobster</li>\n <li style='font-family:Montserrat'>Montserrat</li>\n <li style='font-family:Mukta'>Mukta</li>\n <li style='font-family:Noto Serif+JP'>Noto Serif JP</li>\n <li style='font-family:Open Sans'>Open Sans</li>\n <li style='font-family:Oswald'>Oswald</li>\n <li style='font-family:Roboto'>Roboto</li>\n <li style='font-family:Roboto Condensed'>Roboto Condensed</li>\n <li style='font-family:Ruslan Display'>Ruslan Display</li>\n <li style='font-family:Shadows Into Light'>Shadows Into Light</li>\n <li style='font-family:Source Sans Pro'>Source Sans+Pro</li>\n </ul>\n </div>\n </div>\n <button type='button' style='display:none' class='btn btn-light Custom add_to_cart_custom_button show_select' >Add to Cart</button>\n \n\t\t\t\t</div>\n\t\t\t </div>\n\t\t\t \n\t\t </div>\n\t </div>\n\t</div>\n<script>\n $(document).ready(function(){\n \n var horizantal_pos = $('#top_pos');\n var vertical_pos = $('#left_pos');\n var size_width = $('#size_width');\n \n horizantal_pos.on('change', function(pos){\n pos = horizantal_pos.val();\n \t$('#embroidery_text_front').css('top', pos+'px');\n $('#embroidery_text_back').css('top', pos+'px');\n });\n \n vertical_pos.on('change', function(pos){\n pos = vertical_pos.val();\n \t$('#embroidery_text_front').css('left', pos+'px');\n $('#embroidery_text_back').css('left', pos+'px');\n });\n \n size_width.on('change', function(pos){\n pos = size_width.val();\n \t$('#embroidery_text_front').css('width', pos+'px');\n $('#embroidery_text_back').css('width', pos+'px');\n });\n \n $('ul.list_fonts li:first').clone().appendTo('#display_fonts');\n \n $('ul.list_fonts li').on('click',function(){\n $('#display_fonts').html('');\n $(this).clone().appendTo('#display_fonts');\n var font_family = $(this).text();\n $('#embroidery_text_front').css('font-family',font_family); \n $('#embroidery_text_back').css('font-family',font_family);\n $('#font_of_embroidery').val(font_family);\n $('ul.list_fonts').slideUp(); \n });\n \n $('#display_fonts').click(function(){\n \t$('ul.list_fonts').slideToggle();\n });\n \n $('.custom_color_awatch').click(function(){\n \tvar color = $(this).val();\n \t$('#embroidery_text_front').css('color', color);\n $('#embroidery_text_back').css('color', color);\n \n \t$('#embroidery_text_front_second').css('color', color);\n $('#embroidery_text_back_second').css('color', color);\n \n $('#color_of_embroidery').val(color);\n });\n\n \n });\n</script>\";\n\t\t$postData = [\n\t\t\t\"key\" => \"snippets/personalisation-popup.liquid\",\n\t\t\t\"value\" => $view\n\t\t];\n\t\t$themes_info = DB::Table('themesdata')->where('shopId', session('shopifyId'))->where('themeId', $theme_id)->first();\n\t\tif ($themes_info) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$data2 = $this->shopify->setShopUrl($shopUrl)->setAccessToken($accessToken)->put('/admin/themes/' . $theme_id . '/assets.json', ['asset' => $postData]);\n\t\t\t$template_name = \"snippets/personalisation-popup.liquid\";\n\t\t\t$theme_id = $data2['theme_id'];\n\t\t\t$id = DB::table('themesdata')->insertGetId(\n\t\t\t\t['key' => $template_name, 'value' => $view, 'themeId' => $theme_id, 'shopId' => session('shopifyId'), 'disable' => '1']\n\t\t\t);\n\t\t\t$this->include_template_files();\n\t\t}\n\n\n\t}", "function genesiawesome_portfolio_image() {\n\n\techo '<div class=\"profolio-project-info\">';\n\n\t$img = genesis_get_image( array(\n\t\t'format' => 'html',\n\t\t'size' => 'full',\n\t\t'context' => 'archive',\n\t\t'attr' => genesis_parse_attr( 'entry-image' ),\n\t) );\n\n\tif ( ! empty( $img ) )\n\t\tprintf( '<a href=\"%s\" title=\"%s\" class=\"project-image\">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img );\n\n\t$project_meta = array(\n\t\t'project_title' => get_post_meta( get_the_ID(), '_project_title', true ),\n\t\t'project_work' => get_post_meta( get_the_ID(), '_project_work', true ),\n\t\t'project_url' => get_post_meta( get_the_ID(), '_project_url', true ),\n\t\t'project_client' => get_post_meta( get_the_ID(), '_project_client', true ),\n\t);\n\n\textract( $project_meta );\n\n\t?>\n\t<table class=\"project-meta\">\n\t\t<?php if ( ! empty( $project_title ) ) : ?>\n\t\t<tr>\n\t\t\t<th><?php _e( 'Project Title', 'genesisawesome' );?></th>\n\t\t\t<td><?php echo esc_html( $project_title );?></td>\n\t\t</tr>\n\t\t<?php endif; ?>\n\t\t<?php if ( ! empty( $project_work ) ) : ?>\n\t\t<tr>\n\t\t\t<th><?php _e( 'Project Work', 'genesisawesome' );?></th>\n\t\t\t<td><?php echo esc_html( $project_work );?></td>\n\t\t</tr>\n\t\t<?php endif; ?>\n\t\t<?php if ( ! empty( $project_url ) ) : ?>\n\t\t<tr>\n\t\t\t<th><?php _e( 'Project URI', 'genesisawesome' );?></th>\n\t\t\t<td><a href=\"<?php echo esc_url( $project_url );?>\"><?php echo esc_html( $project_url );?></a></td>\n\t\t</tr>\n\t\t<?php endif; ?>\n\t\t<?php if ( ! empty( $project_client ) ) : ?>\n\t\t<tr>\n\t\t\t<th><?php _e( 'Project Client', 'genesisawesome' );?></th>\n\t\t\t<td><?php echo esc_html( $project_client );?></td>\n\t\t</tr>\n\t\t<?php endif; ?>\n\t</table>\n\t<?php\n\n\techo '</div>';\n}", "function kp_portfolio_post_type()\n{\n $labels = array(\n 'name' => 'Portfolio',\n 'singular_name' => 'Portfolio',\n 'add_new' => 'Add Portfolio Item',\n 'all_items' => 'All Items',\n 'add_new_item' => 'Add New Item',\n 'edit_item' => 'Edit Item',\n 'new_item' => 'New Item',\n 'view_item' => 'View Item',\n 'search_item' => 'Search Portfolio',\n 'not_found' => 'No items found',\n 'not_found_in_trash' => 'No items found in trash',\n 'parent_item_colon' => 'Parent Item'\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'has_archive' => true,\n 'publicly_queryable' => true,\n 'query_var' => true,\n 'rewrite' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'excerpt'\n ),\n 'taxonomies' => array(\n 'post_tag'\n ),\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-art',\n 'exclude_from_search' => false,\n 'register_meta_box_cb' => 'kp_add_portfolio_metaboxes'\n );\n\n register_post_type( 'portfolio', $args );\n}", "function rusticmodern_setup() {\n\n\t// This theme styles the visual editor with editor-style.css to match the theme style.\n\tadd_editor_style();\n\n\t// Post Format support. You can also use the legacy \"gallery\" or \"asides\" (note the plural) categories.\n\tadd_theme_support( 'post-formats', array( 'aside', 'gallery' ) );\n\n\t// This theme uses post thumbnails\n\tadd_theme_support( 'post-thumbnails' );\n\n\t// Add default posts and comments RSS feed links to head\n\tadd_theme_support( 'automatic-feed-links' );\n\n\t/*\n\t * Make theme available for translation.\n\t * Translations can be filed in the /languages/ directory\n\t */\n\tload_theme_textdomain( 'rusticmodern', get_template_directory() . '/languages' );\n\n\t/*\n\t * Let WordPress manage the document title.\n\t * By adding theme support, we declare that this theme does not use a\n\t * hard-coded <title> tag in the document head, and expect WordPress to\n\t * provide it for us.\n\t */\n\tadd_theme_support( 'title-tag' );\n\n\t// This theme uses wp_nav_menu() in one location.\n\tregister_nav_menus( array(\n\t\t'primary' => __( 'Primary Navigation', 'rusticmodern' ),\n\t\t'footer' => __( 'Footer Navigation', 'rusticmodern' ),\n\t) );\n\n\t// This theme allows users to set a custom background.\n\tadd_theme_support( 'custom-background', array(\n\t\t// Let WordPress know what our default background color is.\n\t\t'default-color' => 'f1f1f1',\n\t) );\n\n\n\n\n\n\tadd_image_size( 'rusticmodern-medium', 550, 550, true );\n\n}", "function mattu_portfolio_register_shortcodes() {\n\tadd_shortcode('portfolio_items', 'mattu_portfolio_items_shortcode' );\n}", "function adventure_theme_options_do_page() { ?>\r\n \r\n <div class=\"cover\">\r\n\r\n <ul id=\"spacing\"></ul>\r\n\r\n <div class=\"contain\">\r\n \r\n <div id=\"header\">\r\n\t\t\r\n\t\t\t<div class=\"themetitle\">\r\n\t\t\t\t<a href=\"http://schwarttzy.com/shop/adventureplus/\" target=\"_blank\" ><h1><?php $my_theme = wp_get_theme(); echo $my_theme->get( 'Name' ); ?></h1>\r\n\t\t\t\t<span>- v<?php $my_theme = wp_get_theme(); echo $my_theme->get( 'Version' ); ?></span></a>\r\n\t\t\t</div>\r\n \r\n \r\n\t\t\t<div class=\"upgrade\">\r\n <a href=\"http://schwarttzy.com/shop/adventureplus/\" target=\"_blank\" ><h2><?php _e('Upgrade to Adventure+', 'localize_adventure'); ?></h2></a>\r\n </div>\r\n\t\t\r\n \t</div>\r\n \r\n <ul class=\"info_bar\">\r\n\t\t\t<li><a href=\"#description\"><?php _e('Description', 'localize_adventure'); ?></a></li>\r\n\t\t\t<li><a href=\"#customizing\"><?php _e('Customizing', 'localize_adventure'); ?></a></li>\r\n\t\t\t<li><a href=\"#features\"><?php _e('Features', 'localize_adventure'); ?></a></li>\r\n\t\t\t<li><a href=\"#faq\"><?php _e('FAQ', 'localize_adventure'); ?></a></li>\r\n\t\t\t<!-- <li><a href=\"#screenshots\"><?php _e('Screen Shots', 'localize_adventure'); ?></a></li> -->\r\n\t\t\t<li><a href=\"#changelog\"><?php _e('Changelog', 'localize_adventure'); ?></a></li>\r\n\t\t\t<li><a href=\"#support\"><?php _e('Support', 'localize_adventure'); ?></a></li>\r\n\t\t</ul>\r\n \r\n <div id=\"main\">\r\n \r\n <div id=\"customizing\" class=\"information\">\r\n <h3><?php _e('Customizing', 'localize_adventure'); ?></h3>\r\n <p><?php _e('Basically all I have right now is <a href=\"https://www.youtube.com/watch?v=IU__-ipUxxc\" target=\"_blank\">this video</a> on YouTube. I know the video is for a different theme, but this will change soon. Also, I would embed the video, but regrettably people wiser than me have said that it will introduce security issues. In the future I plan to add stuff here, but for now I just need to get the theme approved.', 'localize_adventure'); ?></p>\r\n </div>\r\n \r\n <div id=\"features\" class=\"information\">\r\n <h3><?php _e('Features', 'localize_adventure'); ?></h3>\r\n <ul>\r\n <li><?php _e('100% Responsive WordPress Theme', 'localize_adventure'); ?></li>\r\n <li><?php _e('Clean and Beautiful Stylized HTML, CSS, JavaScript', 'localize_adventure'); ?></li>\r\n <li><?php _e('Change the site Title and Slogan Colors', 'localize_adventure'); ?></li>\r\n <li><?php _e('Upload Your Own Background Image', 'localize_adventure'); ?></li>\r\n <li><?php _e('Adjust the opacity of the Content from 0 to 100% in 5% intervails', 'localize_adventure'); ?></li>\r\n <li><?php _e('Adjust the opacity of the Sidebar from 0 to 100% in 5% intervails', 'localize_adventure'); ?></li>\r\n <li><?php _e('Adjust Color of the Background for Content', 'localize_adventure'); ?></li>\r\n <li><?php _e('Adjust Color of the Background for Sidebar', 'localize_adventure'); ?></li>\r\n <li><?php _e('Multiple Menu Banner Images to Choose From', 'localize_adventure'); ?></li>\r\n <li><?php _e('Control wether or not the \"Previous\" & \"Next\" shows', 'localize_adventure'); ?></li>\r\n <li><?php _e('Adjust the spacing between the top of the page and content', 'localize_adventure'); ?></li>\r\n <li><?php _e('Comments on Pages only, Posts only, Both, or Nones', 'localize_adventure'); ?></li>\r\n <li><?php _e('Featured Background Image unique to a post or page', 'localize_adventure'); ?></li>\r\n <li><?php _e(\"Choose from 100's of Google fonts for the Title and Slogan\", 'localize_adventure'); ?></li>\r\n </ul>\r\n <p><?php _e('Do not see a feature the theme needs? <a href=\"http://schwarttzy.com/contact-me/\" target=\"_blank\">Contact me</a> about it.', 'localize_adventure'); ?></p>\r\n <h3><?php _e('Adventure+ Features', 'localize_adventure'); ?></h3>\r\n <ul>\r\n <li><?php _e('Remove the border or change thickness, color, and more', 'localize_adventure'); ?></li>\r\n <li><?php _e('Put what ever text and links you want in the footer', 'localize_adventure'); ?></li>\r\n <li><?php _e('Easily remove the footer with the link to my website', 'localize_adventure'); ?></li>\r\n <li><?php _e('Favicon on Your Website', 'localize_adventure'); ?></li>\r\n <li><?php _e('Change the Hyper Link Color', 'localize_adventure'); ?></li>\r\n <li><?php _e('Change the Link Colors in the Menu', 'localize_adventure'); ?></li>\r\n <li><?php _e('Change the Font Color in the Content', 'localize_adventure'); ?></li>\r\n <li><?php _e('Upload Your Own Logo in either the Header or above Content', 'localize_adventure'); ?></li>\r\n <li><?php _e('Upload Your Own Custom Banner Image', 'localize_adventure'); ?></li>\r\n <li><?php _e('Upload your own image for the Background', 'localize_adventure'); ?></li>\r\n <li><?php _e('Basic Google Meta for Analytics & Webmaster Verification', 'localize_adventure'); ?></li>\r\n <li><?php _e('Add Text Shadow to links and non-linked text.', 'localize_adventure'); ?></li>\r\n <li><?php _e('More to come!', 'localize_adventure'); ?></li>\r\n </ul>\r\n </div>\r\n \r\n <div id=\"faq\" class=\"information\">\r\n <h3><?php _e('FAQ', 'localize_adventure'); ?></h3>\r\n <p><b><?php _e('How do I remove the \"Good Old Fashioned Hand Written code by Eric J. Schwarz\"', 'localize_adventure'); ?></b></p>\r\n <p><?php _e('According to the WordPress.org I am allowed to include one credit link, which you can read about <a href=\"http://make.wordpress.org/themes/guidelines/guidelines-license-theme-name-credit-links-up-sell-themes/\" target=\"_blank\">here</a>. I use this link to spread the word about my coding skills in the hopes I will get some jobs. Anyway, you can dig through the code and remove it by hand but if you upgrade to the lastest version it will come right back. It is not really a big deal to do it by hand each time I release an update. However if you want to support my theme and get the Adventure+ upgrade, its just a simple \"On or Off\" option in the \"Theme Customizer.\"', 'localize_adventure'); ?></p>\r\n <p><b><?php _e('More FAQs coming soon!', 'localize_adventure'); ?></b></p>\r\n </div>\r\n \r\n <!--- <div id=\"screenshots\" class=\"information\">\r\n <h3><?php _e('I will take some screen shots', 'localize_adventure'); ?></h3>\r\n </div> -->\r\n \r\n <div id=\"changelog\" class=\"information\">\r\n <h3><?php _e('The Changelog Adventure+', 'localize_adventure'); ?></h3>\r\n <table>\r\n <tbody>\r\n <tr>\r\n <th><?php _e('Version', 'localize_adventure'); ?></th>\r\n <th></th>\r\n </tr>\r\n <tr>\r\n <th>26</th>\r\n <td><?php _e('Another bug in the code fixed, sorry guys.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>25</th>\r\n <td><?php _e('Minor error in the code fixed.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>24</th>\r\n <td><?php _e('Fixed the issue with the title being worthless, unless you have an SEO plugin installed. Fixed an issue with the sidebar sliding up on mobile platforms. Also added in instagram as a social icon.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>23</th>\r\n <td><?php _e('Added the ablity to change the date format.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>22</th>\r\n <td><?php _e('Quick update to help out mobile devices with social icons in the menu. Pintrest and few other social icons coming soon too.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>21</th>\r\n <td><?php _e('Quick update to help out mobile devices with the CSS3 class background-size not working on them.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>20</th>\r\n <td><?php _e('Fixed issues with the Feature Background Image. Change the site Title and Slogan to use CSS. Options to control the size of the font for the Title and Slogan in the Theme Customizer. The website font scale depending on the size of the screen viewing the website.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>19</th>\r\n <td><?php _e('Added an option to control the rotation of the tagline in the header. Also added coded to make drop down menus to work with touch screens devices. Single tag drops the menu, select and of the drop down option or an additional tap activates that link.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>16</th>\r\n <td><?php _e('Fixed some activation errors that people were having.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <th>14</th>\r\n <td><?php _e('Changed up the code for Menu Image Header thing so that it would look better and be easier to use. Added text-shadow options so you can choose from more colors. Added options for the border for width, color, and to just remove it. You can upload your own image for the content background now. Added a Font Size adjustment that works in the content and sidebar.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>13</th>\r\n <td><?php _e('Never existed, made a mistake and double jumped the version.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>12</th>\r\n <td><?php _e('I dont rememeber... sorry.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>11</th>\r\n <td><?php _e('Minor update to fix some issues I have found.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>10</th>\r\n <td><?php _e('The theme was completely rewritten from the ground up so that the code would be easier to manage, better written, and enable faster updates.', 'localize_adventure'); ?></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <h3><?php _e('The Changelog Adventure', 'localize_adventure'); ?></h3>\r\n <table>\r\n <tbody>\r\n <tr>\r\n <th><?php _e('Version', 'localize_adventure'); ?></th>\r\n <th></th>\r\n </tr>\r\n <tr>\r\n <th>4.1</th>\r\n <td><?php _e('Added another sidebar location to the theme, Thank tek428 for this option.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.9</th>\r\n <td><?php _e('Another bug in the code fixed, unrelated to the Adenture+ bug.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.8</th>\r\n <td><?php _e('Minor error in the code fixed.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.7</th>\r\n <td><?php _e('Fixed the issue with the title being worthless, unless you have an SEO plugin installed. Fixed an issue with the sidebar sliding up on mobile platforms. Also added in instagram as a social icon.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.6</th>\r\n <td><?php _e('Same as Adventure+ Version ', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.5</th>\r\n <td><?php _e('Quick update to help out mobile devices with social icons in the menu. Pintrest and few other social icons coming soon too.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.4</th>\r\n <td><?php _e('Quick update to help out mobile devices with the CSS3 class background-size not working on them.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.3</th>\r\n <td><?php _e('Fixed issues with the Feature Background Image. Change the site Title and Slogan to use CSS. Options to control the size of the font for the Title and Slogan in the Theme Customizer. The website font scale depending on the size of the screen viewing the website.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.1</th>\r\n <td><?php _e('Added an option to control the rotation of the tagline in the header. Also added coded to make drop down menus to work with touch screens devices. Single tag drops the menu, select and of the drop down option or an additional tap activates that link.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.0</th>\r\n <td><?php _e('Updated Adventure to use the same new code that Adventure Plus has been running. The code is much cleaner and does away with a bunch of poor coding designs the theme had. The chances does away with complex loops that became to difficult do to all the customization options. Added code to fix the issue with the sidebar going to the top on mobile device.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.80</th>\r\n <td><?php _e('Updated the theme information page to a new look. Dropped code I am not allowed to have in the theme like redirecting to the Theme Infomation page upon activating the theme, google analytics code. Also fix some odd error with using the sidebar and a run on title 52+ letters in a row.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.70</th>\r\n <td><?php _e('Created one of the most demanded feature of all time, custom backgrounds. I call it \"Featured Background,\" because you can now upload or select any image to be a background unique to any page or post. Also fixed an issue with comments displaying ordered numbers.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.60</th>\r\n <td><?php _e('Added the new option to have the content on the right and the sidebar on the left.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.4</th>\r\n <td><?php _e('Added the ablitity to put soical icon and/or a search bar into the menu. Fixed the issue with the theme display \"and comments are closed.\" Added Google Analytics and Web Master Tool option because everyone should have it and more control of over the comments display too. The option to choose either display excerpts or the entire content of a post or page. You can choose to display dates on posts.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.3</th>\r\n <td><?php _e('Minor update to add few things to the theme along with fixes. The custom CSS generated from the theme customizer should only show if you have changed something in the features. Static pages now will not show the pagination or comments. Include the option to do anything you want with the comments. Added Google Fonts to the Header for the Title and Slogan.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.2</th>\r\n <td><?php _e('The update this time around was mainly for Adventure+ but in the process I added in a few more features. I included the option to have the menu lock to the top of the screen or the bottom similar to how the theme use to look. A lot of people asked for the ability to remove the “previous” & “next” links that come after content and I you guys one better. You now have the choice to remove the “previous” & “next” from just posts, just page, or both and you still can have it display the same. The slider and the content portion can now change to any color and adjust the opacity from 0% to 100% in 5% intervals. I also spent some time cleaning and organizing the customizer page, which means it is laid out a bit differently now but it works just the same. You now have the option to adjust the the amount of space fromt he top of the page to the where the content begins. I might have missed a thing or two but future updates should come much sooner with this hurdle cleared.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.1</th>\r\n <td><?php _e('This is main an update to fix issues that I and others (like you) have found and fixed for the theme. The content no longer shifts to the right after the sidebar and embed video from YouTube and Vimeo are now responsive when embedded, plus some other minor stuff. I have also introduced the ablity change the color of the content of the background of content. In the next update I will include the ablity to change the sidebar.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>1.8</th>\r\n <td><?php _e('The entire code for the WordPress theme \"Adventure\" has been completely rewritten in Version 1.8 and is a complete re-release of the theme. Not a single shred of code survived, and for good reason. The code was written over 3 years ago, before the HTML5 / CSS3 revolution, and had to be compatible with IE6 back then. Now that its three years later, I am much better at coding and coupled with the progress made with HTML standards, the theme is back. While \"Adventure\" looks for the most part the same, there is a lot more happening in the code.', 'localize_adventure'); ?></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n \r\n <div id=\"support\" class=\"information\">\r\n <h3><?php _e('Support Information', 'localize_adventure'); ?></h3>\r\n <p><?php _e('If you happen to have issues with plugins, writing posts, customizing the theme, and basically anything just shoot me an email on <a href=\"http://schwarttzy.com/contact-me/\" target=\"_blank\">this page</a> I setup for contacting me.', 'localize_adventure'); ?></p>\r\n <p><?php _e('I have a <a href=\"https://twitter.com/Schwarttzy\" target=\"_blank\">Twitter</a> account, but all I really use it for is posting information on updates to my themes. So if you looking for a new feature, you may be in luck. I am not really sure what to do with Twitter, but I know a lot of people use it.', 'localize_adventure'); ?></p>\r\n <p><?php _e('Your always welcome to use the \"<a href=\"http://wordpress.org/support/theme/adventure\" target=\"_blank\">Support</a>\" forums on WordPress.org for any questions or problems, I just do not check it as often because I do not recieve email notifications on new posts or replies.', 'localize_adventure'); ?></p>\r\n </div>\r\n \r\n <div id=\"description\" class=\"information\">\r\n <h3><?php _e('Description', 'localize_adventure'); ?></h3>\r\n <p><?php _e('If you are having trouble with using the WordPress Theme', 'localize_adventure'); $my_theme = wp_get_theme(); echo $my_theme->get( 'Name' ); _e('and need some help, <a href=\"http://schwarttzy.com/contact-me/\" target=\"_blank\">contact me</a> about it. But I recommend taking a look at <a href=\"https://www.youtube.com/watch?v=IU__-ipUxxc\" target=\"_blank\">this video</a> before sending me an email. The video is for a different theme, but it will show everything there is to customizing the theme ', 'localize_adventure'); ?>\"<?php $my_theme = wp_get_theme(); echo $my_theme->get( 'Name' )?>.\"</p>\r\n <p><?php _e('Now that I have covered contacting me and a how to video, I would like to thank you for downloading and installing this theme. I hope that you enjoy it. I also hope that I can continue to create more beautiful themes like this for years to come, but that requires your help. I have created this Theme, and others, free of charge. And while I am not looking to get rich, I really like creating these themes for you guys.', 'localize_adventure'); ?></p>\r\n <p><?php _e('So if you are interested in supporting my work, I can offer you an <a href=\"http://schwarttzy.com/shop/adventureplus/\" target=\"_blank\" >upgrade to Adventure</a>. I have already included a few more features, some of which I am not allowed include in the free version, and I also offer to write additional code to customize the theme for you. Even if the code will be unique to your website.', 'localize_adventure'); ?></p>\r\n <p><?php _e('Eric Schwarz<br><a href=\"http://schwarttzy.com/\" targe=\"_blank\">http://schwarttzy.com/</a>', 'localize_adventure'); ?></p> \r\n </div>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n <ul id=\"finishing\"></ul>\r\n\r\n \r\n </div>\r\n<?php }", "function sunrise_theme_create_page()\n {\n require_once(get_template_directory().'/inc/templates/sunrise-admin.php');\n }", "function theme_customisations_main() {\n\tnew Theme_Customisations();\n}", "function blogtemplate_theme_support(){\n add_theme_support('title-tag'); \n //add logo from customize \n add_theme_support('custom-logo');\n //add thumbnails to blog posts\n add_theme_support('post-thumbnails');\n}", "public function actionPortfolio()\n {\n $searchModel = new PostSearchPortfolio();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('portfolio/index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "function _govstrap_preprocess_node__afma_portfolio__full(&$variables) {\n\n // If there is any body summary, we added into top section before body rendered.\n if (!empty($variables['body'][0][safe_summary])){\n $variables['content'] = [\n 'body_summary' => [\n '#type' => 'container',\n '#attributes' => [\n 'class' => 'afma-portfolio-body-summary',\n ],\n 'markup' => [\n '#type' => 'markup',\n '#markup' => $variables['body'][0][safe_summary],\n ],\n ],\n ] + $variables['content'];\n }\n\n // Catch limit paragraphs organising.\n if (isset($variables['content']['field_afma_portfolio_catch_limit'])){\n\n $content_ref = &$variables['content'];\n\n if ($catch_limit_children = element_children($content_ref['field_afma_portfolio_catch_limit'])){\n\n $content_ref['portfolio_row_container'] = [\n '#type' => 'container',\n '#attributes' => [\n 'class' => [\n 'afma-portfolio-row-container',\n 'row',\n ],\n ],\n ];\n\n $cl_col_container_array = [\n '#type' => 'container',\n '#attributes' => [\n 'class' => [\n 'afma-portfolio-col-container',\n 'col-lg-6',\n ],\n ],\n ];\n\n // Put feature image in the front if any\n if ($content_ref['field_feature_image']){\n $content_ref['portfolio_row_container']['field_feature_image'] = $cl_col_container_array;\n $content_ref['portfolio_row_container']['field_feature_image']['field_feature_image'] = $content_ref['field_feature_image'];\n unset($content_ref['field_feature_image']);\n }\n\n // Now put any catch limit paragraphs into it\n foreach ($catch_limit_children as $catch_limit_child_key) {\n $catch_limit_key_name = 'field_afma_portfolio_catch_limit' . '_' . $catch_limit_child_key;\n $content_ref['portfolio_row_container'][$catch_limit_key_name] = $cl_col_container_array;\n $content_ref['portfolio_row_container'][$catch_limit_key_name][$catch_limit_key_name] = $content_ref['field_afma_portfolio_catch_limit'][$catch_limit_child_key];\n }\n\n unset($content_ref['field_afma_portfolio_catch_limit']);\n unset($content_ref);\n }\n }\n}", "function wpnewproject_setup() {\n\tadd_theme_support( 'custom-logo', array(\n\t\t'height'\t\t=> 60,\n\t\t'width'\t\t=> 270,\n\t\t'flex-height' => true,\n\t));\n\t\n\tadd_theme_support( 'post-thumbnails' );\n\n\tadd_image_size( 'event-thumb', 640, 331, array( 'center', 'center'), true); //300 pixels wide (and unlimited height)\n\t\n\tadd_theme_support( 'post-formats', array(\n\t\t'image', 'video', 'quote', 'link', 'gallery'\n\t));\n\t\n\t// This theme uses wp_nav_menu() in two locations.\n\tregister_nav_menus( array(\n\t\t'primary' => __( 'Primary Menu',\t'twentyseventeen' ),\n\t) );\n\n\tadd_theme_support( 'custom-header', apply_filters( 'twentyseventeen_custom_header_args', array(\n\t\t'width'\t\t\t\t => 1200,\n\t\t'height'\t\t\t\t => 340,\n\t\t'flex-height'\t\t\t => true,\n\t\t'wp-head-callback'\t => 'twentyseventeen_header_style',\n\t) ) );\n\t\n\t//add_image_size( 'event-thumb' 640, 331, array( 'center', 'center') ); //300 pixels wide (and unlimited height)\n}", "function genesischild_register_theme_customizer($wp_customize)\n{\n // Create custom panel.\n $wp_customize->add_panel('text_blocks', array(\n 'priority' => 500,\n 'theme_supports' => '',\n 'title' => __('Portfolio settings', 'genesischild'),\n 'description' => __('Set editable text for certain content.', 'genesischild'),\n ));\n\n // Add columns to show in portfolio archive\n // Add section.\n $wp_customize->add_section('display_options', array(\n 'title' => __('Itemps options', 'genesischild'),\n 'panel' => 'text_blocks',\n 'priority' => 10,\n ));\n $wp_customize->add_setting('display_options_columns', array(\n 'default' => __('3', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'display_options_columns_input',\n array(\n 'label' => __('Columns to show', 'genesischild'),\n 'section' => 'display_options',\n 'settings' => 'display_options_columns',\n 'type' => 'select',\n 'choices' => array(\n '1' => __('1 Column'),\n '2' => __('2 Columns'),\n '3' => __('3 Columns'),\n '4' => __('4 Columns'),\n '6' => __('6 Columns'),\n ),\n )\n ));\n $wp_customize->add_setting('display_options_text', array(\n 'default' => __('', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'display_options_text_input',\n array(\n 'label' => __('Text after columns', 'genesischild'),\n 'section' => 'display_options',\n 'settings' => 'display_options_text',\n 'type' => 'text',\n )\n ));\n\n $wp_customize->add_setting('display_options_columns_main', array(\n 'default' => __('5', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'display_options_columns_main',\n array(\n 'priority' => 1,\n 'label' => __('Items to show in main page', 'genesischild'),\n 'section' => 'display_options',\n 'settings' => 'display_options_columns_main',\n 'type' => 'number',\n )\n ));\n $wp_customize->add_setting('display_options_show_more', array(\n 'default' => __('portfolio', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'display_options_show_more',\n array(\n 'priority' => 1,\n 'label' => __('Items to show in main page', 'genesischild'),\n 'section' => 'display_options',\n 'settings' => 'display_options_show_more',\n 'type' => 'select',\n 'choices' => array(\n 'portfolio' => __('Porfolio'),\n 'lighting' => __('Lighting'),\n ))\n ));\n\n // Add Colors Text\n // Add section.\n $wp_customize->add_section('custom_theme_colors', array(\n 'title' => __('Theme colors', 'genesischild'),\n 'panel' => 'text_blocks',\n 'priority' => 10,\n ));\n /**\n * Main color\n */\n // Add setting\n $wp_customize->add_setting('custom_theme_color_main', array(\n 'default' => __('#e80000', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'custom_theme_colors',\n array(\n 'label' => __('Main color', 'genesischild'),\n 'section' => 'custom_theme_colors',\n 'settings' => 'custom_theme_color_main',\n 'type' => 'text',\n )\n ));\n /**\n * Secondary color\n */\n // Add setting\n $wp_customize->add_setting('custom_theme_color_secondary', array(\n 'default' => __('#f2f0e6', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'secondary_control',\n array(\n 'label' => __('Secondary color', 'genesischild'),\n 'section' => 'custom_theme_colors',\n 'settings' => 'custom_theme_color_secondary',\n 'type' => 'text',\n )\n ));\n /**\n * Text color\n */\n // Add setting\n $wp_customize->add_setting('custom_theme_color_text', array(\n 'default' => __('#656565', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'text_control',\n array(\n 'label' => __('Text color', 'genesischild'),\n 'section' => 'custom_theme_colors',\n 'settings' => 'custom_theme_color_text',\n 'type' => 'text',\n )\n ));\n /**\n * Main text color\n */\n // Add setting\n $wp_customize->add_setting('custom_theme_color_main_text', array(\n 'default' => __('#454545', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'main_text_control',\n array(\n 'label' => __('Main text color', 'genesischild'),\n 'section' => 'custom_theme_colors',\n 'settings' => 'custom_theme_color_main_text',\n 'type' => 'text',\n )\n ));\n /**\n * Background color\n */\n // Add setting\n $wp_customize->add_setting('custom_theme_color_background', array(\n 'default' => __('#ffffff', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'background_control',\n array(\n 'label' => __('Background color', 'genesischild'),\n 'section' => 'custom_theme_colors',\n 'settings' => 'custom_theme_color_background',\n 'type' => 'text',\n )\n ));\n\n // Add Footer Text\n // Add section.\n $wp_customize->add_section('custom_footer_text', array(\n 'title' => __('Change Footer Text', 'genesischild'),\n 'panel' => 'text_blocks',\n 'priority' => 10,\n ));\n // Add setting\n $wp_customize->add_setting('footer_text_block', array(\n 'default' => __('default text', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'custom_footer_text',\n array(\n 'label' => __('Footer Text', 'genesischild'),\n 'section' => 'custom_footer_text',\n 'settings' => 'footer_text_block',\n 'type' => 'text',\n )\n ));\n\n // Add Main page Slider\n // Add section.\n $wp_customize->add_section('custom_slider_text', array(\n 'title' => __('Slider', 'genesischild'),\n 'panel' => 'text_blocks',\n 'priority' => 10,\n ));\n // Add setting\n $wp_customize->add_setting('main_text_block', array(\n 'default' => __('', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'custom_slider_text',\n array(\n 'label' => __('MainPage slider', 'genesischild'),\n 'section' => 'custom_slider_text',\n 'settings' => 'main_text_block',\n 'type' => 'text',\n )\n ));\n\n // Add section.\n $wp_customize->add_section('google_analytics_block', array(\n 'title' => __('Google Analytics', 'genesischild'),\n 'panel' => 'text_blocks',\n 'priority' => 10,\n ));\n\n // Add Google Analytics\n // Add setting\n\n // Add SEO\n $wp_customize->add_section('seo_block', array(\n 'title' => __('SEO', 'genesischild'),\n 'panel' => 'text_blocks',\n 'priority' => 10,\n ));\n\n $wp_customize->add_setting('google_track_text', array(\n 'default' => __('', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'google_analytics_block',\n array(\n 'label' => __('Google track code', 'genesischild'),\n 'section' => 'seo_block',\n 'settings' => 'google_track_text',\n 'type' => 'text',\n )\n ));\n\n // Add setting\n $wp_customize->add_setting('seo_description_settings', array(\n 'default' => __('', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'seo_description_control',\n array(\n 'label' => __('Description', 'genesischild'),\n 'section' => 'seo_block',\n 'settings' => 'seo_description_settings',\n 'type' => 'textarea',\n )\n ));\n // // Add setting\n $wp_customize->add_setting('seo_keywords_settings', array(\n 'default' => __('', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'seo_keywords_control',\n array(\n 'label' => __('Keywords', 'genesischild'),\n 'section' => 'seo_block',\n 'settings' => 'seo_keywords_settings',\n 'type' => 'textarea',\n )\n ));\n // // Add setting\n $wp_customize->add_setting('seo_robots_settings', array(\n 'default' => __('Index, Follow', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'seo_robots_control',\n array(\n 'label' => __('Keywords', 'genesischild'),\n 'section' => 'seo_block',\n 'settings' => 'seo_robots_settings',\n 'type' => 'select',\n 'choices' => array(\n 'Index, Follow' => __('Index, Follow'),\n 'NoIndex, Follow' => __('NoIndex, Follow'),\n 'Index, NoFollow' => __('Index, NoFollow'),\n 'NoIndex, NoFollow' => __('NoIndex, NoFollow'),\n ),\n )\n ));\n\n // Add Twiiter card\n // Add setting\n $wp_customize->add_setting('twitter_cards', array(\n 'default' => __('', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'twitter_card_block',\n array(\n 'label' => __('Twitter account', 'genesischild'),\n 'section' => 'seo_block',\n 'settings' => 'twitter_cards',\n 'type' => 'text',\n )\n ));\n\n // Add Facebook card\n // Add setting\n $wp_customize->add_setting('facebook_id', array(\n 'default' => __('', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n ));\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'facebook_id_block',\n array(\n 'label' => __('Facebook app ID', 'genesischild'),\n 'section' => 'seo_block',\n 'settings' => 'facebook_id',\n 'type' => 'text',\n )\n ));\n\n // Create custom panel.\n $wp_customize->add_panel('portfolio_quotes_panel', array(\n 'priority' => 505,\n 'theme_supports' => '',\n 'title' => __('Portfolio Quotes', 'genesischild'),\n 'description' => __('Set editable text for certain content.', 'genesischild'),\n ));\n\n // Add Portfolio quote\n // Add section.\n $wp_customize->add_section('portfolio_quote_text', array(\n 'title' => __('Portfolio quote', 'genesischild'),\n 'panel' => 'portfolio_quotes_panel',\n 'priority' => 10,\n ));\n global $q_config;\n // Q translate\n $available_languages = isset($q_config) ? $q_config['enabled_languages'] : array();\n // Polylang\n if ((!isset($available_languages) || count($available_languages) == 0) && function_exists('pll_the_languages')) {\n $available_languages = array();\n\n $trp_options = get_option('trp_settings');\n foreach ($trp_options['publish-languages'] as $lng) {\n array_push($available_languages, $lng);\n }\n }\n // Default\n else if (count($available_languages) == 0) {\n $available_languages = array(get_locale());\n }\n foreach ($available_languages as $lang) {\n // Add setting\n $setting_name = 'portfolio_quote_block_' . $lang;\n $wp_customize->add_setting($setting_name, array(\n 'default' => __('', 'genesischild'),\n 'sanitize_callback' => 'sanitize_text',\n 'transport' => 'refresh',\n ));\n\n // Add control\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize,\n 'portfolio_quote_text_' . $lang,\n array(\n 'label' => __('Portfolio quotes ' . $lang, 'genesischild'),\n 'section' => 'portfolio_quote_text',\n 'settings' => $setting_name,\n 'type' => 'text',\n )\n )\n );\n }\n\n // Sanitize text\n function sanitize_text($text)\n {\n return sanitize_text_field($text);\n }\n}", "function agency3_theme_setup() {\n /*\n\t\t * Make theme available for translation.\n */\n load_theme_textdomain( 'agency3', get_template_directory() . '/languages' );\n\n // Add default posts and comments RSS feed links to head.\n\t\tadd_theme_support( 'automatic-feed-links' );\n \n // Let WordPress manage the document title.\n add_theme_support( 'title-tag' );\n\n // Add post formats support\n add_theme_support( 'post-formats', \n array(\n 'link',\n\t\t\t\t'gallery',\n\t\t\t\t'image',\n\t\t\t\t'quote',\n\t\t\t\t'video',\n )\n );\n\n /**\n * Enable support for Post Thumbnails on posts and pages.\n * \n * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/\n */\n add_theme_support( 'post-thumbnails' );\n // custom thumbnail size\n // set_post_thumbnail_size( $width:integer, $height:integer, $crop:boolean|array );\n\t\t// i.e.: set_post_thumbnail_size( 1600, 9999 );\n // custom image size\n // add_image_size( $name:string, $width:integer, $height:integer, $crop:boolean|array );\n // i.e.: add_image_size( 'post-header', 1200, 400, true );\n\n // Register navigation menus\n register_nav_menus(\n\t\t\tarray(\n\t\t\t\t'primary' => esc_html__( 'Primary menu', 'agency3' ),\n\t\t\t\t'footer' => __( 'Secondary menu', 'agency3' ),\n\t\t\t)\n\t\t);\n\n /*\n\t\t * Switch default core markup for search form, comment form, and comments\n\t\t * to output valid HTML5.\n\t\t */\n add_theme_support(\n\t\t\t'html5',\n\t\t\tarray(\n\t\t\t\t'comment-form',\n\t\t\t\t'comment-list',\n\t\t\t\t'gallery',\n\t\t\t\t'caption',\n\t\t\t\t'style',\n\t\t\t\t'script',\n\t\t\t\t'navigation-widgets',\n\t\t\t)\n\t\t);\n\n // Add support for Block Styles.\n\t\tadd_theme_support( 'wp-block-styles' );\n\n\t\t// Add support for full and wide align images.\n\t\tadd_theme_support( 'align-wide' );\n\n // Set the maximum allowed width for any content in the theme, like oEmbeds and images added to posts.\n\t $GLOBALS['content_width'] = apply_filters( 'agency3_theme_setup', 1200 );\n }", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "function add_portfolio_posttype_metabox() {\r\n add_meta_box('portfolio_metabox', 'Portfolio Data', 'portfolio_metabox', 'portfolio', 'normal');\r\n}", "public function locatedTemplate() {\r\n wp_enqueue_script(\r\n 'mvvwb-gallery',\r\n MVVWB_GALLERY_TEMPLATE_BASE . 'index.js',\r\n [],\r\n MVVWB_GALLERY_TEMPLATE_VERSION\r\n );\r\n\r\n foogallery_enqueue_style(\r\n 'mvvwb-gallery',\r\n MVVWB_GALLERY_TEMPLATE_BASE . 'style.css',\r\n [],\r\n MVVWB_GALLERY_TEMPLATE_VERSION\r\n );\r\n }", "public function testimonials()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Testimonials')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/testimonials');\n }", "function psa_theme_setup() {\n\tadd_theme_support('post-thumbnails');\n\n\t// Add custom image sizes\n\t// add_image_size( $name, $width = 0, $height = 0, $crop = false );\n\n\t// Enable support for post formats\n\tadd_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );\n\n\t// Enable support for HTML5 markup.\n\tadd_theme_support( 'html5', array('comment-list', 'search-form', 'comment-form', 'gallery', 'caption') );\n\n\t// Add default posts and comments RSS feed links to head\n\t// add_theme_support('automatic-feed-links');\n\n\t// Enable admin to set custom background images in 'appearance > background'\n\t// add_theme_support('custom-background');\n\n\t// Add WYSIWYG editor stylesheet\n\tadd_editor_style('/dist/styles/editor.css');\n\n\t// Register commonly used menus\n\tregister_nav_menus(array(\n\t\t'primary-navigation' => 'Primary Navigation',\n\t\t'secondary-navigation' => 'Secondary Navigation'\n\t));\n\n\t// Disables the admin bar\n\tadd_filter('show_admin_bar', '__return_false');\n\n\t// Cleanup Head\n\tremove_action('wp_head', 'rsd_link');\n\tremove_action('wp_head', 'wp_generator');\n\tremove_action('wp_head', 'feed_links', 2);\n\tremove_action('wp_head', 'index_rel_link');\n\tremove_action('wp_head', 'wlwmanifest_link');\n\tremove_action('wp_head', 'feed_links_extra', 3);\n\tremove_action('wp_head', 'start_post_rel_link', 10, 0);\n\tremove_action('wp_head', 'parent_post_rel_link', 10, 0);\n\tremove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);\n\tremove_action( 'wp_head', 'print_emoji_detection_script', 7 ); \n\tremove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); \n\tremove_action( 'wp_print_styles', 'print_emoji_styles' ); \n\tremove_action( 'admin_print_styles', 'print_emoji_styles' );\n\n\t// Include custom post types, custom taxonomies, and general includes\n\t$includes = array_merge(\n\t\tglob( get_theme_root() . '/' . get_template() . '/taxonomies/*.php'), // All taxonomies\n\t\tglob( get_theme_root() . '/' . get_template() . '/types/*.php'), // All custom post types\n\t\tglob( get_theme_root() . '/' . get_template() . '/includes/*.php') // All includes\n\t);\n\n\t// Ignore files starting with an underscore\n\tif( $includes ) {\n\t\tforeach( $includes as $include ) {\n\t\t\t$exploded_path = explode('/', $include );\n\t\t\t$filename = end( $exploded_path );\n\t\t\tif ( strpos( $filename, '_') !== 0 ) {\n\t\t\t\tinclude_once( $include );\n\t\t\t}\n\t\t}\n\t}\n}", "function speaker_bureau_theme_create_page() {\n require_once get_template_directory().'/inc/templates/speaker-bureau-admin.php';\n\n}", "function circle_menu_social() {\n\tget_template_part( 'template-parts/menu-social' );\n}", "public function template_path() {\r\n\t\t\treturn apply_filters( 'rv_portfolio_template_path', 'rv-portfolio/' );\r\n\t\t}", "function new_template_styles() {\n if ( is_page_template( 'services-new_tpl.php' ) || is_page_template('front-page_tpl.php') || is_page_template('neutral-page_tpl.php') || is_page_template('privacy-policy_tpl-New.php') ) {\n // CSS\n wp_enqueue_style( 'style-new', get_template_directory_uri() . '/css-new-theme/style-new.css' );\n wp_enqueue_style( 'owl-main', get_template_directory_uri() . '/css-new-theme/owl.carousel.css' );\n wp_enqueue_style( 'owl-def', get_template_directory_uri() . '/css-new-theme/owl.theme.default.css' );\n\n // JS\n wp_enqueue_script( 'owl-main-js', get_template_directory_uri() . '/js-new-theme/owl.carousel.min.js', array(), '', true );\n wp_enqueue_script( 'owl-def-js', get_template_directory_uri() . '/js-new-theme/owl-slider.js', array(), '', true );\n wp_enqueue_script('dots-front', get_template_directory_uri() . '/js-new-theme/front-page-dots.js', array(), '', true);\n wp_enqueue_script('dots-service', get_template_directory_uri() . '/js-new-theme/service-page-dots.js', array(), '', true);\n wp_enqueue_script('footer-image', get_template_directory_uri() . '/js-new-theme/random-image-footer.js', array(), '', true);\n wp_enqueue_script('accordion-menu', get_template_directory_uri() . '/js-new-theme/accordion-menu.js', array(), '', true);\n \n } else {\n wp_enqueue_style( 'style-new', get_template_directory_uri() . '/css-new-theme/style-new.css' );\n\n wp_enqueue_script('footer-image', get_template_directory_uri() . '/js-new-theme/random-image-footer.js', array(), '', true);\n wp_enqueue_script('accordion-menu', get_template_directory_uri() . '/js-new-theme/accordion-menu.js', array(), '', true);\n }\n}", "public function theme_customisations_setup() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'theme_customisations_css' ), 999 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'theme_customisations_js' ) );\n\t\tadd_filter( 'template_include', array( $this, 'theme_customisations_template' ), 11 );\n\t\tadd_filter( 'wc_get_template', array( $this, 'theme_customisations_wc_get_template' ), 11, 5 );\n\t}", "function boxes_jetpack_setup() {\n\tadd_theme_support( 'infinite-scroll', array(\n\t\t'container' => 'main',\n\t\t'footer' => 'page',\n\t) );\n}", "function vdtestim_style_preview () {\n\n\t$vdtestim_options = get_option( 'vdtestim_global_settings' );\n\t$vdtestim_style_options = get_option( 'vdtestim_style_settings' );\n\t$default_gravatar_url = $vdtestim_options['default_gravatar_url'];\n\n\t$slide_testimonials = $vdtestim_style_options['slide'];\n\t$num_testimonials = $vdtestim_style_options['num_testimonials'];\n\t\n\t?>\n\n\n\t<div id=\"testimonials\" class=\"<?php if ( $slide_testimonials === 'yes' ) echo \"slider\" ?> testimonials\">\n\n\n\n\t\t<?php\n\n\n\n\t\t\t// WP_Query arguments\n\t\t\t$args = array (\n\t\t\t\t'post_type' => 'testimonials',\n\t\t\t\t'posts_per_page' => $num_testimonials\n\t\t\t);\n\n\t\t\t// The Query\n\t\t\t$query = new WP_Query( $args );\n\n\t\t\t// The Loop\n\t\t\t$i = 0;\n\t\t\tif ( $query->have_posts() ) {\n\t\t\t\twhile ( $query->have_posts() ) {\n\t\t\t\t\t$query->the_post();\n\n\t\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"testimonial <?php if ( $slide_testimonials == 'yes' ) { echo 'slide'; } else { echo 'no-slide'; } if ($i === $num_testimonials -1 ) { echo ' last'; } ?> \">\n\n\t\t\t\t\t\t<?php\n\n\n\t\t\t\t\t\t$vdtestim_company = get_post_meta( get_the_id(), 'vdtestim_company', true );\n\t\t\t\t\t\t$vdtestim_website = get_post_meta( get_the_id(), 'vdtestim_website', true );\n\t\t\t\t\t\t$vdtestim_position = get_post_meta( get_the_id(), 'vdtestim_position', true );\n\t\t\t\t\t\t$vdtestim_email = get_post_meta( get_the_id(), 'vdtestim_email', true );\n\t\t\t\t\t\t$vdtestim_wpautop = get_post_meta( get_the_id(), 'vdtestim_testimonial', true );\n\t\t\t\t\t\t$vdtestim_text = wpautop( $vdtestim_wpautop );\n\t\t\t\t\t\t$size = 50;\n\t\t\t\t\t\t$default = plugins_url( 'vertusdl-testimonials/images/defaultavatar-green.png' );\n\t\t\t\t\t\t$grav_url = \"http://www.gravatar.com/avatar/\" . md5( strtolower( trim( $vdtestim_email ) ) ) . \"?d=\" . urlencode( $default_gravatar_url ) . \"&s=\" . $size;\n\n\t\t\t\t\t\t// To Do - Change gravatar default back to pluginurl in production!!!!!!!!\n\n\t\t\t\t\t\t?>\n\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t<blockquote><p><?php echo vdtestim_shorten_testimonial( $vdtestim_text ); ?>\n\t\t\t\t\t\t<a href=\"<?php echo get_permalink(); ?>\">Read More</a></p></blockquote>\n\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<img src=\"<?php echo $grav_url; ?>\" alt=\"\" height=\"50\" width=\"50\"/>\n\t\t\t\t\t\t\t<span class=\"testimonials-before\">by: </span><span class=\"testimonials-name\"><?php the_title(); ?></span><br />\n\t\t\t\t\t\t\t<span class=\"testimonials-before\">from: </span><a href=\"<?php echo $vdtestim_website; ?>\" target=\"_blank\" rel=\"nofollow\" title=\"Link to <?php echo $vdtestim_company;?> Website.\"><span class=\"testimonials-company\"><?php echo $vdtestim_company; ?></span></a>\n\t\t\t\t\t\t</p>\t\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<?php\n\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t} \n\t\t?>\n\n\t\t<?php if ( $slide_testimonials == 'yes' ) { ?>\n\n\t\t\t<div class=\"slider_controls\">\n\t\t <div class=\"prev testimonial_slide\" data-target=\"prev\" >&lsaquo;</div>\n\t\t <div class=\"next testimonial_slide\" data-target=\"next\" >&rsaquo;</div>\n\t\t <ul class=\"pager_list\"></ul>\n\t\t </div>\n\n\t\t<?php } ?> \n\n\t</div>\n\n\n\t<?php\n}", "public function index()\n {\n $profileId = isset(auth()->user()->profile) ? auth()->user()->profile->id : 0;\n $portfolios = Portfolio::where('profile_id', $profileId)->orderBy('created_at', 'desc')->paginate(8);\n return view('admin.portfolio.index', compact('portfolios'));\n }", "function podcast_pro_setup() {\r\n\r\n\tdefine( 'CHILD_THEME_NAME', 'podcast-pro' );\r\n\tdefine( 'CHILD_THEME_URL', 'https://store.carriedils.com/podcast-pro' );\r\n\tdefine( 'CHILD_THEME_VERSION', '1.0.0' );\r\n\r\n\t// Add HTML5 markup structure\r\n\tadd_theme_support( 'html5', array( 'caption', 'comment-form', 'comment-list', 'gallery', 'search-form' ) );\r\n\r\n\t// Add viewport meta tag for mobile browsers\r\n\tadd_theme_support( 'genesis-responsive-viewport' );\r\n\r\n\t// Add support for custom background\r\n\tadd_theme_support( 'custom-background', array( 'wp-head-callback' => '__return_false' ) );\r\n\r\n\t// Add support for three footer widget areas\r\n\tadd_theme_support( 'genesis-footer-widgets', 1 );\r\n\r\n\t// Add support for structural wraps (all default Genesis wraps unless noted)\r\n\tadd_theme_support(\r\n\t\t'genesis-structural-wraps',\r\n\t\tarray(\r\n\t\t\t'footer',\r\n\t\t\t'footer-widgets',\r\n\t\t\t'header',\r\n\t\t\t'home-optin', // Custom\r\n\t\t\t'nav',\r\n\t\t\t'site-inner',\r\n\t\t\t'site-tagline',\r\n\t\t)\r\n\t);\r\n\r\n\t// Add custom image sizes\r\n\tadd_image_size( 'thumbnail', 150, 150, true );\r\n\tadd_image_size( 'feature', 480, 360, true );\r\n\r\n\t// Unregister secondary sidebar\r\n\tunregister_sidebar( 'sidebar-alt' );\r\n\r\n\t// Unregister layouts that use secondary sidebar\r\n\tgenesis_unregister_layout( 'content-sidebar-sidebar' );\r\n\tgenesis_unregister_layout( 'sidebar-content-sidebar' );\r\n\tgenesis_unregister_layout( 'sidebar-sidebar-content' );\r\n\r\n\t// Register the default widget areas\r\n\tpodcast_pro_register_widget_areas();\r\n\r\n\t// Add Utility Bar above header\r\n\tadd_action( 'genesis_after_header', 'podcast_pro_add_bar' );\r\n\r\n\t// Add featured image above posts\r\n\tadd_filter( 'the_content', 'podcast_pro_featured_image' );\r\n\r\n\t//Remove Genesis archive pagination (Genesis pagination settings still apply)\r\n\tremove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );\r\n\r\n\t// Add WordPress archive pagination (accessibility)\r\n\tadd_action( 'genesis_after_endwhile', 'podcast_pro_post_pagination' );\r\n\r\n\t// Load skip links (accessibility)\r\n\tinclude get_stylesheet_directory() . '/includes/skip-links.php';\r\n\r\n\t// Apply search form enhancements (accessibility)\r\n\tadd_filter( 'get_search_form', 'podcast_pro_get_search_form', 25 );\r\n\r\n}", "function tvp40_theme_setup() { // todo: check docs and enable required extensions\n\n\t/* Enable custom template hierarchy. */\n\tadd_theme_support( 'hybrid-core-template-hierarchy' );\n\n\t/* The best thumbnail/image script ever. */\n\tadd_theme_support( 'get-the-image' );\n\n\t/* Pagination. */\n\tadd_theme_support( 'loop-pagination' );\n\n\t/* Nicer [gallery] shortcode implementation. */\n\tadd_theme_support( 'cleaner-gallery' );\n\n\t/* Better captions for themes to style. */\n\tadd_theme_support( 'cleaner-caption' );\n\n\t/* Automatically add feed links to <head>. */\n\tadd_theme_support( 'automatic-feed-links' );\n\n\t/* Post formats. */\n\tadd_theme_support( \n\t\t'post-formats', \n\t\tarray( 'aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video' ) \n\t);\n\n\t/* Editor styles. */\n\tadd_editor_style( tvp40_get_editor_styles() );\n\n\t/* Handle content width for embeds and images. */\n\thybrid_set_content_width( 1100 ); //todo:change to fit\n}", "function portfolio_post_type(){\n $args=array(\n 'labels'=>array(\n 'name'=>'Portfolios',\n 'singular_name'=>'Portfolio'\n ),\n 'public'=>true,\n 'has_archive'=>true,\n 'menu_icon'=>'dashicons-admin-site-alt3',\n 'supports'=>array('title','editor','thumbnail','custom-fields'),\n\n );\n register_post_type('portfolio',$args);\n}", "function vslider_theme_page() { ?>\r\n\t <div class=\"wrap\"><div id=\"icon-themes\" class=\"icon32\"><br /></div><h2>vSlider Themes Page</h2>\r\n <div id=\"themes\"></div>\r\n\t</div>\r\n<?php }", "function wp_newsportal_setup() {\n\tload_theme_textdomain( 'wp_newsportal' );\n\n\t\n\n\t/*\n\t * Let WordPress manage the document title.\n\t * By adding theme support, we declare that this theme does not use a\n\t * hard-coded <title> tag in the document head, and expect WordPress to\n\t * provide it for us.\n\t */\n\tadd_theme_support( 'title-tag' );\n\n\t/*\n\t * Enable support for Post Thumbnails on posts and pages.\n\t \n\t */\n\tadd_theme_support( 'post-thumbnails' );\n\n\tadd_image_size( 'wp_newsportal-featured-image', 2000, 1200, true );\n\n\tadd_image_size( 'wp_newsportal-thumbnail-avatar', 100, 100, true );\n\n\t\n\n\t// This theme uses wp_nav_menu() in two locations.\n\tregister_nav_menus( array(\n\t\t'top-menu' => __( 'Top Menu', 'wp_newsportal' ),\n\t\t\n\t\t'main-menu' => __( 'Main Menu', 'wp_newsportal' ),\n\t\t'footer-menu' => __( 'Footer Menu', 'wp_newsportal' ),\n\t) );\n\n\t\n\n\t/*\n\t * Enable support for Post Formats.\n\t *\n\t * See: https://codex.wordpress.org/Post_Formats\n\t */\n\tadd_theme_support( 'post-formats', array(\n\t\t'aside',\n\t\t'image',\n\t\t'video',\n\t\t'quote',\n\t\t'link',\n\t\t'gallery',\n\t\t'audio',\n\t) );\n\n\t// Add theme support for Custom Logo.\n\tadd_theme_support( 'custom-logo', array(\n\t\t'width' => 241,\n\t\t'height' => 37,\n\t\t\n\t) );\t\n\n\tadd_theme_support( 'html5', array( 'search-form' ) );\n\n\t\n}", "public function index()\n {\n $portfolio= Portfolio::orderby('created_at','desc')->paginate(5);\n\n return view('admin.pages.portfolioshow',compact('portfolio'));\n }", "function remi_theme_create_page()\n{\n require_once ( get_template_directory() . '/inc/templates/remi-admin.php' );\n}", "function avada_page_options_tab_portfolio_post( $sections ) {\n\n\t// Dependency check for whether link icon is showing.\n\t$featured_image_dependency = [\n\t\t[\n\t\t\t'field' => 'show_first_featured_image',\n\t\t\t'value' => 'yes',\n\t\t\t'comparison' => '!=',\n\t\t],\n\t];\n\tif ( 0 == Avada()->settings->get( 'portfolio_disable_first_featured_image' ) ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison\n\t\t$featured_image_dependency[] = [\n\t\t\t'field' => 'show_first_featured_image',\n\t\t\t'value' => 'default',\n\t\t\t'comparison' => '!=',\n\t\t];\n\t}\n\n\t$sections['portfolio_post'] = [\n\t\t'label' => esc_html__( 'Portfolio', 'Avada' ),\n\t\t'id' => 'portfolio_post',\n\t\t'alt_icon' => 'fusiona-insertpicture',\n\t\t'fields' => [\n\t\t\t'post_pagination' => [\n\t\t\t\t'id' => 'post_pagination',\n\t\t\t\t'label' => esc_attr__( 'Show Previous/Next Pagination', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Choose to show or hide the post navigation. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_pn_nav', '', 'showhide' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_pn_nav',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t\t'map' => 'showhide',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'yes' => esc_attr__( 'Show', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'Hide', 'Avada' ),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'portfolio_width_100' => [\n\t\t\t\t'id' => 'portfolio_width_100',\n\t\t\t\t'label' => esc_attr__( 'Use 100% Width Page', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Choose to set this post to 100&#37; browser width. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_width_100', '', 'yesno' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_width_100',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'yes' => esc_attr__( 'Yes', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'No', 'Avada' ),\n\t\t\t\t],\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t\t'map' => 'yesno',\n\t\t\t],\n\t\t\t'width' => [\n\t\t\t\t'id' => 'width',\n\t\t\t\t'label' => esc_html__( 'Width (Content Columns for Featured Image)', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Choose if the featured image is full or half width. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_featured_image_width', '', 'select' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_featured_image_width',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'full' => esc_attr__( 'Full Width', 'Avada' ),\n\t\t\t\t\t'half' => esc_attr__( 'Half Width', 'Avada' ),\n\t\t\t\t],\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t],\n\t\t\t'show_first_featured_image' => [\n\t\t\t\t'id' => 'show_first_featured_image',\n\t\t\t\t'label' => esc_html__( 'Disable First Featured Image', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Disable the 1st featured image on single post pages. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_disable_first_featured_image', '', 'reverseyesno' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_disable_first_featured_image',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'yes' => esc_attr__( 'Yes', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'No', 'Avada' ),\n\t\t\t\t],\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t\t'map' => 'reverseyesno',\n\t\t\t],\n\t\t\t'fimg' => [\n\t\t\t\t'id' => 'fimg',\n\t\t\t\t'value' => [\n\t\t\t\t\t'fimg_width' => '',\n\t\t\t\t\t'fimg_height' => '',\n\t\t\t\t],\n\t\t\t\t'label' => esc_attr__( 'Featured Image Dimensions', 'Avada' ),\n\t\t\t\t'description' => esc_html__( 'In pixels or percentage, ex: 100% or 100px. Or Use \"auto\" for automatic resizing if you added either width or height.', 'Avada' ),\n\t\t\t\t'dependency' => $featured_image_dependency,\n\t\t\t\t'type' => 'dimensions',\n\t\t\t],\n\t\t\t'video' => [\n\t\t\t\t'id' => 'video',\n\t\t\t\t'label' => esc_attr__( 'Video Embed Code', 'Avada' ),\n\t\t\t\t'description' => esc_attr__( 'Insert Youtube or Vimeo embed code.', 'Avada' ),\n\t\t\t\t'dependency' => [],\n\t\t\t\t'type' => 'textarea',\n\t\t\t],\n\t\t\t'video_url' => [\n\t\t\t\t'id' => 'video_url',\n\t\t\t\t'label' => esc_attr__( 'Youtube/Vimeo Video URL for Lightbox', 'Avada' ),\n\t\t\t\t'description' => esc_attr__( 'Insert the video URL that will show in the lightbox.', 'Avada' ),\n\t\t\t\t'dependency' => [],\n\t\t\t\t'type' => 'text',\n\t\t\t],\n\t\t\t'project_desc_title' => [\n\t\t\t\t'id' => 'project_desc_title',\n\t\t\t\t'label' => esc_html__( 'Show Project Description Title', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Choose to show or hide the project description title. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_project_desc_title', '', 'yesno' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_project_desc_title',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'yes' => esc_attr__( 'Yes', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'No', 'Avada' ),\n\t\t\t\t],\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t\t'map' => 'yesno',\n\t\t\t],\n\t\t\t'project_details' => [\n\t\t\t\t'id' => 'project_details',\n\t\t\t\t'label' => esc_html__( 'Show Project Details', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Choose to show or hide the project details text. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_project_details', '', 'yesno' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_project_details',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'yes' => esc_attr__( 'Yes', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'No', 'Avada' ),\n\t\t\t\t],\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t\t'map' => 'yesno',\n\t\t\t],\n\t\t\t'project_url' => [\n\t\t\t\t'id' => 'project_url',\n\t\t\t\t'label' => esc_attr__( 'Project URL', 'Avada' ),\n\t\t\t\t'description' => esc_attr__( 'The URL the project text links to.', 'Avada' ),\n\t\t\t\t'dependency' => [],\n\t\t\t\t'type' => 'text',\n\t\t\t],\n\t\t\t'project_url_text' => [\n\t\t\t\t'id' => 'project_url_text',\n\t\t\t\t'label' => esc_attr__( 'Project URL Text', 'Avada' ),\n\t\t\t\t'description' => esc_html__( 'The custom project text that will link.', 'Avada' ),\n\t\t\t\t'dependency' => [],\n\t\t\t\t'type' => 'text',\n\t\t\t],\n\t\t\t'copy_url' => [\n\t\t\t\t'id' => 'copy_url',\n\t\t\t\t'label' => esc_attr__( 'Copyright URL', 'Avada' ),\n\t\t\t\t'description' => esc_html__( 'The URL the copyright text links to.', 'Avada' ),\n\t\t\t\t'dependency' => [],\n\t\t\t\t'type' => 'text',\n\t\t\t],\n\t\t\t'copy_url_text' => [\n\t\t\t\t'id' => 'copy_url_text',\n\t\t\t\t'label' => esc_attr__( 'Copyright URL Text', 'Avada' ),\n\t\t\t\t'description' => esc_html__( 'The custom copyright text that will link.', 'Avada' ),\n\t\t\t\t'dependency' => [],\n\t\t\t\t'type' => 'text',\n\t\t\t],\n\t\t\t'image_rollover_icons' => [\n\t\t\t\t'id' => 'image_rollover_icons',\n\t\t\t\t'label' => esc_attr__( 'Image Rollover Icons', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Choose which icons display on this post. %s', 'Avada' ), Avada()->settings->get_default_description( 'link_image_rollover', '', 'rollover' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'link_image_rollover',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'type' => 'select',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'linkzoom' => esc_html__( 'Link + Zoom', 'Avada' ),\n\t\t\t\t\t'link' => esc_attr__( 'Link', 'Avada' ),\n\t\t\t\t\t'zoom' => esc_attr__( 'Zoom', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'No Icons', 'Avada' ),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'link_icon_url' => [\n\t\t\t\t'id' => 'link_icon_url',\n\t\t\t\t'label' => esc_attr__( 'Custom Link URL On Archives', 'Avada' ),\n\t\t\t\t'description' => esc_attr__( 'Link URL that will be used on archives either for the rollover link icon or on the image if rollover icons are disabled. Leave blank for post URL.', 'Avada' ),\n\t\t\t\t'type' => 'text',\n\t\t\t],\n\t\t\t'link_icon_target' => [\n\t\t\t\t'id' => 'link_icon_target',\n\t\t\t\t'label' => esc_attr__( 'Open Portfolio Links In New Window', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Choose to open the single post page, project url and copyright url links in a new window. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_link_icon_target', '', 'yesno' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_link_icon_target',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t\t'map' => 'yesno',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'yes' => esc_attr__( 'Yes', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'No', 'Avada' ),\n\t\t\t\t],\n\t\t\t\t// Don't change anything since it's not relavant in builder mode.\n\t\t\t\t'transport' => 'postMessage',\n\t\t\t],\n\t\t\t'portfolio_author' => [\n\t\t\t\t'id' => 'portfolio_author',\n\t\t\t\t'label' => esc_attr__( 'Show Author', 'Avada' ),\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t\t'map' => 'showhide',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'yes' => esc_attr__( 'Show', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'Hide', 'Avada' ),\n\t\t\t\t],\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_author',\n\t\t\t\t],\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Choose to show or hide the author in the Project Details. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_author', '', 'showhide' ) ),\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t],\n\t\t\t'share_box' => [\n\t\t\t\t'id' => 'share_box',\n\t\t\t\t'label' => esc_attr__( 'Show Social Share Box', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Choose to show or hide the social share box. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_social_sharing_box', '', 'showhide' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_social_sharing_box',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t\t'map' => 'showhide',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'yes' => esc_attr__( 'Show', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'Hide', 'Avada' ),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'related_posts' => [\n\t\t\t\t'id' => 'related_posts',\n\t\t\t\t'label' => esc_attr__( 'Show Related Projects', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_html__( 'Choose to show or hide related projects on this post. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_related_posts', '', 'showhide' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_related_posts',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t\t'map' => 'showhide',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'yes' => esc_attr__( 'Show', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'Hide', 'Avada' ),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'portfolio_comments' => [\n\t\t\t\t'id' => 'portfolio_comments',\n\t\t\t\t'label' => esc_attr__( 'Show Comments', 'Avada' ),\n\t\t\t\t/* translators: Additional description (defaults). */\n\t\t\t\t'description' => sprintf( esc_attr__( 'Choose to show or hide comments area. %s', 'Avada' ), Avada()->settings->get_default_description( 'portfolio_comments', '', 'showhide' ) ),\n\t\t\t\t'to_default' => [\n\t\t\t\t\t'id' => 'portfolio_comments',\n\t\t\t\t],\n\t\t\t\t'dependency' => [],\n\t\t\t\t'default' => 'default',\n\t\t\t\t'type' => 'radio-buttonset',\n\t\t\t\t'map' => 'showhide',\n\t\t\t\t'choices' => [\n\t\t\t\t\t'default' => esc_attr__( 'Default', 'Avada' ),\n\t\t\t\t\t'yes' => esc_attr__( 'Show', 'Avada' ),\n\t\t\t\t\t'no' => esc_attr__( 'Hide', 'Avada' ),\n\t\t\t\t],\n\t\t\t],\n\t\t],\n\t];\n\n\treturn $sections;\n}", "function pea_portfolio_customize_preview_js() {\n\twp_enqueue_script( 'pea_portfolio_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );\n}", "function insta_f_create_menu(){\n\tadd_options_page('Instagram Portfolio Settings', 'Instagram Portfolio', 'manage_options', INSTA_FOLIO_SETTINGS_PAGE, 'insta_f_settings_page');\t\n}", "function nirvana_frontpage_generator() {\n\t$nirvanas = nirvana_get_theme_options();\n\textract($nirvanas); ?>\n\t<div id=\"frontpage\">\n\t\t<?php\n\t\t// Slider\n\t\tif ($nirvana_slideType==\"Slider Shortcode\") { ?>\n\t\t\t<div class=\"slider-wrapper\">\n\t\t\t<?php echo do_shortcode( $nirvana_slideShortcode ); ?>\n\t\t\t</div> \n <?php if( is_active_sidebar( 'below-slider' ) ) : ?>\n <div class=\"slider-mobile-text\">\n <?php dynamic_sidebar( 'below-slider' ); ?>\n </div>\n <?php endif; ?>\n <?php\n\t\t} else {\n\t\t\tnirvana_ppslider();\n\t\t} ?>\n\n\t\t<div id=\"pp-afterslider\" class=\"entry-content\">\n\t\t<?php\n\t\t// First FrontPage Title\n\t\tnirvana_pptext_output( $nirvana_fronttext1, $nirvana_fronttext3, 'pp-texttop', 1, 3 );\n\n\t\t// FrontPage Columns\n\t\tnirvana_ppcolumns();\n\n\t\t// Second FrontPage title\n\t\tnirvana_pptext_output( $nirvana_fronttext2, $nirvana_fronttext4, 'pp-textmiddle', 2, 4 );\n\n\t\t// restore excerpt filters\n\t\tif ($nirvanas['nirvana_excerpttype']=='Characters') {\n\t\t\tadd_filter( 'get_the_excerpt', 'nirvana_excerpt_trim_chars' );\n\t\t} else {\n\t\t\tadd_filter( 'excerpt_length', 'nirvana_excerpt_trim_words' );\n\t\t\tadd_filter( 'get_the_excerpt', 'nirvana_excerpt_morelink', 20 );\n\t\t}\n\t\tif ($nirvana_frontposts==\"Enable\"): get_template_part('content/content', 'frontpage'); endif;\n\n\t\t// Third FrontPage Title/Text\n\t\tnirvana_pptext_output( $nirvana_fronttext5, $nirvana_fronttext6, 'pp-textbottom', 5, 6 );\n\t\t?>\n\n\t\t</div> <!-- #pp-afterslider -->\n\t</div> <!-- #frontpage -->\n\t<?php\n}", "function roots_setup() {\n\n // Make theme available for translation\n load_theme_textdomain('roots', get_template_directory() . '/lang');\n\n // Register wp_nav_menu() menus (http://codex.wordpress.org/Function_Reference/register_nav_menus)\n register_nav_menus(array(\n 'top_navigation' => __('Top Navigation', 'cpo'),\n 'front_buttons' => __('Front Buttons', 'cpo'),\n 'sioc_projects' => __('SIOC Navigation', 'cpo'),\n 'src_projects' => __('SRC Navigation', 'cpo'),\n 'fitted' => __('[FITTED] Navigation', 'cpo'),\n 'cposa_education_projects' => __('CPOSA Education Navigation', 'cpo'),\n 'cposa_health_projects' => __('CPOSA Health Navigation', 'cpo'),\n 'cposa_justice_projects' => __('CPOSA Social Justice Navigation', 'cpo'),\n 'srec_projects' => __('SREC Navigation', 'cpo'),\n 'cpo_nav' => __('Inner page navigation', 'cpo'),\n ));\n\n // Add post thumbnails (http://codex.wordpress.org/Post_Thumbnails)\n add_theme_support('post-thumbnails');\n // set_post_thumbnail_size(150, 150, false);\n add_image_size('project-pic', 870, 9999); // 300px wide (and unlimited height)\n add_image_size('slider', 450, 350, true); // 300px wide (and unlimited height)\n\n\n // Add post formats (http://codex.wordpress.org/Post_Formats)\n // add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));\n\n // Tell the TinyMCE editor to use a custom stylesheet\n add_editor_style('css/editor-style.css');\n\n}", "function lightseek_template_wrapper_start(){\n ?>\n <div id=\"primary\" class=\"content-area\">\n <main id=\"main\" class=\"site-main\" role=\"main\">\n <div class=\"container\">\n <?php\n}", "public function setup_theme()\n {\n }", "function daily_cooking_custom_setup() {\n //Translations can be filed in the /languages/ folder.\n load_theme_textdomain('daily-cooking-custom',\n get_template_directory().'/languages');\n //Adds RSS feed links to <head> for posts and comments.\n add_theme_support('automatic-feed-links');\n //Let WordPress manage the document title.\n /* By adding theme support, we declare that this theme does not\n use a hard-coded <title> tag in the document head, and expect\n WordPress to provide it for us. */\n add_theme_support('title-tag');\n //This theme uses wp_nav_menu() in one location.\n register_nav_menus(array(\n 'primary' => __('Primary Menu', 'daily-cooking-custom'),\n ));\n //Switch default core markup for search form, comment form, and\n //comments to output valid HTML5.\n add_theme_support('html5', array(\n 'search-form', 'comment-form', 'comment-list',\n 'gallery', 'caption',\n ));\n //Enable support for Post Formats.\n add_theme_support('post-formats', array(\n 'aside', 'image', 'video', 'quote', 'link',\n ));\n //Set up the WordPress core custom background feature.\n add_theme_support('custom-background', apply_filters(\n 'daily_cooking_custom_custom_background_args', array(\n 'default-color' => 'ffffff',\n 'default-image' => '',\n )));\n }", "function figjam_framework_add_theme_support() {\n add_theme_support( 'post-thumbnails' );\n\n add_theme_support('custom-logo');\n\n //add_theme_support( \"custom-header\" );\n\n /**\n * Image Sizes used in the theme\n */\n add_image_size( 'figjam-admin-list-thumb', 60, 60, true );\n\n /**\n * Add Custom Background Support and Set Default\n */\n //add_theme_support( 'custom-background', array( 'default-color' => '#F8F8F8' ) );\n \n /**\n * Add feed link support\n */\n add_theme_support( 'automatic-feed-links' );\n\n /**\n * Add html5 support\n */\n add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ) );\n\n //add_theme_support('post-formats', array('image', 'video', 'audio'));\n\n //add_theme_support('woocommerce');\n\n /**\n * Load Translation Files\n */\n load_theme_textdomain('figjam', trailingslashit(get_template_directory()) . 'languages');\n\n add_theme_support( 'title-tag' );\n\n }", "function artism_theme_setup() {\n\n /* post thumbnails */\n add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );\n\n /* HTML5 */\n add_theme_support( 'html5' );\n\n /* Register the artwork custom post type */\n include( get_stylesheet_directory() . '/artism-functions/artism-cpt.php' );\n\n /* Setup the admin for individual Artwork postings */\n include( get_stylesheet_directory() . '/artism-functions/artism-admin.php' );\n\n /* Setup the image uploaders for Artowrk postings */\n include( get_stylesheet_directory() . '/artism-functions/artism-images.php' );\n\n /* Register Artwork postings fields with the API */\n include( get_stylesheet_directory() . '/artism-functions/artism-api-fields.php' );\n\n /* Enqueue scripts for Artwork Admin */\n include( get_stylesheet_directory() . '/artism-functions/artism-admin-scripts.php' );\n\n /* Remove CPT from URL structure */\n include( get_stylesheet_directory() . '/artism-functions/artism-remove-slug.php' );\n\n}", "function x_remove_portfolio_cpt() { \n remove_action( 'init', 'x_portfolio_init'); \n}", "public function action_init() {\n\t\t\t$portfolio_args = array(\n\t \t'label' => __('Portfolio'),\n\t \t'singular_label' => __('Portfolio'),\n\t \t'public' => true,\n\t \t'show_ui' => true,\n\t \t'capability_type' => 'post',\n\t \t'hierarchical' => false,\n\t \t'rewrite' => true,\n\t \t'supports' => array('title', 'editor', 'thumbnail')\n\t );\n\t \n\t \tregister_post_type('portfolio',$portfolio_args);\n\t\t}", "public function index()\n\t{\n\t\t$this->data['title'] \t= 'Portfolio Data';\n\t\t$this->data['portfolio'] \t= $this->portfolio_model->get_all_portfolio();\n\t\t$this->data['css'] \t\t= 'body/admin/css/form_style_default';\n\t\t$this->data['js'] \t\t= 'body/admin/js/form_style_default';\n\t\t$this->data['content'] \t= 'content/admin/portfolio/my_portfolio';\n\t\t$this->load->view('body/admin/style_1', $this->data);\n\t}", "function capezzahill_setup(){\r\n add_theme_support('automatic-feed-links');\r\n\r\n // Auto generate title tag without hard-coding\r\n add_theme_support( 'title-tag' );\r\n add_filter( 'wp_title', 'wpdocs_hack_wp_title_for_home' );\r\n\r\n // Post thumbnails \r\n add_theme_support( 'post-thumbnails' );\r\n set_post_thumbnail_size( 1568, 9999 );\r\n\r\n register_nav_menus(\r\n array(\r\n 'top-right' => __( 'Header Area', 'capezzahill'),\r\n 'footer' => __( 'Footer Menu', 'capezzahill'),\r\n 'social' => __( 'Social Links Menu', 'capezzahill'),\r\n )\r\n );\r\n\r\n add_theme_support( \r\n 'html5',\r\n array(\r\n 'search-form',\r\n 'comment-form',\r\n 'comment-list',\r\n 'gallery',\r\n 'caption',\r\n )\r\n );\r\n\r\n add_theme_support(\r\n 'custom-logo',\r\n array(\r\n 'height' => 190,\r\n 'width' => 190,\r\n 'flex-width' => false,\r\n 'flex-height' => false,\r\n 'header-text' => array( 'site-title', 'site-description' ),\r\n )\r\n );\r\n \r\n // language\r\n load_theme_textdomain( 'capezzahill', get_template_directory() . '/languages' );\r\n \r\n // Allows for live refresh when updating widgets in customizer I think\r\n add_theme_support( 'customize-selective-refresh-widgets' );\r\n\r\n // Allow user to decide full with options for editor\r\n add_theme_support( 'align-wide' );\r\n \r\n // Theme support for visual look of blocks on backend only\r\n add_theme_support( 'wp-block-styles' );\r\n\r\n add_theme_support( 'editor-styles' );\r\n add_editor_style( 'custom-editor-style.css' );\r\n\r\n // Add excerpts to page\r\n add_post_type_support( 'page', 'excerpt' );\r\n \r\n add_theme_support( \r\n 'editor-font-sizes',\r\n array(\r\n array(\r\n 'name' => __( 'Small', 'themeLangDomain'),\r\n 'shortName' => __('S', 'capezzahill'),\r\n 'size' => 19.5,\r\n 'slug' => 'small'\r\n ),\r\n array(\r\n 'name' => __('Normal', 'themeLangDomain'),\r\n 'shortName' => __('M', 'capezzahill'),\r\n 'size' => 22,\r\n 'slug' => 'normal'\r\n ),\r\n array(\r\n 'name' => __('Large', 'themeLangDomain'),\r\n 'shortName' => __('L', 'capezzahill'),\r\n 'size' => 36.5,\r\n 'slug' => 'large'\r\n ),\r\n array(\r\n 'name' => __('Huge', 'themeLangDomain'),\r\n 'shortName' => __('XL', 'capezzahill'),\r\n 'size' => 49.5,\r\n 'slug' => 'huge'\r\n )\r\n )\r\n );\r\n\r\n add_theme_support(\r\n 'editor-color-palette',\r\n array(\r\n // Come back to this when you add customizer support for colors ;)\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'name' => 'default' === get_theme_mod( 'primarytop_colortop-right' ) ? __( 'Blue', 'capezzahill' ) : null,\r\n\t\t\t\t\t'slug' => 'primary',\r\n\t\t\t\t\t'color' => capezzahill_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? 199 : get_theme_mod( 'primary_color_hue', 199 ), 100, 33 ),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'name' => 'default' === get_theme_mod( 'primary_color' ) ? __( 'Dark Blue', 'capezzahill' ) : null,\r\n\t\t\t\t\t'slug' => 'secondary',\r\n 'color' => capezzahill_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? 199 : get_theme_mod( 'primary_color_hue', 199 ), 100, 23 ),\r\n ),\r\n array(\r\n 'name' => __( 'Ligh Blue', 'capezzahill'),\r\n 'slug' => 'light-blue',\r\n 'color' => '#0077B6'\r\n ),\r\n array(\r\n 'name' => __( 'Navy', 'capezzahill'),\r\n 'slug' => 'navy',\r\n 'color' => '#10153F'\r\n ),\r\n array(\r\n 'name' => __( 'Dark Gray', 'capezzahill'),\r\n 'slug' => 'dark-gray',\r\n 'color' => '#333333'\r\n ),\r\n array(\r\n 'name' => __( 'Light Gray', 'capezzahill'),\r\n 'slug' => 'light-gray',\r\n 'color' => '#B0B7BB'\r\n ),\r\n array(\r\n 'name' => __( 'White', 'capezzahill'),\r\n 'slug' => 'white',\r\n 'color' => '#fff'\r\n ),\r\n array(\r\n 'name' => __( 'Black', 'capezzahill'),\r\n 'slug' => 'black',\r\n 'color' => '#000'\r\n ),\r\n )\r\n );\r\n \r\n add_theme_support('responsive-embeds');\r\n }", "function templ_add_my_stylesheet()\r\n{\r\n\r\n /* Respects SSL, Style.css is relative to the current file */\r\n\twp_enqueue_script('jquery');\r\n\t\r\n\t$tmpl_is_allow_url_fopen = tmpl_is_allow_url_fopen();\r\n\t\r\n\t/* Tevolution Plug-in Style Sheet File In Desktop view only */\t\r\n\tif (function_exists('tmpl_wp_is_mobile') && !tmpl_wp_is_mobile()) {\r\n\t\r\n\t\t/* if \"allow_url_fopen\" is enabled then apply minifiled css otherwise includse seperately */\r\n\t\tif(!$tmpl_is_allow_url_fopen){\r\n\t\t\twp_enqueue_style('tevolution_style',TEMPL_PLUGIN_URL.'style.css','',false);\r\n\t\t}else{\r\n\t\t\twp_enqueue_style('tevolution_style',TEMPL_PLUGIN_URL.'css.minifier.php','',false);\r\n\t\t}\r\n\t}\r\n\tif(function_exists('theme_get_settings')){\r\n\t\tif(theme_get_settings('supreme_archive_display_excerpt')){\r\n\t\t\tif(function_exists('tevolution_excerpt_length')){\r\n\t\t\t\tadd_filter('excerpt_length', 'tevolution_excerpt_length');\r\n\t\t\t}\r\n\t\t\tif(function_exists('new_excerpt_more')){\r\n\t\t\t\tadd_filter('excerpt_more', 'new_excerpt_more');\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function portfolio_theme_assets(){\n wp_enqueue_style( \"bootstrap\", get_theme_file_uri( \"/vendor/bootstrap/css/bootstrap.min.css\", null, version ));\n wp_enqueue_style( \"font_awesome\", get_theme_file_uri( \"/vendor/font-awesome/css/font-awesome.min.css\", null, version ));\n\n wp_enqueue_style( \"font_monsterrat\", \"//fonts.googleapis.com/css?family=Montserrat:400,700\", null, version );\n wp_enqueue_style( \"font_kaushan\", \"//fonts.googleapis.com/css?family=Kaushan+Script\", null, version );\n wp_enqueue_style( \"font_dorid\", \"//fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic\", null, version );\n wp_enqueue_style( \"font_roboto\", \"//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700\", null, version );\n wp_enqueue_style( \"agency_css\", get_theme_file_uri( \"/css/agency.css\", null, version ));\n wp_enqueue_style( \"style_css\", get_stylesheet_uri(), null, version );\n\n\n wp_enqueue_script('agency_jquey', get_theme_file_uri( \"/vendor/jquery/jquery.min.js\" ));\n wp_enqueue_script( \"jquery_easing_js\", get_theme_file_uri(\"/vendor/jquery-easing/jquery.easing.min.js\"), array('agency_jquey'), null, true );\n\n wp_enqueue_script( \"bootstap_js\", get_theme_file_uri(\"/vendor/bootstrap/js/bootstrap.bundle.min.js\"), array('agency_jquey'), null, true );\n \n wp_enqueue_script( \"B_validation_js\", get_theme_file_uri(\"/js/jqBootstrapValidation.js\"), array('agency_jquey'), null, true );\n wp_enqueue_script( \"contact_js\", get_theme_file_uri(\"/js/contact_me.js\"), array('agency_jquey'), null, true );\n\n wp_enqueue_script( \"agency_js\", get_theme_file_uri(\"/js/agency.min.js\"), array('agency_jquey'), null, true );\n\n }", "function mattu_portfolio_items_shortcode() {\n\t$loop = new WP_Query(\n\t\tarray(\n\t\t\t'post_type' => 'portfolio',\n\t\t\t'orderby' => 'date',\n\t\t\t'order' => 'ASC',\n\t\t\t'posts_per_page' => -1, // -1 shows all \n\t\t)\n\t);\n\n\t/* Check if any portfolio items were returned. */\n\tif ( $loop->have_posts() ) {\n\n\t\t/* Open an unordered list. */\n\t\t$output = '<ul class=\"portfolio-items\">';\n\n\t\t/* Loop through the portfolio items (The Loop). */\n\t\twhile ( $loop->have_posts() ) {\n\n\t\t\t$loop->the_post();\n\n\t\t\t/* Display the portfolio item title. */\n\t\t\t$output .= the_title(\n\t\t\t\t'<li><a href=\"' . get_permalink() . '\">',\n\t\t\t\t'</a></li>',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\t\n\t\t}\n\n\t\t/* Close the unordered list. */\n\t\t$output .= '</ul>';\n\t}\n\n\t/* If no portfolio items were found. */\n\telse {\n\t\t$output = '<p>No Projects have been published.';\n\t}\n\n\t/* Return the portfolio items list. */\n\treturn $output;\n}", "function create_portfolio_meta_box_child() {\r\nglobal $theme_name, $portfolio_meta_boxes;\r\n\tif (function_exists('add_meta_box') ) {\r\n\tadd_meta_box( 'new-meta-boxes', __('Post Options', GETTEXT_DOMAIN_CHILD), 'portfolio_meta_boxes_child', 'portfolio', 'normal', 'high' );\r\n\t}\r\n}", "function create_custom_posts() \n{\n\t $singular = 'Projects'; /*Change Variables values*/\n\t \n\t $plural = 'Projects'; /*Change Variables values*/\n\t \n\t $slug = 'projects'; /*Change Variables values*/\n\t \n\t $post_type = 'projects'; /*Change Variables values*/\n\t \n\t $supports = array('title', 'excerpt', 'author', 'editor', 'thumbnail', 'custom-fields', 'revisions', 'page-attributes'); \n\t \n\t \n\t $labels = array(\n\t\t'name' => _x( $plural, 'post type general name'),\n\t\t'singular_name' => _x( $singular, 'post type singular name'),\n\t\t'add_new' => _x('Add New', strtolower( $singular ) ),\n\t\t'add_new_item' => __('Add New '. $singular),\n\t\t'edit_item' => __('Edit '. $singular ),\n\t\t'new_item' => __('New '. $singular ),\n\t\t'view_item' => __('View '. $singular),\n\t\t'search_items' => __('Search '. $plural),\n\t\t'not_found' => __('No '. $plural .' found'),\n\t\t'not_found_in_trash' => __('No '. $plural .' found in Trash'), \n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => $plural\n\t\n\t );\n\t \n\t $args = array(\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'query_var' => true,\n\t\t'rewrite' => Array('slug'=> $slug ),\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => false, \n\t\t'hierarchical' => false,\n\t\t'supports' => $supports\n\t\t\n\t );\n\t \n\t register_post_type( $post_type, $args );\n}", "function phoenix_custom_post_type() {\n $labels = array(\n 'name' => 'Portfolio',\n 'singullar_name' => 'Portfolio',\n 'add_new' => 'Add Item',\n 'all_items' => 'All Items',\n 'add_new_item' => 'Add Item',\n 'edit_item' => 'Edit Item',\n 'new_item' => 'New Item',\n 'view_item' => 'View Item',\n 'search_item' => 'Search Portfolio',\n 'not_found' => 'No items found',\n 'not_found_in_trash' => 'No items found in trash',\n 'parent_item_colon' => 'Parent Item' \n );\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'has_archive' => true,\n 'publicly_queryable' => true,\n 'query_var' => true,\n 'rewrite' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'supports' => array(\n 'title',\n 'editor',\n 'excerpt',\n 'thumbnail',\n 'revisions',\n ),\n 'taxonomies' => array(\n 'category',\n 'post_tag'\n ),\n 'menu_position' => 5,\n 'exclude_from_search' => false\n );\n register_post_type('portfolio', $args);\n}", "function tierone_delta_settings(){\n\n\t\tload_theme_textdomain('tierone', get_template_directory() . '/languages');\n\n\t\t// Custom Image Crop\n\t\tadd_image_size('tier-featured-slider', 801, 423, true);\n\t\tadd_image_size('tier-featured-lights', 321, 161, true);\n\t\tadd_image_size('tier-featured-large', 870, 600, true);\n\t\tadd_image_size('tier-featured-medium', 473, 213, true);\n\t\tadd_image_size('tier-featured', 360, 218, true);\n\t\tadd_image_size('tier-featured-d', 380, 170, true);\n\t\tadd_image_size('tier-featured-post-ba', 311, 204, true);\n\t\tadd_image_size('tier-featured-post-bc', 177, 108, true);\n\t\tadd_image_size('tier-featured-small', 230, 118, true);\n\t\tadd_image_size('tier-featured-xs', 76, 76, true);\n\n /*\n * Let WordPress manage the document title.\n * By adding theme support, we declare that this theme does not use a\n * hard-coded <title> tag in the document head, and expect WordPress to\n * provide it for us.\n */\n add_theme_support('title-tag');\n\n\t\t/**\n\t\t * Add Custom Logo Support\n\t\t */\n\t\tadd_theme_support( 'custom-logo' );\n\n\t\t\n\t\tadd_theme_support('post-thumbnails');\n\n\n\t\t// This theme uses wp_nav_menu() in one location.\n\t\tregister_nav_menus(array(\n\t\t\t'primary-menu' => esc_html__( 'Primary Menu', 'tierone-delta' ),\n\t\t\t'footer-menu' => esc_html__( 'Footer Menu', 'tierone-delta' )\n\t\t));\n\n\n\t\t/*\n\t\t * Switch default core markup for search form, comment form, and comments\n\t\t * to output valid HTML5.\n\t\t */\n\t\tadd_theme_support('html5',array('search-form','comment-form','comment-list','gallery','caption'));\n\n\n\t\t/*\n\t\t * Enable support for Post Formats.\n\t\t * See https://developer.wordpress.org/themes/functionality/post-formats/\n\t\t */\n\t\tadd_theme_support('post-formats', array(\n\t\t\t'aside',\n\t\t\t'image',\n\t\t\t'video',\n\t\t\t'quote',\n\t\t\t'link'\n\t\t));\n\n // Setup the WordPress core custom background feature.\n add_theme_support( 'custom-background' , apply_filters( 'tier_custom_background_cb', array(\n 'default-color' => 'ffffff',\n 'default-image' => '',\n )));\n \n\t}", "function acitpo_after_theme_setup() {\n\tadd_theme_support('automatic-feed-links');\n\tadd_theme_support('custom-header', array(\n\t\t'default-image' => acitpo_get_default_header_image(),\n\t\t'width' => 120,\n\t\t'height' => 120,\n\t\t'flex-width' => true,\n\t\t'flex-height' => true,\n\t\t'default-text-color' => '333',\n\t\t'header-text' => true,\n\t\t'uploads' => true,\n\t\t'wp-head-callback' => 'acitpo_custom_header_wp_head',\n\t\t'admin-head-callback' => 'acitpo_custom_header_admin_head',\n\t\t'admin-preview-callback' => 'acitpo_custom_header_admin_preview',\n\t));\n\tadd_theme_support('post-formats', array('aside', 'image', 'link', 'quote', 'video'));\n\tadd_theme_support('post-thumbnails');\n}", "private function setup_theme() {\n\n // Use post thumbnails as featured images\n add_theme_support( 'post-thumbnails' );\n\n // Post formats aren't used in this theme.\n remove_theme_support( 'post-formats' );\n\n // Enable support for HTML5 markup.\n add_theme_support( 'html5', [\n 'comment-list',\n 'search-form',\n 'comment-form',\n 'gallery',\n 'caption',\n ] );\n\n // Enable RSS feed links\n add_theme_support( 'automatic-feed-links' );\n\n // Disable comment RSS feeds\n add_filter( 'feed_links_show_comments_feed', '__return_false' );\n\n // Images\n add_image_size( 'medium-square', 300, 300, true );\n\n // Image sizes for responsive content images\n add_image_size( '2048-wide', 2048 );\n add_image_size( '1024-wide', 1024 );\n add_image_size( '800-wide', 800 );\n add_image_size( '640-wide', 640 );\n add_image_size( '480-wide', 480 );\n add_image_size( '400-wide', 400 );\n add_image_size( '320-wide', 320 );\n\n // 16x9 for the lead image\n add_image_size( '2048-16x9', 2048, 1152, true );\n add_image_size( '1024-16x9', 1024, 576, true ); // The size of the lead image\n add_image_size( '800-16x9', 800, 450, true );\n add_image_size( '640-16x9', 640, 360, true );\n add_image_size( '480-16x9', 480, 270, true );\n add_image_size( '400-16x9', 400, 225, true );\n add_image_size( '320-16x9', 320, 180, true );\n\n add_image_size( 'twitter-card', 120, 120, true );\n add_image_size( 'facebook-open-graph', 1200, 630, true );\n\n $sidebars = [\n 'homepage' => esc_html__( 'Homepage', 'pedestal' ),\n ];\n foreach ( $sidebars as $id => $sidebar ) {\n $args = [\n 'name' => $sidebar,\n 'id' => \"sidebar-$id\",\n 'description' => '',\n 'class' => '',\n 'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</li>\\n\",\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => \"</h3>\\n\",\n ];\n register_sidebar( $args );\n }\n\n }", "function mintshow_theme_setup() {\n \n /**\n * Make theme available for translation.\n * Translations can be placed in the /languages/ directory.\n */\n load_theme_textdomain( 'myfirsttheme', get_template_directory() . '/languages' );\n \n /**\n * Add default posts and comments RSS feed links to <head>.\n */\n add_theme_support( 'automatic-feed-links' );\n \n /**\n * Enable support for post thumbnails and featured images.\n */\n add_theme_support( 'post-thumbnails' );\n \n /**\n * Add support for two custom navigation menus.\n */\n register_nav_menus( array(\n 'primary' => __( 'Primary Menu', 'myfirsttheme' ),\n 'secondary' => __('Secondary Menu', 'myfirsttheme' )\n ) );\n \n /**\n * Enable support for the following post formats:\n * aside, gallery, quote, image, and video\n */\n add_theme_support( 'post-formats', array ( 'aside', 'gallery', 'quote', 'image', 'video' ) );\n}", "function mittencrate2014_setup() {\n\n // This theme styles the visual editor to resemble the theme style.\n //add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url() ) );\n\n // Enable support for Post Thumbnails\n add_theme_support( 'post-thumbnails' );\n set_post_thumbnail_size( 900, 528, true );\n \n // home-page-box is used for the blog tiles\n add_image_size( 'home-page-box', 600, 300 );\n\n // This theme uses wp_nav_menu() in two locations.\n register_nav_menus( array(\n 'primary' => 'Primary Menu',\n ) );\n \n}", "function philosophy_theme_setup(){\n load_theme_textdomain( \"philosophy\" );\n \n add_theme_support( \"post-thumbnails\" );\n \n add_theme_support( \"title-tag\" );\n\n add_theme_support( \"automatic-feed-links\" );\n\n add_theme_support( 'html5', array( 'search-form','comment-list','comment-form','gallery', 'caption' ) );\n\n add_theme_support( \"post-formats\", array('aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat') );\n\n add_theme_support( \"custom-logo\" );\n\n add_editor_style( \"/assets/css/editor-style.css\" ); \n\n register_nav_menu( \"topmenu\", __(\"Top Menu\", \"philosophy\") );\n\n add_image_size( \"philosophy-home-square\", 400, 400, true );\n\n}", "function pogreba_theme_setup() {\n\tadd_theme_support( 'title-tag' );\n\n\t/*\n\t * Enable support for custom logo.\n\t *\n\t * @since Twenty Sixteen 1.2\n\t */\n\tadd_theme_support( 'custom-logo', array(\n\t\t'height' => 240,\n\t\t'width' => 240,\n\t\t'flex-height' => true,\n\t) );\n\n\t/*\n\t * Enable support for Post Thumbnails on posts and pages.\n\t *\n\t * @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails\n\t */\n add_theme_support( 'post-thumbnails' );\n set_post_thumbnail_size(250, 150); // задаем размер миниатюрам 250x150\n add_image_size('big-thumb', 400, 400, true); // добавляем еще один размер картинкам 400x400 с обрезкой\n\n\t// This theme uses wp_nav_menu() in two locations.\n\tregister_nav_menus( array(\n\t\t'primary' => __( 'Primary Menu', 'pogreba_theme' ),\n\t\t'social' => __( 'Social Links Menu', 'pogreba_theme' ),\n\t) );\n\n\t/*\n\t * Switch default core markup for search form, comment form, and comments\n\t * to output valid HTML5.\n\t */\n\tadd_theme_support( 'html5', array(\n\t\t'search-form',\n\t\t'comment-form',\n\t\t'comment-list',\n\t\t'gallery',\n\t\t'caption',\n\t) );\n\n\t/*\n\t * Enable support for Post Formats.\n\t *\n\t * See: https://codex.wordpress.org/Post_Formats\n\t */\n\tadd_theme_support( 'post-formats', array(\n\t\t'aside',\n\t\t'image',\n\t\t'video',\n\t\t'quote',\n\t\t'link',\n\t\t'gallery',\n\t\t'status',\n\t\t'audio',\n\t\t'chat',\n\t) );\n}" ]
[ "0.78104264", "0.723982", "0.6898167", "0.68831056", "0.67470384", "0.6705878", "0.6701684", "0.65685713", "0.63608944", "0.6353011", "0.63499373", "0.63010633", "0.628339", "0.6273576", "0.6243999", "0.6225904", "0.6194164", "0.6120988", "0.60294527", "0.6027224", "0.6022928", "0.6022237", "0.60126615", "0.5981728", "0.5980485", "0.5975973", "0.5973041", "0.5959137", "0.59571236", "0.5937389", "0.5888318", "0.5877222", "0.5863445", "0.5859674", "0.5856007", "0.5855322", "0.5797603", "0.57913", "0.5762183", "0.57599664", "0.57541484", "0.5753801", "0.574093", "0.57388556", "0.57303464", "0.5729621", "0.5724011", "0.5701955", "0.56936115", "0.56681156", "0.56554204", "0.5648343", "0.5635801", "0.56330526", "0.5629795", "0.56239164", "0.5616951", "0.56144", "0.5611733", "0.5602579", "0.5601737", "0.5600436", "0.5567575", "0.55640954", "0.5562075", "0.5555635", "0.5545889", "0.5544753", "0.5533058", "0.55318904", "0.55072516", "0.5506359", "0.5495907", "0.54927707", "0.5489053", "0.5487752", "0.54868776", "0.54860765", "0.5479683", "0.54744816", "0.5474329", "0.5473606", "0.54726464", "0.54707444", "0.5466688", "0.54660106", "0.5464841", "0.5462321", "0.54574704", "0.5451921", "0.5450579", "0.54494494", "0.54481393", "0.5441637", "0.54409254", "0.5434893", "0.542736", "0.54167116", "0.54159373", "0.54132736", "0.5412168" ]
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema): void { $this->addSql('CREATE TABLE floraison (id INT AUTO_INCREMENT NOT NULL, culture_id INT NOT NULL, mois VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_8984C2F8B108249D (culture_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE plantation (id INT AUTO_INCREMENT NOT NULL, culture_id INT NOT NULL, mois VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_B789E5BAB108249D (culture_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE recolte (id INT AUTO_INCREMENT NOT NULL, culture_id INT NOT NULL, mois VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_3433713CB108249D (culture_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('ALTER TABLE floraison ADD CONSTRAINT FK_8984C2F8B108249D FOREIGN KEY (culture_id) REFERENCES culture (id)'); $this->addSql('ALTER TABLE plantation ADD CONSTRAINT FK_B789E5BAB108249D FOREIGN KEY (culture_id) REFERENCES culture (id)'); $this->addSql('ALTER TABLE recolte ADD CONSTRAINT FK_3433713CB108249D FOREIGN KEY (culture_id) REFERENCES culture (id)'); $this->addSql('ALTER TABLE sol ADD argile DOUBLE PRECISION DEFAULT NULL, ADD limon DOUBLE PRECISION DEFAULT NULL, ADD sable DOUBLE PRECISION DEFAULT NULL, DROP pourcentage'); $this->addSql('ALTER TABLE user DROP INDEX UNIQ_8D93D64998260155, ADD INDEX IDX_8D93D64998260155 (region_id)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "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'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "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 UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}", "public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}", "public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "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 UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\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->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n\t{\n Laravel\\Database\\Schema::create(\"orbs\", function($table){\n $table->increments(\"id\");\n $table->string(\"name\");\n $table->string(\"description\");\n $table->integer(\"coins\");\n $table->integer(\"points\");\n $table->integer(\"min_level\");\n $table->integer(\"max_level\");\n $table->integer(\"owner_character\");\n $table->integer(\"acquisition_time\");\n $table->integer(\"last_attacker\");\n $table->integer(\"last_attack_time\");\n $table->string(\"image\");\n });\n\t}" ]
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.7329024", "0.7313519", "0.7298817", "0.72950184", "0.72917736", "0.7291469", "0.72913444", "0.72849613", "0.72839737", "0.7272078", "0.7271878", "0.72659117", "0.7262893", "0.7261672", "0.7256839", "0.72505474", "0.7249633", "0.72441125", "0.724062", "0.72376186", "0.7218244", "0.72177947", "0.72046006", "0.7203395", "0.7196059", "0.7191219", "0.7189963", "0.7177052", "0.71761394", "0.7167738", "0.7164105", "0.7164105", "0.7159096", "0.7147647", "0.7136521", "0.7129768", "0.7124664", "0.7123368", "0.71168584", "0.7104628", "0.7104628", "0.7104618", "0.7097006", "0.70931643", "0.70886755", "0.7087018", "0.7086326", "0.70830804", "0.70829463", "0.70780045", "0.70702124", "0.70690626", "0.7066111", "0.7062268", "0.7058938", "0.705882", "0.70556235", "0.70549136", "0.7054758", "0.70498437", "0.70483595", "0.7047308", "0.7045881", "0.70445794", "0.7043173", "0.703882", "0.7038126", "0.703674", "0.7033728", "0.7032356", "0.7031423", "0.70257956", "0.70142514", "0.70101255", "0.7006208", "0.6988486", "0.6984963", "0.69629973", "0.69612974", "0.69587934", "0.6957519" ]
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema): void { $this->addSql('DROP TABLE floraison'); $this->addSql('DROP TABLE plantation'); $this->addSql('DROP TABLE recolte'); $this->addSql('ALTER TABLE sol ADD pourcentage DOUBLE PRECISION NOT NULL, DROP argile, DROP limon, DROP sable'); $this->addSql('ALTER TABLE user DROP INDEX IDX_8D93D64998260155, ADD UNIQUE INDEX UNIQ_8D93D64998260155 (region_id)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }", "public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(){\n $this->dropTable('users');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }", "public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down() \n {\n \n }", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('education');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n\tSchema::drop('quizzes');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "public function down ()\n {\n }", "abstract public function down();", "abstract public function down();", "abstract public function down();", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }", "public function down() {\n\n\t}", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down(): void\n {\n // Remove your data\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function down()\n {\n\tSchema::drop('activities');\n }", "public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }", "public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }", "public function down()\n {\n }", "public function down()\n {\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n\t\t//return false;\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }", "public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "protected abstract function do_down();", "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}", "public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function down() {\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}", "public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}" ]
[ "0.7950277", "0.78636813", "0.76065636", "0.7493955", "0.7320625", "0.7245268", "0.7187498", "0.71543235", "0.715298", "0.7141911", "0.7135835", "0.71214414", "0.71154845", "0.71057886", "0.7098064", "0.70800334", "0.7078775", "0.70729095", "0.7068331", "0.7066272", "0.7053364", "0.7053364", "0.7042174", "0.7042174", "0.7042174", "0.7041765", "0.7040102", "0.7028846", "0.70253754", "0.7021679", "0.6988633", "0.6986877", "0.6978061", "0.6971848", "0.6944203", "0.6944203", "0.6944203", "0.6942135", "0.6941429", "0.6939214", "0.6935277", "0.69334567", "0.6928689", "0.6924838", "0.6924794", "0.6913486", "0.6902361", "0.6897891", "0.6897845", "0.6897824", "0.6897824", "0.68886673", "0.688262", "0.6874051", "0.6869844", "0.6863713", "0.6858435", "0.68545175", "0.68440175", "0.6842142", "0.6836981", "0.6836124", "0.6834763", "0.68303466", "0.68297166", "0.68282366", "0.6826686", "0.6824025", "0.68185335", "0.6811099", "0.68078107", "0.68056506", "0.68056506", "0.6789167", "0.67755204", "0.67742497", "0.6765081", "0.67597127", "0.67596203", "0.67564446", "0.67564446", "0.67564446", "0.6753443", "0.6753351", "0.6753351", "0.6753351", "0.6752681", "0.674581", "0.6743746", "0.67387754", "0.6733766", "0.67331296", "0.6731279", "0.67302275", "0.6727377", "0.67273724", "0.672722", "0.672607", "0.67173517", "0.67139125", "0.671303" ]
0.0
-1
Gets the query string from our form submission
public function search(Request $request) { $query = $request->input('search'); // Returns an array of articles that have the query string located somewhere within // our articles titles. Paginates them so we can break up lots of search results. $products = DB::table('products')->where('title', 'LIKE', '%' . $query . '%')->orWhere('type', 'LIKE', '%' . $query . '%') ->orWhere('description', 'LIKE', '%' . $query . '%') ->paginate(16); $images = DB::table('prod_images')->get(); // returns a view and passes the view the list of articles and the original query. return view('search.results')->with(['products'=>$products])->with(['images'=>$images, 'query' => $query]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQueryString()\n {\n return $this->getRequest()->getQueryString();\n }", "public function getQueryString()\n {\n return isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '';\n }", "public function getQueryString()\n {\n return $this->query_string;\n }", "public function getQueryString()\n {\n return rtrim((string) $this->request->getRequestUri(), '/');\n }", "public function queryString() {\n return $_SERVER['QUERY_STRING'];\n }", "public function getPostQueryString()\n {\n return http_build_query($this->postParams);\n }", "private function getQueryString() : string\n {\n return http_build_query($this->parameters);\n }", "public function getQuery() {\n $query = $this->getArgument(self::QUERY_NAME, '');\n if ($query) {\n// $query = str_replace(Url::getBaseUrl(), '', $query);\n $query = str_replace('?' . self::QUERY_NAME . '=', '', $query);\n $query = ltrim($query, Request::QUERY_SEPARATOR);\n $query = rtrim($query, Request::QUERY_SEPARATOR);\n }\n\n return $query;\n }", "private static function getUrlQueryString() {\n // The variable $_SERVER['QUERY_STRING'] is set by the server and can differ, e.g. it might hold additional\n // parameters or it might be empty (nginx).\n\n if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING'])) {\n $query = $_SERVER['QUERY_STRING'];\n }\n else {\n $query = strRightFrom($_SERVER['REQUEST_URI'], '?');\n }\n return $query;\n }", "public function getQueryString() {\n\t\t\n\t}", "private function get_query_string()\n {\n $query_string = '';\n foreach (explode('&', $_SERVER['QUERY_STRING']) as $key)\n {\n if( !preg_match('/org_openpsa_qbpager/', $key)\n && $key != '')\n {\n $query_string .= '&amp;'.$key;\n }\n }\n return $query_string;\n }", "public function getQueryString()\n {\n $queryString = static::normaliseQueryString($_SERVER['QUERY_STRING']);\n\n return '' === $queryString ? null : $queryString;\n }", "protected function get_url_query(): string {\n if ($this->has_params()) {\n return $this->get_params_as_query();\n }\n return '';\n }", "public function getQueryString()\n {\n return parse_str($this->partials['query']);\n }", "public function getQueryString()\n\t{\n\t\treturn $this->queryString;\n\t}", "private function parseQueryString()\n {\n $queryString = isset($_GET['q']) ? $_GET['q'] : false;\n return $queryString;\n }", "public function getQueryString() {\n\t\t\t// Crackle permits duplicate keys, so we cannot use PHP's http_build_query()\n\t\t\t$parts = array();\n\t\t\tforeach ($this->getPairs() as $pair) {\n\t\t\t\t$parts[] = urlencode($pair->getKey()) . '=' . urlencode($pair->getValue());\n\t\t\t}\n\t\t\treturn implode('&', $parts);\n\t\t}", "public function queryString()\n\t{\n\t\treturn substr($this->fullUri(), strpos($this->fullUri(), '?'), strlen($this->fullUri()) - 1);\n\t}", "protected function getQuery(): string\n {\n return http_build_query($this->query);\n }", "public static function queryString(): string\n\t{\n\t\treturn static::$queryString;\n\t}", "public function getQueryString()\n {\n $location = $this->getLocation();\n\n if (!empty($location)) {\n $this->updateQuery($location, 'l');\n }\n\n return http_build_query($this->queryParams);\n }", "public function getRequest()\r\n {\r\n return http_build_query($this->_params);\r\n }", "public function getURLQuery() {\n\t\t$query = array();\n\t\tif (Request::getGET('key')) {\n\t\t\t$query['key'] = Request::getGET('key');\n\t\t}\n\t\treturn $query;\n\t}", "public function getQueryString():string;", "public function formParams() {\n\t\tswitch($this->method()) {\n\t\tcase 'GET':\n\t\tcase 'DELETE':\n\t\tcase 'HEAD':\n\t\tcase 'OPTIONS':\n\t\tcase 'TRACE':\n\t\t\t$query_str = $this->queryString();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// TODO Validate Content-Type\n\t\t\t$query_str = $this->getBody();\n\t\t}\n\t\tparse_str($query_str, $result);\n\t\treturn $result;\n\t}", "public function queryString() {\n\t\t/* Note that it is necessary to pass the full URL to\n\t\t * `parse_url`, because `parse_url` can be tricked into\n\t\t * thinking that part of the path is a domain name. */\n\t\treturn parse_url($this->fullUrl(), PHP_URL_QUERY);\n\t}", "public function getFulltextQuery()\n {\n return $this->getRequest()->getParam('query');\n }", "protected function obtainGetRequest() {\n $request = Request::createFromGlobals();\n return $request->query;\n }", "private function getQueryString()\n {\n return \\apply_filters('swiftype_search_query_string', stripslashes(\\get_search_query(false)));;\n }", "public function getQueryString()\n {\n $options = [\n 'w' => $this->width,\n 'h' => $this->height,\n 'fm' => $this->format,\n 'q' => $this->quality\n ];\n\n if ($this->quality !== null || $this->progressive) {\n $options['fm'] = 'jpg';\n }\n if ($this->progressive) {\n $options['fl'] = 'progressive';\n }\n\n return http_build_query($options, '', '&', PHP_QUERY_RFC3986);\n }", "public function get_corrected_query_string() {\n\t\treturn '';\n\t}", "public function getQueryURL() {\n return $this->QUERY_URL;\n }", "function existingQueryForm () { return \"\"; }", "protected function getQueryString(HttpRequest $request)\n\t{\n\t\treturn urldecode($request->getQueryString());\n\t}", "public final function getQuery() {\n return $this->queryString;\n }", "function getQueryString(){\n\tglobal $query_string;\n\t$query_string = array();\n\t$new_query_string = array();\n\tif(isset($_SERVER) && isset($_SERVER['REQUEST_URI'])){\n\t\tif(strpos($_SERVER['REQUEST_URI'], '?')){\n\t\t\t$query_string = explode('?', $_SERVER['REQUEST_URI']);\n\n\t\t\tif(strpos($query_string[1], '&')){\n\t\t\t\t$query_string = explode('&', $query_string[1]);\n\t\t\t\tforeach ($query_string as $value) {\n\t\t\t\t\t$value_array = explode('=', $value);\n\t\t\t\t\t$new_query_string[urldecode($value_array[0])] = urldecode($value_array[1]);\n\t\t\t\t}\n\t\t\t\t$query_string = $new_query_string;\n\t\t\t}else{\n\t\t\t\t$value_array = explode('=', $query_string[1]);\n\t\t\t\t$new_query_string[urldecode($value_array[0])] = urldecode($value_array[1]);\n\t\t\t}\n\t\t}\n\t}\n\t$query_string = $new_query_string;\n}", "public function getQueryStringKey(){\n return $this->queryStringKey;\n }", "private function buildQueryString(){\n if(count($this->querystrings) == 0){\n return \"\";\n }\n else{\n $querystring = \"?\";\n\n foreach($this->querystrings as $index => $value){\n if($index > 0){\n $querystring .= \"&\";\n }\n $querystring .= $value;\n }\n\n return $querystring;\n }\n }", "protected function getQueryParams() {\n\t\treturn $this->request->getQueryParams();\n\t}", "public static function getQuery()\n {\n return ServiceLocatorService::getServiceLocator()->get('Request')->getQuery()->toArray();\n }", "private function getParameters()\n {\n $inputParametersStr = \"\";\n\n foreach ($_GET as $key => $input) {\n\n if(empty($input)){\n continue ; //ignore empty field \n }\n $inputParametersStr .= \"$key=\" . urlencode($input) . \"&\"; // convert string into url syntax.\n\n }\n $inputParametersStr = trim($inputParametersStr, '&'); // separate parameters by \"&\" .\n\n return $inputParametersStr ;\n }", "private static function getGetParams()\n\t{\n\t\treturn $_GET;\n\t}", "private function getMainQueryString() {\n\t\treturn $this->getQueryStringUsingGenreString(self::genresToQString($this->genres));\n\t}", "private function getUserInput()\n {\n // BotDetect built-in Ajax Captcha validation\n $input = $this->getUrlParameter('i');\n\n if (is_null($input)) {\n // jQuery validation support, the input key may be just about anything,\n // so we have to loop through fields and take the first unrecognized one\n $recognized = array('get', 'c', 't', 'd');\n foreach ($_GET as $key => $value) {\n if (!in_array($key, $recognized)) {\n $input = $value;\n break;\n }\n }\n }\n\n return $input;\n }", "public function buildQueryString();", "function get_query_string($key) {\n $val = null;\n if (!empty($_GET[$key])) {\n $val = $_GET[$key];\n }\n return $val;\n}", "protected function getSearchQuery()\n {\n $searchQuery = \"\";\n if (isset($_POST['searchName'])) {\n $searchQuery = Convert::slugify($_POST['searchName']);\n }\n return (string) str_replace(\"-\", \"+\", $searchQuery);\n }", "abstract protected function queryString(): string;", "private function getQueryUrl(): string\n {\n return $this->getBaseUrl() . 'query';\n }", "public function queryString() : string;", "private function getQueryString(): array\n {\n parse_str($this->request->getUri()->getQuery(), $queryString);\n\n if (isset($queryString['p'])) {\n unset($queryString['p']);\n }\n\n return $queryString;\n }", "function postToQueryString ($posted_vars) {\n\t\tglobal $tii_variables_not_to_post;\n\t\t$query_string = \"?\";\n\t\tforeach ($posted_vars as $k => $v) {\n\t\t\tif (!in_array($k, $tii_variables_not_to_post)) {\n\t\t\t\t$query_string .= $k.\"=\".$v.\"&\";\n\t\t\t}\n\t\t}\n\t\t$query_string = substr($query_string, 0, strlen($query_string)-1);\n\t\treturn $query_string;\n\t}", "private function _getQueryStringPath()\n\t{\n\t\t$pathParam = craft()->urlManager->pathParam;\n\t\treturn trim($this->getQuery($pathParam, ''), '/');\n\t}", "public static function getRequestString(){\n return implode('/', self::getRequestVars());\n }", "public function getRequest()\n {\n return $this->get(self::_REQUEST);\n }", "public function queryString();", "public function getRequestUri() {\n\t\t$final = '';\n\t\tif($this->path) {\n\t\t\t$final .= $this->path;\n\t\t}\n\t\tif($this->query) {\n\t\t\t$final .= '?' . $this->query;\n\t\t}\n\t\treturn $final;\n\t}", "public function getQuery() {\n\t\t$queries = $_SERVER['QUERY_STRING'];\n\t\t$queries = explode('&', $queries);\n\t\t$ret = array();\n\t\tforeach($queries as $q) {\n\t\t\t$q_exp = explode('=', $q);\n\t\t\t$ret[$q_exp[0]] = isset($q_exp[1]) ? $q_exp[1] : null;\n\t\t}\n\t\treturn $ret;\n\t}", "public function getQueryAsString();", "public function getQuery(): string\r\n {\r\n return $this->query;\r\n }", "public function getURLQuery() {\n\t\t$query = array();\n\t\tif (Request::getGET('type') == 'login-confirmation') {\n\t\t\t$query['type'] = 'login-confirmation';\n\t\t\tif (Request::getGET('mode') == 'iframe')\n\t\t\t\t$query['mode'] = 'iframe';\n\t\t}\n\t\treturn $query;\n\t}", "public function getParams(){\n if( !empty($this->uri['query']) ):\n parse_str($this->uri['query'], $this->params);\n return $this->params;\n endif;\n }", "public function getQueryText()\n\t{\n\t\tif (empty($this->queryText)) {\n\t\t\t$this->queryText = $this->getParam('q');\n\t\t}\n\t\t$queryText = str_replace(':', '', $this->queryText);\n\t\treturn $queryText;\n\t}", "protected function getQueryStringParamsSepatator () {\n\t\tif ($this->queryParamsSepatator === NULL) {\n\t\t\t$response = \\MvcCore\\Application::GetInstance()->GetResponse();\n\t\t\tif ($response->HasHeader('Content-Type')) {\n\t\t\t\t$this->queryParamsSepatator = $response->IsXmlOutput() ? '&amp;' : '&';\n\t\t\t} else {\n\t\t\t\t$viewClass = $this->application->GetViewClass();\n\t\t\t\t$viewDocType = $viewClass::GetDoctype();\n\t\t\t\t$this->queryParamsSepatator = (\n\t\t\t\t\tstrpos($viewDocType, \\MvcCore\\IView::DOCTYPE_XML) !== FALSE ||\n\t\t\t\t\tstrpos($viewDocType, \\MvcCore\\IView::DOCTYPE_XHTML) !== FALSE\n\t\t\t\t) ? '&amp;' : '&';\n\t\t\t}\n\t\t}\n\t\treturn $this->queryParamsSepatator;\n\t}", "public function getFormActionURI ();", "function get_url_query() {\r\n $query = array();\r\n\r\n // get the URL query string\r\n $query_str = $_SERVER['QUERY_STRING'];\r\n\r\n // parse the URL query string to array\r\n parse_str($query_str, $query);\r\n\r\n return $query;\r\n}", "public function get_query() {\n\t return $this->decodedWebhook['queryResult']['queryText'];\n }", "public function getUrl ()\n {\n $url = $this->_config['formAction'] . '?';\n \n foreach ($this->_params as $key => $value) {\n if ($value != '') {\n $url .= $key . '=' . $value . '&';\n }\n }\n \n $url .= 'SHASign=' . $this->getSha1Sign();\n \n return $url;\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "function GetQueryString($name, $default=\"\") {\n return ValidRequiredQueryString($name) ? $_GET[$name] : $default;\n}", "public function getSubmittedValue() {\n return isset($_REQUEST[$this->name]) ? $_REQUEST[$this->name] : FALSE;\n }", "protected function buildQueryString()\n {\n $parameters = $this->_queryParameters;\n $parameters['USER'] = $this->_username;\n $parameters['PWD'] = $this->_password;\n $parameters['SIGNATURE'] = $this->_signature;\n $parameters['VERSION'] = self::VERSION;\n $parameters['METHOD'] = $this::METHOD;\n return http_build_query($parameters);\n }", "public function getQueryString(): string\n {\n return http_build_query(\n $this->imageApiOptions->toArray(),\n '',\n '&',\n PHP_QUERY_RFC3986\n );\n }", "private function getUrl() {\n $queryArr = array();\n\n $uri = filter_input(INPUT_SERVER, 'REQUEST_URI');\n\n //get uri as a array\n $uriArr = parse_url($uri);\n\n //get query parameter string\n $queryStr = isset($uriArr['query']) ? $uriArr['query'] : '';\n\n //get query parameters as a array\n parse_str($queryStr, $queryArr);\n\n //remove 'page' parameter if it is set\n if (isset($queryArr['page'])) {\n unset($queryArr['page']);\n }\n\n //rebuild the uri and return \n $returnUri = $uriArr['path'] . '?' . http_build_query($queryArr);\n\n return $returnUri;\n }", "function getSearchTerm() {\n if(isset($_POST['searchStr']))\n return $_POST['searchStr'];\n else\n return \"\";\n }", "public function getQueryString(): array\n {\n\n $buffer = explode('?', $_SERVER[\"REQUEST_URI\"]);\n\n $variable = explode('&', array_pop($buffer));\n\n $array_variable = [];\n\n foreach ($variable as $value) {\n\n $items = explode('=', $value);\n $array_variable[array_shift($items)] = array_pop($items);\n }\n\n return $array_variable;\n }", "function getURLString(){\n $url = $_SERVER['REQUEST_URI'];\n $aurl = explode('?', $url);\n if(count($aurl) > 1)\n { \n $query = $aurl[1];\n parse_str($query, $params);\n return $params;\n }\n return array();\n}", "public function getTargetQueryString() {\n if(!$this->isTargetInternal())\n return null;\n\n $c = $this->cutTarget();\n return $c['queryString'];\n }", "function getFormParams() {\n\t\treturn $this->_formParams;\n\t}", "function getUserFromForm()\n {\n $string= \"default\";\n\n if (isset($_POST['Parametro']))\n $string=$_POST['Parametro'];\n\n return $string;\n }", "public function getFormAction()\n {\n\n return $this->getUrl('contact/index/post', ['_secure' => true]);\n }", "public function getQueryParams()\n {\n if ($this->_queryParams === null) {\n return $_GET;\n }\n\n return $this->_queryParams;\n }", "public static function GetFormValues(){\n self::$KeyValue = isset($_REQUEST[\"KeyValue\"]) ? $_REQUEST[\"KeyValue\"] : \"\"; \n \n if (self::$KeyValue == \"\"){\n\t self::$KeyValue = \"new zealand\"; \n\t }\n\t \n\t \n\t self::$KeyValue = urlencode(self::$KeyValue);\n\t \n\t self::$MapLattitude = isset($_REQUEST[\"MapLattitude\"]) ? $_REQUEST[\"MapLattitude\"] : \"\"; \n\t self::$MapLongtitude= isset($_REQUEST[\"MapLongtitude\"]) ? $_REQUEST[\"MapLongtitude\"] : \"\"; \n\t \n }", "public static function getForm();", "function getRequestUri() {\n\t\treturn $this->getParam(self::PARAM_REQUEST_URI);\n\t}", "function getCorrectedQueryString() {\n\t\tif (io::strpos($this->_correctedQueryString, ' language:'.$this->_language) !== false) {\n\t\t\treturn io::htmlspecialchars(str_replace(' language:'.$this->_language, '', $this->_correctedQueryString)); \n\t\t}\n\t\treturn io::htmlspecialchars($this->_correctedQueryString);\n\t}", "public function getHttpQuery () {\n\t\t\tif($this->httpQuery) {\n\t\t\t\treturn $this->httpQuery;\n\t\t\t}\n\t\t\t\n\t\t\treturn 'No query initiated yet';\n\t\t}", "public function getQueryParametersAsString() {\n return $this->queryParameters || $this->query ? http_build_query($this->getQueryParameters()) : null;\n }", "public function transactionFormGetFormParms ();", "public function getQuery(): string\n {\n return (string) $this->query;\n }", "function getQueryParm($parm) { // not working too good!\n $return = \"\";\n $uri = parse_url(rawurldecode($_SERVER['REQUEST_URI']));\n if (isset($uri['query'])) {\n $query = $uri['query'];\n if ($parm) {\n $pos = $this->stripos($query, $parm . \"=\");\n if ($pos)\n $return = substr($query, $pos + strlen($parm) + 1);\n }\n }\n return $return;\n }", "public function getQueryParams()\n {\n return $this->get;\n }", "function get_query_array() {\r\n\t\t\t$parts = parse_url( $this->get_current_url() );\r\n\t\t\tif ( isset( $parts['query'] ) ) {\r\n\t\t\t\tparse_str( $parts['query'], $query );\r\n\t\t\t\treturn $query;\r\n\t\t\t}\r\n\r\n\t\t\treturn array();\r\n\t\t}", "public function getQueryStrParams ()\n {\n return $this->getParams(\"string\");\n }", "public function getFormAction()\n {\n return $this->getUrl('faq/index/email');\n }", "public function getUrl() {\n $url = $this->request->get_normalized_http_url() . '?';\n $url .= http_build_query($this->request->get_parameters(), '', '&');\n\n return $url;\n }", "protected function getSearchFormActionURL() {}", "public function getQuery()\n {\n return $this->_data['query'];\n }", "private function ParseQuerystring()\r\n\t{\r\n\t\t$this->Object \t= isset($_GET['obj']) \t\t? $_GET['obj'] \t\t\t\t\t: $this->Object;\r\n\t\t$this->Task \t= isset($_GET['task']) \t\t? '&task='.$_GET['task'] \t\t: '&task='.$this->Task;\r\n\t\t$this->Subtask \t= isset($_GET['subtask']) \t? '&subtask='.$_GET['subtask'] \t: '&subtask='.$this->Subtask;\r\n\t\t$this->Item\t\t= isset($_GET['id']) \t\t? '&id='.$_GET['id'] \t\t\t: '&id='.$this->Item;\r\n\t\t\r\n\t\t$this->Action \t\t= '?obj='.$this->Object.$this->Task.$this->Subtask.$this->Item;\r\n\t\t$this->URL \t\t\t= '?obj='.$this->Object.$this->Task.$this->Item;\r\n\t\t$this->GenericPage \t= '?obj='.$this->Object.$this->Task;\t\r\n\t}" ]
[ "0.7695365", "0.7418088", "0.7293843", "0.7173528", "0.7146322", "0.7143165", "0.7090374", "0.7017596", "0.7017353", "0.7004614", "0.7003915", "0.7002489", "0.6989808", "0.69865066", "0.6976865", "0.6894309", "0.68889135", "0.68877244", "0.6860545", "0.680866", "0.6784161", "0.67332524", "0.6705795", "0.66993034", "0.6678663", "0.6644504", "0.6628366", "0.6618577", "0.66143537", "0.65795064", "0.65266114", "0.6502092", "0.6502008", "0.6471799", "0.6457371", "0.6433381", "0.63551944", "0.6326772", "0.6309517", "0.6294059", "0.62896377", "0.6281491", "0.62759423", "0.62710065", "0.6261463", "0.6256943", "0.6251606", "0.6221876", "0.6219765", "0.6214842", "0.62121964", "0.6199421", "0.61946523", "0.6185461", "0.6180042", "0.616584", "0.61451906", "0.61430496", "0.6137298", "0.6124693", "0.6117699", "0.6104544", "0.60777664", "0.6048149", "0.60479814", "0.60387534", "0.6032119", "0.6031873", "0.6028504", "0.6028504", "0.6028504", "0.6020336", "0.60169387", "0.5997789", "0.5978374", "0.5965791", "0.595878", "0.5952821", "0.5952666", "0.5949796", "0.59331894", "0.5923108", "0.5912502", "0.58783877", "0.5874504", "0.58679813", "0.5865878", "0.58651", "0.5864558", "0.58617127", "0.5849042", "0.5843053", "0.5839898", "0.58358264", "0.5834842", "0.58314353", "0.5810921", "0.5809837", "0.5807542", "0.5791221", "0.57904744" ]
0.0
-1
Display a listing of the resource.
public function index(Travel $travel) { return view('trips.index')->with([ 'travel' => $travel ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET 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 //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Travel $travel, Request $request) { $travel->trips()->create([ 'trip' => $request->trip, 'start_latitude' => $request->start_latitude, 'start_longitude' => $request->start_longitude, 'end_latitude' => $request->end_latitude, 'end_longitude' => $request->end_longitude, 'start_datetime' => Carbon::createFromFormat('Y-m-d H:i', $request->start_datetime), 'end_datetime' => Carbon::createFromFormat('Y-m-d H:i', $request->end_datetime), 'start_timezone_id' => Timezone::whereTimezone(Session::get('timezone'))->first()->id, 'end_timezone_id' => Timezone::whereTimezone(Session::get('timezone'))->first()->id, ]); return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "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 }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(Trip $trip) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "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}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Trip $trip) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Trip $trip) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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 }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "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 }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "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 }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "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 }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "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}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "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 }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "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 }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "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 }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "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 }", "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 }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "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 }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "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}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "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 }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "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 }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "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 }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "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 }", "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 }", "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 }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "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 }", "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 }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "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 }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "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 }", "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 }", "public function update(Entity $entity);", "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 }", "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}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "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 }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Travel $travel, Trip $trip) { $trip->delete(); return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
/ this file contains all sparql queries to query al tibb annabwi ontology file
function getSPARQLEngine(){ global $sparql_endpoint; $sparql = new EasyRdf_Sparql_Client($sparql_endpoint); return $sparql; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDrugsQuery ()\n\n{\n\n//this function performs the SPARQL query and saves the result in a EasyRDF array (mixed objects - literals and ressources (uri))\n\n$sparql = new \\EasyRdf_Sparql_Client(self::endpoint);\n\n\n$result = $sparql->query('SELECT ?drug ?drugname ?target ?indication\n\t\t\tWHERE {\n\t\t\t?drug a <http://bio2rdf.org/drugbank_vocabulary:Drug> .\n\t\t\t?drug rdfs:label ?drugname .\n\t\t\t?drug <http://bio2rdf.org/drugbank_vocabulary:target> ?t .\n\t\t\t?t rdfs:label ?target .\n\t\t\tOPTIONAL{\n\t\t\t?drug <http://bio2rdf.org/drugbank_vocabulary:indication> ?indication .}\n\t\t\t} LIMIT 20');\n\n echo '<pre>';\n\nreturn $result;\n\n}", "public function query($query) {\n\t\t$query = \"\nPREFIX sioc: <http://rdfs.org/sioc/ns#>\nPREFIX sioct: <http://rdfs.org/sioc/types#>\nPREFIX foaf: <http://xmlns.com/foaf/0.1/>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX dc: <http://purl.org/dc/elements/1.1/>\nPREFIX dct: <http://purl.org/dc/terms/>\nPREFIX tags: <http://www.holygoat.co.uk/owl/redwood/0.1/tags/>\nPREFIX moat: <http://moat-project.org/ns#>\nPREFIX opo: <http://online-presence.net/opo/ns#>\nPREFIX opo-actions: <http://online-presence.net/opo-actions/ns#>\nPREFIX ctag: <http://commontag.org/ns#>\nPREFIX smob: <http://smob.me/ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\nPREFIX rev: <http://purl.org/stuff/rev#>\nPREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>\n$query\n\";\n\t\treturn $query;\n\t}", "public function askQuery(){\n try {\n // Sparql11query.g:78:3: ( ASK ( datasetClause )* whereClause ) \n // Sparql11query.g:79:3: ASK ( datasetClause )* whereClause \n {\n $this->match($this->input,$this->getToken('ASK'),self::$FOLLOW_ASK_in_askQuery293); \n // Sparql11query.g:79:7: ( datasetClause )* \n //loop13:\n do {\n $alt13=2;\n $LA13_0 = $this->input->LA(1);\n\n if ( ($LA13_0==$this->getToken('FROM')) ) {\n $alt13=1;\n }\n\n\n switch ($alt13) {\n \tcase 1 :\n \t // Sparql11query.g:79:7: datasetClause \n \t {\n \t $this->pushFollow(self::$FOLLOW_datasetClause_in_askQuery295);\n \t $this->datasetClause();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop13;\n }\n } while (true);\n\n $this->pushFollow(self::$FOLLOW_whereClause_in_askQuery298);\n $this->whereClause();\n\n $this->state->_fsp--;\n\n\n }\n\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 ;\n }", "public function toRDFa()\n {\n }", "public function getSparql() {\n $constraint_str = trim($this->element->getSparql());\n \n //grammar says: brackets are not needed , sparql engines say: error...\n if (substr($constraint_str, 0, 1) != '(') {\n $constraint_str = '('.$constraint_str.')';\n }\n return 'FILTER '.$constraint_str;\n }", "function testQueryTerms()\n\t{\n\t\t// system is functional\n\t\treturn \"<filter>\\n\".\n\t\t\t\"\t<or>\\n\".\n\t\t\t\"\t\t<equals>\\n\".\n\t\t\t\"\t\t\t<darwin:Genus>Helix</darwin:Genus>\\n\".\n\t\t\t\"\t\t</equals>\\n\".\n\t\t\t\"\t\t<equals>\\n\".\n\t\t\t\"\t\t\t<darwin:Genus>Conus</darwin:Genus>\\n\".\n\t\t\t\"\t\t</equals>\\n\".\n\t\t\t\"\t</or>\\n\".\n\t\t\t\"</filter>\\n\".\n\t\t\t\"<records start='0' limit='5'>\\n\".\n\t\t\t\"\t<structure schemaLocation='http://digir.sourceforge.net/schema/conceptual/darwin/full/2003/1.0/darwin2full.xsd'/>\\n\".\n\t\t\t\"</records> \\n\";\n\t}", "public static function getQueryGrammar()\n {\n }", "public function describeQuery(){\n try {\n // Sparql11query.g:66:3: ( DESCRIBE ( ( varOrIRIref )+ | ASTERISK ) ( datasetClause )* ( whereClause )? solutionModifier ) \n // Sparql11query.g:67:3: DESCRIBE ( ( varOrIRIref )+ | ASTERISK ) ( datasetClause )* ( whereClause )? solutionModifier \n {\n $this->match($this->input,$this->getToken('DESCRIBE'),self::$FOLLOW_DESCRIBE_in_describeQuery242); \n // Sparql11query.g:68:3: ( ( varOrIRIref )+ | ASTERISK ) \n $alt10=2;\n $LA10_0 = $this->input->LA(1);\n\n if ( ($LA10_0==$this->getToken('IRI_REF')||$LA10_0==$this->getToken('PNAME_NS')||$LA10_0==$this->getToken('PNAME_LN')||($LA10_0>=$this->getToken('VAR1') && $LA10_0<=$this->getToken('VAR2'))) ) {\n $alt10=1;\n }\n else if ( ($LA10_0==$this->getToken('ASTERISK')) ) {\n $alt10=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 10, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt10) {\n case 1 :\n // Sparql11query.g:69:5: ( varOrIRIref )+ \n {\n // Sparql11query.g:69:5: ( varOrIRIref )+ \n $cnt9=0;\n //loop9:\n do {\n $alt9=2;\n $LA9_0 = $this->input->LA(1);\n\n if ( ($LA9_0==$this->getToken('IRI_REF')||$LA9_0==$this->getToken('PNAME_NS')||$LA9_0==$this->getToken('PNAME_LN')||($LA9_0>=$this->getToken('VAR1') && $LA9_0<=$this->getToken('VAR2'))) ) {\n $alt9=1;\n }\n\n\n switch ($alt9) {\n \tcase 1 :\n \t // Sparql11query.g:69:5: varOrIRIref \n \t {\n \t $this->pushFollow(self::$FOLLOW_varOrIRIref_in_describeQuery252);\n \t $this->varOrIRIref();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( $cnt9 >= 1 ) break 2;//loop9;\n $eee =\n new EarlyExitException(9, $this->input);\n throw $eee;\n }\n $cnt9++;\n } while (true);\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:70:7: ASTERISK \n {\n $this->match($this->input,$this->getToken('ASTERISK'),self::$FOLLOW_ASTERISK_in_describeQuery261); \n\n }\n break;\n\n }\n\n // Sparql11query.g:72:3: ( datasetClause )* \n //loop11:\n do {\n $alt11=2;\n $LA11_0 = $this->input->LA(1);\n\n if ( ($LA11_0==$this->getToken('FROM')) ) {\n $alt11=1;\n }\n\n\n switch ($alt11) {\n \tcase 1 :\n \t // Sparql11query.g:72:3: datasetClause \n \t {\n \t $this->pushFollow(self::$FOLLOW_datasetClause_in_describeQuery269);\n \t $this->datasetClause();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop11;\n }\n } while (true);\n\n // Sparql11query.g:72:18: ( whereClause )? \n $alt12=2;\n $LA12_0 = $this->input->LA(1);\n\n if ( ($LA12_0==$this->getToken('WHERE')||$LA12_0==$this->getToken('OPEN_CURLY_BRACE')) ) {\n $alt12=1;\n }\n switch ($alt12) {\n case 1 :\n // Sparql11query.g:72:18: whereClause \n {\n $this->pushFollow(self::$FOLLOW_whereClause_in_describeQuery272);\n $this->whereClause();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n\n $this->pushFollow(self::$FOLLOW_solutionModifier_in_describeQuery275);\n $this->solutionModifier();\n\n $this->state->_fsp--;\n\n\n }\n\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 ;\n }", "function query_publications_from_taxon ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\n\t$xml = '';\n\t$sparql = '\nPREFIX dcterms: <http://purl.org/dc/terms/>\nPREFIX bibo: <http://purl.org/ontology/bibo/>\n\n\nCONSTRUCT \n{\n ?pub bibo:doi ?o .\n?pub dcterms:title ?doi .\n?pub rdf:type ?t .\n}\nWHERE\n{\n ?gb dcterms:subject <' . $uri . '> .\n ?gb dcterms:title ?accession .\n?gb dcterms:isReferencedBy ?pub .\n?pub rdf:type ?t .\n?pub bibo:doi ?o .\n?pub dcterms:title ?doi .\n}';\n\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM turma_disciplina';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function Sparql_Setup() {\n global $wgDebugLogGroups, $IP;\n // log - make sure this is writeable by php/apache\n $wgDebugLogGroups = array(\"SPARQL_LOG\" => \"$IP/logs/sparql.log\");\n\n // add scripts present in every page (try to keep to minimum)\n addUtilityScripts();\n \n return true;\n}", "function query_sequences_from_taxon ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\n\t$xml = '';\n\t$sparql = '\nPREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>\nPREFIX dcterms: <http://purl.org/dc/terms/>\n\nCONSTRUCT \n{\n ?gb rdf:type <http://purl.uniprot.org/core/Molecule> .\n?gb dcterms:title ?accession . \n }\nWHERE \n{ \n ?gb dcterms:subject <' . $uri . '> .\n ?gb dcterms:title ?accession\n \n}';\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "public function query11(){\n try {\n // Sparql11query.g:9:3: ( prologue ( selectQuery | constructQuery | describeQuery | askQuery ) ) \n // Sparql11query.g:10:3: prologue ( selectQuery | constructQuery | describeQuery | askQuery ) \n {\n $this->pushFollow(self::$FOLLOW_prologue_in_query1122);\n $this->prologue();\n\n $this->state->_fsp--;\n\n // Sparql11query.g:11:3: ( selectQuery | constructQuery | describeQuery | askQuery ) \n $alt1=4;\n $LA1 = $this->input->LA(1);\n if($this->getToken('SELECT')== $LA1)\n {\n $alt1=1;\n }\n else if($this->getToken('CONSTRUCT')== $LA1)\n {\n $alt1=2;\n }\n else if($this->getToken('DESCRIBE')== $LA1)\n {\n $alt1=3;\n }\n else if($this->getToken('ASK')== $LA1)\n {\n $alt1=4;\n }\n else{\n $nvae =\n new NoViableAltException(\"\", 1, 0, $this->input);\n\n throw $nvae;\n }\n\n switch ($alt1) {\n case 1 :\n // Sparql11query.g:12:5: selectQuery \n {\n $this->pushFollow(self::$FOLLOW_selectQuery_in_query1132);\n $this->selectQuery();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:13:7: constructQuery \n {\n $this->pushFollow(self::$FOLLOW_constructQuery_in_query1140);\n $this->constructQuery();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 3 :\n // Sparql11query.g:14:7: describeQuery \n {\n $this->pushFollow(self::$FOLLOW_describeQuery_in_query1148);\n $this->describeQuery();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 4 :\n // Sparql11query.g:15:7: askQuery \n {\n $this->pushFollow(self::$FOLLOW_askQuery_in_query1156);\n $this->askQuery();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n\n\n }\n\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 ;\n }", "public function execute()\n\t{\n\t\t$filterstr = implode(\".\\n\", $this->getFilters());\n\t\t$sparqlQuery = $this->constructQuery( $filterstr );\n\t\t\n\t\t@header('Content-type: text/plain');\n\t\t\n\t\t$engine = new SPARQL_Engine;\n\t\t$engine->useSparql($sparqlQuery);\n\t\t$engine->setResultHandler(new Single_Value_Extractor);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$engine->runQuery();\n\t\t} catch(Single_Value_Extractor $e)\n\t\t{\n\t\t\techo array_shift($e->getFoundValue());\n\t\t\techo \"\\n\".preg_replace('/\\t\\t\\t/', '', $sparqlQuery).\"\\n\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthrow new Exception('There was no result from the given SPARQL');\n\t}", "public function sparqlSelect($query) {\n\t\t//echo htmlentities($query);\t\n\t\t$options = array(\n\t\t\tCURLOPT_FOLLOWLOCATION => true,\n\t\t\tCURLOPT_CONNECTTIMEOUT => 5,\n\t\t\tCURLOPT_TIMEOUT => 120\n\t\t);\n\t\t\t\t\n\t\t$encoded_query = 'query=' . urlencode($query) . '&' . urlencode('format=application/sparql-results+xml');\n\t\treturn execSelect($this->getEndpoint(), $encoded_query, $options);\n\t}", "function sparql_query($sparql_endpoint, $query, $format='application/json')\n{\n\t$url = $sparql_endpoint . '?query=' . urlencode($query);\n\t\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Accept: \" . $format));\n\n\t$response = curl_exec($ch);\n\tif($response == FALSE) \n\t{\n\t\t$errorText = curl_error($ch);\n\t\tcurl_close($ch);\n\t\tdie($errorText);\n\t}\n\t\n\t$info = curl_getinfo($ch);\n\t$http_code = $info['http_code'];\n\t\n\tif ($http_code != 200)\n\t{\n\t\techo $response;\t\n\t\tdie (\"Triple store returned $http_code\\n\");\n\t}\n\t\n\tcurl_close($ch);\n\n\treturn $response;\n}", "public function graphTerm(){\n try {\n // Sparql11query.g:363:3: ( iriRef | rdfLiteral | numericLiteral | booleanLiteral | blankNode | OPEN_BRACE ( WS )* CLOSE_BRACE ) \n $alt47=6;\n $LA47 = $this->input->LA(1);\n if($this->getToken('IRI_REF')== $LA47||$this->getToken('PNAME_NS')== $LA47||$this->getToken('PNAME_LN')== $LA47)\n {\n $alt47=1;\n }\n else if($this->getToken('STRING_LITERAL1')== $LA47||$this->getToken('STRING_LITERAL2')== $LA47||$this->getToken('STRING_LITERAL_LONG1')== $LA47||$this->getToken('STRING_LITERAL_LONG2')== $LA47)\n {\n $alt47=2;\n }\n else if($this->getToken('INTEGER')== $LA47||$this->getToken('DECIMAL')== $LA47||$this->getToken('DOUBLE')== $LA47||$this->getToken('INTEGER_POSITIVE')== $LA47||$this->getToken('DECIMAL_POSITIVE')== $LA47||$this->getToken('DOUBLE_POSITIVE')== $LA47||$this->getToken('INTEGER_NEGATIVE')== $LA47||$this->getToken('DECIMAL_NEGATIVE')== $LA47||$this->getToken('DOUBLE_NEGATIVE')== $LA47)\n {\n $alt47=3;\n }\n else if($this->getToken('TRUE')== $LA47||$this->getToken('FALSE')== $LA47)\n {\n $alt47=4;\n }\n else if($this->getToken('BLANK_NODE_LABEL')== $LA47||$this->getToken('OPEN_SQUARE_BRACE')== $LA47)\n {\n $alt47=5;\n }\n else if($this->getToken('OPEN_BRACE')== $LA47)\n {\n $alt47=6;\n }\n else{\n $nvae =\n new NoViableAltException(\"\", 47, 0, $this->input);\n\n throw $nvae;\n }\n\n switch ($alt47) {\n case 1 :\n // Sparql11query.g:364:3: iriRef \n {\n $this->pushFollow(self::$FOLLOW_iriRef_in_graphTerm1230);\n $this->iriRef();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:365:5: rdfLiteral \n {\n $this->pushFollow(self::$FOLLOW_rdfLiteral_in_graphTerm1236);\n $this->rdfLiteral();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 3 :\n // Sparql11query.g:366:5: numericLiteral \n {\n $this->pushFollow(self::$FOLLOW_numericLiteral_in_graphTerm1242);\n $this->numericLiteral();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 4 :\n // Sparql11query.g:367:5: booleanLiteral \n {\n $this->pushFollow(self::$FOLLOW_booleanLiteral_in_graphTerm1248);\n $this->booleanLiteral();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 5 :\n // Sparql11query.g:368:5: blankNode \n {\n $this->pushFollow(self::$FOLLOW_blankNode_in_graphTerm1254);\n $this->blankNode();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 6 :\n // Sparql11query.g:369:5: OPEN_BRACE ( WS )* CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_graphTerm1260); \n // Sparql11query.g:369:16: ( WS )* \n //loop46:\n do {\n $alt46=2;\n $LA46_0 = $this->input->LA(1);\n\n if ( ($LA46_0==$this->getToken('WS')) ) {\n $alt46=1;\n }\n\n\n switch ($alt46) {\n \tcase 1 :\n \t // Sparql11query.g:369:16: WS \n \t {\n \t $this->match($this->input,$this->getToken('WS'),self::$FOLLOW_WS_in_graphTerm1262); \n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop46;\n }\n } while (true);\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_graphTerm1265); \n\n }\n break;\n\n }\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 ;\n }", "function sparql_construct($sparql_endpoint, $uri, $format='application/ld+json')\n{\n\t$url = $sparql_endpoint;\n\t\n\t// Query is string\n\t$query = 'CONSTRUCT {\n ?thing ?p ?o .\n}\nWHERE {\n VALUES ?thing { <' . $uri . '> }\n ?thing ?p ?o .\n}';\t\n\n\t$data = 'query=' . urlencode($query);\n\t\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Accept: \" . $format));\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\n\t$response = curl_exec($ch);\n\tif($response == FALSE) \n\t{\n\t\t$errorText = curl_error($ch);\n\t\tcurl_close($ch);\n\t\tdie($errorText);\n\t}\n\t\n\t$info = curl_getinfo($ch);\n\t$http_code = $info['http_code'];\n\t\n\tif ($http_code != 200)\n\t{\n\t\techo $response;\t\n\t\tdie (\"Triple store returned $http_code\\n\");\n\t}\n\t\n\tcurl_close($ch);\n\t\n\t// Fuseki returns nicely formatted JSON-LD, Blazegraph returns array of horrible JSON-LD\n\t// as first element of an array\n\t\n\t$obj = json_decode($response);\n\tif (is_array($obj))\n\t{\n\t\t$doc = $obj[0];\n\t\t\n\t\t$context = (object)array(\n\t\t\t'@vocab' => 'http://schema.org/'\n\t\t);\n\t\n\t\t$compacted = jsonld_compact($doc, $context);\n\t\t\n\t\t$response = json_encode($compacted, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\t\t\n\t}\n\t\n\n\treturn $response;\n}", "function xmlimport_getlistqueries() {\n /* COUNTRY LISTS QUERY ----------------------- */\n $xiqueries['statesqueries'] = array(\n \"states\" => \"\n /* States Vocab */\n SELECT \n s.name as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(s.name) - LENGTH(REPLACE(s.name, ' ', ''))+1) as word_count, \n LENGTH(s.name) as strlen, \n 1 as isstate\n FROM taxonomy_term_data s \n INNER JOIN field_data_field_iso2 s2 ON s2.entity_id = s.tid \n WHERE s.vid = 21\n \",\n \n \"states_abbr\" => \"\n /* States Abbr */\n SELECT \n s2.field_iso2_value as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(s2.field_iso2_value) - LENGTH(REPLACE(s2.field_iso2_value, ' ', ''))+1) as word_count, \n LENGTH(s2.field_iso2_value) as strlen, \n 1 as isstate\n FROM taxonomy_term_data s \n INNER JOIN field_data_field_iso2 s2 ON s2.entity_id = s.tid \n WHERE s.vid = 21\n \",\n \n \"states_syn\" => \"\n /* States Vocab Synonyms */\n SELECT \n REPLACE(REPLACE(ss.synonyms_synonym_value,',',''),'.','') as arraykey, \n s.name as primary_name, \n 'us' as country, \n s2.field_iso2_value as province, \n (LENGTH(ss.synonyms_synonym_value) - LENGTH(REPLACE(ss.synonyms_synonym_value, ' ', ''))+1) as word_count, \n LENGTH(ss.synonyms_synonym_value) as strlen, \n 1 as isstate \n FROM field_data_synonyms_synonym ss\n INNER JOIN taxonomy_term_data s ON s.tid = ss.entity_id AND s.vid = 21 \n INNER JOIN field_data_field_iso2 s2 ON s2.entity_id = s.tid\n \",\n );\n \n $xiqueries['countriesqueries'] = array(\n \"countries\" => \"\n /* Countries Vocab */\n SELECT \n REPLACE(REPLACE(REPLACE(c.name,',',''),'.',''),'-','') as arraykey, \n c.name as primary_name, \n c2.field_iso2_value as country, \n NULL as province, \n (LENGTH(c.name) - LENGTH(REPLACE(c.name, ' ', ''))+1) as word_count, \n LENGTH(c.name) as strlen, \n 0 as isstate\n FROM taxonomy_term_data c \n INNER JOIN field_data_field_iso2 c2 ON c2.entity_id = c.tid \n WHERE c.vid = 16\n \",\n \n \"countries_locations\" => \"\n /* Countries from Location Module, 252 non-political designations */\n SELECT \n REPLACE(REPLACE(REPLACE(cc.name,',',''),'.',''),'-','') as arraykey, \n cc.name as primary_name, \n cc.iso2 as country, \n NULL as province, \n (LENGTH(cc.name) - LENGTH(REPLACE(cc.name, ' ', ''))+1) as word_count, \n LENGTH(cc.name) as strlen, \n 0 as isstate \n FROM countries_country cc \n \",\n \n \"countries_official\" => \"\n /* Countries Table official names */\n SELECT \n REPLACE(REPLACE(cc.official_name,',',''),'.','') as arraykey, \n cc.name as primary_name, \n cc.iso2 as country, \n NULL as province, \n (LENGTH(cc.official_name) - LENGTH(REPLACE(cc.official_name, ' ', ''))+1) as word_count, \n LENGTH(cc.official_name) as strlen, \n 0 as isstate \n FROM countries_country cc \n \",\n \n \"countries_syn\" => \"\n /* Countries Vocab Synonyms */\n SELECT \n REPLACE(REPLACE(REPLACE(cs.synonyms_synonym_value,',',''),'.',''),'-','') as arraykey, \n c.name as primary_name, \n c2.field_iso2_value as country, \n NULL as province, \n (LENGTH(cs.synonyms_synonym_value) - LENGTH(REPLACE(cs.synonyms_synonym_value, ' ', ''))+1) as word_count, \n LENGTH(cs.synonyms_synonym_value) as strlen, \n 0 as isstate \n FROM field_data_synonyms_synonym cs\n INNER JOIN taxonomy_term_data c ON c.tid = cs.entity_id AND c.vid = 16 \n INNER JOIN field_data_field_iso2 c2 ON c2.entity_id = c.tid\n \",\n );\n \n $xiqueries['citiesqueries'] = array(\n \"cities_us\" => \"\n /* US Cities Vocab */\n SELECT \n REPLACE(REPLACE(city.name,',',''),'.','') as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(city.name) - LENGTH(REPLACE(city.name, ' ', ''))+1) as word_count, \n LENGTH(city.name) as strlen, \n 1 as isstate\n FROM taxonomy_term_data city \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 s2 ON s2.field_iso2_value = l.province AND s2.bundle = 'states' \n INNER JOIN taxonomy_term_data s ON s.tid = s2.entity_id AND s.vid = 21\n WHERE city.vid = 22\n AND l.country = 'us'\n \",\n \n \"cities_us_syn\" => \"\n /* US Cities Vocab Synonyms */\n SELECT \n REPLACE(REPLACE(REPLACE(ss.synonyms_synonym_value,',',''),'.',''),'-','') as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(ss.synonyms_synonym_value) - LENGTH(REPLACE(ss.synonyms_synonym_value, ' ', ''))+1) as word_count, \n LENGTH(ss.synonyms_synonym_value) as strlen, \n 1 as isstate\n FROM field_data_synonyms_synonym ss\n INNER JOIN taxonomy_term_data city ON city.tid = ss.entity_id AND city.vid = 22 \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 s2 ON s2.field_iso2_value = l.province AND s2.bundle = 'states' \n INNER JOIN taxonomy_term_data s ON s.tid = s2.entity_id AND s.vid = 21\n WHERE l.country = 'us'\n \",\n \n \"cities_foreign\" => \"\n /* Foreign Cities Vocab */\n SELECT \n REPLACE(REPLACE(city.name,',',''),'.','') as arraykey, \n cc.name as primary_name, \n l.country as country, \n NULL as province, \n (LENGTH(city.name) - LENGTH(REPLACE(city.name, ' ', ''))+1) as word_count, \n LENGTH(city.name) as strlen, \n 0 as isstate\n FROM taxonomy_term_data city \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN countries_country cc ON cc.iso2 = l.country \n WHERE city.vid = 22\n AND l.country != 'us'\n \",\n \n \"cities_foreign_syn\" => \"\n /* Foreign Cities Vocab Synonyms */\n SELECT \n REPLACE(REPLACE(REPLACE(ss.synonyms_synonym_value,',',''),'.',''),'-','') as arraykey, \n cc.name as primary_name, \n l.country as country, \n NULL as province, \n (LENGTH(city.name) - LENGTH(REPLACE(city.name, ' ', ''))+1) as word_count, \n LENGTH(city.name) as strlen, \n 0 as isstate\n FROM field_data_synonyms_synonym ss\n INNER JOIN taxonomy_term_data city ON city.tid = ss.entity_id AND city.vid = 22 \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN countries_country cc ON cc.iso2 = l.country \n WHERE l.country != 'us'\n \",\n );\n \n $xiqueries['citycombosqueries'] = array(\n \"citycombos_us\" => \"\n /* US Cities Vocab */\n SELECT \n REPLACE(REPLACE(CONCAT(city.name, ' USA'),',',''),'.','') as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(CONCAT(city.name, ' USA')) - LENGTH(REPLACE(CONCAT(city.name, ' USA'), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(city.name, ' USA')) as strlen, \n 1 as isstate\n FROM taxonomy_term_data city \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 s2 ON s2.field_iso2_value = l.province AND s2.bundle = 'states' \n INNER JOIN taxonomy_term_data s ON s.tid = s2.entity_id AND s.vid = 21\n WHERE city.vid = 22\n AND l.country = 'us'\n \",\n \n \"citycombos_us_state\" => \"\n /* US Cities Vocab Combos */\n SELECT \n REPLACE(REPLACE(CONCAT(city.name, ' ', s.name),',',''),'.','') as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(CONCAT(city.name, ', ', s.name)) - LENGTH(REPLACE(CONCAT(city.name, ', ', s.name), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(city.name, ', ', s.name)) as strlen, \n 1 as isstate\n FROM taxonomy_term_data city \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 s2 ON s2.field_iso2_value = l.province AND s2.bundle = 'states' \n INNER JOIN taxonomy_term_data s ON s.tid = s2.entity_id AND s.vid = 21\n WHERE city.vid = 22\n AND l.country = 'us'\n \",\n \n \"citycombos_us_state_syn\" => \"\n /* US Cities Vocab Combos */\n SELECT \n REPLACE(REPLACE(CONCAT(city.name, ' ', ss.synonyms_synonym_value),',',''),'.','') as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(CONCAT(city.name, ', ', ss.synonyms_synonym_value)) - LENGTH(REPLACE(CONCAT(city.name, ', ', ss.synonyms_synonym_value), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(city.name, ', ', ss.synonyms_synonym_value)) as strlen, \n 1 as isstate\n FROM taxonomy_term_data city \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 s2 ON s2.field_iso2_value = l.province AND s2.bundle = 'states' \n INNER JOIN taxonomy_term_data s ON s.tid = s2.entity_id AND s.vid = 21\n INNER JOIN field_data_synonyms_synonym ss ON ss.entity_id = s.tid \n WHERE city.vid = 22\n AND l.country = 'us'\n \",\n \n \"citycombos_us_city_syn_st\" => \"\n /* US Cities Vocab Combos */\n SELECT \n REPLACE(REPLACE(CONCAT(scity.synonyms_synonym_value, ' ', s2.field_iso2_value),',',''),'.','') as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(CONCAT(scity.synonyms_synonym_value, ' ', s2.field_iso2_value)) - LENGTH(REPLACE(CONCAT(scity.synonyms_synonym_value, ' ', s2.field_iso2_value), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(scity.synonyms_synonym_value, ' ', s2.field_iso2_value)) as strlen, \n 1 as isstate\n FROM field_data_synonyms_synonym scity \n INNER JOIN taxonomy_term_data city ON city.tid = scity.entity_id AND city.vid = 22 \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 s2 ON s2.field_iso2_value = l.province AND s2.bundle = 'states' \n INNER JOIN taxonomy_term_data s ON s.tid = s2.entity_id AND s.vid = 21\n WHERE l.country = 'us'\n \",\n \n \"citycombos_us_state_usa\" => \"\n /* US Cities Vocab Combos */\n SELECT \n REPLACE(REPLACE(CONCAT(city.name, ', ', s.name, ' usa'),',',''),'.','') as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(CONCAT(city.name, ', ', s.name, ', usa')) - LENGTH(REPLACE(CONCAT(city.name, ', ', s.name, ', usa'), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(city.name, ', ', s.name, ', usa')) as strlen, \n 1 as isstate\n FROM taxonomy_term_data city \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 s2 ON s2.field_iso2_value = l.province AND s2.bundle = 'states' \n INNER JOIN taxonomy_term_data s ON s.tid = s2.entity_id AND s.vid = 21\n WHERE city.vid = 22\n AND l.country = 'us'\n \",\n \n \"citycombos_us2\" => \"\n /* US Cities Vocab Combos */\n SELECT \n REPLACE(REPLACE(CONCAT(city.name, ' ', s2.field_iso2_value),',',''),'.','') as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(CONCAT(city.name, ', ', s2.field_iso2_value)) - LENGTH(REPLACE(CONCAT(city.name, ', ', s2.field_iso2_value), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(city.name, ', ', s2.field_iso2_value)) as strlen, \n 1 as isstate\n FROM taxonomy_term_data city \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 s2 ON s2.field_iso2_value = l.province AND s2.bundle = 'states' \n INNER JOIN taxonomy_term_data s ON s.tid = s2.entity_id AND s.vid = 21\n WHERE city.vid = 22\n AND l.country = 'us'\n \",\n \n \"statecombos_us\" => \"\n /* US States Vocab Combos */\n SELECT \n CONCAT(s.name, ', usa') as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(CONCAT(s.name, ', usa')) - LENGTH(REPLACE(CONCAT(s.name, ', usa'), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(s.name, ', usa')) as strlen, \n 1 as isstate\n FROM taxonomy_term_data s \n INNER JOIN field_data_field_iso2 s2 ON s2.entity_id = s.tid \n WHERE s.vid = 21\n \",\n \n \"citycombos_us_syn\" => \"\n /* US Cities Vocab Combos Synonyms */\n SELECT \n REPLACE(REPLACE(CONCAT(ss.synonyms_synonym_value, ', ', s2.field_iso2_value),',',''),'.','') as arraykey, \n s.name as primary_name, \n 'us' as country,\n s2.field_iso2_value as province, \n (LENGTH(CONCAT(ss.synonyms_synonym_value, ', ', s2.field_iso2_value)) - LENGTH(REPLACE(CONCAT(ss.synonyms_synonym_value, ', ', s2.field_iso2_value), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(ss.synonyms_synonym_value, ', ', s2.field_iso2_value)) as strlen, \n 1 as isstate\n FROM field_data_synonyms_synonym ss\n INNER JOIN taxonomy_term_data city ON city.tid = ss.entity_id AND city.vid = 22 \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 s2 ON s2.field_iso2_value = l.province AND s2.bundle = 'states' \n INNER JOIN taxonomy_term_data s ON s.tid = s2.entity_id AND s.vid = 21\n WHERE l.country = 'us'\n \",\n \n \"citycombos_foreign\" => \"\n /* Foreign Cities Vocab Combos */\n SELECT \n REPLACE(REPLACE(CONCAT(city.name, ', ', cc.name),',',''),'.','') as arraykey, \n cc.name as primary_name, \n l.country as country, \n NULL as province, \n (LENGTH(CONCAT(city.name, ', ', cc.name)) - LENGTH(REPLACE(CONCAT(city.name, ', ', cc.name), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(city.name, ', ', cc.name)) as strlen, \n 0 as isstate\n FROM taxonomy_term_data city \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN countries_country cc ON cc.iso2 = l.country \n WHERE city.vid = 22\n AND l.country != 'us'\n \",\n \n \"citycombos_foreign_syn\" => \"\n /* Foreign Cities Vocab Combos Synonyms */\n SELECT \n REPLACE(REPLACE(CONCAT(ss.synonyms_synonym_value, ', ', cc.name),',',''),'.','') as arraykey, \n cc.name as primary_name, \n l.country as country, \n NULL as province, \n (LENGTH(CONCAT(ss.synonyms_synonym_value, ', ', cc.name)) - LENGTH(REPLACE(CONCAT(ss.synonyms_synonym_value, ', ', cc.name), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(ss.synonyms_synonym_value, ', ', cc.name)) as strlen, \n 0 as isstate\n FROM field_data_synonyms_synonym ss\n INNER JOIN taxonomy_term_data city ON city.tid = ss.entity_id AND city.vid = 22 \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN countries_country cc ON cc.iso2 = l.country \n WHERE l.country != 'us'\n \",\n\n \"citycombos_foreign_country_syn\" => \"\n /* Foreign Cities Vocab Combos */\n SELECT \n REPLACE(REPLACE(CONCAT(city.name, ', ', ss.synonyms_synonym_value),',',''),'.','') as arraykey, \n c.name as primary_name, \n l.country as country, \n NULL as province, \n (LENGTH(CONCAT(city.name, ', ', ss.synonyms_synonym_value)) - LENGTH(REPLACE(CONCAT(city.name, ', ', ss.synonyms_synonym_value), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(city.name, ', ', ss.synonyms_synonym_value)) as strlen, \n 0 as isstate\n FROM taxonomy_term_data city \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 c2 ON c2.field_iso2_value = l.country\n INNER JOIN field_data_synonyms_synonym ss ON ss.entity_id = c2.entity_id\n INNER JOIN taxonomy_term_data c ON c.tid = ss.entity_id AND c.vid = 16 \n WHERE city.vid = 22\n AND l.country != 'us'\n \",\n \n \"citycombos_foreign_city_syn_country_syn\" => \"\n /* Foreign Cities Vocab Combos */\n SELECT \n REPLACE(REPLACE(CONCAT(scity.synonyms_synonym_value, ', ', ss.synonyms_synonym_value),',',''),'.','') as arraykey, \n c.name as primary_name, \n l.country as country, \n NULL as province, \n (LENGTH(CONCAT(scity.synonyms_synonym_value, ', ', ss.synonyms_synonym_value)) - LENGTH(REPLACE(CONCAT(scity.synonyms_synonym_value, ', ', ss.synonyms_synonym_value), ' ', ''))+1) as word_count, \n LENGTH(CONCAT(scity.synonyms_synonym_value, ', ', ss.synonyms_synonym_value)) as strlen, \n 0 as isstate\n FROM field_data_synonyms_synonym scity\n INNER JOIN taxonomy_term_data city ON city.tid = scity.entity_id AND city.vid = 22 \n INNER JOIN field_data_field_city_location cl ON cl.entity_id = city.tid \n INNER JOIN location l ON l.lid = cl.field_city_location_lid \n INNER JOIN field_data_field_iso2 c2 ON c2.field_iso2_value = l.country\n INNER JOIN field_data_synonyms_synonym ss ON ss.entity_id = c2.entity_id\n INNER JOIN taxonomy_term_data c ON c.tid = ss.entity_id AND c.vid = 16 \n WHERE city.vid = 22\n AND l.country != 'us'\n \",\n );\n \n return $xiqueries;\n }", "function query() {\n }", "public function xml2query()\n {\n if (array_key_exists(\"CogModule\", $this->data)) {\n $q = &$this->data[\"CogModule\"];\n } else {\n $q = &$this->data[\"Report\"];\n }\n\n $criteria_links = array();\n\n // Generate Output Information...\n $ds = false;\n if (!$q) {\n return;\n }\n\n foreach ($q as $cogquery) {\n // Set Query Attributes\n foreach ($cogquery[\"Format\"] as $att => $val) {\n $this->query->setAttribute($att, $val);\n }\n\n // Set DataSource\n if (isset($cogquery[\"Datasource\"])) {\n foreach ($cogquery[\"Datasource\"] as $att => $val) {\n //if ( $att == \"SourceType\" )\n //$this->query->source_type = $val;\n\n if ($att == \"SourceConnection\") {\n // No longer relevant - connections are not supplied in xml files\n }\n }\n }\n\n // Set Query Columns\n if (!($ef = &$this->getArrayElement($cogquery, \"EntryForm\"))) {\n $this->ErrorMsg = \"No EntryForm tag within Format\";\n return false;\n }\n\n if (!($qu = &$this->getArrayElement($ef, \"Query\"))) {\n $this->ErrorMsg = \"No Query tag within EntryForm\";\n return false;\n }\n\n $this->query->table_text = $this->getArrayElement($qu, \"TableSql\");\n $this->query->where_text = $this->getArrayElement($qu, \"WhereSql\");\n $this->query->group_text = $this->getArrayElement($qu, \"GroupSql\");\n $this->query->rowselection = $this->getArrayElement($qu, \"RowSelection\");\n $has_cols = true;\n\n if (($qc = &$this->getArrayElement($qu, \"SQL\"))) {\n $this->query->sql_raw = $this->getArrayElement($qc, \"SQLRaw\");\n }\n\n if (!($qc = &$this->getArrayElement($qu, \"QueryColumns\"))) {\n $this->ErrorMsg = \"No QueryColumns tag within Query\";\n $has_cols = false;\n }\n\n // Generate QueryColumn for each column found\n if ($has_cols) {\n foreach ($qc as $col) {\n $in_query = true;\n if (!$col[\"ColumnName\"]) {\n $in_query = false;\n }\n\n $this->query->createCriteriaColumn\n (\n $col[\"Name\"],\n $col[\"TableName\"],\n $col[\"ColumnName\"],\n $col[\"ColumnType\"],\n $col[\"ColumnLength\"],\n \"###.##\",\n $in_query\n );\n\n // Set any Attributes\n if (($fm = &$this->getArrayElement($col, \"Format\"))) {\n foreach ($fm as $att => $val) {\n $this->query->setColumnAttribute($col[\"Name\"], $att, $val);\n }\n }\n }\n\n // Generate Order By List\n if (($oc = &$this->getArrayElement($qu, \"OrderColumns\"))) {\n // Generate QueryColumn for each column found\n foreach ($oc as $col) {\n if (!$col[\"Name\"]) {\n return;\n }\n\n $this->query->createQueryColumn\n (\n $col[\"Name\"],\n $col[\"OrderType\"]\n );\n }\n }\n\n // Generate Query Assignments\n if (($as = &$this->getArrayElement($ef, \"Assignments\"))) {\n foreach ($as as $col) {\n if (array_key_exists(\"AssignName\", $col)) {\n $this->query->addAssignment($col[\"AssignName\"], $col[\"Expression\"], $col[\"Condition\"]);\n } else {\n $this->query->addAssignment($col[\"Name\"], $col[\"Expression\"], $col[\"Condition\"]);\n }\n\n }\n }\n }\n\n // Generate Query Assignments\n if (($pq = &$this->getArrayElement($qu, \"PreSQLS\"))) {\n foreach ($pq as $col) {\n $this->query->addPreSql($col[\"SQLText\"]);\n }\n }\n\n // Generate Output Information...\n if (($op = &$this->getArrayElement($ef, \"Output\"))) {\n // Generate Page Headers\n if (($ph = $this->getArrayElement($op, \"PageHeaders\"))) {\n foreach ($ph as $k => $phi) {\n $this->query->createPageHeader($k, $phi[\"LineNumber\"], $phi[\"HeaderText\"]);\n if (($fm = &$this->getArrayElement($phi, \"Format\"))) {\n foreach ($fm as $att => $val) {\n $this->query->setPageHeaderAttribute($k, $att, $val);\n }\n }\n\n }\n }\n\n // Generate Page Footers\n if (($ph = $this->getArrayElement($op, \"PageFooters\"))) {\n foreach ($ph as $k => $phi) {\n $this->query->createPageFooter($k, $phi[\"LineNumber\"], $phi[\"FooterText\"]);\n if (($fm = &$this->getArrayElement($phi, \"Format\"))) {\n foreach ($fm as $att => $val) {\n $this->query->setPageFooterAttribute($k, $att, $val);\n }\n }\n\n }\n }\n\n // Generate Display Orders\n if ($has_cols && ($ph = $this->getArrayElement($op, \"DisplayOrders\"))) {\n foreach ($ph as $k => $phi) {\n $this->query->setColumnOrder($phi[\"ColumnName\"], $phi[\"OrderNumber\"]);\n }\n }\n\n if ($has_cols && ($ph = $this->getArrayElement($op, \"Groups\"))) {\n foreach ($ph as $k => $phi) {\n if (array_key_exists(\"GroupName\", $phi)) {\n $gpname = $phi[\"GroupName\"];\n } else {\n $gpname = $phi[\"Name\"];\n }\n\n $grn = $this->query->createGroup($gpname);\n\n if (array_key_exists(\"BeforeGroupHeader\", $phi)) {\n $grn->setAttribute(\"before_header\", $phi[\"BeforeGroupHeader\"]);\n $grn->setAttribute(\"after_header\", $phi[\"AfterGroupHeader\"]);\n $grn->setAttribute(\"before_trailer\", $phi[\"BeforeGroupTrailer\"]);\n $grn->setAttribute(\"after_trailer\", $phi[\"AfterGroupTrailer\"]);\n $grn->setFormat(\"before_header\", $phi[\"BeforeGroupHeader\"]);\n $grn->setFormat(\"after_header\", $phi[\"AfterGroupHeader\"]);\n $grn->setFormat(\"before_trailer\", $phi[\"BeforeGroupTrailer\"]);\n $grn->setFormat(\"after_trailer\", $phi[\"AfterGroupTrailer\"]);\n }\n\n if (($gp = &$this->getArrayElement($phi, \"GroupHeaders\"))) {\n foreach ($gp as $att => $val) {\n if (!isset($val[\"GroupHeaderCustom\"])) {\n $val[\"GroupHeaderCustom\"] = false;\n }\n\n if (!isset($val[\"ShowInHTML\"])) {\n $val[\"ShowInHTML\"] = \"yes\";\n }\n\n if (!isset($val[\"ShowInPDF\"])) {\n $val[\"ShowInPDF\"] = \"yes\";\n }\n\n $this->query->createGroupHeader($gpname, $val[\"GroupHeaderColumn\"], $val[\"GroupHeaderCustom\"], $val[\"ShowInHTML\"], $val[\"ShowInPDF\"]);\n }\n }\n\n if (($gp = &$this->getArrayElement($phi, \"GroupTrailers\"))) {\n foreach ($gp as $att => $val) {\n if (!isset($val[\"GroupTrailerCustom\"])) {\n $val[\"GroupTrailerCustom\"] = false;\n }\n\n if (!isset($val[\"ShowInHTML\"])) {\n $val[\"ShowInHTML\"] = \"yes\";\n }\n\n if (!isset($val[\"ShowInPDF\"])) {\n $val[\"ShowInPDF\"] = \"yes\";\n }\n\n $this->query->createGroupTrailer($gpname, $val[\"GroupTrailerDisplayColumn\"],\n $val[\"GroupTrailerValueColumn\"],\n $val[\"GroupTrailerCustom\"], $val[\"ShowInHTML\"], $val[\"ShowInPDF\"]);\n }\n }\n\n }\n }\n\n // Generate Graphs\n if ($has_cols && ($gph = $this->getArrayElement($op, \"Graphs\"))) {\n foreach ($gph as $k => $gphi) {\n $ka = array_keys($gphi);\n $gph = &$this->query->createGraph();\n\n $gph->setGraphColumn($gphi[\"GraphColumn\"]);\n\n $gph->setTitle($gphi[\"Title\"]);\n $gph->setXtitle($gphi[\"XTitle\"]);\n $gph->setXlabelColumn($gphi[\"XLabelColumn\"]);\n $gph->setYtitle($gphi[\"YTitle\"]);\n //$gph->setYlabelColumn($gphi[\"YLabelColumn\"]);\n //////HERE!!!\n if (array_key_exists(\"GraphWidth\", $gphi)) {\n $gph->setWidth($gphi[\"GraphWidth\"]);\n $gph->setHeight($gphi[\"GraphHeight\"]);\n $gph->setWidthPdf($gphi[\"GraphWidthPDF\"]);\n $gph->setHeightPdf($gphi[\"GraphHeightPDF\"]);\n } else {\n $gph->setWidth($gphi[\"Width\"]);\n $gph->setHeight($gphi[\"Height\"]);\n }\n\n if (array_key_exists(\"GraphColor\", $gphi)) {\n $gph->setGraphColor($gphi[\"GraphColor\"]);\n $gph->setGrid($gphi[\"GridPosition\"],\n $gphi[\"XGridDisplay\"], $gphi[\"XGridColor\"],\n $gphi[\"YGridDisplay\"], $gphi[\"YGridColor\"]\n );\n $gph->setTitleFont($gphi[\"TitleFont\"], $gphi[\"TitleFontStyle\"],\n $gphi[\"TitleFontSize\"], $gphi[\"TitleColor\"]);\n $gph->setXtitleFont($gphi[\"XTitleFont\"], $gphi[\"XTitleFontStyle\"],\n $gphi[\"XTitleFontSize\"], $gphi[\"XTitleColor\"]);\n $gph->setYtitleFont($gphi[\"YTitleFont\"], $gphi[\"YTitleFontStyle\"],\n $gphi[\"YTitleFontSize\"], $gphi[\"YTitleColor\"]);\n $gph->setXaxis($gphi[\"XTickInterval\"], $gphi[\"XTickLabelInterval\"], $gphi[\"XAxisColor\"]);\n $gph->setYaxis($gphi[\"YTickInterval\"], $gphi[\"YTickLabelInterval\"], $gphi[\"YAxisColor\"]);\n $gph->setXaxisFont($gphi[\"XAxisFont\"], $gphi[\"XAxisFontStyle\"],\n $gphi[\"XAxisFontSize\"], $gphi[\"XAxisFontColor\"]);\n $gph->setYaxisFont($gphi[\"YAxisFont\"], $gphi[\"YAxisFontStyle\"],\n $gphi[\"YAxisFontSize\"], $gphi[\"YAxisFontColor\"]);\n $gph->setMarginColor($gphi[\"MarginColor\"]);\n $gph->setMargins($gphi[\"MarginLeft\"], $gphi[\"MarginRight\"],\n $gphi[\"MarginTop\"], $gphi[\"MarginBottom\"]);\n }\n foreach ($gphi[\"Plots\"] as $pltk => $pltv) {\n $pl = &$gph->createPlot($pltv[\"PlotColumn\"]);\n $pl[\"type\"] = $pltv[\"PlotType\"];\n $pl[\"fillcolor\"] = $pltv[\"FillColor\"];\n $pl[\"linecolor\"] = $pltv[\"LineColor\"];\n $pl[\"legend\"] = $pltv[\"Legend\"];\n }\n }\n }\n\n } // Output\n\n // Check for Criteria Items ...\n\n if (($crt = &$this->getArrayElement($ef, \"Criteria\"))) {\n foreach ($crt as $ci) {\n $critnm = $this->getArrayElement($ci, \"Name\");\n\n $crittb = $this->getArrayElement($ci, \"QueryTableName\");\n $critcl = $this->getArrayElement($ci, \"QueryColumnName\");\n $linked_report = $this->getArrayElement($ci, \"LinkToReport\");\n $linked_report_item = $this->getArrayElement($ci, \"LinkToReportItem\");\n\n // If we are not designing a report then\n // replace a linked criteria with the criteria\n // item it links to from another report\n if ($linked_report && $this->query->execute_mode != \"MAINTAIN\") {\n $q = new Reportico();\n $q->reports_path = $q->projects_folder . \"/\" . ReporticoApp::getConfig(\"project\");\n $reader = new XmlReader($q, $linked_report, false);\n $reader->xml2query();\n\n foreach ($q->lookup_queries as $k => $v) {\n\n $found = false;\n foreach ($this->query->columns as $querycol) {\n if ($querycol->query_name == $v->query_name) {\n $found = true;\n }\n }\n\n $qu = new Reportico();\n if ($linked_report_item == $v->query_name) {\n $this->query->lookup_queries[$v->query_name] = $v;\n }\n\n }\n continue;\n }\n\n if ($crittb) {\n $critcl = $crittb . \".\" . $critcl;\n $crittb = \"\";\n }\n $crittp = $this->getArrayElement($ci, \"CriteriaType\");\n $critlt = $this->getArrayElement($ci, \"CriteriaList\");\n $crituse = $this->getArrayElement($ci, \"Use\");\n $critds = $this->getArrayElement($ci, \"CriteriaDisplay\");\n $critexp = $this->getArrayElement($ci, \"ExpandDisplay\");\n $critmatch = $this->getArrayElement($ci, \"MatchColumn\");\n $critdefault = $this->getArrayElement($ci, \"CriteriaDefaults\");\n $crithelp = $this->getArrayElement($ci, \"CriteriaHelp\");\n $crittitle = $this->getArrayElement($ci, \"Title\");\n $crit_required = $this->getArrayElement($ci, \"CriteriaRequired\");\n $crit_hidden = $this->getArrayElement($ci, \"CriteriaHidden\");\n $crit_display_group = $this->getArrayElement($ci, \"CriteriaDisplayGroup\");\n $crit_lookup_return = $this->getArrayElement($ci, \"ReturnColumn\");\n $crit_lookup_display = $this->getArrayElement($ci, \"DisplayColumn\");\n $crit_criteria_display = $this->getArrayElement($ci, \"OverviewColumn\");\n\n if ($crittp == \"ANYCHAR\") {\n $crittp = \"TEXTFIELD\";\n }\n\n if ($critds == \"ANYCHAR\") {\n $critds = \"TEXTFIELD\";\n }\n\n if ($critexp == \"ANYCHAR\") {\n $critexp = \"TEXTFIELD\";\n }\n\n // Generate criteria lookup info unless its a link to a criteria in a nother report\n if (!$linked_report && !($ciq = &$this->getArrayElement($ci, \"Query\"))) {\n continue;\n }\n\n $critquery = new Reportico();\n\n // Generate Criteria Query Columns\n if (!$linked_report && ($ciqc = &$this->getArrayElement($ciq, \"QueryColumns\"))) {\n foreach ($ciqc as $ccol) {\n $in_query = true;\n if (!$ccol[\"ColumnName\"]) {\n $in_query = false;\n }\n\n if ( !$crit_lookup_display ) $crit_lookup_display = $ccol[\"Name\"];\n if ( !$crit_lookup_return ) $crit_lookup_return = $ccol[\"Name\"];\n $critquery->createCriteriaColumn\n (\n $ccol[\"Name\"],\n $ccol[\"TableName\"],\n $ccol[\"ColumnName\"],\n $ccol[\"ColumnType\"],\n $ccol[\"ColumnLength\"],\n \"###.##\",\n $in_query\n );\n }\n }\n // Generate Order By List\n if (!$linked_report && ($coc = &$this->getArrayElement($ciq, \"OrderColumns\"))) {\n // Generate QueryColumn for each column found\n foreach ($coc as $col) {\n $critquery->createOrderColumn\n (\n $col[\"Name\"],\n $col[\"OrderType\"]\n );\n }\n }\n\n if (!$linked_report && ($as = &$this->getArrayElement($ciq, \"Assignments\"))) {\n foreach ($as as $ast) {\n if (array_key_exists(\"AssignName\", $ast)) {\n $critquery->addAssignment($ast[\"AssignName\"], $ast[\"Expression\"], $ast[\"Condition\"]);\n } else {\n $critquery->addAssignment($ast[\"Name\"], $ast[\"Expression\"], $ast[\"Condition\"]);\n }\n\n }\n }\n\n // Generate Criteria Links In Array for later use\n if (!$linked_report && ($cl = &$this->getArrayElement($ci, \"CriteriaLinks\"))) {\n foreach ($cl as $clitem) {\n $criteria_links[] = array(\n \"LinkFrom\" => $clitem[\"LinkFrom\"],\n \"LinkTo\" => $clitem[\"LinkTo\"],\n \"LinkClause\" => $clitem[\"LinkClause\"],\n );\n }\n }\n\n // Set Query SQL Text\n if (!$linked_report) {\n $critquery->table_text = $this->getArrayElement($ciq, \"TableSql\");\n $critquery->where_text = $this->getArrayElement($ciq, \"WhereSql\");\n $critquery->group_text = $this->getArrayElement($ciq, \"GroupSql\");\n $critquery->sql_raw = $this->getArrayElement($ciq, \"SQLRaw\");\n $critquery->rowselection = $this->getArrayElement($ciq, \"RowSelection\");\n }\n $critquery->setLookupReturn($crit_lookup_return);\n $critquery->setLookupDisplay($crit_lookup_display, $crit_criteria_display);\n $critquery->setLookupExpandMatch($critmatch);\n $this->query->setCriteriaLookup($critnm, $critquery, $crittb, $critcl);\n $this->query->setCriteriaInput($critnm, $crittp, $critds, $critexp, $crituse);\n $this->query->setCriteriaLinkReport($critnm, $linked_report, $linked_report_item);\n\n $this->query->setCriteriaDefaults($critnm, $critdefault);\n $this->query->setCriteriaList($critnm, $critlt);\n //var_dump($crit_required);\n $this->query->setCriteriaRequired($critnm, $crit_required);\n $this->query->setCriteriaHidden($critnm, $crit_hidden);\n $this->query->setCriteriaDisplayGroup($critnm, $crit_display_group);\n //$this->query->setCriteriaHelp($critnm, $crithelp);\n $this->query->setCriteriaAttribute($critnm, \"column_title\", $crittitle);\n\n $this->query->setCriteriaHelp($critnm, $crithelp);\n\n } // End Criteria Item\n\n // Set up any Criteria Links\n foreach ($criteria_links as $cl) {\n $this->query->setCriteriaLink($cl[\"LinkFrom\"], $cl[\"LinkTo\"], $cl[\"LinkClause\"]);\n }\n }\n }\n\n }", "function getQuery() {\n\n\t\t$qpa = db_construct_qpa() ;\n\n\t\tif (forge_get_config('use_fti')) {\n\t\t\t$words = $this->getFTIwords();\n\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t 'SELECT x.* FROM (SELECT forum.group_forum_id, forum.msg_id, ts_headline(forum.subject, $1::tsquery) AS subject, forum.post_date, users.realname, forum.subject||$2||forum.body as full_string_agg, forum_idx.vectors FROM forum, users, to_tsquery($1) AS q, forum_idx WHERE forum.group_forum_id = $3 AND forum.posted_by = users.user_id AND forum_idx.msg_id = forum.msg_id GROUP BY forum.group_forum_id, forum.msg_id, subject, body, post_date, realname, forum_idx.vectors) AS x WHERE vectors @@ $1::tsquery ',\n\t\t\t\t\t\t array ($words,\n\t\t\t\t\t\t\t$this->field_separator,\n\t\t\t\t\t\t\t$this->forumId)) ;\n\t\t\t$phraseOp = $this->getOperator();\n\n\t\t\tif(count($this->phrases)) {\n\t\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t\t 'AND (') ;\n\t\t\t\t$qpa = $this->addMatchCondition($qpa, 'full_string_agg');\n\t\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t\t ') ') ;\n\t\t\t}\n\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t 'ORDER BY ts_rank(vectors, $1) DESC',\n\t\t\t\t\t\t array($words)) ;\n\t\t} else {\n\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t 'SELECT x.* FROM (SELECT forum.group_forum_id, forum.msg_id, forum.subject, forum.post_date, users.realname, forum.subject||$1||forum.body as full_string_agg FROM forum,users WHERE users.user_id=forum.posted_by AND forum.group_forum_id=$2 GROUP BY forum.group_forum_id, msg_id, subject, post_date, realname, body) AS x WHERE ',\n\t\t\t\t\t\t array ($this->field_separator,\n\t\t\t\t\t\t\t$this->forumId)) ;\n\t\t\t$qpa = $this->addIlikeCondition ($qpa, 'full_string_agg') ;\n\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t ' ');\n\t\t}\n\t\treturn $qpa ;\n\t}", "function buildTaxonQuery($params) {\n $url = \"https://laji.fi/api/taxa?langFallback=false&selectedFields=vernacularName,id,scientificName,synonyms.scientificName&lang=fi&pageSize=\" . $params['pageSize'] . \"&page=\" . $params['page'];\n debugData($url, __LINE__);\n return $url;\n}", "function query() {}", "function query_publications_from_specimen ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\n\t$xml = '';\n\t\n\t$sparql = '\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX dcterms: <http://purl.org/dc/terms/>\nPREFIX bibo: <http://purl.org/ontology/bibo/>\n\nCONSTRUCT \n{\n ?pub bibo:doi ?o .\n?pub dcterms:title ?doi .\n?pub rdf:type ?t .\n}\nWHERE\n{\n ?s dcterms:relation <' . $uri . '> .\n?s dcterms:isReferencedBy ?pub . \n?pub rdf:type ?t .\n?pub bibo:doi ?o .\n?pub dcterms:title ?doi .\n \n}';\n\n//echo $sparql;\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_soal_siswa';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function addQuery() {}", "public function constructQuery(){\n try {\n // Sparql11query.g:59:3: ( CONSTRUCT constructTemplate ( datasetClause )* whereClause solutionModifier ) \n // Sparql11query.g:60:3: CONSTRUCT constructTemplate ( datasetClause )* whereClause solutionModifier \n {\n $this->match($this->input,$this->getToken('CONSTRUCT'),self::$FOLLOW_CONSTRUCT_in_constructQuery215); \n $this->pushFollow(self::$FOLLOW_constructTemplate_in_constructQuery217);\n $this->constructTemplate();\n\n $this->state->_fsp--;\n\n // Sparql11query.g:60:31: ( datasetClause )* \n //loop8:\n do {\n $alt8=2;\n $LA8_0 = $this->input->LA(1);\n\n if ( ($LA8_0==$this->getToken('FROM')) ) {\n $alt8=1;\n }\n\n\n switch ($alt8) {\n \tcase 1 :\n \t // Sparql11query.g:60:31: datasetClause \n \t {\n \t $this->pushFollow(self::$FOLLOW_datasetClause_in_constructQuery219);\n \t $this->datasetClause();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop8;\n }\n } while (true);\n\n $this->pushFollow(self::$FOLLOW_whereClause_in_constructQuery222);\n $this->whereClause();\n\n $this->state->_fsp--;\n\n $this->pushFollow(self::$FOLLOW_solutionModifier_in_constructQuery224);\n $this->solutionModifier();\n\n $this->state->_fsp--;\n\n\n }\n\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 ;\n }", "public function datasetClause(){\n try {\n // Sparql11query.g:85:3: ( FROM ( defaultGraphClause | namedGraphClause ) ) \n // Sparql11query.g:86:3: FROM ( defaultGraphClause | namedGraphClause ) \n {\n $this->match($this->input,$this->getToken('FROM'),self::$FOLLOW_FROM_in_datasetClause316); \n // Sparql11query.g:87:3: ( defaultGraphClause | namedGraphClause ) \n $alt14=2;\n $LA14_0 = $this->input->LA(1);\n\n if ( ($LA14_0==$this->getToken('IRI_REF')||$LA14_0==$this->getToken('PNAME_NS')||$LA14_0==$this->getToken('PNAME_LN')) ) {\n $alt14=1;\n }\n else if ( ($LA14_0==$this->getToken('NAMED')) ) {\n $alt14=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 14, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt14) {\n case 1 :\n // Sparql11query.g:88:5: defaultGraphClause \n {\n $this->pushFollow(self::$FOLLOW_defaultGraphClause_in_datasetClause326);\n $this->defaultGraphClause();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:89:7: namedGraphClause \n {\n $this->pushFollow(self::$FOLLOW_namedGraphClause_in_datasetClause334);\n $this->namedGraphClause();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n\n\n }\n\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 ;\n }", "public function __construct() {\n\t\t$conf = ConfigFramework::getConfig();\n\t\t$g_dsn = $conf->getDSN('g_my');\n\n\t\t$nombreTablas= array('tasoka_historial_analitica');\n\t\tparent::__construct($g_dsn, $nombreTablas);\n\n\t\t/************************ QUERYs ************************/\n\t\t//Consulta del modo de trabajo LIS\n\t\t//$str_select = \"SELECT id_animal as \\\"id_animal\\\", id_bacteria as \\\"lis_id_bacteria\\\", fecha as \\\"lis_fecha\\\", resultado as \\\"lis_resultado\\\" FROM tasoka_analitica\";\n\t\t//$this->setSelectForSearchQuery($str_select);\n\n\t\t//Where del modo de trabajo LIS\n\t\t//$str_where = \"\";\n\t\t//$this->setWhereForSearchQuery($str_where);\n\n\t\t//Order del modo de trabajo LIS\n\t\t//$this->setOrderByForSearchQuery('1');\n\n\n\t\t//Consulta del modo de trabajo EDI\n\t\t$str_select = \"SELECT id_animal as \\\"id_animal\\\", fecha as \\\"edi_fecha\\\",nombre_fichero as \\\"edi_nombre_fichero\\\" FROM tasoka_historial_analitica\";\t\t \n\t\t$this->setSelectForSearchQuery($str_select);\n\n\t\t//Where del modo de trabajo EDI\t\t \n\t\t//$str_where_editar = \"\";\n\t\t//$this->setWhereForEditQuery($str_where_editar);\n\n\t\t//Order del modo de trabajo EDI\n\t\t$this->setOrderByForSearchQuery('2 desc');\n\n\t\t/************************ END QUERYs ************************/\n\n\n\t\t/************************ MATCHINGs ************************/\n\n\t\t//Seccion de matching: asociacion campos TPL y campos BD\n\t\t\n\t\t//Modo de trabajo LIS\n\t\t$this->addMatching(\"id_animal\",\"id_animal\",\"tasoka_historial_analitica\");\n\t\t//$this->addMatching(\"edi_animal\",\"\",\"tasoka_analitica\");\n\t\t//$this->addMatching(\"lis_id_bacteria\",\"id_bacteria\",\"tasoka_analitica\");\n\t\t//$this->addMatching(\"edi_id_bacteria\",\"\",\"tasoka_analitica\");\n\t\t//$this->addMatching(\"lis_fecha\",\"fecha\",\"tasoka_analitica\");\n\t\t$this->addMatching(\"edi_fecha\",\"fecha\",\"tasoka_historial_analitica\");\n\t//\t$this->addMatching(\"lis_resultado\",\"resultado\",\"tasoka_analitica\");\n\t\t//$this->addMatching(\"edi_resultado\",\"\",\"tasoka_analitica\");\n\n\t\t/************************ END MATCHINGs ************************/\n\n\n\t\t/************************ TYPEs ************************/\n\t\n\t\t//Fechas: gvHidraDate type\n\t\t$fecha = new gvHidraDate(false);\n //\t$fecha->setCalendar(false);\n //\t$this->addFieldType('lis_fecha',$fecha);\n\t\t$fecha->setCalendar(true);\n\t\t$this->addFieldType('edi_fecha',$fecha);\n\n\n\t\t//Strings: gvHidraString type\n\t//\t$string = new gvHidraString(false, 1);\n\t//\t$this->addFieldType('lis_resultado',$string);\n\t//\t$this->addFieldType('edi_resultado',$string);\n\t\t\n\n\t\t//Integers: gvHidraInteger type\n\t\t$int = new gvHidraInteger(false, 10);\n\t//\t$this->addFieldType('lis_id_animal',$int);\t\t\n\t\t$this->addFieldType('id_animal',$int);\n\t\t\n\t\t\n\n\t\t//Floats: gvHidraFloat type\n\n\t\t/************************ END TYPEs ************************/\n\t\t\t\t\n\t\t/************************ COMPONENTS ************************/\n\t\t\n\t\t//Declaracion de Listas y WindowSelection\n\t\t//La definición debe estar en el AppMainWindow.php\n $listaBacteriasM= new gvHidraList(\"edi_bacteriasM\",'BACTERIAS');\n\t\t$this->addList($listaBacteriasM);\n\t\t\n\t//\t$listaEmbarcacionM = new IgepLista(\"embarcacionM\",\"SERVICIOS\");\n\t//\t$this->addList($listaEmbarcacionM);\n\t\t$lista_analitica_consta= new gvHidraList(\"edi_analitica_consta\");\n\t\t//$telefonos->setDependence(array(\"id\"),array(\"UsuarioTelefono.idUsuario\"));\n\t\t$this->addList($lista_analitica_consta);\n\n\t\t\n\t\t$lista_estado=new gvHidraList(\"edi_estado\");\n\t\t$lista_estado->addOption('Positivo','Positivo');\n\t\t$lista_estado->addOption('Negativo','Negativo');\n\t\t//$lista_estado->setRadio(true);\n\t\t$this->addList($lista_estado);\n\t\t/************************ END COMPONENTS ************************/\t\t\t\t\t\t\n\t\t\n\t\t//Asociamos con la clase maestro\t\n\t\t$this->addMaster(\"Tasoka_animales2\");\n\t\t\n\t}", "abstract public function query();", "function do_feed_rdf()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "function loadBasicItems () {\n\t\t$items = $this->tfc->getSPARQLitems ( \"SELECT ?q { ?q wdt:P31 wd:Q37748 ; wdt:P703 wd:{$this->gffj->species} }\" ) ;\n\t\t$items[] = $this->gffj->species ;\n\t\t$this->wil->loadItems ( $items ) ;\n\t\t$this->gffj->chr2q = [] ;\n\t\tforeach ( $items AS $q ) {\n\t\t\t$i = $this->wil->getItem ( $q ) ;\n\t\t\tif ( !isset($i) ) continue ;\n\t\t\tif ( !$i->hasTarget ( 'P31' , 'Q37748' ) ) continue ;\n\t\t\t$l = $i->getLabel ( 'en' , true ) ;\n\t\t\t$this->gffj->chr2q[$l] = $q ;\n\t\t}\n\n\t\t# All genes for this species with GeneDB ID\n\t\t$sparql = \"SELECT ?q ?genedb { ?q wdt:P31 wd:Q7187 ; wdt:P703 wd:{$this->gffj->species} ; wdt:P3382 ?genedb }\" ;\n\t\t$j = $this->tfc->getSPARQL ( $sparql ) ;\n//\t\tif ( !isset($j->results) or !isset($j->results->bindings) or count($j->results->bindings) == 0 ) die ( \"SPARQL loading of genes failed\\n\" ) ;\n\t\tforeach ( $j->results->bindings AS $v ) {\n\t\t\t$q = $this->tfc->parseItemFromURL ( $v->q->value ) ;\n\t\t\tif ( !$this->isRealItem($q) ) continue ;\n\t\t\t$genedb_id = $v->genedb->value ;\n\t\t\tif ( isset($this->genedb2q[$genedb_id]) ) die ( \"Double genedb {$genedb_id} for gene {$q} and {$this->genedb2q[$genedb_id]}\\n\" ) ;\n\t\t\t$this->genedb2q[$genedb_id] = $q ;\n\t\t}\n\n\t\t# All protein for this species with GeneDB ID\n\t\t$j = $this->tfc->getSPARQL ( \"SELECT ?q ?genedb { ?q wdt:P31 wd:Q8054 ; wdt:P703 wd:{$this->gffj->species} ; wdt:P3382 ?genedb }\" ) ;\n//\t\tif ( !isset($j->results) or !isset($j->results->bindings) ) die ( \"SPARQL loading of proteins failed\\n\" ) ;\n\t\tforeach ( $j->results->bindings AS $v ) {\n\t\t\t$q = $this->tfc->parseItemFromURL ( $v->q->value ) ;\n\t\t\tif ( !$this->isRealItem($q) ) continue ;\n\t\t\t$genedb_id = $v->genedb->value ;\n\t\t\tif ( isset($this->protein_genedb2q[$genedb_id]) ) die ( \"Double genedb {$genedb_id} for protein {$q} and {$this->protein_genedb2q[$genedb_id]}\\n\" ) ;\n\t\t\t$this->protein_genedb2q[$genedb_id] = $q ;\n\t\t}\n\n\t\t# Evidence codes\n\t\t$sparql = 'SELECT ?q ?qLabel { ?q wdt:P31 wd:Q23173209 SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" } }' ;\n\t\t$j = $this->tfc->getSPARQL ( $sparql ) ;\n\t\tforeach ( $j->results->bindings AS $b ) {\n\t\t\t$label = $b->qLabel->value ;\n\t\t\t$eq = $this->tfc->parseItemFromURL ( $b->q->value ) ;\n\t\t\t$this->evidence_codes[$label] = $eq ;\n\t\t}\n\n\t\t$to_load = array_merge (\n\t\t\tarray_values($this->genedb2q),\n\t\t\tarray_values($this->protein_genedb2q),\n\t\t\tarray_values($this->evidence_codes)\n\t\t) ;\n\t\t$this->wil->loadItems ( $to_load ) ; # TODO turn on\n\t}", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public static function query();", "function sbn_search($ccl_query) {\n global $_SBN;\n // let YAZ parse the query and check for error\n $result = yaz_ccl_parse($this->conn, $ccl_query, $ccl_result);\n if (!$result) {\n throw new sbn_exception(\"La query non puo' essere processata\");\n } else {\n // fetch RPN result from the parser\n $rpn = $ccl_result[\"rpn\"];\n // do the actual query\n yaz_search($this->conn, \"rpn\", $rpn);\n // wait blocks until the query is done\n yaz_wait();\n if (yaz_error($this->conn) != \"\") {\n throw new sbn_exception(\"Error: \" . yaz_error($this->conn).\"<br>\");\n }\n // yaz_hits returns the amount of found records\n /*\n $hits = yaz_hits($this->conn);\n if ($hits > 0) {\n //echo \"Found \".$hits .\" hits:<br>\";\n // yaz_record fetches a record from the current result set,\n // so far I've only seen server supporting string format\n //$result = yaz_record($this->conn, 1, \"string\");\n //print($result);\n //echo \"<br><br>\";\n // the parsing functions will be introduced later\n /*\n if ($_SBN['syntax'] == \"mab\") {\n $parsedResult = parse_mab_string($result);\n } else {\n $parsedResult = parse_usmarc_string($result);\n }\n print_r($parsedResult);\n } else {\n echo \"No records found.\";\n }\n */\n }\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM answer';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function getQuery() ;", "public function query();", "public function query();", "public function query();", "public function verb(){\n try {\n // Sparql11query.g:301:3: ( varOrIRIref | A ) \n $alt40=2;\n $LA40_0 = $this->input->LA(1);\n\n if ( ($LA40_0==$this->getToken('IRI_REF')||$LA40_0==$this->getToken('PNAME_NS')||$LA40_0==$this->getToken('PNAME_LN')||($LA40_0>=$this->getToken('VAR1') && $LA40_0<=$this->getToken('VAR2'))) ) {\n $alt40=1;\n }\n else if ( ($LA40_0==$this->getToken('A')) ) {\n $alt40=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 40, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt40) {\n case 1 :\n // Sparql11query.g:302:3: varOrIRIref \n {\n $this->pushFollow(self::$FOLLOW_varOrIRIref_in_verb1041);\n $this->varOrIRIref();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:303:5: A \n {\n $this->match($this->input,$this->getToken('A'),self::$FOLLOW_A_in_verb1047); \n\n }\n break;\n\n }\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 ;\n }", "abstract protected function getQuery();", "public abstract function get_query();", "public function rdfLiteral(){\n try {\n // Sparql11query.g:531:3: ( string ( LANGTAG | ( REFERENCE iriRef ) )? ) \n // Sparql11query.g:532:3: string ( LANGTAG | ( REFERENCE iriRef ) )? \n {\n $this->pushFollow(self::$FOLLOW_string_in_rdfLiteral1945);\n $this->string();\n\n $this->state->_fsp--;\n\n // Sparql11query.g:533:3: ( LANGTAG | ( REFERENCE iriRef ) )? \n $alt58=3;\n $LA58_0 = $this->input->LA(1);\n\n if ( ($LA58_0==$this->getToken('LANGTAG')) ) {\n $alt58=1;\n }\n else if ( ($LA58_0==$this->getToken('REFERENCE')) ) {\n $alt58=2;\n }\n switch ($alt58) {\n case 1 :\n // Sparql11query.g:534:5: LANGTAG \n {\n $this->match($this->input,$this->getToken('LANGTAG'),self::$FOLLOW_LANGTAG_in_rdfLiteral1955); \n\n }\n break;\n case 2 :\n // Sparql11query.g:535:7: ( REFERENCE iriRef ) \n {\n // Sparql11query.g:535:7: ( REFERENCE iriRef ) \n // Sparql11query.g:535:8: REFERENCE iriRef \n {\n $this->match($this->input,$this->getToken('REFERENCE'),self::$FOLLOW_REFERENCE_in_rdfLiteral1964); \n $this->pushFollow(self::$FOLLOW_iriRef_in_rdfLiteral1966);\n $this->iriRef();\n\n $this->state->_fsp--;\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\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 ;\n }", "function createQuery() ;", "public function printQueryLibrary()\n {\n\n\t $querylibrary = simplexml_load_file(TRANSACTION_COMPONENT_QUERY_LIB);\n\t foreach ($querylibrary->query as $query)\n\t\t {\n\t\t printf(\"Query Id : %s\\n\", $query['id']);\n\t\t printf(\"Query Title : %s\\n\", $query->title);\n\t\t printf(\"Query Content: %s\\n\", $query->content);\n\t }\n return null;\n\t}", "public static function query()\n {\n }", "public function searchAction(){\t\t\n\t\t\t// startup: get translater and create windowTitel\t\t\t\t \n\t\t\t$translate = $this->_owApp->translate;\n $windowTitle = $translate->_('Search results');\n $this->view->placeholder('main.window.title')->set($windowTitle);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t// get search string from input field (searchbox.phtml)\n\t\t\t$nameOfPerson = $this->getParam('nameOfPerson');\n\t\t\t\t\t\t\n\t\t\tif (!empty($nameOfPerson)){\n\t\t\t\t// create query\n\t\t\t\t$query = new Erfurt_Sparql_SimpleQuery(); \n\t\t\t\t$query->setProloguePart('SELECT ?resourceUri ?Name ?yearOfBirth ?placeOfBirth ?yearOfDeath ?placeOfDeath ?labor') \n\t\t\t\t\t ->setWherePart('WHERE {'. '?resourceUri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>'. '<http://drw-model.saw-leipzig.de/Person> . '.\n\t\t\t\t\t\t\t\t\t\t\t'?resourceUri <http://www.w3.org/2000/01/rdf-schema#label> ?Name . '.\t\t\t \t\t\n\t\t\t\t\t\t\t\t\t\t\t'?resourceUri <http://drw-model.saw-leipzig.de/yearOfBirth> ?yearOfBirth . '.\n\t\t\t\t\t\t\t\t\t\t\t'?resourceUri <http://drw-model.saw-leipzig.de/placeOfBirth> ?placeOfBirth . '.\n\t\t\t\t\t\t\t\t\t\t\t'?resourceUri <http://drw-model.saw-leipzig.de/yearOfDeath> ?yearOfDeath . '.\n\t\t\t\t\t\t\t\t\t\t\t'?resourceUri <http://drw-model.saw-leipzig.de/placeOfDeath> ?placeOfDeath . '.\n\t\t\t\t\t\t\t\t\t\t\t'?resourceUri <http://drw-model.saw-leipzig.de/labor> ?labor . '.\n\t\t\t\t\t\t\t\t\t\t\t'FILTER regex (?Name, \"'.$nameOfPerson.'\", \"i\" )}');\t\t\t\t\t\t\t\t\n\t\t\t\t/////////// ToDo:\n\t\t\t\t// model = DRW-Katalog\t\t\t\t\t\t\t\n\t\t\t\t$this->model = $this->_owApp->selectedModel;\n\t\t\t\t$queryResult = $this->model->sparqlQuery($query);\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t$header = array ();\t\t\n\t\t\t\tif (is_array($queryResult) && isset ($queryResult[0]) && is_array($queryResult[0])) {\n\t\t\t\t\t$header = array_keys($queryResult[0]);\n\t\t\t\t}else {\n\t\t\t\t\t$queryResult = 'No Person was found for \"%s\".';\n\t\t\t\t\t$queryResult = sprintf($translate->_($queryResult), $nameOfPerson);\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t\t// set strings to view -> search.phtml can access strings from view\t\t\n\t\t\t\t$this->view->urlBase = $this->_config->urlBase;\t\t\t\n\t\t\t\t$this->view->header = $header;\n\t\t\t\t$this->view->queryResult = $queryResult;\n\t\t\t} else /* if empty($nameOfPerson) */{\n\t\t\t\t$this->view->queryResult = $translate->_('Please enter a search item.');\n\t\t\t}\n\t\t}", "function owl_query($endpoint, $onturi, $query, $type) {\n $url = $endpoint . '?query=' . urlencode($query) . \n '&type=' . strtolower($type) .\n '&ontology=' . $onturi;\n //print $url;\n $request = curl_init($url);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Accept: application/json'\n ));\n\n $result = curl_exec($request);\n $info = curl_getinfo($request);\n\n // TODO: Reasonable error handling\n if($result === '' || $info['http_code'] != 200) {\n return;\n }\n \n curl_close($request);\n\n return $result;\n}", "function sparql_describe($sparql_endpoint, $uri, $format='application/ld+json')\n{\n\t$url = $sparql_endpoint;\n\t\n\t// Query is string\n\t$data = 'query=' . urlencode('DESCRIBE <' . $uri . '>');\n\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Accept: \" . $format));\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\n\t$response = curl_exec($ch);\n\tif($response == FALSE) \n\t{\n\t\t$errorText = curl_error($ch);\n\t\tcurl_close($ch);\n\t\tdie($errorText);\n\t}\n\t\n\t$info = curl_getinfo($ch);\n\t$http_code = $info['http_code'];\n\t\n\tif ($http_code != 200)\n\t{\n\t\techo $response;\t\n\t\tdie (\"Triple store returned $http_code\\n\");\n\t}\n\t\n\tcurl_close($ch);\n\t\n\t// Fuseki returns nicely formatted JSON-LD, Blazegraph returns array of horrible JSON-LD\n\t// as first element of an array\n\t\n\t$obj = json_decode($response);\n\tif (is_array($obj))\n\t{\n\t\t$doc = $obj[0];\n\t\t\n\t\t$context = (object)array(\n\t\t\t'@vocab' => 'http://schema.org/',\t\t\t\n\t\t\t'dwc' => 'http://rs.tdwg.org/dwc/terms/',\t\t\t\n\t\t\t'rdfs' => 'http://www.w3.org/2000/01/rdf-schema#',\t\t\t\n\t\t\t'tc' => 'http://rs.tdwg.org/ontology/voc/TaxonConcept#',\t\t\t\n\t\t\t'taxref' => 'http://taxref.mnhn.fr/lod/property/',\n\t\t);\n\t\n\t\t$compacted = jsonld_compact($doc, $context);\n\t\t\n\t\t$response = json_encode($compacted, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\t\t\n\t}\n\t\n\n\treturn $response;\n}", "function bundlePsgrDbpedia($regions, $outfile1, $outfile2, $outfile3, $outfile4) \r\n{\r\n global $NL;\r\n \r\n $cnt1 = $cnt2 = $cnt3 = 0;\r\n\r\n // Backup files\r\n backupFile($outfile1);\r\n backupFile($outfile2);\r\n backupFile($outfile3);\r\n backupFile($outfile4);\r\n \r\n foreach ($regions as $rec) {\r\n if (!empty($rec[0]) && !empty($rec[1]) && !empty($rec[2]) && !empty($rec[3])) {\r\n $endpoint = 'http://publicspending.medialab.ntua.gr/sparql?';\r\n $format = 'json';\r\n $term = $rec[1];\r\n $case = \"dbpedia1\";\r\n \r\n dout(\"--------- Region: $rec[1] ---------\");\r\n \r\n $search = explode(\",\",\"ή,ί,ύ,ό,ώ,ά,έ,ϊ,ΐ,Ή,Ί,Ύ,Ό,Ώ,Ά,Έ, - ,-, & ,&, και,Ελλαδας,νησων\");\r\n $replace = explode(\",\",\"η,ι,υ,ο,ω,α,ε,ι,ι,Η,Ι,Υ,Ο,Ω,Α,Ε,.*,.*,.*,.*,.*,Ελλαδ.ς,νησ.*ν\");\r\n $term = str_replace($search, $replace, $term);\r\n\r\n dout(\"--------- Search criteria: $term ---------\");\r\n \r\n $requestURL = createRequestURL($endpoint, $format, $term, $case);\r\n //echo $requestURL;\r\n $responseArray = json_decode(request($requestURL), true);\r\n $cnt = count($responseArray['results']['bindings']);\r\n //echo printArray($responseArray); \r\n\r\n if ($cnt==0) {\r\n \tdout(\"<span style='color:red;'>--------- Results: [$cnt] ---------</span>\");\r\n\t\t\t$cnt1++;\r\n }\r\n elseif ($cnt==1) {\r\n \tdout(\"<span style='color:green;'>--------- Results: [$cnt] ---------</span>\");\r\n\t\t\t$cnt2++;\r\n }\r\n elseif ($cnt>1) {\r\n \tdout(\"<span style='color:blue;'>--------- Results: [$cnt] ---------</span>\");\r\n\t\t\t$cnt3++;\r\n }\r\n\r\n if ($cnt>0) {\r\n\r\n \t$s_org = $responseArray['results']['bindings'][0]['org']['value'];\r\n \t \r\n \tforeach ($responseArray['results']['bindings'] as $res) {\r\n \t\t$validName = $res['validName']['value'];\r\n \t\t$cpaCode = $res['cpaCode']['value'];\r\n \t\t$regDate = mb_substr($res['regDate']['value'],0,10);\r\n \t\t$stopDate = mb_substr($res['stopDate']['value'],0,10);\r\n \t\t\r\n \t\tdout(\"[$validName][$cpaCode][$regDate][$stopDate]\"); \t\r\n \t} // foreach\r\n \t\t \r\n \t$s = '\"'.$s_org.'\"';\r\n \t$p = '\"http://www.w3.org/2002/07/owl#sameAs\"';\r\n \t$o = '\"'.$rec[2].'\"';\r\n \t$triplet = \"$s,$p,$o\";\r\n \t \r\n \t$fp = fopen($outfile1, \"a\");\r\n \tfwrite($fp, $triplet . $NL);\r\n \tfclose($fp);\r\n \t \r\n \t$s = '\"'.$s_org.'\"';\r\n \t$p = '\"http://www.w3.org/2002/07/owl#sameAs\"';\r\n \t$o = '\"'.$rec[3].'\"';\r\n \t$triplet = \"$s,$p,$o\";\r\n \t \r\n \t$fp = fopen($outfile2, \"a\");\r\n \tfwrite($fp, $triplet . $NL);\r\n \tfclose($fp);\r\n \t \r\n \t$s = ''.$s_org.'';\r\n \t$p = ''.$rec[1].'';\r\n \t$o = ''.$responseArray['results']['bindings'][0]['validName']['value'].'';\r\n \t$triplet = \"$s;$p;$o\";\r\n \t \r\n \t$fp = fopen($outfile4, \"a\");\r\n \tfwrite($fp, $triplet . $NL);\r\n \tfclose($fp); \t\r\n\r\n \t// Old - New Region\r\n \tif ($cnt==2) {\r\n \t\tcreateRelevantOranizationsTriplets($s_org, $responseArray['results']['bindings'], $outfile3);\r\n \t} // if\r\n \t \r\n } // if\r\n \r\n }\r\n \r\n }\r\n\r\n dout(\"$cnt1(not fount),$cnt2(exact found),$cnt3(more than one)\");\r\n\r\n}", "function __construct( $namespaces = array() ) {\n \n $ns_conf = array('ns' => array('dcterms' => 'http://purl.org/dc/terms/',\n 'dc' => 'http://purl.org/dc/elements/1.1/',\n 'foaf' => 'http://xmlns.com/foaf/0.1/',\n 'fabio' => 'http://purl.org/spar/fabio/',\n 'ore' => 'http://www.openarchives.org/ore/terms/'));\n \n $this->triples = array();\n $this->rdfXmlSerializer = ARC2::getRDFXMLSerializer($ns_conf);\n\n }", "function Sparql_SparqlEncode($parser, $text) {\n $a = urlencode( $text );\n $a = strtr( $a, array( '%' => '.', '+' => '_' ) );\n # leave colons alone, however\n $a = str_replace( '.3A', ':', $a );\n # leave forward slashes alone, however\n $a = str_replace( '.2F', '/', $a );\n return $a;\n}", "public function project(){\n try {\n // Sparql11query.g:652:3: ( SELECT ( DISTINCT | REDUCED )? ( ASTERISK | ( variable | builtInCall | functionCall | ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ ) ) ) \n // Sparql11query.g:653:3: SELECT ( DISTINCT | REDUCED )? ( ASTERISK | ( variable | builtInCall | functionCall | ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ ) ) \n {\n $this->match($this->input,$this->getToken('SELECT'),self::$FOLLOW_SELECT_in_project2381); \n // Sparql11query.g:654:3: ( DISTINCT | REDUCED )? \n $alt69=2;\n $LA69_0 = $this->input->LA(1);\n\n if ( (($LA69_0>=$this->getToken('DISTINCT') && $LA69_0<=$this->getToken('REDUCED'))) ) {\n $alt69=1;\n }\n switch ($alt69) {\n case 1 :\n // Sparql11query.g: \n {\n if ( ($this->input->LA(1)>=$this->getToken('DISTINCT') && $this->input->LA(1)<=$this->getToken('REDUCED')) ) {\n $this->input->consume();\n $this->state->errorRecovery=false;\n }\n else {\n $mse = new MismatchedSetException(null,$this->input);\n throw $mse;\n }\n\n\n }\n break;\n\n }\n\n // Sparql11query.g:658:3: ( ASTERISK | ( variable | builtInCall | functionCall | ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ ) ) \n $alt73=2;\n $LA73_0 = $this->input->LA(1);\n\n if ( ($LA73_0==$this->getToken('ASTERISK')) ) {\n $alt73=1;\n }\n else if ( ($LA73_0==$this->getToken('COALESCE')||$LA73_0==$this->getToken('IF')||($LA73_0>=$this->getToken('STR') && $LA73_0<=$this->getToken('REGEX'))||$LA73_0==$this->getToken('IRI_REF')||$LA73_0==$this->getToken('PNAME_NS')||$LA73_0==$this->getToken('PNAME_LN')||($LA73_0>=$this->getToken('VAR1') && $LA73_0<=$this->getToken('VAR2'))||$LA73_0==$this->getToken('OPEN_BRACE')) ) {\n $alt73=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 73, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt73) {\n case 1 :\n // Sparql11query.g:659:5: ASTERISK \n {\n $this->match($this->input,$this->getToken('ASTERISK'),self::$FOLLOW_ASTERISK_in_project2414); \n\n }\n break;\n case 2 :\n // Sparql11query.g:661:5: ( variable | builtInCall | functionCall | ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ ) \n {\n // Sparql11query.g:661:5: ( variable | builtInCall | functionCall | ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ ) \n $alt72=4;\n $LA72 = $this->input->LA(1);\n if($this->getToken('VAR1')== $LA72||$this->getToken('VAR2')== $LA72)\n {\n $alt72=1;\n }\n else if($this->getToken('COALESCE')== $LA72||$this->getToken('IF')== $LA72||$this->getToken('STR')== $LA72||$this->getToken('LANG')== $LA72||$this->getToken('LANGMATCHES')== $LA72||$this->getToken('DATATYPE')== $LA72||$this->getToken('BOUND')== $LA72||$this->getToken('SAMETERM')== $LA72||$this->getToken('ISIRI')== $LA72||$this->getToken('ISURI')== $LA72||$this->getToken('ISBLANK')== $LA72||$this->getToken('ISLITERAL')== $LA72||$this->getToken('REGEX')== $LA72)\n {\n $alt72=2;\n }\n else if($this->getToken('IRI_REF')== $LA72||$this->getToken('PNAME_NS')== $LA72||$this->getToken('PNAME_LN')== $LA72)\n {\n $alt72=3;\n }\n else if($this->getToken('OPEN_BRACE')== $LA72)\n {\n $alt72=4;\n }\n else{\n $nvae =\n new NoViableAltException(\"\", 72, 0, $this->input);\n\n throw $nvae;\n }\n\n switch ($alt72) {\n case 1 :\n // Sparql11query.g:662:7: variable \n {\n $this->pushFollow(self::$FOLLOW_variable_in_project2434);\n $this->variable();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:663:9: builtInCall \n {\n $this->pushFollow(self::$FOLLOW_builtInCall_in_project2444);\n $this->builtInCall();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 3 :\n // Sparql11query.g:664:9: functionCall \n {\n $this->pushFollow(self::$FOLLOW_functionCall_in_project2454);\n $this->functionCall();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 4 :\n // Sparql11query.g:665:9: ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ \n {\n // Sparql11query.g:665:9: ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ \n $cnt71=0;\n //loop71:\n do {\n $alt71=2;\n $LA71_0 = $this->input->LA(1);\n\n if ( ($LA71_0==$this->getToken('OPEN_BRACE')) ) {\n $alt71=1;\n }\n\n\n switch ($alt71) {\n \tcase 1 :\n \t // Sparql11query.g:665:10: OPEN_BRACE expression ( AS variable )? CLOSE_BRACE \n \t {\n \t $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_project2465); \n \t $this->pushFollow(self::$FOLLOW_expression_in_project2467);\n \t $this->expression();\n\n \t $this->state->_fsp--;\n\n \t // Sparql11query.g:665:32: ( AS variable )? \n \t $alt70=2;\n \t $LA70_0 = $this->input->LA(1);\n\n \t if ( ($LA70_0==$this->getToken('AS')) ) {\n \t $alt70=1;\n \t }\n \t switch ($alt70) {\n \t case 1 :\n \t // Sparql11query.g:665:33: AS variable \n \t {\n \t $this->match($this->input,$this->getToken('AS'),self::$FOLLOW_AS_in_project2470); \n \t $this->pushFollow(self::$FOLLOW_variable_in_project2472);\n \t $this->variable();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \t }\n\n \t $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_project2476); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( $cnt71 >= 1 ) break 2;//loop71;\n $eee =\n new EarlyExitException(71, $this->input);\n throw $eee;\n }\n $cnt71++;\n } while (true);\n\n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\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 ;\n }", "function AdvancedSearchWhere() {\n\t\tglobal $Security, $t_tinbai_mainsite;\n\t\t$sWhere = \"\";\n\t\tif (!$Security->CanSearch()) return \"\";\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->PK_TINBAI_ID, FALSE); // PK_TINBAI_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_CONGTY_ID, FALSE); // FK_CONGTY_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DMGIOITHIEU_ID, FALSE); // FK_DMGIOITHIEU_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DMTUYENSINH_ID, FALSE); // FK_DMTUYENSINH_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTSVTUONGLAI_ID, FALSE); // FK_DTSVTUONGLAI_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTSVDANGHOC_ID, FALSE); // FK_DTSVDANGHOC_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTCUUSV_ID, FALSE); // FK_DTCUUSV_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID, FALSE); // FK_DTDOANHNGHIEP_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_TITLE, FALSE); // C_TITLE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_SUMARY, FALSE); // C_SUMARY\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_CONTENTS, FALSE); // C_CONTENTS\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_HIT_MAINSITE, FALSE); // C_HIT_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_NEW_MYSEFLT, FALSE); // C_NEW_MYSEFLT\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_COMMENT_MAINSITE, FALSE); // C_COMMENT_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_ORDER_MAINSITE, FALSE); // C_ORDER_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_STATUS_MAINSITE, FALSE); // C_STATUS_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_VISITOR_MAINSITE, FALSE); // C_VISITOR_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_ACTIVE_MAINSITE, FALSE); // C_ACTIVE_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE, FALSE); // C_TIME_ACTIVE_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE, FALSE); // FK_NGUOIDUNGID_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_NOTE, FALSE); // C_NOTE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_USER_ADD, FALSE); // C_USER_ADD\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_ADD_TIME, FALSE); // C_ADD_TIME\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_USER_EDIT, FALSE); // C_USER_EDIT\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_EDIT_TIME, FALSE); // C_EDIT_TIME\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_EDITOR_ID, FALSE); // FK_EDITOR_ID\n\n\t\t// Set up search parm\n\t\tif ($sWhere <> \"\") {\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->PK_TINBAI_ID); // PK_TINBAI_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_CONGTY_ID); // FK_CONGTY_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DMGIOITHIEU_ID); // FK_DMGIOITHIEU_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DMTUYENSINH_ID); // FK_DMTUYENSINH_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTSVTUONGLAI_ID); // FK_DTSVTUONGLAI_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTSVDANGHOC_ID); // FK_DTSVDANGHOC_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTCUUSV_ID); // FK_DTCUUSV_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID); // FK_DTDOANHNGHIEP_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_TITLE); // C_TITLE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_SUMARY); // C_SUMARY\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_CONTENTS); // C_CONTENTS\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_HIT_MAINSITE); // C_HIT_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_NEW_MYSEFLT); // C_NEW_MYSEFLT\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_COMMENT_MAINSITE); // C_COMMENT_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_ORDER_MAINSITE); // C_ORDER_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_STATUS_MAINSITE); // C_STATUS_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_VISITOR_MAINSITE); // C_VISITOR_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_ACTIVE_MAINSITE); // C_ACTIVE_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE); // C_TIME_ACTIVE_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE); // FK_NGUOIDUNGID_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_NOTE); // C_NOTE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_USER_ADD); // C_USER_ADD\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_ADD_TIME); // C_ADD_TIME\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_USER_EDIT); // C_USER_EDIT\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_EDIT_TIME); // C_EDIT_TIME\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_EDITOR_ID); // FK_EDITOR_ID\n\t\t}\n\t\treturn $sWhere;\n\t}", "function upload_from_file($sparql_endpoint, $triples_filename, $graph_key_name = 'context-uri', $graph_uri = '')\n{\n\t$url = $sparql_endpoint;\n\t\n\tif ($graph_uri == '')\n\t{\n\t}\n\telse\n\t{\n\t\t$url .= '?' . $graph_key_name . '=' . $graph_uri;\n\t}\n\t\n\t// text/x-nquads is US-ASCII WTF!?\n\t//$command = \"curl $url -H 'Content-Type: text/x-nquads' --data-binary '@$triples_filename'\";\n\n\t// text/rdf+n3 is compatible with NT and is UTF-8\n\t// see https://wiki.blazegraph.com/wiki/index.php/REST_API#RDF_data\n\t$command = \"curl $url -H 'Content-Type: text/rdf+n3' --data-binary '@$triples_filename'\";\n\n\techo $command . \"\\n\";\n\t\n\t$lastline = system($command, $retval);\n\t\n\t//echo \" Last line: $lastline\\n\";\n\t//echo \"Return value: $retval\\n\";\t\n\t\n\tif (preg_match('/data modified=\"0\"/', $lastline)) \n\t{\n\t\techo \"\\nError: no data added\\n\";\n\t\texit();\n\t}\n}", "public abstract function getQuery();", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_jadwal_ujian';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "private function getSumoQuery() {\n $query = file_get_contents(__DIR__ . '/query.txt');\n $query = strtr($query, [\n '[site_realm]' => $this->profile->getSiteRealm(),\n '[site_short_name]' => $this->profile->getSiteShortName()\n ]);\n $query = trim(preg_replace('/\\s\\s+/', ' ', $query));\n $query = str_replace([\"\\n\", \"\\r\"], ' ', $query);\n if ($this->output->isVerbose()) {\n $this->output->writeln(\" > Debug: Sumologic query: {$query}\");\n }\n return $query;\n }", "public function selectQuery(){\n try {\n // Sparql11query.g:43:3: ( SELECT ( DISTINCT | REDUCED )? ( ( variable )+ | ASTERISK ) ( datasetClause )* whereClause solutionModifier ) \n // Sparql11query.g:44:3: SELECT ( DISTINCT | REDUCED )? ( ( variable )+ | ASTERISK ) ( datasetClause )* whereClause solutionModifier \n {\n $this->match($this->input,$this->getToken('SELECT'),self::$FOLLOW_SELECT_in_selectQuery142); \n // Sparql11query.g:45:3: ( DISTINCT | REDUCED )? \n $alt4=2;\n $LA4_0 = $this->input->LA(1);\n\n if ( (($LA4_0>=$this->getToken('DISTINCT') && $LA4_0<=$this->getToken('REDUCED'))) ) {\n $alt4=1;\n }\n switch ($alt4) {\n case 1 :\n // Sparql11query.g: \n {\n if ( ($this->input->LA(1)>=$this->getToken('DISTINCT') && $this->input->LA(1)<=$this->getToken('REDUCED')) ) {\n $this->input->consume();\n $this->state->errorRecovery=false;\n }\n else {\n $mse = new MismatchedSetException(null,$this->input);\n throw $mse;\n }\n\n\n }\n break;\n\n }\n\n // Sparql11query.g:49:3: ( ( variable )+ | ASTERISK ) \n $alt6=2;\n $LA6_0 = $this->input->LA(1);\n\n if ( (($LA6_0>=$this->getToken('VAR1') && $LA6_0<=$this->getToken('VAR2'))) ) {\n $alt6=1;\n }\n else if ( ($LA6_0==$this->getToken('ASTERISK')) ) {\n $alt6=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 6, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt6) {\n case 1 :\n // Sparql11query.g:50:5: ( variable )+ \n {\n // Sparql11query.g:50:5: ( variable )+ \n $cnt5=0;\n //loop5:\n do {\n $alt5=2;\n $LA5_0 = $this->input->LA(1);\n\n if ( (($LA5_0>=$this->getToken('VAR1') && $LA5_0<=$this->getToken('VAR2'))) ) {\n $alt5=1;\n }\n\n\n switch ($alt5) {\n \tcase 1 :\n \t // Sparql11query.g:50:5: variable \n \t {\n \t $this->pushFollow(self::$FOLLOW_variable_in_selectQuery175);\n \t $this->variable();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( $cnt5 >= 1 ) break 2;//loop5;\n $eee =\n new EarlyExitException(5, $this->input);\n throw $eee;\n }\n $cnt5++;\n } while (true);\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:51:7: ASTERISK \n {\n $this->match($this->input,$this->getToken('ASTERISK'),self::$FOLLOW_ASTERISK_in_selectQuery184); \n\n }\n break;\n\n }\n\n // Sparql11query.g:53:3: ( datasetClause )* \n //loop7:\n do {\n $alt7=2;\n $LA7_0 = $this->input->LA(1);\n\n if ( ($LA7_0==$this->getToken('FROM')) ) {\n $alt7=1;\n }\n\n\n switch ($alt7) {\n \tcase 1 :\n \t // Sparql11query.g:53:3: datasetClause \n \t {\n \t $this->pushFollow(self::$FOLLOW_datasetClause_in_selectQuery192);\n \t $this->datasetClause();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop7;\n }\n } while (true);\n\n $this->pushFollow(self::$FOLLOW_whereClause_in_selectQuery195);\n $this->whereClause();\n\n $this->state->_fsp--;\n\n $this->pushFollow(self::$FOLLOW_solutionModifier_in_selectQuery197);\n $this->solutionModifier();\n\n $this->state->_fsp--;\n\n\n }\n\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 ;\n }", "function _tsuiseki_tracking_get_query_names() {\n return array(\n 'qe',\n 'target_passthrough',\n 'query',\n );\n}", "function write_endpoint_details($fh){\n\tGLOBAL $options;\n\tfwrite($fh, Quad(\"http://bio2rdf.org/dataset_resource:\".md5($options['url']), \"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\", \"http://bio2rdf.org/dataset_vocabulary:Endpoint\"));\n\tfwrite($fh, QuadLiteral(\"http://bio2rdf.org/dataset_resource:\".md5($options['url']), \"http://www.w3.org/2000/01/rdf-schema#label\", $options['url'].\" SPARQL endpoint\"));\n\tfwrite($fh, Quad(\"http://bio2rdf.org/dataset_resource:\".md5($options['url']), \"http://bio2rdf.org/dataset_vocabulary:has_url\", $options['url']));\n}", "public function actionBisnis() {\n $strata = new WStrata('search');\n $strata->unsetAttributes(); // clear any default values\n if (isset($_GET['WStrata']))\n $strata->attributes = $_GET['WStrata'];\n \n $this->render('bisnis', array(\n 'strata' => $strata,\n ));\n }", "function showquery() {\r\n #~ echo '<td align=right>'; // see nav.inc.php for reason\r\n echo '<form name=\"search\" method=POST action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n #~ echo '<img src=\"images/b_search.png\" border=\"0\">';\r\n echo lang('Search').' ';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">';\r\n echo '<input type=hidden name=act value=\"browse\">';\r\n echo '<input type=text name=query value=\"'.$this->_query.'\" size=10>';\r\n echo ' '.lang('in').' ';\r\n echo '<select name=\"qf\">';\r\n #~ echo '<option value=\"\">With selected:</option>';\r\n echo '<option value=\"*\">'.lang('All fields').'</option>';\r\n echo \"<option value=''>______________</option>\";\r\n foreach ($this->properties as $key=>$col) {\r\n if (!$col->queryable or $col->colname=='') continue;\r\n $key == $_REQUEST['qf']? $ischecked = 'selected': $ischecked = '';\r\n echo \"<option value='$key' $ischecked>{$col->label}</option>\";\r\n }\r\n echo '</select>';\r\n #~ echo '<input type=submit value=\"Query\">';\r\n echo '</form>';\r\n #~ echo '</td>'; // see nav.inc.php for reason\r\n\r\n #~ echo '</td></tr></table>';\r\n }", "function generate_book_rdf(OntologyModel $baseOnt) {\n \n $instance = $baseOnt->createBookInstance($this->selfLink);\n\n $kind = $baseOnt->getBase()->createLiteral($this->kind);\n $id = $baseOnt->getBase()->createLiteral($this->id);\n $etag = $baseOnt->getBase()->createLiteral($this->etag);\n $title = $baseOnt->getBase()->createLiteral($this->title);\n $publisher = $baseOnt->getBase()->createLiteral($this->publisher);\n $publiched_date = $baseOnt->getBase()->createLiteral($this->publishedDate);\n $description = $baseOnt->getBase()->createLiteral($this->description);\n \n $kind->setDatatype(\"http://www.w3.org/TR/xmlschema-2/#rf-enumeration\");\n $id->setDatatype(\"http://www.w3.org/TR/xmlschema-2/#ID\");\n $etag->setDatatype(\"http://www.w3.org/TR/xmlschema-2/#string\");\n $title->setDatatype(\"http://xmlns.com/foaf/spec/#term_title\");\n $publiched_date->setDatatype(\"http://www.w3.org/TR/xmlschema-2/#date\");\n $description->setDatatype(\"http://www.w3.org/TR/xmlschema-2/#string\");\n\n\n foreach ($baseOnt->getBookOntClass()->listProperties() as $property) {\n\n if ($property->getLabelObject() == 'kind') {\n $instance->addProperty( $property->getPredicate() , $kind );\n }\n if ($property->getLabelObject() == 'id') {\n $instance->addProperty( $property->getPredicate() , $id );\n }\n if ($property->getLabelObject() == 'etag') {\n $instance->addProperty( $property->getPredicate() , $etag );\n }\n if ($property->getLabelObject() == 'title') {\n $instance->addProperty( $property->getPredicate() , $title );\n }\n if ($property->getLabelObject() == 'publisher') {\n $instance->addProperty( $property->getPredicate() , $publisher );\n }\n if ($property->getLabelObject() == 'publiched_date') {\n $instance->addProperty( $property->getPredicate() , $publiched_date );\n }\n if ($property->getLabelObject() == 'description') {\n $instance->addProperty( $property->getPredicate() , $description );\n }\n }\n }", "public function getContents() {\n $storeGraph = $this->_owApp->selectedModel;\n if (!$storeGraph) {\n return \"\";\n }\n $query = \"SELECT * WHERE {\n ?query a <\".$this->_privateConfig->queryClass.\"> .\n ?query <\".$this->_privateConfig->queryLabel.\"> ?label .\n ?query <\".$this->_privateConfig->queryId.\"> ?id .\n ?query <\".$this->_privateConfig->queryDesc.\"> ?description .\n ?query <\".$this->_privateConfig->queryCode.\"> ?code\n }\";\n\n $elements = $storeGraph->sparqlQuery($query);\n $queries = array();\n foreach ($elements as $element) {\n $query = array();\n $query['label'] = $element['label'];\n $query['link'] = $this->_config->urlBase.\"savedqueries/init?&query=\".(urlencode($element['code'])).\"&label=\".(urlencode($query['label'])); //Link noch bauen\n $query['description'] = $element['description']; //Link noch bauen\n $queries[] = $query;\n }\n $this->view->queries = $queries;\n\t\t$content = $this->render('savedqueries');\n\t\t\n\t\treturn $content;\n\t}" ]
[ "0.5722958", "0.55300677", "0.5351481", "0.5315436", "0.52846396", "0.52835715", "0.5276358", "0.52304846", "0.52279156", "0.5169751", "0.514899", "0.51475966", "0.50861293", "0.5039135", "0.5028938", "0.5003592", "0.48820266", "0.48770016", "0.48581257", "0.48458067", "0.4838903", "0.48031342", "0.47920284", "0.47890866", "0.47667053", "0.47587687", "0.47578517", "0.47348726", "0.47347012", "0.47341987", "0.4733643", "0.47285858", "0.47264194", "0.47264194", "0.47264194", "0.47264194", "0.47264194", "0.47264194", "0.47264194", "0.47264194", "0.47264194", "0.47114953", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.46974608", "0.4684283", "0.46814024", "0.46577626", "0.4640847", "0.46293163", "0.46293163", "0.46293163", "0.46229613", "0.46205315", "0.4619861", "0.4613301", "0.45954162", "0.45938832", "0.4592907", "0.45918393", "0.45870727", "0.4586309", "0.45816305", "0.45816067", "0.45756096", "0.45636308", "0.45558387", "0.4555097", "0.4544616", "0.45421785", "0.45413488", "0.45410421", "0.45326987", "0.45103467", "0.45068857", "0.45036098", "0.45019227", "0.44880018" ]
0.5103058
12
Seed the application's database.
public function run() { // \App\Models\User::factory(10)->create(); $this->call([ UserSeeder::class, LanguageSeeder::class, MenuKeywordSeeder::class, ContentOneGroupKeywordSeeder::class, ContentTwoGroupKeywordSeeder::class, ContentThreeGroupKeywordSeeder::class, ContentFourGroupKeywordSeeder::class, ContentFiveGroupKeywordSeeder::class, ContentSixGroupKeywordSeeder::class, FrontendOneGroupKeywordSeeder::class, FrontendTwoGroupKeywordSeeder::class, SectionSeeder::class, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');// <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t}\n\t}", "protected function seedDB()\n {\n $ans = $this->ask('Seed your database?: ', 'y');\n\n // Check if the answer is true\n if (preg_match('/^y/', $ans))\n {\n $this->call('db:seed');\n $this->comment('');\n $this->comment('Database successfully seeded.');\n $this->comment('=====================================');\n echo \"Your app is now ready!\";\n }\n }", "protected function seedDatabase(): void\n {\n $this->seedProductCategories();\n $this->seedProducts();\n }", "public function setupDatabase()\n {\n Artisan::call('migrate:refresh');\n Artisan::call('db:seed');\n\n self::$setupDatabase = false;\n }", "public function run()\n {\n $this->seed('FormsMenuItemsTableSeeder');\n $this->seed('FormsDataTypesTableSeeder');\n $this->seed('FormsDataRowsTableSeeder');\n $this->seed('FormsPermissionsTableSeeder');\n $this->seed('FormsSettingsTableSeeder');\n $this->seed('FormsTableSeeder');\n }", "public function run()\n {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"\\n--- Seeding ---\\n\", TRUE));\n\n if (App::environment('production')) {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- ERROR: Seeding in Production is prohibited ---\\n\", TRUE));\n return;\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(ConfigsTableSeeder::class);\n $this->call(ConfigContentsTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n if (defined('STDERR')) fwrite(STDERR, print_r(\"Set FOREIGN_KEY_CHECKS=1 --- DONE\\n\", TRUE));\n\n // \\Artisan::call('command:regenerate-user-feeds');\n\n \\Cache::flush();\n\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- End Seeding ---\\n\\n\", TRUE));\n }", "protected function setupDatabase()\n {\n $this->call('migrate');\n $this->call('db:seed');\n\n $this->info('Database migrated and seeded.');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function seedDatabase(): void\n {\n echo \"Running seeds\";\n\n // Folder where all the seeds are.\n $folder = __DIR__ . '/../seeds/';\n\n // Scan all files/folders inside database.\n $files = \\scandir($folder);\n\n $seeders = [];\n foreach ($files as $key => $file) {\n\n // All files that don't start with a dot.\n if ($file[0] !== '.') {\n\n // Load the file.\n require_once $folder . $file;\n\n // We have to call the migrations after because\n // some seeds are dependant from other seeds.\n $seeders[] = explode('.', $file)[0];\n }\n }\n\n // Run all seeds.\n foreach ($seeders as $seeder) {\n (new $seeder)->run();\n }\n }", "protected function seedDatabase()\n {\n //$this->app->make('db')->table(static::TABLE_NAME)->delete();\n\n TestExtendedModel::create([\n 'unique_field' => '999',\n 'second_field' => null,\n 'name' => 'unchanged',\n 'active' => true,\n 'hidden' => 'invisible',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1234567',\n 'second_field' => '434',\n 'name' => 'random name',\n 'active' => false,\n 'hidden' => 'cannot see me',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1337',\n 'second_field' => '12345',\n 'name' => 'special name',\n 'active' => true,\n 'hidden' => 'where has it gone?',\n ]);\n }", "public function initDatabase()\n {\n $this->call('migrate');\n\n $userModel = config('admin.database.users_model');\n\n if ($userModel::count() == 0) {\n $this->call('db:seed', ['--class' => AdminSeeder::class]);\n }\n }", "public function run ()\n {\n if (App::environment() === 'production') {\n exit('Seed should be run only in development/debug environment.');\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('role_user')->truncate();\n\n // Root user\n $user = User::find(1);\n $user->assignRole('owner');\n\n $user = User::find(2);\n $user->assignRole('admin');\n\n $user = User::find(3);\n $user->assignRole('admin');\n\n $user = User::find(4);\n $user->assignRole('moderator');\n\n $user = User::find(5);\n $user->assignRole('moderator');\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n Model::unguard();\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(EntrustTableSeeder::class);\n\n $this->call(AccounttypeSeeder::class);\n $this->call(AppUserTableSeeder::class);\n $this->call(AppEmailUserTableSeeder::class);\n\n\n $this->call(CountryTableSeeder::class);\n $this->call(CityTableSeeder::class);\n\n\n $this->call(PostTypeTableSeeder::class);\n $this->call(PostSubTypeTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(AppPostSolvedTableSeeder::class);\n\n\n $this->call(AppCommentTypeTableSeeder::class);\n // $this->call(AppCommentTableSeeder::class);\n // $this->call(AppSubCommentTableSeeder::class);\n\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }\n\n Model::reguard();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('password_resets')->truncate();\n DB::table('domains')->truncate();\n DB::table('folders')->truncate();\n DB::table('bookmarks')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->seedUserAccount('[email protected]');\n $this->seedUserAccount('[email protected]');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n // $this->call(UsersTableSeeder::class);\n /* Schema::dropIfExists('employees');\n Schema::dropIfExists('users');\n Schema::dropIfExists('requests');\n Schema::dropIfExists('requeststatus');*/\n User::truncate();\n InstallRequest::truncate();\n RequestStatus::truncate();\n\n $cantidadEmployyes = 20;\n $cantidadUsers = 20;\n $cantidadRequestStatus = 3;\n $cantidadRequests = 200;\n\n factory(User::class, $cantidadUsers)->create();\n factory(RequestStatus::class, $cantidadRequestStatus)->create();\n factory(InstallRequest::class, $cantidadRequests)->create();\n }", "public function run()\n {\n Model::unguard();\n foreach (glob(__DIR__ . '/seeds/*.php') as $filename) {\n require_once($filename);\n }\n // $this->call(UserTableSeeder::class);\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n// $this->call('CustomerTableSeeder');\n $this->call('PhotoTableSeeder');\n// $this->call('ProductTableSeeder');\n// $this->call('StaffTableSeeder');\n// $this->call('PasswordResetsTableSeeder');\n// $this->call('UsersTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('EmployeesTableSeeder');\n $this->call('InventoryTransactionTypesTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrderDetailsStatusTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('InvoicesTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrdersStatusTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n\n $this->call('OrdersTaxStatusTableSeeder');\n $this->call('PrivilegesTableSeeder');\n $this->call('EmployeePrivilegesTableSeeder');\n $this->call('ProductsTableSeeder');\n $this->call('InventoryTransactionsTableSeeder');\n $this->call('PurchaseOrderDetailsTableSeeder');\n\n $this->call('PurchaseOrderStatusTableSeeder');\n $this->call('PurchaseOrdersTableSeeder');\n $this->call('SalesReportsTableSeeder');\n $this->call('ShippersTableSeeder');\n $this->call('StringsTableSeeder');\n $this->call('SuppliersTableSeeder');\n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Model::reguard();\n }", "public function run()\n\t{\n $this->cleanDatabase();\n\n Eloquent::unguard();\n\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('CartsTableSeeder');\n $this->call('StoreTableSeeder');\n $this->call('AdvertisementsTableSeeder');\n \n\t}", "public function run()\n {\n \tDB::table('seeds')->truncate();\n\n $seeds = array(\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_18_2013',\n ),\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_20_2013',\n ),\n );\n\n // Uncomment the below to run the seeder\n DB::table('seeds')->insert($seeds);\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "protected function setUp(): void\n {\n $db = new DB;\n\n $db->addConnection([\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ]);\n\n $db->bootEloquent();\n $db->setAsGlobal();\n\n $this->createSchema();\n }", "public function run()\n {\n //$this->call('UserTableSeeder');\n //$this->call('ProjectTableSeeder');\n //$this->call('TaskTableSeeder');\n\n /**\n * Prepare seeding\n */\n $faker = Faker::create();\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Model::unguard();\n\n /**\n * Seeding user table\n */\n App\\User::truncate();\n factory(App\\User::class)->create([\n 'name' => 'KCK',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n /*factory(App\\User::class, 9)->create();\n $this->command->info('users table seeded');*/\n\n /**\n * Seeding roles table\n */\n Spatie\\Permission\\Models\\Role::truncate();\n DB::table('model_has_roles')->truncate();\n $superAdminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '최고 관리자'\n ]);\n $adminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '관리자'\n ]);\n $regularRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '정회원'\n ]);\n $associateRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '준회원'\n ]);\n\n App\\User::where('email', '!=', '[email protected]')->get()->map(function ($user) use ($regularRole) {\n $user->assignRole($regularRole);\n });\n\n App\\User::whereEmail('[email protected]')->get()->map(function ($user) use ($superAdminRole) {\n $user->assignRole($superAdminRole);\n });\n $this->command->info('roles table seeded');\n\n /**\n * Seeding articles table\n */\n App\\Article::truncate();\n $users = App\\User::all();\n\n $users->each(function ($user) use ($faker) {\n $user->articles()->save(\n factory(App\\Article::class)->make()\n );\n });\n $this->command->info('articles table seeded');\n\n /**\n * Seeding comments table\n */\n App\\Comment::truncate();\n $articles = App\\Article::all();\n\n $articles->each(function ($article) use ($faker, $users) {\n for ($i = 0; $i < 10; $i++) {\n $article->comments()->save(\n factory(App\\Comment::class)->make([\n 'author_id' => $faker->randomElement($users->pluck('id')->toArray()),\n //'parent_id' => $article->id\n ])\n );\n };\n });\n $this->command->info('comments table seeded');\n\n /**\n * Seeding tags table\n */\n App\\Tag::truncate();\n DB::table('article_tag')->truncate();\n $articles->each(function ($article) use ($faker) {\n $article->tags()->save(\n factory(App\\Tag::class)->make()\n );\n });\n $this->command->info('tags table seeded');\n\n /**\n * Seeding attachments table\n */\n App\\Attachment::truncate();\n if (!File::isDirectory(attachment_path())) {\n File::deleteDirectory(attachment_path(), true);\n }\n\n $articles->each(function ($article) use ($faker) {\n $article->attachments()->save(\n factory(App\\Attachment::class)->make()\n );\n });\n\n //$files = App\\Attachment::pluck('name');\n\n if (!File::isDirectory(attachment_path())) {\n File::makeDirectory(attachment_path(), 777, true);\n }\n\n /*\n foreach ($files as $file) {\n File::put(attachment_path($file), '');\n }\n */\n\n $this->command->info('attachments table seeded');\n\n /**\n * Close seeding\n */\n Model::reguard();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(CountriesTableSeeder::class);\n $this->call(StatesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n\n factory(Group::class)->create();\n factory(Contact::class, 5000)->create();\n }", "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('AdminTableSeeder');\n\t\t// $this->call('UserTableSeeder');\n\t\t// $this->call('MenuTableSeeder');\n\t\t// $this->call('ProductTableSeeder');\n\t\t// $this->call('CategoryTableSeeder');\n\t\t// $this->call('OptionTableSeeder');\n\t\t// $this->call('OptionGroupTableSeeder');\n\t\t// $this->call('TypeTableSeeder');\n\t\t// $this->call('LayoutTableSeeder');\n\t\t// $this->call('LayoutDetailTableSeeder');\n\t\t// $this->call('BannerTableSeeder');\n\t\t// $this->call('ConfigureTableSeeder');\n\t\t// $this->call('PageTableSeeder');\n\t\t// $this->call('ImageTableSeeder');\n\t\t// $this->call('ImageableTableSeeder');\n\t\t// ======== new Seed =======\n\t\t$this->call('AdminsTableSeeder');\n\t\t$this->call('BannersTableSeeder');\n\t\t$this->call('CategoriesTableSeeder');\n\t\t$this->call('ConfiguresTableSeeder');\n\t\t$this->call('ImageablesTableSeeder');\n\t\t$this->call('ImagesTableSeeder');\n\t\t$this->call('LayoutsTableSeeder');\n\t\t$this->call('LayoutDetailsTableSeeder');\n\t\t$this->call('MenusTableSeeder');\n\t\t$this->call('OptionablesTableSeeder');\n\t\t$this->call('OptionsTableSeeder');\n\t\t$this->call('OptionGroupsTableSeeder');\n\t\t$this->call('PagesTableSeeder');\n\t\t$this->call('PriceBreaksTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('ProductsCategoriesTableSeeder');\n\t\t$this->call('SizeListsTableSeeder');\n\t\t$this->call('TypesTableSeeder');\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ContactsTableSeeder');\n\t\t$this->call('RolesTableSeeder');\n\t\t$this->call('PermissionsTableSeeder');\n\t\t$this->call('PermissionRoleTableSeeder');\n\t\t$this->call('AssignedRolesTableSeeder');\n\t\t$this->call('OrdersTableSeeder');\n\t\t$this->call('OrderDetailsTableSeeder');\n\t\tCache::flush();\n\t\t// BackgroundProcess::copyFromVI();\n\t}", "public function run()\n {\n Model::unguard();\n\n User::create([\n 'email' => '[email protected]',\n 'name' => 'admin',\n 'password' => Hash::make('1234'),\n 'email_verified_at' => Carbon::now()\n ]);\n\n factory(User::class, 200)->create();\n\n // $this->call(\"OthersTableSeeder\");\n }", "public function run()\n {\n $this->seedRegularUsers();\n $this->seedAdminUser();\n }", "public function run()\n {\n if (\\App::environment() === 'local') {\n\n // Delete existing data\n\n\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // Truncate all tables, except migrations\n $tables = array_except(DB::select('SHOW TABLES'), ['migrations']);\n foreach ($tables as $table) {\n $tables_in_database = \"Tables_in_\" . Config::get('database.connections.mysql.database');\n DB::table($table->$tables_in_database)->truncate();\n }\n\n // supposed to only apply to a single connection and reset it's self\n // but I like to explicitly undo what I've done for clarity\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n //get roles\n $this->call('AccountSeeder');\n $this->call('CountrySeeder');\n $this->call('StateSeeder');\n $this->call('CitySeeder');\n $this->call('OptionSeeder');\n $this->call('TagSeeder');\n $this->call('PrintTemplateSeeder');\n $this->call('SettingsSeeder');\n\n\n\n if(empty($web_installer)) {\n $admin = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"admin\",\n 'first_name' => 'Admin',\n 'last_name' => 'Doe',\n ));\n $admin->user_id = $admin->id;\n $admin->save();\n\n $adminRole = Sentinel::findRoleById(1);\n $adminRole->users()->attach($admin);\n }\n else {\n $admin = Sentinel::findById(1);\n }\n\n //add dummy staff and customer\n $staff = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"staff\",\n 'first_name' => 'Staff',\n 'last_name' => 'Doe',\n ));\n $admin->users()->save($staff);\n\n foreach ($this->getPermissions() as $permission) {\n $staff->addPermission($permission);\n }\n $staff->save();\n\n $customer = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"customer\",\n 'first_name' => 'Customer',\n 'last_name' => 'Doe',\n ));\n Customer::create(array('user_id' => $customer->id, 'belong_user_id' => $staff->id));\n $staff->users()->save($customer);\n\n //add respective roles\n\n $staffRole = Sentinel::findRoleById(2);\n $staffRole->users()->attach($staff);\n $customerRole = Sentinel::findRoleById(3);\n $customerRole->users()->attach($customer);\n\n\n\n DB::table('sales_teams')->truncate();\n DB::table('opportunities')->truncate();\n\n //Delete existing seeded users except the first 4 users\n User::where('id', '>', 3)->get()->each(function ($user) {\n $user->forceDelete();\n });\n\n //Get the default ADMIN\n $user = User::find(1);\n $staffRole = Sentinel::getRoleRepository()->findByName('staff');\n $customerRole = Sentinel::getRoleRepository()->findByName('customer');\n\n //Seed Sales teams for default ADMIN\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($user->id, $j, $user);\n $this->createOpportunity($user, $user->id, $j);\n }\n\n\n //Get the default STAFF\n $staff = User::find(2);\n $this->createSalesTeam($staff->id, 1, $staff);\n $this->createSalesTeam($staff->id, 2, $staff);\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $staff->id, $j);\n }\n\n foreach (range(1, 3) as $i) {\n $staff = $this->createStaff($i);\n $user->users()->save($staff);\n $staffRole->users()->attach($staff);\n\n $customer = $this->createCustomer($i);\n $staff->users()->save($customer);\n $customerRole->users()->attach($customer);\n $customer->customer()->save(factory(\\App\\Models\\Customer::class)->make());\n\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 5) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $i, $j);\n }\n\n }\n\n //finally call it installation is finished\n file_put_contents(storage_path('installed'), 'Welcome to LCRM');\n }\n }", "public function run()\n {\n if (env('DB_DATABASE') == 'connection') {\n Connection::create([\n \"ruc\" => \"12312312312\",\n \"basedata\" => \"nbdata2018_1\",\n ]);\n \n Connection::create([\n \"ruc\" => \"12312312315\",\n \"basedata\" => \"nbdata2018_2\",\n ]);\n \n $this->call(ConnectionTableSeeder::class);\n } else {\n $this->call(AppSeeder::class);\n }\n }", "public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::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 < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n # truncates tables before seeding\n foreach ($this->toTruncate as $table) {\n DB::table($table)->delete();\n }\n\n factory(App\\Models\\Product::class, 25)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Post::truncate();\n Comment::truncate();\n // CommentReply::truncate();\n \n\n\n factory(User::class,10)->create();\n factory(Post::class,20)->create();\n factory(Comment::class,30)->create();\n // factory(CommentReply::class,30)->create();\n }", "public function run()\n\t{\n \n Eloquent::unguard();\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\t$this->call('UserTableSeeder');\n\t $this->call('LayerTableSeeder');\n $this->call('UserLevelTableSeeder');\n $this->call('RoleUserTableSeeder');\n $this->call('RoleLayerTableSeeder');\n $this->call('BookmarkTableSeeder');\n \n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n DB::statement('SET foreign_key_checks = 0');\n DB::table('topics')->truncate();\n\n factory(\\App\\Topic::class, 100)->create();\n // ->each(function($topic) {\n\n // // Seed para a relação com group\n // $topic->group()->save(factory(App\\Group::class)->make());\n\n // // Seed para a relação com topicMessages\n // $topic->topicMessages()->save(factory(App\\TopicMessage::class)->make());\n\n // // Seed para a relação com user\n // $topic->user()->save(factory(App\\User::class)->make());\n // });\n \n DB::statement('SET foreign_key_checks = 1');\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n Categoria::truncate();\n Atractivo::truncate();\n Galeria::truncate();\n User::truncate();\n\n $this->call(CategoriasTableSeeder::class);\n $this->call(AtractivosTableSeeder::class);\n $this->call(GaleriasTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n }", "public function run(Faker $faker)\n {\n Schema::disableForeignKeyConstraints();\n DB::table('users')->insert([\n 'name' => $faker->name(),\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n\t $this->call(CategoryTableSeed::class);\n\t $this->call(ProductTableSeed::class);\n\t $this->call(UserTableSeed::class);\n }", "public function run()\n {\n $this->cleanDatabase();\n\n factory(User::class, 50)->create();\n factory(Document::class, 30)->create();\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n \t// DB::table('webapps')->delete();\n\n $webapps = array(\n\n );\n\n // Uncomment the below to run the seeder\n // DB::table('webapps')->insert($webapps);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $tables = array(\n 'users',\n 'companies',\n 'stands',\n 'events',\n 'visitors',\n 'api_keys'\n );\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n }\n\n foreach ($tables as $table) {\n DB::table($table)->truncate();\n }\n\n $this->call(UsersTableSeeder::class);\n $this->call(EventsTableSeeder::class);\n $this->call(CompaniesTableSeeder::class);\n $this->call(StandsTableSeeder::class);\n $this->call(VisitorsTableSeeder::class);\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n $clear = $this->command->confirm('Wil je de database leegmaken? (Dit haalt alle DATA weg)');\n\n if ($clear):\n $this->command->callSilent('migrate:refresh');\n $this->command->info('Database Cleared, starting seeding');\n endif;\n\n $this->call([\n SeedSeeder::class,\n RoleSeeder::class,\n UserSeeder::class,\n // BoardgameSeeder::class,\n BoardgamesTableSeeder::class,\n StatusSeeder::class,\n TournamentSeeder::class,\n AchievementsSeeder::class,\n TournamentUsersSeeder::class,\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n $this->call(PaisSeeder::class);\n $this->call(DepartamentoSeeder::class);\n $this->call(MunicipioSeeder::class);\n $this->call(PersonaSeeder::class);\n }", "public function run()\n {\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('events')->truncate();\n \n Event::create([\n 'id' => 1,\n 'name' => 'Spot Registration For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n Event::create([\n 'id' => 2,\n 'name' => 'Spot Screening For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'screen',\n 'formId'\t\t=> 1,\n ]);\n \n Event::create([\n 'id' => 3,\n 'name' => 'Spot Registration For Skin Cancer',\n 'cancerId' => 2,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n\n Event::create([\n 'id' => 3,\n 'name' => 'Registration cum Screening camp for Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addWeeks(1),\n 'eventType'\t\t=> 'register_screen',\n 'formId'\t\t=> 1,\n ]);\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Para que no verifique el control de claves foráneas al hacer el truncate haremos:\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n\t\t// Primero hacemos un truncate de las tablas para que no se estén agregando datos\n\t\t// cada vez que ejecutamos el seeder.\n\t\t//Foto::truncate();\n\t\t//Album::truncate();\n\t\t//Usuario::truncate();\n DB::table('users')->delete();\n DB::table('ciudades')->delete();\n DB::table('tiendas')->delete();\n DB::table('ofertas')->delete();\n DB::table('ventas')->delete();\n\n\n\t\t// Es importante el orden de llamada.\n\t\t$this->call('UserSeeder');\n $this->call('CiudadSeeder');\n\t\t$this->call('TiendaSeeder');\n $this->call('OfertaSeeder');\n $this->call('VentaSeeder');\n }", "public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }", "public function run()\n {\n $this->truncateTables([\n 'users',\n 'categories',\n 'types',\n 'courses',\n 'classrooms',\n 'contents',\n 'companies',\n ]);\n\n $this->call(CompanyTableSeeder::class);\n $this->call(TypeTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(CoursesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(ContentTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(ClassroomTableSeeder::class);\n $this->call(TestTableSeeder::class);\n $this->call(BankTableSeeder::class);\n\n\n // factory(\\App\\User::class, 50)\n // ->create()\n // ->each(function ($user) {\n // // $user->companies()->save();\n // $company = \\App\\Company::inRandomOrder()->first();\n // $user->companies()->attach($company->id);\n // $user->assignRole(['participante']);\n // });\n /*\n factory(\\App\\User::class, 50)\n ->create()\n ->each(function ($user) {\n $user->assignRole(['participante']);\n });*/\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Question::truncate();\n Option::truncate();\n// Answer::truncate();\n Quiz::truncate();\n QuizQuestion::truncate();\n\n //for admin\n $admin = factory(User::class)->create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'is_admin' => 1,\n ]);\n\n //for user\n $user = factory(User::class)->create([\n 'name' => 'User',\n 'email' => '[email protected]',\n ]);\n\n factory(Question::class, 100)->create()->each(function ($question) {\n factory(Option::class, mt_rand(2, 4))->create([\n 'question_id' => $question->id,\n ]);\n });\n\n factory(Quiz::class, 10)->create()->each(function ($quiz) {\n\n factory(QuizQuestion::class, mt_rand(5, 10))->create();\n });\n\n\n }", "public function run()\n {\n $this->call([\n SiteSettingsSeeder::class,\n LaratrustSeeder::class,\n CountrySeeder::class,\n GovernorateSeeder::class,\n FaqSeeder::class,\n SitePageSeeder::class,\n UsersSeeder::class,\n ]);\n\n Country::whereiso(\"EG\")->update(['enable_shipping' => true]);\n\n factory(User::class, 400)->create();\n\n Category::create([\n 'en' => [\n 'name' => \"cake tools\"\n ]\n ]);\n\n Category::create([\n 'en' => [\n 'name' => \"Party Supplies\"\n ]\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ProductSeeder::class\n ]);\n }", "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n\n if (App::environment('local')) {\n $this->call(FakeUsersTableSeeder::class);\n $this->call(FakeArticlesTableSeeder::class);\n $this->call(FakeEventsTableSeeder::class);\n }\n }", "public function run()\n {\n Model::unguard();\n\n $this->call(CategoryTypesTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(AccountTypesTableSeeder::class);\n $this->call(TransactionTypesTableSeeder::class);\n\n if (App::environment() !== 'production') {\n $this->call(UserTableSeeder::class);\n $this->call(AccountBudgetTableSeeder::class);\n $this->call(TransactionTableSeeder::class);\n }\n\n Model::reguard();\n }", "public function run()\n {\n User::truncate();\n Product::truncate();\n User::forceCreate([\n 'name' => 'foo',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n factory(User::class, 5)->create();\n factory(Product::class, 5)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n {\n $this->call([UsersTableSeeder::class]);\n $this->call([ContratosTableSeeder::class]);\n $this->call([UsuariosTableSeeder::class]);\n $this->call([UnidadesTableSeeder::class]);\n $this->call([AtestadosTableSeeder::class]);\n }", "public function run()\n {\n Model::unguard();\n\n // $this->call(\"OthersTableSeeder\");\n\n // DB::table('locations')->insert([\n // 'id' => 1,\n // 'name' => 'Default',\n // 'name' => 'district',\n // 'district_id' => 1,\n // 'province_id' => 1,\n // ]);\n }", "public function run()\n {\n $data = include env('DATA_SEED');\n\n \\Illuminate\\Support\\Facades\\DB::table('endpoints')->insert((array)$data);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('admins')->truncate();\n\n for ($i = 0; $i < 10; $i++)\n {\n $faker = Factory::create('en_US');\n $values = [\n 'name' => $faker->userName,\n 'email' => $faker->freeEmail,\n 'password' => bcrypt($faker->password),\n 'phone' => $faker->phoneNumber,\n 'status' => random_int(0,1)\n ];\n admin::create($values);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n DB::beginTransaction();\n// $this->seed();\n DB::commit();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n \\DB::table('provinces')->delete();\n \\DB::table('cities')->delete();\n \\DB::table('districts')->delete();\n // import provinces and cities from sql file\n $sqlFile = app_path() . '/../database/raw/administrative_indonesia_without_districts.sql';\n DB::unprepared(file_get_contents($sqlFile));\n $this->command->info('Successfully seed Provinces and Cities!');\n\n // import districts with latitude and longitude from csv file\n $csvFile = app_path() . '/../database/raw/administrative_indonesia_districts_with_lat_lng.csv';\n $districts = $this->csvToArray($csvFile);\n // check if lat lng exists\n foreach ($districts as $i => $d) {\n if ($d['latitude'] == '') $districts[$i]['latitude'] = 0;\n if ($d['longitude'] == '') $districts[$i]['longitude'] = 0;\n }\n // insert it\n $insert = District::insert($districts);\n if ($insert) $this->command->info('Successfully seed Districts!');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RegionsTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(SubDistrictsTableSeeder::class);\n $this->call(PostcodesTableSeeder::class);\n\n if (env('APP_ENV') !== 'production') {\n // Wipe up 5 churches, and each church has 5 cells, and each cell has 20 members associated with.\n // In other word, we wipe up 500 church members.\n for ($i = 0; $i < 2; $i++) {\n $church = factory(\\App\\Models\\Church::class)->create();\n\n $church->areas()->saveMany(factory(\\App\\Models\\Area::class, 2)->create([\n 'church_id' => $church->id\n ])->each(function($area) {\n $area->cells()->saveMany(factory(\\App\\Models\\Cell::class, 2)->create([\n 'area_id' => $area->id\n ])->each(function($cell) {\n $cell->members()->saveMany(factory(App\\Models\\Member::class, 10)->create([\n 'cell_id' => $cell\n ]));\n }));\n }));\n }\n }\n }", "public function run()\n {\n User::create([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n ]);\n\n User::create([\n 'name' => 'Leonardo',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789')\n ]);\n\n // seed sin model\n /* DB::table('users')->insert([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]); */\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->environmentPath = env('APP_ENV') === 'production' ||\n env('APP_ENV') === 'qa' ||\n env('APP_ENV') === 'integration' ?\n 'Production':\n 'local';\n //disable FK\n Model::unguard();\n DB::statement(\"SET session_replication_role = 'replica';\");\n\n // $this->call(HrEmployeeTableSeeder::class);\n $this->call(\"Modules\\HR\\Database\\Seeders\\\\$this->environmentPath\\HrEmployeePosTableSeeder\");\n // $this->call(HrEmployeePresetsDiscountTableSeeder::class);\n\n // Enable FK\n DB::statement(\"SET session_replication_role = 'origin';\");\n Model::reguard();\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "protected static function seed()\n {\n foreach (self::fetch('database/seeds', false) as $file) {\n Bus::need($file);\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n $faker = F::create('App\\Proovedores');\n for($i=0; $i < 10; $i++){\n DB::table('users')->insert([\n 'usuario' => $i,\n 'password' => $i,\n 'email' => $faker->email,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Delete all records.\n DB::table('users')->delete();\n // Reset AUTO_INCREMENT.\n DB::table('users')->truncate();\n\n // Dev user.\n App\\Models\\User::create([\n 'email' => '[email protected]',\n 'password' => '$2y$10$t6q81nz.XrMrh20NHDvxUu/szwHBwgzPd.01e8uuP0qVy0mPa6H/e',\n 'first_name' => 'L5',\n 'last_name' => 'App',\n 'username' => 'l5-app',\n 'is_email_verified' => 1,\n ]);\n\n // Dummy users.\n TestDummy::times(10)->create('App\\Models\\User');\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // We did this for test purposes. Shouldn't be doing this for production\n $password = Hash::make('123456');\n\n User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n }", "public function run()\n {\n Model::unguard();\n \n factory('App\\User','admin')->create();\n factory('App\\Evento',100)->create();\n //factory('App\\User','miembro',10)->create();\n factory('App\\Telefono',13)->create();\n factory('App\\Notificacion',10)->create();\n factory('App\\Rubro',10)->create();\n factory('App\\Tecnologia',10)->create();\n factory('App\\Cultivo',10)->create();\n factory('App\\Etapa',10)->create();\n factory('App\\Variedad',10)->create();\n factory('App\\Caracteristica',10)->create();\n factory('App\\Practica',30)->create();\n factory('App\\Tag',15)->create();\n // $this->call(PracticaTableSeeder::class);\n $this->call(TrTableSeeder::class);\n $this->call(MesTableSeeder::class);\n $this->call(SemanasTableSeeder::class);\n $this->call(PsTableSeeder::class);\n $this->call(MsTableSeeder::class);\n $this->call(CeTableSeeder::class);\n $this->call(CvTableSeeder::class);\n $this->call(PtSeeder::class);\n \n\n Model::unguard();\n }", "public function run() {\n $this->call(UserSeeder::class);\n $this->call(PermissionSeeder::class);\n $this->call(CreateAdminUserSeeder::class);\n // $this->call(PhoneSeeder::class);\n // $this->call(AddressSeeder::class);\n\n $this->call(ContactFormSeeder::class);\n //$this->call(ContactSeeder::class);\n\n User::factory()->count(20)->create()->each(function ($user) {\n // Seed the relation with one address\n $address = Address::factory()->make();\n $user->address()->save($address);\n\n // Seed the relation with one phone\n $phone = Phone::factory()->make();\n $user->phone()->save($phone);\n\n // Seed the relation with 15 contacts\n $contact = Contact::factory()->count(25)->make();\n $user->contacts()->saveMany($contact);\n });\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Activity::truncate();\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n $this->call(UserTableSeeder::class);\n $this->call(ActivityTableSeeder::class);\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n \\App\\User::truncate();\n \\App\\Category::truncate();\n \\App\\Product::truncate();\n \\App\\Transaction::truncate();\n DB::table('category_product')->truncate();\n\n \\App\\User::flushEventListeners();\n \\App\\Category::flushEventListeners();\n \\App\\Product::flushEventListeners();\n \\App\\Transaction::flushEventListeners();\n\n\n $usersQuentity = 1000;\n $categoriesQuentity = 30;\n $productsQuentity = 1000;\n $transactionsQuentity = 1000;\n\n factory(\\App\\User::class, $usersQuentity)->create();\n factory(\\App\\Category::class, $categoriesQuentity)->create();\n factory(\\App\\Product::class, $productsQuentity)->create()->each(\n function ($product){\n $categories = \\App\\Category::all()->random(mt_rand(1, 5))->pluck('id');\n\n $product->categories()->attach($categories);\n }\n );\n factory(\\App\\Transaction::class, $transactionsQuentity)->create();\n\n }", "public function run()\n {\n Eloquent::unguard();\n \n $this->call('AdminMemberTableSeeder');\n $this->call('BankInfoTableSeeder');\n $this->call('LocationLookUpTableSeeder');\n $this->call('OrderStatusTableSeeder');\n $this->call('AdminRoleTableSeeder');\n\n }", "public static function setUpBeforeClass()\n {\n parent::setUpBeforeClass();\n $app = require __DIR__ . '/../../bootstrap/app.php';\n /** @var \\Pterodactyl\\Console\\Kernel $kernel */\n $kernel = $app->make(Kernel::class);\n $kernel->bootstrap();\n $kernel->call('migrate:fresh');\n\n \\Artisan::call('db:seed');\n }", "public function run()\n {\n Model::unguard();\n\n if( !User::where('email', '[email protected]')->count() ) {\n User::create([\n 'nombre'=>'Nick'\n ,'apellidos'=>'Palomino'\n ,'email'=>'[email protected]'\n ,'password'=> Hash::make('1234567u')\n ,'celular'=>'966463589'\n ]);\n }\n\n $this->call('CategoriaTableSeeder');\n $this->call('WhateverSeeder');\n $this->call('ProductTableSeeder');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n Model::unguard();\n\n $this->command->info('seed start!');\n\n // 省市县\n $this->call('RegionTableSeeder');\n // 用户、角色\n $this->call('UserTableSeeder');\n // 权限\n $this->call('PurviewTableSeeder');\n // 博文分类\n $this->call('CategoryTableSeeder');\n // 博文、评论、标签\n $this->call('ArticleTableSeeder');\n // 心情\n $this->call('MoodTableSeeder');\n // 留言\n $this->call('MessageTableSeeder');\n // 文件\n $this->call('StorageTableSeeder');\n\n $this->command->info('seed end!');\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n {\n $this->call(RolesDatabaseSeeder::class);\n $this->call(UsersDatabaseSeeder::class);\n $this->call(LocalesDatabaseSeeder::class);\n $this->call(MainDatabaseSeeder::class);\n }", "public function run()\n {\n\n Schema::disableForeignKeyConstraints(); //in order to execute truncate before seeding\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostCategoriesSeeder::class);\n $this->call(TagsSeeder::class);\n $this->call(PostsSeeder::class);\n\n Schema::enableForeignKeyConstraints();\n\n\n }", "public function run()\n {\n // DB::table('users')->insert([\n // ['id'=>1, 'email'=>'nhat','password'=>bcrypt(1234), 'lever'=>0]\n // ]);\n // $this->call(UsersTableSeeder::class);\n // $this->call(CatTableSeeder::class);\n // $this->call(TypeTableSeeder::class);\n // $this->call(AppTableSeeder::class);\n // $this->call(GameTableSeeder::class);\n \n \n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "public function run()\n\t{\n\t\t//composer require fzaninotto/faker\n\t\t\n\t\t$this->call(populateAllSeeder::class);\n\t\t\n\t}", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n Model::unguard();\n\n $faker =Faker\\Factory::create();\n\n // $this->call(UserTableSeeder::class);\n\n $this->seedTasks($faker);\n $this->seedTags($faker);\n\n Model::reguard($faker);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n $this->call([\n CountriesSeeder::class,\n ProvincesSeeder::class,\n SettingsSeeder::class,\n AdminsTableSeeder::class,\n ]);\n }" ]
[ "0.8064933", "0.7848158", "0.7674873", "0.724396", "0.7216743", "0.7132209", "0.70970356", "0.70752203", "0.704928", "0.699208", "0.6987078", "0.69839287", "0.6966499", "0.68990964", "0.6868679", "0.68468624", "0.68307716", "0.68206114", "0.6803113", "0.6803113", "0.6801801", "0.6789746", "0.6788733", "0.6788008", "0.6786291", "0.67765796", "0.67742485", "0.677106", "0.67651874", "0.6761959", "0.675823", "0.67337847", "0.6733437", "0.67295784", "0.67290515", "0.6724652", "0.67226326", "0.6722267", "0.6721339", "0.6715842", "0.67070943", "0.67060536", "0.67031103", "0.6702514", "0.6702361", "0.67017967", "0.6695973", "0.6693496", "0.66868156", "0.66837406", "0.6678434", "0.66755766", "0.66726524", "0.666599", "0.664943", "0.6640641", "0.663921", "0.66387916", "0.6636016", "0.6633116", "0.6629787", "0.6627134", "0.6625862", "0.661699", "0.66093796", "0.6602538", "0.65996546", "0.659914", "0.6596484", "0.6596383", "0.65922767", "0.65922284", "0.65913564", "0.65889347", "0.65812707", "0.65811145", "0.6579546", "0.6578819", "0.6575912", "0.65749073", "0.6574314", "0.657148", "0.65696406", "0.6568972", "0.65624833", "0.6560332", "0.6559092", "0.6557491", "0.65555155", "0.6554255", "0.65509576", "0.6548099", "0.65479296", "0.6545845", "0.65443295", "0.65434265", "0.65432936", "0.654295", "0.65426385", "0.6541781", "0.6539325" ]
0.0
-1
Display the index page
public function indexAction() { return $this->render('ToDoListBundle:Default:index.html.twig'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index() {\n\t\t$this->display('index');\n\t}", "public function index(){\r\n $this->display(index);\r\n }", "public function index() {\n $this->view->render('index/index', null, null);\n }", "function index() {\n $this->renderView(\"index\");\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index(){\n \n $this->display();\n }", "public function actionIndex()\n {\n $this->render('index');\n }", "public function actionIndex(){\r\r\n\t\t$this->render('index', array());\r\r\n\t}", "public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}", "public function actionIndex()\n\t{\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n {\n $this->view->render('index');\n }", "public function Index()\n {\n $this->standardView('Index');\n }", "public function index() {\n\t\t\t$this->render();\n\t\t}", "public function actionIndex()\n\t{\n\t\t\n\t\t$this->render('index');\n\t}", "public function indexAction()\n {\n $this->render('/views/index.html');\n }", "public function index()\n {\n $this->layout\n ->add('../students/home/index')\n ->launch();\n }", "public function actionIndex()\n\t{\n\t\t$this->layout = 'main' ;\n\t\t$this->render('index') ;\n\t}", "public function actionIndex()\n\t{\n\t\t$this->layout ='main';\n\t\t$this->render('index');\n\t}", "public function Index() {\n $this->Display();\n }", "public function actionIndex()\n {\n return $this->render('/index');\n }", "public function actionIndex() {\n\t\t$this->layout = 'main2';\n\t\t$this->render('index');\n\t}", "public function index() {\r\r\n $this->render('index', array('model' => $this->model));\r\r\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function indexAction()\n\t{\n\t\t$this->loadLayout();\n\t\t$this->renderLayout();\n\t\t\n\t}", "public function indexAction()\n {\n $tiles = array();\n $tiles[] = $indexRegion = $this->createIndexRegion();\n return $this->render($this->findTemplatePath('page.html'), [\n 'tiles' => $tiles,\n 'indexRegion' => $indexRegion,\n ]);\n }", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function actionIndex()\r\n {\r\n\t\treturn $this->render('index');\r\n }", "public function actionIndex()\r\n {\r\n \treturn $this->render('index');\r\n }", "public function actionIndex() {\n $this->assignLangue();\n $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function index()\n {\n $this->render('home/home');\n }", "public function indexAction() {\n\t\t$this->_initAction()\n\t\t\t->renderLayout();\n\t}", "public function actionIndex() {\n\t\treturn $this->render('index');\n\t}", "public function actionIndex()\n {\n\t return $this->render('index');\n }", "public function actionIndex()\n\t{\n\n\t\treturn $this->render(\"index\");\n\n\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index(){\n\t\t$this->view->render($this,'index');\n\t}", "public function indexAction() {\r\n\r\n $this->loadLayout();\r\n $this->renderLayout();\r\n }", "public function actionIndex() {\n // renders the view file 'protected/views/site/index.php'\n // using the default layout 'protected/views/layouts/main.php'\n $this->render('index');\n }", "public function actionIndex()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "function indexAction(){\n \n $this->_templateObj->loadTemplate();\n $this->_viewObj->title = \"<title>Tadmin - index/index </title>\";\n $this->_viewObj->render('index/index', true);\n\n }", "public function index() {\n $this->template->attach($this->resours);\n $this->template->draw('index/index', true);\n }", "public function actionIndex()\n {\n \t$this->layout='main';\n return $this->render('index');\n }", "public function actionIndex()\n {\n \t$this->layout='main';\n return $this->render('index');\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function actionIndex() {\r\n // renders the view file 'protected/views/site/index.php'\r\n // using the default layout 'protected/views/layouts/main.php'\r\n $this->render('index');\r\n }", "public function index()\n {\n return \"INDEX PAGE\";\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function index() {\n\n\t\t\t$controller = $this->nav->getPageController();\n\t\t\tif(isset($controller) && is_object($controller)) {\n\t\t\t\tassert($controller instanceof \\Toeswade\\IController);\n\n\t\t\t\t$action = $this->nav->getPageAction();\n\t\t\t\t$params = $this->nav->getParams();\n\t\t\t\t\n\t\t\t\tif(isset($action)) {\n\t\t\t\t\t$view = $controller->$action($params);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$view = $controller->index();\n\t\t\t\t}\n\n\t\t\t\tassert($view instanceof \\Toeswade\\IView);\n\t\t\t\t$main = $view->getHTML();\n\t\t\t\t$title = $view->getTitle();\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t$main = 'default';\n\t\t\t\t$title = $main;\n\t\t\t}\n\t\t\t$this->view->setTitle($title);\n\t\t\t$this->view->setMain($main);\n\t\t\t$this->view->setNav($this->nav->getMainNavigation());\n\n\t\t\t$this->view->render();\n\t\t}", "public function index(){\n\t\t$data['mainContent'] = 'landingPage/index';\n\t\t$this->landingPageRenderer('landingPage/index', $data);\n\t}", "public function indexAction()\n {\n $this->page = Brightfame_Builder::loadPage(null, 'initialize.xml');\n \n // load the data\n Brightfame_Builder::loadPage(null, 'load_data.xml', $this->page);\n\n // load the view\n Brightfame_Builder::loadPage(null, 'load_view.xml', $this->page, $this->view);\n \n // render the page\n $this->view->page = $this->page;\n $this->view->layout()->page = $this->page->getParam('xhtml');\n }", "public function index()\n {\n $this->show();\n }", "public function index() {\r\n $this->display(\r\n 'front/index.html.twig',\r\n [\r\n ]\r\n );\r\n }", "public function index()\n\t{\n\t\t$this->template\n\t\t\t->title('')\n\t\t\t->build('admin/index');\n\t}", "function index() {\n\t\t$this->show_list();\n\t}", "public function indexAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "public function indexAction()\n {\n $this->_initAction()\n ->renderLayout();\n }", "public function index( ) {\n $this->carregarDepencias();\n $this->addClasseBody('page-header-fixed page-quick-sidebar-over-content');\n\n\t\t$this->tpl = $this->CarregarTemplate( 'index.tpl.php' );\n\n\t\t$this->tpl->Renderizar();\n\n\t}", "public function actionIndex()\n {\n\n return $this->render('index');\n }", "public function actionIndex()\n {\n\n return $this->render('index');\n }", "public function actionIndex()\r\n\t{\r\n\t\t// renders the view file 'protected/views/site/index.php'\r\n\t\t// using the default layout 'protected/views/layouts/main.php'\r\n\t\t$this->render('index');\r\n\t}", "public function indexAction()\r\n {\r\n $this->_initAction()\r\n ->renderLayout();\r\n }", "public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}", "public function index()\n\t{\n\t\t$this->layout->render();\n\t}", "public function actionIndex()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('index');\n\t}" ]
[ "0.8746794", "0.86370385", "0.84437674", "0.8341127", "0.83265966", "0.82851595", "0.8229065", "0.8176689", "0.81565464", "0.8107233", "0.8081485", "0.8081485", "0.8081485", "0.8081485", "0.8071244", "0.8061226", "0.8052958", "0.8048271", "0.8047407", "0.8024438", "0.80175126", "0.80161905", "0.799752", "0.79704726", "0.79604906", "0.79588735", "0.79559517", "0.79509574", "0.7943916", "0.7932278", "0.7930277", "0.7924964", "0.7910042", "0.7908124", "0.79059565", "0.7898025", "0.7888707", "0.7885471", "0.7885202", "0.7882366", "0.78820246", "0.78741753", "0.78699434", "0.78640175", "0.78608876", "0.7848927", "0.7848102", "0.78476816", "0.78476816", "0.7846397", "0.78444666", "0.7835123", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.7834485", "0.78290933", "0.7828274", "0.78230035", "0.7821416", "0.7820508", "0.7820456", "0.78191507", "0.7815046", "0.7798899", "0.7797991", "0.7797379", "0.7797379", "0.7794132", "0.7789785", "0.7787025", "0.77856624", "0.77691334", "0.77691334", "0.77691334", "0.77691334", "0.77691334", "0.77691334" ]
0.0
-1
Given a twodimensional array of integers, return the flattened version of the array with all the integers in the sorted (ascending) order. Example: Given [[3, 2, 1], [4, 6, 5], [], [9, 7, 8]], your function should return [1, 2, 3, 4, 5, 6, 7, 8, 9].
function flatten_and_sort(array $a): array { $flatten = array_merge([], ...$a); sort($flatten); return $flatten; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flattenArray($array)\n{\n\t$flatArray = array();\n\tforeach ($array as $subElement) {\n \tif (is_array($subElement)) {\n\t\t\t$flatArray = array_merge($flatArray, flattenArray($subElement));\n\t\t} else {\n\t\t\t$flatArray[] = $subElement;\n\t\t}\n\t}\n\n\treturn $flatArray;\n}", "function array_flatten($array){\n\tif (is_array($array))\n\t\treturn $array ?\n\t\t\tcall_user_func_array('array_merge', array_map('array_flatten', $array))\n\t\t\t: array();\n\treturn array($array);\n}", "function flat(&$ary) {\n for ($i = 0; $i < count($ary); $i++) {\n while (is_array($ary[$i])) {\n array_splice($ary, $i, 1, $ary[$i]);\n }\n }\n}", "function flatArray($array){\n\t\t$result = [];\n\t\tif (is_array($array)) {\n\t\t\tforeach ($array as $element) {\n\t\t\t\t$result = array_merge($result, flatArray($element));\n\t\t\t}\n\t\t} else {\n\t\t\tarray_push($result, $array);\n\t\t}\n\n\t\treturn $result;\n\t}", "function array_flatten($array)\n\t{\n\t\t$return = array();\n\n\t\tarray_walk_recursive($array, function($x) use (&$return) { $return[] = $x; });\n\n\t\treturn $return;\n\t}", "function array_sort_recursive($array)\n {\n return Arr::sortRecursive($array);\n }", "function merge_sort($my_array){\n if(count($my_array) == 1 ) return $my_array;\n $mid = count($my_array) / 2;\n $left = array_slice($my_array, 0, $mid);\n $right = array_slice($my_array, $mid);\n $left = merge_sort($left);\n $right = merge_sort($right);\n return merge($left, $right);\n}", "public function array_sort_recursive($array)\n {\n return Arr::sortRecursive($array);\n }", "function array_flatten(array $array):array\n{\n if (!is_array($array)) {\n return false;\n }\n $result = array();\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $result = array_merge($result, array_flatten($value));\n } else {\n $result = array_merge($result, array($key => $value));\n }\n }\n return $result;\n}", "function array_flatten($array) { \r\n if (!is_array($array)) { \r\n return false; \r\n } \r\n $result = array(); \r\n foreach ($array as $key => $value) { \r\n if (is_array($value)) { \r\n $result = array_merge($result, array_flatten($value)); \r\n } else { \r\n $result[$key] = $value; \r\n } \r\n } \r\n return $result; \r\n}", "function array_flatten($array): array\n{\n return array_reduce(\n $array,\n function ($acc, $item) {\n if (is_array($item) || $item instanceof Traversable) {\n return array_merge($acc, array_flatten($item));\n } else {\n $acc[] = $item;\n\n return $acc;\n }\n },\n []\n );\n}", "function array_flatten($array) { \n\tif (!is_array($array)) { \n\t\treturn FALSE; \n\t} \n\t$result = array(); \n\tforeach ($array as $key => $value) { \n\t\tif (is_array($value)) { \n\t\t\t$result = array_merge($result, array_flatten($value)); \n\t\t} \n\t\telse { \n\t\t\t$result[$key] = $value; \n\t\t} \n\t} \n\treturn $result; \n}", "function array_flatten($array, $depth = INF)\n {\n return Arr::flatten($array, $depth);\n }", "function erp_array_flatten( $array ) {\n if ( ! is_array( $array ) ) {\n return false;\n }\n $result = array();\n foreach ( $array as $key => $value ) {\n if ( is_array( $value ) ) {\n $result = array_merge( $result, erp_array_flatten( $value ) );\n } else {\n $result[ $key ] = $value;\n }\n }\n\n return $result;\n}", "static function flatten(array $array) {\n $ret = [];\n\n array_walk_recursive($array, function ($i) use (&$ret) {\n $ret[] = $i;\n });\n\n return $ret;\n }", "function merge_sort($arr)\n{\n $length = count($arr);\n\n if ($length <= 1) {\n return $arr;\n }\n\n $half = ($length >> 1) + ($length & 1);\n $half_arr = array_chunk($arr, $half);\n\n $left = merge_sort($half_arr[0]);\n $right = merge_sort($half_arr[1]);\n\n while (count($left) && count($right)) {\n if ($left[0] < $right[0]) {\n $reg[] = array_shift($left);\n } else {\n $reg[] = array_shift($right);\n }\n }\n\n return array_merge($reg, $left, $right);\n}", "public static function sortRecursive($array)\n {\n foreach ($array as &$value) {\n if (is_array($value)) {\n $value = static::sortRecursive($value);\n }\n }\n\n if (static::isAssoc($array)) {\n ksort($array);\n } else {\n sort($array);\n }\n\n return $array;\n }", "public static function sortRecursive($array)\n {\n foreach ($array as &$value) {\n if (is_array($value)) {\n $value = static::sortRecursive($value);\n }\n }\n\n if (static::isAssoc($array)) {\n ksort($array);\n } else {\n sort($array);\n }\n\n return $array;\n }", "function array_flatten($array) {\n\tif (!is_array($array)) {\n\t\treturn FALSE;\n\t}\n\t$result = array();\n\tforeach ($array as $key => $value) {\n\t\tif (is_array($value)) {\n\t\t\t$result = array_merge($result, array_flatten($value));\n\t\t} else {\n\t\t\t$result[$key] = $value;\n\t\t}\n\t}\n\treturn $result;\n}", "public static function flatten(array $input)\n {\n $output = array();\n self::flattenSub($input, $output);\n return $output;\n }", "function flatten($array) {\n $result = array();\n foreach($array as $key => $subarray) {\n $result = array_merge($result, $subarray);\n }\n return $result;\n }", "public static function array_flatten(array $array, $return = []) {\n\t\tfor ($x = 0; $x <= count($array); $x++) {\n\t\t\tif (is_array($array[$x])) {\n\t\t\t\t$return = self::array_flatten($array[$x], $return);\n\t\t\t} else if (isset($array[$x])) {\n\t\t\t\t$return[] = $array[$x];\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "public static function flatten( $array, $depth = INF )\n {\n $result = [];\n\n foreach ( $array as $item ) {\n if ( ! is_array( $item ) ) {\n $result[] = $item;\n } elseif ( $depth === 1 ) {\n $result = array_merge( $result, array_values( $item ) );\n } else {\n $result = array_merge( $result, static::flatten( $item, $depth - 1 ) );\n }\n }\n\n return $result;\n }", "public function array_flatten($array, $depth = INF)\n {\n return Arr::flatten($array, $depth);\n }", "public static function flatten( $array )\n\t{\n\t\t$flat = array();\n\t\tforeach ( $array as $key => $value ) {\n\t\t\tif ( is_array( $value ) ) {\n\t\t\t\t$flat += self::flatten( $value );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$flat[$key] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $flat;\n\t}", "public static function flatten($array)\n {\n $return = [];\n\n array_walk_recursive($array, function($x) use (&$return) { $return[] = $x; });\n\n return $return;\n }", "public static function flatten($array)\n {\n $return = [];\n\n array_walk_recursive($array, function ($x) use (&$return) {\n $return[] = $x;\n });\n\n return $return;\n }", "function flatten($args){\n $res = array();\n foreach($args as $a) {\n if(is_array($a)) $res = array_merge($res, flatten($a));\n else $res[] = $a;\n }\n return $res;\n}", "private function array_flatten(array $a) {\r\n $ab = [];\r\n\r\n if (!is_array($a)) return [];\r\n\r\n foreach ($a as $value) {\r\n if (is_array($value)) {\r\n $ab = array_merge($ab, $this->array_flatten($value));\r\n } else {\r\n array_push($ab, $value);\r\n }\r\n }\r\n\r\n return $ab;\r\n }", "public static function flatten($array, $depth = INF)\n {\n $result = [];\n\n foreach ($array as $item) {\n $item = $item instanceof Collection ? $item->all() : $item;\n\n if (! is_array($item)) {\n $result[] = $item;\n } elseif ($depth === 1) {\n $result = array_merge($result, array_values($item));\n } else {\n $result = array_merge($result, static::flatten($item, $depth - 1));\n }\n }\n\n return $result;\n }", "function array_flatten($array)\n {\n return Arr::flatten($array);\n }", "public function allFlattened(): array;", "function quickSort($array)\n{\n $len = count($array);\n if ($len <= 1) {\n return $array;\n }\n\n //compare data\n $base = $array[0];\n\n $left = $right = [];\n for ($i = 1; $i < $len; $i++) {\n if ($array[$i] < $base) {\n $left[] = $array[$i];\n } else {\n $right[] = $array[$i];\n }\n }\n\n $left = quickSort($left);\n $right = quickSort($right);\n\n return array_merge($left, (array)$base, $right);\n}", "function monkey_sort($array) {\n while (!is_sorted($array)) {\n if (PRINT_ARRAY)\n echo implode(', ', $array) . PHP_EOL;\n shuffle($array);\n }\n return $array;\n}", "function array_merge(/* $array, ... */): array\n{\n $merged = [];\n $arrays = array_reverse(func_get_args());\n while (!empty($arrays)) {\n $current = array_shift($arrays);\n if (!is_array($current)) {\n $current = [$current];\n }\n foreach (array_reverse($current) as $key => $value) {\n if (array_key_exists($key, $merged)) {\n if (is_array($value) && is_array($merged[$key])) {\n $merged[$key] = array_merge($value, $merged[$key]);\n }\n if (is_numeric($key)) {\n $merged[] = $value;\n }\n } else {\n $merged[$key] = $value;\n }\n }\n }\n\n return array_reverse($merged);\n}", "function quick_sort($array)\n {\n // find array size\n $length = count($array);\n \n // base case test, if array of length 0 then just return array to caller\n if ($length <= 1)\n {\n return $array;\n }\n else\n {\n \n // select an item to act as our pivot point, since list is unsorted first position is easiest\n $pivot = $array[0];\n \n // declare our two arrays to act as partitions\n $left = $right = array();\n \n // loop and compare each item in the array to the pivot value, place item in appropriate partition\n for ($i = 1; $i < count($array); $i++)\n {\n if ($array[$i] < $pivot)\n {\n $left[] = $array[$i];\n }\n else\n {\n $right[] = $array[$i];\n }\n }\n \n // use recursion to now sort the left and right lists\n return array_merge(quick_sort($left), array(\n $pivot\n ), quick_sort($right));\n }\n }", "function array_merge_recursive_distinct() {\n $arrays = func_get_args();\n $base = array_shift($arrays);\n if (!is_array($base))\n $base = empty($base)? array(): array($base);\n foreach ($arrays as $append) {\n if (!is_array($append)) $append = array($append);\n foreach ($append as $key => $value) {\n if(!array_key_exists($key, $base) and !is_numeric($key)) {\n $base[$key] = $append[$key];\n continue;\n }\n if (is_array($value) or is_array($base[$key]))\n $base[$key] = array_merge_recursive_distinct($base[$key], $append[$key]);\n else if (is_numeric($key))\n if(!in_array($value, $base)) $base[] = $value;\n else\n $base[$key] = $value;\n }\n }\n return $base;\n}", "public static function arrayMergeRecursiveDistinct()\n {\n $arrays = func_get_args();\n $base = array_shift($arrays);\n if(!is_array($base)) $base = empty($base) ? array() : array($base);\n foreach($arrays as $append)\n {\n if(!is_array($append)) $append = array($append);\n foreach($append as $key => $value) {\n if(!array_key_exists($key, $base) and !is_numeric($key))\n {\n $base[$key] = $append[$key];\n continue;\n }\n if(is_array($value) or is_array($base[$key]))\n {\n $base[$key] = self::arrayMergeRecursiveDistinct($base[$key], $append[$key]);\n } else if(is_numeric($key))\n {\n if(!in_array($value, $base)) $base[] = $value;\n } else\n {\n $base[$key] = $value;\n }\n }\n }\n return $base;\n }", "public static function transformNestedArrayToFlatArray($input)\n {\n $output_array = [];\n if (is_array($input)) {\n foreach ($input as $value) {\n if (is_array($value)) {\n $output_array = array_merge($output_array, self::transformNestedArrayToFlatArray($value));\n } else {\n array_push($output_array, $value);\n }\n }\n } else {\n array_push($output_array, $input);\n }\n\n return $output_array;\n }", "static function arrayFlatten($arrayNested) {\n\t\t$returnArray = array();\n\t\tforeach ( $arrayNested as $key => $val ) {\n\t\t\tif (is_array($val)) {\n\t\t\t\t$returnArray = Set::merge($returnArray,$val);\n\t\t\t} else {\n\t\t\t\t$returnArray[$key] = $val;\n\t\t\t}\n\t\t}\n\t\treturn $returnArray;\n\t}", "function wp_recursive_ksort(&$input_array)\n {\n }", "public static function flatten(array $array): array\n {\n $is_assoc = self::isAssoc($array);\n\n $flat = [];\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $flat[] = self::flatten($value);\n } elseif ($is_assoc) {\n $flat[$key] = $value;\n } else {\n $flat[] = $value;\n }\n }\n $flat = array_merge(...$flat);\n return $flat;\n }", "function sort(/*. array[int] .*/ $a, $sort_flags = SORT_REGULAR){}", "function array_sort($array, $on, $order=SORT_ASC){\n $new_array = array();\n $sortable_array = array();\n if (count($array) > 0) {\n foreach ($array as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $k2 => $v2) {\n if ($k2 == $on) {\n $sortable_array[$k] = $v2;\n }\n }\n } else {\n $sortable_array[$k] = $v;\n }\n }\n switch ($order) {\n case SORT_ASC:\n asort($sortable_array);\n break;\n case SORT_DESC:\n arsort($sortable_array);\n break;\n }\n foreach ($sortable_array as $k => $v) {\n $new_array[] = $array[$k];\n }\n }\n return $new_array;\n}", "function array_merge_recursive_distinct ()\n\t{\n\t\t$arrays = func_get_args();\n\t\t$base = array_shift($arrays);\n\t\tif(!is_array($base)) $base = empty($base) ? array() : array($base);\n\t\tforeach($arrays as $append)\n\t\t{\n\t\t\tif(!is_array($append)) $append = array($append);\n\t\t\tforeach($append as $key => $value)\n\t\t\t{\n\t\t\t\tif(!array_key_exists($key, $base) and !is_numeric($key))\n\t\t\t\t{\n\t\t\t\t\t$base[$key] = $append[$key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(is_array($value) or is_array($base[$key]))\n\t\t\t\t{\n\t\t\t\t\t$base[$key] = array_merge_recursive_distinct($base[$key], $append[$key]);\n\t\t\t\t}\n\t\t\t\telse if(is_numeric($key))\n\t\t\t\t{\n\t\t\t\t\tif(!in_array($value, $base)) $base[] = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$base[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $base;\n\t}", "function array_sort($array, $on, $order=SORT_ASC)\n{\n $new_array = array();\n $sortable_array = array();\n\n if (count($array) > 0) {\n foreach ($array as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $k2 => $v2) {\n if ($k2 == $on) {\n $sortable_array[$k] = $v2;\n }\n }\n } else {\n $sortable_array[$k] = $v;\n }\n }\n\n switch ($order) {\n case SORT_ASC:\n asort($sortable_array);\n break;\n case SORT_DESC:\n arsort($sortable_array);\n break;\n }\n\n foreach ($sortable_array as $k => $v) {\n $new_array[$k] = $array[$k];\n }\n }\n\n return $new_array;\n}", "private static function recursive_ksort( &$array ) {\n\t\tforeach ( $array as &$value ) {\n\t\t\tif ( is_array( $value ) ) {\n\t\t\t\tself::recursive_ksort( $value );\n\t\t\t}\n\t\t}\n\t\tksort( $array );\n\t}", "function bubbleSort(array $array): array\n{\n $needSorting = true;\n while ($needSorting === true) {\n $size = count($array);\n $needSorting = false;\n for ($i = 0; $i < $size - 1; $i++) {\n if ($array[$i] > $array[$i + 1]) {\n $needSorting = true;\n $temp = $array[$i + 1];\n $array[$i + 1] = $array[$i];\n $array[$i] = $temp;\n }\n }\n $size--;\n }\n return $array;\n}", "function combine($array) {\n\t\tif (empty($array)) {\n\t\t\treturn array();\n\t\t}\n\t\t$res = array();\n\t\t$first = current($array);\n\t\tarray_shift($array);\n\t\t$tail = $array;\n\t\tif (empty($tail)) {\n\t\t\tforeach ($first as $item) {\n\t\t\t\t$res[] = array($item);\n\t\t\t}\n\t\t} else {\n\t\t\tforeach ($first as $item) {\n\t\t\t\tforeach ($this->combine($tail) as $j) {\n\t\t\t\t\t$res[] = array_merge(array($item), $j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "public static function flatten($array, $recursive = false)\n {\n $return = array();\n \n if ($recursive)\n {\n array_walk_recursive($array, function ($x) use(&$return) {\n $return[] = $x;\n });\n }\n else\n {\n array_walk($array, function ($x) use(&$return) {\n $return[] = $x;\n });\n }\n \n return $return;\n }", "function mergesort($data) {\r\n if(count($data)>1) {\r\n \r\n // Find out the middle of the current data set and split it there to obtain to halfs\r\n $data_middle = round(count($data)/2, 0, PHP_ROUND_HALF_DOWN);\r\n // and now for some recursive magic\r\n $data_part1 = mergesort(array_slice($data, 0, $data_middle));\r\n $data_part2 = mergesort(array_slice($data, $data_middle, count($data)));\r\n // Setup counters so we can remember which piece of data in each half we're looking at\r\n $counter1 = $counter2 = 0;\r\n // iterate over all pieces of the currently processed array, compare size & reassemble\r\n for ($i=0; $i<count($data); $i++) {\r\n // if we're done processing one half, take the rest from the 2nd half\r\n if($counter1 == count($data_part1)) {\r\n $data[$i] = $data_part2[$counter2];\r\n ++$counter2;\r\n // if we're done with the 2nd half as well or as long as pieces in the first half are still smaller than the 2nd half\r\n } elseif (($counter2 == count($data_part2)) or ($data_part1[$counter1] < $data_part2[$counter2])) { \r\n $data[$i] = $data_part1[$counter1];\r\n ++$counter1;\r\n } else {\r\n $data[$i] = $data_part2[$counter2];\r\n ++$counter2;\r\n }\r\n }\r\n }\r\n return $data;\r\n}", "function flatten(array $list, array $flat = []): array\n{\n if (empty($list)) {\n return $flat;\n }\n\n list($head, $tail) = [$list[0], array_slice($list, 1)];\n\n return flatten($tail, is_array($head) ? flatten($head, $flat) : array_merge($flat, [$head]));\n}", "function concatAll($array) {\n\t$results = array();\n\tforeach ($array as $item) {\n\t\t// Merge arrays...\n\t\tif (is_array($item)) {\n\t\t\t$results = array_merge($results, $item);\n\t\t\tcontinue;\n\t\t}\n\t\t// ...push anything else.\n\t\t$results[] = $item;\n\t}\n\treturn $results;\n}", "function stage_flatten($array, $prefix = '')\n{\n $result = array();\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $result = $result + stage_flatten($value, $prefix . $key . '.');\n } else {\n $result[$prefix . $key] = $value;\n }\n }\n return $result;\n}", "function sort_array($array, $key)\n {\n foreach ($array as $temp_list) {\n $sort_aux[] = ($temp_list[$key]);\n }\n array_multisort($sort_aux, SORT_ASC, $array);\n\n return $array;\n }", "public function get_flat_items_list()\n {\n $list = array();\n $i = 1;\n foreach ($this->items as $id => $dummy) {\n $abs_order = 0;\n // Passes the array as a pointer so it is modified in $list directly.\n $this->items[$id]->get_flat_list($list,$abs_order, $i, 0);\n $i++;\n }\n\n return $list;\n }", "function mergesort($data)\n{\n // Only process if we're not down to one piece of data\n if (count($data) > 1) {\n\n // Find out the middle of the current data set and split it there to obtain to halfs\n $data_middle = round(count($data) / 2, 0, PHP_ROUND_HALF_DOWN);\n // and now for some recursive magic\n $data_part1 = mergesort(array_slice($data, 0, $data_middle));\n $data_part2 = mergesort(array_slice($data, $data_middle, count($data)));\n // Setup counters so we can remember which piece of data in each half we're looking at\n $counter1 = $counter2 = 0;\n $count_data = count($data);\n $count_data_part1 = count($data_part1);\n $count_data_part2 = count($data_part2);\n // iterate over all pieces of the currently processed array, compare size & reassemble\n for ($i = 0; $i < $count_data; ++$i) {\n // if we're done processing one half, take the rest from the 2nd half\n if ($counter1 == $count_data_part1) {\n $data[$i] = $data_part2[$counter2];\n ++$counter2;\n // if we're done with the 2nd half as well or as long as pieces in the first half are still smaller than the 2nd half\n } elseif (($counter2 == $count_data_part2) or ($data_part1[$counter1] < $data_part2[$counter2])) {\n $data[$i] = $data_part1[$counter1];\n ++$counter1;\n } else {\n $data[$i] = $data_part2[$counter2];\n ++$counter2;\n }\n }\n }\n return $data;\n}", "private function flatten(array $values)\n {\n $generator = static function ($values, &$output) use (&$generator) {\n foreach ($values as $value) {\n if (is_iterable($value)) {\n $generator($value, $output);\n continue;\n }\n $output[] = $value;\n }\n };\n $out = [];\n $generator($values, $out);\n\n return $out;\n }", "function mergesort(&$array, $cmp_function) \n{\n //base case, end\n if ( count( $array ) <= 1 ) \n {\n \treturn;\n }\n else\n {\n \n\t\t//find middle, get two arrays, recursive call\n\t\t$middle = count( $array ) / 2;\n\t\t$array1 = array_slice($array, 0, $middle);\n\t\t$array2 = array_slice($array, $middle);\n\t\n\t\tmergesort($array1, $cmp_function);\n\t\tmergesort($array2, $cmp_function);\n\t\t\n\t\t//if the arrays are sorted\n\t\tif ( call_user_func( $cmp_function, end( $array1 ), $array2[0] ) < 1 ) \n\t\t{\n\t\t\t$array = array_merge($array1, $array2);\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t//populate the array\n\t\t\t$array = array();\n\t\t\t$currIndex1 = 0;\n\t\t\t$currIndex2 = 0;\n\t\t\t\n\t\t\t//while both arrays still have values\n\t\t\twhile ($currIndex1 < count( $array1 ) && $currIndex2 < count($array2) ) \n\t\t\t{\n\t\t\t\n\t\t\t\t// call my comparison function to sort them\n\t\t\t\tif (call_user_func( $cmp_function, $array1[$currIndex1], $array2[$currIndex2] ) < 1) \n\t\t\t\t{\n\t\t\t\t\t$array[] = $array1[$currIndex1++];\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$array[] = $array2[$currIndex2++];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// find out which array still has values, and fill the rest in\n\t\t\tif ( $currIndex1 < count( $array1 ) )\n\t\t\t{\n\t\t\t\n\t\t\t\twhile ( $currIndex1 < count($array1) ) \n\t\t\t\t{\n\t\t\t\t\t$array[] = $array1[$currIndex1++];\n\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\n\t\t\t\twhile ( $currIndex2 < count($array2) ) \n\t\t\t\t{\n\t\t\t\t\t$array[] = $array2[$currIndex2++];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n}", "function mergesort($data)\n {\n if (count($data) > 1)\n {\n \n // Find out the middle of the current data set and split it there to obtain to halfs\n $data_middle = round(count($data) / 2, 0, PHP_ROUND_HALF_DOWN);\n // and now for some recursive magic\n $data_part1 = mergesort(array_slice($data, 0, $data_middle));\n $data_part2 = mergesort(array_slice($data, $data_middle, count($data)));\n // Setup counters so we can remember which piece of data in each half we're looking at\n $counter1 = $counter2 = 0;\n // iterate over all pieces of the currently processed array, compare size & reassemble\n for ($i = 0; $i < count($data); $i++)\n {\n // if we're done processing one half, take the rest from the 2nd half\n if ($counter1 == count($data_part1))\n {\n $data[$i] = $data_part2[$counter2];\n ++$counter2;\n // if we're done with the 2nd half as well or as long as pieces in the first half are still smaller than the 2nd half\n }\n elseif (($counter2 == count($data_part2)) or ($data_part1[$counter1] < $data_part2[$counter2]))\n {\n $data[$i] = $data_part1[$counter1];\n ++$counter1;\n }\n else\n {\n $data[$i] = $data_part2[$counter2];\n ++$counter2;\n }\n }\n }\n return $data;\n }", "function sort_array_of_arrays( $array, $sort_by_key ) {\n\n usort( $array, function ( $item1, $item2 ) use ( $sort_by_key ) {\n\n if ($item1[ $sort_by_key ] == $item2[ $sort_by_key ]) return 0;\n return $item1[ $sort_by_key ] < $item2[ $sort_by_key ] ? -1 : 1;\n\n });\n\n return $array;\n\n}", "function array_filter_recursive(array $array, callable $callback = null)\n {\n $array = is_callable($callback) ? array_filter($array, $callback) : array_filter($array);\n\n foreach ($array as &$value) {\n if (is_array($value)) {\n $value = call_user_func(__FUNCTION__, $value, $callback);\n }\n }\n\n return $array;\n }", "function ArrayRemoveEmptyOrder($arr)\r\n{\r\n\r\n $arr = array_filter($arr);\r\n\r\n $newMy = array();\r\n $i = 0;\r\n\r\n foreach ($arr as $key => $value) {\r\n if (!is_null($value)) {\r\n $newMy[$i] = $value;\r\n $i++;\r\n }\r\n }\r\n return $newMy;\r\n}", "function quicksort($arr) {\n // We return if the array is less than or equal to one, cause you cant sort\n // an array this small!\n if (count($arr) <= 1) {\n return $arr;\n } \n\n // Let's split our results into left and right partitions. \n $leftPartion = [];\n $rightPartition = [];\n $pivot = $arr[0];\n\n // Start $i at 1 so we dont have to repeat our pivot\n\n for ($i=1; $i<count($arr); $i++) {\n if ($arr[$i] < $pivot) {\n $leftPartion[] = $arr[$i];\n }\n else {\n $rightPartition[] = $arr[$i];\n }\n }\n\n var_dump(\"iteration: \" . $i);\n var_dump($leftPartion);\n\n // Merges the left partition, pivot, and right partition into one array\n $merged = array_merge(quicksort($leftPartion), [$pivot], quicksort($rightPartition));\n return $merged;\n}", "function array_filter_recursive( array $array, callable $callback = null ) {\r\n\t\t$array = is_callable( $callback ) ? array_filter( $array, $callback ) : array_filter( $array );\r\n\t\tforeach ( $array as &$value ) {\r\n\t\t\tif ( is_array( $value ) ) {\r\n\t\t\t\t$value = call_user_func( __FUNCTION__, $value, $callback );\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t\treturn $array;\r\n\t}", "public static function array_merge_recursive(array $array)\n\t{\n\t\t$args = func_get_args();\n\t\t$num = func_num_args();\n\t\tif ($num == 1)\n\t\t\treturn $array;\n\t\t\n\t\t$merged = $array;\n\t\t\n\t\tfor ($i = 1; $i < $num; $i++) {\n\t\t\t$merge = $args[$i];\n\t\t\tforeach ($merge as $key => $val) {\n\t\t\t\tif (is_array($val) && isset($merged[$key]) && is_array($merged[$key])) {\n\t\t\t\t\t$merged[$key] = static::array_merge_recursive($merged[$key], $val);\n\t\t\t\t} else {\n\t\t\t\t\t$merged[$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $merged;\n\t\t\n\t}", "protected function flatten($array)\n {\n $levelResults = array();\n $results = array();\n \n // Loops through level values, where an array or object flattens the next level,\n // where values applies these to the level results.\n foreach ($array as $key => $value) {\n if (is_array($value) or is_object($value)) {\n $temp = self::flatten((array)$value);\n $results = array_merge($temp, $results);\n } else {\n if (gettype($value) == 'boolean') {\n $levelResults[$key] = (($value) ? 'true' : 'false');\n } else {\n $levelResults[$key] = (string)$value;\n }\n }\n }\n \n // Copies higher level values onto lower levels so that the array remains 2 dimensional.\n // Will duplicate the values over multiple rows should this happen.\n if (count($levelResults) > 0 and count($results) > 0) {\n $resultsCount = count($results);\n for ($i = 0; $i < $resultsCount; $i ++) {\n foreach ($levelResults as $key => $value) {\n $results[$i][$key] = $value;\n }\n }\n } else if (count($results) == 0 and count($levelResults) > 0) {\n $results[] = $levelResults;\n }\n \n return $results;\n }", "function bubblesort_once($a) {\n for($i = 0; $i < count($a) - 1; $i++) {\n $temp = $a[$i];\n if ($a[$i] > $a[$i + 1]) {\n $a[$i]= $a[$i + 1];\n $a[$i + 1] = $temp;\n }\n }\n return $a;\n}", "function array_multisort_2d($array,$column,$sortorder='',$base=1){\n\tglobal $array_multisort_2d;\n\tif(!$array)return $array;\n\n\tforeach($array as $n=>$v){\n\t\t//develop link based on column\n\t\t$ref[]=strtolower($v[$column]);\n\t\t$refb[]=$n;\n\t}\n\t//need to develop to arsort if called\n\tasort($ref);\n\t$base=$base-1;\n\tforeach($ref as $n=>$v){\n\t\t$base++;\n\t\t$buffer[$base]=$array[$refb[$n]];\n\t}\n\treturn $buffer;\n}", "function get_values($arr)\n{\n $values = [];\n foreach ($arr as $item) {\n if (is_array($item)) {\n $values = array_merge($values, get_values($item));\n } else {\n $values[] = $item;\n }\n }\n return $values;\n}", "static function merge(/*...*/){\n $ar = array_filter(func_get_args(),'is_array'); // remove non-arrays\n $nc = count($ar);\n if($nc==0) return(NULL);\n if($nc==1) return($ar[0]);\n $res = call_user_func_array('array_merge_recursive',$ar);\n $res = ops_narray::_merge_reduce($res);\n return($res);\n }", "public static function rotateArray($arr) {\n $tmp = $arr;//Prevent the main from being modified\n $sub = array_slice($tmp, 1);\n array_unshift($sub, array_pop($sub));\n return array_merge(array_slice($tmp,0,1), $sub);\n }", "function array_sort($array, $sortby) {\n\n $size = sizeof($array);\n\n for($i=0;$i<$size;$i++) {\n for($j=$i+1;$j<$size;$j++) {\n $temp = array();\n if($array[$i]['priority']<$array[$j]['priority']) {\n $temp = $array[$i];\n $array[$i] = $array[$j];\n $array[$j] = $temp;\n }\n }\n }\n return $array;\n}", "function md_flatten_keys($a, $lvl = 0){\n\tif(!is_array($a)) return $a;\n\t$b = array();\n\tforeach($a as $k => $v){\n\t\t$b[$k] = $lvl;\n\t\tif(is_array($v)) $b += md_flatten_keys($v, $lvl+1);\n\t}\n\treturn $b;\n}", "private function flatten($array)\n {\n $flattened = [];\n\n foreach ($array as $collection => $entries) {\n foreach ($entries as $uuid => $entry) {\n $flattened[$uuid] = $entry;\n }\n }\n\n return $flattened;\n }", "public function mySort(array $array);", "public static function ksortRecursive (&$array)\r\n\t{\r\n\t\tksort ($array);\r\n\t\t$keys = array_keys ($array);\r\n\t\tforeach ($keys as $key) {\r\n\t\t\tif (is_array ($array[$key])) {\r\n\t\t\t\tself::ksortRecursive ($array[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function array_flat($array, $prefix = '')\n {\n $result = array();\n\n foreach ($array as $key => $value)\n {\n $new_key = $prefix . (empty($prefix) ? '' : '.') . $key;\n\n if (is_array($value))\n {\n $result = array_merge($result, $this->array_flat($value, $new_key));\n }\n else\n {\n $result[$new_key] = $value;\n }\n }\n\n return $result;\n }", "public function flattenArray($array, $preserveKeys = 0, &$out = array())\n {\n foreach ($array as $key => $child) {\n if (is_array($child)) {\n $out = $this->flattenArray($child, $preserveKeys, $out);\n } elseif ($preserveKeys + is_string($key) > 1) {\n $out[$key] = $child;\n } else {\n $out[] = $child;\n }\n }\n return $out;\n }", "function compress_array($array) {\n if (!is_array($array)) {\n return quote($array);\n }\n $strings=array();\n foreach ($array as $ind => $val) {\n $strings[]=quote($ind).\"=>\".\n (is_array($val)?compress_array($val):quote($val));\n }\n return \"array(\".implode(\",\",$strings).\")\";\n}", "function bubblSort_Integer()\n {\n echo \"Total elements of array.\\n\";\n $sizeOfarray = AlgorithmsUtility::get_Integer();\n $arr = array();\n echo \"elements of array: \\n\";\n for ($i = 0; $i < $sizeOfarray; $i++) {\n $arr[$i] = AlgorithmsUtility::get_Integer();\n }\n\n\n for ($i = 0; $i < $sizeOfarray; $i++) {\n for ($j = 0; $j < $sizeOfarray - 1 - $i; $j++) {\n // swapping logic\n if ($arr[$j] > $arr[$j + 1]) {\n $t = $arr[$j];\n $arr[$j] = $arr[$j + 1];\n $arr[$j + 1] = $t;\n }\n }\n }\n for ($i = 1; $i < $sizeOfarray; $i++) {\n echo $arr[$i] . \" \";\n }\n echo \"\\n\";\n }", "function sortArrayWithSelection( &$arr ) {\r\n\t$i = 0;\r\n\t$size = count( $arr );\r\n\r\n\twhile ( $i < $size - 1 ) {\r\n\t\t$j = $i;\r\n\t\tfor ( $k = $j + 1; $k < $size; $k++ ) {\r\n\t\t\tif ( $arr[ $k ] < $arr[ $j ] ) {\r\n\t\t\t\t$j = $k;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( $arr[ $i ] > $arr[ $j ] ) {\r\n\t\t\tswapArrayByValues( $arr, $i, $j );\r\n\t\t}\r\n\t\t$i++;\r\n\t}\r\n}", "public function flatten();", "public function flatten();", "public function flatten();", "function array_sort($array, $on, $order=SORT_ASC) {\n\t$new_array = array();\n\t$sortable_array = array();\n\n\tif (count($array) > 0) {\n\t\tforeach ($array as $k => $v) {\n\t\t\tif (is_array($v)) {\n\t\t\t\tforeach ($v as $k2 => $v2) {\n\t\t\t\t\tif ($k2 == $on) {\n\t\t\t\t\t\t$sortable_array[$k] = $v2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sortable_array[$k] = $v;\n\t\t\t}\n\t\t}\n\n\t\tswitch ($order) {\n\t\t\tcase SORT_ASC:\n\t\t\t\tasort($sortable_array);\n\t\t\tbreak;\n\t\t\tcase SORT_DESC:\n\t\t\t\tarsort($sortable_array);\n\t\t\tbreak;\n\t\t}\n\n\t\tforeach ($sortable_array as $k => $v) {\n\t\t\t$new_array[$k] = $array[$k];\n\t\t}\n\t}\n\n\treturn $new_array;\n}", "function uniqueInOrder($iterable): array\n{\n $len = is_array($iterable) ? count($iterable) : strlen($iterable);\n $res = [];\n\n if ($len) {\n $item = $iterable[0];\n $res[] = $item;\n\n for($i = 0; $i < $len; $i++) {\n if ($iterable[$i] !== $item) {\n $item = $iterable[$i];\n $res[] = $item;\n }\n }\n }\n\n return $res;\n}", "static public function sort_deep(&$array, $type = \"asort\"){\n $type($array);\n foreach($array as $value)\n if(is_array($value))\n self::sort_deep($value);\n }", "function sortArrayByArray($array,$orderArray) {\n\t$ordered = array();\n\tforeach($orderArray as $key) {\n\t\tif(array_key_exists($key,$array)) {\n\t\t\t$ordered[$key] = $array[$key];\n\t\t\tunset($array[$key]);\n\t\t}\n\t}\n\treturn $ordered + $array;\n}", "public static function knatsort ($array)\r\n\t{\r\n\t\t$keys = array_keys ($array);\r\n\t\tnatsort ($keys);\r\n\t\t$items = array ();\r\n\t\tforeach ($keys as $key) {\r\n\t\t\t$items[$key] = $array[$key];\r\n\t\t}\r\n\t\t\r\n\t\t# Return the sorted list\r\n\t\treturn $items;\r\n\t}", "function sort_by_sub_element($array,$element){\n\tforeach($array as $id => $sub_array){\n\t\tif(is_object($sub_array)) $sub_array = get_object_vars($sub_array);\n\t\t$sorting_array[$id]=$sub_array[$element];\n\t}\n\tasort($sorting_array);\n\t$sorting_array = array_reverse($sorting_array, true);\n\t\n\tforeach ($sorting_array as $id=>$next_post){\n\t\t$sorted_posts[] = $array[$id];\n\t}\n\t\n\t$sorted_posts = array_reverse($sorted_posts);\n\treturn $sorted_posts;\n\t\n}", "function sortFriendArray($friends)\n {\n $friendsNew = [];\n foreach ($friends as $fr) {\n $friendsNew[] = $fr;\n }\n return $friendsNew;\n }", "function array_reindex($array)\n{\n if (array_values($array) === $array) {\n $array = array_flip($array);\n }\n\n return $array;\n}", "static public function flatten( array $array, array $skip = array() )\n {\n $result = array();\n \n foreach ( $array as $key => $value ) {\n \n if ( in_array( $key, $skip, true ) === false ) {\n \n if ( is_array( $value ) ) {\n \n foreach ( $value as $k => $v ) {\n \n if ( is_array( $v ) ) {\n \n $v = self::flatten( $v, $skip );\n }\n $result[ $key . '_' . $k ] = $v;\n }\n \n $result = self::flatten( $result, $skip );\n } else {\n \n $result[ $key ] = $value;\n }\n } else {\n \n $result[ $key ] = is_serialized( $value ) ? $value : serialize( $value );\n }\n }\n \n return $result;\n }", "public static function toFlatArray($data)\n {\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n $value = self::toFlatArray($value);\n unset($data[$key]);\n $data = array_merge($data, $value);\n }\n }\n return $data;\n }", "function array_keys_recursive(array $array) {\n\n $keys = array();\n \n foreach ($array as $key => $value) {\n $keys[] = $key;\n \n if (is_array($array[$key])) {\n $keys = array_merge($keys, array_keys_recursive($array[$key]));\n }\n } \n return $keys;\n}", "static function flatten_values($array, $fn=null){\n\t\tif(!$fn){\n\t\t\t$fn = function($v, $k) use (&$fn){\n\t\t\t\tif(is_array($v)){\n\t\t\t\t\tlist($key, $value) = each($v);\n\t\t\t\t\treturn $fn($value, $key);\n\t\t\t\t}else{\n\t\t\t\t\treturn $v;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tforeach($array as $k=>&$v){\n\t\t\t$v = $fn($v, $k);\n\t\t} unset($v);\n\t\treturn $array;\n\t}", "public static function arrayKeysRecursive($array = array()) {\n\t\t$return = array();\n\t\tforeach (array_keys($array) as $key) {\n\t\t\t$return[] = $key;\n\t\t\tif (is_array($array[$key])) {\n\t\t\t\t$return = array_merge($return, self::arrayKeysRecursive($array[$key]));\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "function rsort(/*. array[int] .*/ $a, $sort_flags = SORT_REGULAR){}", "function array_sort($array, Closure $callback)\n\t{\n\t\treturn Illuminate\\Support\\Collection::make($array)->sortBy($callback)->all();\n\t}" ]
[ "0.6523244", "0.6280655", "0.6273831", "0.62410647", "0.6225145", "0.6221742", "0.6190673", "0.6057553", "0.6040453", "0.5997727", "0.59585863", "0.5956999", "0.59409875", "0.59008163", "0.5882699", "0.587841", "0.58677673", "0.58677673", "0.5843793", "0.58420146", "0.58279234", "0.5742884", "0.57373595", "0.57075137", "0.57057434", "0.57036847", "0.5702104", "0.56725764", "0.5647195", "0.5646516", "0.5622715", "0.5595841", "0.55871755", "0.5561841", "0.5515284", "0.55151814", "0.5473079", "0.544536", "0.54030675", "0.5396646", "0.5385864", "0.5384029", "0.53774506", "0.5352158", "0.5343287", "0.53429514", "0.5322172", "0.5298395", "0.5282728", "0.5225581", "0.5219281", "0.52150995", "0.52107656", "0.5197041", "0.51963556", "0.5189104", "0.5167349", "0.5141245", "0.51314574", "0.5129854", "0.51121986", "0.50936484", "0.5086848", "0.5076358", "0.5057547", "0.5052774", "0.5050368", "0.5050161", "0.50440437", "0.5012031", "0.5003562", "0.49568272", "0.49347958", "0.49210447", "0.4920335", "0.49191827", "0.49184623", "0.49162424", "0.49152154", "0.4914187", "0.49048647", "0.48968452", "0.48899838", "0.48899838", "0.48899838", "0.48827755", "0.48733258", "0.4861573", "0.48603186", "0.48343346", "0.48328826", "0.48287573", "0.48210767", "0.48118785", "0.4804971", "0.4799709", "0.47995389", "0.47975746", "0.4791945", "0.47900692" ]
0.6898906
0
must check and return this keys from $_POST token [string] new_only [boolean] emptys [boolean] wrongs [boolean] answer_result [boolean] random [boolean] length [int] category [string]
private function check_make_input() { $output = []; if (!isset($_POST['token']) || !isset($_POST['new_only']) || !isset($_POST['emptys']) || !isset($_POST['wrongs']) || !isset($_POST['answer_result']) || !isset($_POST['random']) || !isset($_POST['length']) || !isset($_POST['category'])) return false; if (empty($_POST['token']) || empty($_POST['new_only']) || empty($_POST['emptys']) || empty($_POST['wrongs']) || empty($_POST['answer_result']) || empty($_POST['random']) || empty($_POST['length'])) return false; $output = [ "token" => (string) $_POST["token"], "new_only" => (bool) $_POST["new_only"], "emptys" => (bool) $_POST["emptys"], "wrongs" => (bool) $_POST["wrongs"], "answer_result" => (bool) $_POST["answer_result"], "random" => (bool) $_POST["random"], "length" => (int) $_POST["length"], "category" => (array) json_decode($_POST["category"]), ]; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function chooseTokensCheckVars()\n {\n $cart = geoCart::getInstance();\n //check the settings!\n\n if (!$_POST['token_choice']) {\n $msgs = self::_getText();\n\n $cart->addError()\n ->addErrorMsg('tokens_purchase', $msgs['error_choose_tokens']);\n return;\n }\n\n $util = geoAddon::getUtil('tokens');\n $token = $util->getTokenInfo($cart->item->getPricePlan(), $_POST['token_choice']);\n\n if (!$token) {\n $msgs = self::_getText();\n\n $cart->addError()\n ->addErrorMsg('tokens_purchase', $msgs['error_invalid_selection']);\n }\n //if it got this far, everything is AOK!\n }", "private function check_finish_inputs()\n {\n $output = [];\n if (!isset($_POST[\"token\"]) || !isset($_POST[\"exam_id\"]) || !isset($_POST[\"corrects\"]) || !isset($_POST[\"wrongs\"]) || !isset($_POST[\"emptys\"]))\n return false;\n\n if (empty($_POST[\"token\"]) || empty($_POST[\"exam_id\"]) || empty($_POST[\"corrects\"]) || empty($_POST[\"wrongs\"]) || empty($_POST[\"emptys\"]))\n return false;\n\n $output = [\n (string) \"token\" => $_POST[\"token\"],\n (int) \"exam_id\" => $_POST[\"exma_id\"],\n (array) \"corrects\" => json_decode($_POST[\"corrects\"]),\n (array) \"wrongs\" => json_decode($_POST[\"wrongs\"]),\n (array) \"emptys\" => json_decode($_POST[\"emptys\"]),\n ];\n\n return $output;\n }", "function unpack_post() {\n // Globals\n global $min_words;\n global $add_num;\n global $add_char;\n global $case_opt;\n global $separator;\n\n if (array_key_exists('min-words', $_POST)) {\n $min_words = $_POST['min-words'];\n }\n\n if (array_key_exists('add-num', $_POST)) {\n $add_num = True;\n }\n\n if (array_key_exists('add-char', $_POST)) {\n $add_char = True;\n }\n\n if (array_key_exists('separator', $_POST)) {\n $separator = $_POST['separator'];\n }\n\n if (array_key_exists('case-opt', $_POST)) {\n $case_opt = $_POST['case-opt'];\n }\n\n // Mostly just for testing\n return [$min_words, (int)$add_num, (int)$add_char, $separator, $case_opt];\n}", "function _pre_token_validation($input) {\n\n if (ENV !== 'dev') {\n //add your own validation code here!\n echo 'Forbidden (no validation tests available)';\n http_response_code(403);\n die();\n }\n\n if (!isset($input['user_id'])) {\n http_response_code(400);\n echo 'No user_id submitted!';\n die();\n } elseif(!is_numeric($input['user_id'])) {\n http_response_code(400);\n echo 'Non-numeric user_id submitted!';\n die();\n }\n\n return $input;\n }", "public function getPostValues()\n {\n // Define the check for params\n $post_check_array = array(\n // submit action\n 'toevoegen' => array('filter' => FILTER_SANITIZE_STRING),\n 'bijwerken' => array('filter' => FILTER_SANITIZE_STRING),\n 'verwijderen' => array('filter' => FILTER_SANITIZE_STRING),\n // question\n 'vraag' => array('filter' => FILTER_SANITIZE_STRING),\n // question type (open or closed)\n 'vraagId' => array('filter' => FILTER_SANITIZE_INT),\n // question type (open or closed)\n 'vraagSoort' => array('filter' => FILTER_SANITIZE_STRING),\n // Education\n 'opleiding' => array('filter' => FILTER_SANITIZE_STRING),\n // question send time\n 'verstuurTijd' => array('filter' => FILTER_SANITIZE_STRING)\n );\n // Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n // RTS\n return $inputs;\n }", "function ltiExtractPost() {\n // Unescape each time we use this stuff - somedy we won't need this...\n $FIXED = array();\n foreach($_POST as $key => $value ) {\n if (get_magic_quotes_gpc()) $value = stripslashes($value);\n $FIXED[$key] = $value;\n }\n $retval = array();\n $retval['key'] = isset($FIXED['oauth_consumer_key']) ? $FIXED['oauth_consumer_key'] : null;\n $retval['context_id'] = isset($FIXED['context_id']) ? $FIXED['context_id'] : null;\n $retval['link_id'] = isset($FIXED['resource_link_id']) ? $FIXED['resource_link_id'] : null;\n $retval['user_id'] = isset($FIXED['user_id']) ? $FIXED['user_id'] : null;\n\n if ( $retval['key'] && $retval['context_id'] && $retval['link_id'] && $retval['user_id'] ) {\n // OK To Continue\n } else {\n return false;\n }\n \n $retval['service'] = isset($FIXED['lis_outcome_service_url']) ? $FIXED['lis_outcome_service_url'] : null;\n $retval['sourcedid'] = isset($FIXED['lis_result_sourcedid']) ? $FIXED['lis_result_sourcedid'] : null;\n\n $retval['context_title'] = isset($FIXED['context_title']) ? $FIXED['context_title'] : null;\n $retval['link_title'] = isset($FIXED['resource_link_title']) ? $FIXED['resource_link_title'] : null;\n $retval['user_email'] = isset($FIXED['lis_person_contact_email_primary']) ? $FIXED['lis_person_contact_email_primary'] : null;\n if ( isset($FIXED['lis_person_name_full']) ) {\n $retval['user_displayname'] = $FIXED['lis_person_name_full'];\n } else if ( isset($FIXED['lis_person_name_given']) && isset($FIXED['lis_person_name_family']) ) {\n $retval['user_displayname'] = $FIXED['lis_person_name_given'].' '.$FIXED['lis_person_name_family'];\n } else if ( isset($FIXED['lis_person_name_given']) ) {\n $retval['user_displayname'] = $FIXED['lis_person_name_given'];\n } else if ( isset($FIXED['lis_person_name_family']) ) {\n $retval['user_displayname'] = $FIXED['lis_person_name_given'];\n }\n $retval['role'] = 0;\n if ( isset($FIXED['roles']) ) {\n $roles = strtolower($FIXED['roles']);\n if ( ! ( strpos($roles,'instructor') === false ) ) $retval['role'] = 1;\n if ( ! ( strpos($roles,'administrator') === false ) ) $retval['role'] = 1;\n }\n return $retval;\n}", "public function getFormData(){\n\n\t\t\t\n\t\t\t$expectedVariables = ['title','email','checkbox'];\n\n\n\t\t\tforeach ($expectedVariables as $variable) {\n\n\t\t\t\t// creating entries for error field\t\n\t\t\t\t$this->moviesuggest['errors'][$variable]=\"\";\n\n\t\t\t\t// move all $_POST values into MovieSuggest array\n\t\t\t\tif(isset($_POST[$variable])){\n\t\t\t\t\t$this->moviesuggest[$variable] = $_POST[$variable];\n\t\t\t\t}else{\n\t\t\t\t\t$this->moviesuggest[$variable] = \"\";\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// var_dump($moviesuggest);\n\t\t\t// die();\n\t}", "function save_input_data()\r\n{\r\n foreach ($_POST as $key => $value) {//key : name, password... and value : field value\r\n //save datas in an array\r\n if (strpos($key, 'password') === false) {//in key : find password. if false : value not found\r\n $_SESSION['input'][$key] = $value;\r\n }\r\n }\r\n}", "function token_ctrl($token) {\r\n\t$session=Zend_Auth::getInstance()->getStorage();\r\n\t$log=Zend_Registry::get(\"log\");\r\n\t$reply=array('or'=>false,'and'=>true);\r\n\tforeach ($token as $key => $value) {\r\n\t\tif (preg_match(\"#^token#\", $key)) {\r\n\t\t\t$t=$session->get($key);\r\n\t\t\t$reply[$key]=($value==$t);\r\n\t\t\t$reply['or']=$reply['or']||$reply[$key];\r\n\t\t\t$reply['and']=$reply['and']&&$reply[$key];\r\n\t\t\t$session->delete($key);\r\n\t\t\tif (!$reply[$key]) $log->log(\"errore $key, valore ricevuto $value, valore memorizzato $t\",Zend_Log::WARN);\r\n\t\t}\r\n\t}\r\n\treturn $reply;\r\n}", "function _setCheck(){\n\t\tif( isset($_POST['formitable_setcheck']) )\n\t\tforeach($_POST['formitable_setcheck'] as $key){\n\t\t\tif( isset($this->rc4key) ){\n\t\t\t\t$key = $this->rc4->_decrypt( $this->rc4key, $this->_check_magic_quotes($key) );\n\t\t\t}\n\t\t\tif(!isset($_POST[$key])) $_POST[$key]=\"\";\n\t\t}\n\t}", "private function validateTokenRequest(): bool\n {\n $validator = new Validator([\n 'required' => ':attribute — обязательное поле.',\n 'numeric' => ':attribute — поле должно содержать только цифры.',\n ]);\n\n $validator->addValidator('plain', new PlainRule());\n\n $validation = $validator->make([\n 'shop_id' => $this->getRouteParam('id'),\n 'secret_key' => $this->http_request->query->get('secret_key'),\n ], [\n 'shop_id' => 'required|numeric',\n 'secret_key' => 'required|plain',\n ]);\n\n $validation->setAliases([\n 'shop_id' => 'Идентификатор магазина',\n 'secret_key' => 'Секретный ключ',\n ]);\n\n $validation->validate();\n\n if ($validation->fails()) {\n $errors = $validation->errors()->toArray();\n\n foreach ($errors as $key => $error) {\n foreach ($error as $message) {\n $this->errors[] = [\n 'code' => 'invalid-field',\n 'message' => $message,\n 'field' => $key,\n ];\n }\n }\n\n return false;\n }\n\n return true;\n }", "public function controlVariables() {\n\n $validacion = false;\n\n if (\n (count($_POST) > 0) && isset($_POST['kk_control_form']) && ($_POST['kk_control_form'] == $this->_kk_control_form)\n ) {\n $validacion = true;\n\n if (count($this->_formulario) > 0) {\n foreach ($this->_formulario[$this->_kk_control_form] as $key => $valor) {\n if ($valor['obligatorio'] == 'no_nulo') {\n if (isset($_POST[$key]) && is_array($_POST[$key])) {\n $valor_nulo = false;\n foreach ($_POST[$key] as $valor_post) {\n if (isset($valor_post) && $valor_post != '') {\n $valor_nulo = true;\n }\n }\n $validacion = $valor_nulo;\n } elseif ((!isset($_POST[$key]) || $_POST[$key] == '')) {\n $validacion = false;\n }\n }\n }\n\n if ($this->_captcha === false) {\n $validacion = false;\n }\n }\n }\n\n return $validacion;\n }", "function post($key) {\n\n $post = \\M\\Config::get('POST');\n if (isset($post[$key])) {\n return $post[$key];\n } else {\n\n return false;\n }\n}", "public static function manage_post_data(&$post) {\n\t\tif (count($post) > 0) {\n\t\t\tforeach ($post as $key => $value) {\n\t\t\t\t$key = Encryption::decrypt($key);\t\n\t\t\t\t$name = self::fetch_name($key);\n\t\t\t\t$errors[$name] = self::is_valid_request($key, $value);\n\t\t\t\t$output[$name] = self::apply_filters($key, $value);\n\t\t\t}\n\t\t\tself::$requested_data = $output;\n\t\t\tself::$errors = $errors;\n\t\t}\n\t\telse {\n\t\t\tself::$requested_data = false;\n\t\t}\n\t\t$post = array();\n\t}", "function get_fields_from_post(){\n\t\t$prefix=\"\";\n\t\t$this->id_corp=$_SESSION['ident_corp'];\n\t\t$this->name=htmlentities($_POST[$prefix.$this->ddbb_name]);\n\t\t$this->name_web=htmlentities($_POST[$prefix.$this->ddbb_name_web]);\n\t\t$this->pvp=$_POST[$prefix.$this->ddbb_pvp];\n\t\t$this->tax=$_POST[$prefix.$this->ddbb_tax];\n\t\t$this->pvp_tax=$_POST[$prefix.$this->ddbb_pvp_tax];\n\t\t$this->descrip=htmlentities($_POST[$prefix.$this->ddbb_descrip]);\n\t\t$this->path_photo = $_SESSION['ruta_photo'];\n\t\t\n\n\t\t\n\t\t$this->get_categories_from_post();\n\n\t\treturn 0;\n\t}", "public static function checkTokenRequestParam(): void\n {\n global $token_mismatch, $token_provided;\n\n $token_mismatch = true;\n $token_provided = false;\n\n if (($_SERVER['REQUEST_METHOD'] ?? 'GET') !== 'POST') {\n return;\n }\n\n if (isset($_POST['token']) && is_scalar($_POST['token']) && strlen((string) $_POST['token']) > 0) {\n $token_provided = true;\n $token_mismatch = ! @hash_equals($_SESSION[' PMA_token '], (string) $_POST['token']);\n }\n\n if (! $token_mismatch) {\n return;\n }\n\n // Warn in case the mismatch is result of failed setting of session cookie\n if (isset($_POST['set_session']) && $_POST['set_session'] !== session_id()) {\n trigger_error(\n __(\n 'Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin.'\n ),\n E_USER_ERROR\n );\n }\n\n /**\n * We don't allow any POST operation parameters if the token is mismatched\n * or is not provided.\n */\n $allowList = ['ajax_request'];\n Sanitize::removeRequestVars($allowList);\n }", "function GetTokenValidateRequest($Payloads) {\n\n if(!$Payloads ['Email'] || !$Payloads ['Password'] ) {\n Return \"False\" ;\n }\n return \"True\";\n\n}", "protected function getPostValues() {}", "public function checktoken(){\t\t\n\t\t$token=trim(strtoupper($this->input->post('tokenname')));\t\n\t\t$this->load->model('tokens');\t\n\t\t$data=$this->tokens->CheckToken($token);\n\t\tif(trim($data)==\"\"){\n\t\t\t\techo \"OK\";\n\t\t\t}else{\n\t\t\t\techo $data;\n\t\t\t\t}\n\t\t}", "function check_token($token, $form_name)\n{\n if (is_bool($token)) {\n return false;\n }\n return $token === get_token($form_name);\n}", "function parse_form($array) {\n// build reserved keyword array\n//Anything put in here will not show up in your email when form is processed\n $reserved_keys[] = \"MAX_FILE_SIZE\";\n $reserved_keys[] = \"required\";\n $reserved_keys[] = \"redirect\";\n //$reserved_keys[] = \"email\";\n $reserved_keys[] = \"require\";\n $reserved_keys[] = \"path_to_file\";\n $reserved_keys[] = \"recipient\";\n $reserved_keys[] = \"subject\";\n $reserved_keys[] = \"bgcolor\";\n $reserved_keys[] = \"text_color\";\n $reserved_keys[] = \"link_color\";\n $reserved_keys[] = \"vlink_color\";\n $reserved_keys[] = \"alink_color\";\n $reserved_keys[] = \"title\";\n $reserved_keys[] = \"missing_fields_redirect\";\n $reserved_keys[] = \"env_report\";\n $reserved_keys[] = \"Submit\";\n $reserved_keys[] = \"submit\";\n //$reserved_keys[] = \"name\";\n $reserved_keys[] = \"Name\";\n $reserved_keys[] = \"submit_x\";\n $reserved_keys[] = \"submit_y\";\n $reserved_keys[] = \"sendit\";\n if (count($array)) {\n while (list($key, $val) = each($array)) {\n//check for email injection\n\t\tif(!has_no_emailheaders($val)){\n\t\t\tprint_error(\"Please don't spam\");\n\t\t}\n\t\t\n// exclude reserved keywords\n $reserved_violation = 0;\n for ($ri=0; $ri<count($reserved_keys); $ri++) {\n if ($key == $reserved_keys[$ri]) $reserved_violation = 1;\n }\n// prepare content\n if ($reserved_violation != 1) {\n\t// let's check to see if they are check boxes\n if (is_array($val)) {\n for ($z=0; $z<count($val); $z++) {\n $nn=$z+1;\n $content .= \"$key #$nn: $val[$z]\\n\";\n }\n }\n\t // if the values contains nothing do nothing then\n\t // don't add it to the content)\n elseif($val != \"\") $content .= \"$key: $val\\n\";\n }\n } // end of while\nreturn $content;\n }\n}", "function processRequest(){\n\tglobal $muse; // App settings & database\n\tglobal $HTTP_RAW_POST_DATA;\n\t\n\t// Get the user's posted action\n\t$muse['actionRequestRaw'] = $HTTP_RAW_POST_DATA;\n\t$muse['actionRequest'] = $muse['db']->real_escape_string(trim($HTTP_RAW_POST_DATA));\n\t// First word of action request will be the action keyword.\n\t$muse['actionKeyword'] = strtolower(substr( $muse['actionRequest'], 0, strpos( $muse['actionRequest'], \" \" ) ) );\n\t\n\t// If it's only one word, through it back in. Capatlization issues?\n\tif ($muse['actionKeyword']==false) {\n\t\t$muse['actionKeyword'] = $muse['actionRequest'];\n\t}\n}", "function check_key($id_questions,$auth_token,$msg_auth_failed)\n{\n\t$found_key = check_question_keys($id_questions,$auth_token);\n\t\n\tif (empty($found_key))\n\t{\n\t\tdie($msg_auth_failed);\n\t}\n\t\n\treturn $found_key;\n\t\n}", "public function GetFormPostedValuesQuestions() {\n\t\t/* THE ARRAY OF POSTED FIELDS */\n\t\t$req_fields=array(\"survey_id\",\"question\");\n\n\t\tfor ($i=0;$i<count($req_fields);$i++) {\n\n\t\t\t//echo $_POST['application_id'];\n\t\t\tif (ISSET($_POST[$req_fields[$i]]) && !EMPTY($_POST[$req_fields[$i]])) {\n\t\t\t\t$this->SetVariable($req_fields[$i],EscapeData($_POST[$req_fields[$i]]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//echo \"<br>\".$this->req_fields[$i].\"<br>\";\n\t\t\t\t$this->$req_fields[$i]=\"\";\n\t\t\t}\n\t\t}\n\t}", "function generate() {\n\n if ($_SERVER[\"REQUEST_METHOD\"] !== 'POST') {\n http_response_code(403);\n echo 'Forbidden';\n die();\n } else {\n //fetch posted data\n $posted_data = file_get_contents('php://input');\n $input = (array) json_decode($posted_data);\n $data = $this->_pre_token_validation($input);\n }\n\n $token = $this->_generate_token($data);\n http_response_code(200);\n echo $token;\n }", "public function setup_check_security_token() {\n\t\tif ( ! $this->wsal->settings()->CurrentUserCan( 'edit' ) ) {\n\t\t\techo wp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'success' => false,\n\t\t\t\t\t'message' => esc_html__( 'Access Denied.', 'wp-security-audit-log' ),\n\t\t\t\t)\n\t\t\t);\n\t\t\tdie();\n\t\t}\n\n\t\t$nonce = isset( $_POST['nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : false;\n\t\t$token = isset( $_POST['token'] ) ? sanitize_text_field( wp_unslash( $_POST['token'] ) ) : false;\n\n\t\tif ( empty( $nonce ) || ! wp_verify_nonce( $nonce, 'wsal-verify-wizard-page' ) ) {\n\t\t\techo wp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'success' => false,\n\t\t\t\t\t'message' => esc_html__( 'Nonce verification failed.', 'wp-security-audit-log' ),\n\t\t\t\t)\n\t\t\t);\n\t\t\tdie();\n\t\t}\n\n\t\tif ( empty( $token ) ) {\n\t\t\techo wp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'success' => false,\n\t\t\t\t\t'message' => esc_html__( 'Invalid input.', 'wp-security-audit-log' ),\n\t\t\t\t)\n\t\t\t);\n\t\t\tdie();\n\t\t}\n\n\t\techo wp_json_encode(\n\t\t\tarray(\n\t\t\t\t'success' => true,\n\t\t\t\t'token' => $token,\n\t\t\t\t'tokenType' => esc_html( $this->get_token_type( $token ) ),\n\t\t\t)\n\t\t);\n\t\tdie();\n\t}", "function getPost($key) {\n\t$value = '';\n\tif (isset($_POST[$key])) {\n\t\t$value = $_POST[$key];\n\t}\n\t// return $value;\n\t//Phan 2: Ham xu ly ky tu dac biet\n\treturn removeSpecialCharacter($value);\n}", "function add_token(){\n\t\t$jumlah_token = $this->input->post('jumlah_token');\n\t\t$masa_aktif = $this->input->post('masa_aktif');\n\t\tif ($jumlah_token) {\n\t\t\tif ($jumlah_token==1) {\n\t\t\t\t$kode_voucher = strtoupper(uniqid());\n\t\t\t\t$data = array(\"nomorToken\"=>$kode_voucher,\n\t\t\t\t\t\"masaAktif\"=>$this->input->post('masa_aktif'));\n\t\t\t\t$this->token_model->insert_token($data);\n\t\t\t}else{\n\t\t\t\tfor ($i=0; $i < $jumlah_token ; $i++) { \n\t\t\t\t\t$kode_voucher = strtoupper(uniqid());\n\t\t\t\t\t$data = array(\"nomorToken\"=>$kode_voucher,\n\t\t\t\t\t\t\"masaAktif\"=>$masa_aktif);\n\t\t\t\t\t$this->token_model->insert_token($data);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function checkTextFormValues($session){\r\n\t\tif ($session == \"imageName\" && strlen($_POST[$session]) > 50) {\r\n\t\t\t$_POST[$session] = null;\r\n\t\t} elseif ($session == \"description\" && strlen($_POST[$session]) > 500) {\r\n\t\t\t$_POST[$session] = null;\r\n\t\t} elseif ($session == \"author\" && strlen($_POST[$session]) > 50) {\r\n\t\t\t$_POST[$session] = null;\r\n\t\t}\r\n\r\n\t\tif (!empty($_POST[$session]) && is_string($_POST[$session]) && !preg_match( '/(galery_users|galery_photos|galery_superusers|DELETE|DROP|TABLE)/', $_POST[$session])) {\r\n\t\t\t$return = $_POST[$session];\r\n\t\t} else {\r\n\t\t\t$return = null;\r\n\t\t}\r\n\r\n\t\treturn $return;\r\n\t}", "function validateInterkassaResp($post_in)\n{\n\t$key_to_sort = $post_in;\n\t$ik_co_id = $key_to_sort['ik_co_id'];\n\t$ik_sign = $key_to_sort['ik_sign'];\n\t$ik_am = $key_to_sort['ik_am'];\n\t$ik_inv_st = $key_to_sort['ik_inv_st'];\n\n\t// Forming a digital signature\n\tunset($key_to_sort['ik_sign']);\n\tksort($key_to_sort, SORT_STRING);\n\n\t// Add to the array \"secret key\"\n\tarray_push($key_to_sort, 'XRZxzNbDsQYzsWm2');\n\n\t// Concatenate values ​​by a \":\"\n\t$signString = implode(':', $key_to_sort);\n\n\t// Take the MD5 hash in binary form by\n\t$sign = base64_encode(md5($signString, true));\n\n\t// Validate kassa results\n\tif(\n\t\t$ik_co_id == '5370b755bf4efccb31ad6f90' AND \n\t\t$ik_inv_st == 'success' AND \n\t\t$ik_sign == $sign\n\t)\n\t{\n\t\treturn $ik_am;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "public function getTokenInput()\n {\n if ($this->Token) {\n return '<input type=\"hidden\" name=\"'.$this->TokenInputName.'\" value=\"' . $this->Token . '\" />';\n }\n return false;\n }", "function protectForm() {\n\t\techo \"<input type=\\\"hidden\\\" name=\\\"spack_token\\\" value=\\\"\".$this->token.\"\\\" />\";\n\t}", "public static function checkPostData($data) {\n\t\t\t/* This method use the php function htmlentities for each values in $_POST and return an array with securised data */\n foreach ($data as $key => $value) {\n $data[$key] = htmlentities($value);\n }\n return $data;\n\t\t}", "public function token_is_valid() {\n $token = $this->ci->input->post(\"token\");\n\n $this->ci->load->helper(\"access\");\n return check_token($token);\n }", "public function valid() {\n\t\t$key = key($this->tokens);\n\t\t$var = ($key !== null && $key !== false);\n\t\treturn $var;\n\t}", "public function getPostData(){\n for ($t=1; $t <3 ; $t++) {\n $str = \"team\".$t;\n if(!$this->checkPost($str)) return false;\n $str = \"score_team\".$t;\n if(!$this->checkPost($str)) return false;\n for ($p=1; $p <3 ; $p++) {\n $str = \"team\".$t.\"_player\".$p;\n if(!$this->checkPost($str)) return false;\n }\n }\n return true;\n }", "public function checkCategoryType(): array\n {\n $products = array();\n if ($_POST['hammer'] == 'true') {\n $products[] = \"Hammers\";\n }\n if ($_POST['heat'] == 'true') {\n $products[] = \"Heat Guns\";\n }\n if ($_POST['pliers'] == 'true') {\n $products[] = \"Pliers\";\n }\n if ($_POST['screw'] == 'true') {\n $products[] = \"Screwdrivers\";\n }\n if($_POST['span'] == 'true') {\n $products[] = \"Spanners and Wrenches\";\n }\n return $products;\n }", "function post_has($key)\n{\n\treturn System::request()->postHas($key);\n}", "function condition_form_submit($values) {\n $parsed = array();\n $items = explode(\"\\n\", $values);\n if (!empty($items)) {\n foreach ($items as $v) {\n $v = trim($v);\n if (!empty($v)) {\n $parsed[$v] = $v;\n }\n }\n }\n return $parsed;\n }", "public function valid()\n\t{\n\t\t$echoStr = $_GET[\"echostr\"];\n\t\tif($this->checkSignature())\n\t\t{\n\t\t\techo $echoStr;\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"failure , check your TOKEN\";\n\t\t\texit;\n\t\t}\n\t}", "function atkGetPostVar($key=\"\")\n{\n\tif(empty($key) || $key==\"\")\n\t{\n\t\treturn $_REQUEST;\n\t}\n\telse\n\t{\n\t\tif (array_key_exists($key,$_REQUEST) && $_REQUEST[$key]!=\"\") return $_REQUEST[$key];\n\t\treturn \"\";\n\t}\n}", "private function inputs(){\n\t\tswitch($_SERVER['REQUEST_METHOD']){ // Make switch case so we can add additional \n\t\t\tcase \"GET\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"GET\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tcase \"POST\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"POST\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tcase \"PUT\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"PUT\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tcase \"DELETE\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"DELETE\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->response('Forbidden',403);\n\t\t\t\tbreak;\n\t\t}\n\t}", "private function readPost(){\n\t\tIF(isset($_POST['eventName'])) { \n\t\t $this->eventName = trim(strip_tags($_POST['eventName']));\n\t\t}\n\t\tIF(isset($_POST['senderName'])) { \n\t\t $this->senderName = trim(strip_tags($_POST['senderName']));\n\t\t}\n\t\tIF(isset($_POST['senderEmail'])) {\n\t\t $this->senderEmail = trim(strip_tags(preg_replace(\"/[^0-9a-zA-ZäöüÄÖÜÈèÉéÂâáÁàÀíÍìÌâÂ@ \\-\\+\\_\\.]/\", \" \", $_POST['senderEmail'])));\n\t\t}\n\t\tIF(isset($_POST['validateEmail'])){\n\t\t $this->validateEmail = trim(strip_tags($_POST['validateEmail']));\n\t\t}\n\t\tIF(isset($_POST['senderPhone'])){\n\t\t $this->senderPhone = trim(strip_tags($_POST['senderPhone']));\n\t\t}\n\t\tIF(isset($_POST['numberOfTickets'])){\n\t\t $this->numberOfTickets = trim(strip_tags($_POST['numberOfTickets']));\n\t\t}\n\t\tIF(isset($_POST['paymentOption'])){\n\t\t $this->paymentOption = trim(strip_tags($_POST['paymentOption']));\n\t\t}\n\t\tIF(isset($_POST['otherPartyNames'])){\n\t\t $this->otherPartyNames = trim(strip_tags($_POST['otherPartyNames']));\n\t\t}\n\t\tIF(isset($_POST['pickupPoint'])){\n\t\t $this->pickupPoint = trim(strip_tags($_POST['pickupPoint']));\n\t\t} \n\t\tIF(isset($_POST['sittingNear'])){\n\t\t $this->sittingNear = trim(strip_tags($_POST['sittingNear']));\n\t\t}\n\t\tIF(isset($_POST['specialNeeds'])){\n\t\t $this->specialNeeds = trim(strip_tags($_POST['specialNeeds']));\n\t\t}\n\t}", "private function checkFields()\r\n {\r\n $vars = array('user', 'pass', 'numbers', 'message', 'date', 'ids', 'data_start', 'data_end',\r\n 'lido', 'status', 'entregue', 'data_confirmacao', 'return_format'\r\n );\r\n\r\n $final = array();\r\n foreach ($vars as $key => $value) {\r\n if ($this->$value !== '') {\r\n $final[$value] = $this->$value;\r\n }\r\n }\r\n return $final;\r\n }", "public function getPostValues() {\n $post_check_array = array(\n// submit action\n 'add' => array('filter' => FILTER_SANITIZE_STRING),\n 'update' => array('filter' => FILTER_SANITIZE_STRING),\n // List all update form fields !!!\n// event type name.\n 'datum' => array('filter' => FILTER_SANITIZE_STRING),\n 'prioriteit' => array('filter' => FILTER_SANITIZE_STRING),\n 'username' => array('filter' => FILTER_SANITIZE_STRING),\n 'user' => array('filter' => FILTER_SANITIZE_STRING),\n 'password' => array('filter' => FILTER_SANITIZE_STRING),\n // Help text\n 'status' => array('filter' => FILTER_SANITIZE_STRING),\n // Id of current row\n 'alarm_id' => array('filter' => FILTER_VALIDATE_INT),\n 'alarm_noticed' => array('filter' => FILTER_VALIDATE_INT),\n\t\t\t'alarm_origin' => array('filter' => FILTER_SANITIZE_STRING)\n );\n// Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n// RTS\n return $inputs;\n }", "private function validPayload()\n {\n return [\n 'name' => 'Chefaa pharmacy',\n 'address' => 'Maadi',\n ];\n }", "public function submission()\n {\n $title_field_id = 10;\n $content_short_field_id = 8;\n $content_long_field_id = 17;\n $auto_activate = 1;\n \n $this->load->model('language_m');\n $this->load->model('estate_m');\n $this->load->model('option_m');\n $this->load->model('file_m');\n $this->load->model('repository_m');\n \n $this->data['message'] = lang_check('Something is wrong with request');\n $this->data['success'] = FALSE;\n $this->data['token_available'] = FALSE;\n $POST = $this->input->get_post(NULL, TRUE);\n\n $POST = array_merge($_GET, $_POST);\n\n if(isset($POST['lang_code']))\n {\n $lang_id_selected = $this->language_m->get_id($POST['lang_code']);\n }\n \n $lang_id_def = $this->language_m->get_default_id();\n $lang_code_def = $this->language_m->get_code($lang_id_def);\n \n $token = $this->token_m->get_token($POST);\n \n if(is_object($token))\n $this->data['token_available'] = TRUE;\n \n //var_dump($POST);\n \n if(config_db_item('property_subm_disabled')==TRUE)\n {\n $this->data['message'] = lang_check('Registration disabled on server');\n }\n else if(isset($POST['lang_code']) && $lang_id_selected != $lang_id_def)\n {\n $this->data['message'] = lang_check('Only default lang is supported');\n }\n else if(is_object($token) && isset($POST['lang_code']) && isset($POST['input_address'], \n $POST['input_title'],\n $POST['input_description'],\n $POST['input_4']))\n {\n\n $existing_fields = $this->option_m->get_field_list($lang_id_def);\n\n // check if fields exists\n foreach($POST as $key=>$val)\n {\n $exp = explode('_', $key);\n \n if(count($exp) == 2 && $exp[0]=='input' && is_numeric($exp[1]))\n {\n if(!isset($existing_fields[$exp[1]]))\n { \n unset($POST['input_'.$exp[1]]);\n\n $this->data['message'] = lang_check('Field not found: #').$exp[1];\n echo json_encode($this->data);\n exit();\n }\n }\n }\n \n if(isset($POST['property_id']))\n {\n \n if(empty($POST['input_description']) || empty($POST['input_title']))\n {\n $this->data['message'] = lang_check('Please populate all fields!');\n echo json_encode($this->data);\n exit();\n }\n\n $this->load->library('session');\n\n // check permission for edit\n if($this->estate_m->check_user_permission($POST['property_id'], $token->user_id)>0)\n {\n\n // edit\n $data = array();\n $data['date'] = date('Y-m-d H:i:s');\n $data['date_modified'] = date('Y-m-d H:i:s');\n $data['address'] = $POST['input_address'];\n $data['search_values'] = $data['address'];\n \n // fetch gps\n $this->load->library('ghelper');\n $coor = $this->ghelper->getCoordinates($data['address']);\n $data['gps'] = $coor['lat'].', '.$coor['lng'];\n \n // other dynamic data\n $dynamic_data = array();\n $dynamic_data['agent'] = $token->user_id;\n \n // get title\n $dynamic_data[\"option\".$title_field_id.\"_\".$lang_id_def] = $POST['input_title'];\n \n // get description\n $dynamic_data[\"option\".$content_short_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n $dynamic_data[\"option\".$content_long_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n \n // prepare other fields\n foreach($POST as $key=>$val)\n {\n $exp = explode('_', $key);\n \n if(sw_count($exp) == 2 && $exp[0]=='input' && is_numeric($exp[1]))\n {\n $dynamic_data[\"option\".$exp[1].\"_\".$lang_id_def] = $POST['input_'.$exp[1]];\n }\n }\n \n // save basic data\n $insert_id = $this->estate_m->save($data, $POST['property_id']);\n \n if(empty($insert_id))\n {\n echo 'EMPTY insert_id:<br />';\n echo $this->db->last_query();\n exit();\n }\n \n $this->config->set_item('multilang_on_qs', 0);\n \n $this->estate_m->save_dynamic($dynamic_data, $insert_id);\n \n // echo $this->db->last_query();\n \n if(!empty($insert_id))\n {\n $this->uploadfiles($insert_id);\n \n $this->data['message'] = lang_check('Listing saved');\n $this->data['success'] = TRUE;\n }\n else\n {\n $this->data['message'] = lang_check('Edit declined');\n }\n }\n\n }\n else\n {\n // add\n \n if(empty($POST['input_description']) || empty($POST['input_title']))\n {\n $this->data['message'] = lang_check('Please populate all fields!');\n echo json_encode($this->data);\n exit();\n }\n\n $data = array();\n $data['is_activated'] = $auto_activate;\n $data['date'] = date('Y-m-d H:i:s');\n $data['date_modified'] = date('Y-m-d H:i:s');\n $data['address'] = $POST['input_address'];\n $data['search_values'] = $data['address'];\n \n if($data['is_activated'])\n $data['date_activated'] = date('Y-m-d H:i:s');\n \n // fetch gps\n $this->load->library('ghelper');\n $coor = $this->ghelper->getCoordinates($data['address']);\n $data['gps'] = $coor['lat'].', '.$coor['lng'];\n \n // other dynamic data\n $dynamic_data = array();\n $dynamic_data['agent'] = $token->user_id;\n \n // get title\n $dynamic_data[\"option\".$title_field_id.\"_\".$lang_id_def] = $POST['input_title'];\n \n // get description\n $dynamic_data[\"option\".$content_short_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n $dynamic_data[\"option\".$content_long_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n \n // prepare other fields\n foreach($POST as $key=>$val)\n {\n $exp = explode('_', $key);\n \n if(sw_count($exp) == 2 && $exp[0]=='input' && is_numeric($exp[1]))\n {\n $dynamic_data[\"option\".$exp[1].\"_\".$lang_id_def] = $POST['input_'.$exp[1]];\n }\n }\n\n // save basic data\n $insert_id = $this->estate_m->save($data, NULL);\n \n if(empty($insert_id))\n {\n echo 'EMPTY insert_id:<br />';\n echo $this->db->last_query();\n exit();\n }\n \n $this->config->set_item('multilang_on_qs', 0);\n \n $this->estate_m->save_dynamic($dynamic_data, $insert_id);\n \n // echo $this->db->last_query();\n \n if(!empty($insert_id))\n {\n $this->uploadfiles($insert_id);\n \n $this->data['message'] = lang_check('Listing added');\n $this->data['success'] = TRUE;\n }\n else\n {\n $this->data['message'] = lang_check('Added declined');\n }\n }\n } \n \n echo json_encode($this->data);\n exit();\n }", "function contains_values($values){\n\t$contains_vals = [];\n\tforeach($values as $val){\n\t\tif(strpos($_POST[\"password\"], $val) !== false){\n\t\t\t$contains_vals[\"password\"] = $val;\n\t\t}\n\t}\n\treturn $contains_vals;\n}", "function checkFormParams($param_array){\n\t$cnt = 0;\n\tfor($i=0; $i < count($param_array); $i++){\n\t\tif(isset($_POST[$param_array[$i]])){\n\t\t\t$params_set[$param_array[$i]] = $_POST[$param_array[$i]];\n\t\t\t$cnt++;\n\t\t}\n\t\t$params_set[\"cnt\"] = $cnt;\n\t}\n\treturn $params_set;\n}", "private function validateInput(){\n $name = filter_var($_POST['name'], FILTER_SANITIZE_STRING);\n $ip = filter_var($_POST['ip'], FILTER_VALIDATE_IP);\n $subnet = filter_var($_POST['subnet'], FILTER_VALIDATE_IP);\n $mac = filter_var($_POST['mac'], FILTER_VALIDATE_MAC);\n if($name && $ip && $subnet && $mac){\n return [\n 'name' => $name,\n 'ip' => $ip,\n 'subnet' => $subnet,\n 'mac' => $mac\n ];\n }else{\n return false;\n }\n }", "function check_all_incomming_vars($request_array, $save_name = null) {\n//checks all the incomming vars\n// V0.8 forces the use of an non empty array\n// if (empty($request_array)) {\n// $request_array = $_REQUEST;\n// } else {\n if (!is_array($request_array)) {\n die(__FUNCTION__ . \" need an array to work\");\n }\n// }\n $form = array();\n foreach ($request_array as $index => $value) {\n if (!is_array($value)) {\n $form[$index] = \\k1lib\\forms\\check_single_incomming_var($value);\n } else {\n $form[$index] = check_all_incomming_vars($value);\n }\n }\n if (!empty($save_name)) {\n \\k1lib\\common\\serialize_var($form, $save_name);\n }\n return $form;\n}", "function re_post_form($var, $ignore=array('submit'))\r\n{\r\n $input_hiddens = '';\r\n\r\n foreach($var as $k=>$v)\r\n {\r\n $k = format_str($k);\r\n if(in_array($k, $ignore)!=false) continue;\r\n\r\n if(is_array($v))\r\n {\r\n foreach($v as $k2=>$v2){\r\n $input_hiddens .= \"<input type='hidden' name='{$k}[{$k2}]' value='{$v2}' />\\r\\n\";\r\n }\r\n }\r\n else{\r\n $input_hiddens .= \"<input type='hidden' name='{$k}' value='{$v}' />\\r\\n\";\r\n }\r\n }\r\n\r\n return $input_hiddens;\r\n}", "function _post($v) { // clean Post - returns a useable $_POST variable or NULL if and only if it is not set\r\n return isset($_POST[$v]) ? bwm_clean($_POST[$v]) : NULL;\r\n}", "function verfiy($r_token,$data){\n $token=\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"; //Initialize Token (32 digit)\n //echo \"Token is >> \". $r_token. \"\\n\"; //testing\n if ($r_token == $token) {\n loot(0,$data);\n //echo \"Token valid looting...\"; //testing\n } else {\n loot(1,$data);\n // echo \"Token invalid dropping...\"; //testing\n }\n}", "protected function validatePOST() {\n return true;\n }", "public function getPostVariables();", "function POST_key_or_exit($key) {\n return array_key_or_exit($key, $_POST, 'missing POST parameter \"'.$key.'\"');\n}", "function get_post($name = '', $clean = true) {\n\tif($name === '') {\n\t\t$return = array();\n\n\t\tforeach ($_POST as $key => $post) {\n\t\t\t$return[$key] = $clean ? clean_variable($post) : $post;\n\t\t}\n\t\treturn $return;\n\t}\n\n\tif (!isset($_POST[$name])) {\n\t\treturn '';\n\t}\n\n\treturn $clean ? clean_variable($_POST[$name]) : $_POST[$name];\n}", "function test_input() :array\n{\n if (count($_POST) > 0) {\n {\n if (isset($_POST['id'])){\n $winner['id'] = $_POST['id'];\n }\n $winner['prize_year'] = validate_input($_POST['prize_year']);\n $winner['author_name'] = validate_input($_POST['author_name']);\n $winner['book_name'] = validate_input($_POST['book_name']);\n $winner['author_nationality'] = validate_input($_POST['author_nationality']);\n return $winner;\n }\n } return [];\n}", "function validatePost()\n{\n $validate_name = isset($_POST['name']) && !preg_match('/[^a-zàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿŒœŠšŸƒ \\'-]/i', $_POST['name']);\n $validate_gender = isset($_POST['gender']);\n $validate_email = isset($_POST['email']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL);\n $validate_password = isset($_POST['password']) && isset($_POST['confirm_password']) && $_POST['password'] === $_POST['confirm_password'];\n $validate_zip_code = isset($_POST['zip_code']) && preg_match('/^[0-9]{5}$/', $_POST['zip_code']);\n $validate_about_you = isset($_POST['about_you']);\n $validate_annual_salary = isset($_POST['annual_salary_hidden']) && preg_match('/^[0-9]+$/', $_POST['annual_salary_hidden']);\n $validate_currency_preference = isset($_POST['currency_preference']);\n $validate_dating_preference = isset($_POST['dating_preference_male']) || isset($_POST['dating_preference_female']) || isset($_POST['dating_preference_other']);\n return $validate_name &&\n $validate_gender &&\n $validate_email &&\n $validate_password &&\n $validate_zip_code &&\n $validate_about_you &&\n $validate_annual_salary &&\n $validate_currency_preference &&\n $validate_dating_preference;\n}", "function processInput($key, $value, $form_values){\r\n\t$regular = '';\r\n\t$regular2 = '';\r\n\t\r\n\t\tswitch ($key){\r\n\t\t\tcase 'firstname':\r\n\t\t\tcase 'lastname':\r\n\t\t\tcase 'city':\r\n\t\t\tcase 'state':\r\n\t\t\t\t$regular = '/^[A-Z \\'.-]+$/i';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'name':\r\n\t\t\tcase 'district':\r\n\t\t\tcase 'street1':\r\n\t\t\tcase 'street2':\r\n\t\t\tcase 'age':\r\n\t\t\t\t$regular = '/^[A-Z0-9 \\'.-]+$/i';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'zip':\r\n\t\t\t\t$regular = '/^([0-9]{5})(-[0-9]{4})?$/i';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'phone':\r\n\t\t\t\t$regular = '/^([0-9]{10})$/i';\r\n\t\t\t\t$regular2 = '/^([0-9]{7})$/i';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'username':\r\n\t\t\t\t$regular = '/^[A-Z0-9]{4,20}$/i';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'password':\r\n\t\t\t\t$regular = '/^(\\w*(?=\\w*\\d)(?=\\w*[a-z])(?=\\w*[A-Z])\\w*){6,20}$/';\r\n\t\t\t\tbreak;\t\t\t\r\n\t\t}\r\n\t\treturn(getError($key, $value, $regular, $regular2, $form_values));\r\n\r\n}", "public static function getPostValue($key)\n {\n $keys = explode('.', $key);\n switch (count($keys)):\n case '1':\n return !empty($_POST[\"$keys[0]\"]) ? $_POST[\"$keys[0]\"] : FALSE;\n break;\n case '2':\n return !empty($_POST[\"$keys[0]\"][\"$keys[1]\"]) ? $_POST[\"$keys[0]\"][\"$keys[1]\"] : FALSE;\n break;\n case '3':\n return !empty($_POST[\"$keys[0]\"][\"$keys[1]\"][\"$keys[2]\"]) ? $_POST[\"$keys[0]\"][\"$keys[1]\"][\"$keys[2]\"] : FALSE;\n break;\n case '4':\n return !empty($_POST[\"$keys[0]\"][\"$keys[1]\"][\"$keys[2]\"][\"$keys[3]\"]) ? $_POST[\"$keys[0]\"][\"$keys[1]\"][\"$keys[2]\"][\"$keys[3]\"] : FALSE;\n break;\n endswitch;\n }", "private function checkPresharedkeyForm(){\n\t\tif(!isset($_POST['services_ipsec_key_pskey'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_key_pskey');\n\t\t}\n\t\t\n\t\tif(ErrorHandler::errorCount() > 0){\n\t\t\tthrow new Exception('There is invalid form input');\n\t\t}\n\t}", "function feedback($is_input_correct)\n\t{\n\t\t$this->_post_data(\"http://bypasscaptcha.com/check_value.php\", array(\n\t\t\t\t\t\t\t\"key\" \t\t=> $this->_get_key(),\n\t\t\t\t\t\t\t\"task_id\" \t=> $this->task_id,\n\t\t\t\t\t\t\t\"cv\" \t\t=> ($is_input_correct ? 1 : 0),\n\t\t\t\t\t\t\t\"submit\" \t=> \"Submit\",\n\t\t));\n\t}", "function inputHas($key){\n\n\treturn isset($_REQUEST[$key]);\n\n}", "public static function check_xsrf_token() {\n\t\t\n\t\t# only check POST requests\n\t\tif(self::$check_xsrf && !empty($_POST)) {\n\t\t\t\n\t\t\t# verify the token\n\t\t\tSession::check_xsrf_token_string($_POST[self::Token_Variable]);\n\t\t\t\n\t\t}\n\t}", "public function &validate_values_from_post(&$post, $not_gpc = false)\n {\n $arr = array();\n\n $flag_conf_arr = false;\n\n if (is_array($this->_validater_conf_arr) && count($this->_validater_conf_arr)) {\n $flag_conf_arr = true;\n $merged_arr = array_merge($this->gets(), $post, $this->_validater_conf_arr);\n } else {\n $merged_arr = array_merge($this->gets(), $post);\n }\n\n $key_arr = array_unique(array_keys($merged_arr));\n\n $pattern = '';\n if ($this->_validater_name_prefix) {\n // ex) xxx_description -> description\n $pattern = '/^' . preg_quote($this->_validater_name_prefix, '/') . '_/';\n $replacement = '';\n }\n\n foreach ($key_arr as $key) {\n $val = null;\n $flag_conf_valid = false;\n\n // post value\n if (isset($post[$key])) {\n $val = $post[$key];\n }\n\n // name convert\n if ($pattern) {\n $key = preg_replace($pattern, $replacement, $key);\n }\n\n // value filter\n if ($flag_conf_arr) {\n list($val, $flag_conf_valid) = $this->validate_conf_value($post, $key, $val, $not_gpc);\n }\n\n if (!$flag_conf_valid) {\n $val = $this->validate_standard_value($key, $val, $not_gpc);\n }\n\n if ($val !== null) {\n $arr[$key] = $val;\n }\n }\n\n return $arr;\n }", "function verifyFormToken($form) {\n\n\t\t// check if a session is started and a token is transmitted, if not return an error\n\tif(!isset($_SESSION[$form.'_token'])) {\n\t\treturn false;\n\t\t}\n\n\t// check if the form is sent with token in it\n\tif(!isset($_POST['token'])) {\n\t\treturn false;\n\t\t}\n\n\t// compare the tokens against each other if they are still the same\n\tif ($_SESSION[$form.'_token'] !== $_POST['token']) {\n\t\treturn false;\n\t\t}\n\n\treturn true;\n}", "function inputChecker($input){\n \n // il valore che deve essere restituito\n $ret = true;\n \n foreach($input as $key => $value){\n \n switch ($key){\n case 'file': // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'id_cinguettio': // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n $ret = idFormat($value);// echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'utente_seguace': \n case 'utente_seguito':\n case 'utente_segnalato':\n case 'utente_giudicato': \n case 'utente_luogo': \n case 'email_utente':\n $ret = emailFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\"; \n break;\n case 'password_conferma': \n case 'password':\n $ret = pwdFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'nickname':\n $ret = nickFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'nome':\n $ret = nameFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'cognome':\n $ret = nameFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'sesso':\n $ret = sexFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'giorno':\n $ret = dayFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'mese':\n $ret = monthFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'anno':\n $ret = yearFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'nazione_nascita':\n case 'regione_nascita':\n case 'citta_residenza':\n $ret = placeFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_1':\n $ret = hobbyFormat($value, VALID_HOBBY_1_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_2':\n $ret = hobbyFormat($value, VALID_HOBBY_2_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_3':\n $ret = hobbyFormat($value, VALID_HOBBY_3_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'hobby_4':\n $ret = hobbyFormat($value, VALID_HOBBY_4_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_5':\n $ret = hobbyFormat($value, VALID_HOBBY_5_FORMAT); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_6':\n $ret = hobbyFormat($value, VALID_HOBBY_6_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_7':\n $ret = hobbyFormat($value, VALID_HOBBY_7_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_8':\n $ret = hobbyFormat($value, VALID_HOBBY_8_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_9':\n $ret = hobbyFormat($value, VALID_HOBBY_9_FORMAT); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_10':\n $ret = hobbyFormat($value, VALID_HOBBY_10_FORMAT); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'commento':\n case 'messaggio':\n $ret = textFormat($value); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'descrizione_foto':\n $ret = descrFormat($value);// echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'gradi_lat':\n $ret = gradiLatFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'gradi_lng': \n $ret = gradiLngFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'minuti_lat':\n case 'minuti_lng': \n $ret = secMinFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'secondi_lat':\n case 'secondi_lng': \n $ret = secMinFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'direzione_lat':\n $ret = direzioneLatFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'direzione_lng':\n $ret = direzioneLngFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n default:\n return false;\n } \n \n if($ret == false){\n break;\n }\n } \n return $ret;\n}", "public function getTokenData() {\n $data = \\Drupal::database()->select('taxonomy_term_field_data', 't');\n if($_GET['vid'] == 'kmds_token'){\n $data->leftJoin('taxonomy_term__field_machine_field', 'mf', \"t.tid = mf.entity_id\");\n $data->leftJoin('taxonomy_term__field_token', 'ft', \"t.tid = ft.entity_id\");\n }\n else if($_GET['vid'] == 'branding_css'){\n $data->leftJoin('taxonomy_term__field_style_type', 'st', \"t.tid = st.entity_id\");\n $data->condition('st.field_style_type_value', array('font-family', 'color', 'background-color', 'border'), 'IN');\n }\n $data->condition('t.vid', $_GET['vid'], '=');\n if(isset($_GET['product_group_tid']) && isset($_GET['image_preset_selector']) && $_GET['vid'] == 'image_preset'){\n $data->leftJoin('taxonomy_term__field_y_height', 'fh', \"t.tid = fh.entity_id\");\n $data->leftJoin('taxonomy_term__field_x_width', 'fw', \"t.tid = fw.entity_id\");\n $data->leftJoin('taxonomy_term__field_unit_of_measurement', 'um', \"t.tid = um.entity_id\");\n $data->fields('fh', ['field_y_height_value']);\n $data->fields('fw', ['field_x_width_value']);\n $data->fields('um', ['field_unit_of_measurement_value']);\n $data->leftJoin('taxonomy_term__field_product_group', 'pg', \"t.tid = pg.entity_id\");\n $data->condition('pg.field_product_group_target_id', $_GET['product_group_tid'], '=');\n }\n else if(isset($_GET['presetVal']) && isset($_GET['image_preset_selector']) && $_GET['vid'] == 'image_preset'){\n $data->leftJoin('taxonomy_term__field_image_format', 'if', \"t.tid = if.entity_id\");\n $data->leftJoin('taxonomy_term__field_color_space', 'cs', \"t.tid = cs.entity_id\");\n $data->leftJoin('taxonomy_term__field_dpi_ppi', 'dpi', \"t.tid = dpi.entity_id\");\n $data->leftJoin('taxonomy_term__field_unit_of_measurement', 'um', \"t.tid = um.entity_id\");\n $data->condition('t.tid', $_GET['presetVal'], '=');\n $data->fields('if', ['field_image_format_value']);\n $data->fields('cs', ['field_color_space_value']);\n $data->fields('dpi', ['field_dpi_ppi_value']);\n $data->fields('um', ['field_unit_of_measurement_value']);\n }\n else if(isset($_GET['preset_tid']) && $_GET['vid'] == 'image_preset'){\n $data->leftJoin('taxonomy_term__field_y_height', 'fh', \"t.tid = fh.entity_id\");\n $data->leftJoin('taxonomy_term__field_x_width', 'fw', \"t.tid = fw.entity_id\");\n $data->leftJoin('taxonomy_term__field_unit_of_measurement', 'um', \"t.tid = um.entity_id\");\n $data->fields('fh', ['field_y_height_value']);\n $data->fields('fw', ['field_x_width_value']);\n $data->fields('um', ['field_unit_of_measurement_value']);\n $data->leftJoin('taxonomy_term__field_pages', 'page', \"t.tid = page.entity_id\");\n $data->leftJoin('taxonomy_term__field_layout_front', 'lf', \"t.tid = lf.entity_id\");\n $data->leftJoin('taxonomy_term__field_layout_back', 'lb', \"t.tid = lb.entity_id\");\n $data->condition('t.tid', $_GET['preset_tid'], '=');\n $data->fields('page', ['field_pages_value']);\n $data->fields('lf', ['field_layout_front_target_id']);\n $data->fields('lb', ['field_layout_back_target_id']);\n }\n else if(isset($_GET['product_group_tid']) && isset($_GET['sub_image_preset']) && $_GET['vid'] == 'image_preset'){\n $data->leftJoin('taxonomy_term__field_y_height', 'fh', \"t.tid = fh.entity_id\");\n $data->leftJoin('taxonomy_term__field_x_width', 'fw', \"t.tid = fw.entity_id\");\n $data->leftJoin('taxonomy_term__field_unit_of_measurement', 'um', \"t.tid = um.entity_id\");\n $data->fields('fh', ['field_y_height_value']);\n $data->fields('fw', ['field_x_width_value']);\n $data->fields('um', ['field_unit_of_measurement_value']);\n $data->leftJoin('taxonomy_term__field_product_group', 'pg', \"t.tid = pg.entity_id\");\n //$data->leftJoin('taxonomy_term__field_pages', 'page', \"t.tid = page.entity_id\");\n //$data->leftJoin('taxonomy_term__field_layout_front', 'lf', \"t.tid = lf.entity_id\");\n //$data->leftJoin('taxonomy_term__field_layout_back', 'lb', \"t.tid = lb.entity_id\");\n $data->condition('pg.field_product_group_target_id', $_GET['product_group_tid'], '=');\n $data->leftJoin('taxonomy_term__field_product_sub_group', 'psg', \"t.tid = psg.entity_id\");\n $data->condition('psg.field_product_sub_group_target_id', $_GET['sub_image_preset'], '=');\n //$data->condition('t.tid', $_GET['preset_tid'], '=');\n //$data->fields('page', ['field_pages_value']);\n //$data->fields('lf', ['field_layout_front_target_id']);\n //$data->fields('lb', ['field_layout_back_target_id']);\n }\n else if(isset($_GET['image_preset_selector']) && $_GET['vid'] == 'image_preset'){\n $data->leftJoin('taxonomy_term__field_y_height', 'fh', \"t.tid = fh.entity_id\");\n $data->leftJoin('taxonomy_term__field_x_width', 'fw', \"t.tid = fw.entity_id\");\n $data->leftJoin('taxonomy_term__field_unit_of_measurement', 'um', \"t.tid = um.entity_id\");\n $data->fields('fh', ['field_y_height_value']);\n $data->fields('fw', ['field_x_width_value']);\n $data->fields('um', ['field_unit_of_measurement_value']);\n }\n else if(isset($_GET['product_group_tid']) && $_GET['vid'] == 'image_preset'){\n $data->leftJoin('taxonomy_term__field_product_group', 'pg', \"t.tid = pg.entity_id\");\n $data->condition('pg.field_product_group_target_id', $_GET['product_group_tid'], '=');\n }\n if(isset($_GET['token_tid'])){\n $data->condition('t.tid', $_GET['token_tid'], '=');\n }\n else if(isset($_GET['token'])){\n $data->condition('ft.field_token_value', $_GET['token'], 'LIKE');\n }\n else if(isset($_GET['machine_field'])){\n $data->condition('mf.field_machine_field_value', $_GET['machine_field'], 'LIKE');\n }\n $data->fields('t', ['tid','name']);\n if($_GET['vid'] == 'kmds_token'){\n $data->fields('mf', ['field_machine_field_value']);\n $data->fields('ft', ['field_token_value']);\n }\n else if($_GET['vid'] == 'branding_css'){\n $data->fields('st', ['field_style_type_value']);\n }\n $result = $data->execute()->fetchAll();\n foreach ($result as $term) {\n if($_GET['vid'] == 'kmds_token'){\n $fresult[] = [\n 'tid' => $term->tid,\n 'name' => $term->name,\n 'machine_field' => $term->field_machine_field_value,\n 'token' => $term->field_token_value,\n ];\n }\n else if($_GET['vid'] == 'branding_css'){\n if($term->field_style_type_value == 'font-family'){\n $fresult[]['fontfamily'] = [\n 'tid' => $term->tid,\n 'name' => $term->name,\n ];\n }\n else if($term->field_style_type_value == 'color'){\n $fresult[]['fontcolor'] = [\n 'tid' => $term->tid,\n 'name' => $term->name,\n ];\n }\n else if($term->field_style_type_value == 'background-color'){\n $fresult[]['backgroundcolor'] = [\n 'tid' => $term->tid,\n 'name' => $term->name,\n ];\n }\n else if($term->field_style_type_value == 'border'){\n $fresult[]['bordercolor'] = [\n 'tid' => $term->tid,\n 'name' => $term->name,\n ];\n }\n }\n else if(isset($_GET['presetVal']) && isset($_GET['image_preset_selector']) && $_GET['vid'] == 'image_preset'){\n $fresult[] = [\n 'tid' => $term->tid,\n 'name' => $term->name,\n 'format' => $term->field_image_format_value,\n 'color_space' => $term->field_color_space_value,\n 'dpi' => $term->field_dpi_ppi_value,\n 'unit' => $term->field_unit_of_measurement_value,\n ];\n }\n else if(isset($_GET['preset_tid']) && $_GET['vid'] == 'image_preset'){\n $f_fid = $term->field_layout_front_target_id;\n $layout_front = '';\n if(!empty($f_fid)) {\n $f_file = \\Drupal\\file\\Entity\\File::load($f_fid);\n $f_image_uri = $f_file->getFileUri();\n $layout_front = file_create_url($f_image_uri);\n }\n $b_fid = $term->field_layout_back_target_id;\n $layout_back = '';\n if(!empty($b_fid)) {\n $b_file = \\Drupal\\file\\Entity\\File::load($b_fid);\n $b_image_uri = $b_file->getFileUri();\n $layout_back = file_create_url($b_image_uri);\n }\n $fresult[] = [\n 'tid' => $term->tid,\n 'name' => $term->name,\n 'width' => $term->field_x_width_value,\n 'height' => $term->field_y_height_value,\n 'unit' => $term->field_unit_of_measurement_value,\n 'page_no' => $term->field_pages_value,\n 'layout_front' => $layout_front,\n 'layout_back' => $layout_back,\n ];\n }\n else if((isset($_GET['sub_image_preset']) || isset($_GET['image_preset_selector'])) && $_GET['vid'] == 'image_preset'){\n $fresult[] = [\n 'tid' => $term->tid,\n 'name' => $term->name,\n 'width' => $term->field_x_width_value,\n 'height' => $term->field_y_height_value,\n 'unit' => $term->field_unit_of_measurement_value,\n ];\n }\n else {\n $fresult[] = [\n 'tid' => $term->tid,\n 'name' => $term->name,\n ];\n }\n }\n $response = $fresult;\n return new JsonResponse($response);\n }", "function inputHas($key)\n\t{\n\treturn isset($_REQUEST[$key]);\n\t\n\t}", "function questionTypes($key = false) {\n $questionTypes = array(\n 1 => 'Single answer',\n 2 => 'More than one answer',\n 3 => 'Comprehension',\n 4 => 'Matrix matching',\n 5 => 'Integer'\n );\n return $key === false ? $questionTypes : $questionTypes[$key];\n}", "public function save_search_criteria($post_data){\n unset($post_data['token']);\n // $userId = $post_data['userId'];\n //print_r($post_data);exit();\n $commute = array_key_exists(\"commute\",$post_data);\n if($commute){ \n $commute = $post_data['commute']; \n unset($post_data['commute']);\n\n }\n\n // $preferences = array_key_exists(\"preferences\",$post_data);\n // if($preferences){ \n // $preferences = $post_data['preferences']; \n // $post_data['proximity'] = implode(\",\",$preferences['proximity']);\n // $post_data['avoid_proximity'] = implode(\",\",$preferences['avoid_proximity']);\n // unset($post_data['preferences']);\n // } \n\n $keywords = array_key_exists(\"keywords\",$post_data);\n if($keywords){ \n $post_data['keywords'] = implode(\",\",$post_data['keywords']);\n }\n\n $advanceSearch = array_key_exists(\"advanceSearch\",$post_data);\n if($advanceSearch){ \n $advanceSearch = $post_data['advanceSearch']; \n\n $postcode = array_key_exists(\"postcode\",$advanceSearch);\n if($postcode){ \n $post_data['area'] = $advanceSearch['postcode'];\n unset($advanceSearch['postcode']);\n }\n \n // $post_data['area'] = $advanceSearch['postcode']; \n\n $location_preferences = array_key_exists(\"location_preferences\",$advanceSearch);\n if($location_preferences){ \n $post_data['proximity'] = implode(\",\",$advanceSearch['location_preferences']);\n unset($advanceSearch['location_preferences']);\n }\n \n // $post_data['keywords'] = implode(\",\",$advanceSearch['keywords']);\n // $post_data['proximity'] = implode(\",\",$advanceSearch['location_preferences']);\n $avoid_location_preferences = array_key_exists(\"avoid_location_preferences\",$advanceSearch);\n if($avoid_location_preferences){ \n $post_data['avoid_proximity'] = implode(\",\",$advanceSearch['avoid_location_preferences']);\n unset($advanceSearch['avoid_location_preferences']);\n }\n\n // $post_data['avoid_proximity'] = implode(\",\",$advanceSearch['avoid_location_preferences']);\n $avoid_location = array_key_exists(\"avoid_location\",$advanceSearch);\n if($avoid_location){ \n $post_data['avoid_area'] = $advanceSearch['avoid_location'];\n unset($advanceSearch['avoid_location']);\n }\n\t\t\t\n // $post_data['avoid_area'] = $advanceSearch['avoid_location'];\n //$post_data['avoid_keywords'] = implode(\",\",$advanceSearch['avoid_keywords']); \n unset($post_data['advanceSearch']);\n } \n\n \n $topSearch = array_key_exists(\"topSearch\",$post_data);\n if($topSearch){\n $topSearch = $post_data['topSearch'];\n $criteria1 = array_key_exists(\"criteria1\",$topSearch);\n if($criteria1){ \n $post_data['criteria1'] = $topSearch['criteria1'];\n unset($topSearch['criteria1']);\n }\n //$post_data['criteria1'] = $topSearch['criteria1'];\n $criteria2 = array_key_exists(\"criteria2\",$topSearch);\n if($criteria2){ \n $post_data['criteria2'] = $topSearch['criteria2'];\n unset($topSearch['criteria2']);\n }\n //$post_data['criteria2'] = $topSearch['criteria2'];\n $criteria3 = array_key_exists(\"criteria3\",$topSearch);\n if($criteria3){ \n $post_data['criteria3'] = $topSearch['criteria3'];\n unset($topSearch['criteria3']);\n }\n // $post_data['criteria3'] = $topSearch['criteria3'];\n unset($post_data['topSearch']);\n }\t\t\n\t\t\n \n // check searchId is present\n\t\t$searchId = array_key_exists(\"searchId\",$post_data);\n if($searchId){\n $searchId = $post_data['searchId'];\n\t\t}\n // $searchId = $post_data['searchId'];\n if($searchId){\n $update = $this->db->where('searchId',$searchId)->update('searchcriteria', $post_data);\n if($update){ \n /* Delete the previous commute */\n $this->db->where('userId', $post_data['userId']);\n $this->db->where('searchId', $searchId);\n\n if($commute){\n if($this->db->delete('commute')){\n /* Insert data in commute table */\n $commute_details = array(); \n foreach($commute as $key){ \n\t\t\t\t\t\t\t\n $commute_data = array(\n \"userId\"=>$post_data['userId'],\n \"searchId\" => $searchId,\n \"commuteName\"=> $key['commuteName'],\n \"destination\"=> $key['destination'],\n \"timeofCommuting\"=> array_key_exists(\"timeofCommuting\",$key) ? $key['timeofCommuting'] : '',\n \"modeOfCommute\"=> array_key_exists(\"modeOfCommute\",$key) ? $key['modeOfCommute'] : '',\n \"maxCommuteTime\"=> $key['maxCommuteTime'],\n \"destLatitude\"=> $key['destLatitude'],\n \"destLongitude\"=> $key['destLongitude'],\n \"primaryCommute\"=> $key['primaryCommute']\n );\n $commute_details[] = $commute_data;\n } \n \n // print_r($commute_details);exit();\n $this->db->insert_batch('commute', $commute_details); \n } \n } //comute \n \n $_POST['message'] = \"Search criteria updated successfully.\";\n return $searchId;\n }\n\n }else{\n //print_r($post_data);exit();\n $insert = $this->db->insert(\"searchcriteria\", $post_data);\n if($insert){\n $searchId = $this->db->insert_id();\n /* Insert data in commute table */\n // print_r($post_data['commute']);exit();\n $commute_details = array();\n foreach($commute as $key){ \n $commute_data = array(\n \"userId\"=>$post_data['userId'],\n \"searchId\" => $searchId,\n \"commuteName\"=> $key['commuteName'],\n \"destination\"=> $key['destination'],\n \"timeofCommuting\"=> array_key_exists(\"timeofCommuting\",$key) ? $key['timeofCommuting'] : '',\n \"modeOfCommute\"=> array_key_exists(\"modeOfCommute\",$key) ? $key['modeOfCommute'] : '',\n \"maxCommuteTime\"=> $key['maxCommuteTime'],\n \"destLatitude\"=> $key['destLatitude'],\n \"destLongitude\"=> $key['destLongitude'],\n \"primaryCommute\"=> $key['primaryCommute']\n );\n $commute_details[] = $commute_data;\n }\n \n $this->db->insert_batch('commute', $commute_details); \n $_POST['message'] = \"Search criteria added successfully.\";\n return $searchId;\n }\n }\n }", "function readinput()\n\t{\n\t\t$temanbaru = [\n\t\t\t\"noteman\"\t=> $this->input->post(\"noteman\"),\n\t\t\t\"namateman\"\t=> $this->input->post(\"namateman\"),\n\t\t\t\"notelp\"\t=> $this->input->post(\"notelp\"),\n\t\t\t\"email\"\t\t=> $this->input->post(\"email\")\n\t\t];\n\n\t\treturn $temanbaru;\n\t}", "public function reset_survey_options_post()\n\t\t{\n\t\t\t$uuid = $this->post('uuid');\n\t\t\t$weekSend = $this->post('weekSend');\n\t\t\tif(!empty($uuid) && !empty($weekSend))\n\t\t\t{\n\t\t\t\t$this->db->where('tans_uuid' , $uuid)\n\t\t\t\t\t\t->where('tans_week' , $weekSend)\n\t\t\t\t\t\t->delete('plused_test_answers');\n\t\t\t\t$data['status'] = $this->lang->line('SUCCESS');\n\t\t\t\t$data['message'] = $this->lang->line('VALID_TOKEN_MESSAGE');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['status'] = $this->lang->line('FAIL');\n\t\t\t\t$data['message'] = $this->lang->line('please_pass_required');\n\t\t\t}\n\t\t\t$this->response($data , 200);\n\t\t}", "function SetupKeyValues($key) {\r\n\t\t$arrKeyFlds = explode($GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"], $key);\r\n\t\tif (count($arrKeyFlds) >= 1) {\r\n\t\t\t$this->idfb_posts->setFormValue($arrKeyFlds[0]);\r\n\t\t\tif (!is_numeric($this->idfb_posts->FormValue))\r\n\t\t\t\treturn FALSE;\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "function _postn($v) {\r\n $r = isset($_POST[$v]) ? bwm_clean($_POST[$v]) : '';\r\n return $r == '' ? NULL : $r;\r\n}", "function check_api_token($token) {\n /* format (2) : crypt (1) : ccrypt( create_api_token('glynthom', '50') , 'AES-256-OFB', 'en' ) ) */\n\n if (strlen(utf8_decode( $token )) === 60) {\n \n switch (true) {\n case (strlen(utf8_decode( $token )) === 120):\n $token = ccrypt( $token , 'AES-256-OFB', 'de' );\n case (strlen(utf8_decode( $token )) === 60):\n break;\n }\n\n $token = explode(\"-\", $token);\n $token[0] = strlen(utf8_decode( $token[0] ));\n /* name de-crunch, figure out upad length compensation */\n\n switch (true) {\n case ( !isset($token[3]) ):\n case ( !isset($token[1]) ):\n case ( !isset($token[6]) ): \n return 'token is invalid, error';\n break; \n }\n\n switch (true) {\n case ($token[0] === 32): // max user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 30): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 28): // user pad \n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 26): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 24): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 22): // username \n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 20): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 18): // user pad \n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 16): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 14): // user pad \n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 12): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 10): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' ); \n break;\n case ($token[0] === 8): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 6): // user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n case ($token[0] === 4): // min user pad\n $token[3] = ccrypt( $token[3], 'AES-256-OFB', 'de' );\n $token[1] = ccrypt( $token[1], 'AES-256-OFB', 'de' );\n break;\n }\n\n /* number de-crunch figure out pad length compensation */\n\n /* if ( isset($token[6]) ) { */\n $nlen = strlen(utf8_decode( $token[6] ));\n\n switch (true) {\n case ($nlen === 10): // max 100 000\n $token[5] = ccrypt( $token[5], 'AES-256-OFB', 'de' );\n break;\n case ($nlen === 8): // 10 000 \n $token[5] = ccrypt( $token[5], 'AES-256-OFB', 'de' );\n break;\n case ($nlen === 6): // 1 000 \n $token[5] = ccrypt( $token[5], 'AES-256-OFB', 'de' );\n break;\n case ($nlen === 4): // 100\n $token[5] = ccrypt( $token[5], 'AES-256-OFB', 'de' );\n break;\n case ($nlen === 2): // 50 public access\n $token[5] = ccrypt( $token[5], 'AES-256-OFB', 'de' );\n break;\n\n case ($nlen > 10):\n case ($nlen < 2):\n $token[3] = 'token is '; $token[1] = 'invalid'; $token[5] = 'error';\n break;\n }\n\n } else { $token[3] = 'token is '; $token[1] = 'invalid'; $token[5] = 'error';}\n\n /* final sanity check */\n\n $options = array('options' => array('min_range' => 0));\n\n switch (true) {\n\n case ( !preg_match('/^[A-Za-z0-9_]{1,15}$/', ($token[3] . $token[1]) ) ):\n return 'token is invalid, error';\n break;\n case ( filter_var($token[5], FILTER_VALIDATE_INT, $options) === FALSE ):\n return 'token is invalid, error';\n break;\n\n }\n \n return $token[3] . $token[1] . ',' .$token[5];\n\n}", "function verify_form_token($form) {\n\t// Check if a session is started and a token is transmitted,\n\t// if not return an error\n\tif(!isset($_SESSION[$form.'_token'])) {\n\t\treturn false;\n\t}\n\n\t// Check if the form is sent with token in it\n\tif(!isset($_POST['token'])) {\n\t\treturn false;\n\t}\n\n\t// Compare the tokens against each other if they are still the same\n\tif ($_SESSION[$form . '_token'] !== $_POST['token']) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "function verifyFormToken($form) {\n\t\tif (!isset($_SESSION[$form . '_token'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// check if the form is sent with token in it\n\t\tif (!isset($_POST['token'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// compare the tokens against each other if they are still the same\n\t\tif ($_SESSION[$form . '_token'] !== $_POST['token']) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function verifyFormToken($form) {\r\n\t\t\r\n\t\t// check if a session is started and a token is transmitted, if not return an error\r\n\t\tif(!isset($_SESSION[$form.'_token'])) { \r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// check if the form is sent with token in it\r\n\t\tif(!isset($_POST['token'])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// compare the tokens against each other if they are still the same\r\n\t\tif ($_SESSION[$form.'_token'] !== $_POST['token']) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private function validateInput($key) {\n if (!array_key_exists($key, $_POST)) {\n return false;\n } else {\n $_POST[$key] = trim($_POST[$key]);\n if ($_POST[$key] == \"\") {\n return false;\n }\n }\n return $_POST[$key];\n }", "private function is_valid_field_data() {\n\t\t$data = rgpost( $this->get_input_name() );\n\n\t\tif ( empty( $data ) ) {\n\t\t\tgf_recaptcha()->log_debug( __METHOD__ . \"(): Input {$this->get_input_name()} empty.\" );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn gf_recaptcha()->get_token_verifier()->verify_submission( $data );\n\t}", "function getRawInputValues();", "public function realisasi_post() {\n \t// Load Authorization Token Library\n $this->load->library('Authorization_Token');\n\n /**\n * User Token Validation\n */\n $is_valid_token = $this->authorization_token->validateToken();\n if (!empty($is_valid_token) AND $is_valid_token['status'] === TRUE) {\n # XSS Filtering (https://www.codeigniter.com/user_guide/libraries/security.html)\n $_POST = $this->security->xss_clean($_POST);\n $headers = $this->input->request_headers();\n\n $checkProduksi = $this->model->check_data_tpb($this->post('tipe_file'), $this->post('nomor_dok_internal'), $this->post('tanggal_dok_internal'), $is_valid_token['data']->kode_trader);\n\n\n $error = 0;\n\n if ($headers['Content-Type'] != \"application/json\") {\n $message['content_type'] = 'Request header must set to Content-Type: application/json';\n $error += 1;\n } \n\n if ($checkProduksi) {\n $message['data_exist'] = \"Nomor & Tanggal Produksi sudah ada.\";\n $error += 1;\n }\n\n if (!in_array($this->post('tipe_file'), array(\"FG\",\"RM\",\"SCRAP\",\"HALF\"))) {\n $message['tipe_file'] = \"Tipe file tidak di kenali\";\n $error += 1;\n } \n\n if (empty($this->post('nomor_dok_internal'))) {\n $message['nomor_dok_internal'] = \"Nomor Dokumen Internal harus diisi\";\n $error += 1;\n } \n\n if (empty($this->post('tanggal_dok_internal'))) {\n $message['tanggal_dok_internal'] = \"Tanggal Dokumen Internal harus diisi\";\n $error += 1;\n } \n\n $details = $this->post('details');\n for ($i=0; $i < count($details); $i++) {\n if(empty($details[$i]['kode_barang'])) {\n $message['kode_barang_'.$i] = \"Kode barang harus diisi\";\n $error += 1;\n } \n\n if(empty($details[$i]['jenis_barang'])) {\n $message['jenis_barang_'.$i] = \"Jenis barang harus diisi\";\n $error += 1;\n } \n\n if(empty($details[$i]['uraian_barang'])) {\n $message['uraian_barang_'.$i] = \"Uraian barang harus diisi\";\n $error += 1;\n } \n\n if(empty($details[$i]['kode_satuan'])) {\n $message['kode_satuan_'.$i] = \"Kode satuan harus diisi\";\n $error += 1;\n } \n\n if(empty($details[$i]['jumlah_satuan'])) {\n $message['jumlah_satuan_'.$i] = \"Jumlah satuan harus diisi\";\n $error += 1;\n } \n\n if(empty($details[$i]['kode_gudang'])) {\n $message['kode_gudang_'.$i] = \"Kode gudang harus diisi\";\n $error += 1;\n }\n }\n\n if ($error > 0) {\n $this->model->save_log($message, $this->post());\n $this->response(['status' => FALSE, 'message' => $message ], REST_Controller::HTTP_UNPROCESSABLE_ENTITY);\n } else {\n $arrdata['tipe_file'] = $this->post('tipe_file');\n $arrdata['nomor_dok_internal'] = $this->post('nomor_dok_internal');\n $arrdata['tanggal_dok_internal'] = $this->post('tanggal_dok_internal');\n $arrdata['file_name'] = $this->post('file_name');\n $arrdata['kode_trader'] = $is_valid_token['data']->kode_trader;\n $arrdata['created_by'] = $is_valid_token['data']->id;\n $id_hdr = $this->model->save('t_temp_services_hdr', $arrdata, 'single');\n\n $details = $this->post('details');\n for ($i=0; $i < count($details); $i++) { \n $data_detail[$i]['kode_barang'] = $details[$i]['kode_barang'];\n $data_detail[$i]['jenis_barang'] = $details[$i]['jenis_barang'];\n $data_detail[$i]['uraian_barang'] = $details[$i]['uraian_barang'];\n $data_detail[$i]['kode_satuan'] = $details[$i]['kode_satuan'];\n $data_detail[$i]['jumlah_satuan'] = $details[$i]['jumlah_satuan'];\n $data_detail[$i]['kode_gudang'] = $details[$i]['kode_gudang'];\n $data_detail[$i]['kode_hs'] = $details[$i]['kode_hs'];\n $data_detail[$i]['id_header'] = $id_hdr;\n }\n $this->model->save('t_temp_services_dtl', $data_detail,'batch');\n $this->response(['status' => TRUE, 'message' => \"Data Berhasil Diinsert\"], REST_Controller::HTTP_OK);\n }\n } else {\n $this->model->save_log($is_valid_token['message'], $is_valid_token);\n $this->response(['status' => FALSE, 'message' => $is_valid_token['message'] ], REST_Controller::HTTP_NOT_FOUND);\n }\n }", "function recommends_req_wizard_verification($form, &$form_state) {\n \n $output_info = array(\n 'prefix' => $form_state['prefix'],\n 'firstname' => $form_state['firstname'],\n 'lastname' => $form_state['lastname'],\n 'initial' => $form_state['initial'],\n 'suffix' => $form_state['suffix'],\n 's_email' => $form_state['s_email'],\n 's_school' => $form_state['s_school'],\n 's_req_date' => $form_state['s_req_date'],\n 's_master_doc' => $form_state['s_master_doc'],\n 's_comments' => $form_state['s_comments'],\n \t);\n \t\n \t $email_values = array(\n 'email' => $form_state['s_email'],\n 'message' => \"\\n\" . \"\\n\" .\n \"Name Prefix: \" . $output_info['prefix'] . \"\\n\" .\n \"First Name: \" . $output_info['firstname'] . \"\\n\" .\n \"Initial: \" . $output_info['initial'] . \"\\n\" .\n \"Last Name: \" . $output_info['lastname'] . \"\\n\" .\n \"Name Suffix: \" . $output_info['suffix'] . \"\\n\" .\n \"Student Email: \" . $output_info['s_email'] . \"\\n\" .\n \"Statement of intent, Point of view : \" . \"\\n\" . $output_info['s_comments'] . \"\\n\"\n );\n \n for ($i = 1; $i <= $form_state['num_schools']; $i++) {\n\t\t\n\t\t$output_schools[$i] = array(\n \t'r_email'=> $form_state['s_email'],\n \t'num_schools'=> $form_state['num_schools'],\n \t'r_school'=> $form_state['schoolname'][$i],\n \t'r_program'=> $form_state['schoolprogram'][$i],\n \t'r_program'=> $form_state['schoolprogram'][$i],\n \t 'r_school_contact_email' => $form_state['r_school_contact_email'][$i],\n \t 'r_school_contact_postal' => $form_state['r_school_contact_postal'][$i],\n \t'r_school_contact'=> $form_state['r_school_contact_postal'][$i],\n \t'r_date_due_month' => $form_state['r_date_due'][$i]['month'],\n 'r_date_due_day' => $form_state['r_date_due'][$i]['day'],\n 'r_date_due_year' => $form_state['r_date_due'][$i]['year'],\n \t'r_status'=> \"Initial\",\n\t\t\n \t);\n }\n $email_values['message'] = $email_values['message'] .\n \"\\n\" . \"Schools to receive recommendation.\" . \"\\n\\n\";\n \n $school_values = array(array());\n \n for ($i = 1; $i <= $output_schools[1]['num_schools']; $i++) {\t\n \t\n \t$email_values['message'] = $email_values['message'] . $output_schools[$i]['r_school'] . \"\\n\" .\n \t\"School Program/Position: \" .\n \t\n \t$output_schools[$i]['r_program'] . \"\\n\" .\n \t\"School contact postal: \" .\n \t$output_schools[$i]['r_school_contact_postal'] . \"\\n\" . \n \t\"School contact email: \" .\n \t$output_schools[$i]['r_school_contact_email'] . \"\\n\" . \t\n \t\"Final Date required by school: \" . \n \t$output_schools[$i]['r_date_due_month'] . \"/\" . \n \t$output_schools[$i]['r_date_due_day'] . \"/\" . \n \t$output_schools[$i]['r_date_due_year'] . \"\\n\\n\";\n \n };\n \n for ($i = 1; $i <= $form_state['num_courses']; $i++) {\n\t\t\n\t\t$pid = $form_state['input']['crsname'][$i]['i_pid'];\n\t\t\n\t\t$output_courses[$i] = array(\n \t'c_email' => $form_state['s_email'],\n \t'num_courses' => $form_state['num_courses'],\n \t'c_course' => $form_state['coursenum'][$i],\n \t'c_semester' => $form_state['coursesemester'][$i],\n \t'c_year' => $form_state['courseyear'][$i],\n \t'c_other' => $form_state['courseother'][$i],\n \t);\n \t\n }\n \n $email_values['message'] = $email_values['message'] .\n \"\\n\" . \"Courses in which enrolled with the professor.\" . \"\\n\";\n \n $course_values = array(array());\n \n for ($i = 1; $i <= $output_courses[1]['num_courses']; $i++) {\t\n \t\n \t$email_values['message'] = $email_values['message'] . \n \t\"\\n\" . \"Course: \" .\n \t\n \t$output_courses[$i]['c_course'] . \" \" .\n \t\"Semester: \" . \n \t$output_courses[$i]['c_semester'] .\n \t\" Year: \" . \n \t$output_courses[$i]['c_year'] . \"\\n\\n\" . $output_courses[$i]['c_other'] ;\n \n }; \n \n \n $msg = \"Please review the following information that you entered. Press Finish to send the information or cancel to abort the operation\";\n drupal_set_message('<pre id=rqmsgsize>' . print_r($msg, TRUE) . print_r($email_values['message'], TRUE) . '</pre>');\n \n // We will have many fields with the same name, so we need to be able to\n // access the form hierarchically.\n $form['#tree'] = TRUE;\n\n $form['description'] = array(\n '#type' => 'item',\n );\n\n if (empty($form_state['num_courses'])) {\n $form_state['num_courses'] = 1;\n }\n\n \n\n // Adds \"Add another course\" button\n $form['add_course'] = array(\n '#type' => 'submit',\n '#value' => t('Cancel'),\n '#submit' => array('recommends_req_intro'),\n );\n\n\n return $form;\n}", "function inputHas($key) {\n\t// check to see if $_REQUEST has a key/value\n\t// return true if the $key is set on $_REQUEST\n\t// else return true if it is not\n\treturn isset($_REQUEST[$key]);\n\n}", "public function input($key)\n {\n return $this->parameters['post']->get($key);\n }", "private function validateTokens()\n {\n $whoami = $this->getJson('/ping/whoami');\n if (isset($whoami['authenticated']) && $whoami['authenticated'])\n {\n syslog(LOG_DEBUG, \"Monzo: Token is still valid\");\n return true;\n }\n else\n {\n return false;\n }\n }", "function hasPost($p_sKey) {\n\t\treturn array_key_exists($p_sKey, $_POST);\n\t}", "public function postKeyloanTerm(Request $request)\n {\n $input = Input::all();\n $loanId = isset($input['loanId']) ? $input['loanId'] : null;\n $loanType = isset($input['type']) ? $input['type'] : null;\n $amount = isset($input['loan_amount']) ? $input['loan_amount'] : null;\n $loanTenure = isset($input['loan_tenure']) ? $input['loan_tenure'] : null;\n $endUseList = isset($input['end_use']) ? $input['end_use'] : null;\n //if loan is selected\n $companySharePledged = isset($input['companySharePledged']) ? $input['companySharePledged'] : null;\n $bscNscCode = isset($input['bscNscCode']) ? $input['bscNscCode'] : null;\n //$id = $input['id'];\n $loan = null;\n $fieldsArr = [];\n $rulesArr = [];\n $messagesArr = [];\n $user = Auth::getUser();\n $userProfile = Auth::getUser()->userProfile();\n\n //$guarantors=$input['guarantors'];\n $fieldsArr['guarantors']=$input['guarantors'];\n $rulesArr['guarantors']='Required';\n $messagesArr['guarantors.required']=\"Guarantors is required\";\n\n $fieldsArr['amount']=$input['amount'];\n $rulesArr['amount']='Required|numeric';\n $messagesArr['amount.required']=\"Amount is required\"; \n\n $fieldsArr['purpose']=$input['purpose'];\n $rulesArr['purpose']='Required';\n $messagesArr['purpose.required']=\"Purpose is required\"; \n\n $fieldsArr['facility']=$input['facility'];\n $rulesArr['facility']='Required';\n $messagesArr['facility.required']=\"Facility is required\";\n\n $fieldsArr['tenor']=$input['tenor'];\n $rulesArr['tenor']='Required|numeric|max:120';\n $messagesArr['tenor.required']=\"Tenor is required\"; \n\n $fieldsArr['interest_rate']=$input['interest_rate'];\n $rulesArr['interest_rate']='Required|numeric|max:25';\n $messagesArr['interest_rate.required']=\"Interest is required\"; \n\n $fieldsArr['processing_fee']=$input['processing_fee'];\n $rulesArr['processing_fee']='Required|numeric';\n $messagesArr['processing_fee.required']=\"Processing Fees is required\"; \n\n $fieldsArr['legal_fee']=$input['legal_fee'];\n $rulesArr['legal_fee']='Required|numeric';\n $messagesArr['legal_fee.required']=\"Legal Fees is required\";\n\n\n\n $validator = Validator::make($fieldsArr, $rulesArr, $messagesArr);\n if ($validator->fails()) {\n return Redirect::back()->withErrors($validator)->withInput();\n } else {\n //$user = Auth::getUser();\n //$userProfile = Auth::getUser()->userProfile();\n $input['user_id'] = $user->id;\n if (isset($loanId)) {\n if (isset($loans)) {\n $salesAreaDetailId = $loans->id;\n } else {\n $salesAreaDetailId = null;\n }\n }\n\n $user = Auth::user();\n if (isset($user)) {\n $userID = $user->id;\n $userEmail = $user->email;\n }\n if (isset($userID)) {\n $mobileAppEmail = DB::table('mobile_app_data')->where('Email', $userEmail)\n ->where('status', 0)\n ->first();\n }\n }\n\n $loansStatus = LoansStatus::updateOrCreate(['loan_id' => $loanId], ['loan_id' => $loanId, 'sentApprovar' => 'Y']);\n $loansStatus = Loan::updateOrCreate(['id' => $loanId], ['id' => $loanId, 'status' => '22']);\n $loansStatus->save();\n \n $loan = PraposalKeyloanterms::updateOrCreate(['loan_id' => $loanId], [\n /* 'promoterBackground' => @$input['promoterBackground'],*/\n 'guarantors' => @$input['guarantors'],\n 'amount' => @$input['amount'],\n 'purpose'=> @$input['purpose'],\n 'borrower'=> @$input['borrower'],\n // 'businessDescription'=> @$input['businessDescription'], \n 'facility'=> @$input['facility'],\n 'tenor'=> @$input['tenor'], \n 'interest_rate'=> @$input['interest_rate'],\n 'processing_fee'=> @$input['processing_fee'], \n 'legal_fee'=> @$input['legal_fee'],\n 'repayment_schedule'=> @$input['repayment_schedule'], \n 'prepayment_penalty'=> @$input['prepayment_penalty'], \n 'security'=> @$input['security'], \n 'pre_disbursement_conditions'=> @$input['pre_disbursement_conditions'], \n 'fin_conv_debt_ebitda'=> @$input['fin_conv_debt_ebitda'], \n 'fin_conv_debt_equity_ratio'=> @$input['fin_conv_debt_equity_ratio'],\n 'fin_conv_current_ratio'=> @$input['fin_conv_current_ratio'], \n 'fin_conv_interest_cov_ratio'=> @$input['fin_conv_interest_cov_ratio'],\n 'fin_conv_other'=> @$input['fin_conv_other'], \n //'other_convenants_standerds_withaddiotion'=> @$input['other_convenants_standerds_withaddiotion'], \n 'other_convenants_standerds_withaddiotion'=> @$input['other_convenants_standerds_withaddiotion'], \n //'loan_purpose'=> @$input['loan_purpose'] 'KYC'=> @$input['KYC'], \n 'recomndation'=> @$input['recomndation'], \n 'lastRowriskMitigants'=> @$input['lastRowriskMitigants'], \n\n\n //'loan_purpose'=> $input['loan_purpose']\n ] );\n //dd( $input);\n // $redirectUrl = $this->generateRedirectURL('loans/praposal/checklist', $endUseList, $loanType, $amount, $loanTenure, $companySharePledged, $bscNscCode, $loanId);\n //$redirectUrl = $this->generateRedirectURL('loans/praposal/checklist', $endUseList, $loanType, $amount, $loanTenure, $companySharePledged, $bscNscCode, $loanId);\n\n //return Redirect::to($redirectUrl);\n //$redirectUrl = 'home';\n\n\n if($user->isApproverUser()){\n $redirectUrl = $this->generateRedirectURL('loans/praposal/approver', $endUseList, $loanType, $amount, $loanTenure, $companySharePledged, $bscNscCode, $loanId);\n }else{\n $redirectUrl = 'home';\n}\nreturn Redirect::to($redirectUrl)->with('message', 'Proposal Has beed forwarded to approver');;\n\n}", "function training_token_form($form, &$form_state) {\n $form['test_tokens'] = array(\n '#type' => 'textarea',\n '#title' => t('Test autocomplete capabilities'),\n '#autocomplete_path' => 'token/autocomplete/task',\n );\n $form['token_tree'] = array(\n '#theme' => 'token_tree',\n '#variables' => array(\n 'test' => TRUE,\n ),\n '#dialog' => TRUE,\n '#global_types' => FALSE,\n '#token_types' => array(\n 'user',\n ),\n );\n\n return $form;\n}", "public static function chooseTokensProcess()\n {\n\n $cart = geoCart::getInstance();\n $item = $cart->item;\n\n $util = geoAddon::getUtil('tokens');\n $token = $util->getTokenInfo($item->getPricePlan(), $_POST['token_choice']);\n\n if (!$token) {\n //should not get here, should be caught in checkVars, this is just\n //extra failsafe\n $cart->addError();\n return;\n }\n $item->setCost($token['price']);\n $item->set('tokens', (int)$token['tokens']);\n }", "public function extra_question_fields() {\n return array('qtype_formulas_options', 'varsrandom', 'varsglobal', 'answernumbering');\n }", "function has_categorys()\n\t{\n\t\t\t$categorias = $this->combofiller->categorias();\t\t\t\n\t\t\tforeach($categorias as $key => $value)\n\t\t\t{\n\t\t\t\tif ($this->input->post('' . $key . ''))\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn FALSE;\t\n\t}", "function check_extract($POST_param_name, $success_variable_name, $function_name) {\n\t\tif (empty($_POST[\"$POST_param_name\"])) {\n\t\t\t$return_arr = array(\n\t\t\t\t'success' => '0',\n\t\t\t\t'fail_reason' => \"'$POST_param_name' field is required\");\n\t\t\techo json_encode($return_arr);\n\t\t\tdie();\t\t\n\t\t} else {\n\t\t\t$GLOBALS[\"$success_variable_name\"] = test_input($_POST[\"$POST_param_name\"]);\n\t\t}\n\t}", "function check_extract($POST_param_name, $success_variable_name, $function_name) {\n\t\tif (empty($_POST[\"$POST_param_name\"])) {\n\t\t\t$return_arr = array(\n\t\t\t\t'success' => '0',\n\t\t\t\t'fail_reason' => \"'$POST_param_name' field is required\");\n\t\t\techo json_encode($return_arr);\n\t\t\tdie();\t\t\n\t\t} else {\n\t\t\t$GLOBALS[\"$success_variable_name\"] = test_input($_POST[\"$POST_param_name\"]);\n\t\t}\n\t}", "function check_extract($POST_param_name, $success_variable_name, $function_name) {\n\t\tif (empty($_POST[\"$POST_param_name\"])) {\n\t\t\t$return_arr = array(\n\t\t\t\t'success' => '0',\n\t\t\t\t'fail_reason' => \"'$POST_param_name' field is required\");\n\t\t\techo json_encode($return_arr);\n\t\t\tdie();\t\t\n\t\t} else {\n\t\t\t$GLOBALS[\"$success_variable_name\"] = test_input($_POST[\"$POST_param_name\"]);\n\t\t}\n\t}", "function printTFQuestionForm() {\n\tglobal $tool_content, $langTitle, $langSurveyStart, $langSurveyEnd, \n\t\t$langType, $langSurveyMC, $langSurveyFillText, \n\t\t$langQuestion, $langCreate, $langSurveyMoreQuestions, \n\t\t$langSurveyCreated, $MoreQuestions;\n\t\t\n\t\tif(isset($_POST['SurveyName'])) $SurveyName = htmlspecialchars($_POST['SurveyName']);\n\t\tif(isset($_POST['SurveyEnd'])) $SurveyEnd = htmlspecialchars($_POST['SurveyEnd']);\n\t\tif(isset($_POST['SurveyStart'])) $SurveyStart = htmlspecialchars($_POST['SurveyStart']);\n\t\t\n//\tif ($MoreQuestions == 2) {\n\tif ($MoreQuestions == $langCreate) {\n\t\tcreateTFSurvey();\n\t} else {\n\t\t$tool_content .= <<<cData\n\t\t<form action=\"addsurvey.php\" id=\"survey\" method=\"post\">\n\t\t<input type=\"hidden\" value=\"2\" name=\"UseCase\">\n\t\t<table>\n\t\t\t<tr><td>$langTitle</td><td colspan=\"2\"><input type=\"text\" size=\"50\" name=\"SurveyName\" value=\"$SurveyName\"></td></tr>\n\t\t\t<tr><td>$langSurveyStart</td><td colspan=\"2\"><input type=\"text\" size=\"20\" name=\"SurveyStart\" value=\"$SurveyStart\"></td></tr>\n\t\t\t<tr><td>$langSurveyEnd</td><td colspan=\"2\"><input type=\"text\" size=\"20\" name=\"SurveyEnd\" value=\"$SurveyEnd\"></td></tr>\ncData;\n\t\t$counter = 0;\n\t\tforeach (array_keys($_POST) as $key) {\n\t\t\t++$counter;\n\t\t $$key = $_POST[$key];\n\t\t if (($counter > 4 )&($counter < count($_POST)-1)) {\n\t\t\t\t$tool_content .= \"<tr><td>$langQuestion</td><td><input type='text' name='question{$counter}' value='${$key}'></td></tr>\"; \n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$tool_content .= <<<cData\n\t\t\t<tr><td>$langQuestion</td><td><input type='text' name='question'></td></tr>\n\t\t\t<tr>\n\t\t\t <td>\n\t\t\t <input name=\"MoreQuestions\" type=\"submit\" value=\"$langSurveyMoreQuestions\" />\n\t\t </td>\n\t\t\t <td>\n\t\t\t <input name=\"MoreQuestions\" type=\"submit\" value=\"$langCreate\" />\n\t\t </td>\n\t\t\t</tr>\n\t\t</table>\n\t\t</form>\ncData;\n\t}\n}", "private function isForgeRequest(){\n\t\t$isValidToken = true;\n\n\t\t$csrfTokenFromRq = isset($_POST[\"_token\"]) ? $_POST[\"_token\"] : (isset($_GET[\"_token\"]) ? $_GET[\"_token\"] : null);\n\n\t\t$csrfTokenFromRq = isset($_POST[\"_token\"]) ? $_SESSION[\"_token\"] : null;\n\n\t\techo \"csrf request : \".$csrfTokenFromRq.PHP_EOL;\n\t\techo \"csrf session : \".$csrfTokenFromSession.PHP_EOL;\n\t\tif($csrfTokenFromRq === null || $csrfTokenFromSession === null){\n\t\t\techo \"Tokens are null\".PHP_EOL;\n\t\t\t$isValidToken = false;\n\t\t}\n\t\tif($csrfTokenFromSession === $csrfTokenFromRq){\n\t\t\t$isValidToken = true;\n\t\t\techo \"Valid csrf token\".PHP_EOL;\n\t\t}\n\t\treturn !$isValidToken;\n\t}" ]
[ "0.62056375", "0.6144503", "0.5749659", "0.56880814", "0.5658803", "0.5630164", "0.55228466", "0.54872245", "0.5446063", "0.5445069", "0.5414132", "0.53748727", "0.5369509", "0.5344173", "0.53163314", "0.52772856", "0.5244206", "0.5234528", "0.5233092", "0.5222523", "0.51442623", "0.51393044", "0.51302814", "0.51156414", "0.51085764", "0.51032466", "0.5079208", "0.5077464", "0.50700194", "0.50574875", "0.50526446", "0.50471735", "0.5045324", "0.50368947", "0.5036824", "0.5032134", "0.50248", "0.5023679", "0.50218683", "0.50210625", "0.5020051", "0.501931", "0.5016218", "0.5014028", "0.49974427", "0.49969304", "0.49968857", "0.49935612", "0.4982511", "0.49796215", "0.496585", "0.49589747", "0.4950621", "0.49483865", "0.49464062", "0.49405304", "0.49394563", "0.4937969", "0.4935972", "0.4934428", "0.49333033", "0.49314895", "0.4926103", "0.49235198", "0.49223343", "0.4921133", "0.4920683", "0.4920392", "0.49052975", "0.4904677", "0.4903472", "0.48995605", "0.48979735", "0.48955485", "0.48871773", "0.48820558", "0.48797303", "0.48791328", "0.48725748", "0.487113", "0.48626673", "0.48549598", "0.48524988", "0.485058", "0.4842148", "0.48420918", "0.48409975", "0.48205665", "0.4813363", "0.48094755", "0.48019153", "0.48000333", "0.47952458", "0.4786375", "0.4781508", "0.47806427", "0.47806427", "0.47806427", "0.47764155", "0.47640172" ]
0.72371405
0
check this option with user access
private function check_access_to_option(array $_option, int $_user_id) { $user_access_code = $this->check_user_access((int) $_user_id); if (!$user_access_code) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfwprapi_can_user_have_access( WP_REST_Request $request ) {\n return current_user_can( 'manage_options' );\n}", "function ShowOptionLink() {\n\t\tglobal $Security, $scholarship_package;\n\t\tif ($Security->IsLoggedIn()) {\n\t\t\tif (!$Security->IsAdmin()) {\n\t\t\t\treturn $Security->IsValidUserID($scholarship_package->group_id->CurrentValue);\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "function ShowOptionLink() {\n\t\tglobal $Security, $scholarship_package;\n\t\tif ($Security->IsLoggedIn()) {\n\t\t\tif (!$Security->IsAdmin()) {\n\t\t\t\treturn $Security->IsValidUserID($scholarship_package->group_id->CurrentValue);\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "protected function _checkPermission($options = array())\n {\n $viewer = MooCore::getInstance()->getViewer();\n if (!empty($viewer) && $viewer['Role']['is_admin']) {\n return true;\n }\n\n $cuser = $this->_getUser();\n $authorized = true;\n $hash = '';\n $return_url = '?redirect_url=' . base64_encode(FULL_BASE_URL.$this->request->here);\n\n //check normal subscription\n $this->options = $options;\n //$this->getEventManager()->dispatch(new CakeEvent('AppController.validNormalSubscription', $this));\n\n // check aco\n $check_aco = false;\n if (!empty($options['aco'])) {\n $acos = $this->_getUserRoleParams();\n\n if (!in_array($options['aco'], $acos)) {\n $authorized = false;\n $check_aco = true;\n $msg = __('Access denied');\n }\n } else if (!empty($options['user_block'])) {\n \tif ($cuser && !$cuser['Role']['is_admin'] && !$cuser['Role']['is_super'])\n \t{ \t\n\t $user_blocks = $this->getBlockedUsers($cuser['id']); \n\t if (in_array($options['user_block'], $user_blocks)) {\n\t $authorized = false;\n\t $msg = __('Access denied');\n\t $return_url = '';\n\t }\n \t}\n } else {\n // check login\n if (!$cuser) {\n $authorized = false;\n $msg = __('Please login or register');\n } else {\n // check role\n if (!empty($options['roles']) && !in_array($cuser['role_id'], $options['roles'])) {\n $authorized = false;\n $msg = __('Access denied');\n }\n\n // check admin\n if (!empty($options['admin']) && !$cuser['Role']['is_admin']) {\n $authorized = false;\n $msg = __('Access denied');\n }\n\n // check super admin\n if (!empty($options['super_admin']) && !$cuser['Role']['is_super']) {\n $authorized = false;\n $msg = __('Access denied');\n }\n\n\n // check approval\n if (Configure::read('core.approve_users') && !$cuser['approved']) {\n $authorized = false;\n $msg = __('Your account is pending approval.');\n }\n\n // check confirmation\n if (Configure::read('core.email_validation') && !empty($options['confirm']) && !$cuser['confirmed']) {\n $authorized = false;\n $msg = __('You have not confirmed your email address! Check your email (including junk folder) and click on the validation link to validate your email address');\n }\n\n // check owner\n if (!empty($options['admins']) && !in_array($cuser['id'],\n $options['admins']) && !$cuser['Role']['is_admin']\n ) {\n $authorized = false;\n $msg = __('Access denied');\n }\n \n //event check permission\n if ($authorized)\n {\n \t$msg = '';\n \t$cakeEvent = new CakeEvent('Controller.App.checkPermission', $this,array(\n \t\t\t'authorized' => &$authorized,\n \t\t\t'msg' => &$msg,\n \t\t\t'options' => $options\n \t));\n\t $this->getEventManager()->dispatch($cakeEvent);\n }\n }\n }\n\n if (!$authorized && empty($options['no_redirect'])) {\n if (empty($this->layout)) { \n $this->autoRender = false;\n echo $msg;\n } else {\n if ($this->request->is('ajax')) {\n $this->set(compact('msg'));\n if (!$check_aco)\n {\n echo $this->render('/Elements/error');\n }\n else\n {\n \techo $this->render('/Elements/error-role');\n }\n\n } else {\n \tif (!$check_aco)\n \t{\n if (!empty($msg)) {\n $this->Session->setFlash($msg, 'default', array('class' => 'error-message'));\n }\n\n $this->redirect('/pages/no-permission' . $return_url);\n }\n \telse\n \t{\n \t\t$this->redirect('/pages/no-permission-role' . $return_url);\n \t}\n }\n }\n exit;\n }\n }", "function admin()\n{\n return current_user_can('manage_options');\n}", "public function checkAccess()\n {\n // need to be modified for security\n }", "function checkTeamAccess() {\n global $nkAction;\n\n if ($nkAction['actionType'] == 'edit') {\n require_once 'Includes/nkForm.php';\n\n $dministratorList = nkForm_loadSelectOptions(array(\n 'optionsName' => array('User', 'administrator')\n ));\n\n if (! $dministratorList) {\n printNotification(__('NO_ADMIN'), 'error');\n return false;\n }\n\n $teamList = nkForm_loadSelectOptions(array(\n 'optionsName' => array('Team', 'team')\n ));\n\n if (! $teamList) {\n printNotification(__('NO_TEAM'), 'error');\n return false;\n }\n }\n\n return true;\n}", "public function has_access() { \n\n\t\tif (!Access::check('interface','25')) { \n\t\t\treturn false; \n\t\t} \n\t\tif ($this->user == $GLOBALS['user']->id) { \n\t\t\treturn true; \n\t\t} \n\t\telse {\n\t\t\treturn Access::check('interface','100'); \n\t\t} \t\n\n\t\treturn false; \n\n\t}", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }", "private function userHasAccess()\n {\n $required_perm = $this->route['perm'];\n $user_group = $_SESSION['user_group'];\n if ($required_perm == 'all') {\n return true;\n } elseif ($user_group == $required_perm) {\n return true;\n }\n return false;\n }", "public function check_access() {\n\n\t\tif (isset($this->current_entity_allowed)) {\n\t\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t\t}\n\n\t\t$this->current_entity_allowed = MKB_Options::option('restrict_on') ?\n\t\t\t(bool) $this->check_entity_access($this->get_current_entity()) :\n\t\t\ttrue; // always allowed if restriction is off\n\n\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t}", "protected function isPowerUser()\n {\n return $this->user->can('sys_properties_edit', $this->app->modules[$this->area]);\n }", "public function user_is_allowed()\n {\n //check if the record exist\n if (! $this->record) {\n $this->build_error('These record does not exist or it may not belong to you',404);\n }\n\n //check if the user is the owner of the entry\n if(!isOwner($this->record)) {\n $this->build_error('you are not the owner of this task');\n }\n\n //check if the incomming entries type is Array\n if (!is_array($this->request->entries)) {\n $this->build_error('Please the entries must be an Array');\n }\n }", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "function checkAccess() ;", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function check_insta_user() {\n \n }", "function check_user() {\n\treturn false; // update allowed\n\treturn true; //no update allowed\n}", "public function hasUsageRights() {}", "function storage_can_set($sv_user) {\n $allowed = ((api_is_platform_admin()) || ($sv_user == api_get_user_id()));\n if (!$allowed) {\n print \"ERROR : Not allowed\";\n }\n return $allowed;\n}", "protected function checkAccess() {\n\t\t$hasAccess = static::hasAccess();\n\n\t\tif (!$hasAccess) {\n\t\t\tilUtil::sendFailure($this->pl->txt(\"permission_denied\"), true);\n if (self::version()->is6()) {\n $this->ctrl->redirectByClass(ilDashboardGUI::class, 'jumpToSelectedItems');\n } else {\n\t\t\t$this->ctrl->redirectByClass(ilPersonalDesktopGUI::class, 'jumpToSelectedItems');\n\t\t\t}\n\t\t}\n\t}", "public function check_admin() {\n return current_user_can('administrator');\n }", "protected function verifyAccess($user){\n\t\treturn true; \n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function checkAdmin();", "function userAdmin(){\r\n if(userConnect() && $_SESSION['user']['privilege']==1) return TRUE; else return FALSE;\r\n }", "function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }", "public static function currentUserHasAccess() {\n return current_user_can('admin_access');\n }", "public function isAccess();", "static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }", "public static function has_admin_access() {\n\t\treturn current_user_can( 'manage_options' );\n\t}", "public static function show(){\n return Auth::check() && Auth::user()->isAdmin();\n }", "private function _validate_user() {\n\t\treturn (current_user_can(\"edit_posts\") && current_user_can(\"edit_pages\") && !empty($this->buttons));\n\t}", "public function batch_items_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "function is_user_option_local($key, $user_id = 0, $blog_id = 0)\n {\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function get_item_permissions_check( $request ) {\n\t\treturn current_user_can( 'manage_options' );\n\t}", "public function check_current_user_against_option($option_name) {\n\t\t$option_roles = MKB_SettingsBuilder::get_role(MKB_Options::option($option_name));\n\t\t$user_roles = $this->get_current_roles();\n\n\t\treturn $this->check_if_user_in_allowed_roles ($user_roles, $option_roles);\n\t}", "function _user_is_admin_user($key){ //GENHD-129 added flag in user form to allow access to acm and study inizialization to the user\n\t$retval = array();\n\t$bind = array();\n\t$bind['KEY'] = $key;\n\t$rs = db_query_bind(\"select ugu.userid, ugu.id_gruppou, ugu.abilitato from utenti_gruppiu ugu, gruppiu gu, ana_gruppiu agu, utenti_visteammin uva where gu.id_gruppou=agu.id_gruppou and ugu.id_gruppou=gu.id_gruppou and gu.abilitato=1 and upper(agu.nome_gruppo) in ('PROFILO AMMINISTRATORE','ACM_ADMIN') and uva.userid=ugu.userid and ugu.userid=:KEY\",$bind);\n\t//echo \"<b>select ugu.userid, ugu.id_gruppou, ugu.abilitato from utenti_gruppiu ugu, gruppiu gu, ana_gruppiu agu, utenti_visteammin uva where gu.id_gruppou=agu.id_gruppou and ugu.id_gruppou=gu.id_gruppou and gu.abilitato=1 and agu.nome_gruppo='Profilo amministratore' and uva.userid=ugu.userid and ugu.userid=\".$bind['KEY'].\"</b>\";\n\tif ($row = db_nextrow($rs)){\n\t\t$retval = $row;\n\t}\n\t// echo \"<pre>\";\n\t// print_r($retval);\n\t// echo \"</pre>\";\n\treturn $retval;\n}", "public function isAllowedForUser(){\n\t\treturn true;\n\t}", "public function checkPermission()\n\t{\n\t\tif ($this->User->isAdmin) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO\n\t}", "public function authorize() {\n\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( is_tax() || is_category() || is_tag() ) {\n\t\t\t$term_id = get_queried_object()->term_id;\n\n\t\t\tif ( empty ( $term_id ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$user = new User();\n\t\t\t$access_type = get_term_meta( $term_id, 'subway_membership_access_type', true );\n\t\t\t$allowed_user_roles = get_term_meta( $term_id, 'subway_membership_access_type_roles', true );\n\t\t\t$current_user_role = $user->get_role( get_current_user_id() );\n\n\t\t\tif ( 'private' === $access_type ) {\n\t\t\t\t// If no user role is found.\n\t\t\t\tif ( ! array_intersect( $allowed_user_roles, $current_user_role ) ) {\n\t\t\t\t\t$options = new Options();\n\t\t\t\t\t$login_page_url = $options->get_redirect_url();\n\t\t\t\t\twp_safe_redirect( $login_page_url, 302 );\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function authorize()\n // can access chef member who is 'logined' and 'chefprofile null === false'\n {\n $loginedUser = Auth::user();\n\n return $loginedUser->user_type === 'chef' && (\n\n is_null($loginedUser->chef) === false\n );\n }", "public function checkAdmin()\n {\n // there ..... need\n // END Check\n $auth = false;\n if($auth) {\n return true;\n }\n else{\n return false;\n }\n }", "public function authorize()\n\t{\n\t\treturn current_user()->hasValidCoffeeShop();\n\t}", "public function checkCLIuser() {}", "public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}", "public static function Allow_optin() {\n\t\tupdate_option( 'xlp_is_opted', 'yes', false );\n\n\t\t//try to push data for once\n\t\t$data = self::collect_data();\n\n\t\t//posting data to api\n\t\tXL_API::post_tracking_data( $data );\n\t}", "public function isAuthorize(){\n $userPlan = $this->request->session()->get('userPlan');\n return ($userPlan >= 1)? true : abort(404) ;\n }", "function go_get_access() {\n\t\n\t$current_user_id = get_current_user_id();\n\t\n\tif ( have_rows('teachers', 'options') ) {\n\t\t\n\t\twhile ( have_rows('teachers', 'options') ) {\n\t\t\n\t\t\tthe_row(); \n\t\t\t\n\t\t\t$user_id = get_sub_field('teacher');\n\t\t\t\t\t\t\n\t\t\tif ( $user_id == $current_user_id && get_sub_field('valid') ) {\n\t\t\t\t\n\t\t\t\treturn get_sub_field('access_code');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n}", "public function check_admin()\n {\n return current_user_can('administrator');\n }", "public function is_admin() {\n return $this->session->get(\"niveau_acces\") >= 2;\n }", "public function checkAllowed() {\r\n\t\t// if option is not active return true!\r\n\t\tif (Mage::getStoreConfig('b2bprofessional/generalsettings/activecustomers')) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$iUserStoreId\t\t= Mage::getSingleton('customer/session')->getCustomer()->getStore()->getGroupID();\r\n\t\t$iCurrentStoreId\t= Mage::app()->getStore()->getGroupID();\r\n\r\n\t\tif ($iUserStoreId == $iCurrentStoreId) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function form_dropship_privilege()\n {\n $dropship_auto = get_user_meta($this->user_id, 'topdrop_dropship_auto', true);\n $value = ($dropship_auto === 'yes') ? 1 : 0;\n\n return apply_filters('form_dropship_privilege', array(\n 'topdrop_privilege' =>\n array(\n 'field' => array(\n 'type' => 'checkbox',\n 'label' => __('Use dropship information ?', 'topdrop'),\n 'placeholder' => __('', 'topdrop'),\n 'required' => false,\n 'class' => array('input-checkbox', 'woocommerce-form-row', 'form-row-wide')\n ),\n 'value' => $value\n ),\n ));\n }", "public function isAuthorized($user) {\n if ($this->action === 'apply' || $this->action === 'saveProject'){\n if($user['role'] == 'student' || $user['role'] == 'staff'){\n return true; \n } \n }\n \n if ($this->action === 'applied' || $this->action === 'saved'){\n if($user['role'] == 'student' || $user['role'] == 'staff'){\n return true; \n }\n }\n \n if ($this->action === 'add' || $this->action === 'applicants') {\n if($user['role'] == 'research'){\n return true;\n }\n }\n \n if ($this->action === 'projects') {\n if($user['role'] == 'research'){\n return true;\n }\n }\n\n if (in_array($this->action, array('edit', 'delete'))) {\n $projectId = (int) $this->request->params['pass'][0];\n if ($this->Project->isOwnedBy($projectId, $user['id'])) {\n return true;\n }\n }\n\n return parent::isAuthorized($user);\n}", "public function isAuthorized($user){\n /*\n * \n 1 \tAdmin\n 2 \tOfficer / Manager\n 3 \tRead Only\n 4 \tStaff\n 5 \tUser / Operator\n 6 \tStudent\n 7 \tLimited\n */\n \n //managers can add / edit\n if (in_array($this->request->action, ['delete','add','edit','reorder'])) {\n if ($user['group_id'] <= 4) {\n return true;\n }\n }\n \n \n //Admins have all\n return parent::isAuthorized($user);\n }", "public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }", "function CheckShowAccess($item=array())\n {\n if (empty($item)) { return TRUE; }\n\n $res=$this->HasModuleAccess();\n \n if (preg_match('/^(Friend)$/',$this->Profile()))\n {\n if ($item[ \"Friend\" ]=$this->LoginData(\"ID\"))\n {\n $res=TRUE;\n }\n }\n\n return $res;\n }", "private function isAdminValencia() : bool\n {\n return $this->user->hasRole('admin-gv');\n }", "public function hasAccess()\n\t{\n\t\t/* Check Permissions */\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( 'core', 'members', 'member_edit' );\n\t}", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function checkAccess() {\n\t\t$conf = $GLOBALS['BE_USER']->getTSConfig('backendToolbarItem.tx_newsspaper_role.disabled');\n\t\treturn ($conf['value'] == 1 ? false : true);\n\t}", "function CheckLibraryAccess(){\n if ($this->listSettings->HasSection(\"ACCESS\")) {\n if ($this->listSettings->HasItem(\"ACCESS\", \"GROUPS\")) {\n $this->Page->access_id = explode(\",\", $this->listSettings->GetItem(\"ACCESS\", \"GROUPS\"));\n\n }\n if ($this->listSettings->HasItem(\"ACCESS\", \"USERS\")) {\n $this->Page->access_user_id = explode(\",\", $this->listSettings->GetItem(\"ACCESS\", \"USERS\"));\n }\n if ($this->listSettings->HasItem(\"ACCESS\", \"ROLES\")) {\n $this->Page->access_role_id = explode(\",\", $this->listSettings->GetItem(\"ACCESS\", \"ROLES\"));\n }\n\n $this->Page->Auth->isLogged();\n }\n }", "public function canUserAssignUsage()\n {\n $user = $this->getUser();\n\n return $user->isAdmin || \\in_array('tl_news::usage', $user->alexf, true);\n }", "function check_permission()\r\n {\r\n // Ensure the user logs in\r\n require_login($this->course->id);\r\n if (isguestuser()) error(get_string('noguestaccess', 'sloodle'));\r\n add_to_log($this->course->id, 'course', 'view sloodle data', '', \"{$this->course->id}\");\r\n\r\n // Ensure the user is allowed to update information on this course\r\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\r\n require_capability('moodle/course:update', $this->course_context);\r\n }", "public static function check ()\n {\n return (bool)self::$user;\n }", "function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 0)\n {\n global $ilUser, $ilAccess;\n\n if ($a_user_id == 0) {\n $a_user_id = $ilUser->getId();\n }\n\n switch ($a_permission) {\n case \"read\":\n /*if (!ilObjUFreibFeedbackAccess::checkOnline($a_obj_id) &&\n !$ilAccess->checkAccessOfUser($a_user_id, \"write\", \"\", $a_ref_id))\n {\n return false;\n }*/\n break;\n }\n\n return true;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function per_test(){\n if($_SESSION[C('N_ADMIN_AUTH_KEY')]['permission']!=1){\n echo \"<script>alert('你没有权限!');window.location.href='\" . __MODULE__ . \"/Admin/info.html';</script>\";\n exit;\n }\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_logistics/equipment');\n }", "public function get() {\n\t\treturn (bool) $this->user_options->get( static::OPTION );\n\t}", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "public function authorize()\n {\n return (Auth::user()->type === User::VENDEDOR);\n }", "private function checkAccess() {\n $this->permission('Garden.Import'); // This permission doesn't exist, so only users with Admin == '1' will succeed.\n \\Vanilla\\FeatureFlagHelper::ensureFeature(\n 'Import',\n t('Imports are not enabled.', 'Imports are not enabled. Set the config Feature.Import.Enabled = true to enable imports.')\n );\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('MagicToolbox_MagicZoomPlus::magiczoomplus_settings_edit');\n }", "private function wf_user_permission(){\n\t\t$current_user = wp_get_current_user();\n\t\t$user_ok = false;\n\t\tif ($current_user instanceof WP_User) {\n\t\t\tif (in_array('administrator', $current_user->roles) || in_array('shop_manager', $current_user->roles)) {\n\t\t\t\t$user_ok = true;\n\t\t\t}\n\t\t}\n\t\treturn $user_ok;\n\t}", "function user_can_access_admin_page()\n {\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function hasAccess()\n\t{\n\t\t/* Check Permissions */\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( \"core\",\"members\" );\n\t}", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "function verificarPermisos($permiso)\n{\n try\n {\n if (logged_user()->tipo != \"A\")\n {\n if (logged_user()->$permiso != 1)\n {\n echo \"No tiene permisos para esta accion\";\n die();\n } else\n {\n return true;\n }\n } else\n {\n return true;\n }\n } catch (Exception $ex)\n {\n Session::instance()->setFlash('ERROR: ' . $ex->getMessage());\n }\n}", "function AdminSecurityCheck(){\n\t\t$User = new User();\n\t\t$user = $this->session->userdata('Group');\n\t\tif ($user){\n\t\t\tif($user == 1){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function checkAccess($show_msg=true){\n\t\t$app = ModelLincko::getApp();\n\t\t$this->checkUser();\n\t\tif(!is_bool($this->accessibility)){\n\t\t\tif(Users::getModel($this->parent_id)){\n\t\t\t\t$this->accessibility = true;\n\t\t\t}\n\t\t}\n\t\treturn parent::checkAccess($show_msg);\n\t}", "private function setUser() {\n if (Request::has(\"include-user-read\") && Request::input(\"include-user-read\") === \"true\") { $permissionRead = 4; } else { $permissionRead = 0; }\n if (Request::has(\"include-user-write\") && Request::input(\"include-user-write\") === \"true\") { $permissionWrite = 2; } else { $permissionWrite = 0; }\n if (Request::has(\"include-user-execute\") && Request::input(\"include-user-execute\") === \"true\") { $permissionExecute = 1; } else { $permissionExecute = 0; }\n return $permissionRead + $permissionWrite + $permissionExecute;\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('magjah_dash/dash');\n }", "protected function Authorized(){\n // usuario\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return true;\n }\n \n // Autorizar la solicitud atendiendo a la activacion del usuario\n\t\t$uType = $this->getUserType();\n\t\t\n\t\tif ($uType >= USER_CLIENT){ // Ok user is active\n\t\t\t$res = DBHelper::Select('users', '*', \"email='{$this->user}'\");\n\t\t\t//if ((!$res[0]['name'] || !$res[0]['phone']) && $res[0]['expiration'] - time() >= 7 * 24 * 3600){\n\t\t\t//\t$this->url = Url::Parse(\n // \t\t\"http://\".HTTP_HOST.\"/__www/set-user-info.php?user={$this->user}&success_url=\" . urlencode((string)$this->data->url)\n \t//\t);\n\t\t\t//}\n\t\t}elseif(DBHelper::is_user_registered($this->user) > 0){ \n // La activacion del usuario ha expirado. Redirigir a\n // la pagina de recarga\n\t\t\t\n /** @var Url url */\n $url = $this->getUrlFromData();\n if (stripos($url->host, HTTP_HOST) === FALSE){\n\t\t\t $this->url = Url::Parse(ACCOUNT_EXPIRED_URL . \"&user={$this->user}&mobile={$this->data->mobile}&success_url=\". urlencode((string)$this->data->url));\n }\n\t\t}else {\n // Se permite acceso solamente al servidor de Aurora\n return FALSE;\n }\n \n return true;\n\t}", "public function authorize()\n {\n // todo: dominion selected, selected dominion in active round?\n return Auth::check();\n }" ]
[ "0.69238406", "0.6856634", "0.6856634", "0.68552583", "0.68281573", "0.6785348", "0.67772865", "0.6746185", "0.6704687", "0.6704687", "0.6680947", "0.6649449", "0.6633303", "0.6606926", "0.6598789", "0.657869", "0.657869", "0.657869", "0.6578102", "0.6578102", "0.6577317", "0.6577317", "0.6577317", "0.65513647", "0.65468985", "0.65468675", "0.65429336", "0.65292", "0.6519957", "0.6510665", "0.6499555", "0.64829487", "0.6478816", "0.6478816", "0.64539665", "0.64528733", "0.6451672", "0.6450117", "0.6445929", "0.6444151", "0.64388525", "0.64319116", "0.642775", "0.6415783", "0.64101076", "0.640306", "0.6370978", "0.6364782", "0.6364349", "0.6361824", "0.63572747", "0.63528335", "0.6348756", "0.63462716", "0.6343131", "0.6334934", "0.63325894", "0.6319992", "0.6316367", "0.63163114", "0.6314487", "0.6313562", "0.63133174", "0.629131", "0.62882715", "0.62828743", "0.6282546", "0.6282054", "0.6280413", "0.62795085", "0.6278057", "0.6272025", "0.6271553", "0.62628746", "0.6262388", "0.6257079", "0.6254474", "0.6235528", "0.62304914", "0.6228722", "0.6221335", "0.6220468", "0.621917", "0.6217496", "0.62172997", "0.6216358", "0.6209525", "0.6204021", "0.6201392", "0.6201096", "0.6201096", "0.6197944", "0.6186211", "0.61860883", "0.6184543", "0.6182909", "0.6180784", "0.6176494", "0.6176434", "0.6175959" ]
0.7292744
0
method to handle POST request by this url : ` a port to make exam
public function make_exam() { $inputs = $this->check_make_input(); // return json_encode($inputs); if (!is_array($inputs) || !$inputs) { $output["ok"] = false; $output["message"] = "inputs faild"; return json_encode($output); } $user_id = $this->un_token($_POST["token"]); if (!$user_id) { $output["ok"] = false; $output["message"] = "User undefined"; return json_encode($output); } if (!$this->check_access_to_option($inputs, (int) $user_id)) { $output["ok"] = false; $output["message"] = "access denied"; return json_encode($output); } $exam_generated = $this->exam_generator->new_exam($user_id, $inputs); return $exam_generated; if (!$exam_generated) $output["ok"] = true; $output["message"] = "ok"; $output["exam"] = $exam_generated; // return "HH"; return json_encode($output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function post();", "public function post();", "public function post();", "abstract public function post();", "public function post($request);", "public function showRequestPost();", "public function postExecution($request){}", "public function send_post_request(){\n $url = \\Request::get('url');\n $post_array = \\Request::all();\n\n//\t\t$url = 'http://localhost/_websites/ahmed-badawy.com/site/json-test';\n//\t\t$post_array = array('type' => 'scss', 'source' => '.pre{color:red;background-color:green;}', 'compress'=>true);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $query = curl_exec($ch);\n curl_close($ch);\n\n return $query;\n }", "public function testIndexActionPost()\n {\n $request = $this->di->get(\"request\");\n $request->setPost(\"ip\", \"8.8.8.8\");\n // var_dump($request);\n\n $res = $this->controller->indexActionPost();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"Kolla vädret\", $body);\n }", "function post_request($url, $port, $dataid, $tStamp, $encodedSignature, $data, $referer = '')\n {\n //$data = http_build_query($data);\n\n // parse the given URL\n $url = parse_url($url);\n\n if ($url['scheme'] != 'http') {\n die('Error: Only HTTP request are supported !');\n }\n\n // extract host and path:\n $host = $url['host'];\n $path = $url['path'];\n\n // open a socket connection on port 80 - timeout: 50 sec\n $fp = fsockopen($host, $port, $errno, $errstr, 50);\n\n if ($fp) {\n\n // send the request headers:\n fputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $host\\r\\n\");\n\n if ($referer != '')\n fputs($fp, \"Referer: $referer\\r\\n\");\n\n fputs($fp, \"x-cons-id: \" . $dataid . \"\\r\\n\");\n fputs($fp, \"x-timestamp: \" . $tStamp . \"\\r\\n\");\n fputs($fp, \"x-signature: \" . $encodedSignature . \"\\r\\n\");\n fputs($fp, \"Content-Type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \" . strlen($data) . \"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $data);\n\n $result = '';\n while (!feof($fp)) {\n // receive the results of the request, 128 char\n $result .= fgets($fp, 128);\n }\n } else {\n return array(\n 'status' => 'err',\n 'error' => \"$errstr ($errno)\"\n );\n }\n\n // close the socket connection:\n fclose($fp);\n\n // split the result header from the content\n $result = explode(\"\\r\\n\\r\\n\", $result, 2);\n $header = isset($result[0]) ? $result[0] : '';\n $content = isset($result[1]) ? $result[1] : '';\n\n // return as structured array:\n return array(\n 'status' => 'ok',\n 'header' => $header,\n 'content' => $content\n );\n\n }", "public function post($t);", "public function postAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "public function testPostDataHttpServer(): void\n {\n $this->post('/request_action/post_pass', ['title' => 'value']);\n $data = json_decode('' . $this->_response->getBody());\n $this->assertSame('value', $data->title);\n $this->assertHeader('X-Middleware', 'true');\n }", "public function post($name);", "public function testUpdateUrlUsingPOST()\n {\n }", "abstract public function post($data);", "public function testInsertUrlUsingPOST()\n {\n }", "function post(Request &$request, Response &$response);", "abstract public function post(Request $request);", "private function POST() {\n global $_POST;\n $postData = array();\n foreach($_POST as $key => $value) {\n $postData[$key] = $value;\n }\n $this -> response[\"response\"] = $postData;\n return;\n }", "public function post_post()\n\t{\n\t\ttry {\n\t\t\t$results = Articles::regist( self::$_JSON );\n\t\t\t//\\Log::warning(print_r($results, true));\n\n\t\t\treturn $this->response($results, 200);\n\t\t} catch (\\MarcoPandaException $e) {\n\t\t\t$this->error($e);\n\t\t}\n\t}", "public function testGetUrlsUsingPOST()\n {\n }", "public function post()\n {\n //\n }", "public function testLogUsingPOST()\n {\n\n }", "public function post($post);", "public function testIndexActionPostLocalIp()\n {\n $request = $this->di->get(\"request\");\n $request->setPost(\"ip\", \"10.0.0.1\");\n\n\n $res = $this->controller->indexActionPost();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"Ingen väderinformation tillgänglig\", $body);\n }", "public function testLogSimpleUsingPOST()\n {\n\n }", "function post_request($url, $param)\n{\n //リクエスト時のオプション指定\n $options = array(\n 'http' => array(\n 'method' => 'POST', //ここでPOSTを指定\n 'header' => array(\n 'Content-type: application/x-www-form-urlencoded',\n 'User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1'\n ),\n 'content' => http_build_query($param),\n 'ignore_errors' => true,\n 'protocol_version' => '1.1'\n ),\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false\n )\n );\n\n //リクエスト実行\n $contents = @file_get_contents($url, false, stream_context_create($options));\n\n //ステータスコード抜粋\n preg_match('/HTTP\\/1\\.[0|1|x] ([0-9]{3})/', $http_response_header[0], $matches);\n $statusCode = (int)$matches[1];\n\n //配列で返すためにjsonのエンコード\n $contents_array = array();\n if($statusCode === 200){\n $contents_array = json_decode($contents);\n }\n return $contents_array;\n}", "function post();", "public static function post($uri,$callback){\n static::add('POST',$uri,$callback);\n \n }", "function ManualPOST($url, $post) {\n // $url = 'http://edost.ru//edost_calc_kln.php';\n // $post = 'to_city=839&strah=17550&id=2387&p=vN4g7IgFKMSbpOMGSL9cW6S15YuxxnX5&weight=73.5&ln=51&wd=62&hg=116&zip=';\n $parse_url = parse_url($url);\n $path = $parse_url[\"path\"];\n\n $host = $parse_url[\"host\"];\n $rez = \"\";\n\n self::$NowErr = false;\n set_error_handler(array('edost_class', 'my_error_handler'));\n\n $fp = fsockopen($host, 80, $errno, $errstr, 4); //4 - ????. ????? ???????\n\n restore_error_handler();\n\n if ($errno == 13) {\n return ('Err14');\n } //??????: ????????? ??????? ?? ????????? ????????? ?????? ?? ??????\n if (self::$NowErr) {\n return ('');\n } //??????\n //Mage::log($post, null, 'edostlog.log');\n if ($fp) {\n $out = \"POST \" . $path . \" HTTP/1.0\\n\" . \"Host: \" . $host . \"\\n\" . \"Referer: \" . $url . \"\\n\" . \"Content-Type: application/x-www-form-urlencoded\\n\" . \"Content-Length: \" . strlen($post) . \"\\n\\n\" . $post . \"\\n\\n\";\n\n fputs($fp, $out);\n\n $q = 0;\n while ($gets = fgets($fp, 512)) {\n $rez .= $gets;\n $q++;\n }\n\n fclose($fp);\n\n $rez = stristr($rez, \"<?xml version=\"); //???????? ?????????\n }\n Mage::log($rez, true, 'edostlog.log');\n return ($rez);\n }", "function post_day($httpClient, $base_url, $day) {\r\n error_log('post_day to server: ' . $day);\r\n $url = $base_url . '/day/';\r\n $response = $httpClient->request('POST', $url,['json' => $day]); //guzzale part\r\n// $request = $httpClient->createRequest('POST', $url);\r\n// $request->setBody(Stream::factory('9'));\r\n// $response = $request->send();\r\n return $response;\r\n //echo $response; die();\r\n error_log('post_day to server: ' . $day);\r\n \r\n// $url = 'http://' . $base_url . '/day/';\r\n// $day1['day'] = $day;\r\n// //$response = $httpClient->request('POST', $url, ['json' => $day1]);\r\n// return $response;\r\n \r\n}", "function post_to_url($url, $data) {\n $fields = '';\n foreach ($data as $key => $value) {\n $fields .= $key . '=' . $value . '&';\n }\n rtrim($fields, '&');\n $post = curl_init();\n curl_setopt($post, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($post, CURLOPT_URL, $url);\n curl_setopt($post, CURLOPT_POST, count($data));\n curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\n curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\n $result = curl_exec($post); //result from mobile seva server \n return $result; //output from server displayed \n curl_close($post);\n}", "public function httpPost()\n {\n return $this->method(\"POST\");\n }", "public function testIndexAction() : void\n {\n $this->di->request->setPost(\"ip\", \"2002:c0a8:101::42\");\n\n $res = $this->controller->indexActionPost();\n $this->assertInternalType(\"array\", $res);\n\n list($json, $status) = $res;\n $this->assertEquals($json[\"valid\"], true);\n $this->assertEquals($status, 200);\n }", "public function postAction() {}", "public function testVerifyUsingPOST()\n {\n\n }", "public function controllerPOST($url) {\r\n\treturn $this->controller($url);\r\n }", "function ticketbud_http_post($request, $host, $path, $port = 80, $ip=null) {\n\tglobal $wp_version;\n\t\n\t$ticketbud_version = constant('TICKETBUD_VERSION');\n\n\t$http_request = \"POST $path HTTP/1.0\\r\\n\";\n\t$http_request .= \"Host: $host\\r\\n\";\n\t$http_request .= \"Content-Type: application/x-www-form-urlencoded; charset=\" . get_option('blog_charset') . \"\\r\\n\";\n\t$http_request .= \"Content-Length: \" . strlen($request) . \"\\r\\n\";\n\t$http_request .= \"User-Agent: WordPress/$wp_version | Ticketbud/$ticketbud_version\\r\\n\";\n\t$http_request .= \"\\r\\n\";\n\t$http_request .= $request;\n\t\n\t$http_host = $host;\n\t// use a specific IP if provided - needed by ticketbud_check_server_connectivity()\n\tif ( $ip && long2ip(ip2long($ip)) ) {\n\t\t$http_host = $ip;\n\t} else {\n\t\t$http_host = ticketbud_get_host($host);\n\t}\n\n\t$response = '';\n\tif( false != ( $fs = @fsockopen($http_host, $port, $errno, $errstr, 10) ) ) {\n\t\tfwrite($fs, $http_request);\n\n\t\twhile ( !feof($fs) )\n\t\t\t$response .= fgets($fs, 1160); // One TCP-IP packet\n\t\tfclose($fs);\n\t\t$response = explode(\"\\r\\n\\r\\n\", $response, 2);\n\t}\n\treturn $response;\n}", "private function POST($url,$params=false){\n return $this->Request($url,$params,HTTP_POST);\n }", "private function makeFakeData(){\n // URL = http://localhost/tweeter/test.php/stuff/morestuff/?id=15\n\n $_SERVER['SCRIPT_NAME'] = '/tweeter/test.php';\n $_SERVER['REQUEST_METHOD'] = 'GET';\n $_SERVER['PATH_INFO'] = '/stuff/morestuff/';\n $_GET['id'] = '15';\n $_POST['text'] = 'Un texte.';\n }", "private function postHop () {\n\t\t$this->result = curl_exec ( $this->ch );\n\t\tcurl_close ( $this->ch );\n\t}", "function post() \n {\n \n }", "function post () {\n //OU SALVA NO\n header(\"location: /\");\n }", "public function test_post() {\n\n }", "public function testRootPostMethod()\n {\n $response = $this->post(\n '/', [\n 'website' => 'http://example.com',\n 'max' => 1]\n );\n\n $response->assertStatus(200);\n $response->assertSee('http://example.com');\n }", "public function post($url, $path)\n\t{\n\t\t$path = str_replace('--', '/', $path);\n\t\t$data['url'] = $url . $path;\n\t\t$this->render($data, NULL, 'post');\n\t}", "public function post($request){\n\n global $db,$funky_db;\n\n $module = $request->url_elements[0];\n $http_method = $request->method;\n $http_params = $request->parameters;\n\n switch ($action){\n\n case 'add':\n\n $error = \"\";\n\n if (!$error){\n\n $response = null;\n\n } else {# is array\n\n return null;\n $response = null;\n\n } \n\n break; # auth case action\n\n } # switch action\n\n return $response;\n\n }", "public function indexActionPost() : object\n {\n $title = \"IP Check tool: result\";\n\n $request = $this->di->get(\"request\");\n $page = $this->di->get(\"page\");\n\n $ipaddr = $request->getPost(\"ip\");\n $isValid = \"\";\n $domain = \"\";\n\n if (filter_var($ipaddr, FILTER_VALIDATE_IP)) {\n $isValid = \"valid\";\n $domain = gethostbyaddr($ipaddr);\n } else {\n $isValid = \"invalid\";\n }\n\n $page->add(\"ip/result\", [\n \"ip\" => $ipaddr,\n \"valid\" => $isValid,\n \"domain\" => $domain\n ]);\n\n return $page->render([\n \"title\" => $title,\n ]);\n }", "public function testGetAutomatchUrlsUsingPOST()\n {\n }", "public function post($url, $body){\n\t\t\n\t\t// do we even need this?\n\t\t// $headers = array('Content-Type: application/x-www-form-urlencoded')\n\t\t\n\t\treturn $this->doRequest('POST', $url, $body);\n }", "public function addPost(){\n $ourResponse=Http::post('https://reqres.in/api/users',[\n // Send below data into above post api url as\n 'name'=>'Sonam',\n 'job'=>'Designer',\n ]);\n // DD the response to check it is done or not\n dd($ourResponse->json());\n }", "function doPOST (HttpRequest $request, HttpResponse $response) {\n throw new Exception(\"POST method not supported\");\n }", "private function post (string $url)\r\n\t{\r\n\t\ttry {\t\t\t\t \r\n\t\t\t\t\r\n\t\t\t$handle = curl_init();\t\t\t\r\n\t\t\tcurl_setopt_array($handle, array(\r\n\t\t\t\tCURLOPT_URL => $url,\r\n\t\t\t\tCURLOPT_CONNECTTIMEOUT => 5,\r\n\t\t\t\tCURLOPT_TIMEOUT => 60,\r\n\t\t\t\tCURLOPT_RETURNTRANSFER => true,\r\n\t\t\t\tCURLOPT_POST => true,\r\n\t\t\t\tCURLOPT_POSTFIELDS => $this->paramUrl\r\n\t\t\t\t));\t\t\r\n\t\t\t//curl_setopt($ch, CURLOPT_ENCODING ,\"\");\r\n\t\t\t//curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded; charset=UTF-8'));\r\n\t\t\t\r\n\t\t\t$response = curl_exec($handle);\t\t\r\n\t\t\t$resp = json_decode($response);\t\t\t\r\n\t\t\tif ($resp['ok'] == false)\r\n\t\t\t\tthrow new \\Exception($resp['description']);\t\t\t\r\n\t\t\t\r\n\t\t} catch ( \\Exception $e) {\r\n\t\t\t$Logger = new \\Logger('TelegramMain.txt');\r\n\t\t\t$Logger -> log($response, $url.$this->paramUrl);\r\n\t\t}finally{\t\t\t\r\n\t\t\tcurl_close($handle);\t\t\r\n\t\t\treturn $response;\t\t\t\r\n\t\t}\r\n\r\n\t}", "public function post($url, $body = array(), $query = array(), $headers = array());", "public function testPostHospital(){\r\n\t\t$this->http = new Client(['base_uri' => 'http://localhost/casecheckapp/public/index.php/']);\r\n\t\t\r\n\t\t//Test array\r\n\t\t$inputdata = ['json' => [\r\n 'name' => 'Hospital added',\r\n 'city' => 'Chicago',\r\n 'state' => 'IL',\r\n\t\t'address' =>'22 Random St']\r\n\t\t];\r\n\r\n\t\t//Test HTTP status ok\r\n\t\t$response= $this->http->post('api/v1/hospital',$inputdata);\r\n\t\t$this->assertEquals(200,$response->getStatusCode());\r\n\r\n\t\t//Stopping the connexion with Guzzle\r\n\t\t$this->http = null;\r\n\t\t\r\n\t}", "function convertByPOST($url, $data, $table_no=1) {\n if(isValidUrl($url)){\n $html = do_post_request($url, http_build_query($data));\n $this->getArray($html, $table_no);\n } else {\n echo \"Url is not valid\";\n }\n return $this->arr;\n }", "public function testLogAuthActionUsingPOST()\n {\n\n }", "public static function do_post_request($url, $request_body, $port = false, &$optional_headers = null) {\n $ch = curl_init($url);\n if ($port !== false) {\n curl_setopt($ch, CURLOPT_PORT, $port);\n }\n curl_setopt($ch, CURLOPT_USERAGENT,\n \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36\");\n\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request_body);\n\n $has_headers = !empty($optional_headers);\n curl_setopt($ch, CURLOPT_HEADER, $has_headers);\n if ($has_headers) {\n $hasCL = false;\n foreach ($optional_headers as $index => $header) {\n if (substr($header, 0, 15) == 'Content-Length:') {\n $hasCL = true;\n break;\n }\n }\n if (!$hasCL) {\n $cl = strlen($request_body);\n $optional_headers[] = \"Content-Length: $cl\";\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, $optional_headers);\n }\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n $result = curl_exec($ch);\n if (false === $result) {\n $errno = curl_errno($ch);\n $error = curl_error($ch);\n static::debugError($url, $optional_headers, $request_body, \"$errno: $error\");\n return 'Erreur :\\n' . $error;\n }\n curl_close($ch);\n\n return $result;\n }", "public function testIndexActionPostBadIp()\n {\n $request = $this->di->get(\"request\");\n $request->setPost(\"ip\", \"8.8.8.8.8\");\n // var_dump($request);\n\n $res = $this->controller->indexActionPost();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"is not a valid IP\", $body);\n }", "public function post()\n {\n $postId = $this->request->getParameter(\"id\"); /* le parametre disparait lors de l'annonce de \"public function post($postId)\". On l'annonce\n du coup en début de la méthode en faisant appel à la méthode getParameter de la class Request */\n $post = $this->post->getPost($postId); // va chercher la méthode GetPost($postId) dans le Model Post.php l.33\n $this->buildView(array('post' => $post));\n }", "public function testPostRequestShouldTriggerPostAction()\n\t{\n\t\t$this->request->setMethod('POST');\n\t\t$this->dispatch('/api/event');\n\t\t\n\t\t$this->assertModule('api');\n\t\t$this->assertController('event');\n\t\t$this->assertAction('post');\n\t}", "public function post($url, array $data = [], $port = null, $formData = false) {\n\t\t\treturn $this->_request($url, $port, [\n\t\t\t\tCURLOPT_POST => true,\n\t\t\t\tCURLOPT_POSTFIELDS => ($formData)? $data : http_build_query($data)\n\t\t\t]);\n\t\t}", "public function request_post($uri, array $options = array()) {\n $options['method'] = 'POST';\n return $this->request($uri, $options);\n }", "public function testGetMeasurementsUsingPOST()\n {\n }", "function post($key)\n{\n\treturn System::request()->post($key);\n}", "public function post(string $url, array $input = [], $headers = null);", "public function httpPost($redirectTo = null) : string;", "public function postAction()\n {\n \n }", "public function testIndexActionPostIp()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n unset($_GET[\"ip\"]);\n\n $_POST[\"ip\"] = \"74.6.231.20\";\n\n // Test the controller action\n $res = $controller->indexActionPost();\n $this->assertEquals(\"40.73139190673828\", $res[0][\"location\"][\"lat\"]);\n }", "public function postAction() {\n\n }", "function handlePOSTRequest() {\n if (connectToDB()) {\n if (array_key_exists('resetTablesRequest', $_POST)) {\n handleResetRequest();\n } else if (array_key_exists('updateQueryRequest', $_POST)) {\n handleUpdateRequest();\n } else if (array_key_exists('insertQueryRequest', $_POST)) {\n handleInsertRequest();\n } \n else if (array_key_exists('avgAgeQueryRequest', $_POST)) {\n //console_log(\"hello\");\n handleAvgAgeRequest();\n //echo \"Average age is 0\";\n } \n\n disconnectFromDB();\n }\n }", "public function postTap()\n {\n //si la peticion es ajax\n if ( Request::ajax() ) {\n $amp = Input::get('amplificador');\n $troba = Input::get('troba');\n $nodo = Input::get('nodo');\n $tap = DigTroba::getTap($amp, $troba, $nodo);\n return Response::json(array('rst'=>1,'datos'=>$tap));\n }\n }", "public function testIndexActionPostNoIp()\n {\n $request = $this->di->get(\"request\");\n $request->setPost(\"ip\", \"\");\n\n\n $res = $this->controller->indexActionPost();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertNotContains(\"is not a valid IP\", $body);\n }", "function post($uri, $action)\n {\n return Route::post($uri, $action);\n }", "public static function any($uri,$callback){\n static::add('POST',$uri,$callback);\n \n }", "public function testThatPostRoutesGiveResponse()\n {\n //Testing if the GET api route returns status 200\n $appURL = env('APP_URL');\n\n $url = '/api/account/balance';\n\n echo PHP_EOL;\n $response = $this->get($url);\n if((int)$response->status() !== 200){\n echo $appURL . $url . '(FAILED) did not return status 200';\n $this->assertFalse(false);\n }else{\n echo $appURL.$url.'(SUCCESS)';\n $this->assertTrue(true);\n }\n echo PHP_EOL;\n }", "function request_post_api($url=\"\",$post=\"\") {\n\tif(empty($url))\n\t\treturn false;\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL,$url);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\tif($post){\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); \t\t\n\t}\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $response;\n}", "function new_post($request,$url) {\n ##Data Post\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n return curl_exec($ch);\n}", "public function indexActionPost() : object\n {\n // Deal with the action and return a response.\n // return __METHOD__ . \", \\$db is {$this->db}\";\n $page = $this->di->get(\"page\");\n $title = \"IP Validation\";\n $ip = $this->di->request->getPost(\"ip\");\n $doGeo = $this->di->request->getPost(\"doGeo\");\n // $result = \"Not valid\";\n // $pattern = \"((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))\";\n\n\n\n if ($doGeo) {\n // $module = new IpModule();\n $module = new \\Jiad\\Modules\\GeoTag();\n\n // $info = $module->getGeoInfo($ip);\n $info = $module->getGeoInfo($ip);\n }\n\n $data = [\n \"info\" => $info,\n // \"result\" => $result,\n // \"hostname\" => $hostname\n ];\n\n $page->add(\"ip/geoResult\", $data);\n\n return $page->render([\n \"title\" => $title\n ]);\n }", "public function testGetAllPost()\n {\n $this->visit('/post');\n $this->seeHeader('content-type', 'application/json');\n $this->seeStatusCode(200);\n \n }", "function make_post_call($mid_url, $post_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($post_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }", "function post($url,$fields){\n curl_setopt($this-> ch,CURLOPT_POST,1);\n curl_setopt($this-> ch,CURLOPT_POSTFIELDS,$fields);\n curl_setopt($this-> ch,CURLOPT_URL,$url);\n curl_setopt($this-> ch,CURLOPT_COOKIE, COOKIE_FILE); \n curl_setopt($this-> ch,CURLOPT_FOLLOWLOCATION,true);\n // 返回跳转后的页面 如果只提交表单,则返回1表示成功\n return $this-> html = curl_exec($this-> ch);\n }", "public function post($path, $action)\n {\n echo $this->run($path, $action, 'post');\n }", "public function _post($url = null, array $parameters = []);", "function web_hook_post($url, $fields) {\n // url-ify the data for the POST\n foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }\n rtrim($fields_string,'&');\n\n //open connection\n $ch = curl_init();\n\n //set the url, number of POST vars, POST data\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_POST,count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);\n\n //execute post\n $result = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n return ($result);\n}", "public function testLogStandardActionUsingPOST()\n {\n\n }", "public function handle($postData){\r\n\t\t\r\n\t}", "function post($url, $args = array()) {\n\t\t$defaults = array('method' => 'POST');\n\t\t$r = array_merge( $defaults, $args );\n\t\treturn $this->request($url, $r);\n\t}", "function post_to_url($url, $data) {\r\n\t\t$fields = '';\r\n\t\tforeach($data as $key => $value) {\r\n\t\t\t$fields .= $key . '=' . $value . '&';\r\n\t\t}\r\n \r\n\t\trtrim($fields, '&');\r\n\t\t$post = curl_init();\r\n \r\n\t\t curl_setopt($post, CURLOPT_URL, $url);\r\n\t\t curl_setopt($post, CURLOPT_POST, count($data));\r\n\t\t curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\r\n\t\t curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t $result = curl_exec($post);\r\n\t\t curl_close($post);\r\n\t}", "public function doPost(array $parsed_body);", "public function post($location, $body);", "public function post(array $parameters);", "public function post(array $parameters);", "public function post(array $parameters);", "public function postAction() {\n $form = new Application_Form_Serie();\n $form->setAction($this->view->url($this->_request->getParams(), \"serie-post\"));\n\n $sample = $this->findRowById($this->_request->getParam(\"sample_id\"), \"Samples\");\n\n // kontrola, jestli byl formular odeslan a zda jsou data validni\n if ($this->_request->isPost() && $form->isValid($this->_request->getParams())) {\n // data jsou validni - vytvoreni nove serie snimku\n $tableSeries = new Application_Model_Series();\n \n $serie = $tableSeries->createRow($form->getValues(true));\n $serie->sample_id = $sample->sample_id;\n $serie->user_id = Zend_Auth::getInstance()->getIdentity()->user_id;\n $serie->save();\n \n $this->view->serie = $serie;\n $this->view->sample = $sample;\n }\n \n $this->view->form = $form;\n }", "public function login_post(){\n\t\t$data=($_POST);\n\n\t\t$result = $this->login_model->login($data);\n\t\treturn $this->response($result);\t\t\t\n\t}", "public function Post( $sUrl, array $aFields );", "public function submit_survey_post()\n\t\t{\n\t\t\t$testId = $this->post('testId');\n\t\t\t$uuid = $this->post('uuid');\n\t\t\t$weekSend = $this->post('weekSend');\n\t\t\tif(!empty($testId) &&\n\t\t\t\t!empty($uuid) &&\n\t\t\t\t!empty($weekSend)\n\t\t\t)\n\t\t\t{\n\t\t\t\t$insertData = array(\n\t\t\t\t\t'ts_uuid' => $uuid,\n\t\t\t\t\t'ts_test_id' => $testId,\n\t\t\t\t\t'ts_week' => $weekSend,\n\t\t\t\t\t'ts_submitted_on' => date('Y-m-d H:i:s')\n\t\t\t\t);\n\t\t\t\t$tempStatus = $this->Student_survey_model->insertSurvey($insertData);\n\t\t\t\tif($tempStatus)\n\t\t\t\t{\n\t\t\t\t\t$data['status'] = $this->lang->line('SUCCESS');\n\t\t\t\t\t$data['message'] = $this->lang->line('VALID_TOKEN_MESSAGE');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$data['status'] = $this->lang->line('FAIL');\n\t\t\t\t\t$data['message'] = $this->lang->line('unable_save_answer');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['status'] = $this->lang->line('FAIL');\n\t\t\t\t$data['message'] = $this->lang->line('please_pass_required');\n\t\t\t}\n\t\t\t$this->response($data , 200);\n\t\t}", "public function postAction()\n {\n }", "public function postTest() {}" ]
[ "0.66200054", "0.66200054", "0.66200054", "0.63103646", "0.6034313", "0.6015357", "0.5950398", "0.5944929", "0.5926361", "0.58678615", "0.5860324", "0.5859709", "0.5843806", "0.58269614", "0.5826866", "0.57943285", "0.57864684", "0.57840264", "0.5766605", "0.5745648", "0.5736922", "0.5713538", "0.56919146", "0.5682739", "0.56787175", "0.5653478", "0.5650276", "0.5630226", "0.5628088", "0.5618817", "0.561368", "0.5597365", "0.5595759", "0.5582875", "0.55756956", "0.5542748", "0.5538235", "0.5527944", "0.5520883", "0.55040795", "0.54929173", "0.549131", "0.54739773", "0.54698855", "0.5462015", "0.5456537", "0.54560137", "0.5426533", "0.54171956", "0.5412106", "0.5406643", "0.5400329", "0.5397372", "0.53945744", "0.5391506", "0.5378144", "0.5375806", "0.5371796", "0.53566647", "0.53376186", "0.53366065", "0.53315544", "0.53274393", "0.53243977", "0.53213495", "0.5319072", "0.53151715", "0.53128827", "0.5307938", "0.5302493", "0.5294887", "0.5289605", "0.52864885", "0.5286077", "0.52714205", "0.5262902", "0.5262604", "0.5249943", "0.52458173", "0.5244645", "0.52401245", "0.5238474", "0.5233", "0.52267814", "0.52167946", "0.5215917", "0.52156293", "0.5206382", "0.5202797", "0.51940733", "0.51940423", "0.5185296", "0.51799834", "0.51799834", "0.51799834", "0.51796716", "0.51775557", "0.5175582", "0.5175374", "0.5166338", "0.5162403" ]
0.0
-1
check and return this inputs from $_POST token [string] exma_id [int] corrects [JSON/array] wrongs [JSON/array] emptys [JSON/array]
private function check_finish_inputs() { $output = []; if (!isset($_POST["token"]) || !isset($_POST["exam_id"]) || !isset($_POST["corrects"]) || !isset($_POST["wrongs"]) || !isset($_POST["emptys"])) return false; if (empty($_POST["token"]) || empty($_POST["exam_id"]) || empty($_POST["corrects"]) || empty($_POST["wrongs"]) || empty($_POST["emptys"])) return false; $output = [ (string) "token" => $_POST["token"], (int) "exam_id" => $_POST["exma_id"], (array) "corrects" => json_decode($_POST["corrects"]), (array) "wrongs" => json_decode($_POST["wrongs"]), (array) "emptys" => json_decode($_POST["emptys"]), ]; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function check_make_input()\n {\n $output = [];\n\n if (!isset($_POST['token']) || !isset($_POST['new_only']) || !isset($_POST['emptys']) || !isset($_POST['wrongs']) || !isset($_POST['answer_result']) || !isset($_POST['random']) || !isset($_POST['length']) || !isset($_POST['category']))\n return false;\n\n if (empty($_POST['token']) || empty($_POST['new_only']) || empty($_POST['emptys']) || empty($_POST['wrongs']) || empty($_POST['answer_result']) || empty($_POST['random']) || empty($_POST['length']))\n return false;\n\n $output = [\n \"token\" => (string) $_POST[\"token\"],\n \"new_only\" => (bool) $_POST[\"new_only\"],\n \"emptys\" => (bool) $_POST[\"emptys\"],\n \"wrongs\" => (bool) $_POST[\"wrongs\"],\n \"answer_result\" => (bool) $_POST[\"answer_result\"],\n \"random\" => (bool) $_POST[\"random\"],\n \"length\" => (int) $_POST[\"length\"],\n \"category\" => (array) json_decode($_POST[\"category\"]),\n ];\n return $output;\n }", "function check_extract($POST_param_name, $success_variable_name, $function_name) {\n\t\tif (empty($_POST[\"$POST_param_name\"])) {\n\t\t\t$return_arr = array(\n\t\t\t\t'success' => '0',\n\t\t\t\t'fail_reason' => \"'$POST_param_name' field is required\");\n\t\t\techo json_encode($return_arr);\n\t\t\tdie();\t\t\n\t\t} else {\n\t\t\t$GLOBALS[\"$success_variable_name\"] = test_input($_POST[\"$POST_param_name\"]);\n\t\t}\n\t}", "function check_extract($POST_param_name, $success_variable_name, $function_name) {\n\t\tif (empty($_POST[\"$POST_param_name\"])) {\n\t\t\t$return_arr = array(\n\t\t\t\t'success' => '0',\n\t\t\t\t'fail_reason' => \"'$POST_param_name' field is required\");\n\t\t\techo json_encode($return_arr);\n\t\t\tdie();\t\t\n\t\t} else {\n\t\t\t$GLOBALS[\"$success_variable_name\"] = test_input($_POST[\"$POST_param_name\"]);\n\t\t}\n\t}", "function check_extract($POST_param_name, $success_variable_name, $function_name) {\n\t\tif (empty($_POST[\"$POST_param_name\"])) {\n\t\t\t$return_arr = array(\n\t\t\t\t'success' => '0',\n\t\t\t\t'fail_reason' => \"'$POST_param_name' field is required\");\n\t\t\techo json_encode($return_arr);\n\t\t\tdie();\t\t\n\t\t} else {\n\t\t\t$GLOBALS[\"$success_variable_name\"] = test_input($_POST[\"$POST_param_name\"]);\n\t\t}\n\t}", "private function validarPUT(){\n parse_str(file_get_contents(\"php://input\"),$post_vars);\n $IO = ValidacaoIO::getInstance();\n $es = array();\n $ps = array();\n \n # Criando variáveis dinamicamente, e removendo possiveis tags HTML, espaços em branco e valores nulos:\n foreach ($post_vars as $atributo => $valor){\n \t $ps[$atributo] = trim(strip_tags($valor));\n \t$es = $IO->validarConsisten($es, $valor);\n }\n \n # Verificando a quantidade de parametros enviados:\n $es = $IO->validarQuantParam($es, $ps, 5);\n \n # Validar status fornecido:\n $es = $IO->validarStatusAnuncio($es, $ps['status']);\n \n # Validar codigo de anuncio fornecido:\n $prestadorBPO = unserialize($_SESSION['objetoUsuario']);\n // $es = $IO->validarAnuncio($es, $ps['codigoAnuncio']);\n \n $es = $IO->validarDonoAnuncio($es, $prestadorBPO->getCodigoUsuario(), $ps['codigoAnuncio']);\n \n # Se existir algum erro, mostra o erro\n $es ? $IO->retornar400($es) : $this->retornar200($ps);\n }", "function test_input() :array\n{\n if (count($_POST) > 0) {\n {\n if (isset($_POST['id'])){\n $winner['id'] = $_POST['id'];\n }\n $winner['prize_year'] = validate_input($_POST['prize_year']);\n $winner['author_name'] = validate_input($_POST['author_name']);\n $winner['book_name'] = validate_input($_POST['book_name']);\n $winner['author_nationality'] = validate_input($_POST['author_nationality']);\n return $winner;\n }\n } return [];\n}", "function validateInterkassaResp($post_in)\n{\n\t$key_to_sort = $post_in;\n\t$ik_co_id = $key_to_sort['ik_co_id'];\n\t$ik_sign = $key_to_sort['ik_sign'];\n\t$ik_am = $key_to_sort['ik_am'];\n\t$ik_inv_st = $key_to_sort['ik_inv_st'];\n\n\t// Forming a digital signature\n\tunset($key_to_sort['ik_sign']);\n\tksort($key_to_sort, SORT_STRING);\n\n\t// Add to the array \"secret key\"\n\tarray_push($key_to_sort, 'XRZxzNbDsQYzsWm2');\n\n\t// Concatenate values ​​by a \":\"\n\t$signString = implode(':', $key_to_sort);\n\n\t// Take the MD5 hash in binary form by\n\t$sign = base64_encode(md5($signString, true));\n\n\t// Validate kassa results\n\tif(\n\t\t$ik_co_id == '5370b755bf4efccb31ad6f90' AND \n\t\t$ik_inv_st == 'success' AND \n\t\t$ik_sign == $sign\n\t)\n\t{\n\t\treturn $ik_am;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "private function _validate()\n {\n $data = array();\n $data['error_string'] = array();\n $data['inputerror'] = array();\n $data['status'] = TRUE;\n\n //merubah form yang di post menjadi array asosiatif\n $jumlahField = array(\n 'nomor_part' => $this->input->post('nomor_part'),\n 'nama_part' => $this->input->post('nama_part'),\n 'qty' => $this->input->post('qty'),\n 'harga_jual' => $this->input->post('harga_jual'),\n 'harga_beli' => $this->input->post('harga_beli'),\n );\n\n //menguraikan array jumlahField\n foreach ($jumlahField as $key => $value):\n if ($value == \"\")://kondisi untuk mengecek jika value atau inputan ada yang kosong\n $data['inputerror'][] = $key;\n $data['error_string'][] = str_replace(\"_\", \" \", $key).' tidak boleh kosong';\n $data['status'] = FALSE;\n endif;\n endforeach;\n\n if($data['status'] === FALSE):\n echo json_encode($data);\n exit();\n endif;\n }", "public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}", "public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}", "function _pre_token_validation($input) {\n\n if (ENV !== 'dev') {\n //add your own validation code here!\n echo 'Forbidden (no validation tests available)';\n http_response_code(403);\n die();\n }\n\n if (!isset($input['user_id'])) {\n http_response_code(400);\n echo 'No user_id submitted!';\n die();\n } elseif(!is_numeric($input['user_id'])) {\n http_response_code(400);\n echo 'Non-numeric user_id submitted!';\n die();\n }\n\n return $input;\n }", "private function checkData() {\n if(!isset(\n $_POST['code'],\n $_POST['field']\n )) {\n print json_encode(array(\n 'status'=>'error',\n 'msg'=>'wrong request'\n ));\n exit;\n }\n\n if($_POST['field']==='email') {\n $field = 'email';\n }\n elseif($_POST['field']==='phone') {\n $field = 'cellphone';\n }\n else {\n print json_encode(array(\n 'status'=>'error',\n 'msg'=>'wrong field'\n ));\n exit;\n }\n\n $code=trim($_POST['code']);\n\n $user_id=$this->uSes->get_val('user_id');\n if (isset(\n $_SESSION['uAuth']['profile_update_bg']['change'.$field]['code'],\n $_SESSION['uAuth']['profile_update_bg']['change'.$field]['timestamp'],\n $_SESSION['uAuth']['profile_update_bg']['change'.$field]['password'],\n $_SESSION['uAuth']['profile_update_bg']['change'.$field][$field]\n )) {\n if($field==='cellphone'&&!(int)$this->uFunc->getConf('use MAD SMS to send SMS','content',false)) {\n print json_encode(array(\n 'status'=>'error',\n 'msg'=>'sms send is not supported'\n ));\n exit;\n }\n\n if($_SESSION['uAuth']['profile_update_bg']['change'.$field]['timestamp']<(time()-300)) {//5min\n print json_encode(array(\n 'status'=>'error',\n 'msg'=>'code is expired'\n ));\n exit;\n }\n if($_SESSION['uAuth']['profile_update_bg']['change'.$field]['code']!==$code) {\n print json_encode(array(\n 'status'=>'error',\n 'msg'=>'wrong code'\n ));\n exit;\n }\n\n $password=$_SESSION['uAuth']['profile_update_bg']['change'.$field]['password'];\n\n $value=$_SESSION['uAuth']['profile_update_bg']['change'.$field][$field];\n\n $this->updateEmailOrPhone($user_id,$field,$value,$password);\n\n unset($_SESSION['uAuth']['profile_update_bg']['change'.$field]);\n\n return $value;\n }\n\n print json_encode([\n 'status'=>'error',\n 'msg'=>'code is expired'\n ]);\n exit;\n }", "function validar_vale() {\n $validaciones = [];\n\n // Reviso si el GET tiene algo\n if(!empty($_GET)){\n if(empty($_GET['turno'])){\n $validaciones['turno'] = 'El campo turno es requerido';\n }\n\n if(empty($_GET['idsupervisor'])){\n $validaciones['idsupervisor'] = 'El campo idsupervisor es requerido' ;\n }\n\n if(empty($_GET['supervisor'])){\n $validaciones['supervisor'] = 'El campo supervisor es requerido' ;\n }\n\n if (count($_GET['detalle']) === 0){\n $validaciones['detalle'] = 'debe Llenar los Campos Necesarios para Continuar' ;\n }else{\n foreach($_GET['detalle'] as $item){\n foreach($item as $key => $value){\n //echo $key; // Nombre de la variable(nom, des, rut, etc)\n //echo $value; // Su valor\n if(empty ($value)){\n $validaciones['detalle'] = $key.' Tiene un Valor vacio,debe Llenar los Campos Necesarios para Continuar' ;\n break 2;\n }\n }\n }\n }\n\n if (isset($_GET['detallecomprado'])){\n if (count($_GET['detallecomprado']) === 0 && trim ($_GET['tipo']) === \"COMPRADO\" ){\n $validaciones['detallecomprado'] = 'debe Selecionar al Menos una Entrada' ;\n }\n }\n\n if (count($validaciones) === 0){\n $validaciones['id_vale'] = guardar_vale() ;\n }else{\n $validaciones['id_vale'] = 0 ;\n\n }\n\n //header('Content-Type: application/json');\n echo json_encode([\n 'response' => count($validaciones) === 0,\n 'errors' => $validaciones\n ],JSON_UNESCAPED_UNICODE);\n\n }\n}", "public function validarLotesxEstado(){\n log_message('INFO','#TRAZA | #TRAZ-PROD-TRAZASOFT | Etapa | validarLotesxEstado() ');\n $etap_id=$this->input->post('etap_id');\n\t\t$aux= $this->Etapas->validarLotesxEstado($etap_id)->lotes->lote;\n if(!empty($aux)){\n $i=0;\n while(($aux[$i]->estado !== 'finalizado') && $i < count($aux)){\n $i++;\n }\n if($i <= count($aux)){\n echo json_encode(array(\"status\" => false,\"msj\" => \"Error, la etapa tiene Lotes asociado\"));\n }else{\n $aux['status'] = true;\n echo json_encode($aux);\n }\n }else{\n echo json_encode(array(\"status\" => true,\"msj\" => \"Se elimino la etapa que no posee lotes\"));\n }\n }", "private function validateData ($data){\n if(isset($data[\"nombres\"]) && !preg_match('/^[a-zA-ZáéíóúÁÉÍÓÚñÑ ]+$/',$data[\"nombres\"])){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, no se permiten numeros en el nombre del usuario\");\n print json_encode($json, true);\n return false;\n }\n if(isset($data[\"apellidos\"]) && !preg_match('/^[a-zA-ZáéíóúÁÉÍÓÚñÑ ]+$/',$data[\"apellidos\"])){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, no se permiten numeros en el apellido del usuario\");\n print json_encode($json, true);\n return false;\n }\n if(isset($data[\"email\"]) && !preg_match('/^(([^<>()\\[\\]\\\\.,;:\\s@”]+(\\.[^<>()\\[\\]\\\\.,;:\\s@”]+)*)|(“.+”))@((\\[[0–9]{1,3}\\.[0–9]{1,3}\\.[0–9]{1,3}\\.[0–9]{1,3}])|(([a-zA-Z\\-0–9]+\\.)+[a-zA-Z]{2,}))$/',$data[\"email\"])){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, el email no es valido\");\n print json_encode($json, true);\n return false;\n \n }\n if(isset($data[\"email\"])){\n $conn = clientesModels::validateEmail('clientes',$data[\"email\"]);\n if($conn != 0){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, El email {$data[\"email\"]} ya esta registrado\");\n print json_encode($json, true);\n return false;\n }\n }\n \n \n return true;\n }", "public function getPostValues()\n {\n // Define the check for params\n $post_check_array = array(\n // submit action\n 'toevoegen' => array('filter' => FILTER_SANITIZE_STRING),\n 'bijwerken' => array('filter' => FILTER_SANITIZE_STRING),\n 'verwijderen' => array('filter' => FILTER_SANITIZE_STRING),\n // question\n 'vraag' => array('filter' => FILTER_SANITIZE_STRING),\n // question type (open or closed)\n 'vraagId' => array('filter' => FILTER_SANITIZE_INT),\n // question type (open or closed)\n 'vraagSoort' => array('filter' => FILTER_SANITIZE_STRING),\n // Education\n 'opleiding' => array('filter' => FILTER_SANITIZE_STRING),\n // question send time\n 'verstuurTijd' => array('filter' => FILTER_SANITIZE_STRING)\n );\n // Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n // RTS\n return $inputs;\n }", "public function anecdota_post(){\n if (json_decode(file_get_contents('php://input'), true)) {\n $data = json_decode(file_get_contents('php://input'), true);\n } else {\n $data = $this->post();\n }\n $token = $data['token'];\n ///// fin de recibiendo datos post\n\n $perfil = $this->User_model->revisa_perfil_x_token($token);\n\n if (!$perfil) {\n $respuesta = array(\n 'error' => TRUE,\n 'mensaje' => 'No ha realizado un ingreso de sesión!!!',\n 'data' => null\n );\n\n $this->response($respuesta, REST_Controller::HTTP_UNAUTHORIZED);\n } else {\n\n $insertar = $this->Anecdota_model->insertar($data);\n \n\n if ($insertar == false) {\n $respuesta = array(\n 'error' => true,\n 'mensaje' => 'La anécdota no se insertó, comuníquese con el Administrador!!!',\n 'data' => null\n );\n } else {\n $respuesta = array(\n 'error' => false,\n 'mensaje' => 'Anécdota ingresada correctamente!!!',\n 'data' => null\n );\n }\n\n $this->response($respuesta);\n }\n }", "private function validateInput(){\n $name = filter_var($_POST['name'], FILTER_SANITIZE_STRING);\n $ip = filter_var($_POST['ip'], FILTER_VALIDATE_IP);\n $subnet = filter_var($_POST['subnet'], FILTER_VALIDATE_IP);\n $mac = filter_var($_POST['mac'], FILTER_VALIDATE_MAC);\n if($name && $ip && $subnet && $mac){\n return [\n 'name' => $name,\n 'ip' => $ip,\n 'subnet' => $subnet,\n 'mac' => $mac\n ];\n }else{\n return false;\n }\n }", "public function make_exam()\n {\n $inputs = $this->check_make_input();\n // return json_encode($inputs);\n if (!is_array($inputs) || !$inputs) {\n $output[\"ok\"] = false;\n $output[\"message\"] = \"inputs faild\";\n return json_encode($output);\n }\n\n $user_id = $this->un_token($_POST[\"token\"]);\n if (!$user_id) {\n $output[\"ok\"] = false;\n $output[\"message\"] = \"User undefined\";\n return json_encode($output);\n }\n\n if (!$this->check_access_to_option($inputs, (int) $user_id)) {\n $output[\"ok\"] = false;\n $output[\"message\"] = \"access denied\";\n return json_encode($output);\n }\n\n $exam_generated = $this->exam_generator->new_exam($user_id, $inputs);\n return $exam_generated;\n if (!$exam_generated)\n\n $output[\"ok\"] = true;\n $output[\"message\"] = \"ok\";\n $output[\"exam\"] = $exam_generated;\n\n // return \"HH\";\n return json_encode($output);\n }", "public function getPostValues() {\n $post_check_array = array(\n// submit action\n 'add' => array('filter' => FILTER_SANITIZE_STRING),\n 'update' => array('filter' => FILTER_SANITIZE_STRING),\n // List all update form fields !!!\n// event type name.\n 'datum' => array('filter' => FILTER_SANITIZE_STRING),\n 'prioriteit' => array('filter' => FILTER_SANITIZE_STRING),\n 'username' => array('filter' => FILTER_SANITIZE_STRING),\n 'user' => array('filter' => FILTER_SANITIZE_STRING),\n 'password' => array('filter' => FILTER_SANITIZE_STRING),\n // Help text\n 'status' => array('filter' => FILTER_SANITIZE_STRING),\n // Id of current row\n 'alarm_id' => array('filter' => FILTER_VALIDATE_INT),\n 'alarm_noticed' => array('filter' => FILTER_VALIDATE_INT),\n\t\t\t'alarm_origin' => array('filter' => FILTER_SANITIZE_STRING)\n );\n// Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n// RTS\n return $inputs;\n }", "public function checkThreeItemForm()\n {\n $data = ipRequest()->getPost();\n $form = $this->threeItemManagementForm();\n $data = $form->filterValues($data); //filter post data to remove any non form specific items\n $errors = $form->validate($data); //http://www.impresspages.org/docs/form-validation-in-php-3\n if ($errors) {\n //error\n $data = array(\n 'status' => 'error',\n 'errors' => $errors\n );\n } else {\n //success\n unset($data['aa']);\n unset($data['securityToken']);\n unset($data['antispam']);\n $data = array(\n 'status' => 'ok',\n 'data' => $data\n\n );\n }\n return new \\Ip\\Response\\Json($data);\n }", "private function validPayload()\n {\n return [\n 'name' => 'Chefaa pharmacy',\n 'address' => 'Maadi',\n ];\n }", "private function __parse_intput() {\n $requests = JsonParser::decode($this->__raw_input);\n if (is_array($requests) === false or\n empty($requests[0])) {\n $requests = array($requests);\n }\n return ($requests);\n }", "function validateData($data) {\n $data = json_decode($data);\n $typesArr = [1, 2];\n\n if (!in_array((int)$data->type, $typesArr)) {\n return false;\n } else {\n $data->type = (int)$data->type;\n }\n\n if (empty($data->feedback)) {\n return false;\n }\n\n if ($data->type == 2 && !filter_var($data->url, FILTER_VALIDATE_URL)) {\n return false;\n }\n\n if (empty($data->name)) {\n $data->name = \"anonymous\";\n }\n\n if (empty($data->email)) {\n $data->email = \"anonymous\";\n }\n\n return $data;\n }", "function readinput()\n\t{\n\t\t$temanbaru = [\n\t\t\t\"noteman\"\t=> $this->input->post(\"noteman\"),\n\t\t\t\"namateman\"\t=> $this->input->post(\"namateman\"),\n\t\t\t\"notelp\"\t=> $this->input->post(\"notelp\"),\n\t\t\t\"email\"\t\t=> $this->input->post(\"email\")\n\t\t];\n\n\t\treturn $temanbaru;\n\t}", "public function data() {\n $request = $this->requestReader->getContents();\n\t\tif ($request) {\n if ($json_post = CJSON::decode($request)){\n\t\t\t\treturn $json_post;\n\t\t\t}else{\n\t\t\t\tparse_str($request,$variables);\n\t\t\t\treturn $variables;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private function validate_input()\n \t{\n \t\t$this->errors_found = FALSE;\t\t\t\t\n\n\t\t// validate the get request\n\t\t//is their an IVR code?\n\t\tif(! isset($_GET['ivrcode'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing ivrcode';\n\t\t\t$this->errors_found = TRUE;\n\t\t}elseif(! is_numeric($_GET['ivrcode'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Invalid value for ivrcode - should be numeric';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else{\n\t\t\t$this->form_answers['ivrcode'] = $_GET['ivrcode'];\n\t\t}\n\n\t\t//is there a phone number\n\t\tif(! isset($_GET['phonenumber'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing phonenumber';\n\t\t\t$this->errors_found = TRUE;\n\t\t}elseif(! is_numeric($_GET['phonenumber'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Invalid value for phonenumber - should be numeric';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else{\n\t\t\t$this->form_answers['phonenumber'] = $_GET['phonenumber'];\n\t\t}\n\t\t\n\t\t//is there a well working?\n\t\tif(!isset($_GET['wellwork'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing wellwork';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else\n\t\t{\n\t\t\t$_GET['wellwork'] = strtolower($_GET['wellwork']);\n\t\t\t\n\t\t\tif($_GET['wellwork'] != 'yes' && $_GET['wellwork'] != 'no')\n\t\t\t{\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for wellwork - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->form_answers['wellwork'] = $_GET['wellwork'];\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t//is there a does the mechanic know?\n\t\tif(isset($_GET['mechanicknow']))\n\t\t{\n\t\t\t$_GET['mechanicknow'] = strtolower($_GET['mechanicknow']);\n\t\t\tif($_GET['mechanicknow'] != 'yes' && $_GET['mechanicknow'] != 'no'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for mechanicknow - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['mechanicknow'] = $_GET['mechanicknow'];\n\t\t\t}\n\t\t}\n\n\t\t\t\n\t\t//is there a can the mechanic fix\n\t\tif(isset($_GET['mechanicfix']))\n\t\t{\n\t\t\t$_GET['mechanicfix'] = strtolower($_GET['mechanicfix']);\n\t\t\tif($_GET['mechanicfix'] != 'yes' && $_GET['mechanicfix'] != 'no'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for mechanicfix - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['mechanicfix'] = $_GET['mechanicfix'];\n\t\t\t}\n\t\t}\n\t\t//is there a file name\n\t\tif(isset($_GET['filename'])){\n\t\t\t$get = new Validation($_GET);\n\t\t\t$get->add_rules('filename','standard_text');\n\t\t\tif(! $get->validate()){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for filename - should be standard text';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['filename'] = $_GET['filename'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//is there a response format \n\t\tif(isset($_GET['resp'])){\n\t\t\tif($_GET['resp'] != 'json' && $_GET['resp'] != 'xml'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for resp - should be json or xml';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->resp = $_GET['resp'];\n\t\t\t}\n\t\t}else{\n\t\t\t$this->resp = 'json';\n\t\t}\n\n\t\t//if there are errors, let them know.\n\t\tif($this->errors_found){\n\t\t\t$this->send_response($this->response, $this->resp);\n\t\t\treturn;\n\t\t}\t\t\n \t}", "public function submission()\n {\n $title_field_id = 10;\n $content_short_field_id = 8;\n $content_long_field_id = 17;\n $auto_activate = 1;\n \n $this->load->model('language_m');\n $this->load->model('estate_m');\n $this->load->model('option_m');\n $this->load->model('file_m');\n $this->load->model('repository_m');\n \n $this->data['message'] = lang_check('Something is wrong with request');\n $this->data['success'] = FALSE;\n $this->data['token_available'] = FALSE;\n $POST = $this->input->get_post(NULL, TRUE);\n\n $POST = array_merge($_GET, $_POST);\n\n if(isset($POST['lang_code']))\n {\n $lang_id_selected = $this->language_m->get_id($POST['lang_code']);\n }\n \n $lang_id_def = $this->language_m->get_default_id();\n $lang_code_def = $this->language_m->get_code($lang_id_def);\n \n $token = $this->token_m->get_token($POST);\n \n if(is_object($token))\n $this->data['token_available'] = TRUE;\n \n //var_dump($POST);\n \n if(config_db_item('property_subm_disabled')==TRUE)\n {\n $this->data['message'] = lang_check('Registration disabled on server');\n }\n else if(isset($POST['lang_code']) && $lang_id_selected != $lang_id_def)\n {\n $this->data['message'] = lang_check('Only default lang is supported');\n }\n else if(is_object($token) && isset($POST['lang_code']) && isset($POST['input_address'], \n $POST['input_title'],\n $POST['input_description'],\n $POST['input_4']))\n {\n\n $existing_fields = $this->option_m->get_field_list($lang_id_def);\n\n // check if fields exists\n foreach($POST as $key=>$val)\n {\n $exp = explode('_', $key);\n \n if(count($exp) == 2 && $exp[0]=='input' && is_numeric($exp[1]))\n {\n if(!isset($existing_fields[$exp[1]]))\n { \n unset($POST['input_'.$exp[1]]);\n\n $this->data['message'] = lang_check('Field not found: #').$exp[1];\n echo json_encode($this->data);\n exit();\n }\n }\n }\n \n if(isset($POST['property_id']))\n {\n \n if(empty($POST['input_description']) || empty($POST['input_title']))\n {\n $this->data['message'] = lang_check('Please populate all fields!');\n echo json_encode($this->data);\n exit();\n }\n\n $this->load->library('session');\n\n // check permission for edit\n if($this->estate_m->check_user_permission($POST['property_id'], $token->user_id)>0)\n {\n\n // edit\n $data = array();\n $data['date'] = date('Y-m-d H:i:s');\n $data['date_modified'] = date('Y-m-d H:i:s');\n $data['address'] = $POST['input_address'];\n $data['search_values'] = $data['address'];\n \n // fetch gps\n $this->load->library('ghelper');\n $coor = $this->ghelper->getCoordinates($data['address']);\n $data['gps'] = $coor['lat'].', '.$coor['lng'];\n \n // other dynamic data\n $dynamic_data = array();\n $dynamic_data['agent'] = $token->user_id;\n \n // get title\n $dynamic_data[\"option\".$title_field_id.\"_\".$lang_id_def] = $POST['input_title'];\n \n // get description\n $dynamic_data[\"option\".$content_short_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n $dynamic_data[\"option\".$content_long_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n \n // prepare other fields\n foreach($POST as $key=>$val)\n {\n $exp = explode('_', $key);\n \n if(sw_count($exp) == 2 && $exp[0]=='input' && is_numeric($exp[1]))\n {\n $dynamic_data[\"option\".$exp[1].\"_\".$lang_id_def] = $POST['input_'.$exp[1]];\n }\n }\n \n // save basic data\n $insert_id = $this->estate_m->save($data, $POST['property_id']);\n \n if(empty($insert_id))\n {\n echo 'EMPTY insert_id:<br />';\n echo $this->db->last_query();\n exit();\n }\n \n $this->config->set_item('multilang_on_qs', 0);\n \n $this->estate_m->save_dynamic($dynamic_data, $insert_id);\n \n // echo $this->db->last_query();\n \n if(!empty($insert_id))\n {\n $this->uploadfiles($insert_id);\n \n $this->data['message'] = lang_check('Listing saved');\n $this->data['success'] = TRUE;\n }\n else\n {\n $this->data['message'] = lang_check('Edit declined');\n }\n }\n\n }\n else\n {\n // add\n \n if(empty($POST['input_description']) || empty($POST['input_title']))\n {\n $this->data['message'] = lang_check('Please populate all fields!');\n echo json_encode($this->data);\n exit();\n }\n\n $data = array();\n $data['is_activated'] = $auto_activate;\n $data['date'] = date('Y-m-d H:i:s');\n $data['date_modified'] = date('Y-m-d H:i:s');\n $data['address'] = $POST['input_address'];\n $data['search_values'] = $data['address'];\n \n if($data['is_activated'])\n $data['date_activated'] = date('Y-m-d H:i:s');\n \n // fetch gps\n $this->load->library('ghelper');\n $coor = $this->ghelper->getCoordinates($data['address']);\n $data['gps'] = $coor['lat'].', '.$coor['lng'];\n \n // other dynamic data\n $dynamic_data = array();\n $dynamic_data['agent'] = $token->user_id;\n \n // get title\n $dynamic_data[\"option\".$title_field_id.\"_\".$lang_id_def] = $POST['input_title'];\n \n // get description\n $dynamic_data[\"option\".$content_short_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n $dynamic_data[\"option\".$content_long_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n \n // prepare other fields\n foreach($POST as $key=>$val)\n {\n $exp = explode('_', $key);\n \n if(sw_count($exp) == 2 && $exp[0]=='input' && is_numeric($exp[1]))\n {\n $dynamic_data[\"option\".$exp[1].\"_\".$lang_id_def] = $POST['input_'.$exp[1]];\n }\n }\n\n // save basic data\n $insert_id = $this->estate_m->save($data, NULL);\n \n if(empty($insert_id))\n {\n echo 'EMPTY insert_id:<br />';\n echo $this->db->last_query();\n exit();\n }\n \n $this->config->set_item('multilang_on_qs', 0);\n \n $this->estate_m->save_dynamic($dynamic_data, $insert_id);\n \n // echo $this->db->last_query();\n \n if(!empty($insert_id))\n {\n $this->uploadfiles($insert_id);\n \n $this->data['message'] = lang_check('Listing added');\n $this->data['success'] = TRUE;\n }\n else\n {\n $this->data['message'] = lang_check('Added declined');\n }\n }\n } \n \n echo json_encode($this->data);\n exit();\n }", "private function _validasi_anggota()\n\t{\n\t\t$data = array();\n\t\t$data['inputerror'] = array();\n\t\t$data['error'] = array();\n\t\t$data['status'] = true;\n\n\t\tif (input('noloan') == '') {\n\t\t\t$data['inputerror'][] = 'noloan';\n\t\t\t$data['error'][] = 'No kontrak harus diisi';\n\t\t\t$data['status'] = false;\n\t\t} else if (substr(strtoupper(input('noloan')), 0, 2) == 'LD') {\n\t\t\tif (strlen(input('noloan')) != 12) {\n\t\t\t\t$data['inputerror'][] = 'noloan';\n\t\t\t\t$data['error'][] = 'No kontrak tidak valid';\n\t\t\t\t$data['status'] = false;\n\t\t\t}\n\t\t} else {\n\t\t\tif (strlen(input('noloan')) != 10) {\n\t\t\t\t$data['inputerror'][] = 'noloan';\n\t\t\t\t$data['error'][] = 'No kontrak tidak valid';\n\t\t\t\t$data['status'] = false;\n\t\t\t}\n\t\t}\n\n\t\tif (input('no_cif') == '') {\n\t\t\t$data['inputerror'][] = 'no_cif';\n\t\t\t$data['error'][] = 'No CIF harus diisi';\n\t\t\t$data['status'] = false;\n\t\t} else if (strlen(input('no_cif')) < 8) {\n\t\t\t$data['inputerror'][] = 'no_cif';\n\t\t\t$data['error'][] = 'No CIF tidak valid';\n\t\t\t$data['status'] = false;\n\t\t}\n\n\t\tif (input('nm_anggota') == '') {\n\t\t\t$data['inputerror'][] = 'nm_anggota';\n\t\t\t$data['error'][] = 'Nama anggota harus diisi';\n\t\t\t$data['status'] = false;\n\t\t} else if (!preg_match('/^[a-zA-Z ]+$/', input('nm_anggota'))) {\n\t\t\t$data['inputerror'][] = 'nm_anggota';\n\t\t\t$data['error'][] = 'Nama anggota tidak valid';\n\t\t\t$data['status'] = false;\n\t\t}\n\n\t\tif (input('tgl_cair') == '') {\n\t\t\t$data['inputerror'][] = 'tgl_cair';\n\t\t\t$data['error'][] = 'Tgl pencairan harus diisi';\n\t\t\t$data['status'] = false;\n\t\t}\n\n\t\tif (input('tgl_ospokok') == '') {\n\t\t\t$data['inputerror'][] = 'tgl_ospokok';\n\t\t\t$data['error'][] = 'Tgl outstanding harus diisi';\n\t\t\t$data['status'] = false;\n\t\t}\n\n\t\tif (input('tenor') == '') {\n\t\t\t$data['inputerror'][] = 'tenor';\n\t\t\t$data['error'][] = 'Tenor harus diisi';\n\t\t\t$data['status'] = false;\n\t\t} else if (!preg_match('/^[0-9]+$/', input('tenor'))) {\n\t\t\t$data['inputerror'][] = 'tenor';\n\t\t\t$data['error'][] = 'Tenor tidak valid';\n\t\t\t$data['status'] = false;\n\t\t}\n\n\t\tif (input('nom_plafond') == '') {\n\t\t\t$data['inputerror'][] = 'nom_plafond';\n\t\t\t$data['error'][] = 'Plafond pencairan harus diisi';\n\t\t\t$data['status'] = false;\n\t\t} else if (!preg_match('/^[0-9,.]+$/', str_replace(',', '', input('nom_plafond')))) {\n\t\t\t$data['inputerror'][] = 'nom_plafond';\n\t\t\t$data['error'][] = 'Plafond pencairan tidak valid';\n\t\t\t$data['status'] = false;\n\t\t}\n\n\t\tif (input('os_pokok') == '') {\n\t\t\t$data['inputerror'][] = 'os_pokok';\n\t\t\t$data['error'][] = 'Outstanding harus diisi';\n\t\t\t$data['status'] = false;\n\t\t} else if (!preg_match('/^[0-9,.]+$/', str_replace(',', '', input('os_pokok')))) {\n\t\t\t$data['inputerror'][] = 'os_pokok';\n\t\t\t$data['error'][] = 'Outstanding tidak valid';\n\t\t\t$data['status'] = false;\n\t\t}\n\n\t\tif ($data['status'] === false) {\n\t\t\techo json_encode($data);\n\t\t\texit();\n\t\t}\n\t}", "public function validateToken($data)\n\t{\n\t\t$response = [];\n\t\t$result = [];\n\t\ttry {\n\t\t\t$sql = \"SELECT u.id,u.usuario,u.nombre,u.id_centro,u.estatus,u.tipo,e.cve_edo \n\t\t\t\t\tFROM usuarios u \n\t\t\t\t\tINNER JOIN estados e ON e.id_centro = u.id_centro \n<<<<<<< HEAD\n\t\t\t\t\tWHERE u.id = ?\";\n\t\t\t//$query = $this->executeStmt($this->connectionToSiniiga(),$sql,[$data['idUsuario']]);\n\t\t\t$query = $this->executeStmt($this->connectionToSiniiga(),$sql,[2153]);\n=======\n\t\t\t\t\tWHERE u.id = ? AND e.cve_edo = 21\";\n\t\t\t$query = $this->executeStmt($this->connectionToSiniiga(),$sql,[$data['idUsuario']]);\n\t\t\t//$query = $this->executeStmt($this->connectionToSiniiga(),$sql,[2153]);\n>>>>>>> development\n\t\t\tif ($query) {\n\t\t\t\t$row = $query->fetch(PDO::FETCH_ASSOC);\n\t\t\t\tif (!empty( $row )) {\n\t\t\t\t\tif ($row['estatus'] == 1) {\n\t\t\t\t\t\t$result['usuario'] = [\n\t\t\t\t\t\t\t\"id\" => $row['id'],\n\t\t\t\t\t\t\t\"user\" => $row['usuario'],\n\t\t\t\t\t\t\t\"name\" => $row['nombre'],\n\t\t\t\t\t\t\t\"id_centro\" => $row['id_centro'],\n\t\t\t\t\t\t\t\"estatus\" => $row['estatus'],\n\t\t\t\t\t\t\t\"tipo\" => $row['tipo'],\n<<<<<<< HEAD\n\t\t\t\t\t\t\t//\"cveEdo\" => $row['cve_edo'],\n\t\t\t\t\t\t\t\"cveEdo\" => '21'\n=======\n\t\t\t\t\t\t\t\"cveEdo\" => $row['cve_edo'],\n\t\t\t\t\t\t\t//\"cveEdo\" => '21'\n>>>>>>> development\n\t\t\t\t\t\t];\n\t\t\t\t\t/*$sql = \"SELECT api_key \n\t\t\t\t\t\t\t\tFROM usuarios_ganadera \n\t\t\t\t\t\t\t\tWHERE id_usuario = ?\";\n\t\t\t\t\t\t$query = $this->executeStmt($this->connectionToReemo($row['cve_edo']),$sql,[$row['id']]);\n\t\t\t\t\t\tif ($query) {\n\t\t\t\t\t\t\t$row = $query->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t\tif (!empty( $row )) {\n\t\t\t\t\t\t\t\tif ($row['api_key'] == $data['token']) {\n\t\t\t\t\t\t\t\t\t$response = [\n\t\t\t\t\t\t\t\t\t\t\"success\" => true,\n\t\t\t\t\t\t\t\t\t\t\"msg\" => \"Token correcto\",\n\t\t\t\t\t\t\t\t\t\t\"result\" => $result\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t$access = date(\"d/m/Y H:i:s\");\n \t\t\t\t\t\t\t\t$textoArchivo = \"Cliente: $access {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})\\n\";\n \t\t\t\t\t\t\t\tfile_put_contents(\"../../logs/LoginLog.log\",$textoArchivo,FILE_APPEND | LOCK_EX);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$response = [\n\t\t\t\t\t\t\t\t\t\t\"success\" => false,\n\t\t\t\t\t\t\t\t\t\t\"msg\" => \"Token expiró o cambio\"\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$response = [\n\t\t\t\t\t\t\t\t\t\"success\" => false,\n\t\t\t\t\t\t\t\t\t\"msg\" => \"Token expiró o cambio\"\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n<<<<<<< HEAD\n\t\t\t\t\t\t\tthrow new Exception($this->getMsgErrorConnection());\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\tif (true) {\n\t\t\t\t\t\t\t$response = [\n\t\t\t\t\t\t\t\t\"success\" => true,\n\t\t\t\t\t\t\t\t\"msg\" => \"Token correcto\",\n\t\t\t\t\t\t\t\t\"result\" => $result\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$access = date(\"d/m/Y H:i:s\");\n\t\t\t\t\t\t\t$textoArchivo = \"Cliente: $access {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})\\n\";\n\t\t\t\t\t\t\tfile_put_contents(\"../../logs/LoginLog.log\",$textoArchivo,FILE_APPEND | LOCK_EX);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$response = [\n\t\t\t\t\t\t\t\t\"success\" => false,\n\t\t\t\t\t\t\t\t\"msg\" => \"Token expiró o cambio\"\n\t\t\t\t\t\t\t];\n=======\n\t\t\t\t\t\t\tthrow new ErrorException($this->getMsgErrorConnection());\n>>>>>>> development\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*if (true) {\n\t\t\t\t\t\t\t$response = [\n\t\t\t\t\t\t\t\t\"success\" => true,\n\t\t\t\t\t\t\t\t\"msg\" => \"Token correcto\",\n\t\t\t\t\t\t\t\t\"result\" => $result\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$access = date(\"d/m/Y H:i:s\");\n\t\t\t\t\t\t\t$textoArchivo = \"Cliente: $access {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})\\n\";\n\t\t\t\t\t\t\tfile_put_contents(\"../../logs/LoginLog.log\",$textoArchivo,FILE_APPEND | LOCK_EX);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$response = [\n\t\t\t\t\t\t\t\t\"success\" => false,\n\t\t\t\t\t\t\t\t\"msg\" => \"Token expiró o cambio\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}*/\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"Usuario (\" . $data['idUsuario'] . \") se encuentra inactivo.\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(\"Usuario (\" . $data['idUsuario'] . \") no existe en su estado.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new ErrorException($this->getMsgErrorConnection());\n\t\t\t}\n\t\t} catch (ErrorException $e) {\n\t\t\terror_log(\"Error Runtime-API(REEMO_\" . __METHOD__ . \"): \" . $e->getMessage() . \" en \" . __FILE__);\n\t\t\t$response = [\n\t\t\t\t\"success\" => false,\n\t\t\t\t\"msg\" => $e->getMessage()\n\t\t\t];\n\t\t} catch (Exception $e) {\n\t\t\t$response = [\n\t\t\t\t\"success\" => false,\n\t\t\t\t\"msg\" => $e->getMessage()\n\t\t\t];\n\t\t}\n\t\treturn (object) $response;\n\t}", "public function anecdotasRstudiante_post(){\n /* * * recibiendo datos post *** */\n if (json_decode(file_get_contents('php://input'), true)) {\n $data = json_decode(file_get_contents('php://input'), true);\n } else {\n $data = $this->post();\n }\n $token = $data['token'];\n $correo = $data['correo'];\n ///// fin de recibiendo datos post\n\n $perfil = $this->User_model->revisa_perfil_x_token($token);\n\n if (!$perfil) {\n $respuesta = array(\n 'error' => TRUE,\n 'mensaje' => 'No ha realizado un ingreso de sesión!!!',\n 'data' => null\n );\n\n $this->response($respuesta, REST_Controller::HTTP_UNAUTHORIZED);\n } else {\n\n $anecdotas = $this->Anecdota_model->todasAnecdotas($data);\n \n\n if ($anecdotas == false) {\n $respuesta = array(\n 'error' => true,\n 'mensaje' => 'No existen anécdotas asiganadas a su hijo!!!',\n 'data' => null\n );\n } else {\n $respuesta = array(\n 'error' => false,\n 'mensaje' => 'Anécdotas consultadas correctamente!!!',\n 'data' => $anecdotas\n );\n }\n\n $this->response($respuesta);\n }\n }", "function ltiExtractPost() {\n // Unescape each time we use this stuff - somedy we won't need this...\n $FIXED = array();\n foreach($_POST as $key => $value ) {\n if (get_magic_quotes_gpc()) $value = stripslashes($value);\n $FIXED[$key] = $value;\n }\n $retval = array();\n $retval['key'] = isset($FIXED['oauth_consumer_key']) ? $FIXED['oauth_consumer_key'] : null;\n $retval['context_id'] = isset($FIXED['context_id']) ? $FIXED['context_id'] : null;\n $retval['link_id'] = isset($FIXED['resource_link_id']) ? $FIXED['resource_link_id'] : null;\n $retval['user_id'] = isset($FIXED['user_id']) ? $FIXED['user_id'] : null;\n\n if ( $retval['key'] && $retval['context_id'] && $retval['link_id'] && $retval['user_id'] ) {\n // OK To Continue\n } else {\n return false;\n }\n \n $retval['service'] = isset($FIXED['lis_outcome_service_url']) ? $FIXED['lis_outcome_service_url'] : null;\n $retval['sourcedid'] = isset($FIXED['lis_result_sourcedid']) ? $FIXED['lis_result_sourcedid'] : null;\n\n $retval['context_title'] = isset($FIXED['context_title']) ? $FIXED['context_title'] : null;\n $retval['link_title'] = isset($FIXED['resource_link_title']) ? $FIXED['resource_link_title'] : null;\n $retval['user_email'] = isset($FIXED['lis_person_contact_email_primary']) ? $FIXED['lis_person_contact_email_primary'] : null;\n if ( isset($FIXED['lis_person_name_full']) ) {\n $retval['user_displayname'] = $FIXED['lis_person_name_full'];\n } else if ( isset($FIXED['lis_person_name_given']) && isset($FIXED['lis_person_name_family']) ) {\n $retval['user_displayname'] = $FIXED['lis_person_name_given'].' '.$FIXED['lis_person_name_family'];\n } else if ( isset($FIXED['lis_person_name_given']) ) {\n $retval['user_displayname'] = $FIXED['lis_person_name_given'];\n } else if ( isset($FIXED['lis_person_name_family']) ) {\n $retval['user_displayname'] = $FIXED['lis_person_name_given'];\n }\n $retval['role'] = 0;\n if ( isset($FIXED['roles']) ) {\n $roles = strtolower($FIXED['roles']);\n if ( ! ( strpos($roles,'instructor') === false ) ) $retval['role'] = 1;\n if ( ! ( strpos($roles,'administrator') === false ) ) $retval['role'] = 1;\n }\n return $retval;\n}", "private function checkFields()\r\n {\r\n $vars = array('user', 'pass', 'numbers', 'message', 'date', 'ids', 'data_start', 'data_end',\r\n 'lido', 'status', 'entregue', 'data_confirmacao', 'return_format'\r\n );\r\n\r\n $final = array();\r\n foreach ($vars as $key => $value) {\r\n if ($this->$value !== '') {\r\n $final[$value] = $this->$value;\r\n }\r\n }\r\n return $final;\r\n }", "public function finish_exam()\n {\n $inputs = $this->check_finish_inputs();\n if (!is_array($inputs) || !$inputs) {\n $output[\"ok\"] = false;\n $output[\"message\"] = \"inputs faild\";\n return json_encode($output);\n }\n\n $user_id = $this->un_token($_POST[\"token\"]);\n if (!$user_id) {\n $output[\"ok\"] = false;\n $output[\"message\"] = \"User undefined\";\n return json_encode($output);\n }\n\n if (!$this->check_exam_and_user((int) $user_id, $inputs[\"exma_id\"])) {\n $output[\"ok\"] = false;\n $output[\"message\"] = \"access denied\";\n return json_encode($output);\n }\n\n $update_exam = $this->update_finished_exam($inputs[\"exam_id\"], $inputs[\"corrects\"], $inputs[\"wrongs\"], $inputs[\"emptys\"]);\n if (!$update_exam) {\n $output[\"ok\"] = false;\n $output[\"message\"] = \"cannot update exam\";\n return json_encode($output);\n }\n\n $output[\"ok\"] = true;\n $output[\"message\"] = \"success update exam\";\n return json_encode($output);\n }", "function check_input ($form_array) {\n#--- debug start ---------#\n// echo \"<br> check_input form_array contents <br>\";\n// print_r($form_array);\n// echo \"<br> check_input continue form_array contents <br>\";\n#--- debug finish --------#\n if ($form_array['blogid']) {\n return 1;\n }\n else return 0;\n}", "function post() {\n\n if($_GET['action']=='InsertOrUpdateUsuario'){\n $obj = json_decode( file_get_contents('php://input') );\n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(200,\"Error000\",\"No se agrego JSON\");\n }else{\n\n\n if(!isset($obj->rutUsuario)){\n $this->response(200,\"Error001\",\"No se agrego la etiqueta rutUsuario\");\n exit;\n }\n if($obj->rutUsuario==''){\n $this->response(200,\"Error002\",\"La etiqueta rutUsuario esta vacia\");\n exit;\n }\n if(valida_rut($obj->rutUsuario)==false){\n $this->response(200,\"Error003\",\"El rutUsuario Ingresado no es Valido\");\n exit;\n }\n if(!isset($obj->nombreUsuario)){\n $this->response(200,\"Error004\",\"No se agrego la etiqueta nombreUsuario\");\n exit;\n }\n if($obj->nombreUsuario==''){\n $this->response(200,\"Error005\",\"La etiqueta nombreUsuario esta vacia\");\n exit;\n }\n if(strlen($obj->nombreUsuario)>100){\n $this->response(200,\"Error006\",\"nombreUsuario debe ser de largo menor a 100 caracteres \");\n exit;\n }\n \n\n if(!isset($obj->contrasenaUsuario)){\n $this->response(200,\"Error007\",\"No se agrego la etiqueta contrasenaUsuario\");\n exit;\n }\n if($obj->contrasenaUsuario==''){\n $this->response(200,\"Error008\",\"La etiqueta contrasenaUsuario esta vacia\");\n exit;\n }\n if(strlen($obj->contrasenaUsuario)>10){\n $this->response(200,\"Error009\",\"contrasenaUsuario debe ser de largo menor a 10 caracteres \");\n exit;\n }\n if(!isset($obj->fechaHoraCreacion)){\n $this->response(200,\"Error010\",\"No se agrego la etiqueta fechaHoraCreacion\");\n exit;\n }\n if($obj->fechaHoraCreacion==''){\n $this->response(200,\"Error011\",\"La etiqueta fechaHoraCreacion esta vacia\");\n exit;\n }\n if(!isset($obj->idAcceso)){\n $this->response(200,\"Error012\",\"No se agrego la etiqueta idAcceso\");\n exit;\n }\n if($obj->idAcceso==''){\n $this->response(200,\"Error013\",\"La etiqueta idAcceso esta vacia\");\n exit;\n }\n if (!ctype_digit($obj->idAcceso)) {\n $this->response(200,\"Error014\",\"La etiqueta idAcceso debe tomar valor numerico\");\n exit;\n }\n \n\n $db = new bd();\n $respuesta=$db->InsertOrUpdateUsuario($obj->rutUsuario,$obj->nombreUsuario,$obj->contrasenaUsuario,$obj->fechaHoraCreacion,$obj->idAcceso);\n\n if($respuesta['Estado']=='success'){\n $this->response(200,\"success\",\"Se inserto De Forma Correcta\");\n }else{\n $this->response(200,\"Error999\",$respuesta['Response']);\n exit;\n }\n } \n\n\n exit;\n }\n\n if($_GET['action']=='InsertOrUpdateNota'){\n $obj = json_decode( file_get_contents('php://input') );\n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(200,\"Error000\",\"No se agrego JSON\");\n }else{\n\n if(!isset($obj->rutUsuario)){\n $this->response(200,\"Error001\",\"No se agrego la etiqueta rutUsuario\");\n exit;\n }\n if($obj->rutUsuario==''){\n $this->response(200,\"Error002\",\"La etiqueta rutUsuario esta vacia\");\n exit;\n }\n if(valida_rut($obj->rutUsuario)==false){\n $this->response(200,\"Error003\",\"El rutUsuario Ingresado no es Valido\");\n exit;\n }\n\n if(!isset($obj->idNota)){\n $this->response(200,\"Error015\",\"No se agrego la etiqueta idNota\");\n exit;\n }\n if($obj->idNota==''){\n $this->response(200,\"Error016\",\"La etiqueta idNota esta vacia\");\n exit;\n }\n if (!ctype_digit($obj->idNota)) {\n $this->response(200,\"Error017\",\"La etiqueta idNota debe tomar valor numerico\");\n exit;\n }\n \n if(!isset($obj->nombreNota)){\n $this->response(200,\"Error018\",\"No se agrego la etiqueta nombreNota\");\n exit;\n }\n if($obj->nombreNota==''){\n $this->response(200,\"Error019\",\"La etiqueta nombreNota esta vacia\");\n exit;\n }\n if(strlen($obj->nombreNota)>150){\n $this->response(200,\"Error020\",\"nombreNota debe ser de largo menor a 150 caracteres \");\n exit;\n }\n if(!isset($obj->descripcionNota)){\n $this->response(200,\"Error021\",\"No se agrego la etiqueta descripcionNota\");\n exit;\n }\n if($obj->descripcionNota==''){\n $this->response(200,\"Error022\",\"La etiqueta descripcionNota esta vacia\");\n exit;\n }\n if(strlen($obj->descripcionNota)>500){\n $this->response(200,\"Error023\",\"descripcionNota debe ser de largo menor a 500 caracteres \");\n exit;\n }\n if(!isset($obj->fechaHoraCreacion)){\n $this->response(200,\"Error010\",\"No se agrego la etiqueta fechaHoraCreacion\");\n exit;\n }\n if($obj->fechaHoraCreacion==''){\n $this->response(200,\"Error011\",\"La etiqueta fechaHoraCreacion esta vacia\");\n exit;\n }\n if(!isset($obj->idAcceso)){\n $this->response(200,\"Error012\",\"No se agrego la etiqueta idAcceso\");\n exit;\n }\n if($obj->idAcceso==''){\n $this->response(200,\"Error013\",\"La etiqueta idAcceso esta vacia\");\n exit;\n }\n if (!ctype_digit($obj->idAcceso)) {\n $this->response(200,\"Error014\",\"La etiqueta idAcceso debe tomar valor numerico\");\n exit;\n }\n \n \n\n $db = new bd();\n $respuesta=$db->InsertOrUpdateNota($obj->rutUsuario,$obj->idNota,$obj->nombreNota,$obj->descripcionNota,$obj->fechaHoraCreacion,$obj->idAcceso);\n\n if($respuesta['Estado']=='success'){\n $this->response(200,\"success\",\"Se inserto De Forma Correcta\");\n }else{\n $this->response(200,\"Error999\",$respuesta['Response']);\n exit;\n }\n } \n\n\n exit;\n }\n\n\n\n\n if($_GET['action']=='DeleteUsuario'){\n $obj = json_decode( file_get_contents('php://input') );\n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(200,\"Error000\",\"No se agrego JSON\");\n }else{\n\n\n if(!isset($obj->rutUsuario)){\n $this->response(200,\"Error001\",\"No se agrego la etiqueta rutUsuario\");\n exit;\n }\n if($obj->rutUsuario==''){\n $this->response(200,\"Error002\",\"La etiqueta rutUsuario esta vacia\");\n exit;\n }\n if(valida_rut($obj->rutUsuario)==false){\n $this->response(200,\"Error003\",\"El rutUsuario Ingresado no es Valido\");\n exit;\n }\n\n if(!isset($obj->idAcceso)){\n $this->response(200,\"Error012\",\"No se agrego la etiqueta idAcceso\");\n exit;\n }\n if($obj->idAcceso==''){\n $this->response(200,\"Error013\",\"La etiqueta idAcceso esta vacia\");\n exit;\n }\n if (!ctype_digit($obj->idAcceso)) {\n $this->response(200,\"Error014\",\"La etiqueta idAcceso debe tomar valor numerico\");\n exit;\n }\n \n\n\n $db = new bd();\n $respuesta = $db->DeleteUsuario($obj->rutUsuario,$obj->idAcceso);\n if($respuesta['Estado']=='success'){\n $this->response(200,\"success\",$respuesta['Response']);\n }else{\n $this->response(200,\"Error00\",$respuesta['Response']);\n exit;\n }\n\n } //elseemtyarreglo\nexit;\n}//CIERRA ACTION\n\n\nif($_GET['action']=='DeleteNota'){\n $obj = json_decode( file_get_contents('php://input') );\n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(200,\"Error000\",\"No se agrego JSON\");\n }else{\n\n if(!isset($obj->rutUsuario)){\n $this->response(200,\"Error001\",\"No se agrego la etiqueta rutUsuario\");\n exit;\n }\n if($obj->rutUsuario==''){\n $this->response(200,\"Error002\",\"La etiqueta rutUsuario esta vacia\");\n exit;\n }\n if(valida_rut($obj->rutUsuario)==false){\n $this->response(200,\"Error003\",\"El rutUsuario Ingresado no es Valido\");\n exit;\n }\n\n if(!isset($obj->idNota)){\n $this->response(200,\"Error015\",\"No se agrego la etiqueta idNota\");\n exit;\n }\n if($obj->idNota==''){\n $this->response(200,\"Error016\",\"La etiqueta idNota esta vacia\");\n exit;\n }\n if (!ctype_digit($obj->idNota)) {\n $this->response(200,\"Error017\",\"La etiqueta idNota debe tomar valor numerico\");\n exit;\n }\n \n if(!isset($obj->idAcceso)){\n $this->response(200,\"Error012\",\"No se agrego la etiqueta idAcceso\");\n exit;\n }\n if($obj->idAcceso==''){\n $this->response(200,\"Error013\",\"La etiqueta idAcceso esta vacia\");\n exit;\n }\n if (!ctype_digit($obj->idAcceso)) {\n $this->response(200,\"Error014\",\"La etiqueta idAcceso debe tomar valor numerico\");\n exit;\n }\n \n\n\n $db = new bd();\n $respuesta = $db->DeleteNota($obj->rutUsuario,$obj->idNota,$obj->idAcceso);\n if($respuesta['Estado']=='success'){\n $this->response(200,\"success\",$respuesta['Response']);\n }else{\n $this->response(200,\"Error00\",$respuesta['Response']);\n exit;\n }\n\n} //elseemtyarreglo\nexit;\n}//CIERRA ACTION\n\nif($_GET['action']=='GetUsuario'){\n $obj = json_decode( file_get_contents('php://input') );\n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(200,\"Error000\",\"No se agrego JSON\");\n }else{\n\n\n if(!isset($obj->rutUsuario)){\n $this->response(200,\"Error001\",\"No se agrego la etiqueta rutUsuario\");\n exit;\n }\n if($obj->rutUsuario==''){\n $this->response(200,\"Error002\",\"La etiqueta rutUsuario esta vacia\");\n exit;\n }\n if(valida_rut($obj->rutUsuario)==false){\n $this->response(200,\"Error003\",\"El rutUsuario Ingresado no es Valido\");\n exit;\n }\n\n if(!isset($obj->idAcceso)){\n $this->response(200,\"Error012\",\"No se agrego la etiqueta idAcceso\");\n exit;\n }\n if($obj->idAcceso==''){\n $this->response(200,\"Error013\",\"La etiqueta idAcceso esta vacia\");\n exit;\n }\n if (!ctype_digit($obj->idAcceso)) {\n $this->response(200,\"Error014\",\"La etiqueta idAcceso debe tomar valor numerico\");\n exit;\n }\n \n\n\n $db = new bd();\n $respuesta = $db->GetUsuario($obj->rutUsuario,$obj->idAcceso);\n if($respuesta['Estado']=='success'){\n $this->response(200,\"success\",$respuesta['Response']);\n }else{\n $this->response(200,\"Error00\",$respuesta['Response']);\n exit;\n }\n\n} //elseemtyarreglo\nexit;\n}//CIERRA ACTION\n\nif($_GET['action']=='GetNota'){\n $obj = json_decode( file_get_contents('php://input') );\n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(200,\"Error000\",\"No se agrego JSON\");\n }else{\n\n\n if(!isset($obj->rutUsuario)){\n $this->response(200,\"Error001\",\"No se agrego la etiqueta rutUsuario\");\n exit;\n }\n if($obj->rutUsuario==''){\n $this->response(200,\"Error002\",\"La etiqueta rutUsuario esta vacia\");\n exit;\n }\n if(valida_rut($obj->rutUsuario)==false){\n $this->response(200,\"Error003\",\"El rutUsuario Ingresado no es Valido\");\n exit;\n }\n if(!isset($obj->idNota)){\n $this->response(200,\"Error015\",\"No se agrego la etiqueta idNota\");\n exit;\n }\n if($obj->idNota==''){\n $this->response(200,\"Error016\",\"La etiqueta idNota esta vacia\");\n exit;\n }\n if (!ctype_digit($obj->idNota)) {\n $this->response(200,\"Error017\",\"La etiqueta idNota debe tomar valor numerico\");\n exit;\n }\n \n if(!isset($obj->idAcceso)){\n $this->response(200,\"Error012\",\"No se agrego la etiqueta idAcceso\");\n exit;\n }\n if($obj->idAcceso==''){\n $this->response(200,\"Error013\",\"La etiqueta idAcceso esta vacia\");\n exit;\n }\n if (!ctype_digit($obj->idAcceso)) {\n $this->response(200,\"Error014\",\"La etiqueta idAcceso debe tomar valor numerico\");\n exit;\n }\n \n\n\n $db = new bd();\n $respuesta = $db->GetNota($obj->rutUsuario,$obj->idNota,$obj->idAcceso);\n if($respuesta['Estado']=='success'){\n $this->response(200,\"success\",$respuesta['Response']);\n }else{\n $this->response(200,\"Error00\",$respuesta['Response']);\n exit;\n }\n\n} //elseemtyarreglo\nexit;\n}//CIERRA ACTION\n\n\nif($_GET['action']=='GetAllNotasUsuario'){\n $obj = json_decode( file_get_contents('php://input') );\n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(200,\"Error000\",\"No se agrego JSON\");\n }else{\n\n\n if(!isset($obj->rutUsuario)){\n $this->response(200,\"Error001\",\"No se agrego la etiqueta rutUsuario\");\n exit;\n }\n if($obj->rutUsuario==''){\n $this->response(200,\"Error002\",\"La etiqueta rutUsuario esta vacia\");\n exit;\n }\n if(valida_rut($obj->rutUsuario)==false){\n $this->response(200,\"Error003\",\"El rutUsuario Ingresado no es Valido\");\n exit;\n }\n \n \n if(!isset($obj->idAcceso)){\n $this->response(200,\"Error012\",\"No se agrego la etiqueta idAcceso\");\n exit;\n }\n if($obj->idAcceso==''){\n $this->response(200,\"Error013\",\"La etiqueta idAcceso esta vacia\");\n exit;\n }\n if (!ctype_digit($obj->idAcceso)) {\n $this->response(200,\"Error014\",\"La etiqueta idAcceso debe tomar valor numerico\");\n exit;\n }\n \n\n\n $db = new bd();\n $respuesta = $db->GetAllNotasUsuario($obj->rutUsuario,$obj->idAcceso);\n if($respuesta['Estado']=='success'){\n $this->response(200,\"success\",$respuesta['Response']);\n }else{\n $this->response(200,\"Error00\",$respuesta['Response']);\n exit;\n }\n\n} //elseemtyarreglo\nexit;\n}//CIERRA ACTION\n\n$this->response(400);\n}", "protected function validDataFromRequest()\n {\n return array_merge([\n 'obj_type',\n 'obj_id',\n 'rev_num',\n ], parent::validDataFromRequest());\n }", "function check_all_incomming_vars($request_array, $save_name = null) {\n//checks all the incomming vars\n// V0.8 forces the use of an non empty array\n// if (empty($request_array)) {\n// $request_array = $_REQUEST;\n// } else {\n if (!is_array($request_array)) {\n die(__FUNCTION__ . \" need an array to work\");\n }\n// }\n $form = array();\n foreach ($request_array as $index => $value) {\n if (!is_array($value)) {\n $form[$index] = \\k1lib\\forms\\check_single_incomming_var($value);\n } else {\n $form[$index] = check_all_incomming_vars($value);\n }\n }\n if (!empty($save_name)) {\n \\k1lib\\common\\serialize_var($form, $save_name);\n }\n return $form;\n}", "private function is_json_valid() {\n\t\treturn $this->is_amp() ? $this->is_json_valid['amp'] : $this->is_json_valid['nonamp'];\n\t}", "public function checkSliderForm()\n {\n $data = ipRequest()->getPost();\n $form = $this->sliderManagementForm();\n $data = $form->filterValues($data); //filter post data to remove any non form specific items\n $errors = $form->validate($data); //http://www.impresspages.org/docs/form-validation-in-php-3\n if ($errors) {\n //error\n $data = array(\n 'status' => 'error',\n 'errors' => $errors\n );\n } else {\n //success\n unset($data['aa']);\n unset($data['securityToken']);\n unset($data['antispam']);\n $data = array(\n 'status' => 'ok',\n 'data' => $data\n\n );\n }\n return new \\Ip\\Response\\Json($data);\n }", "protected function validatePOST() {\n return true;\n }", "public static function checkPostData($data) {\n\t\t\t/* This method use the php function htmlentities for each values in $_POST and return an array with securised data */\n foreach ($data as $key => $value) {\n $data[$key] = htmlentities($value);\n }\n return $data;\n\t\t}", "function httpResponseValidatation($HttpType, $requestValue) {\n // Connect to DB\n $dataBase = connect_to_db();\n if (!$dataBase) {\n exit(\"Database error!\");\n }\n $returnValid = true;\n // var_dump(\"VERIFY USER\");\n $keys = array_keys($requestValue);\n if ($HttpType == \"POST\") {\n // username is a required field, and must be uneque\n if (validateUnequeIndividualFromTable(\"post\", $dataBase, $requestValue[\"post_id\"], \"id\")) {\n $returnValid = false;\n send404(\"Invlaid post given\", array(\"Message\" => \" Post \" . $requestValue[\"post_id\"] . \" id does not exist\"));\n }\n }\n else if ($HttpType == \"GET\" || $HttpType == \"PUT\" || $HttpType == \"DELETE\") {\n if (array_key_exists(\"post_id\", $requestValue)) {\n if (validateUnequeIndividualFromTable(\"blog_comment\", $dataBase, $requestValue[\"post_id\"], \"post_id\")) {\n $returnValid = false;\n send404(\"Invlaid ID given\", array(\"Message\" =>\"Post \". $requestValue[\"post_id\"] . \" does not match\"));\n }\n }\n }\n return $returnValid;\n}", "function validateData($request) {\n\tglobal $amessages;\n\tinclude_once(ROOT_PATH.'classes/data/validate.class.php');\n\t$error = array();\n\t$validate = new Validate();\n\t$error['INPUT']['module'] = $validate->validString($request->element('module'),$amessages['object']);\t\n\t$error['INPUT']['name'] = $validate->validString($request->element('name'),$amessages['name']);\n\t$error['INPUT']['title'] = $validate->validString($request->element('title'),$amessages['title']);\n\t$error['INPUT']['class'] = $validate->pasteString($request->element('class'));\n\t$error['INPUT']['type'] = $validate->validNumber($request->element('type'),$amessages['custom_field_type']);\n\t$error['INPUT']['value'] = $validate->pasteString($request->element('value'));\n\tif($request->element('type')>3) $error['INPUT']['value'] = $validate->validString($request->element('value'),$amessages['custom_field_value']);\n\t$error['INPUT']['position'] = $validate->pasteString($request->element('position'));\n\t$error['INPUT']['status'] = $validate->pasteString($request->element('status'));\n\t\n\tif($error['INPUT']['module']['error'] || $error['INPUT']['name']['error'] || $error['INPUT']['title']['error'] || $error['INPUT']['type']['error'] || $error['INPUT']['value']['error']) {\n\t\t$error['invalid'] = 1;\n\t\treturn $error;\n\t}\n\t$error['invalid'] = 0;\n\treturn $error;\n}", "private function validateData() {\r\n\r\n $requiredFields = array(\"v_code\" => \"Verification code not supplied\",\r\n \"psw1\" => \"Password field is empty\",\r\n \"psw2\" => \"Password field is empty\",);\r\n\r\n\r\n //0 means there is no error\r\n $error_status = \\VAL_NO_ERROR;\r\n\r\n /*\r\n Initialize error object that will be returned by this function\r\n */\r\n $error_obj = new stdClass();\r\n $error_obj->msg = \"\";\r\n $error_obj->field = \"\";\r\n $error_obj->code = 0;\r\n $error_obj->type = \\VAL_NO_ERROR;\r\n\r\n //check if required variables are defined\r\n foreach ($requiredFields as $key => $value) {\r\n $value = $this->request->request->get($key);\r\n if (empty( $value )) {\r\n $error_obj->field = $key;\r\n $error_obj->msg = $requiredFields[$key];\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n //return after each field that is found wrong\r\n return $error_obj;\r\n }\r\n }\r\n\r\n $pass_1 = $this->request->request->get('psw1');\r\n $pass_2 = $this->request->request->get('psw2');\r\n\r\n //Check if emails match\r\n if (strcmp($pass_1, $pass_2) != 0) {\r\n $error_obj->field = \"psw2\";\r\n $error_obj->msg = \"Passwords are different\";\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n return $error_obj;\r\n }\r\n\r\n /*\r\n Only check one password. If both passwords are thesame, we only need to check one of them.\r\n */\r\n if (!preg_match('/^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,}$/', $pass_1)) {\r\n $error_obj->field = \"psw1\";\r\n $error_obj->msg = \"Password must have a digit, lower and upper case charters. Min lenght is 6\";\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n return $error_obj;\r\n }\r\n\r\n return $error_obj;\r\n }", "function safetycheck( $vars, $responsetype )\n{\n//08.26.2015 ghh - first we figure out if we're dealing with get or\n//post because we can work directly with get but need to convert post\n//from json object\nif ( $responsetype == 'get' )\n\t{\n\tforeach ( $vars as $v )\n\t\t$temp[] = addslashes( $v );\n\t\n\treturn $temp;\n\t}\nelse\n\t{\n\treturn $vars;\n\t}\n}", "function clean_input($cleanme = false)\n{\n \n // decode the JSON data\n $result = json_decode($cleanme, true);\n \n // switch and check possible JSON errors\n switch (json_last_error()) {\n case JSON_ERROR_NONE:\n $error = ''; // JSON is valid // No error has occurred\n break;\n case JSON_ERROR_DEPTH:\n $error = 'The maximum stack depth has been exceeded.';\n break;\n case JSON_ERROR_STATE_MISMATCH:\n $error = 'Invalid or malformed JSON.';\n break;\n case JSON_ERROR_CTRL_CHAR:\n $error = 'Control character error, possibly incorrectly encoded.';\n break;\n case JSON_ERROR_SYNTAX:\n $error = 'Syntax error, malformed JSON.';\n break;\n // PHP >= 5.3.3\n case JSON_ERROR_UTF8:\n $error = 'Malformed UTF-8 characters, possibly incorrectly encoded.';\n break;\n default:\n $error = 'Unknown JSON error occured.';\n break;\n }\n \n if ($error !== '') {\n \n return false;\n }\n // everything is OK\n if (array_key_exists('appheader', $result)) {\n $block = implode(\" \", $result[\"appheader\"][\"datablock\"]);\n $hash = implode(\" \", $result[\"appheader\"][\"hashofdatablock\"]);\n \n } else {\n return false;\n }\n \n \n $check = (!empty($block) && !empty($hash)) ? check_blockhash($block, $hash) : false;\n if ($check == false) {\n return false;\n }\n $check = check_originator($result);\n if ($check == false) {\n return false;\n }\n return $check;\n \n \n //example of use: $output = clean_input($json_string); \n \n}", "protected function getValuesFromPOST(array &$errors) {\n\t\t$name = Strings::normalize(Request::getPOST('name'));\n\t\tif (!$name)\n\t\t\t$errors[] = array('name',\n\t\t\t\tTranslation::defaultGet('Premanager', 'noUserNameInputtedError'));\n\t\telse if (!User::isValidName($name))\n\t\t\t$errors[] = array('name',\n\t\t\t\tTranslation::defaultGet('Premanager', 'nameContainsSlashes'));\n\t\telse if (!User::isNameAvailable($name, $this->_user))\n\t\t\t$errors[] = array('name',\n\t\t\t\tTranslation::defaultGet('Premanager', 'userNameAlreadyExistsError'));\n\t\n\t\t$password = Request::getPOST('password');\n\t\tif ($password || !$this->_user) {\n\t\t\t$passwordConfirmation = Request::getPOST('passwordConfirmation');\n\t\t\tif (!$password)\n\t\t\t\t$errors[] = array('password',\n\t\t\t\t\tTranslation::defaultGet('Premanager', 'noPasswordInputtedError'));\n\t\t\telse {\n\t\t\t\tif (!$passwordConfirmation)\n\t\t\t\t\t$errors[] = array('passwordConfirmation',\n\t\t\t\t\t\tTranslation::defaultGet('Premanager',\n\t\t\t\t\t\t'noPasswordConfirmationInputtedError'));\n\t\t\t\tif ($password && $passwordConfirmation &&\n\t\t\t\t\t$password != $passwordConfirmation)\n\t\t\t\t\t$errors[] = array('passwordConfirmation',\n\t\t\t\t\t\tTranslation::defaultGet('Premanager',\n\t\t\t\t\t\t'passwordConfirmationInvalidError'));\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t$email = Strings::normalize(Request::getPOST('email'));\n\t\t$emailConfirmation =\n\t\t\tStrings::normalize(Request::getPOST('emailConfirmation'));\n\t\tif ($email) {\n\t\t\tif (!User::isValidEmail($email))\n\t\t\t\t$errors[] = array('email',\n\t\t\t\t\tTranslation::defaultGet('Premanager', 'invalidEmailAddressError'));\n\t\t\telse if (!User::isEmailAvailable($email, $this->_user))\n\t\t\t\t$errors[] = array('email', Translation::defaultGet('Premanager',\n\t\t\t\t\t'emailAddressAlreadyInUseError'));\n\t\t\telse if (!$emailConfirmation)\n\t\t\t\t$errors[] = array('emailConfirmation', Translation::defaultGet(\n\t\t\t\t\t'Premanager', 'noEmailConfirmationInputtedError'));\n\t\t\telse if ($emailConfirmation != $email)\n\t\t\t\t$errors[] = array('emailConfirmation', Translation::defaultGet(\n\t\t\t\t\t'Premanager', 'emailConfirmationInvalidError'));\n\t\t}\n\t\t\n\t\tif (!$this->_user || $this->_user->getID())\n\t\t\t$isEnabled = !!Request::getPOST('isEnabled');\n\t\telse\n\t\t\t$isEnabled = true;\n\t\t\n\t\treturn array(\n\t\t\t'name' => $name,\n\t\t\t'email' => $email,\n\t\t\t'emailConfirmation' => $emailConfirmation,\n\t\t\t'password' => $password,\n\t\t\t'passwordConfirmation' => $passwordConfirmation,\n\t\t\t'isEnabled' => $isEnabled);\n\t}", "function checkInput()\n\t{\n\t\tglobal $lng;\n\t\t\n\t\tinclude_once \"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php\";\n\t\tif (is_array($_POST[$this->getPostVar()])) $_POST[$this->getPostVar()] = ilUtil::stripSlashesRecursive($_POST[$this->getPostVar()], false, ilObjAdvancedEditing::_getUsedHTMLTagsAsString(\"assessment\"));\n\t\t$foundvalues = $_POST[$this->getPostVar()];\n\t\tif (is_array($foundvalues))\n\t\t{\n\t\t\t// check answers\n\t\t\tif (is_array($foundvalues['answer']))\n\t\t\t{\n\t\t\t\tforeach ($foundvalues['answer'] as $aidx => $answervalue)\n\t\t\t\t{\n\t\t\t\t\tif (((strlen($answervalue)) == 0) && (strlen($foundvalues['imagename'][$aidx]) == 0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\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\t// check points\n\t\t\t$max = 0;\n\t\t\tif (is_array($foundvalues['points']))\n\t\t\t{\n\t\t\t\tforeach ($foundvalues['points'] as $points)\n\t\t\t\t{\n\t\t\t\t\tif ($points > $max) $max = $points;\n\t\t\t\t\tif (((strlen($points)) == 0) || (!is_numeric($points))) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_numeric_value_required\"));\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tforeach ($foundvalues['points_unchecked'] as $points)\n\t\t\t\t{\n\t\t\t\t\tif ($points > $max) $max = $points;\n\t\t\t\t\tif (((strlen($points)) == 0) || (!is_numeric($points))) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_numeric_value_required\"));\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\tif ($max == 0)\n\t\t\t{\n\t\t\t\t$this->setAlert($lng->txt(\"enter_enough_positive_points\"));\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (is_array($_FILES) && count($_FILES) && $this->getSingleline())\n\t\t\t{\n\t\t\t\tif (!$this->hideImages)\n\t\t\t\t{\n\t\t\t\t\tif (is_array($_FILES[$this->getPostVar()]['error']['image']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($_FILES[$this->getPostVar()]['error']['image'] as $index => $error)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// error handling\n\t\t\t\t\t\t\tif ($error > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tswitch ($error)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_INI_SIZE:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_size_exceeds\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_FORM_SIZE:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_size_exceeds\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_PARTIAL:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_partially_uploaded\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_NO_FILE:\n\t\t\t\t\t\t\t\t\t\tif ($this->getRequired())\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ((!strlen($foundvalues['imagename'][$index])) && (!strlen($foundvalues['answer'][$index])))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_no_upload\"));\n\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_NO_TMP_DIR:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_missing_tmp_dir\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_CANT_WRITE:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_cannot_write_to_disk\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_EXTENSION:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_upload_stopped_ext\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\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\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($this->getRequired())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_no_upload\"));\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (is_array($_FILES[$this->getPostVar()]['tmp_name']['image']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$filename = $_FILES[$this->getPostVar()]['name']['image'][$index];\n\t\t\t\t\t\t\t$filename_arr = pathinfo($filename);\n\t\t\t\t\t\t\t$suffix = $filename_arr[\"extension\"];\n\t\t\t\t\t\t\t$mimetype = $_FILES[$this->getPostVar()]['type']['image'][$index];\n\t\t\t\t\t\t\t$size_bytes = $_FILES[$this->getPostVar()]['size']['image'][$index];\n\t\t\t\t\t\t\t// check suffixes\n\t\t\t\t\t\t\tif (strlen($tmpname) && is_array($this->getSuffixes()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!in_array(strtolower($suffix), $this->getSuffixes()))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_wrong_file_type\"));\n\t\t\t\t\t\t\t\t\treturn false;\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\n\t\t\t\t\tif (is_array($_FILES[$this->getPostVar()]['tmp_name']['image']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$filename = $_FILES[$this->getPostVar()]['name']['image'][$index];\n\t\t\t\t\t\t\t$filename_arr = pathinfo($filename);\n\t\t\t\t\t\t\t$suffix = $filename_arr[\"extension\"];\n\t\t\t\t\t\t\t$mimetype = $_FILES[$this->getPostVar()]['type']['image'][$index];\n\t\t\t\t\t\t\t$size_bytes = $_FILES[$this->getPostVar()]['size']['image'][$index];\n\t\t\t\t\t\t\t// virus handling\n\t\t\t\t\t\t\tif (strlen($tmpname))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$vir = ilUtil::virusHandling($tmpname, $filename);\n\t\t\t\t\t\t\t\tif ($vir[0] == false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_virus_found\").\"<br />\".$vir[1]);\n\t\t\t\t\t\t\t\t\treturn false;\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\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn $this->checkSubItemsInput();\n\t}", "function GetTokenValidateRequest($Payloads) {\n\n if(!$Payloads ['Email'] || !$Payloads ['Password'] ) {\n Return \"False\" ;\n }\n return \"True\";\n\n}", "private function getPostData() {\n\t\t$data = null;\n\t\t\n\t\t// Get from the POST global first\n\t\tif (empty($_POST)) {\n\t\t\t// For API calls we need to look at php://input\n\t\t\tif (!empty(file_get_contents('php://input'))) {\n\t\t\t\t$data = @json_decode(file_get_contents('php://input'), true);\n\t\t\t\tif ($data === false || $data === null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//TODO: What is this for? isn't 'php://input' always empty at this point?\n\t\t\t\t$dataStr = file_get_contents('php://input');\n\t\t\t\tparse_str($dataStr, $data);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$data = $_POST;\n\t\t}\n\t\t\n\t\t// Normalize boolean values\n\t\tforeach ($data as $name => &$value) {\n\t\t\tif ($value === 'true') {\n\t\t\t\t$value = true;\n\t\t\t}\n\t\t\telse if ($value === 'false') {\n\t\t\t\t$value = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "public function ram_input($cikk =''){\n if (bothAdminSeller($_SESSION[\"jog\"])) {\n $warranity = $this->adminModel->getWarranity();\n $data = [\n 'main_title' => 'RAM-ok bevitele',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => '',\n 'socets' => $this->ramModel->ramSocets(),\n 'warr' => $warranity,\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' => '',\n 'warranity' => '',\n 'price' => '',\n 'type' => '',\n 'man_type' => '',\n 'capacity' => '',\n 'timing' => '',\n 'voltage' => '',\n 'clock' => '',\n 'kit' => '',\n 'xmp' => 0,\n 'man_url' => '',\n 'picUrl' => '',\n 'disabledIn' => '',\n 'disabledMod' => 'disabled'\n ];\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n if (isset($_POST['ram_input'])) {\n $data = [\n 'main_title' => 'RAM-ok bevitele',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => trim($_POST[\"ram_cikkszam\"]),\n 'socets' => $this->ramModel->ramSocets(),\n 'selected_socket' => trim($_POST[\"foglalat\"]),\n 'warr' => $warranity,\n 'warranity' => trim($_POST[\"warranity\"]),\n 'price' => trim($_POST[\"price\"]),\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' =>trim($_POST[\"manufacturer\"]),\n 'type' => trim($_POST[\"type\"]),\n 'man_type' => trim($_POST[\"man_type\"]),\n 'capacity' => trim($_POST[\"capacity\"]),\n 'timing' => trim($_POST[\"timing\"]),\n 'voltage' => trim($_POST[\"voltage\"]),\n 'clock' => trim($_POST[\"clock\"]),\n 'kit' => trim($_POST[\"kit\"]),\n 'xmp' => trim($_POST[\"xmp\"]),\n 'man_url' => trim($_POST[\"man_url\"]),\n 'picUrl' => trim($_POST[\"picUrl\"]),\n 'disabledIn' => '',\n 'disabledMod' => 'disabled'\n ];\n if ($this->ramModel->ramProductInput($data) && $this->ramModel->manUrl($data[\"ram_cikkszam\"],$data[\"man_url\"]) && $this->ramModel->picUrl($data[\"ram_cikkszam\"],$data[\"picUrl\"]) && $this->ramModel->priceInput($data[\"ram_cikkszam\"],$data[\"price\"])) {\n flash(\"ramInputSuccess\",\"A (\".$data[\"type\"].\") típusú RAM bevitele sikeres volt\");\n redirect(\"admins/ram_input\");\n }else{\n flash(\"ramInputFail\",\"A (\".$data[\"type\"].\") típusú RAM bevitele sikertelen volt\", \"alert alert-danger\");\n redirect(\"admins/ram_input\");\n }\n }elseif(isset($_POST[\"editRAM\"])){\n $item = $this->ramModel->ramByCikkszam($cikk);\n $data = [\n 'main_title' => $cikk.' Módosítása',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => $item->cikkszam,\n 'socets' => $this->ramModel->ramSocets(),\n 'selected_socket' => $item->tipus,\n 'warr' => $warranity,\n 'warranity' => $item->WMonth,\n 'price' => $item->ramPrice,\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' => $item->manufacturer,\n 'type' => $item->type,\n 'man_type' => $item->typeCode,\n 'capacity' => $item->capacity,\n 'timing' => $item->timing,\n 'voltage' => $item->voltage,\n 'clock' => $item->clock,\n 'kit' => $item->kit,\n 'xmp' => $item->is_xmp,\n 'man_url' => $item->Url,\n 'picUrl' => $item->picUrl,\n 'disabledIn' => 'disabled',\n 'disabledMod' => ''\n ];\n }\n elseif (isset($_POST[\"ram_modify\"])) {\n $data = [\n 'cikkszam' => $cikk,\n 'selected_socket' => trim($_POST[\"foglalat\"]),\n 'warranity' => trim($_POST[\"warranity\"]),\n 'price' => trim($_POST[\"price\"]),\n 'manufacturer' =>trim($_POST[\"manufacturer\"]),\n 'type' => trim($_POST[\"type\"]),\n 'man_type' => trim($_POST[\"man_type\"]),\n 'capacity' => trim($_POST[\"capacity\"]),\n 'timing' => trim($_POST[\"timing\"]),\n 'voltage' => trim($_POST[\"voltage\"]),\n 'clock' => trim($_POST[\"clock\"]),\n 'kit' => trim($_POST[\"kit\"]),\n 'xmp' => trim($_POST[\"xmp\"]),\n 'man_url' => trim($_POST[\"man_url\"]),\n 'picUrl' => trim($_POST[\"picUrl\"]),\n ];\n if ($this->ramModel->ramProductModify($data) &&$this->ramModel->picUrlModify($data[\"cikkszam\"], $data[\"picUrl\"]) && $this->ramModel->manUrlModify($data[\"cikkszam\"],$data[\"man_url\"]) && $this->ramModel->ramPriceModify($data[\"cikkszam\"], $data[\"price\"]))\n {\n flash('ramModifySuccess','A ('.$data[\"type\"].' '.$data[\"typeCode\"].') Módosítása sikeres volt!');\n redirect(\"admins/ram_input\");\n }else{\n flash(\"ramModifyFail\", 'A ('.$data[\"type\"].' '.$data[\"typeCode\"].') Módosítása sikertelen volt!', 'alert alert-danger');\n redirect(\"admins/ram_input\");\n }\n } \n \n }\n $this->view('admin/ram_input',$data);\n }else{\n redirect('index');\n }\n \n }", "protected function validate_data_fields(){\n\t\tif(empty($this->RESPONSE)){throw new Exception(\"Response field not found\", 5);}\n\t\t\n\t\t// The remote IP address is also required\n\t\tif($this->validate_ip($this->REMOTE_ADDRESS)){throw new Exception(\"Renote IP address not set correctly\", 6);}\n\t}", "public function getFormData(){\n\n\t\t\t\n\t\t\t$expectedVariables = ['title','email','checkbox'];\n\n\n\t\t\tforeach ($expectedVariables as $variable) {\n\n\t\t\t\t// creating entries for error field\t\n\t\t\t\t$this->moviesuggest['errors'][$variable]=\"\";\n\n\t\t\t\t// move all $_POST values into MovieSuggest array\n\t\t\t\tif(isset($_POST[$variable])){\n\t\t\t\t\t$this->moviesuggest[$variable] = $_POST[$variable];\n\t\t\t\t}else{\n\t\t\t\t\t$this->moviesuggest[$variable] = \"\";\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// var_dump($moviesuggest);\n\t\t\t// die();\n\t}", "function _verify(){\n $e = \"\";\n if (isset($_POST['verder'])) {\n foreach($_POST as $key=>$value){\n if($key== 'verder') continue;\n $value = validate($value);\n if(!$this->_existsInDatabase($value)){\n $e = \"ID komt niet voor in Database\";\n }\n }\n }\n return $e;\n }", "public function validasiApoteker(){\n\n\t\t$this->load->model('m_jadwal');\n\n\t\t$data= array(\"idapoteker\"=>null, \"idjadwala\"=>null, \"namaapoteker\"=>null, \"lihatjadwalapt\"=>$this->m_jadwal->getDataApoteker());\n\n\t\t$idapt = $this->input->post('idapt');\n\n\t\t$cek = $this->isValid($idapt);\n\n\t\tif($cek == \"null\"){\n\t\t\tredirect(base_url().'jadwal/apoteker?error=idapotekernull');\n\n\t\t}\n\n\t\telse if(preg_match('/[^a-z0-9]/i', $cek)){\n\t\t\tredirect(base_url().'jadwal/apoteker?error=symbolerror');\n\t\t}\n\n\t\telse {\n\t\t\t\n\t\t\t$this->tampilApoteker($idapt);\n\t\t}\n\t}", "function check_reffer_code(){\n\t$reffer_code=$_REQUEST['reffer_code'];\n\tif(!empty($reffer_code)){\n\t\t$reffer_records = $this -> conn -> get_table_row_byidvalue('user', 'user_refferal_code', $reffer_code);\n\t\tif(!empty($reffer_records)){\n\t\t\t$user_id=$reffer_records[0]['user_id'];\n\t\t\t$user_reffer_code=$reffer_records[0]['user_refferal_code'];\n\t\t\tif($user_reffer_code==$reffer_code){\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Reffer code avalible\", 'reffer_code' => $reffer_code,'user_id'=>$user_id);\n\t\t\t}else{\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid reffer code\");\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid reffer code\");\n\t\t}\n\t}else{\n\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\",'reffer_code'=>$reffer_code);\n\t}\n\techo $this -> json($post);\n}", "public function checkUniquedocReq()\r\n\t{\r\n\t\t$exp = $_POST['value'];\r\n\t\t$qstage = $this->Document_Req_model->checkUniquedocReq($exp);\r\n\t\t\r\n\t\tif(count($qstage) > 0){ echo 1; }else{ echo 0; }\r\n\t}", "protected function getPostValues() {}", "private function validateFields()\n {\n $errors = array();\n for ($x=0; $x < count($this->_fields); $x++)\n {\n $field = $this->_fields[$x];\n if ($field['type'] == WFT_CC_EXPIRATION)\n {\n // one or both fields left blank\n if (strlen(trim($this->getPostValue($field['id'] . 'Month'))) == 0 ||\n strlen(trim($this->getPostValue($field['id'] . 'Year'))) == 0)\n {\n if ($field['required'])\n $errors[] = 'You must select an card expiration month and year';\n $monthValue = $yearValue = -1;\n $value = '';\n }\n else\n {\n $monthValue = intval($this->getPostValue($field['id'] . 'Month'));\n $yearValue = intval($this->getPostValue($field['id'] . 'Year'));\n $curYear = intval(date('Y'));\n if ($yearValue < $curYear)\n $errors[] = 'The expiration year is in the past';\n if ($monthValue < 1 || $monthValue > 12)\n $errors[] = 'The expiration month is not valid';\n }\n }\n else if($field['required'] && !strlen(trim($this->getPostValue($field['id']))))\n {\n if (strlen($field['caption']) > 0)\n $errors[] = $field['caption'] . ' is a required field';\n else\n $errors[] = 'This field is required';\n $value = '';\n }\n else if($field['type'] == WFT_CURRENCY)\n {\n $value = trim($this->getPostValue($field['id']));\n $value = str_replace('$', '', $value);\n $cur = floatval($value);\n $value = strval($cur);\n }\n else if($field['type'] == WFT_ANTI_SPAM_IMAGE)\n {\n $antiSpamInput = $this->getPostValue($field['id']);\n $wordVerifyID = $this->getPostValue('wordVerifyID');\n $graphs = new Graphs();\n $wordVerifyText = $graphs->getVerificationImageText($wordVerifyID);\n if (strtoupper($antiSpamInput) != $wordVerifyText || $antiSpamInput == '')\n {\n $errors[] = 'The text you entered did not correspond with the text in the security image';\n $value = 0;\n }\n else\n {\n $value = 1;\n }\n $graphs->clearVerificationImageText($wordVerifyID);\n }\n else if($field['type'] == WFT_SELECT || $field['type'] == WFT_CC_TYPE || $field['type'] == WFT_BOOLEAN)\n {\n $value = $this->getPostValue($field['id']);\n if (!strcmp($value, 'noset'))\n {\n $errors[] = $field['caption'] . ': You must select an option';\n }\n }\n else if($field['type'] == WFT_CC_NUMBER)\n {\n $value = '';\n // Clean credit card number input\n $cardNumber = preg_replace('/[^0-9]/', '', $this->getPostValue($field['id']));\n\n if ($field['required'] == false && !strlen($cardNumber))\n {\n $value = '';\n }\n else\n {\n // Guess the card type by using a pregex pattern matching algorithm\n $cardType = $this->getCreditCardTypeByNumber($cardNumber);\n if ($cardType == -1)\n $errors[] = 'The credit card number you entered is not a recognized Visa, MasterCard, American Express '\n . 'or Discover card.';\n else if (!$this->isCardNumberValid($cardType, $cardNumber))\n $errors[] = 'The credit card number you entered has not been recognized and may be invalid.';\n else\n {\n // Valid card number, now change all card type fields to match\n // the autodetected card type (visa, mastercard, etc.)\n $value = $cardNumber;\n $cardTypeName = $this->getCreditCardName($cardType);\n\n for ($y=0; $y < count($this->_fields); $y++)\n {\n if ($this->_fields[$y]['type'] == WFT_CC_TYPE)\n {\n $this->_fields[$y]['validatedDataOverride'] = $cardTypeName;\n $this->_fields[$y]['validatedData'] = $cardTypeName;\n }\n }\n }\n }\n }\n else\n {\n $value = trim($this->getPostValue($field['id']));\n\n if (!($field['required'] == false && !strlen($value)))\n {\n if (strlen($field['regex_test']) > 0)\n {\n if (!preg_match($field['regex_test'], $value))\n {\n $errors[] = $field['regex_fail'];\n }\n }\n if (strlen($value) < $field['length'][0] || strlen($value) > $field['length'][1])\n {\n if ($field['length'][0] == $field['length'][1])\n {\n if (strlen(trim($field['caption'])) > 0)\n $errors[] = sprintf(\"%s must be %d characters in length\",\n $field['caption'], $field['length'][0]);\n else\n $errors[] = sprintf(\"This field must be %d characters in length\",\n $field['length'][0]);\n }\n else\n $errors[] = sprintf(\"%s must be between %s characters in length\",\n $field['caption'], implode(' and ', $field['length']));\n }\n }\n $value = str_replace(array(\"\\r\",\"\\n\",\"\\t\",\"\\f\"), '', strip_tags($value));\n }\n\n // Set the validated (form returned) data\n switch($field['type'])\n {\n case WFT_CC_EXPIRATION:\n if ($monthValue != -1 && $yearValue != -1)\n $this->_fields[$x]['validatedData'] = sprintf('%d/%d', $monthValue, $yearValue);\n else\n $this->_fields[$x]['validatedData'] = '';\n break;\n default:\n if (isset($this->_fields[$x]['validatedDataOverride']) && strlen($this->_fields[$x]['validatedDataOverride']))\n $this->_fields[$x]['validatedData'] = $this->_fields[$x]['validatedDataOverride'];\n else\n $this->_fields[$x]['validatedData'] = $value;\n break;\n }\n }\n return $errors;\n }", "public function insert_post()\r {\r if ((!$this->post('email') || !$this->post('street') || !$this->post('number') || !$this->post('area')\r || !$this->post('tel_num') || !$this->post('zip_code') || !$this->post('token') || !$this->post('alias'))\r ) {\r $this->response([\r 'status' => FALSE,\r 'message' => 'You have not provided all the requested data!'\r ], REST_Controller::HTTP_BAD_REQUEST);\r }\r\r $this->load->model('Users_model');\r $user_id = $this->Users_model->get_user_id_by_email($this->post('email'));\r\r if (!$user_id) {\r $this->response([\r 'status' => FALSE,\r 'message' => 'User not found'\r ], REST_Controller::HTTP_FORBIDDEN);\r }\r\r $this->load->model('Logged_users_model');\r $returned_token = $this->Logged_users_model->getToken($user_id);\r\r if (!$returned_token) {\r $this->response([\r 'status' => FALSE,\r 'message' => 'Session not found.'\r ], REST_Controller::HTTP_BAD_REQUEST);\r }\r\r $token = $this->post('token');\r\r // Check user token\r if ($token != $returned_token) {\r $this->response([\r 'status' => FALSE,\r 'message' => 'Unauthorized action!'\r ], REST_Controller::HTTP_UNAUTHORIZED);\r }\r\r // Check if zip code has anything other than digits\r if ((is_numeric($this->post('zip_code')) === false)) {\r\r $this->response([\r 'status' => FALSE,\r 'message' => 'Zip Code is invalid!'\r ], REST_Controller::HTTP_BAD_REQUEST);\r }\r\r // Check if phone number has anything other than digits or is longer than 15 digits\r if ((is_numeric($this->post('tel_num')) === false)\r || strlen((string)$this->post('tel_num')) > 15\r ) {\r\r $this->response([\r 'status' => FALSE,\r 'message' => 'Phone number is invalid!'\r ], REST_Controller::HTTP_BAD_REQUEST);\r }\r\r $data = array();\r $data['user_id'] = $user_id;\r $data['street'] = $this->post('street');\r $data['number'] = $this->post('number');\r $data['area'] = $this->post('area');\r $data['tel_num'] = $this->post('tel_num');\r $data['zip_code'] = $this->post('zip_code');\r $data['alias'] = $this->post('alias');\r\r $this->load->model('Addresses_model');\r $addedAddressId = $this->Addresses_model->insert_address($data);\r\r if (!$addedAddressId) {\r $this->response([\r 'status' => FALSE,\r 'message' => 'An error occurred.Please try again!'\r ], REST_Controller::HTTP_BAD_REQUEST);\r } else {\r $this->response([\r 'status' => TRUE,\r 'message' => 'Address was successfully inserted!'\r ], REST_Controller::HTTP_OK);\r }\r }", "public function validateReuest()\r\n {\r\n //echo $_SERVER['CONTENT_TYPE']; exit;\r\n\r\n if($_SERVER['CONTENT_TYPE'] !== 'application/json')\r\n {\r\n $this->throwError(REQUEST_CONTENTTYPE_NOT_VALID, 'Request Content-Type is not Valid');\r\n }\r\n\r\n // decode it into array format.\r\n $data = json_decode($this->request, true);\r\n // to check the data in array.\r\n //print_r($data);\r\n\r\n\r\n // check if api name is reuired or not\r\n if(!isset($data['name']) || $data['name'] == \"\")\r\n {\r\n $this->throwError(API_NAME_REQUIRED, \"API Name is Required.\");\r\n }\r\n $this->serviceName = $data['name'];\r\n\r\n\r\n // check if parameters name is reuired or not\r\n if(!is_array($data['param']))\r\n {\r\n $this->throwError(API_PARAM_REQUIRED, \"API PARAM is Required.\");\r\n }\r\n $this->param = $data['param'];\r\n }", "function ajax_validate_data()\n {\n\t$item = $this->input->post('item');\n\t$type = $this->input->post('type');\n\t$result = $this->_get_where_custom($type, $item)->result();\n\tif (count($result) > 0) {\n\t echo json_encode(['status' => FALSE]);\n\t} else {\n\t echo json_encode(['status' => TRUE]);\n\t}\n }", "public function ExamInvigilatorsSubmit(){\n \n $now=date('Y-m-d H:i:s');\n $rule = [\n 'invigilators_exam_date'=>'Required',\n 'invigilators_exam_type'=>'Required',\n 'invigilators_exam_room'=>'Required',\n 'invigilators_ID'=>'Required',\n 'invigilators_exam_year'=>'Required',\n 'invigilators_exam_semester'=>'Required',\n 'invigilators_exam_time_slot'=>'Required',\n ];\n\n $v = \\Validator::make(\\Request::all(),$rule);\n\n if($v->passes()){\n \n if(!empty($_POST['invigilators_ID'])){\n $faculties = implode(',', $_POST['invigilators_ID']);\n }else $faculties='';\n\n $invigilators_exam_tran_code=\\Uuid::generate(4);\n $invigilators_exam_data=array(\n 'invigilators_exam_tran_code'=>$invigilators_exam_tran_code->string,\n 'invigilators_exam_date'=>\\Request::input('invigilators_exam_date'),\n 'invigilators_exam_type'=>\\Request::input('invigilators_exam_type'),\n 'invigilators_ID'=>$faculties,\n 'invigilators_exam_year'=>\\Request::input('invigilators_exam_year'),\n 'invigilators_exam_semester'=>\\Request::input('invigilators_exam_semester'),\n 'invigilators_exam_room'=>\\Request::input('invigilators_exam_room'),\n 'invigilators_exam_time_slot'=>\\Request::input('invigilators_exam_time_slot'),\n 'invigilators_exam_status'=>1,\n 'created_at' =>$now,\n 'updated_at' =>$now,\n 'created_by' =>\\Auth::user()->user_id,\n 'updated_by' =>\\Auth::user()->user_id,\n );\n\n try{\n\n $success = \\DB::transaction(function () use ($invigilators_exam_data) {\n\n for($i=0; $i<count($this->dbList); $i++){\n $save_transaction=\\DB::connection($this->dbList[$i])->beginTransaction();\n\n $exam_invigilators_save = \\DB::connection($this->dbList[$i])->table('univ_invigilators_exam')->insert($invigilators_exam_data);\n if(!$exam_invigilators_save){\n $error=1;\n }\n }\n\n if(!isset($error)){\n \\App\\System::TransactionCommit();\n \\App\\System::EventLogWrite('insert,univ_invigilators_exam',json_encode($invigilators_exam_data)); \n }else{\n \\App\\System::TransactionRollback();\n throw new Exception(\"Error Processing Request\", 1);\n }\n });\n\n return \\Redirect::to('/register/schedule/exam-schedule?tab=exam_invigilators')->with('message',\"Invigilators Added Successfully!\");\n\n\n }catch(\\Exception $e){\n $message = \"Message : \".$e->getMessage().\", File : \".$e->getFile().\", Line : \".$e->getLine();\n \\App\\System::ErrorLogWrite($message);\n\n return \\Redirect::to('/register/schedule/exam-schedule?tab=exam_invigilators')->with('message','Something wrong !!');\n }\n\n }return \\Redirect::to('/register/schedule/exam-schedule?tab=exam_invigilators')->withInput(\\Request::all())->withErrors($v->messages());\n\n }", "protected function customer_has_ebanx_required_data() {\n\t\t$card = current( array_filter( (array) array_filter( get_user_meta( $this->userId, '_ebanx_credit_card_token', true ) ), function ( $card ) {\n\t\t\t\t\treturn $card->token == $_GET['_ebanx_one_click_token'];\n\t\t\t\t} ) );\n\t\t$names = $this->gateway->names;\n\n\t\t$_POST['ebanx_token'] = $card->token;\n\t\t$_POST['ebanx_masked_card_number'] = $card->masked_number;\n\t\t$_POST['ebanx_brand'] = $card->brand;\n\t\t$_POST['ebanx_billing_cvv'] = $_GET['_ebanx_one_click_cvv'];\n\t\t$_POST['ebanx_is_one_click'] = true;\n\t\t$_POST['ebanx_billing_instalments'] = $_GET['_ebanx_one_click_installments'];\n\n\t\t$_POST[$names['ebanx_billing_brazil_document']] = get_user_meta( $this->userId, '_ebanx_billing_brazil_document', true );\n\t\t$_POST[$names['ebanx_billing_brazil_birth_date']] = get_user_meta( $this->userId, '_ebanx_billing_brazil_birth_date', true );\n\n\t\t$_POST['billing_postcode'] = $this->get_user_billing_address()['postcode'];\n\t\t$_POST['billing_address_1'] = $this->get_user_billing_address()['address_1'];\n\t\t$_POST['billing_city'] = $this->get_user_billing_address()['city'];\n\t\t$_POST['billing_state'] = $this->get_user_billing_address()['state'];\n\n\t\tif ( empty( $_POST['ebanx_token'] ) ||\n\t\t\tempty( $_POST['ebanx_masked_card_number'] ) ||\n\t\t\tempty( $_POST['ebanx_brand'] ) ||\n\t\t\tempty( $_POST['ebanx_billing_instalments'] ) ||\n\t\t\tempty( $_POST['ebanx_billing_cvv'] ) ||\n\t\t\tempty( $_POST['ebanx_is_one_click'] ) ||\n\t\t\t!isset( $_POST[$names['ebanx_billing_brazil_document']] ) ||\n\t\t\tempty( $_POST[$names['ebanx_billing_brazil_document']] ) ||\n\t\t\tempty( $_POST['ebanx_billing_brazil_birth_date'] )\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function _validate()\n {\n\t\t$data = array();\n\t\t$data['error_string'] = array();\n\t\t$data['inputerror'] = array();\n\t\t$data['status'] = TRUE;\n\n\t\tif($this->input->post('status') === 'SelecteerStatus')\n\t\t{\n $data['inputerror'][] = 'status';\n $data['error_string'][] = 'Status is verplicht!';\n $data['status'] = FALSE;\n\t\t}\n\t\t\n\t\tif($this->input->post('prioriteit') === 'SelecteerPrioriteit')\n\t\t{\n\t\t\t$data['inputerror'][] = 'prioriteit';\n\t\t\t$data['error_string'][] = 'Prioriteit is verplicht!';\n\t\t\t$data['status'] = FALSE;\n\t\t}\n\n\t\tif(empty($this->input->post('Categorie')))\n\t\t{\n\t\t\t$data['inputerror'][] = 'categorie';\n\t\t\t$data['error_string'][] = 'Categorie is verplicht!';\n\t\t\t$data['status'] = FALSE;\n\t\t}\n if($this->input->post('werkman') === 'Selecteer')\n {\n $data['inputerror'][] = 'werkman';\n $data['error_string'][] = 'Werkman toewijzen is verplicht!';\n $data['status'] = FALSE;\n }\n\n\t\tif($data['status'] === FALSE)\n\t\t{\n\t\t\techo json_encode($data);\n\t\t\texit();\n\t\t}\n }", "public function formdata_add($posts,$json){\n \n $input = array('radio','select','checkbox');\n $this->db->insert('form_submission',$json);\n foreach($posts as $post){\n if(in_array($post['type'],$input)){\n $form = array(\n 'form_field_id'=>$post['form_field_id'],\n 'user_id'=> $post['user_id'],\n 'form_id'=>$post['form_id'],\n 'form_option_id'=>$post['option_id']\n );\n $this->db->insert('user_form_info_options',$form);\n }else{\n $form = array(\n 'form_field_id'=>$post['form_field_id'],\n 'user_id'=> $post['user_id'],\n 'form_id'=>$post['form_id'],\n 'answer'=>$post['answer']\n );\n $this->db->insert('user_form_info_text',$form);\n }\n }\n //$loc_id = $this->db->insert_id();\n //print_r($country); exit;\n return $post['form_id'];\n }", "public function verify_otp_post(){\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n\n $required_parameter = array('otp','user_id');\n $chk_error = $this->controller->check_required_value($required_parameter, $data);\n if ($chk_error) \n {\n $resp = array('code' => 'MISSING_PARAM', 'message' => 'Missing ' . strtoupper($chk_error['param']));\n @$this->response($resp);\n }\n\n $otp = $data['otp'];\n $user_id = $data['user_id'];\n\n $where = array(\n 'user_id' => $user_id,\n 'otp' => $otp\n ); \n\n $verify = $this->model->getAllwhere('otp_master',$where);\n if(!empty($verify)){\n $update = array('is_active'=> 1);\n $this->model->updateFields('users',$update,array('id'=>$user_id));\n $this->model->delete('otp_master',array('user_id'=>$user_id));\n $resp = array(\n 'rccode' => 1,\n 'message' => 'Otp Verify Successfully', \n );\n }else{\n $resp = array(\n 'rccode' => 2,\n 'message' => 'Please Enter Valid Otp', \n );\n } \n\n $this->response($resp); \n }", "private function json_submitAnswers()\n {\n $input = json_decode(file_get_contents(\"php://input\"));\n $surveyID= $input->surveyID;\n $questionID= $input->questionID;\n $answer = $input->answer;\n\n $query = \"INSERT INTO Answers (surveyID, questionID, answer, userID) VALUES (:surveyID, :questionID, :answer, :userID);\";\n\n $queryParams =\n [\n \":surveyID\" => $surveyID,\n \":questionID\" => $questionID,\n \":answer\" => $answer,\n \":userID\" => 1,\n ];\n\n // This decodes the JSON encoded by getJSONRecordSet() from an associative array\n $resSubmitAnswers = json_decode($this->recordset->getJSONRecordSet($query, $queryParams), true);\n\n $nextpage = null;\n\n $res['status'] = 200;\n $res['message'] = \"ok\";\n $res['next_page'] = $nextpage;\n $res['resSubmitAnswers'] = $resSubmitAnswers;\n return json_encode($res);\n }", "private function parseInputValues()\r\n {\r\n parse_str(file_get_contents(\"php://input\"),$data);\r\n\r\n $data = reset($data);\r\n \r\n $data = preg_split('/------.*\\nContent-Disposition: form-data; name=/', $data);\r\n \r\n $this->inputValues = array();\r\n \r\n foreach($data as $input)\r\n {\r\n // get key\r\n preg_match('/\"([^\"]+)\"/', $input, $key);\r\n \r\n // get data\r\n $input = preg_replace('/------.*--/', '', $input);\r\n \r\n // Store to an array\r\n $this->inputValues[$key[1]] = trim(str_replace($key[0], '', $input));\r\n }\r\n }", "function validar_techo_ptto(){\n if($this->input->post()){\n $proy_id=$this->security->xss_clean($this->input->post('proy_id'));\n $ptofecg_id=$this->security->xss_clean($this->input->post('ptofecg_id'));\n\n $ffofet=$this->model_faseetapa->fase_presupuesto_id($ptofecg_id);\n\n if (!empty($_POST[\"ffofet_id\"]) && is_array($_POST[\"ffofet_id\"]) ) {\n foreach ( array_keys($_POST[\"ffofet_id\"]) as $como ) {\n $get_ffofet=$this->model_faseetapa->get_techo_id($_POST[\"ffofet_id\"][$como]);\n if(count($get_ffofet)!=0){\n $update_ffofet = array(\n 'ff_id' => $_POST[\"ffin\"][$como],\n 'of_id' => $_POST[\"ofin\"][$como],\n 'ffofet_monto' => $_POST[\"importe\"][$como],\n );\n $this->db->where('ffofet_id', $_POST[\"ffofet_id\"][$como]);\n $this->db->update('_ffofet', $update_ffofet);\n }\n else{\n $data = array(\n 'ptofecg_id' => $ptofecg_id,\n 'ff_id' => $_POST[\"ffin\"][$como],\n 'of_id' => $_POST[\"ofin\"][$como],\n 'ffofet_monto' => $_POST[\"importe\"][$como],\n );\n $this->db->insert('_ffofet',$data);\n $ffofet_id=$this->db->insert_id();\n }\n \n }\n }\n\n // $this->session->set_flashdata('success','SE REGISTRO CORRECTAMENTE EL TECHO PRESUPUESTARIO DE LA OPERACIÓN - PROYECTO DE INVERSIÓN');\n redirect(site_url(\"admin\").'/proy/list_proy_fin');\n // echo 'true';\n }else{\n show_404();\n }\n }", "public function getPostData(){\n for ($t=1; $t <3 ; $t++) {\n $str = \"team\".$t;\n if(!$this->checkPost($str)) return false;\n $str = \"score_team\".$t;\n if(!$this->checkPost($str)) return false;\n for ($p=1; $p <3 ; $p++) {\n $str = \"team\".$t.\"_player\".$p;\n if(!$this->checkPost($str)) return false;\n }\n }\n return true;\n }", "private function validateTokenRequest(): bool\n {\n $validator = new Validator([\n 'required' => ':attribute — обязательное поле.',\n 'numeric' => ':attribute — поле должно содержать только цифры.',\n ]);\n\n $validator->addValidator('plain', new PlainRule());\n\n $validation = $validator->make([\n 'shop_id' => $this->getRouteParam('id'),\n 'secret_key' => $this->http_request->query->get('secret_key'),\n ], [\n 'shop_id' => 'required|numeric',\n 'secret_key' => 'required|plain',\n ]);\n\n $validation->setAliases([\n 'shop_id' => 'Идентификатор магазина',\n 'secret_key' => 'Секретный ключ',\n ]);\n\n $validation->validate();\n\n if ($validation->fails()) {\n $errors = $validation->errors()->toArray();\n\n foreach ($errors as $key => $error) {\n foreach ($error as $message) {\n $this->errors[] = [\n 'code' => 'invalid-field',\n 'message' => $message,\n 'field' => $key,\n ];\n }\n }\n\n return false;\n }\n\n return true;\n }", "private function is_valid_field_data() {\n\t\t$data = rgpost( $this->get_input_name() );\n\n\t\tif ( empty( $data ) ) {\n\t\t\tgf_recaptcha()->log_debug( __METHOD__ . \"(): Input {$this->get_input_name()} empty.\" );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn gf_recaptcha()->get_token_verifier()->verify_submission( $data );\n\t}", "public function realisasi_post() {\n \t// Load Authorization Token Library\n $this->load->library('Authorization_Token');\n\n /**\n * User Token Validation\n */\n $is_valid_token = $this->authorization_token->validateToken();\n if (!empty($is_valid_token) AND $is_valid_token['status'] === TRUE) {\n # XSS Filtering (https://www.codeigniter.com/user_guide/libraries/security.html)\n $_POST = $this->security->xss_clean($_POST);\n $headers = $this->input->request_headers();\n\n $checkProduksi = $this->model->check_data_tpb($this->post('tipe_file'), $this->post('nomor_dok_internal'), $this->post('tanggal_dok_internal'), $is_valid_token['data']->kode_trader);\n\n\n $error = 0;\n\n if ($headers['Content-Type'] != \"application/json\") {\n $message['content_type'] = 'Request header must set to Content-Type: application/json';\n $error += 1;\n } \n\n if ($checkProduksi) {\n $message['data_exist'] = \"Nomor & Tanggal Produksi sudah ada.\";\n $error += 1;\n }\n\n if (!in_array($this->post('tipe_file'), array(\"FG\",\"RM\",\"SCRAP\",\"HALF\"))) {\n $message['tipe_file'] = \"Tipe file tidak di kenali\";\n $error += 1;\n } \n\n if (empty($this->post('nomor_dok_internal'))) {\n $message['nomor_dok_internal'] = \"Nomor Dokumen Internal harus diisi\";\n $error += 1;\n } \n\n if (empty($this->post('tanggal_dok_internal'))) {\n $message['tanggal_dok_internal'] = \"Tanggal Dokumen Internal harus diisi\";\n $error += 1;\n } \n\n $details = $this->post('details');\n for ($i=0; $i < count($details); $i++) {\n if(empty($details[$i]['kode_barang'])) {\n $message['kode_barang_'.$i] = \"Kode barang harus diisi\";\n $error += 1;\n } \n\n if(empty($details[$i]['jenis_barang'])) {\n $message['jenis_barang_'.$i] = \"Jenis barang harus diisi\";\n $error += 1;\n } \n\n if(empty($details[$i]['uraian_barang'])) {\n $message['uraian_barang_'.$i] = \"Uraian barang harus diisi\";\n $error += 1;\n } \n\n if(empty($details[$i]['kode_satuan'])) {\n $message['kode_satuan_'.$i] = \"Kode satuan harus diisi\";\n $error += 1;\n } \n\n if(empty($details[$i]['jumlah_satuan'])) {\n $message['jumlah_satuan_'.$i] = \"Jumlah satuan harus diisi\";\n $error += 1;\n } \n\n if(empty($details[$i]['kode_gudang'])) {\n $message['kode_gudang_'.$i] = \"Kode gudang harus diisi\";\n $error += 1;\n }\n }\n\n if ($error > 0) {\n $this->model->save_log($message, $this->post());\n $this->response(['status' => FALSE, 'message' => $message ], REST_Controller::HTTP_UNPROCESSABLE_ENTITY);\n } else {\n $arrdata['tipe_file'] = $this->post('tipe_file');\n $arrdata['nomor_dok_internal'] = $this->post('nomor_dok_internal');\n $arrdata['tanggal_dok_internal'] = $this->post('tanggal_dok_internal');\n $arrdata['file_name'] = $this->post('file_name');\n $arrdata['kode_trader'] = $is_valid_token['data']->kode_trader;\n $arrdata['created_by'] = $is_valid_token['data']->id;\n $id_hdr = $this->model->save('t_temp_services_hdr', $arrdata, 'single');\n\n $details = $this->post('details');\n for ($i=0; $i < count($details); $i++) { \n $data_detail[$i]['kode_barang'] = $details[$i]['kode_barang'];\n $data_detail[$i]['jenis_barang'] = $details[$i]['jenis_barang'];\n $data_detail[$i]['uraian_barang'] = $details[$i]['uraian_barang'];\n $data_detail[$i]['kode_satuan'] = $details[$i]['kode_satuan'];\n $data_detail[$i]['jumlah_satuan'] = $details[$i]['jumlah_satuan'];\n $data_detail[$i]['kode_gudang'] = $details[$i]['kode_gudang'];\n $data_detail[$i]['kode_hs'] = $details[$i]['kode_hs'];\n $data_detail[$i]['id_header'] = $id_hdr;\n }\n $this->model->save('t_temp_services_dtl', $data_detail,'batch');\n $this->response(['status' => TRUE, 'message' => \"Data Berhasil Diinsert\"], REST_Controller::HTTP_OK);\n }\n } else {\n $this->model->save_log($is_valid_token['message'], $is_valid_token);\n $this->response(['status' => FALSE, 'message' => $is_valid_token['message'] ], REST_Controller::HTTP_NOT_FOUND);\n }\n }", "private function validateLoginForm(){\n $author = filter_input_array(INPUT_POST,FILTER_SANITIZE_STRING);\n $errors=[\n 'email_err'=>'',\n 'password_err'=>'',\n ];\n\n //validate email\n if(empty(trim($author['email']))){\n $errors['email_err']='Empty ! ';\n }elseif(!filter_var($author['email'],FILTER_VALIDATE_EMAIL)){\n $errors['email_err']='Invalid !';\n }elseif(!$this->authorModel->existsEmail($author['email'])){\n $errors['email_err']='Does not exist !';\n }\n //basic password validation\n if(empty(trim($author['password']))){\n $errors['password_err']='Empty !';\n }elseif(strlen($author['password'])<6){\n $errors['password_err']='Invalid !';\n }\n //final password validation\n //use a simple helper function insted of => if(empty($errors['email_err']) && empty($errors['password_err'])){\n if(!hsaError($errors)){\n $dbauthor=$this->authorModel->getAuthorByEmail($author['email']);\n if(!password_verify($author['password'],$dbauthor->password)){\n $errors['password_err']='Incorrect !';\n }\n }\n \n $output=[];\n //use a simple helper function insted of => if(empty($errors['email_err']) && empty($errors['password_err'])){\n if(!hsaError($errors)){\n $output=[\n 'result' => true,\n 'author' => $dbauthor,//this is object \n ];\n }else{\n $output=[\n 'result' => false,\n 'errors' => $errors,\n 'email'=> $author['email'],\n ];\n }\n return $output;\n }", "public function parsePostData()\n {\n }", "public function _verifyForm($submitted_values)\n{\n\t$object = new JObject;\n\t$object->error = false;\n\t$object->message = '';\n\t$user = JFactory::getUser();\n\n\tforeach ($submitted_values as $key => $value)\n\t{\n\t\tswitch ($key)\n\t\t{\n\t\t\tcase \"cardtype\":\n\t\t\t\tif (!isset($submitted_values[$key]) || !JString::strlen($submitted_values[$key]))\n\t\t\t\t:\n\t\t\t\t{\n\t\t\t\t\t$object->error = true;\n\t\t\t\t\t$object->message . = \"<li>\" . JText::_('COM_TIENDA_PAYMILL_CARD_TYPE_INVALID') . \"</li>\";\n\t\t\t\t}\n\t\t\t\tendif;\n\t\t\tbreak;\n\t\t\tcase \"cardnum\":\n\t\t\t\tif (!isset($submitted_values[$key]) || !JString::strlen($submitted_values[$key]))\n\t\t\t\t:\n\t\t\t\t{\n\t\t\t\t\t$object->error = true;\n\t\t\t\t\t$object->message . = \"<li>\" . JText::_('COM_TIENDA_PAYMILL_CARD_NUMBER_INVALID') . \"</li>\";\n\t\t\t\t}\n\t\t\t\tendif;\n\t\t\tbreak;\n\t\t\tcase \"cardexp\":\n\t\t\t\tif (!isset($submitted_values[$key]) || JString::strlen($submitted_values[$key]) != 4)\n\t\t\t\t:\n\t\t\t\t{\n\t\t\t\t\t$object->error = true;\n\t\t\t\t\t$object->message . = \"<li>\" . JText::_('COM_TIENDA_PAYMILL_CARD_EXPIRATION_DATE_INVALID') . \"</li>\";\n\t\t\t\t}\n\t\t\t\tendif;\n\t\t\tbreak;\n\t\t\tcase \"cardcvv\":\n\t\t\t\tif (!isset($submitted_values[$key]) || !JString::strlen($submitted_values[$key]))\n\t\t\t\t:\n\t\t\t\t{\n\t\t\t\t\t$object->error = true;\n\t\t\t\t\t$object->message . = \"<li>\" . JText::_('COM_TIENDA_PAYMILL_CARD_CVV_INVALID') . \"</li>\";\n\t\t\t\t}\n\t\t\t\tendif;\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn $object;\n}", "function validarCampos()\r\n\t{\r\n\t\t$retorno = array('bool' => true, 'msg' => null);\r\n\r\n\t\tforeach($_POST as $nombre_campo => $valor){\r\n\r\n\t\t\t/*\r\n\t\t\t\tVALIDACIONES\r\n\t\t\t*/\r\n\r\n\t\t\t//bool = true: caso que no exite error alguno en los campos\r\n\t\t\t//bool = false: caso que exista error...(tamano, caracteres especiales)\r\n\r\n\t\t\tif(strlen($valor) >= 1){ //no esta vacio\r\n\r\n\t\t\t\tswitch($nombre_campo){\r\n\r\n\t\t\t\t\tcase 'nombre':\r\n\r\n\t\t\t\t\t\tif(!preg_match(\"/^[a-zA-Z0-9\\_\\-]{0,40}\\s?[a-zA-Z0-9\\_\\-]{0,40}?$/\", $valor)){\r\n\r\n\t\t\t\t\t\t\t$retorno['msg'] = 'Verifica los caracteres del nombre';\r\n\t\t\t\t\t\t\t$retorno['bool'] = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase 'email':\r\n\r\n\t\t\t\t\t\tif(!preg_match(\"/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9-.]+$/\", $valor)){\r\n\r\n\t\t\t\t\t\t\t$retorno['msg'] = 'Tu correo no es valido';\r\n\t\t\t\t\t\t\t$retorno['bool'] = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase 'password':\r\n\r\n\t\t\t\t\t\tif(!preg_match(\"/^.{0,12}$/\", $valor)){\r\n\r\n\t\t\t\t\t\t\t$retorno['msg'] = 'Comprueba el limite de caracteres de tu contraseña';\r\n\t\t\t\t\t\t\t$retorno['bool'] = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t//validaciones de datos de contras\r\n\r\n\t\t\t\t\tcase 'nombreContra':\r\n\r\n\t\t\t\t\t\tif(!preg_match(\"/^.{0,20}$/\", $valor)){\r\n\r\n\t\t\t\t\t\t\t$retorno['msg'] = 'Comprueba el limite de caracteres del nombre de la contraseña';\r\n\t\t\t\t\t\t\t$retorno['bool'] = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase 'contenidoContra':\r\n\r\n\t\t\t\t\t\tif(!preg_match(\"/^.{0,30}$/\", $valor)){\r\n\r\n\t\t\t\t\t\t\t$retorno['msg'] = 'Comprueba el limite de caracteres de tu contraseña';\r\n\t\t\t\t\t\t\t$retorno['bool'] = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t} else{\r\n\r\n\t\t\t\t$retorno['msg'] = 'Por favor rellena todos los campos';\r\n\t\t\t\t$retorno['bool'] = false;\r\n\t\t\t}\r\n\t\t} \r\n\r\n\t\treturn $retorno;\r\n\t}", "public function check_response() {\n\n\t\t// To test in live mode ($_post)\n\t\t$post = ( file_get_contents( 'php://input' ) );\n\n\t\tif ( ! empty( $post ) ) {\n\t\t\tdo_action( 'valid-oyst-one-click-request', $post );\n\t\t\texit;\n\t\t}\n\t\tWC_Oyst_One_Click::log( 'Retour One Click vide', 'error' );\n\t\twp_die( 'Erreur de requête One Click', '1-Click', array( 'response' => 500 ) );\n\n\t}", "private function validateForm($_POST) {\n\n $hash = self::getHash();\n /* @var Entity\\NeoCart $cart */\n $cart = $this->NeoCartModel->getCart($hash);\n\n $cartItems = $cart->getCartItems();\n\n if (!$cartItems) {\n exit(\"Error(1:20) Va rugam contactati administratorul: [email protected]\");\n }\n\n foreach ($cartItems as $cartItem) {\n /* @var $cartItem Entity\\CartItem */\n /* @var $item Entity\\Item */\n $item = $cartItem->getItem();\n\n if ($item->getItem_type() == \"offer\") {\n for ($i = 0; $i < $cartItem->getQuantity(); $i++) {\n if ($cartItem->getIs_gift()) {\n if (strlen($_POST['name_' . $cartItem->getId()][$i]) < 2 || !filter_var($_POST['email_' . $cartItem->getId()][$i], FILTER_VALIDATE_EMAIL)) {\n $errors.= \"Introduceti corect datele prietenului !<br/>\";\n break 2;\n }\n } else\n if (strlen($_POST['name_' . $cartItem->getId()][$i]) < 2) {\n $errors.= \"Introduceti datele beneficiarului !<br/>\";\n break 2;\n }\n }\n }\n }\n //exit();\n if (!isset($_POST['payment_method']))\n $errors.='Alegeti metoda de plata';\n\n return $errors;\n }", "public function values(): ?array\n {\n $parameters = [];\n foreach ($this->data['fields'] as $index => $input) {\n $parameters[$index] = FILTER_SANITIZE_SPECIAL_CHARS;\n }\n return filter_input_array(INPUT_POST, $parameters);\n }", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "function handle_post($indata) {\n// showDebug('form_class POST:');\n// showArray($indata); \n return;\n }", "private function _validData($data){\n\t\t$columnsLen = array(\n\t\t\t\t\t\t\t'nro_pedido' => 6,\n\t\t\t\t\t\t\t'id_factura_pagos' => 1,\n\t\t\t\t\t\t\t'valor' => 1,\n\t\t\t\t\t\t\t'concepto' => 1,\n\t\t\t\t\t\t\t'fecha_inicio' => 0,\n\t\t\t\t\t\t\t'fecha_fin' => 0,\n\t\t\t\t\t\t\t'id_user' => 1\n\t\t);\n\t\treturn $this->_checkColumnsData($columnsLen, $data);\n\t}", "private function _validate()\r\n {\r\n $data = array();\r\n $data['error_string'] = array();\r\n $data['inputerror'] = array();\r\n $data['status'] = TRUE;\r\n\r\n if($this->input->post('gsm_number') == '')\r\n {\r\n $data['inputerror'][] = 'gsm_number';\r\n $data['error_string'][] = 'Number GSM is required';\r\n $data['status'] = FALSE;\r\n }\r\n\r\n if($this->input->post('gsm_imsi_number') == '')\r\n {\r\n $data['inputerror'][] = 'gsm_imsi_number';\r\n $data['error_string'][] = 'Number IMSI GSM is required';\r\n $data['status'] = FALSE;\r\n }\r\n\r\n if($this->input->post('gsm_iccid_number') == '')\r\n {\r\n $data['inputerror'][] = 'gsm_iccid_number';\r\n $data['error_string'][] = 'Number ICCID GSM is required';\r\n $data['status'] = FALSE;\r\n }\r\n\r\n if($this->input->post('vendor_id') == '')\r\n {\r\n $data['inputerror'][] = 'vendor_id';\r\n $data['error_string'][] = 'Please select Vendor';\r\n $data['status'] = FALSE;\r\n }\r\n\r\n if($this->input->post('gsm_cond_id') == '')\r\n {\r\n $data['inputerror'][] = 'gsm_cond_id';\r\n $data['error_string'][] = 'Please select Condition';\r\n $data['status'] = FALSE;\r\n }\r\n\r\n if($this->input->post('gsm_received_date') == '')\r\n {\r\n $data['inputerror'][] = 'gsm_received_date';\r\n $data['error_string'][] = 'GSM Received Date is required';\r\n $data['status'] = FALSE;\r\n }\r\n\r\n if($this->input->post('gsm_received_by') == '')\r\n {\r\n $data['inputerror'][] = 'gsm_received_by';\r\n $data['error_string'][] = 'GSM Received By is required';\r\n $data['status'] = FALSE;\r\n }\r\n\r\n if($data['status'] === FALSE)\r\n {\r\n echo json_encode($data);\r\n exit();\r\n }\r\n }", "function HAA_parseFormData($form_data)\n{\n // Array containing parsed form parameters.\n $form_params = array();\n // List of valid column names.\n $column_whitelist = array(\n 'full_name',\n 'email'\n );\n\n // Name of corresponding fields.\n $fields = array(\n 'full_name' => 'Full Name',\n 'email' => 'Email',\n 'complaint_description' => 'Complaint Description'\n );\n\n // List of columns to be validated for email.\n $emails = array(\n 'email'\n );\n\n // List of columns to be validated for alphabets only.\n $names = array(\n 'full_name'\n );\n\n //Check that email and complaint are filled\n $error = false;\n if (! isset($form_data['complaint_description'])\n || empty($form_data['complaint_description'])\n ) {\n HAA_gotError(\n 'Complaint description was left blank.'\n );\n $error = true;\n }\n\n foreach ($form_data as $column => $value) {\n if (! empty($column) && in_array($column, $column_whitelist)) {\n if (in_array($column, $emails)) {\n if (! HAA_validateValue($value, 'email')) {\n HAA_inValidField($fields[$column]);\n } else {\n $form_params[':' . $column] = $value;\n }\n } elseif (in_array($column, $names)) {\n if (! HAA_validateValue($value, 'name')) {\n HAA_inValidField($fields[$column]);\n } else {\n $form_params[':' . $column] = $value;\n }\n } else {\n // Do nothing\n }\n\n // Remove matched element from white list.\n $column_whitelist = array_diff($column_whitelist, array($column));\n }\n }\n\n //If any error, exit\n if ($error==true) {\n return false;\n }\n\n $form_params[':complaint_description'] = $form_data['complaint_description'];\n\n // If faced any error.\n if (! empty($GLOBALS['error'])) {\n return false;\n }\n\n return $form_params;\n}", "function validate_ref_no($formdata,$required_fields = array(),$correctformat=array())\n{\n\tprint_r($correctformat); exit();\n \t\n\t/*$empty_fields = array();\n\t$bool_result = TRUE;\n\tforeach($required_fields AS $required)\n\t{\n\t\t//compare fordata;\n\t\t//if($formdata)\n\n\t\t#array_push($empty_fields, $field_str[0]);\n\t} */\n}", "private function valida_exedente(): bool|array\n {\n if (property_exists(object_or_class: 'calcula_imss', property: 'monto_uma')){\n return $this->error->error('Error no existe el campo monto_uma', $this);\n }\n\n if (property_exists(object_or_class: 'calcula_imss', property: 'sbc')){\n return $this->error->error('Error no existe el campo sbc', $this);\n }\n\n if (property_exists(object_or_class: 'calcula_imss', property: 'n_dias')){\n return $this->error->error('Error no existe el campo n_dias', $this);\n }\n\n if($this->monto_uma<=0){\n return $this->error->error('Error uma debe ser mayor a 0', $this->monto_uma);\n }\n if($this->sbc<=0){\n return $this->error->error('Error sbc debe ser mayor a 0', $this->sbc);\n }\n if($this->n_dias<=0){\n return $this->error->error('Error n_dias debe ser mayor a 0', $this->n_dias);\n }\n return true;\n }", "function validerChamp(string $nomChamp, $motif, $messagesJson, array $tValidation, bool $champRequis): array\n{\n $valeurChamp = '';\n $champValide = false;\n $message = '';\n\n // Si le nom du champs est en POST\n if (isset($_POST[$nomChamp])) {\n\n // On retire les espaces blancs\n $valeurChamp = trim($_POST[$nomChamp]);\n\n // Si le champ est vide alors qu'il est obligatoire, on met le message d'erreur - vide\n if ($valeurChamp == '' && $champRequis == true) {\n $message = $messagesJson[$nomChamp]['erreurs']['vide'];\n } else {\n $resultatValidation = preg_match($motif, $_POST[$nomChamp]);\n\n // S'il y a une valeur, on le teste avec le regex. S'il est mauvais, on met le message de motif\n if ($resultatValidation == false) {\n $message = $messagesJson[$nomChamp]['erreurs']['motif'];\n } else {\n // Le champ est valide\n $champValide = true;\n }\n }\n } else {\n if ($champRequis == false) {\n $champValide = true;\n } else {\n $message = $messagesJson[$nomChamp]['erreurs']['vide'];\n }\n }\n\n $tValidation[$nomChamp] = ['valeur' => $valeurChamp, \"champValide\" => $champValide, \"message\" => $message];\n return $tValidation;\n}", "public function b_type_post()\n {\n $pdata = file_get_contents(\"php://input\");\n $postdata = json_decode($pdata,true);\n $b_name = $postdata['b_name'];\n $b_type = $postdata['b_type'];\n $id = $postdata['id'];\n $where2 = array(\n 'id' =>$id,\n 'business_type' => $b_type, \n 'user_role' => 3\n //'is_active' => 0\n );\n $check_name = $this->model->getAllwhere('company_master',$where2);\n if(!empty($check_name)){\n // $step = $check_name[0]->step;\n $resp = array('rccode' => 1,'message' => 'login success','data'=>$check_name);\n \n $this->response($resp); \n \n }\n\n $data = array(\n 'business_type'=>$b_type,\n 'business_name'=>$b_name,\n 'step'=>2\n );\n $where = array(\n 'id'=>$id\n );\n \n $this->model->updateFields('company_master',$data,$where);\n $where3 = array(\n 'type' => $b_type,\n //'user_role' => 3\n //'is_active' => 0\n );\n \n $check_step = $this->model->getAllwhere('company_master',$where3);\n // print_r($check_step);\n $step = $check_step[0]->step;\n $resp = array('rccode' => 2,'step'=> $step,'message' => 'login success','data'=>$check_step);\n $this->response($resp); \n\n\n }", "private function validateParams(){\n\t\t$name\t = $this->param['name']; \n\t\t$ic\t\t = $this->param['ic']; \n\t\t$mobile\t= $this->param['mobile']; \n\t\t$email\t= $this->param['email']; \n\t\t$statusCode = array();\n\t\tif(!$name){\n\t\t\t$statusCode[] = 115;\n\t\t}\n\t\tif(!$ic){\n\t\t\t$statusCode[] = 116;\n\t\t}\n\t\tif(!$email){\n\t\t\t$statusCode []= 101;\n\t\t}elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t $statusCode[] = 105;\n\t\t}\n\t\treturn $statusCode;\n\t}", "function cp_do_input_validation($_adata) {\n\t# Initialize array\n\t\t$err_entry = array(\"flag\" => 0);\n\n\t# Check modes and data as required\n\t\tIF ($_adata['op'] == 'edit' || $_adata['op'] == 'add') {\n\t\t# Check required fields (err / action generated later in cade as required)\n\t\t//\tIF (!$_adata['s_id'])\t\t{$err_entry['flag'] = 1; $err_entry['s_id'] = 1;}\n\t\t//\tIF (!$_adata['s_status'])\t{$err_entry['flag'] = 1; $err_entry['s_status'] = 1;}\n\t\t\tIF (!$_adata['s_company'])\t{$err_entry['flag'] = 1; $err_entry['s_company'] = 1;}\n\t\t//\tIF (!$_adata['s_name_first'])\t{$err_entry['flag'] = 1; $err_entry['s_name_first'] = 1;}\n\t\t//\tIF (!$_adata['s_name_last'])\t{$err_entry['flag'] = 1; $err_entry['s_name_last'] = 1;}\n\t\t\tIF (!$_adata['s_addr_01'])\t{$err_entry['flag'] = 1; $err_entry['s_addr_01'] = 1;}\n\t\t//\tIF (!$_adata['s_addr_02'])\t{$err_entry['flag'] = 1; $err_entry['s_addr_02'] = 1;}\n\t\t\tIF (!$_adata['s_city'])\t\t{$err_entry['flag'] = 1; $err_entry['s_city'] = 1;}\n\t\t\tIF (!$_adata['s_state_prov'])\t{$err_entry['flag'] = 1; $err_entry['s_state_prov'] = 1;}\n\t\t\tIF (!$_adata['s_country'])\t{$err_entry['flag'] = 1; $err_entry['s_country'] = 1;}\n\t\t\tIF (!$_adata['s_zip_code'])\t{$err_entry['flag'] = 1; $err_entry['s_zip_code'] = 1;}\n\t\t//\tIF (!$_adata['s_phone'])\t\t{$err_entry['flag'] = 1; $err_entry['s_phone'] = 1;}\n\t\t//\tIF (!$_adata['s_fax'])\t\t{$err_entry['flag'] = 1; $err_entry['s_fax'] = 1;}\n\t\t//\tIF (!$_adata['s_tollfree'])\t{$err_entry['flag'] = 1; $err_entry['s_tollfree'] = 1;}\n\t\t//\tIF (!$_adata['s_email'])\t\t{$err_entry['flag'] = 1; $err_entry['s_email'] = 1;}\n\t\t//\tIF (!$_adata['s_taxid'])\t\t{$err_entry['flag'] = 1; $err_entry['s_taxid'] = 1;}\n\t\t//\tIF (!$_adata['s_account'])\t{$err_entry['flag'] = 1; $err_entry['s_account'] = 1;}\n\t\t\tIF (!$_adata['s_terms'])\t\t{$err_entry['flag'] = 1; $err_entry['s_terms'] = 1;}\n\t\t//\tIF (!$_adata['s_notes'])\t\t{$err_entry['flag'] = 1; $err_entry['s_notes'] = 1;}\n\n\t\t}\n\n\t# Validate some data (submitting data entered)\n\t# Email\n\t\tIF ($_adata['s_email'] && do_validate_email($_adata['s_email'], 0)) {\n\t\t\t$err_entry['flag'] = 1; $err_entry['err_email_invalid'] = 1;\n\t\t}\n\n\t# Email does not match existing email\n\t\t$_ce = array(0,1,1,1,1);\t// Element 0 = Nothing, 1 = clients, 2 = suppliers, 3 = admins, 4 = site addressses\n\t\tIF ($_adata['s_email'] && do_email_exist_check($_adata['s_email'], $_adata['s_id'], $_ce)) {\n\t\t\t$err_entry['flag'] = 1; $err_entry['err_email_matches_another'] = 1;\n\t\t}\n\n\t\treturn $err_entry;\n\n\t}", "public function token_is_valid() {\n $token = $this->ci->input->post(\"token\");\n\n $this->ci->load->helper(\"access\");\n return check_token($token);\n }", "protected function getInputData ()\n {\n (new HCRivilePaymentsValidator())->validateForm();\n\n $_data = request()->all();\n\n if (array_has($_data, 'id'))\n array_set($data, 'record.id', array_get($_data, 'id'));\n\n array_set($data, 'record.COUNT', array_get($_data, 'COUNT'));\n array_set($data, 'record.I04_KODAS_CH', array_get($_data, 'I04_KODAS_CH'));\n array_set($data, 'record.I04_DOK_NR', array_get($_data, 'I04_DOK_NR'));\n array_set($data, 'record.I04_OP_RUSIS', array_get($_data, 'I04_OP_RUSIS'));\n array_set($data, 'record.I04_OP_TIPAS', array_get($_data, 'I04_OP_TIPAS'));\n array_set($data, 'record.I04_OP_STORNO', array_get($_data, 'I04_OP_STORNO'));\n array_set($data, 'record.I04_OP_DATA', array_get($_data, 'I04_OP_DATA'));\n array_set($data, 'record.I04_KODAS_SS', array_get($_data, 'I04_KODAS_SS'));\n array_set($data, 'record.I04_MOKETOJAS', array_get($_data, 'I04_MOKETOJAS'));\n array_set($data, 'record.I04_KODAS_KS', array_get($_data, 'I04_KODAS_KS'));\n array_set($data, 'record.I04_PAV', array_get($_data, 'I04_PAV'));\n array_set($data, 'record.I04_ADR', array_get($_data, 'I04_ADR'));\n array_set($data, 'record.I04_ATSTOVAS', array_get($_data, 'I04_ATSTOVAS'));\n array_set($data, 'record.I04_KODAS_VS', array_get($_data, 'I04_KODAS_VS'));\n array_set($data, 'record.I04_SUMA', array_get($_data, 'I04_SUMA'));\n array_set($data, 'record.I04_SUMA_DSK', array_get($_data, 'I04_SUMA_DSK'));\n array_set($data, 'record.I04_SUMA_PLK', array_get($_data, 'I04_SUMA_PLK'));\n array_set($data, 'record.I04_PASTABOS', array_get($_data, 'I04_PASTABOS'));\n array_set($data, 'record.I04_PERKELTA', array_get($_data, 'I04_PERKELTA'));\n array_set($data, 'record.I04_IMP_EXP', array_get($_data, 'I04_IMP_EXP'));\n array_set($data, 'record.I04_KODAS_VL', array_get($_data, 'I04_KODAS_VL'));\n array_set($data, 'record.I04_SUMA_VAL', array_get($_data, 'I04_SUMA_VAL'));\n array_set($data, 'record.I04_KOEF', array_get($_data, 'I04_KOEF'));\n array_set($data, 'record.I04_USERIS', array_get($_data, 'I04_USERIS'));\n array_set($data, 'record.I04_R_DATE', array_get($_data, 'I04_R_DATE'));\n array_set($data, 'record.I04_ADDUSR', array_get($_data, 'I04_ADDUSR'));\n array_set($data, 'record.I04_KODAS_SM', array_get($_data, 'I04_KODAS_SM'));\n array_set($data, 'record.I04_APRASYMAS', array_get($_data, 'I04_APRASYMAS'));\n array_set($data, 'record.I04_SUMA_PER', array_get($_data, 'I04_SUMA_PER'));\n array_set($data, 'record.I04_SUMA_WK', array_get($_data, 'I04_SUMA_WK'));\n array_set($data, 'record.I04_KODAS_LS_1', array_get($_data, 'I04_KODAS_LS_1'));\n array_set($data, 'record.I04_KODAS_LS_2', array_get($_data, 'I04_KODAS_LS_2'));\n array_set($data, 'record.I04_KODAS_LS_3', array_get($_data, 'I04_KODAS_LS_3'));\n array_set($data, 'record.I04_KODAS_LS_4', array_get($_data, 'I04_KODAS_LS_4'));\n array_set($data, 'record.I04_KODAS_ZN', array_get($_data, 'I04_KODAS_ZN'));\n array_set($data, 'record.I04_BUSENA', array_get($_data, 'I04_BUSENA'));\n\n return makeEmptyNullable($data);\n }", "public function update() {\n\n $input_data = $this->request->getJsonRawBody();\n\t$headers = $this->request->getHeaders ();\n\t\tif (empty ( $headers ['Token'] )) {\n\t\t\treturn $this->response->setJsonContent ( [ \n\t\t\t\t\t\"status\" => false,\n\t\t\t\t\t\"message\" => \"Please give the token\" \n\t\t\t] );\n\t\t}\n\t\tif (empty ( $input_data )) {\n\t\t\treturn $this->response->setJsonContent ( [ \n\t\t\t\t\t\"status\" => false,\n\t\t\t\t\t\"message\" => \"Please give the input datas\" \n\t\t\t] );\n\t\t}\n\t\t$baseurl = $this->config->baseurl;\n\t\t$token_check = $this->tokenvalidate->tokencheck ( $headers ['Token'], $baseurl);\n\t\tif ($token_check->status != 1) {\n\t\t\treturn $this->response->setJsonContent ( [ \n\t\t\t\t\t\"status\" => false,\n\t\t\t\t\t\"message\" => \"Invalid User\" \n\t\t\t] );\n\t\t}\n $id = isset($input_data->id) ? $input_data->id : '';\n if (empty($id)):\n return $this->response->setJsonContent(['status' => false, 'message' => 'Id is null']);\n else:\n\t if($input_data->height == 0){\n\t\treturn $this->response->setJsonContent ( [ \n\t\t\t\t\t\"status\" => false,\n\t\t\t\t\t\"message\" => \"Please enter the valid height\" \n\t\t\t] );\n\t }elseif($input_data->weight == 0){\n\t\treturn $this->response->setJsonContent ( [ \n\t\t\t\t\t\"status\" => false,\n\t\t\t\t\t\"message\" => \"Please enter the valid weight\" \n\t\t\t] );\n\t }\n $validation = new Validation();\n $validation->add('nidara_kid_profile_id', new PresenceOf(['message' => 'Nidara kid profile id is required']));\n $validation->add('nidara_kid_profile_id', new Digit(['message'=>'Kid profile id is only Digit']));\n $validation->add('height', new PresenceOf(['message' => 'Height is required']));\n $validation->add('height', new Digit(['message'=>'Height is only Digit']));\n $validation->add('weight', new PresenceOf(['message' => 'Weight is required']));\n $validation->add('weight', new Digit(['message'=>'Weight is only Digit']));\n\t \n $messages = $validation->validate($input_data);\n if (count($messages)):\n foreach ($messages as $message):\n $result[] = $message->getMessage();\n endforeach;\n return $this->response->setJsonContent($result);\n else:\n\t\tif($input_data->height == 0){\n\t\treturn $this->response->setJsonContent ( [ \n\t\t\t\t\t\"status\" => false,\n\t\t\t\t\t\"message\" => \"Please enter the valid height\" \n\t\t\t] );\n\t }elseif($input_data->weight == 0){\n\t\treturn $this->response->setJsonContent ( [ \n\t\t\t\t\t\"status\" => false,\n\t\t\t\t\t\"message\" => \"Please enter the valid weight\" \n\t\t\t] );\n\t }\n $kidphysical_update = NidaraKidPhysicalInfo::findFirstByid($id);\n if ($kidphysical_update):\n $kidphysical_update->nidara_kid_profile_id = $input_data->nidara_kid_profile_id;\n $kidphysical_update->height = $input_data->height;\n $kidphysical_update->weight = $input_data->weight;\n $kidphysical_update->modified_at = date('Y-m-d H:i:s');\n if ($kidphysical_update->save()):\n return $this->response->setJsonContent(['status' => true, 'message' => 'Physical information saved successfully']);\n else:\n return $this->response->setJsonContent(['status' => false, 'message' => 'Failed']);\n endif;\n else:\n return $this->response->setJsonContent(['status' => false, 'message' => 'Invalid id']);\n endif;\n endif;\n endif;\n }", "public function checktoken(){\t\t\n\t\t$token=trim(strtoupper($this->input->post('tokenname')));\t\n\t\t$this->load->model('tokens');\t\n\t\t$data=$this->tokens->CheckToken($token);\n\t\tif(trim($data)==\"\"){\n\t\t\t\techo \"OK\";\n\t\t\t}else{\n\t\t\t\techo $data;\n\t\t\t\t}\n\t\t}", "abstract function check_data($formdata);", "private function validateTokens()\n {\n $whoami = $this->getJson('/ping/whoami');\n if (isset($whoami['authenticated']) && $whoami['authenticated'])\n {\n syslog(LOG_DEBUG, \"Monzo: Token is still valid\");\n return true;\n }\n else\n {\n return false;\n }\n }", "public function valid()\n\t{\n\t\t$echoStr = $_GET[\"echostr\"];\n\t\tif($this->checkSignature())\n\t\t{\n\t\t\techo $echoStr;\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"failure , check your TOKEN\";\n\t\t\texit;\n\t\t}\n\t}" ]
[ "0.6677389", "0.60507935", "0.60507935", "0.60507935", "0.5983586", "0.59225214", "0.5901134", "0.5813058", "0.57808274", "0.57808274", "0.57713", "0.5758431", "0.57319653", "0.57111114", "0.5686363", "0.56624967", "0.5650246", "0.5645553", "0.5633591", "0.5629397", "0.56277996", "0.56217235", "0.56022453", "0.559924", "0.5584968", "0.5558853", "0.5555809", "0.55393034", "0.55117124", "0.5490869", "0.54821146", "0.5478551", "0.54725397", "0.5466753", "0.54610515", "0.54541665", "0.5436859", "0.5433498", "0.54196894", "0.5412433", "0.54121417", "0.54112595", "0.5408839", "0.5393891", "0.5382582", "0.53796905", "0.5378992", "0.53755236", "0.5370625", "0.53699124", "0.5364877", "0.5354096", "0.53321236", "0.5331601", "0.5330423", "0.5323771", "0.53235024", "0.5314894", "0.53007114", "0.5300188", "0.52994406", "0.5286462", "0.5282373", "0.52801996", "0.5277133", "0.5259037", "0.52529764", "0.52450234", "0.5244484", "0.524257", "0.52333647", "0.5231574", "0.522835", "0.5219159", "0.52142066", "0.52018094", "0.5198604", "0.51919997", "0.51905", "0.5183161", "0.5179009", "0.51746225", "0.5172084", "0.51655877", "0.51582474", "0.5157291", "0.51559895", "0.51551664", "0.51532894", "0.51467085", "0.5142925", "0.513243", "0.5130377", "0.5129432", "0.5127027", "0.51265496", "0.51227146", "0.51197284", "0.5117796", "0.51148474" ]
0.7295957
0
must check this user has this exam owner or not
private function check_exam_and_user(int $_user_id, int $_exam_id) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function owner_matches_current_user()\n {\n }", "public function isOwner()\n {\n return (\\Auth::check() and \\Auth::user()->id == $this->id);\n }", "public function isOwner(): bool {\n $f3 = \\Base::instance();\n\n return $f3->get('CURRENT_USER') && !is_null($this->owner) && $f3->get('CURRENT_USER') === $this->owner->id;\n }", "public function ownerLoggedIn()\n {\n // For now just check session for an email and owner type\n if ( empty($_SESSION['email']) || $_SESSION['type'] != 'owner')\n return false;\n else\n return true;\n\n }", "public function isOwner()\n\t{\n\t\treturn is_null($this->CreatedBy) || $this->CreatedBy === Yii::app()->user->GUID;\n\t}", "private function checkOwner() {\r\n if (!$this->model->isOwner()) {\r\n $this->api->redirect('contact/home?message=Cannot Be Accessed');\r\n }\r\n }", "public static function isOwner(): bool\n\t{\n\t\tif(in_array( 'owner', self::getUserRole()) || in_array('administrator', self::getUserRole())) return true;\n\t\treturn false;\n\t}", "public function isOwner($user)\n {\n\n if ($this->m_role_created == $user->getId())\n return true;\n else\n return false;\n\n }", "public function getAmOwnerAttribute() {\n\t\t$userId = user('id');\n\t\tif(empty($userId)) { return false; }\n\t\t\n\t\treturn $userId == $this->attributes['user_id'];\n\t}", "public static function checkOwnerExisting()\n {\n global $mainframe;\n $db = JFactory::getDbo();\n $db->setQuery(\"Select count(id) from #__osrs_agents where agent_type <> '0' and published = '1'\");\n $count = $db->loadResult();\n if ($count > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function isOwner()\n {\n return $this->affiliation == self::AFFILIATION_OWNER;\n }", "public function testIsUserPhotoOwner()\n {\n $this->seed();\n\n $isOwner = Photo::isUserPhotoOwner(1,1);\n $this->assertTrue($isOwner);\n\n $isOwner = Photo::isUserPhotoOwner(1,3);\n $this->assertTrue(!$isOwner);\n }", "public function hasOwner()\n {\n return $this->owner !== null;\n }", "protected function inExam(User $user, Exam $exam)\n {\n return ! $exam->load(['users' => function ($query) use ($user) {\n $query->where('user_id', $user->getAuthIdentifier());\n }])->getRelation('users')->isEmpty();\n }", "public function isOwnedBy($user)\n {\n if (($user === null) || ($user->user_id === null)) {\n return false;\n } else {\n return ($user->user_id === $this->user_id);\n }\n }", "public function isOwner();", "public function hasUser();", "public static function ownerOnly(){\n return TRUE;\n }", "public function isOwner($id=''){\n\t\n\tif(empty($id)) $id = $this->id;\n\t \t\n \t$sql=$this->_db->select()->from($this->m_table)->where(\"id=?\",$id)->where(\"user_id =?\",$_SESSION['user_id']);\n \t$rs =$this->_db->fetchCol($sql);\n \t\n \tif(!empty($rs)){\n \t\treturn true;\n \t}\n \treturn false;\n }", "private function check_is_owner($user_id)\n {\n if ($user_id != current_user_id()) {\n show_error(lang('not_authorized'), 403);\n }\n }", "function isOwner() {\n return $this->getIsOwner();\n }", "public function isOwnedBy(UserInterface $user);", "public function check()\t{\n\t\treturn ! is_null($this->user());\n\t}", "public function isOwner(){\n return (count($this->rooms()) > 0);\n }", "public function isOwner($item)\n {\n $roles = Session::get('roles');\n $userId = Auth::user()->externalId;\n\n $result = !empty(array_intersect($roles, ['Administrator','Accounting','Developer']));\n if ($result || in_array($userId,['34',\"55\",'155'])) { // allow mikker to see all forms\n return true;\n }\n\n //remove the user role. we don't care about it\n $roles = array_diff($roles, array('User'));\n $roles = array_values($roles);\n\n switch ($roles[0]){\n case \"Client Manager\":\n return $item->ClientAlias->Client->ClientManager_Id == null? true: $userId ? true:false;\n break;\n case \"Adwords\":\n case \"SEO\":\n // loop through all contracts and find if he has a contract assigned to him\n $owner = false;\n if(is_array($item->Contract)){\n foreach ($item->Contract as $contract){\n if($contract->Manager_Id == $userId){\n $owner = true;\n break;\n }\n }\n }\n return $owner;\n break;\n case \"Sales\":\n return $item->ClientAlias->User_Id == $userId ? true:false;\n break;\n default :\n break;\n }\n //default, we deny.\n return false;\n }", "public function isAssignee(UserInterface $user);", "public function GetisOwnerThisRecord(){\n return ($this->{$this->nameFieldUserId}==h::userId());\n}", "public function mustbeuser()\n {\n if (!$this->hasuser())\n {\n $this->web()->noaccess();\n }\n }", "public function check_insta_user() {\n \n }", "function publisher_userIsAuthor($itemObj)\r\n{\r\n global $xoopsUser;\r\n return (is_object($xoopsUser) && is_object($itemObj) && ($xoopsUser->uid() == $itemObj->uid()));\r\n}", "public function validate(&$user)\n\t\t{\n\n\t\t\tif ( $user->get_detail ( clientes_todos ) == 1 )\n\t\t\t\treturn true;\n\n\t\t\treturn $user->get_detail(salesrep_id) == $this->get_detail(salesrep_id);\n\t\t}", "public function accessibleByCurrentUser(){\n // return true if AYC user\n if(\\Auth::isSuperAdmin()) return true;\n\n // otherwise check if personally added to this\n $allowedPages = \\Auth::getAllowedPages();\n if(in_array($this->id, $allowedPages)) return true;\n\n // if not specifically added personally to this page\n // check the user group can access this page\n if($this->groupHasPermission(\\Auth::getUserLevel())) return true;\n\n // otherwise return false\n return false;\n\n }", "function check_user_has_data_access($survey_id,$user_id)\n\t{\n\t\t$requests=$this->get_user_study_n_collection_requests($survey_id,$user_id);\n\t\t\t\n\t\t\tforeach($requests as $request)\n\t\t\t{\n\t\t\t\tif ($request['status']=='APPROVED')\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\treturn FALSE;\n\t}", "public function check()\n\t{\n\t\treturn ! is_null($this->user());\n\t}", "public function user_is_allowed()\n {\n //check if the record exist\n if (! $this->record) {\n $this->build_error('These record does not exist or it may not belong to you',404);\n }\n\n //check if the user is the owner of the entry\n if(!isOwner($this->record)) {\n $this->build_error('you are not the owner of this task');\n }\n\n //check if the incomming entries type is Array\n if (!is_array($this->request->entries)) {\n $this->build_error('Please the entries must be an Array');\n }\n }", "protected function wasActualUser()\n {\n return ($this->wrappedObject->user_id == $this->wrappedObject->revisionable_id || !$this->wrappedObject->user_id);\n }", "public function isProposition()\n {\n $u = $this->user()->first();\n\n return auth()->user()->id != $u->id;\n }", "public function dashboard_owner($user) {\n return $this->id === auth()->id();\n }", "protected function isCurrentPageEditableByUser() {\n\n\t\t$title = $this->getTitle();\n\t\t$user = $this->getUser();\n\t\treturn $title->quickUserCan( 'edit', $user )\n\t\t\t&& ( $title->exists() || $title->quickUserCan( 'create', $user ) );\n\t}", "public function owner(User $user, Task $task){\n return $user->id === $task->user_id; //validar que sea el mismo dueño de esa informacion.\n }", "function isOwner( $user, $imagecategory )\r\n {\r\n if ( !is_a( $user, \"eZUser\" ) )\r\n return false;\r\n\r\n $db =& eZDB::globalDatabase();\r\n $db->query_single( $res, \"SELECT UserID from eZImageCatalogue_Category WHERE ID='$imagecategory'\");\r\n $userID = $res[$db->fieldName(\"UserID\")];\r\n if ( $userID == $user->id() )\r\n return true;\r\n\r\n return false;\r\n }", "private function _validate_user() {\n\t\treturn (current_user_can(\"edit_posts\") && current_user_can(\"edit_pages\") && !empty($this->buttons));\n\t}", "public function ownedBy(User $user){\n\n\t\treturn $this->user_id == $user->id;\n\n\t}", "function isOwner($table,$referenceKey,$userReferenceKey,$referenceId){\n\t// var_dump('select * from '.$table.' where '.$referenceKey.' =\"'.$referenceId.'\" and '.$userReferenceKey.'='.Auth::user()->id);\n\n \tif(Auth::check() && $table){\n \t\t$isOwner = \\DB::select('select * from '.$table.' where '.$referenceKey.' =\"'.$referenceId.'\" and '.$userReferenceKey.'='.Auth::user()->id);\n\n \t\t$result = (!empty($isOwner)) ? true :false;\n \t}\n \telse\n \t\t$result = false;\n\n\treturn $result;\n}", "public function isOwned()\n {\n return Auth::user() && $this->recipient_id === Auth::id();\n }", "function userIsAreaAdmin() {\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->areaAdmin(Yawp::authUsername(), $this->area);\n\t}", "function isOwner($facebookID){\n\t\tif($facebookID == $this->fk_member_id){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "protected function verifyAccess($user){\n\t\treturn true; \n\t}", "function isLocationowner(){\r\n\t\tif($this->user_type == 'LocationOwner'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function check()\n {\n return null !== $this->user();\n }", "function user_owns_tip($tip_id, $uname) {\n $sql = '\n SELECT EXISTS(\n SELECT\n id\n FROM\n tips\n WHERE\n id = ? AND author = ?\n )';\n \n $res = $this->prep_and_exec($sql, [$tip_id, $uname]);\n \n if (!$res) {\n return null;\n }\n \n return (bool) $res->fetch(PDO::FETCH_NUM)[0];\n }", "function getOwnedAttribute()\n {\n if (!!Auth::user()) return Auth::id() === $this->user_id;\n return false;\n }", "function checkOwnershipOfRatingForUserId($conn, $Mid, $Cid) {\n $sql = \"select count(*) from rating where MenuItemId = \" . $Mid . \" and UserId = \" . $Cid;\n $result = $conn->query($sql);\n\n if ($result) {\n $count = mysqli_fetch_array($result, MYSQLI_NUM);\n $count = (int)$count[0];\n\n if ($count === 1) {\n return true;\n }\n else {\n return false;\n }\n }\n }", "public function check()\n {\n $user = $this->user();\n return !empty($user);\n }", "public function isOwnedBy($user)\n {\n if (($entry = $this->getEntry())) {\n return $entry->isOwnedBy($user);\n } else {\n return false;\n }\n }", "public function is_student() {\n return $this->session->get(\"niveau_acces\") >= 0;\n }", "function isViewer($wpUser){\n for($i = 0; $i < count($wpUser->roles); $i++){\n if(strpos($wpUser->roles[$i], SARON_ROLE_PREFIX . SARON_ROLE_VIEWER) !== FALSE){ // CHECK IF THE USER IS A MEMBER OF THE GROUP (test)saron_edit\n return true;\n }\n } \n return false; \n }", "public function isOwner()\r\n {\r\n return $this->owner;\r\n }", "public function isAllowedForUser(){\n\t\treturn true;\n\t}", "public function isUttMember()\n\t{\n\t\treturn $this->isUser() && ! $this->user->getIsStudent() && ! $this->user->getKeepActive();\n\t}", "public function createdBy($user)\n {\n return ($this->author_id == $user) ? true : false;\n }", "function isOwner() {\n if($this->is_owner === null) {\n $company = $this->getCompany();\n $this->is_owner = instance_of($company, 'Company') ? $company->getIsOwner() : false;\n } // if\n return $this->is_owner;\n }", "public function hasuser()\n {\n return is_object($this->luser);\n }", "private function _checkValidUser()\n\t{\n\t\t$user = $this->getUser();\n\t\tif(NULL == $user->getFirstname()) return $this->redirect('/logout');\n\t\tif(NULL <> $user->getEmployerId()) return $this->redirect('/admin');\n\t}", "private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }", "public function userIsProfessor($user_id){\n $user_temp = Users::find($user_id);\n return !empty($user_id) && $user_temp && $user_temp['type'] == 1;\n }", "public function userIsProfessor($user_id){\n $user_temp = Users::find($user_id);\n return !empty($user_id) && $user_temp && $user_temp['type'] == 1;\n }", "protected function isAuthor() {\n return $this->getSocialUser() &&\n $this->getSocialUser()->ID === (int)$this->connectObj->CreatedBySocialUser->ID;\n }", "protected function valid()\r\n {\r\n return isset($_SESSION['user']['user_id']) ? true : false;\r\n }", "public static function check()\n {\n return !is_null(static::user());\n }", "public function ownedBy(User $user) {\n // Check to see if the user id = the user id passed in.\n return $this->user_id == $user->id;\n }", "function canBeAccessedByUser($user)\n\t{\n\t\tif($user->isRoot())\n\t\t\treturn true;\n\n\t\tif($this->get('id') == $this->root_group_id)\n\t\t\treturn false;\n\t\t\t\n\t\treturn true;\n\t}", "public function checkCurrentUser()\n\t{\n\t\t$user = Zend_Auth::getInstance()->getIdentity();\n\n\t\tif ($this->getUserId() == $user->userId) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$row = $this->getTable()->checkUser($this->_actionId, $user->userId);\n\n\t\treturn $row !== false;\n\t}", "public function isOwner(\\VMB\\UserBundle\\Entity\\User $user = null)\n {\n return $user && $this->getOwner() && $user->getId() == $this->getOwner()->getId();\n }", "public function isOwner(UserObject $userObject){\n if(is_callable($this->checkOwner)){\n $check = $this->checkOwner;\n return $check($userObject);\n }\n CoreLog::debug('No checkOwner method defined');\n return false;\n }", "function _dropbox_authorize_content($assignment_id,$student_id)\n{\n global $user_id;\n global $class_id;\n global $class_level;\n // Any student other than the user is not allowed to see the content\n if($user_id != $student_id && $class_level == 1)\n return false;\n // We know that the teacher is part of the class, make sure the assignment is part of it as well\n $result = good_query(\"SELECT id FROM dropbox_assignments WHERE id = $assignment_id AND class_id = $class_id\");\n return (mysqli_num_rows($result) == 1);\n}", "private static function canAccess($request, $address){\n $currentUser_Account = $request->user;\n $user = $address->get_user();\n return ($user != null && $currentUser_Account->getId() === $user->getId()) || User_Precondition::ownerRequired($request);\n }", "public function isAdminOrOwner($user_id)\n\t{\n\t\t$user = User::model()->findByPk($user_id);\n\t\tif ($user !== null)\n\t\t{\n\t\t\treturn $user->isAdmin() ||\n\t\t\t($user->canCreateAdventure() && $user_id == $this->createdBy)\n\t\t\t;\n\t\t}\n\t\treturn false;\n\t}", "public function isOwnerBooking()\n {\n return ($this->getStatus() == 'O');\n }", "function check_user($user)\n\t\t{\n\n\t\t}", "public function owner(User $user, Task $task)\n {\n return $user->id === $task->user_id;\n }", "static public function isUser(){\n if ( isset($_SESSION['id']) && $_SESSION['id'] != 0 ) {\n return true;\n } else {\n return false;\n }\n }", "public function isPostOwner($id) {\n $post = Post::where('id','=',$id)->first();\n return ($this->id == $post->user->id);\n }", "private function isUser() : bool\n {\n return $this->role('user');\n }", "public function check(): bool\n {\n return ! is_null($this->user());\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "function isValid( $id_user ) {\n\n\t\treturn true;\n\t}", "function check_user() {\n\treturn false; // update allowed\n\treturn true; //no update allowed\n}", "public function checkIsMember($user_id) {\n\n // all members and up have records in the aro table\n $aro = $this->findUser($user_id);\n return !empty($aro);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function isUserOrGroupSet() {}", "public function has_access($owner, $name) {\n $stmt = $this->pdo->prepare('select * from share where owner_id = :owner_id and user_id = :id and file_id in (select id from file where owner_id = :owner_id and filename = :name)');\n $stmt->bindValue(':id', $this->id);\n $stmt->bindValue(':owner_id', $owner->id);\n $stmt->bindValue(':name', $name);\n $stmt->execute();\n $res = $stmt->fetchAll();\n return count($res) == 1;\n }", "public function isEditable(User $u){\n\t\t\tif( $u->id == $this->user->id){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }", "public function hasUser()\n {\n return $this->getUser() !== null;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }" ]
[ "0.67511183", "0.6662352", "0.65293986", "0.64193505", "0.64000636", "0.6379496", "0.63788235", "0.6374161", "0.6355589", "0.6329706", "0.62902236", "0.62775457", "0.6248488", "0.6225442", "0.62157464", "0.6203377", "0.6200721", "0.6163941", "0.61551213", "0.6154409", "0.61480755", "0.6143105", "0.61275244", "0.6122984", "0.6113575", "0.61023647", "0.6087097", "0.60855514", "0.6081588", "0.60687727", "0.606672", "0.60611004", "0.6044582", "0.60354614", "0.6031639", "0.60272026", "0.6022999", "0.60203606", "0.6009328", "0.60023534", "0.59963727", "0.59923846", "0.5980409", "0.5952618", "0.59463185", "0.59461814", "0.59422797", "0.5940483", "0.59239155", "0.5915609", "0.59140444", "0.59064853", "0.5898848", "0.5888328", "0.5887672", "0.58872664", "0.58739156", "0.5873639", "0.5865571", "0.5853219", "0.58511925", "0.584896", "0.5841748", "0.5839183", "0.5838775", "0.58375204", "0.58375204", "0.58303064", "0.5826812", "0.58226067", "0.581383", "0.58080286", "0.5806983", "0.5800995", "0.5793038", "0.5792335", "0.57877576", "0.57863873", "0.5773602", "0.57712", "0.57705927", "0.57629824", "0.57577413", "0.57471085", "0.57421494", "0.57384366", "0.57317877", "0.57293326", "0.5726329", "0.5722294", "0.5722294", "0.5722294", "0.5722294", "0.5722294", "0.57180965", "0.571414", "0.5713623", "0.5713212", "0.57027316", "0.5702284" ]
0.6989703
0
method to handle POST request by this url : ` a port to finish exam data
public function finish_exam() { $inputs = $this->check_finish_inputs(); if (!is_array($inputs) || !$inputs) { $output["ok"] = false; $output["message"] = "inputs faild"; return json_encode($output); } $user_id = $this->un_token($_POST["token"]); if (!$user_id) { $output["ok"] = false; $output["message"] = "User undefined"; return json_encode($output); } if (!$this->check_exam_and_user((int) $user_id, $inputs["exma_id"])) { $output["ok"] = false; $output["message"] = "access denied"; return json_encode($output); } $update_exam = $this->update_finished_exam($inputs["exam_id"], $inputs["corrects"], $inputs["wrongs"], $inputs["emptys"]); if (!$update_exam) { $output["ok"] = false; $output["message"] = "cannot update exam"; return json_encode($output); } $output["ok"] = true; $output["message"] = "success update exam"; return json_encode($output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function post();", "public function post();", "public function post();", "abstract public function post();", "public function postExecution($request){}", "private function POST() {\n global $_POST;\n $postData = array();\n foreach($_POST as $key => $value) {\n $postData[$key] = $value;\n }\n $this -> response[\"response\"] = $postData;\n return;\n }", "function post_request($url, $port, $dataid, $tStamp, $encodedSignature, $data, $referer = '')\n {\n //$data = http_build_query($data);\n\n // parse the given URL\n $url = parse_url($url);\n\n if ($url['scheme'] != 'http') {\n die('Error: Only HTTP request are supported !');\n }\n\n // extract host and path:\n $host = $url['host'];\n $path = $url['path'];\n\n // open a socket connection on port 80 - timeout: 50 sec\n $fp = fsockopen($host, $port, $errno, $errstr, 50);\n\n if ($fp) {\n\n // send the request headers:\n fputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $host\\r\\n\");\n\n if ($referer != '')\n fputs($fp, \"Referer: $referer\\r\\n\");\n\n fputs($fp, \"x-cons-id: \" . $dataid . \"\\r\\n\");\n fputs($fp, \"x-timestamp: \" . $tStamp . \"\\r\\n\");\n fputs($fp, \"x-signature: \" . $encodedSignature . \"\\r\\n\");\n fputs($fp, \"Content-Type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \" . strlen($data) . \"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $data);\n\n $result = '';\n while (!feof($fp)) {\n // receive the results of the request, 128 char\n $result .= fgets($fp, 128);\n }\n } else {\n return array(\n 'status' => 'err',\n 'error' => \"$errstr ($errno)\"\n );\n }\n\n // close the socket connection:\n fclose($fp);\n\n // split the result header from the content\n $result = explode(\"\\r\\n\\r\\n\", $result, 2);\n $header = isset($result[0]) ? $result[0] : '';\n $content = isset($result[1]) ? $result[1] : '';\n\n // return as structured array:\n return array(\n 'status' => 'ok',\n 'header' => $header,\n 'content' => $content\n );\n\n }", "private function postHop () {\n\t\t$this->result = curl_exec ( $this->ch );\n\t\tcurl_close ( $this->ch );\n\t}", "abstract public function post($data);", "public function showRequestPost();", "public function send_post_request(){\n $url = \\Request::get('url');\n $post_array = \\Request::all();\n\n//\t\t$url = 'http://localhost/_websites/ahmed-badawy.com/site/json-test';\n//\t\t$post_array = array('type' => 'scss', 'source' => '.pre{color:red;background-color:green;}', 'compress'=>true);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $query = curl_exec($ch);\n curl_close($ch);\n\n return $query;\n }", "public function handle($postData){\r\n\t\t\r\n\t}", "function post_to_url($url, $data) {\n $fields = '';\n foreach ($data as $key => $value) {\n $fields .= $key . '=' . $value . '&';\n }\n rtrim($fields, '&');\n $post = curl_init();\n curl_setopt($post, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($post, CURLOPT_URL, $url);\n curl_setopt($post, CURLOPT_POST, count($data));\n curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\n curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\n $result = curl_exec($post); //result from mobile seva server \n return $result; //output from server displayed \n curl_close($post);\n}", "public function post_post()\n\t{\n\t\ttry {\n\t\t\t$results = Articles::regist( self::$_JSON );\n\t\t\t//\\Log::warning(print_r($results, true));\n\n\t\t\treturn $this->response($results, 200);\n\t\t} catch (\\MarcoPandaException $e) {\n\t\t\t$this->error($e);\n\t\t}\n\t}", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "public function testPostDataHttpServer(): void\n {\n $this->post('/request_action/post_pass', ['title' => 'value']);\n $data = json_decode('' . $this->_response->getBody());\n $this->assertSame('value', $data->title);\n $this->assertHeader('X-Middleware', 'true');\n }", "public function post($url, array $data = [], $port = null, $formData = false) {\n\t\t\treturn $this->_request($url, $port, [\n\t\t\t\tCURLOPT_POST => true,\n\t\t\t\tCURLOPT_POSTFIELDS => ($formData)? $data : http_build_query($data)\n\t\t\t]);\n\t\t}", "public function postAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "function convertByPOST($url, $data, $table_no=1) {\n if(isValidUrl($url)){\n $html = do_post_request($url, http_build_query($data));\n $this->getArray($html, $table_no);\n } else {\n echo \"Url is not valid\";\n }\n return $this->arr;\n }", "public function post($t);", "function ManualPOST($url, $post) {\n // $url = 'http://edost.ru//edost_calc_kln.php';\n // $post = 'to_city=839&strah=17550&id=2387&p=vN4g7IgFKMSbpOMGSL9cW6S15YuxxnX5&weight=73.5&ln=51&wd=62&hg=116&zip=';\n $parse_url = parse_url($url);\n $path = $parse_url[\"path\"];\n\n $host = $parse_url[\"host\"];\n $rez = \"\";\n\n self::$NowErr = false;\n set_error_handler(array('edost_class', 'my_error_handler'));\n\n $fp = fsockopen($host, 80, $errno, $errstr, 4); //4 - ????. ????? ???????\n\n restore_error_handler();\n\n if ($errno == 13) {\n return ('Err14');\n } //??????: ????????? ??????? ?? ????????? ????????? ?????? ?? ??????\n if (self::$NowErr) {\n return ('');\n } //??????\n //Mage::log($post, null, 'edostlog.log');\n if ($fp) {\n $out = \"POST \" . $path . \" HTTP/1.0\\n\" . \"Host: \" . $host . \"\\n\" . \"Referer: \" . $url . \"\\n\" . \"Content-Type: application/x-www-form-urlencoded\\n\" . \"Content-Length: \" . strlen($post) . \"\\n\\n\" . $post . \"\\n\\n\";\n\n fputs($fp, $out);\n\n $q = 0;\n while ($gets = fgets($fp, 512)) {\n $rez .= $gets;\n $q++;\n }\n\n fclose($fp);\n\n $rez = stristr($rez, \"<?xml version=\"); //???????? ?????????\n }\n Mage::log($rez, true, 'edostlog.log');\n return ($rez);\n }", "public function on_after_submit() {\n\t\t\n\t\t/*\n\t\t$post = array();\n\t\t$post['cm-name'] = $this->controller->questionAnswerPairs['1']['answer'].' '.$this->controller->questionAnswerPairs['2']['answer'];\n\t\t$post['cm-itutkr-itutkr'] = $this->controller->questionAnswerPairs['3']['answer'];\n\t\t\t\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 0);\n\t\tcurl_setopt($ch, CURLOPT_URL, 'http://url.to.my.campaignmonitor/myform');\n\t\t//Don't ask me what this does, I just know that without this funny header, the whole thing doesn't work!\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Expect:'));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1 );\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post );\n\t\t\n\t\t$url = curl_exec( $ch );\n\t\tcurl_close ($ch);\n\t\t*/\n\t}", "function post_day($httpClient, $base_url, $day) {\r\n error_log('post_day to server: ' . $day);\r\n $url = $base_url . '/day/';\r\n $response = $httpClient->request('POST', $url,['json' => $day]); //guzzale part\r\n// $request = $httpClient->createRequest('POST', $url);\r\n// $request->setBody(Stream::factory('9'));\r\n// $response = $request->send();\r\n return $response;\r\n //echo $response; die();\r\n error_log('post_day to server: ' . $day);\r\n \r\n// $url = 'http://' . $base_url . '/day/';\r\n// $day1['day'] = $day;\r\n// //$response = $httpClient->request('POST', $url, ['json' => $day1]);\r\n// return $response;\r\n \r\n}", "public function postAction() {}", "function post(Request &$request, Response &$response);", "public static function do_post_request($url, $request_body, $port = false, &$optional_headers = null) {\n $ch = curl_init($url);\n if ($port !== false) {\n curl_setopt($ch, CURLOPT_PORT, $port);\n }\n curl_setopt($ch, CURLOPT_USERAGENT,\n \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36\");\n\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request_body);\n\n $has_headers = !empty($optional_headers);\n curl_setopt($ch, CURLOPT_HEADER, $has_headers);\n if ($has_headers) {\n $hasCL = false;\n foreach ($optional_headers as $index => $header) {\n if (substr($header, 0, 15) == 'Content-Length:') {\n $hasCL = true;\n break;\n }\n }\n if (!$hasCL) {\n $cl = strlen($request_body);\n $optional_headers[] = \"Content-Length: $cl\";\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, $optional_headers);\n }\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n $result = curl_exec($ch);\n if (false === $result) {\n $errno = curl_errno($ch);\n $error = curl_error($ch);\n static::debugError($url, $optional_headers, $request_body, \"$errno: $error\");\n return 'Erreur :\\n' . $error;\n }\n curl_close($ch);\n\n return $result;\n }", "function post();", "public function post() {\n\t\t$data = self::getPostData();\n\t\t/*\n\t\t * Return not found by defaut, just in case you don't override it when \n\t\t * extending it.\n\t\t */\n\t\tHook::fire(Hook::EVENT_RESPONSE_NOT_FOUND);\n\t}", "function post () {\n //OU SALVA NO\n header(\"location: /\");\n }", "public function post()\n {\n //\n }", "public function testIndexActionPost()\n {\n $request = $this->di->get(\"request\");\n $request->setPost(\"ip\", \"8.8.8.8\");\n // var_dump($request);\n\n $res = $this->controller->indexActionPost();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"Kolla vädret\", $body);\n }", "function post_request($url, $param)\n{\n //リクエスト時のオプション指定\n $options = array(\n 'http' => array(\n 'method' => 'POST', //ここでPOSTを指定\n 'header' => array(\n 'Content-type: application/x-www-form-urlencoded',\n 'User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1'\n ),\n 'content' => http_build_query($param),\n 'ignore_errors' => true,\n 'protocol_version' => '1.1'\n ),\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false\n )\n );\n\n //リクエスト実行\n $contents = @file_get_contents($url, false, stream_context_create($options));\n\n //ステータスコード抜粋\n preg_match('/HTTP\\/1\\.[0|1|x] ([0-9]{3})/', $http_response_header[0], $matches);\n $statusCode = (int)$matches[1];\n\n //配列で返すためにjsonのエンコード\n $contents_array = array();\n if($statusCode === 200){\n $contents_array = json_decode($contents);\n }\n return $contents_array;\n}", "function post() \n {\n \n }", "function forwardPostRequest($url, $data) {\n\t\t\n\t\t$curl = curl_init();\n\n\t\tcurl_setopt_array($curl, array(\n\t\t\tCURLOPT_URL => $url,\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t\tCURLOPT_POST => 1,\n\t\t\tCURLOPT_POSTFIELDS => $data,\n\t\t\tCURLOPT_HTTPHEADER => array(\"cache-control: no-cache\"),\n\t\t\tCURLOPT_SSL_VERIFYPEER => false\n\t\t));\n\n\t\t$response = curl_exec($curl);\n\t\tif ($response === false) echo \"Bad response\";\n\n\t\tcurl_close($curl);\n\t\treturn $response;\n\n\t}", "public function post($request);", "function handlePOSTRequest() {\n if (connectToDB()) {\n if (array_key_exists('resetTablesRequest', $_POST)) {\n handleResetRequest();\n } else if (array_key_exists('updateQueryRequest', $_POST)) {\n handleUpdateRequest();\n } else if (array_key_exists('insertQueryRequest', $_POST)) {\n handleInsertRequest();\n } \n else if (array_key_exists('avgAgeQueryRequest', $_POST)) {\n //console_log(\"hello\");\n handleAvgAgeRequest();\n //echo \"Average age is 0\";\n } \n\n disconnectFromDB();\n }\n }", "public function testUpdateUrlUsingPOST()\n {\n }", "static function hlp_sendPost($auth_url, $auth_port, $formdata, &$errMsg=\"\") {\n\t\t\n\t\t$result = \"\";\n\t\t$ssl = false;\n\t\t\n\t\tif (strstr($auth_url, 'https://')) {\n\t\t\t$auth_url = substr($auth_url, strlen('https://'));\n\t\t\t$ssl = true;\n\t\t}\n\t\telse if (strstr($auth_url, 'http://')) {\n\t\t\t$auth_url = substr($auth_url, strlen('http://'));\n\t\t}\n\t\t\n\t\t//create connection\n\t\tif($ssl) $fp = fsockopen(\"ssl://\".$auth_url, 443, $errno, $errstr, 30);\n\t\telse $fp = fsockopen($auth_url, $auth_port, $errno, $errstr, 30);\n\t\t\t\n\t\t\t\n\t\tif($fp) {\t\n\t \t//build the post string\n\t\t\t$poststring = '';\n\t\t foreach($formdata as $key => $val) {\n\t\t \t$poststring .= urlencode($key) . \"=\" . urlencode($val) . \"&\";\n\t\t }\n\t\t \n\t\t $out = \"POST \". self::AUTH_DIR .\" HTTP/1.1\\r\\n\";\n\t\t $out .= \"Host: \". $_SERVER['HTTP_HOST'].\"\\r\\n\";\n\t\t $out .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n\t\t $out .= \"Content-Length: \" . strlen($poststring) . \"\\r\\n\";\n\t\t $out .= \"Connection: Close\\r\\n\\r\\n\";\n\t\t \n\t\t \n\t\t //Send the headers and post data to CBM\n\t\t fwrite($fp, $out.$poststring);\n\t\t while (!feof($fp)) {\n\t\t \t$result .= fgets($fp, 1024);\n\t\t }\n\t\t fclose($fp);\n\t\t return $result;\n\t\t}\n \n\t\t$errMsg['string'] = $errstr;\n\t\t$errMsg['code'] = $errno; \n\t\treturn false;\n\t}", "public function post($name);", "public function post()\n\t{\n\t\t\n\t\t$this->plugin->setResponse( $result );\n\t}", "public function finishPortal(){\n\t\t$this->parseBuffer();\n\t\t$this->writeConfig();\n\t\t$http = LighttpdConfig::getInstance();\n\t\t$http = \n\t\t$this->PORT_NUMBER++;\n\t}", "public function postTap()\n {\n //si la peticion es ajax\n if ( Request::ajax() ) {\n $amp = Input::get('amplificador');\n $troba = Input::get('troba');\n $nodo = Input::get('nodo');\n $tap = DigTroba::getTap($amp, $troba, $nodo);\n return Response::json(array('rst'=>1,'datos'=>$tap));\n }\n }", "public function processRequest();", "public function postSend()\n {\n }", "function handlePOSTRequest() {\n if (connectToDB()) {\n if (array_key_exists('resetTablesRequest', $_POST)) {\n handleResetRequest();\n } else if (array_key_exists('updateQueryRequest', $_POST)) {\n handleUpdateRequest();\n } else if (array_key_exists('insertQueryRequest', $_POST)) {\n handleInsertRequest();\n }\n\n disconnectFromDB();\n }\n }", "public function post($data)\n {\n // Get parts of URL\n $this->url = parse_url($this->url);\n if (!$this->url) {\n return \"couldn't parse url\";\n }\n\n // Provide defaults for port and query string\n if (!isset($this->url['port'])) {\n $this->url['port'] = \"\";\n }\n\n if (!isset($this->url['query'])) {\n $this->url['query'] = \"\";\n }\n\n // Build POST string\n $encoded = \"\";\n foreach ($data as $k => $v) {\n $encoded .= ($encoded ? \"&\" : \"\");\n $encoded .= rawurlencode($k) . \"=\" . rawurlencode($v);\n }\n\n // Open socket on host\n $fp = fsockopen($this->url['host'], $this->url['port'] ? $this->url['port'] : 80);\n if (!$fp) {\n return \"failed to open socket to {$this->url['host']}\";\n }\n\n // Send HTTP 1.0 POST request to host\n fputs($fp, sprintf(\"POST %s%s%s HTTP/1.0\\n\", $this->url['path'], $this->url['query'] ? \"?\" : \"\", $this->url['query']));\n fputs($fp, \"Host: {$this->url['host']}\\n\");\n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\n\");\n fputs($fp, \"Content-length: \" . strlen($encoded) . \"\\n\");\n fputs($fp, \"Connection: close\\n\\n\");\n fputs($fp, \"$encoded\\n\");\n\n // Read the first line of data, only accept if 200 OK is sent\n $line = fgets($fp, 1024);\n if (!preg_match('/^HTTP\\/1\\.. 200/i', $line)) {\n return;\n }\n\n // Put everything, except the headers to $results\n $results = '';\n $inheader = true;\n\n while(!feof($fp)) {\n $line = fgets($fp, 1024);\n\n if ($inheader && ($line == \"\\n\" || $line == \"\\r\\n\")) {\n $inheader = FALSE;\n } elseif (!$inheader) {\n $results .= $line;\n }\n }\n fclose($fp);\n\n // Return with data received\n return $results;\n }", "function post_to_url($url, $data) {\r\n\t\t$fields = '';\r\n\t\tforeach($data as $key => $value) {\r\n\t\t\t$fields .= $key . '=' . $value . '&';\r\n\t\t}\r\n \r\n\t\trtrim($fields, '&');\r\n\t\t$post = curl_init();\r\n \r\n\t\t curl_setopt($post, CURLOPT_URL, $url);\r\n\t\t curl_setopt($post, CURLOPT_POST, count($data));\r\n\t\t curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\r\n\t\t curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t $result = curl_exec($post);\r\n\t\t curl_close($post);\r\n\t}", "public function doPost(array $parsed_body);", "function _post()\r\n\t\t{\r\n\t\t}", "public static function post($uri,$callback){\n static::add('POST',$uri,$callback);\n \n }", "abstract public function post(Request $request);", "protected static function post($index, $queryData) {\n\t\t\t$curl = self::socket();\n\n\t\t\tcurl_setopt($curl, CURLOPT_URL, self::$baseUrl . $index); //Url setup\n\t\t\tcurl_setopt($curl, CURLOPT_POST, 1); //Tell curl we want to POST\n\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST'); //POST request setup\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($queryData)); //Include the POST data\n\t\t\treturn self::data_decode(curl_exec($curl)); \t\t//Launch and return decrypted data\n\t\t}", "public function portEventMappingPost(){\n $mappingArray = [];\n if(!empty($_POST['40001'])){\n $mappingArray['40001'] = $_POST['40001'];\n }\n if(!empty($_POST['40002'])){\n $mappingArray['40002'] = $_POST['40002'];\n }\n if(!empty($_POST['40003'])){\n $mappingArray['40003'] = $_POST['40003'];\n }\n if(!empty($_POST['40004'])){\n $mappingArray['40004'] = $_POST['40004'];\n }\n if(!empty($_POST['40005'])){\n $mappingArray['40005'] = $_POST['40005'];\n }\n\n $mappingJson = json_encode($mappingArray);\n\n // W+: Open a file for read/write. Erases the contents of the file or creates a new file if it doesn't exist. File pointer starts at the beginning of the file\n $mapping_file = fopen(storage_path('/').\"ports_events_mapping.txt\", \"w+\") or die(\"Unable to open file!\");\n fwrite($mapping_file, $mappingJson);\n fclose($mapping_file);\n\n return redirect('port-event-mapping')->with('success', 'Ports and Events have been mapped.');\n }", "public function testInsertUrlUsingPOST()\n {\n }", "function doPOST (HttpRequest $request, HttpResponse $response) {\n throw new Exception(\"POST method not supported\");\n }", "public function post($post);", "function postdataEdxTeoricoPractico($url, $ruta, $data, $termino, $sistema, $tipoEstudiante)\n\t{\n\t\tset_time_limit(500);\n\t\t$target_url = $url; \n\t\t$fname = $ruta.$data; \n\t\t$cfile = new CURLFile(realpath($fname)); \n\t\t$post = array \n\t\t(\n\t\t\t'archivo' => $cfile,\n\t\t\t'termino' => $termino,\n\t\t\t'sistema' => $sistema,\n\t\t\t'tipoEstudiante' => $tipoEstudiante\n\t\t); \n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $target_url);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible;)\"); \n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-Type: multipart/form-data'));\n\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); \n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1); \n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 0);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t\n\t\t$resultadoExec = curl_exec ($ch);\n\t\t\n\t\tif ($resultadoExec === FALSE) {\n\t\t\t$response = \"Error sending\" . $fname . \" \" . curl_error($ch);\n\t\t\tcurl_close ($ch);\n\t\t}else{\n\t\t\tcurl_close ($ch);\n\t\t\t$response = \"Result: \" . $resultadoExec;\n\t\t}\n\t\t\n\t\treturn $response;\n\t}", "public function testLogUsingPOST()\n {\n\n }", "function make_post_call($mid_url, $post_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($post_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }", "function ticketbud_http_post($request, $host, $path, $port = 80, $ip=null) {\n\tglobal $wp_version;\n\t\n\t$ticketbud_version = constant('TICKETBUD_VERSION');\n\n\t$http_request = \"POST $path HTTP/1.0\\r\\n\";\n\t$http_request .= \"Host: $host\\r\\n\";\n\t$http_request .= \"Content-Type: application/x-www-form-urlencoded; charset=\" . get_option('blog_charset') . \"\\r\\n\";\n\t$http_request .= \"Content-Length: \" . strlen($request) . \"\\r\\n\";\n\t$http_request .= \"User-Agent: WordPress/$wp_version | Ticketbud/$ticketbud_version\\r\\n\";\n\t$http_request .= \"\\r\\n\";\n\t$http_request .= $request;\n\t\n\t$http_host = $host;\n\t// use a specific IP if provided - needed by ticketbud_check_server_connectivity()\n\tif ( $ip && long2ip(ip2long($ip)) ) {\n\t\t$http_host = $ip;\n\t} else {\n\t\t$http_host = ticketbud_get_host($host);\n\t}\n\n\t$response = '';\n\tif( false != ( $fs = @fsockopen($http_host, $port, $errno, $errstr, 10) ) ) {\n\t\tfwrite($fs, $http_request);\n\n\t\twhile ( !feof($fs) )\n\t\t\t$response .= fgets($fs, 1160); // One TCP-IP packet\n\t\tfclose($fs);\n\t\t$response = explode(\"\\r\\n\\r\\n\", $response, 2);\n\t}\n\treturn $response;\n}", "public static function process_http_request()\n {\n }", "function httpPOST($url, array $data, $headers = '') {\n $this->ensureOpened(__FUNCTION__);\n $query = http_build_query($data, '', '&');\n ($headers = trim($headers) === '') or $headers .= \"\\r\\n\";\n\n $headers = \"POST $url HTTP/1.0\\r\\n\".\n $headers.\n \"Content-Type: application/x-www-form-urlencoded\\r\\n\".\n \"Content-Length: \".strlen($query).\"\\r\\n\".\n \"$query\\r\\n\";\n\n $this->write($headers);\n return $this->readAllAndClose();\n }", "public function postAction() {\n $form = new Application_Form_Serie();\n $form->setAction($this->view->url($this->_request->getParams(), \"serie-post\"));\n\n $sample = $this->findRowById($this->_request->getParam(\"sample_id\"), \"Samples\");\n\n // kontrola, jestli byl formular odeslan a zda jsou data validni\n if ($this->_request->isPost() && $form->isValid($this->_request->getParams())) {\n // data jsou validni - vytvoreni nove serie snimku\n $tableSeries = new Application_Model_Series();\n \n $serie = $tableSeries->createRow($form->getValues(true));\n $serie->sample_id = $sample->sample_id;\n $serie->user_id = Zend_Auth::getInstance()->getIdentity()->user_id;\n $serie->save();\n \n $this->view->serie = $serie;\n $this->view->sample = $sample;\n }\n \n $this->view->form = $form;\n }", "public function indexActionPost() : object\n {\n $title = \"IP Check tool: result\";\n\n $request = $this->di->get(\"request\");\n $page = $this->di->get(\"page\");\n\n $ipaddr = $request->getPost(\"ip\");\n $isValid = \"\";\n $domain = \"\";\n\n if (filter_var($ipaddr, FILTER_VALIDATE_IP)) {\n $isValid = \"valid\";\n $domain = gethostbyaddr($ipaddr);\n } else {\n $isValid = \"invalid\";\n }\n\n $page->add(\"ip/result\", [\n \"ip\" => $ipaddr,\n \"valid\" => $isValid,\n \"domain\" => $domain\n ]);\n\n return $page->render([\n \"title\" => $title,\n ]);\n }", "public function testIndexAction() : void\n {\n $this->di->request->setPost(\"ip\", \"2002:c0a8:101::42\");\n\n $res = $this->controller->indexActionPost();\n $this->assertInternalType(\"array\", $res);\n\n list($json, $status) = $res;\n $this->assertEquals($json[\"valid\"], true);\n $this->assertEquals($status, 200);\n }", "function do_post_request($url, $data, $optional_headers = null)\n {\n\t \n$params = array('http' => array(\n 'method' => 'POST',\n 'content' => $data\n ));\n if ($optional_headers !== null) {\n $params['http']['header'] = $optional_headers;\n }\n $ctx = stream_context_create($params);\n $fp = @fopen($url, 'rb', false, $ctx);\n if (!$fp) {\n throw new Exception(\"Problem with $url, $php_errormsg\");\n }\n $response = @stream_get_contents($fp);\n if ($response === false) {\n throw new Exception(\"Problem reading data from $url, $php_errormsg\");\n }\n\t //print_r($response);\n return $response;\n }", "function http_post_data($url, $data = null, ?array $options = null, ?array &$info = null) {}", "private function getPost()\n {\n if ($this->end_point === null) {\n throw new \\DomainException('End-point can\\'t be null when call '.__METHOD__);\n }\n \n if ($this->filesize === null) {\n throw new \\DomainException('Filesize can\\'t be null when call '.__METHOD__);\n }\n \n $handle = curl_init();\n $custom_headers = array();\n \n curl_setopt($handle, CURLOPT_URL, $this->end_point);\n curl_setopt($handle, CURLOPT_FOLLOWLOCATION, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_POST, true);\n curl_setopt($handle, CURLOPT_FAILONERROR, true);\n curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, self::TIMEOUT);\n curl_setopt($handle, CURLOPT_BUFFERSIZE, 64000);\n curl_setopt($handle, CURLOPT_HTTPHEADER, array(\n 'Content-Length: 0',\n 'Final-Length: '.$this->filesize,\n ));\n curl_setopt($handle, CURLOPT_HEADERFUNCTION, function($ch, $header) use (&$custom_headers){\n $headers = array();\n $extract = explode(\"\\r\\n\", $header);\n foreach ($extract as $line) {\n if (preg_match('/^([a-z0-9_-]+): (.*)$/i', $line, $matches)) {\n list($null, $key, $value) = $matches;\n $headers[$key] = $value;\n }\n }\n\n $custom_headers = array_merge($custom_headers, $headers);\n\n return strlen($header);\n });\n \n if (curl_exec($handle) === false) {\n throw new Exception\\Curl('Error while request POST into '.$this->end_point.' : '.curl_error($handle), curl_errno($handle));\n }\n \n $http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n \n if ($http_code !== 201) {\n throw new Exception\\BadHeader('Error while request POST - excepted HTTP Code 201 - get HTTP Code '.$http_code);\n }\n \n $info = array_merge($custom_headers, curl_getinfo($handle));\n curl_close($handle);\n \n return $info;\n }", "function hsend_post(&$app, &$c) {\n\t\t$app->logger->debug(sprintf('%s::%s', __CLASS__, __FUNCTION__));\n\n\t\t$this->_http->setMethod(HTTP_REQUEST_METHOD_POST);\n\n\t\t$this->_http->setURL($c->param('app.view_http.request.uri'));\n\n\t\t$this->_set_basic_auth($app, $c);\n\n\t\t$this->_load_post_params($app, $c);\n\n\t\t$this->_load_headers($app, $c);\n\n\t\t$this->_load_body($app, $c);\n\n\t\t$this->_load_files($app, $c);\n\n\t\t$this->_http->sendRequest();\n\n\t\t$this->_handler_response($app, $c);\n\n\t\treturn $app->status->handled;\n\t}", "public function controllerPOST($url) {\r\n\treturn $this->controller($url);\r\n }", "public function postTerminal()\n {\n //si la peticion es ajax\n if ( Request::ajax() ) {\n $mdf = Input::get('mdf');\n if (Input::has('cable')) {\n $cable = Input::get('cable');\n $terminales = DigTroba::getTerminalCable($cable, $mdf);\n\n } elseif (Input::has('armario')) {\n $armario = Input::get('armario');\n $terminales = DigTroba::getTerminalArmario($armario, $mdf);\n\n }\n return Response::json(array('rst'=>1,'datos'=>$terminales));\n }\n }", "private function post (string $url)\r\n\t{\r\n\t\ttry {\t\t\t\t \r\n\t\t\t\t\r\n\t\t\t$handle = curl_init();\t\t\t\r\n\t\t\tcurl_setopt_array($handle, array(\r\n\t\t\t\tCURLOPT_URL => $url,\r\n\t\t\t\tCURLOPT_CONNECTTIMEOUT => 5,\r\n\t\t\t\tCURLOPT_TIMEOUT => 60,\r\n\t\t\t\tCURLOPT_RETURNTRANSFER => true,\r\n\t\t\t\tCURLOPT_POST => true,\r\n\t\t\t\tCURLOPT_POSTFIELDS => $this->paramUrl\r\n\t\t\t\t));\t\t\r\n\t\t\t//curl_setopt($ch, CURLOPT_ENCODING ,\"\");\r\n\t\t\t//curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded; charset=UTF-8'));\r\n\t\t\t\r\n\t\t\t$response = curl_exec($handle);\t\t\r\n\t\t\t$resp = json_decode($response);\t\t\t\r\n\t\t\tif ($resp['ok'] == false)\r\n\t\t\t\tthrow new \\Exception($resp['description']);\t\t\t\r\n\t\t\t\r\n\t\t} catch ( \\Exception $e) {\r\n\t\t\t$Logger = new \\Logger('TelegramMain.txt');\r\n\t\t\t$Logger -> log($response, $url.$this->paramUrl);\r\n\t\t}finally{\t\t\t\r\n\t\t\tcurl_close($handle);\t\t\r\n\t\t\treturn $response;\t\t\t\r\n\t\t}\r\n\r\n\t}", "public function postData(){\n\t\t$url = $this->host . \"/rest/v1/leads.json?access_token=\" . $this->getToken();\n\t\t$ch = curl_init($url);\n\t\t$requestBody = $this->bodyBuilder();\n\t\t//debug\n\t\t//print_r($requestBody);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json','Content-Type: application/json'));\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $requestBody);\n\t\tcurl_getinfo($ch);\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}", "public function postAction() {\n\t\t$db = Zend_Db_Table_Abstract::getDefaultAdapter();\n\t\t$postData = $this -> _request -> getParams();\n\t\t//Build insert data the easy new way\n\t\t$insertData = array();\n\t\tforeach ($postData as $key => $value) {\n\t\t\tif ($key != 'controller' && $key != 'module' && $key != 'action' && $key != 'submit') {\n\t\t\t\t$insertData[$key] = $value;\n\t\t\t}\n\t\t}\n\n\n\t\t//Build insert data the old way\n\t\t//\t$insertData = array(\n\t\t//'bibnumber' => $postData -> bibnumber,\n\t\t//'lastname' => $postData -> lastname,\n\t\t//'firstname' => $postData -> firstname,\n\t\t//'address1' => $postData -> address1,\n\t\t//'address2' => $postData -> address2,\n\t\t//'city' => $postData -> city,\n\t\t//'state' => $postData -> state,\n\t\t//'age' => $postData -> age,\n\t\t//'sex' => $postData -> sex,\n\t\t//'zipcode' => $postData -> zipcode,\n\t\t//'email' => $postData -> email,\n\t\t//'shirtsize' => $postData -> shirtsize,\n\t\t//'event' => $postData -> event,\n\t\t//'division' => $postData -> division,\n\t\t//'team' => $postData -> team,\n\t\t//'regtype' => $postData -> regtype );\n\n\t\tZend_Registry::get('session') -> postData[] = $insertData;\n\n\t\t// Insert the data and\n\t\t// Set the success/fail message $db -> insert('participant', $insertData)\n\t\t$valid = $this -> validate($insertData, 1);\n\n\t\tif ($this -> getRequest() -> getMethod() == 'POST' && $valid == \"valid\") {\n\t\t\t$db -> insert('participant', $insertData);\n\t\t\tZend_Registry::get('session') -> messages[] = array('type' => 'success', 'text' => 'Last Insert Was Successfull.');\n\t\t} else {\n\t\t\tZend_Registry::get('session') -> messages[] = array('type' => 'error', 'text' => 'Last Insert Failed: ' . $valid);\n\t\t}\n\n\t\t// Redirect back to page\n\t\t$this -> _redirect('/insert');\n\t}", "public function testLogSimpleUsingPOST()\n {\n\n }", "function handlePOSTRequest() {\n if (array_key_exists('submitProjectionRequest', $_POST)) {\n handleProjectionRequest();\n }\n }", "function postdatapuntosextrasteoricopractico($url, $termino, $anio)\n\t{\n\t\tset_time_limit(500);\n\t\t$target_url = $url; \n\t\t$post = array \n\t\t(\n\t\t\t'termino' => $termino,\n\t\t\t'anio' => $anio\n\t\t); \n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $target_url);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible;)\"); \n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-Type: multipart/form-data'));\n\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); \n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1); \n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 0);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t\n\t\t$resultadoExec = curl_exec ($ch);\n\t\t\n\t\tif ($resultadoExec === FALSE) {\n\t\t\t$response = \"Error sending\" . \" \" . curl_error($ch);\n\t\t\tcurl_close ($ch);\n\t\t}else{\n\t\t\tcurl_close ($ch);\n\t\t\t$response = \"Result: \" . $resultadoExec;\n\t\t}\n\t\t\n\t\treturn $response;\n\t}", "public function addPost(){\n $ourResponse=Http::post('https://reqres.in/api/users',[\n // Send below data into above post api url as\n 'name'=>'Sonam',\n 'job'=>'Designer',\n ]);\n // DD the response to check it is done or not\n dd($ourResponse->json());\n }", "public function testGetUrlsUsingPOST()\n {\n }", "public function submit_survey_post()\n\t\t{\n\t\t\t$testId = $this->post('testId');\n\t\t\t$uuid = $this->post('uuid');\n\t\t\t$weekSend = $this->post('weekSend');\n\t\t\tif(!empty($testId) &&\n\t\t\t\t!empty($uuid) &&\n\t\t\t\t!empty($weekSend)\n\t\t\t)\n\t\t\t{\n\t\t\t\t$insertData = array(\n\t\t\t\t\t'ts_uuid' => $uuid,\n\t\t\t\t\t'ts_test_id' => $testId,\n\t\t\t\t\t'ts_week' => $weekSend,\n\t\t\t\t\t'ts_submitted_on' => date('Y-m-d H:i:s')\n\t\t\t\t);\n\t\t\t\t$tempStatus = $this->Student_survey_model->insertSurvey($insertData);\n\t\t\t\tif($tempStatus)\n\t\t\t\t{\n\t\t\t\t\t$data['status'] = $this->lang->line('SUCCESS');\n\t\t\t\t\t$data['message'] = $this->lang->line('VALID_TOKEN_MESSAGE');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$data['status'] = $this->lang->line('FAIL');\n\t\t\t\t\t$data['message'] = $this->lang->line('unable_save_answer');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['status'] = $this->lang->line('FAIL');\n\t\t\t\t$data['message'] = $this->lang->line('please_pass_required');\n\t\t\t}\n\t\t\t$this->response($data , 200);\n\t\t}", "public function post()\n {\n $postId = $this->request->getParameter(\"id\"); /* le parametre disparait lors de l'annonce de \"public function post($postId)\". On l'annonce\n du coup en début de la méthode en faisant appel à la méthode getParameter de la class Request */\n $post = $this->post->getPost($postId); // va chercher la méthode GetPost($postId) dans le Model Post.php l.33\n $this->buildView(array('post' => $post));\n }", "public function login_post(){\n\t\t$data=($_POST);\n\n\t\t$result = $this->login_model->login($data);\n\t\treturn $this->response($result);\t\t\t\n\t}", "public function httpPost($redirectTo = null) : string;", "function postDataEncuestaSatisfaccionPractico($url, $ruta, $data, $termino, $sistema, $tipoEstudiante, $pregunta)\n\t{\n\t\tset_time_limit(500);\n\t\t$target_url = $url; \n\t\t$fname = $ruta.$data; \n\t\t$cfile = new CURLFile(realpath($fname)); \n\t\t$post = array \n\t\t(\n\t\t\t'archivo' => $cfile,\n\t\t\t'termino' => $termino,\n\t\t\t'sistema' => $sistema,\n\t\t\t'tipoEstudiante' => $tipoEstudiante,\n\t\t\t'pregunta' => $pregunta\n\t\t); \n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $target_url);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible;)\"); \n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-Type: multipart/form-data'));\n\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); \n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1); \n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 0);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t\n\t\t$resultadoExec = curl_exec ($ch);\n\t\t\n\t\tif ($resultadoExec === FALSE) {\n\t\t\t$response = \"Error sending\" . $fname . \" \" . curl_error($ch);\n\t\t\tcurl_close ($ch);\n\t\t}else{\n\t\t\tcurl_close ($ch);\n\t\t\t$response = \"Result: \" . $resultadoExec;\n\t\t}\n\t\t\n\t\treturn $response;\n\t}", "function _sendToHost($host,$port,$method,$path,$data,$useragent=0) {\r\n\t// Supply a default method of GET if the one passed was empty\r\n\tif (empty($method))\r\n\t $method = 'GET';\r\n\t$method = strtoupper($method);\r\n\tif ($method == 'GET')\r\n\t $path .= '?' . $data;\r\n\t$buf = \"\";\r\n\t// try to connect to Canada Post server, for 2 second\r\n\t$fp = @fsockopen($host, $port, $errno, $errstr, 15);\r\n\tif ( $fp ) {\r\n\t fputs($fp, \"$method $path HTTP/1.1\\n\");\r\n\t fputs($fp, \"Host: $host\\n\");\r\n\t fputs($fp, \"Content-type: application/x-www-form-urlencoded\\n\");\r\n\t fputs($fp, \"Content-length: \" . strlen($data) . \"\\n\");\r\n\t if ($useragent)\r\n\t\tfputs($fp, \"User-Agent: IntenseCart\\n\");\r\n\t fputs($fp, \"Connection: close\\n\\n\");\r\n\t if ($method == 'POST')\r\n\t\tfputs($fp, $data);\r\n\r\n\t while (!feof($fp))\r\n\t\t$buf .= fgets($fp,128);\r\n\t fclose($fp);\r\n\t} else {\r\n\t $buf = '<?xml version=\"1.0\" ?><eparcel><error><statusMessage>Cannot reach Canada Post Server. You may refresh this page (Press F5 on your keyboard) to try again.</statusMessage></error></eparcel>'; \r\n\t}\r\n\r\n\treturn $buf;\r\n }", "function postdataRubricaPPTTeoricoPractico($url, $ruta, $data, $termino, $sistema, $tipoEstudiante, $franja, $paralelo, $docente)\n\t{\n\t\tset_time_limit(500);\n\t\t$target_url = $url; \n\t\t$fname = $ruta.$data; \n\t\t$cfile = new CURLFile(realpath($fname)); \n\t\t$post = array \n\t\t(\n\t\t\t'archivo' => $cfile,\n\t\t\t'termino' => $termino,\n\t\t\t'sistema' => $sistema,\n\t\t\t'tipoEstudiante' => $tipoEstudiante,\n\t\t\t'franja' => $franja,\n\t\t\t'paralelo' => $paralelo,\n\t\t\t'docente' => $docente\n\t\t); \n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $target_url);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible;)\"); \n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-Type: multipart/form-data'));\n\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); \n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1); \n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 0);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t\n\t\t$resultadoExec = curl_exec ($ch);\n\t\t\n\t\tif ($resultadoExec === FALSE) {\n\t\t\t$response = \"Error sending\" . $fname . \" \" . curl_error($ch);\n\t\t\tcurl_close ($ch);\n\t\t}else{\n\t\t\tcurl_close ($ch);\n\t\t\t$response = \"Result: \" . $resultadoExec;\n\t\t}\n\t\t\n\t\treturn $response;\n\t}", "abstract protected function _postHandle();", "public function testGetMeasurementsUsingPOST()\n {\n }", "public function postRequest(SS_HTTPRequest $request, SS_HTTPResponse $response, DataModel $model);", "public function ParsePostData() {}", "private function makeFakeData(){\n // URL = http://localhost/tweeter/test.php/stuff/morestuff/?id=15\n\n $_SERVER['SCRIPT_NAME'] = '/tweeter/test.php';\n $_SERVER['REQUEST_METHOD'] = 'GET';\n $_SERVER['PATH_INFO'] = '/stuff/morestuff/';\n $_GET['id'] = '15';\n $_POST['text'] = 'Un texte.';\n }", "public function run()\r\n {\r\n // exit();\r\n // 兼容Content Type为application/json的数据接收\r\n if (isset($_SERVER['CONTENT_TYPE']) && preg_match(\"/\\w+\\/\\w+([\\-\\+]\\w+)*/\", $_SERVER['CONTENT_TYPE'], $result)) {\r\n $content_type = $result[0];\r\n switch ($content_type) {\r\n case 'multipart/form-data':\r\n case 'application/x-www-form-urlencoded':\r\n if ($_SERVER['REQUEST_METHOD'] == 'PUT') {\r\n try {\r\n $this->parsePut();\r\n } catch (\\Exception $e) {\r\n\r\n }\r\n global $_PUT;\r\n $_POST = $_PUT;\r\n }\r\n break;\r\n case 'application/json':\r\n if ($_SERVER['REQUEST_METHOD'] == 'PUT') {\r\n global $_PUT;\r\n $php_input = file_get_contents('php://input');\r\n $_PUT = (array) json_decode($php_input, 1);\r\n $_POST = $_PUT;\r\n } else {\r\n $php_input = file_get_contents('php://input');\r\n $_POST = (array) json_decode($php_input, 1);\r\n }\r\n\r\n break;\r\n case 'application/xml':\r\n case 'text/xml':\r\n $php_input = file_get_contents('php://input');\r\n // 听说并没有成熟的xml解析工具?\r\n break;\r\n }\r\n }\r\n\r\n }", "public function httpPost()\n {\n return $this->method(\"POST\");\n }", "public function handle()\n {\n $client = new Client();\n $res = $client->request('POST', 'http://projects.knmi.nl/klimatologie/daggegevens/getdata_dag.cgi', \n [\n 'post-data' => [\n 'vars' => 'PRCP', 'stns' => '833'\n ]\n ]\n );\n\n $this->line($res->getStatusCode());\n $this->line($res->getHeader('content-type'));\n var_dump($res->getBody());\n var_dump($res);\n $this->line('imported!');\n // 'start' => '', 'end' => '',\n }", "private function DownloadParsePage() {\n $this->Log(\"Debridage du lien : \".$this->url);\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($curl, CURLOPT_USERAGENT, DOWNLOAD_STATION_USER_AGENT);\n\t\tcurl_setopt($curl, CURLOPT_COOKIEFILE, $this->TOUTDEBRID_COOKIE);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($curl, CURLOPT_URL, $this->TOUTDEBRID_DEBRID_URL);\n curl_setopt($curl, CURLOPT_POST, TRUE);\n curl_setopt($curl, CURLOPT_POSTFIELDS, 'urllist='.urlencode($this->url).'&captcha=none&');\n\t\t$ret = curl_exec($curl);\n\t\t$this->Log(\"Reponse tout-debrid : \".$ret);\n\t\tcurl_close($curl);\n\t\treturn $ret;\n\t}", "private function POST($url,$params=false){\n return $this->Request($url,$params,HTTP_POST);\n }", "public function post($location, $body);", "private function startModule()\r\n\t{\r\n\t\t$PagSeguro = 'Comando=validar';\r\n\t\t$PagSeguro .= '&Token=' . $this->token;\r\n\t\t$Cabecalho = \"Retorno PagSeguro\";\r\n\t\t\r\n\t\tforeach ($_POST as $key => $value)\r\n\t\t{\r\n\t\t\t$value = urlencode(stripslashes($value));\r\n\t\t\t$PagSeguro .= \"&$key=$value\";\r\n\t\t}\r\n\t\t\r\n\t\tif (function_exists('curl_exec'))\r\n\t\t{\r\n\t\t\t$curl = true;\r\n\t\t}\r\n\t\telseif ( (PHP_VERSION >= 4.3) && ($fp = @fsockopen ('ssl://pagseguro.uol.com.br', 443, $errno, $errstr, 30)) )\r\n\t\t{\r\n\t\t\t$fsocket = true;\r\n\t\t}\r\n\t\telseif ($fp = @fsockopen('pagseguro.uol.com.br', 80, $errno, $errstr, 30))\r\n\t\t{\r\n\t\t\t$fsocket = true;\r\n\t\t}\r\n\t\t\r\n\t\tif ($curl == true)\r\n\t\t{\r\n\t\t\t$ch = curl_init();\r\n\t\t\r\n\t\t \tcurl_setopt($ch, CURLOPT_URL, 'https://pagseguro.uol.com.br/Security/NPI/Default.aspx');\r\n\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\r\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $PagSeguro);\r\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\t\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\r\n\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\r\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t\r\n\t\t\tcurl_setopt($ch, CURLOPT_URL, 'https://pagseguro.uol.com.br/Security/NPI/Default.aspx');\r\n\t\t\t$resp = curl_exec($ch);\r\n\t\t\r\n\t\t\tcurl_close($ch);\r\n\t\t\t$confirma = (strcmp ($resp, \"VERIFICADO\") == 0);\r\n\t\t}\r\n\t\telseif ($fsocket == true)\r\n\t\t{\r\n\t\t\t$Cabecalho = \"POST /Security/NPI/Default.aspx HTTP/1.0\\r\\n\";\r\n\t\t\t$Cabecalho .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\r\n\t\t\t$Cabecalho .= \"Content-Length: \" . strlen($PagSeguro) . \"\\r\\n\\r\\n\";\r\n\t\t\r\n\t\t\tif ($fp || $errno>0)\r\n\t\t\t{\r\n\t\t\t\tfputs ($fp, $Cabecalho . $PagSeguro);\r\n\t\t\t\t$confirma = false;\r\n\t\t\t\t$resp = '';\r\n\t\t\t\twhile (!feof($fp))\r\n\t\t\t\t{\r\n\t\t\t\t\t$res = @fgets ($fp, 1024);\r\n\t\t\t\t\t$resp .= $res;\r\n\t\t\t\t\tif (strcmp ($res, \"VERIFICADO\") == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$confirma=true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfclose ($fp);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo \"$errstr ($errno)<br />\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($confirma)\r\n\t\t{\r\n\t\t\t$StatusTransacao = $_POST['StatusTransacao'];\r\n\t\t\t$produtoDesc = trim($_POST['ProdDescricao_1']);\r\n\t\t\t$valorProduto = trim($_POST['ProdValor_1']);\r\n\t\t\t$valorProduto = eregi_replace(\",\",\".\",$valorProduto);\r\n\t\t \t\r\n\t\t\t$operatorCalc = $this->calculation($valorProduto)*$valorProduto;\r\n\t\t \r\n\t\t\tif($StatusTransacao == \"Aprovado\" or $StatusTransacao == \"Completo\")\r\n\t\t\t{ \r\n\t\t\t\t$this->Query(\"UPDATE \".GL_DB.\".dbo.\".GL_Table.\" SET \".GL_Column_1.\"=\".GL_Column_1.\"+\".(int)$operatorCalc.\" WHERE \".GL_Login.\"='$produtoDesc'\");\r\n\t\t\t\t\t\r\n\t\t \t}\r\n\t\t \telse if($StatusTransacao == \"Cancelado\")\r\n\t\t \t{\r\n\t\t\t\r\n\t\t\t}\r\n\t\t \telse\r\n\t\t \t{\r\n\t\t\t\t\r\n\t\t \t}\r\n\t\t}\r\n\t\texit(\"Operation Finished\");\r\n\t}", "public function postAction()\n {\n \n }", "function postdataRubricaPPTPractico($url, $ruta, $data, $termino, $sistema, $tipoEstudiante, $franja, $paralelo, $docente)\n\t{\n\t\tset_time_limit(500);\n\t\t$target_url = $url; \n\t\t$fname = $ruta.$data; \n\t\t$cfile = new CURLFile(realpath($fname)); \n\t\t$post = array \n\t\t(\n\t\t\t'archivo' => $cfile,\n\t\t\t'termino' => $termino,\n\t\t\t'sistema' => $sistema,\n\t\t\t'tipoEstudiante' => $tipoEstudiante,\n\t\t\t'franja' => $franja,\n\t\t\t'paralelo' => $paralelo,\n\t\t\t'docente' => $docente\n\t\t); \n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $target_url);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible;)\"); \n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-Type: multipart/form-data'));\n\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); \n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1); \n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 0);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t\n\t\t$resultadoExec = curl_exec ($ch);\n\t\t\n\t\tif ($resultadoExec === FALSE) {\n\t\t\t$response = \"Error sending\" . $fname . \" \" . curl_error($ch);\n\t\t\tcurl_close ($ch);\n\t\t}else{\n\t\t\tcurl_close ($ch);\n\t\t\t$response = \"Result: \" . $resultadoExec;\n\t\t}\n\t\t\n\t\treturn $response;\n\t}", "private function managePost()\n {\n // Do only react on POST requests\n if ($_SERVER['REQUEST_METHOD'] != 'POST' || empty($_POST)) {\n return;\n }\n\n /* @var $post \\Core\\Http\\Post\\Post */\n $this->di->mapService('core.http.post', '\\Core\\Http\\Post\\Post');\n\n $post = $this->di->get('core.http.post');\n\n // Setting the name of the session token that has to/gets sent with a form\n $post->setTokenName($this->config->get('Core', 'security.form.token'));\n\n // Validate posted token with session token\n if (!$post->validateCompareWithPostToken($this->di->get('core.security.form.token'))) {\n return;\n }\n\n // Some data cleanup\n $post->trimData();\n\n // Assingn app related post data to the corresponding app\n $post_data = $post->get();\n\n foreach ($post_data as $name => $data) {\n $app = $this->getAppInstance($name);\n $app->post->set($data);\n }\n }" ]
[ "0.6341764", "0.6341764", "0.6341764", "0.63166827", "0.60722274", "0.6054227", "0.60370255", "0.5989937", "0.5950747", "0.5700691", "0.56850994", "0.5672935", "0.5645184", "0.56393516", "0.5638934", "0.5617604", "0.5581922", "0.5549565", "0.5534655", "0.5531239", "0.55265605", "0.549804", "0.5493048", "0.54850054", "0.5471114", "0.5468736", "0.5462647", "0.54562885", "0.545109", "0.54325455", "0.5431238", "0.5429182", "0.5423197", "0.54084486", "0.5408119", "0.540557", "0.5383573", "0.5382582", "0.5381874", "0.53695714", "0.5363499", "0.53533953", "0.5346005", "0.5341918", "0.532848", "0.5321424", "0.5319517", "0.531345", "0.5292021", "0.5277629", "0.52764535", "0.5267395", "0.52658147", "0.5265082", "0.5263861", "0.52508676", "0.5246955", "0.5246029", "0.5240172", "0.5226796", "0.52146584", "0.5213653", "0.52115494", "0.52103436", "0.5197737", "0.51961446", "0.5195962", "0.5195344", "0.5191821", "0.5187168", "0.51863474", "0.5184784", "0.51828974", "0.51826906", "0.51681095", "0.5167662", "0.5165722", "0.5163654", "0.5158123", "0.5155865", "0.51546", "0.5153265", "0.51518005", "0.5150264", "0.51487005", "0.5139332", "0.51330346", "0.5131419", "0.51288694", "0.5127639", "0.51266974", "0.5125988", "0.5122207", "0.5116049", "0.5108291", "0.5103481", "0.5103066", "0.510091", "0.51009023", "0.5100876", "0.50965005" ]
0.0
-1
checks if the user has a role, which is either passed by Role object or string.
public function hasRole($role) { if ($role instanceof Role) { $roleName = $role->getName(); } else { $roleName = $role; } /** @var Role $userRole */ foreach ($this->roles as $userRole) { if($roleName == $userRole) { return true; } }; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasRole($user, string $role = 'login'): bool {}", "public function hasRole(string $role): bool;", "public function is_role($role)\n {\n }", "function is_user_in_role( $user_id, $role ) {\r\n $user = new WP_User( $user_id );\r\n\treturn ( ! empty( $user->roles ) && is_array( $user->roles ) && in_array( $role, $user->roles ) );\r\n}", "function hasRole($role, $userId = null);", "function hasRole($role)\n{\n\treturn $this->loggedUser? $this->loggedUser->hasRole($role) : false;\n}", "function tsg_user_has_role( $role = '', $user = null )\n{\n $user = $user ? new WP_User( $user ) : wp_get_current_user();\n\n if ( empty( $user->roles ) )\n return;\n\n if ( in_array( $role, $user->roles ) )\n return true;\n\n return;\n}", "function hasRole($user, $role){\n\n if(ucfirst($user->role) == 'Root'){\n return true;\n }\n else {\n if($user->role == ucwords($role)){\n return true;\n }\n else {\n return false;\n }\n }\n }", "public function roleExists(string $role): bool;", "function auth_role($role)\n {\n if (auth_isAnonymous()) {\n return false;\n }\n\n $auth = auth_prerequisite();\n $field = $auth['fields']['role'];\n $session = auth_get();\n\n return $session->$field == $role;\n }", "public function hasRole($role){\n return null !== $this->role()->where('name', $role)->first();\n }", "function role_exists($role)\n{\n\n if (!empty($role))\n {\n return $GLOBALS['wp_roles']->is_role($role);\n }\n\n return false;\n}", "public function HasRole ($roleName = NULL, $idRole = NULL);", "function user_is_role($role, $user_id = null) {\n\tif ($user_id == null)\n\t\t// defaults to the current user\n\t\t$user_id = $_SESSION['user_id'];\n\n\treturn get_user_role_weight($user_id) === get_role_weight($role);\n}", "function user_is_role($role, $user_id = null) {\n\tif ($user_id == null)\n\t\t// defaults to the current user\n\t\t$user_id = $_SESSION['user_id'];\n\n\treturn get_user_role_weight($user_id) === get_role_weight($role);\n}", "function has_role($user, $role_name) {\n\n\tswitch ($role_name) {\n\t\tcase 'editor' :\n\t\t\tif (is_callable('hj_approve_is_editor')) {\n\t\t\t\treturn call_user_func('hj_approve_is_editor', $user);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'supervisor' :\n\t\t\tif (is_callable('hj_approve_is_supervisor')) {\n\t\t\t\treturn call_user_func('hj_approve_is_supervisor', $user);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'observer' :\n\t\t\tif (is_callable('hj_observer_is_observer')) {\n\t\t\t\treturn call_user_func('hj_observer_is_observer', $user);\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\tif (is_callable('roles_has_role')) {\n\t\treturn call_user_func('roles_has_role', $user, $role_name);\n\t}\n\n\treturn false;\n}", "public function has_role($role)\n\t{\n\t\t// Check what sort of argument we have been passed\n\t\tif ($role instanceof Sprig)\n\t\t{\n\t\t\t$key = 'id';\n\t\t\t$val = $role->id;\n\t\t}\n\t\telseif (is_string($role))\n\t\t{\n\t\t\t$key = 'name';\n\t\t\t$val = $role;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$key = 'id';\n\t\t\t$val = (int) $role;\n\t\t}\n\n\t\t$values = $this->refresh('roles')->as_array(NULL,$key);\n\t\treturn (in_array($val, $values));\n\t}", "public function is($role);", "public function hasRole($name);", "public function isHasRole($userId, $role) {\n\t}", "function checkRole($role) {\n\n return in_array($role, $this->listRoleCurUser);\n }", "public function hasRole($role){\n if($this->roles()->where('name', $role)->first()){\n return true;\n }\n return false;\n }", "public function has_role($role)\n\t{\n\t\t// Don't mess with these calls, they are too complex\n\t\tif (is_object($role))\n\t\t\treturn parent::has_role($role);\n\n\t\t// Make sure the role name is a string\n\t\t$role = (string) $role;\n\n\t\tif (ctype_digit($role))\n\t\t{\n\t\t\t// Find by id\n\t\t\treturn isset($this->roles[$role]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Find by name\n\t\t\treturn in_array($role, $this->roles);\n\t\t}\n\t}", "public function HasRole($role)\n {\n if ($this->isConnected()) {\n $reflector = new Reflector($this->user);\n if (!method_exists($this->user,'getRoles')) {\n throw new MazeoException(\"Class {$reflector->getName()} must have an \\\"getRoles\\\" method for perform role access check\");\n }\n return in_array($role, $this->user->getRoles()) ? true : false;\n } else return false;\n }", "function is($role_name){\n $this->CI->load->model('role');\n $role = $this->CI->role->getRoleOnUserByName($this->username(), $role_name);\n if(!empty($role)) return $role;\n else return false;\n }", "public function hasRole($role) {\n return in_array((string)$role, $this->roles);\n }", "public function isRole(string $role): bool\n {\n /* @var Collection $roles */\n $roles = $this->roles;\n\n return $roles->pluck('slug')->contains($role) ?:\n $roles->pluck('id')->contains($role);\n }", "function pilau_user_has_role( $user, $role ) {\n\t\treturn in_array( $role, pilau_get_user_role( $user, false, true ) );\n\t}", "abstract public function hasRole($roleName);", "private function role_exists( $role ) {\n global $wp_roles;\n\n return $wp_roles->is_role( $role );\n }", "public function hasRole($role)\n {\n return null !== $this->roles()->where('name', $role)->first();\n }", "function checkRole($role)\n{\n return (Auth::check())?Auth::user()->checkRole($role):false;\n}", "public function isRole(): bool\n {\n return $this->getType() === static::TYPE_ROLE;\n }", "public function hasRole($role)\n {\n $user = \\Auth::user();\n $userRoles = [];\n foreach ($user->roles as $r) {\n $userRoles[] = $r->slug;\n }\n if (strpos($role, '|')) {\n $roles = explode('|', $role);\n foreach ($roles as $rol) {\n if (in_array($rol, $userRoles))\n return true;\n }\n }\n if (strpos($role, ',')) {\n $roles = explode(',', $role);\n if (array_intersect($roles, $userRoles) == $roles) {\n return true;\n }\n }\n if (in_array($role, $userRoles))\n return true;\n return false;\n }", "public function is_role( $role = '' )\n\t{\n\t\t$auth_role = config_item('auth_role');\n\n\t\tif( $role != '' && ! empty( $auth_role ) )\n\t\t{\n\t\t\t$role_array = explode( ',', $role );\n\n\t\t\tif( in_array( $auth_role, $role_array ) )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public function userHasRole($role_name){\n foreach($this->roles as $role){\n if(Str::lower($role_name) == Str::lower($role->name))\n return true;\n }\n\n return false;\n }", "function check_user_role($roles, $user_id = null) {\n\tif ($user_id) $user = get_userdata($user_id);\n\telse $user = wp_get_current_user();\n\tif (empty($user)) return false;\n\tforeach ($user->roles as $role) {\n\t\tif (in_array($role, $roles)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function user_role_need ($role) {\r\n\t$info = user_info();\r\n\treturn ($info[3] == $role ? true : false);\r\n}", "public function hasRole($role)\n {\n $user = $this->view->user();\n if ($user && in_array($role, $user->roles)) {\n return TRUE;\n }\n return FALSE;\n }", "function auth_roles()\n {\n if (auth_isAnonymous()) {\n return false;\n }\n\n $auth = auth_prerequisite();\n $field = $auth['fields']['role'];\n $session = auth_get();\n $roles = func_get_args();\n\n return in_array($session->$field, $roles);\n }", "private function isUser($role = 'user') : bool\n {\n return $this->user->hasRole('user');\n }", "function checkSingleRole($roleToCheck) {\n //Ensure user is logged in\n if(Auth::guest()) {\n return false;\n }\n $roleToCheck = strtolower($roleToCheck);\n //Ensure that the user is an admin or an owner\n $roles = Auth::user()->roles;\n //Loop through roles and check for permission\n foreach($roles as $role) {\n if($role->name == $roleToCheck) {\n return true;\n }\n }\n //User is not an admin\n return false;\n}", "public function hasRole($role)\n {\n return $this->isGranted($role); \n }", "public function hasRole($role)\n {\n return in_array(strtoupper($role), $this->getRoles(), true);\n }", "public function hasRole($role)\n {\n return in_array(strtoupper($role), $this->getRoles(), true);\n }", "public function hasRole($role)\n {\n return in_array(strtoupper($role), $this->getRoles(), true);\n }", "function frame_user_role($role, $user_id = null)\n{\n if (is_numeric($user_id))\n $user = get_userdata($user_id);\n else\n $user = wp_get_current_user();\n\n if (empty($user))\n return false;\n\n $intersection = array_intersect((array) $role, (array) $user->roles);\n\n return !empty($intersection) ? true : false;\n}", "public function hasRole($role)\n {\n if(is_string($role)) {\n return $this->role->name == $role;\n }\n\n if($role instanceof Role) {\n return $role->name == $this->role->name;\n }\n\n return $role->contains('name', $this->role->name);\n }", "function check_role( $role_in ) {\n global $_SESSION;\n\n // read the permissions database\n $d = loadDB();\n\n // check if the current user\n $user_name = $_SESSION[\"logged\"];\n // has a specified role\n $roles = array(); // collect all roles for this user\n foreach ( $d[\"users\"] as $key => $value ) {\n if ($value[\"name\"] == $user_name) {\n $roles = array_merge($roles, $value[\"roles\"]);\n }\n }\n \n foreach ( $roles as $role ) {\n if ($role == $role_in) {\n audit( \"check_role\", $role_in.\" as \".$user_name);\n return true;\n }\n }\n audit( \"check_role failed\", $role_in.\" as \".$user_name);\n return false;\n }", "public function hasRole($role)\n {\n return in_array($role, $this->getRoles());\n }", "public function roleInUse(string $role): bool;", "public function hasRole($role)\n {\n return $this->role == $role;\n }", "public function hasRole($role)\n {\n if(is_string($role))\n {\n return $this->role->name == $role;\n }\n\n return $role->contains('name', $this->role->name);\n }", "public function hasRole(string $role): bool\n {\n return getApp()->security()->hasRole($role);\n }", "public static function is_role($user, $role_name)\n\t{\n\t\t$menu = Menu::factory('Team', $user);\n\t\treturn $menu->is_allowed($user->username, $role_name);\n\t}", "private function isOnlyRole($role = 'user') : bool\n {\n return $this->maxRole() === $role;\n }", "public function has_role($role_name)\n {\n $role = role_active_record::search()\n ->where('name', $role_name)\n ->execOne();\n $user_role = user_role_active_record::search()\n ->where('uid', $this->uid)\n ->where('rid', $role->rid)\n ->execOne();\n if ($user_role instanceof user_role_active_record) {\n return true;\n } else {\n return false;\n }\n }", "function checkUserRole($userId, $roleToCheck) {\n //Ensure user is logged in\n\n $user = User::find($userId);\n if (is_null($user)) {\n return false; //User dose not exist\n }\n $roleToCheck = strtolower($roleToCheck);\n //Ensure that the user is an admin or an owner\n $roles = $user->roles;\n //Loop through roles and check for permission\n foreach($roles as $role) {\n if($role->name == $roleToCheck) {\n return true;\n }\n }\n //User is not an admin\n return false;\n}", "public function hasRole(string $role, FilterInterface $filter = null):bool;", "public function has_role($id){\n $encontrado=false;\n foreach ($this->roles as $role){\n if($role->id==$id || $role->slug==$id){\n $encontrado=true;\n }\n\n }\n return $encontrado;\n }", "protected function hasRole($role)\n {\n $right = session()->get(\"role\");\n $result = in_array($right, (array)$role);\n return $result;\n }", "function isRole($role)\n{\n return ($role == $_SESSION['role']);\n}", "public function hasRole($role)\n {\n //$role is a string\n if (is_string($role))\n {\n return $this->roles->contains('name', $role);\n }\n\n //$role is a collection\n return !! $role->intersect($this->roles)->count();\n }", "public function hasRole(): bool\n {\n return isset($this->role);\n }", "public function logged_in($role = NULL)\n\t{\n\t\t// Get the user from the session\n\t\tif ($this->_use_session) {\n\t\t\t$user = $this->get_user();\n\t\t\t\n\t\t// If we're not using the session check for an auto_login cookie.\n\t\t} else {\n\t\t\t$user = $this->auto_login();\n\t\t}\n\n\t\tif ( ! $user) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ($user instanceof Model_User)\n\t\t{\n\t\t\t// If we don't have a roll no further checking is needed\n\t\t\tif ( ! $role) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\t\n\t\t\tif (is_array($role))\n\t\t\t{\n\t\t\t\t// Get all the roles\n\t\t\t\t$roles = Doctrine_Query::create()\n\t\t\t\t\t->from('Model_Role r')\n\t\t\t\t\t->where('r.name IN ?', array($role))\n\t\t\t\t\t->execute();\n\t\t\t\t\n\t\t\t\t// Make sure all the roles are valid ones\n\t\t\t\tif (count($roles) !== count($role))\n\t\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( ! is_object($role))\n\t\t\t\t{\n\t\t\t\t\t// Load the role\n\t\t\t\t\t$roles = Doctrine::getTable('Model_Role')\n\t\t\t\t\t\t->findByName($role);\n\t\t\t\t\t\n\t\t\t\t\tif ( ! $roles OR count($roles) === 0)\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $user->has_role($roles);\n\t\t}\n\t\treturn FALSE;\n\t}", "public static function usersRoleIs( $role = false, $current_user = false )\n\t\t{\n\n\t\t\t// Simple sanitization\n\t\t\t$role = sanitize_text_field( $role );\n\n\t\t\t// Must be passed a role\n\t\t\tif( !$role ){\n\t\t\t\treturn new WP_Error( '1', 'usersRoleIs() was not passed a role' );\n\t\t\t}\n\n\t\t\t// Ensure they're logged in, otherwise we can't tell\n\t\t\tif( !is_user_logged_in() ){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// OK, we can check this user, use WP's globalized $curent_user\n\t\t\tif( !$current_user )\n\t\t\t{\n\n\t\t\t\tglobal $current_user; \n\t\t\t\tget_currentuserinfo();\n\t\t\t\t\n\t\t\t}\n\n\t\t\tif( $current_user && isset( $current_user->caps ) && is_array( $current_user->caps ) && isset( $current_user->caps[ $role ] ) && $current_user->caps[ $role ] == 1 ){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}", "public function valid_input_role() {\n $role = $this->ci->input->post(\"role\");\n\n if ($role == USER_CATI || $role == USER_CID || $role == USER_FINANCE ||\n $role == USER_MP || $role == USER_DIV_MARKETEERS || $role == USER_DIV_CONSULTING ||\n $role == USER_DIV_INSTITUTE || $role == USER_DIV_INSIGHT\n ) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "public function checkRole(Role $role){\n $grant = false;\n foreach ($this->getRoles() as $userRole){\n if($userRole == $role){\n $grant = true;\n }\n }\n if(!$grant){ \n $_SESSION['login_message'] = 'You do not have required permissions to acces the page';\n header('Location: index.php');\n exit();\n }\n }", "public function hasRole($role) {\n\t\t$roles = (array) $this->Session->read('Acl.roles');\n\n\t\tif (is_numeric($role)) {\n\t\t\treturn isset($roles[$role]);\n\t\t}\n\n\t\treturn in_array($role, $roles);\n\t}", "public function hasRole($role)\n {\n return $this->session->hasRole($role);\n }", "public function hasRole(): bool\n {\n return $this->has(AttributeType::OID_ROLE);\n }", "public function isRole(){\n $r=Cache::get('role');\n if ((int)$r ==2)\n {\n return true;\n }\n else\n return false;\n }", "public function hasRole($role)\n {\n if (is_string($role)) {\n return $this->userRoles()->contains('name', $role);\n }\n\n return !!$role->intersect($this->userRoles())->count();\n }", "private function isRole($userId, $role) {\n $assignments = self::getAssignments(($userId));\n foreach($assignments as $assignment){\n if($assignment->roleName === Yii::$app->params[$role])\n return true;\n }\n return false;\n }", "public function hasRole($user, $role_id)\n {\n // TODO: Please find better method than roles->contains, try to use Query Builder\n return $user->roles->contains('id', $role_id);\n }", "function hasRole($Role, $UserID = null)\n\t{\n $databaseManager = Rbac::getInstance()->getDatabaseManager();\n $tablePrefix = $databaseManager->getTablePrefix();\n \n\t if ($UserID === null)\n {\n throw new RbacUserNotProvidedException('$UserID is a required argument.');\n }\n $RoleID = Rbac::getInstance()\n ->getRbacManager()\n ->getRoleManager()\n ->getId($Role)\n ;\n\n return(\n $databaseManager->request(\n \"SELECT * FROM {$tablePrefix}userroles AS TUR\n JOIN {$tablePrefix}roles AS TRdirect ON (TRdirect.ID=TUR.RoleID)\n JOIN {$tablePrefix}roles AS TR ON (TR.Lft BETWEEN TRdirect.Lft AND TRdirect.Rght)\n WHERE TUR.UserID=? AND TR.ID=?\"\n , [$UserID, $RoleID])\n !== null);\n\t}", "public function hasRole() {\n return $this->_has(2);\n }", "public function hasRole($role)\n {\n if (!$this->role)\n return false;\n\n return $this->role->name == $role;\n }", "function is_role_custom( $role ) {\r\n\t\t\t// User has roles so look for a UM Role one\r\n\t\t\t$role_keys = get_option( 'um_roles' );\r\n\r\n\t\t\tif ( empty( $role_keys ) )\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t$role_keys = array_map( function( $item ) {\r\n\t\t\t\treturn 'um_' . $item;\r\n\t\t\t}, $role_keys );\r\n\r\n\t\t\treturn in_array( $role, $role_keys );\r\n\t\t}", "public static function user_has_role( $user_id, $role ) {\n\t\t$user = get_userdata( $user_id );\n\t\tif ( empty( $user ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn ( in_array( $role->get_slug(), (array) $user->roles ) );\n\t}", "public function hasRole($role): bool\n {\n if (! is_string($role) && ! $role instanceof RoleInterface) {\n throw new Exception\\InvalidArgumentException(\n 'Role must be a string or implement Laminas\\Permissions\\Rbac\\RoleInterface'\n );\n }\n\n if (is_string($role)) {\n return isset($this->roles[$role]);\n }\n\n $roleName = $role->getName();\n return isset($this->roles[$roleName])\n && $this->roles[$roleName] === $role;\n }", "public function hasRole($role)\n {\n return $this->cached_roles->where('slug', $role)->count() > 0;\n }", "function user_is_at_least_role($role, $user_id = null) {\n\tif ($user_id == null)\n\t\t// defaults to the current user\n\t\t$user_id = $_SESSION['user_id'];\n\n\treturn get_user_role_weight($user_id) >= get_role_weight($role);\n}", "function user_is_at_least_role($role, $user_id = null) {\n\tif ($user_id == null)\n\t\t// defaults to the current user\n\t\t$user_id = $_SESSION['user_id'];\n\n\treturn get_user_role_weight($user_id) >= get_role_weight($role);\n}", "public function has_role($params) {\n global $DB;\n\n if($params['role'] == 'teacher') {\n $roles = $this->get_teacher_roles();\n } elseif($params['role'] == 'student') {\n $roles = $this->get_student_roles();\n }\n\n $rolefilter = new in_filter($roles, \"role\");\n\n return $DB->record_exists_sql(\n \"SELECT ra.*\n FROM {role_assignments} ra\n WHERE ra.userid = :userid AND\n ra.roleid \". $rolefilter->get_sql(),\n array_merge(['userid' => $params['userid']], $rolefilter->get_params())\n );\n\n }", "public function testCheckingRoles()\n {\n $this->assertTrue($this->principal->hasRole('baz'));\n $this->assertFalse($this->principal->hasRole('doesNotExist'));\n }", "public function hasRole(Role $role)\n {\n return $this->role == $role;\n }", "public function hasRole($role)\n {\n return $this->getAcl()->hasRole($role)\n || (\n is_string($role)\n && $this->getRoleManager()->has($role)\n )\n || (\n $role instanceof LaminasRoleInterface\n && $this->getRoleManager()->has($role->getRoleId())\n );\n }", "public function hasRole($role)\n {\n $user_roles = $this->roles()->get();\n\n foreach ($user_roles as $user_role) {\n if ($user_role->name === $role) {\n return true;\n }\n }\n return false;\n }", "public function hasRole($roleType) {\r\n\t if ($this->roleType == $roleType) {\r\n\t\treturn true;\r\n\t }\r\n\t return false;\r\n\t}", "public function hasRole($role)\n {\n if (is_string($role)) {\n return $this->roles->contains('name', $role);\n }\n\n return !! $role->intersect($this->roles)->count();\n }", "public function hasRole($role)\n {\n if (is_string($role)) {\n return $this->roles->contains('name', $role);\n }\n\n return !! $role->intersect($this->roles)->count();\n }", "public function hasRole($role)\n {\n if (is_string($role)) {\n return $this->roles->contains('name', $role);\n }\n\n return !! $role->intersect($this->roles)->count();\n }", "public function userIs( $role ) {\n\n\t\treturn $this->loggedIn( )\n\t\t\t? in_array( $this->user( $this->roleField ), ( array )$role )\n\t\t\t: false;\n\t}", "protected function _getRole(){\n\t$user = new Pas_User_Details();\n $person = $user->getPerson();\n if($person){\n \treturn $person->role;\n } else {\n \treturn false;\n }\n }", "function checkRole($RoleName){\n\t\tif( in_array($RoleName,$this->user_roles) == true ){\n\t\t\treturn 1;\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t}", "public function hasRole( ... $roles) {\n if (is_string($roles)) return $this->roles->contains('slug', $roles);\n if (is_array($roles[0])) $roles = $roles[0];\n $user_roles = $this->roles->pluck('slug')->toArray();\n return (bool) array_intersect($roles, $user_roles);\n }", "public function hasRole($role)\n {\n return $this->getRoleId() == $role || $this->getZendAcl()->inheritsRole($this->getRoleId(), $role);\n }", "public function logged_in($role = null)\n {\n // Get the user from the session\n $user = $this->get_user();\n if (!$user) {\n return false;\n }\n\n // If user exists in session\n if ($user) {\n\n // check session in database\n $sdb = UserSessions::findFirstBySessionId($this->_session->getId());\n if($sdb){\n $thisAgent = \\Phalcon\\DI::getDefault()->getShared('request')->getUserAgent();\n if($sdb->user_agent != $thisAgent || $sdb->user_id != $user->id){\n // user agent or user IDs do not match\n return FALSE;\n }\n }else{\n // Session not found in DB\n return FALSE;\n }\n\n // refresh the user session if needs be\n if( ! $this->refresh_session()){\n return FALSE;\n }\n\n // If we don't have a roll no further checking is needed\n if (!$role) {\n return true;\n }\n\n // Check if user has the role\n if ($this->_config['session_roles'] && $this->_session->has($this->_config['session_roles'])) {\n // Check in session\n $roles = $this->_session->get($this->_config['session_roles']);\n $role = isset($roles[$role]) ? $roles[$role] : null;\n } else {\n // Check in db\n $role = $user->hasRole($role);\n }\n\n\n\n // Return true if user has role\n return $role ? true : false;\n }\n }", "public function userHasRoleForModule($moduleName, $roleName);" ]
[ "0.8049701", "0.7967789", "0.78186643", "0.78134346", "0.7795557", "0.7791025", "0.7689212", "0.76818705", "0.76256704", "0.7596411", "0.7551671", "0.7549867", "0.75473803", "0.7546073", "0.7546073", "0.75274324", "0.74784636", "0.7469605", "0.7450883", "0.7404324", "0.74031377", "0.74022543", "0.7376485", "0.73724264", "0.7368431", "0.7339953", "0.73264825", "0.73250216", "0.7221263", "0.7209284", "0.71974105", "0.71855867", "0.71841395", "0.7135051", "0.7133437", "0.7133033", "0.71178", "0.7101017", "0.7090502", "0.7088592", "0.70871955", "0.7070179", "0.7065065", "0.7045814", "0.7045814", "0.7045814", "0.70456547", "0.7044296", "0.7030562", "0.70143855", "0.700907", "0.7005664", "0.6990772", "0.6987736", "0.69521236", "0.69431996", "0.6941613", "0.6939298", "0.69198424", "0.6906305", "0.6886499", "0.68864846", "0.6884732", "0.68805355", "0.68708986", "0.68681014", "0.68634945", "0.6829453", "0.6805033", "0.6799928", "0.67869496", "0.6781835", "0.67700356", "0.67680603", "0.6764057", "0.6763789", "0.6747366", "0.67287755", "0.6727968", "0.671657", "0.6670948", "0.6640837", "0.66345346", "0.66345346", "0.66207784", "0.6619961", "0.6603067", "0.66030055", "0.6601923", "0.6597484", "0.65966636", "0.65966636", "0.65966636", "0.6570289", "0.65687317", "0.65674067", "0.65660614", "0.6554229", "0.65286833", "0.6528033" ]
0.6879937
64
/ Initialize action controller here
public function init () { $objApplicationOptions = new Zend_Config($this->getInvokeArg('bootstrap')->getOptions()); $this->_options = $objApplicationOptions->catalog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n /* Initialize action controller here */\n }", "public function init()\n {\n /* Initialize action controller here */\n }", "protected function initializeController() {}", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initAction()\n {\n }", "protected function initializeAction() {\n\t\t/* Merge flexform and setup settings\n\t\t * \n\t\t */\n\t\t$this->settings['action'] = $this->actionMethodName;\n\t}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {\n\n\t}", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "protected function initializeAction() {\n\t\t$this->akismetService->setCurrentRequest($this->request->getHttpRequest());\n\t}", "public function __construct($controller,$action) {\n\t\tparent::__construct($controller, $action);\n\t\t\n\t}", "public function init()\n {\n $controller = $this->router->getController();\n $action = $this->router->getAction();\n $params = $this->router->getParams();\n\n $objController = registerObject($controller);\n\n call_user_func_array([$objController, $action], $params);\n }", "public function __construct($controller, $action) {\n parent::__construct($controller, $action); //parent is Controller.php\n }", "protected function initAction()\r\n {\r\n $return = false;\r\n\r\n // parse request URI\r\n $parts_url = parse_url(strtolower(trim($_SERVER['REQUEST_URI'], '/')));\r\n // @TODO: fix\r\n $parts_url_array = explode('/', $parts_url['path']);\r\n list($this->controllerName, $this->itemId) = $parts_url_array;\r\n\r\n // parse method\r\n $this->requestMethod = strtolower($_SERVER['REQUEST_METHOD']);\r\n\r\n switch ($this->requestMethod) {\r\n case 'get':\r\n // default actions for GET\r\n if ($this->controllerName == 'login' || $this->controllerName == 'logout') {\r\n $this->actionName = $this->controllerName;\r\n $this->controllerName = 'users';\r\n } elseif (is_null($this->itemId)) {\r\n $this->actionName = 'index';\r\n } else {\r\n $this->actionName = 'view';\r\n }\r\n break;\r\n case 'post':\r\n // default action for POST\r\n $this->actionName = 'add';\r\n break;\r\n case 'put':\r\n // default action for PUT\r\n $this->actionName = 'edit';\r\n break;\r\n case 'delete':\r\n // default action for DELETE\r\n $this->actionName = 'delete';\r\n break;\r\n }\r\n\r\n if (!$this->controllerName) {\r\n $this->controllerName = 'main';\r\n }\r\n if (!$this->actionName) {\r\n $this->actionName = 'index';\r\n }\r\n\r\n // get, check & requre class\r\n $className = sprintf('mob%s', ucfirst($this->controllerName));\r\n $className = 'pages\\\\' . $className;\r\n \r\n if (class_exists($className)) {\r\n //create a instance of the controller\r\n $this->controller = new $className();\r\n\r\n //check if the action exists in the controller. if not, throw an exception.\r\n $actionName = sprintf('action%s', ucfirst($this->actionName));\r\n if (method_exists($this->controller, $actionName) !== false) {\r\n $this->action = $actionName;\r\n // set request params\r\n if ($this->itemId) {\r\n $this->controller->setParams(array('id' => $this->itemId));\r\n }\r\n $this->controller->setRequestParams($this->requestMethod);\r\n\r\n $return = true;\r\n } else {\r\n $this->controller->httpStatusCode = HTTP_STATUS_METHOD_NOT_ALLOWED;\r\n// throw new \\Exception('Action is invalid.');\r\n }\r\n } else {\r\n $this->controller = new clsMobController();\r\n $this->controller->httpStatusCode = HTTP_STATUS_NOT_FOUND;\r\n// throw new \\Exception('Controller class is invalid.');\r\n }\r\n\r\n return $return;\r\n }", "public function __construct()\n {\n // Prepare the action for execution, leveraging constructor injection.\n }", "public function __construct() {\n // filter controller, action and params\n $url = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_URL); // $_GET['url']\n $params = explode('/', trim($url, '/'));\n\n // store first and seccond params, removing them from params list\n $controller_name = ucfirst(array_shift($params)); // uppercase classname\n $action_name = array_shift($params);\n\n require_once APP . 'config.php';\n\n // default controller and action\n if (empty($controller_name)) {\n $controller_name = AppConfig::DEFAULT_CONTROLLER;\n }\n if (empty($action_name)) {\n $action_name = AppConfig::DEFAULT_ACTION;\n }\n\n // load requested controller\n if (file_exists(APP . \"Controller/$controller_name.php\")) {\n require CORE . \"Controller.php\";\n require CORE . \"Model.php\";\n require APP . \"Controller/$controller_name.php\";\n $controller = new $controller_name();\n\n // verify if action is valid\n if (method_exists($controller, $action_name)) {\n call_user_func_array(array($controller, $action_name), $params);\n $controller->render(\"$controller_name/$action_name\"); // skipped if already rendered\n } else {\n // action not found\n $this->notFound();\n }\n } else {\n // controller not found\n $this->notFound();\n }\n }", "public static function init() {\n\t\tself::setup_actions();\n\t}", "protected function initializeAction()\n\t{\n\t\tparent::init('Form');\n\t}", "public function initController()\n {\n $this->model = new AliveSettingServiceMeta();\n\n $this->middleware([\n\n ]);\n }", "public function init() {\n\n $this->jobs = new Hb_Jobs();\n if ($this->_request->getActionName() == 'view') {\n\n $this->_request->setActionName('index');\n }\n\n $this->searchParams = $this->_request->getParams();\n $this->view->searchParams = $this->searchParams;\n\n $this->view->actionName = $this->_request->getActionName();\n }", "protected function initializeAction()\n {\n $this->extKey = GeneralUtility::camelCaseToLowerCaseUnderscored('BwrkOnepage');\n /** @var LanguageAspect $languageAspect */\n $languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');\n $this->languageUid = $languageAspect->getId();\n }", "protected function initializeAction()\n {\n parent::initializeAction();\n $this->customer = SubjectResolver::get()\n ->forClassName(Customer::class)\n ->forPropertyName('user')\n ->resolve();\n }", "public function initialize()\n {\n parent::initialize();\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Cookie');\n $this->cors();\n\n $currentController = $this->request->getParam('controller');\n // pr($currentController); die();\n if($currentController == 'Tenants'){\n $currentController = 'TenantUsers';\n }\n if($currentController == 'CorporateClients'){\n $currentController = 'CorporateClientUsers';\n // pr($currentController);die();\n }\n // $currentController = $this->request->params['controller'];\n $loginAction = $this->Cookie->read('loginAction');\n if(!$loginAction){\n $loginAction = ['controller' => $currentController,'action' => 'login'];\n }\n // pr($loginAction);die;\n $this->loadComponent('Auth',[\n 'loginAction' => ['controller' => $currentController,'action' => 'login'],\n 'authenticate' => [\n 'Form' =>\n [\n 'userModel' => $currentController,\n 'fields' => ['username' => 'email', 'password' => 'password']\n ]\n ],\n 'authorize'=> ['Controller'],\n 'loginAction' => $loginAction,\n 'loginRedirect' => $loginAction,\n 'logoutRedirect' => $loginAction \n\n ]);\n // $this->loadComponent('Auth', [\n\n // 'unauthorizedRedirect' => false,\n // 'checkAuthIn' => 'Controller.initialize',\n\n // // If you don't have a login action in your application set\n // // 'loginAction' to false to prevent getting a MissingRouteException.\n // 'loginAction' => false\n // ]);\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n }", "public function init() {\n\t\t$this->load_actions();\n\t}", "public function init()\r\n {\r\n\r\n /* Initialize action controller here */\r\n\r\n //=====================================must add in all Controller class constructor ===================================//\r\n if(defined('SITEURL')) $this->site_url = SITEURL;\r\n if(defined('SITEASSET')) $this->site_asset = SITEASSET;\r\n $this->view->site_url = $this->site_url;\r\n $this->view->site_asset = $this->site_asset;\r\n Zend_Loader::loadClass('Signup');\r\n Zend_Loader::loadClass('User');\r\n Zend_Loader::loadClass('Request');\r\n //Zend_Loader::loadClass('mailerphp');\r\n\t\t//Zend_Loader::loadClass('Permission');\r\n\r\n\r\n //-----------------------------------------------authenticate logged in user---------------------------------------------//\r\n Zend_Loader::loadClass('LoginAuth');\r\n $this->view->ob_LoginAuth = $this->sessionAuth = new LoginAuth();\r\n\r\n $this->sessionAuth->login_user_check();\r\n\r\n $this->sessionAuth->cookie_check();\r\n $this->view->server_msg = $this->sessionAuth->msg_centre();\r\n\r\n //-----------------------------------------------authenticate logged in user---------------------------------------------//\r\n unset($_SESSION['tranzgo_session']['export_list']);\r\n $this->view->ControllerName = $this->_request->getControllerName();\r\n $this->view->page_id = ($_SESSION['tranzgo_session']['role_id']==1)?'5':'7';\r\n //______________________________________must add in all Controller class constructor _____________________________________//\r\n\r\n\r\n }", "public function __construct() {\n\t\t\t$this->init_globals();\n\t\t\t$this->init_actions();\n\t\t}", "public function __construct()\n\t{\n\t\t$this->actionable = \"\";\n\t\t$this->action_taken = \"\";\n\t\t$this->action_summary = \"\";\n\t\t$this->resolution_summary = \"\";\n\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __init()\n\t{\n\t\t// This code will run before your controller's code is called\n\t}", "function __construct()\n\t\t{\n\t\t\tparent::__construct();\n\t\t\t$this->_actionModel = new Action_Model();//khoi tao class\n\t\t}", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "protected function initializeAction() {\t\n\t\t$this->persdataRepository = t3lib_div::makeInstance('Tx_PtConference_Domain_Repository_persdataRepository');\n\t}", "public function __construct()\n\t{\n\t\t$this->actionable = \"\";\n\t\t$this->action_taken = \"\";\n\t\t$this->action_summary = \"\";\n\t\t$this->media_values = array(\n\t\t\t101 => Kohana::lang('ui_main.all'),\n\t\t\t102 => Kohana::lang('actionable.actionable'),\n\t\t\t103 => Kohana::lang('actionable.urgent'),\n\t\t\t104 => Kohana::lang('actionable.action_taken')\n\t\t);\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct() {\n\n list($null,$controller, $action, $id) = explode(\"/\", $_SERVER['PATH_INFO']);\n \n $this->urlValues['base'] = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n $this->urlValues['controller'] = $controller ? $controller : \"home\";\n $this->urlValues['action'] = $action;\n $this->urlValues['id'] = $id;\n\n $this->controllerName = strtolower($this->urlValues['controller']);\n $this->controllerClass = ucfirst(strtolower($this->urlValues['controller'])) . \"Controller\";\n\n if ($this->urlValues['action'] == \"\") {\n $this->action = \"index\";\n } else {\n $this->action = $this->urlValues['action'];\n }\n }", "protected function _initControllers()\n\t{\n\t\treturn;\n\t}", "public function init()\n {\n $this->vars['CRUD']['Object'] = $this;\n $this->kernel = kernel();\n\n // Dynamic initialization\n if (! $this->modelName) {\n $modelRefl = new ReflectionClass($this->modelClass);\n $this->modelName = $modelRefl->getShortName();\n }\n\n\n if (! $this->crudId) {\n $this->crudId = \\Phifty\\Inflector::getInstance()->underscore($this->modelName);;\n }\n if (! $this->templateId) {\n $this->templateId = $this->crudId;\n }\n\n // Derive options from request\n if ($request = $this->getRequest()) {\n if ($useFormControls = $request->param('_form_controls')) {\n $this->actionViewOptions['submit_btn'] = true;\n $this->actionViewOptions['_form_controls'] = true;\n }\n }\n\n $this->reflect = new ReflectionClass($this);\n $this->namespace = $ns = $this->reflect->getNamespaceName();\n\n // XXX: currently we use FooBundle\\FooBundle as the main bundle class.\n $bundleClass = \"$ns\\\\$ns\";\n if (class_exists($bundleClass)) {\n $this->bundle = $this->vars['Bundle'] = $bundleClass::getInstance($this->kernel);\n } else {\n $bundleClass = \"$ns\\\\Application\";\n $this->bundle = $this->vars['Bundle'] = $bundleClass::getInstance($this->kernel);\n }\n\n $this->vars['Handler'] = $this;\n $this->vars['Controller'] = $this;\n\n // anyway, we have the model classname, and the namespace, \n // we should be able to registerRecordAction automatically, so we don't have to write the code.\n if ($this->registerRecordAction) {\n $self = $this;\n $this->kernel->event->register('phifty.before_action',function() use($self) {\n $self->kernel->action->registerAction('RecordActionTemplate', array(\n 'namespace' => $self->namespace,\n 'model' => $self->modelName,\n 'types' => (array) $self->registerRecordAction\n ));\n });\n }\n\n\n $this->initPermissions();\n\n /*\n * TODO: Move this to before render CRUD page, keep init method simple\n\n if ( $this->isI18NEnabled() ) {\n $this->primaryFields[] = 'lang';\n }\n */\n $this->initNavBar();\n }", "public function _initialize()\n {\n $this->cate=CONTROLLER_NAME;\n }", "protected function initializeActionEntries() {}", "protected function initializeAction() {\n\t\t$this->feusers = $this->feusersRepository->findByUid( $GLOBALS['TSFE']->fe_user->user['uid'] ) ;\n\t\t$this->schule = $this->feusers->getSchule();\n\t\n\t\t$this->extKey = $this->request->getControllerExtensionKey();\n\t\t$this->extPath = t3lib_extMgm::extPath($this->extKey);\n\t\n\t\t$this->importClassFile = $this->extPath.'Classes/tmp/class.importtext.php';\n\t\t$this->importClass = 'ImportText';\n\t \n\t\tif ( $this->settings[pidAjaxContainerKlassenuebersicht] > 0) $this->pidAjaxContainerKlassenuebersicht = (int) $this->settings[pidAjaxContainerKlassenuebersicht];\n\t\n\t}", "public function init(){\r\n\t$this->_helper->_acl->allow('public',NULL);\r\n\t$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\r\n\t$this->_contexts = array('xml','json');\r\n\t$this->_helper->contextSwitch()\r\n\t\t->setAutoDisableLayout(true)\r\n\t\t->addActionContext('oneto50k',$this->_contexts)\r\n\t\t->addActionContext('index',$this->_contexts)\r\n\t\t->initContext();\r\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function initBaseController();", "public function init() {\n $this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n\t\t$this->_helper->acl->allow('public',null);\n\t\t$this->_helper->contextSwitch()\n\t\t\t ->setAutoDisableLayout(true)\n\t\t\t ->addActionContext('index', array('xml','json'))\n ->initContext();\n\t}", "public function __construct()\n {\n // Call the CI_Controller constructor\n parent::__construct();\n }", "public function __construct()\n\t{\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function initAction() : object\n {\n /**\n * Show all movies.\n */\n $response = $this->app->response;\n return $response->redirect(\"cms/posts\");\n }", "protected function initializeAction() {\n\t\t$this->frontendUserRepository = t3lib_div::makeInstance('Tx_GrbFeusermanager_Domain_Repository_FrontendUserRepository');\n\t}", "public function contentControllerInit()\n\t{\n\t}", "protected function initializeAction()\n {\n parent::initializeAction();\n\n $query = GeneralUtility::_GET('q');\n if ($query !== null) {\n $this->request->setArgument('q', $query);\n }\n }", "public function __construct()\n {\n $this->setAction('index', array('idle', 'toggleEnabled', 'expunge'));\n }", "public static function init() {\n\t\t$_GET = App::filterGET();\n\t\t\n\t\t// Checken of er params zijn meegegeven\n\t\ttry {\n\t\t\tif (count($_GET) == 0) {\n\t\t\t\t$_GET[0] = '';\n\t\t\t}\n\t\t\t\n\t\t\t// Is de eerste param een controller ? Anders een pageView\n\t\t\tif (self::isController($_GET[0])) {\n\t\t\t\t$controllerName = self::formatAsController($_GET[0]);\n\t\t\t\t$controller = self::loadController($controllerName);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Er is sprake van een pageview\n\t\t\t\t$controllerName = 'PagesController';\n\t\t\t\t$controller = self::loadController($controllerName);\n\t\t\t}\n\t\t\t\n\t\t\t$action = self::getAction($controller);\n\t\t\t$controller->setAction($action);\n\n\t\t\t// Try to exec the action\n\t\t\ttry {\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\tcatch(ActionDoesNotExistException $ex) {\n\n\t\t\t\techo $action;\n\t\t\t\t// Action bestaat niet\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\t\n\t\t\t\t// Als development is ingeschakeld, dan de ware error tonen, anders een 404 pagina\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('invalidAction');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\tcatch(MissingArgumentsException $ex) {\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\t\n\t\t\t\t// Als development is ingeschakeld, dan de ware error tonen, anders een 404 pagina\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('missingArguments');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\t\n\t\t\t// Try to render the view\n\t\t\ttry {\n\t\t\t\t$controller->render();\n\t\t\t}\n\t\t\tcatch(ViewDoesNotExistException $ex) {\n\t\t\t\t// View bestaat niet\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('invalidView');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t\t\n\t\t\t\t$controller->render();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(NoValidTemplateException $ex) {\n\t\t\techo 'Invalid template';\n\t\t}\n\t\tcatch(IsNotControllerException $ex) {\n\t\t\techo 'Controller not found';\n\t\t}\n\t}", "public function init()\r\n { \r\n //date_default_timezone_set('America/Phoenix');\r\n $ajaxContext = $this->_helper->getHelper('AjaxContext');\r\n\t$ajaxContext->addActionContext('list', 'html')\r\n ->addActionContext('edit', 'html')\r\n ->addActionContext('dashboard', 'html')\r\n ->addActionContext('handler', 'html')\r\n ->initContext();\r\n $auth = Zend_Auth::getInstance();\r\n $action = Zend_Controller_Front::getInstance()->getRequest()->getActionName();\r\n $type = $this->getRequest()->getParam('type');\r\n if (!$auth->hasIdentity() && $action!='handler') {\r\n //echo \"THIS IS AN ERROR: \".$action;\r\n $this->_redirect('login', array('UseBaseUrl' => true));\r\n }\r\n }", "public function __construct()\n {\n $this->model = new MainModel();\n $this->params[\"pagination\"][\"totalItemsPerPage\"] = 5;\n view()->share ('controllerName', $this->controllerName);//đặt controllerName cho all action\n }", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function init() {\n $this->_temporizador = new Trf1_Admin_Timer ();\n $this->_temporizador->Inicio();\n\n /* Initialize action controller here */\n $this->view->titleBrowser = 'e-Sisad';\n }", "public function __construct()\n\t{\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "function __construct()\n {\n parent::Controller();\n }", "public function controller()\n\t{\n\t\n\t}", "public function init() {\n\t\t\t\t\t\t$this->view->controller = $this->_request->getParam ( 'controller' );\n\t\t\t\t\t\t$this->view->action = $this->_request->getParam ( 'action' );\n\t\t\t\t\t\t$this->getLibBaseUrl = new Zend_View_Helper_BaseUrl ();\n\t\t\t\t\t\t$this->GetModelOrganize = new Application_Model_ModOrganizeDb ();\n\t\t\t\t\t\t$this->_helper->ajaxContext->addActionContext('deleteOrganisme1','json')->initContext();\n\t\t\t\t\t\t// call function for dynamic sidebar\n\t\t\t\t\t\t$this->_Categories = new Application_Model_ModCatTerm ();\n\t\t\t\t\t\t$parent_id = $this->_getParam ( 'controller' );\n\t\t\t\t\t\t$this->view->secondSideBar = $this->_Categories->showCateParent ( $parent_id );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public function initializeAction() {\t\t\n\t\t$this->contactRepository = t3lib_div::makeInstance('Tx_Addresses_Domain_Repository_ContactRepository');\t\n\t}", "public function init() {\n\t$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n\t$this->_helper->acl->allow('public',null);\n\t$this->_helper->contextSwitch()\n\t\t->setAutoDisableLayout(true)\n\t\t->addActionContext('index', array('xml','json'))\n\t\t->addActionContext('mint', array('xml','json'))\n\t\t->initContext();\n }", "public function __construct()\n {\n if (get_called_class() != 'ApplicationController') {\n $this->_set_default_layout();\n $this->_vars = new stdClass();\n $this->_init();\n }\n }", "public function initializeAction() {\n parent::initializeAction();\n $this->umDiv = new Tx_Magenerator_Domain_UserManagement_Div();\n }", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "public function actionInit()\n {\n $this->initRoles($this->roles);\n $this->initPermissions($this->permissions);\n $this->initDependencies($this->dependencies);\n }", "public function getControllerAction() {}", "public function __construct($action = '') {\n\t\t$this->app = Application::app();\n\t\t$this->setAction($action);\n\t}", "function initialize(Controller $controller) {\n $this->controller=&$controller;\n \t}", "public function __construct($controller, $action) {\n parent::__construct($controller, $action);\n $this->loadModel('Baskets');\n $this->loadModel('Orders');\n $this->loadModel('Messages');\n $this->loadModel('Products');\n\n if(Session::exists(BUYER_SESSION_NAME)) {\n $this->view->totalProductInBasket = $this->BasketsModel->countProductInBasket();\n $this->view->totalOrders = $this->OrdersModel->countSentOrder();\n $this->view->msgCount = $this->MessagesModel->unReadMessages();\n } elseif(Session::exists(STORE_SESSION_NAME)) {\n $this->view->msgCount = $this->MessagesModel->unReadMessages();\n $this->view->newOrders = $this->OrdersModel->newOrders(Session::get(STORE_SESSION_NAME));\n }\n\n $this->view->setLayout('details');\n }", "function initialize(Controller $controller) {\n $this->controller = $controller;\n }", "public function __construct() {\n if (isset($_GET['rc'])) {\n $this->url = rtrim($_GET['rc'], '/'); // We don't want no empty arg\n $this->args = explode('/', $this->url);\n }\n \n // Load index controller by default, or first arg if specified\n $controller = ($this->url === null) ? 'null' : array_shift($this->args);\n $this->controllerName = ucfirst($controller);\n\n // Create controller and call method\n $this->route();\n // Make the controller display something\n $this->controllerClass->render();\n }", "public function __construct() {\r\n\t\t\r\n\t\tSession::init();\n\t\tif (!Session::get('local'))\n\t\t\tSession::set('local', DEFAULT_LANGUAGE);\r\n\t\t\r\n\t\t$this->getUrl();\r\n\t\t\r\n\t\t//No controller is specified.\r\n\t\tif (empty($this->url[0])) {\r\n\t\t\t$this->loadDefaultController();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->loadCurrentController();\r\n\t\t$this->callControllerMethod();\r\n\r\n\t}", "public function __construct() {\n $this->urlValues = $_GET;\n if (!isset($this->urlValues['c'])) {\n $this->controllerName = \"home\";\n $this->controllerClass = \"HomeController\";\n } else {\n $this->controllerName = strtolower($this->urlValues['c']);\n $this->controllerClass = ucfirst(strtolower($this->urlValues['c'])) . \"Controller\";\n }\n \n if (!isset($this->urlValues['a'])) {\n $this->action = \"index\";\n } else {\n $this->action = $this->urlValues['a']; \n }\n }", "public function preAction() {\n $this->apiBrowser = new ApiBrowser();\n\n $basePath = $this->request->getBasePath();\n $this->namespaceAction = $basePath . '/namespace/';\n $this->classAction = $basePath . '/class/';\n $this->searchAction = $basePath . '/search';\n }", "function __construct($controller, $action)\n {\n global $inflect;\n\n $this->renderPage = true;\n $this->renderHeader = true;\n \t\n\t\t$this->requireUser = false;\n\t\t \n $this->_controller = ucfirst($controller);\n $this->_action = $action;\n \n $model = ucfirst($inflect->singularize($controller));\n $this->$model = new $model;\n\n $this->_template = new Template($controller, $action);\n }", "public function init()\n {\n $this->ctrlModel = new Admin_Model_Acl_ControllersActions();\n $this->dbCtrl = new Admin_Model_DbTable_Acl_ModuleController();\n }", "public function setup_actions() {}", "public function init(){\r\n\t\t$this->_data = $this->_request->getParams();\r\n $controller = $this->_data['controller']; //Get controller\r\n $action = $this->_data['action']; //Get action\r\n \r\n $loadfunction = new Default_Model_Common();\r\n foreach($loadfunction->loadFunction($controller) as $value){\r\n if($action == $value['action']){\r\n $load = new $value['model_load']();\r\n $this->view->$value['varname'] = $load->$value['function_load']();\r\n }\r\n }\r\n\r\n $this->view->lang = Zend_Registry::get(\"lang\"); //load language\r\n \r\n //List menu\r\n $listmenu = Zend_Registry::get(\"listmenu\");\r\n $this->view->listmenu = $listmenu;\r\n \r\n $this->view->selectaccount = ' class=\"selected\"';\r\n }", "function __construct() {\n\t\t\n\t\tparent::__construct();\n\t\t\n\t\t// skip the timestamp check for this app\n\t\tSession::check(true);\n\t\t$this->data[\"showActions\"] = true;\n\t\t$this->data[\"csrfToken\"] = CSRF::generateToken();\n\t\t\n\t}", "abstract public function getControllerAction();", "public function _construct($controller,$view){\r\n $this->controller = $controller;\r\n }", "public function initialize()\n { $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"notification\");\n }", "protected function __construct() {\n\t\t\tadd_action( 'init', array( $this, 'action__init' ), 11 );\n\t\t}", "public function init()\n {\n $this->ctrlActionModel = new Admin_Model_Acl_ControllersActions();\n $this->dbController = new Admin_Model_DbTable_Acl_ModuleController();\n $this->dbAction = new Admin_Model_DbTable_Acl_Action();\n }", "public function init()\n {\n $this->projectController->init();\n }", "function __construct() {\n\t\t\t$this->register_actions();\t\t\n\t\t\t$this->register_filters();\n\t\t}", "public function __construct() {\n // Call Module constructur\n parent::__construct();\n\n // Add additional route\n $this->_actions['GET']['/people/:id'] = 'people';\n }", "public function initialize()\n {\n $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"refund\");\n }", "function Controller()\n\t{\t\t\n\t\t$this->method = \"showView\";\n\t\tif (array_key_exists(\"method\", $_REQUEST))\n\t\t\t$this->method = $_REQUEST[\"method\"];\n\t\t\t\t\n\t\t$this->icfTemplating = new IcfTemplating();\n\t\t$this->tpl =& $this->icfTemplating->getTpl();\n\t\t$this->text =& $this->icfTemplating->getText();\t\t\n\t\t$this->controllerMessageArray = array();\n\t\t$this->pageTitle = \"\";\n\t\t$this->dateFormat = DateFormatFactory::getDateFormat();\n\t\t$this->controllerData =& $this->newControllerData();\n\t}", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "function __construct($module,$controller,$action) {\n\t\t$this->action = $action;\n\t\t$this->controller = preg_replace('%Controller$%','',$controller);\n\t\t$this->module = $module;\n\n\t\t$jadeCacheDir = J::path(\"App/Cache/Jade/$this->module/$this->controller\");\n\t\t(is_dir($jadeCacheDir)) || mkdir($jadeCacheDir,0777,true);\n\t\t$this->cacheFile = J::path(\"$jadeCacheDir/$this->action.php\");\n\t\t$this->viewFile = J::path(\"App/Modules/$this->module/Views/$this->controller/$this->action.jade\");\n\t}", "public function __construct()\n {\n $url = $this->getUrl();\n // Look in controllers folder for first value and ucwords(); will capitalise first letter \n if (isset($url[0]) && file_exists('../app/controllers/' . ucwords($url[0]) . '.php')) {\n $this->currentController = ucwords($url[0]); // Setting the current controllers name to the name capitilised first letter\n unset($url[0]); \n }\n\n // Require the controller\n require_once '../app/controllers/' . $this->currentController . '.php';\n // Taking the current controller and instantiating the controller class \n $this->currentController = new $this->currentController;\n // This is checking for the second part of the URL\n if (isset($url[1])) {\n if (method_exists($this->currentController, $url[1])) { // Checking the seond part of the url which is the corresponding method from the controller class\n $this->currentMethod = $url[1];\n unset($url[1]);\n }\n }\n\n // Get params, if no params, keep it empty\n $this->params = $url ? array_values($url) : []; \n\n // Call a callback with array of params\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->view = new ViewController();\t\t\n\t}", "public function __construct()\n {\n $this->controller = new Controller;\n $this->error_message = 'bad request or duplicate data';\n }", "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 }" ]
[ "0.89566046", "0.89566046", "0.82057846", "0.80040884", "0.80040884", "0.8004028", "0.7928566", "0.7802862", "0.7750365", "0.7750365", "0.7750365", "0.7750365", "0.7750365", "0.7741994", "0.76497424", "0.7542271", "0.7541656", "0.7458589", "0.7430627", "0.7382884", "0.73493266", "0.73307425", "0.7321889", "0.73055863", "0.7295852", "0.7274981", "0.72531754", "0.7246773", "0.7212456", "0.72057885", "0.71661454", "0.71535975", "0.7130195", "0.7116122", "0.70873964", "0.7080964", "0.7078719", "0.70654655", "0.7053619", "0.7048942", "0.7036025", "0.7028192", "0.6996098", "0.69914645", "0.6983108", "0.69822043", "0.6978827", "0.69710267", "0.69653803", "0.6934731", "0.69341296", "0.6926329", "0.692468", "0.69113386", "0.6909758", "0.6896174", "0.68904704", "0.6874338", "0.68700373", "0.68700373", "0.6862786", "0.6847179", "0.6844484", "0.68443036", "0.68056643", "0.6804595", "0.68018633", "0.67917275", "0.6769771", "0.676602", "0.6765842", "0.67582476", "0.67257833", "0.6721477", "0.6721169", "0.67196625", "0.67082113", "0.6707143", "0.6706214", "0.67023355", "0.6700337", "0.669937", "0.6695276", "0.66930395", "0.6692887", "0.6688026", "0.66866106", "0.66839683", "0.6674853", "0.6667438", "0.6658782", "0.66509074", "0.6642763", "0.66400504", "0.6634305", "0.6610988", "0.6610453", "0.66071516", "0.66062886", "0.6600459", "0.6599095" ]
0.0
-1
The default action show the home page
public function indexAction () { // TODO Auto-generated ReportController::indexAction() default action }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionHome(){\n\t\t\n\t\t$this->getContent('home');\n\t\t\n\t}", "public function home()\n\t{\n\n\t\tView::show(\"home.php\", \"Accueil Mon MVC !\");\n\t}", "public function homeAction()\n {\n View::render('Pages/home.html.twig');\n }", "public function home()\n\t{\n\t\tView::show(\"home.php\", \"Accueil !\");\n\t}", "public function actionDefault(){\n \n $this->redirect('Homepage:');\n }", "public function actionIndex()\n {\n //$this->redirect(array('site/login'));\n $this->render('home', array());\n }", "public function homeAction(){\n return $this->render('HMMainBundle:Default:index.html.twig');\n }", "public function homeAction()\n {\n return $this->render('AdvertBundle:Default:index.html.twig');\n }", "public function home()\n {\n\t\tif(!$_SESSION['logged_in'])\n\t\t\tredirect('administrator');\n\t\t\n $data = array(\n 'admin' => $_SESSION['username']\n );\n $this->page('administrator/home',$data);\n }", "public function home()\n {\n $listItem = $this->Item->getAll();\n $this->set(['title' => 'Home', 'items' => $listItem]);\n $this->render('home');\n }", "public function actionKnprHome()\n { \n return $this->render('knpr/knpr-home');\n }", "public function index() {\n\t\t$this->redirect(array('action' => 'home'));\n\t}", "public function home()\n {\n $this->render('home/content');\n }", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index() {\n\t\t$this->redirect(array('action' => 'home'));\n }", "public function home() {\n $posts = $this->postManager->getPosts();\n $view = new View(\"Home\");\n $view->generate(array('posts' => $posts));\n }", "public function home()\n\t{\n\t // show the form\n\t return $this->homeRepository->home();\n\t}", "public function index() {\n $this->home(); \n }", "public function goHome()\n {\n $this->redirect(config('default_module').'/'.config('default_controller').'/'.config('default_action'));\n }", "public function home()\n {\n $this->privateAccess(true);\n //Set content type as html page\n $this->contentType(\n 'html',\n 'Management Proof',\n [\n $this->_assets_path . 'js/Core/datatables.min.js',\n $this->_assets_path . 'js/Apps/ManagementResults/home.js'\n ], [\n $this->_assets_path . 'css/Core/datatables.min.css'\n ]\n );\n\n //add management subject view\n include 'Apps/ManagementResults/view/home.php';\n\n }", "public function actionHome()\n {\n return $this->render('home');\n}", "private function indexAction()\n {\n $page = isset($_GET['page']) ? substr($_GET['page'],0,-1) : \"home\" ;\n $this->reg->pages->getPageContent(strtolower($page));\n }", "public function actionMultiregionalHome() {\n return $this->render('multiregional/multiregional-home');\n }", "public function index()\n {\n $this->render('home/home');\n }", "function home(){\n\n\t\tredirect('home');\n\t}", "public function defaultAction(){\n\t\t$pseudo = \"Test\";\n\n\t\t//Affiche moi la vue home;\n\t\t$installer = new installer;\n\t\tif(!$installer->checkInstall() xor file_exists('.env.prod')){\n\t\t\theader('location: /installer');\n\t\t}else{\n\t\t$page = new Page();\n\t\t$acceuil = $page->getpageaccueil();\n\t\tif(!empty($acceuil)){\n\t\t\t$view = new View(\"page\", \"front\");\n\t\t\t$view->assign(\"page\",$acceuil[0]);\n\t\t\t$articles = $page->getArticleByIdPage($acceuil[0][\"id\"]);\n\t\t\t$view->assign('articles',$articles);\n\t\t\t$view->assign(\"title\",$acceuil[0]['slug']);\n\t\t}\n\t\telse{\n\t\t\t$view = new View();\n\t\t\t$view->assign(\"title\",\"Votre site\");\n\t\t}\n\t\t\n\t}\n\n\t\t//envoyer le pseudo à la vue\n\t}", "public function actionHome()\n\t{\n $this->setMetaTag();\n \n $user_id = Yii::$app->user->getId();\n $issue = isset($_GET['issue']) ? $_GET['issue'] : null;\n $service = $this->serviceFactory->getService(ServiceFactory::SITE_SERVICE);\n $home = $service->getHomeInfo($user_id, $issue, new SiteVoBuilder());\n $create_thread_form = new CreateThreadForm();\n $selected = $home->getHomeSelected();\n return $this->render('home', ['home' => $home,\n 'feed_selected' => $selected,\n 'change_email_form' => new ResendChangeEmailForm(),\n 'create_thread_form' => $create_thread_form]);\n\t}", "public function homePage()\n {\n return $this->render(\"homePage.html.twig\");\n }", "public function route_home() {\n\t\techo '<h1>It wurks!</h1>';\n\t}", "public function index() \n\t{\n\t\tredirect('home');\n\t}", "public function Home()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'home');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Home')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/homepage');\n }", "public function home()\n {\n global $user;\n\n // Example data to use in the home page.\n $context['user'] = $user;\n $context['allPosts'] = Post::tenMostRecent();\n $context['allComments'] = Comment::tenMostRecent();\n $context['allImages'] = Image::tenMostRecent();\n return render('views/pages/home.php', $context);\n }", "public function home()\n {\n $params = [\n 'name' => 'xEiBi'\n ];\n\n return $this->render('home', $params);\n }", "public function home()\r\n {\r\n\r\n $view = new Template();\r\n echo $view->render('views/home.html');\r\n }", "public function home()\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$data['username']\t\t\t= $this->session->userdata('username');\n\t\t\t\t$this->load->view('admin/home', $data);\n\t\t\t}", "private function home() {\n // busca as categorias do bd\n $categorias = $this->model->visualizarCategorias();\n // seta as categorias para a view\n $this->view->setCategorias($categorias);\n // passa o arquivo home\n $file = $this->templates . 'home.php';\n \n // retorna o conteudo da tela home para o usuario\n $this->telaUser = $this->view->retornaTela($file);\n }", "public function home($data){\r\n if(!$this->isLogged()){\r\n header(\"Location:\".url(\"admin/login\"));\r\n }\r\n echo $this->view->render(\"home.php\",[\r\n \"title\"=> \"Admin Home | \". SITE,\r\n ]);\r\n }", "public function index() {\n\n\t\t$data['content'] = 'Homepage';\n\t\t$this->flexi->title('Homepage')\n\t\t\t\t\t->make('home', $data);\n\n\t}", "public function home()\n {\n session_start();\n $posts = new PostManager;\n $resultat = $posts->getPosts(4);\n echo $this->getRender()->render('homeView.twig', [\n 'resultat' => $resultat,\n 'session' => $this->getSuperglobals()->get_SESSION()\n ]);\n }", "public function goHome()\n {\n $this->redirect(url($this->getHomeUrl()));\n }", "public function homeAction()\n {\n return $this->redirect($this->generateUrl('system_tracking_homepage'), 301);\n }", "public function home()\n\t{\n\t\treturn view('pages.home');\n\t}", "function home()\n\t{\n\t\t$data['active_page'] = 'home';\n\t\t$data['cart_items_count'] = $this->m_cart->get_cart_count();\n\t\t$data['settings'] = $this->m_settings->get_all();\n\t\t$this->load->view('frontend/templates/header',$data);\n\t\t$this->load->view('frontend/templates/main_home_top_bg');\n\t\t$this->load->view('frontend/pages/boss/home');\n\t\t$this->load->view('frontend/templates/footer', $data);\n\n\t}", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n if (session()->get('logged_in')) {\n \techo render(HOME_PAGE, ['title' => 'Accueil']);\n }\n // Otherwise, the login page is displayed\n else $this->login();\n }", "public function index()\n {\n// $pageData = $this->_pageService->getPage(PageConstant::HOME_PAGE);\n return $this->renderView($this->getView('home.welcome'), [], 'Home');\n }", "public function homePage()\n {\n return cq()->homePage();\n }", "public function home()\n\t{\n\t\t$this->load->view('homepage_view');\n\t}", "public function home()\n\t{\n\t\t$this->sidebar_template = 'news';\n\t\t$this->news = R::dispense('news', 5);\n\t\t$this->render();\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function home()\n\t{\n\t\t$header = $this->loaded_module(0);\n\t\t$footer = $this->loaded_module(1);\n\t\t\n\t\t$data = $this->settings();\n\t\t\n\t\t$product = $this->loaded_module(7);\n\t\t$data[\"product_special\"] = $product->special_product_list(8);\n\t\t$data[\"latest_product\"] = $product->latest_product_list(6);\n\t\t$data[\"latest_product2\"] = $product->latest_product_list(6);\n\t\t$data[\"latest_product3\"] = $product->latest_product_list(6);\n\t\t\n\t\t$banner = $this->loaded_module_admin(7)->get_active_banner();\n\t\t$data[\"banner\"] = $banner;\n\t\t\n\t\t$header->header_view();\n\t\t$this->load->view(\"Home_v\", $data);\n\t\t$footer->footer_view();\n\t}", "public function home()\n {\n $lastUpdates = ArticleManager::findLastUpdates();\n\n $this->renderView('home.twig',\n [\n 'articleList' => $this->articleList,\n 'lastUpdates' => $lastUpdates, \n ]\n );\n }", "function home(){\n if(!is_null(Session::get('id_usuario'))){\n header(\"Location: \".URL.\"tarea\");\n\n }\n $this->view->show();\n }", "public function index()\n\t{\n\t\tif (ENVIRONMENT=='development')\n\t\t\t$this->render('home');\n\t\telse\n\t\t\tredirect();\n\t}", "public function index()\n\t{\n\t\tif (ENVIRONMENT=='development')\n\t\t\t$this->render('home');\n\t\telse\n\t\t\tredirect();\n\t}", "public function actionProvHome()\n {\n return $this->render('prov/prov-home');\n }", "public function home()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'GET') {\n if (!isset ($_GET['id'])) {\n show_view('views/pages/home.php', [\n 'posts' => Posts::readAll(),\n 'bodyParts' => BodyPart::all(),\n 'difficulty' => Difficulty::all(),\n ]);\n } else {\n show_view('views/pages/home.php', [\n 'posts' => Posts::findByBodyPart($_GET['id']),\n 'bodyParts' => BodyPart::all(),\n 'difficulty' => Difficulty::all(),\n ]);\n }\n }\n }", "function Home()\n {\n $this->requestSessionInfo();\n\n // muestra solo 2\n $recent_artworks = $this->modelArtwork->GetFrontArtworks(2);\n $this->view->ShowHome($recent_artworks);\n }", "public function home()\n\t{\n\t\t$page = 'home';\n\t\treturn view('dashboard.home', compact('page'));\n\t}", "public function home()\n\t{\n\t\t//Se valida la existencia de los datos del usuario que inicio sesion dentro de la session\n\t\tif($this->session->userdata('id_usuario_prueba') != null){\n\t\t\t$data = [\n\t\t\t\t\"page\" => \"Home\"\n\t\t\t];\n\t\t\t$this->load->view('layout/layout_open');\n\t\t\t$this->load->view('layout/layout_menu', $data);\n\t\t\t$this->load->view('home');\n\t\t\t$this->load->view('layout/layout_close');\n\t\t}else{\n\t\t\theader(\"Location:\" . base_url());\n\t\t}\n\t}", "protected function goHomePage()\n {\n $this->_redirect($this->homeURL);\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "public function home()\n {\n return view(\"home\");\n }", "public function home()\n {\n return view('core::home.index');\n }", "public function index()\n\t{\n// $page = Page::whereTitle('home')->first();\n// if(! $page){\n// $page=nulls;\n// }\n\n\t\treturn view('admin.home.index');\n\n\n\t}", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function showHome()\n {\n //user authentication\n $user = UserAccountController::getCurrentUser();\n if ($user === null) {\n return;\n }\n $view = new View(\"userHome\");\n $view->addData(\"userName\", $user->getNickName());\n echo $view->render();\n }", "public function indexAction() {\n $this->view->render('home/index'); //path from the view folder\n //we already have view because it's set up in the parent, render is from view\n }", "public function home()\n {\n $slug = $this->getHomeSlug();\n\n if ( ! $slug) {\n return abort(404, \"No wiki home page defined\");\n }\n\n return redirect()->to(cms_route('wiki.page', [ $slug ]));\n }", "public function home()\n {\n return view('home'); //Le paso la vista principal\n }", "public function home()\n\t{\n\t\treturn view('e_shop.landing');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function home () {\n\t\t//deteccion\n\t\tif(Agent::isMobile()){\n\t\t\treturn View::make(\"movil.home\");\n\t\t} else {\n\t\t\treturn View::make(\"desktop.pre\");\n\t\t}\n\t}", "public function userHome() {\n\n $this->page->getPage('userhome.tpl');\n }", "public function home()\n\t{\n\t\t$data = $this->Service->get_latest_blogs();\n\n\t\t// Get the only one latest blog among all the categories.\n\t\t$data['latest_blog'] = $this->Blogs_model->get_latest_blog();\n\n\t\t// load the view\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('blogs/home', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "public function actionIndex() {\n // renders the view file 'protected/views/site/index.php'\n // using the default layout 'protected/views/layouts/main.php'\n //$this->layout = 'layout';\n $this->pageTitle=\"KushGhar-Home\";\n $this->render('index');\n }", "public function home(){\n $itemsHome = $this->itemsModel->listenerItems(); // Recupération des items de ma bdd ( par default les 8 permier items)\n include(\"home.php\"); // Chargement de la view (page home.php)\n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function home()\r\n\t{\r\n\t\tif( $this->is_logged_in() )\r\n\t\t{\r\n\t\t\treturn redirect('dashboard','refresh');\r\n\t\t}\r\n\t\telse {\r\n\r\n\t\t\t return redirect('login','refresh');\r\n\t\t}\r\n\t}", "public function index()\n\t{\n\t\t$data['logo'] = \"/img/ilih.png\";\n\t\t$data['users'] = $this->User->getAll();\n\n\t\t$this->parser->parse('home', $data);\n\t}", "public function home()\n\t{\n\t\treturn View::make('newhome');\n\t}", "public static function index()\n {\n self::create_view(\"home.view\", [\n \"user\" => Session::retrieve_object(\"user\")\n ]);\n\n exit;\n }", "public function home()\n\t{\n\t\t\n\t\t$data = $this->data;\n\t\t$this->load->view('admin/index.php',$data);\n\t}", "public function index() {\n\t\t\t$this->render('home.twig.html', ['flash' => $this->session->getFlash(), 'token' => $this->session->getToken()]);\n\t\t}", "public function showHome()\n {\n if(!isset($_GET['people']))\n {\n $arr=$this->model->getList();\n include 'view_home.php';\n } else\n {\n $val = $this->model->getPerson($_GET['people']);\n include 'view2.php';\n }\n }", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function index()\n {\n return view('web.defaults.home');\n }", "public function homePageAction(Application $app){\n \n $spectacles = $app['dao.spectacle']->LastNineArticles();\n $archives= $app['dao.spectacle']->ArchiveShow();\n $presses = $app['dao.press']->findAll();\n return $app['twig']->render('index.html.twig', array('spectacles'=>$spectacles,\n 'archives'=>$archives,\n 'presses'=>$presses));\n }", "public function home() {\n\t\treturn View::make('home', array('pageTitle' => 'Home'));\n\t}", "public function index()\n {\n return View(\"pages.home\");\n }", "public function actionIndex() \n\t{\n\t\t$metaTitle = 'Homepage';\n\t\t\n\t\t$categories = array();\n\t\t$categories = Category::getCategoriesList();\n\t\t\n\t\t$latestProducts = array();\n\t\t$latestProducts = Product::getLatestProducts(4);\n\t\t\n\t\t// products for slider of recommended\n\t\t$sliderProducts = array();\n\t\t$sliderProducts = Product::getRecommendedProducts();\n\t\t\n\t\trequire_once(ROOT.'/views/site/index.php');\n\t\t\n\t\treturn true;\n\t}", "public function homePage()\n\t{\n $data[\"base_url\"] = $this->config->item(\"base_url\");\n $data['header'] = $this->load->view('user/header', $data, TRUE);\n\t\t$data['footer'] = $this->load->view('user/footer', $data, TRUE);\n\t\t$this->load->view('user/home',$data,true);\n }", "public function homepage()\n {\n return view('statics.home');\n }", "public function showHome()\n {\n return view('content.index.index.home');\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function home()\n {\n return view('page.home');\n }", "public function home()\n {\n return view('admin.home');\n }", "public function index()\n\t{\n\t\tif ( $this->auth->check() )\n\t\t{\t\t\n\t\t\t// MUESTRA LA PAGINA\n\t\t\t$this->show_page();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect ( $this->_base_url );\n\t\t}\n\t}", "public function home() {\n return view('admin.home');\n }", "public function getHome()\n\t{\n\t\tif(Session::get('admin') == 'admin')\n\t\t\treturn Redirect::route('admin-home-get');\n\t\t\n\t\tif(Session::get('member') == 'member')\n\t\t\treturn Redirect::route('member-home-get');\n\n\t\tif(Session::get('employee') == 'employee')\n\t\t\treturn Redirect::route('employee-home-get');\n\n\t\treturn View::make('errors/404');\n\t}", "public function home()\n\t{\n\t\tSession::put('lang','EN');\n\t\treturn $this->homeblade();\n\t}" ]
[ "0.87153625", "0.8310088", "0.82810503", "0.8278076", "0.8214171", "0.81164247", "0.80845374", "0.8044981", "0.80166644", "0.8002096", "0.7999078", "0.79849523", "0.79761887", "0.795694", "0.79460955", "0.7902253", "0.7888324", "0.788606", "0.7880821", "0.7861734", "0.7838802", "0.7838412", "0.78327864", "0.7826531", "0.7816538", "0.7779734", "0.7769118", "0.77506584", "0.77426744", "0.7737106", "0.7725228", "0.77189624", "0.7703055", "0.7694349", "0.7686936", "0.7667964", "0.7663247", "0.76619303", "0.76535124", "0.7640195", "0.7637233", "0.76297516", "0.7624652", "0.76221615", "0.76194006", "0.7612479", "0.7588557", "0.75729644", "0.7565794", "0.75597113", "0.7553198", "0.75471556", "0.75423056", "0.75377196", "0.75377196", "0.75364745", "0.75325185", "0.7531952", "0.75315803", "0.75257677", "0.7525042", "0.750439", "0.74993926", "0.7496873", "0.7479717", "0.74702317", "0.74631333", "0.7445817", "0.7433147", "0.7414255", "0.74088806", "0.7404012", "0.74007213", "0.73968834", "0.73915917", "0.7391174", "0.73776376", "0.737426", "0.7364511", "0.7354475", "0.73542154", "0.7347136", "0.73423463", "0.73422736", "0.73305213", "0.7312517", "0.7306927", "0.730441", "0.7297422", "0.7294075", "0.7289855", "0.7287005", "0.7283341", "0.72723496", "0.7264403", "0.7262247", "0.72569174", "0.7256079", "0.7255837", "0.72454935", "0.7241475" ]
0.0
-1
Add our script to the queue
function module_admin_scripts() { wp_enqueue_script('k2widgets'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueueScript($id)\n {\n $this->queue[$id] = $id;\n }", "public function queueScript($name, $src){\n\t\tglobal $AWCORE_LOAD_SCRIPTS;\n\t\t\n\t\t$AWCORE_LOAD_SCRIPTS[$name]['src'] = $src;\n\t\t\n\t}", "public function queue_scripts() {\n\t\t\tif ( $queue = WPO_WCPDF_Dropbox()->hooks->get_queued_files() ) {\n\t\t\t\twp_register_script(\n\t\t\t\t\t'dropbox-queue',\n\t\t\t\t\tplugins_url( 'js/dropbox-queue.js' , dirname(__FILE__) ),\n\t\t\t\t\tarray( 'jquery', 'thickbox' )\n\t\t\t\t);\n\t\t\t\twp_enqueue_script( 'dropbox-queue' );\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t}\n\t\t}", "function enqueue(){\n\t\t}", "public function enqueueScripts(){}", "public function add() {\n $this->out('CakePHP Queue Example task.');\n $this->hr();\n $this->out('This is a very simple example of a QueueTask.');\n $this->out('I will now add an example Job into the Queue.');\n $this->out('This job will only produce some console output on the worker that it runs on.');\n $this->out(' ');\n $this->out('To run a Worker use:');\n $this->out('\tbin/cake queue runworker');\n $this->out(' ');\n $this->out('You can find the sourcecode of this task in: ');\n $this->out(__FILE__);\n $this->out(' ');\n\n //$options = getopt('',['id:']);\n /*\n * Adding a task of type 'example' with no additionally passed data\n */\n //if ($this->QueuedJobs->createJob('RemittanceApi', ['id'=>4033, 'batch_id'=>'58e44de0f33a7'])) {\n if ($this->QueuedJobs->createJob('RemittanceApi', null)) {\n $this->out('OK, job created, now run the worker');\n } else {\n $this->err('Could not create Job');\n }\n }", "function pushScript ($script) {\n\t\t$this->_roof[\"cuerpo\"][] = \"<script type=\\\"text/javascript\\\" src=\\\"\".$script.\"\\\"></script>\";\n\t}", "public function enqueue() {\n\t}", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function register_enqueuing() {\n\t\tadd_action( 'admin_print_scripts-nav-menus.php', array( &$this, 'enqueue_scripts' ) );\n\t}", "public function add()\n\t{\n\t\tforeach (func_get_args() as $script) {\n\t\t\t$asset = $this->input_path . $script;\n\t\t\tarray_push($this->files, $asset);\n\t\t}\n\t}", "public function dequeue_script() {\r\n\t wp_dequeue_script( 'jquery-ui-sortable' );\r\n\t wp_dequeue_script( 'scporderjs' );\r\n\t wp_dequeue_script( 'plt-quick-add' );\r\n\t}", "function enqueue_script($script_name) {\n static $enqueued_scripts = [];\n\n if ( $enqueued_scripts[ $script_name ] ) return 0;\n\n echo '<script src=\"'.SCRIPTS_JS.$script_name.'\"></script>';\n $enqueued_scripts[] = $script_name;\n \n}", "function addScript($script, $arg, $max_execution_time = 300)\n {\n $this->scripts[] = array(\"script_name\" => $script, \"arg\"=>$arg, \"max_execution_time\" => $max_execution_time);\n }", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "public function execute() {\n $this->getQueue()->push($this->getJob(), $this->getJobOptions());\n }", "public function runQueue();", "function enqueue ($entry) {\n\n}", "public function add_script($script)\n {\n $this->_scripts[] = $script;\n }", "abstract public function register_script();", "public static function enqueue();", "function es_detect_enqueued_scripts()\n{\n global $wp_scripts;\n foreach ($wp_scripts->queue as $handle):\n echo $handle . ' | ';\n endforeach;\n}", "function prosody_plugin_queue_scripts ()\n{\n\n wp_enqueue_style(\n 'poem-css',\n plugin_dir_url( __FILE__ ) . 'css/poem.css',\n array(),\n null,\n false\n );\n\n wp_register_script(\n 'handlers.js',\n plugins_url('js/handlers.js', __FILE__),\n array(),\n null,\n true\n );\n // Localize the script to pass in the siteurl\n wp_localize_script('handlers.js', 'WPURLS', array( 'siteurl' => home_url() ));\n wp_enqueue_script( 'handlers.js' );\n}", "function queue_js_url($url, $options = array())\n{\n get_view()->headScript()->appendFile($url, null, $options);\n}", "public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}", "public function createQueue() {\n // Drupal is first installed) so there is nothing we need to do to create\n // a new queue.\n }", "public function addScript($script) {\n if (!in_array($script, (array)$this->scripts, true)) {\n $this->scripts[] = $script;\n }\n }", "public function addQueue(QueueInterface $queue);", "function put_in_queue() {\n wp_enqueue_script('reviewsjs', plugins_url('/assets/js/reviews.js', __FILE__));\n wp_enqueue_style('reviewscss', plugins_url('/assets/css/reviews.css', __FILE__));\n }", "function wp_dequeue_script($handle)\n {\n }", "function queue_js_string($string, $options = array())\n{\n get_view()->headScript()->appendScript($string, null, $options);\n}", "public function addScript(Atomik_Db_Script_Interface $script)\n\t{\n\t\t$this->_scripts[] = $script;\n\t}", "public function onAdminEnqueueScripts()\n {\n $this->enqueue('admin');\n }", "public function addQueue(MailInterface $mail);", "private function enqueue () {\n\n\t\t$this->add_action ('admin_enqueue_scripts', $this, 'enqueue_files' );\n\t}", "protected function addScript($scriptPath){\n if(is_array($scriptPath)) {\n array_merge($this->scripts, $scriptPath);\n } else if(is_string($scriptPath)){\n $this->scripts[] = $scriptPath;\n }\n // TODO error handling\n }", "public function addScript($js) {\r\n $this->body[] = self::getScript($js);\r\n }", "protected function getEnqueuingScripts() { \r\n\t\treturn array(\r\n\t\t\t// array( 'src'\t=> dirname( __FILE__ ) . '/js/jquery.knob.js', 'dependencies'\t=> array( 'jquery' ) ),\r\n\t\t);\r\n\t}", "private function add_script( scripts $script ) {\n\n\t\t\t// check if script is enqueued\n\t\t\tif($script->get_is_enqueued()) {\n\t\t\t\t// check is script isn't loaded already and not disabled\n\t\t\t\tif ($this->check_for_enqueue($script)) {\n\t\t\t\t\t// set as loaded\n\t\t\t\t\t$script->set_is_loaded();\n\t\t\t\t\tself::$scripts_by_handle[$script->get_handle()]\t= $script;\n\n\t\t\t\t\t// CSS or JS\n\t\t\t\t\tswitch ($script->get_type()) {\n\t\t\t\t\t\tcase 'css':\n\t\t\t\t\t\t\t$module = $script->get_parent();\n\n\t\t\t\t\t\t\t// get settings object for build css later\n\t\t\t\t\t\t\tif($script->get_ID() == 'config') {\n\t\t\t\t\t\t\t\tif($script->get_parent()->get_css_cache_active()) {\n\t\t\t\t\t\t\t\t\t$script->cache_css();\n\t\t\t\t\t\t\t\t\t$script->get_parent()->get_script('common')->set_is_enqueued(false);\n\t\t\t\t\t\t\t\t\t$script->get_parent()->get_script('default')->set_is_enqueued(false);\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t// legacy\n\t\t\t\t\t\t\t\t\t$_s = $script->get_parent()->get_settings();\n\t\t\t\t\t\t\t\t\t$_s = reset($_s);\n\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// check if inline per settings (higher prio) or per parameter (lower prio)\n\t\t\t\t\t\t\tif ( static::$list[$script->get_UID()][ 'attached' ] && // checks if null - Dennis\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\tstatic::$list[$script->get_UID()][ 'attached' ]->get_data() === 'inline'\n\t\t\t\t\t\t\t\t\t|| (\n\t\t\t\t\t\t\t\t\t\tstatic::$list[$script->get_UID()][ 'attached' ]->get_data() === 'default'\n\t\t\t\t\t\t\t\t\t\t&& $script->get_inline()\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t&& ! $script->get_is_backend()\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tif(is_file($script->get_path())) {\n\t\t\t\t\t\t\t\t\tob_start();\n\t\t\t\t\t\t\t\t\trequire($script->get_path());\n\t\t\t\t\t\t\t\t\t$css = ob_get_clean();\n\n\t\t\t\t\t\t\t\t\twp_add_inline_style('sv_core_init_style', $css);\n\t\t\t\t\t\t\t\t\twp_add_inline_style('sv_core_gutenberg_style', $css);\n\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\terror_log(__('Script \"'.$script->get_handle().'\" in path \"'.$script->get_path().'\" not found.'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif(!is_admin()) {\n\t\t\t\t\t\t\t\t\tif($script->get_path() && filesize($script->get_path()) === 0){\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\twp_enqueue_style(\n\t\t\t\t\t\t\t\t\t\t$script->get_handle(),\t\t\t\t\t\t // script handle\n\t\t\t\t\t\t\t\t\t\t$script->get_url(),\t\t\t\t\t\t\t// script url\n\t\t\t\t\t\t\t\t\t\t$script->get_deps(),\t\t\t\t\t\t\t// script dependencies\n\t\t\t\t\t\t\t\t\t\t($this->is_external() ? md5($script->get_url()) : filemtime($script->get_path())),\t // script version, generated by last filechange time\n\t\t\t\t\t\t\t\t\t\t$script->get_media()\t\t\t\t\t\t\t// The media for which this stylesheet has been defined. Accepts media types like 'all', 'print' and 'screen', or media queries like '(orientation: portrait)' and '(max-width: 640px)'.\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tif($script->get_is_gutenberg()){\n\t\t\t\t\t\t\t\t\t\tif(is_file($script->get_path())) {\n\t\t\t\t\t\t\t\t\t\t\tob_start();\n\t\t\t\t\t\t\t\t\t\t\trequire($script->get_path());\n\t\t\t\t\t\t\t\t\t\t\t$css = ob_get_clean();\n\n\t\t\t\t\t\t\t\t\t\t\twp_add_inline_style('sv_core_gutenberg_style', $css);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\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\tbreak;\n\t\t\t\t\t\tcase 'js':\n\t\t\t\t\t\t\tif(strlen($script->get_inline()) > 0){\n\t\t\t\t\t\t\t\tob_start();\n\t\t\t\t\t\t\t\trequire($script->get_path());\n\t\t\t\t\t\t\t\t$js = ob_get_clean();\n\n\t\t\t\t\t\t\t\twp_add_inline_script($script->get_inline(), $js, 'before');\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\twp_enqueue_script(\n\t\t\t\t\t\t\t\t\t$script->get_handle(),\t\t\t\t\t\t\t // script handle\n\t\t\t\t\t\t\t\t\t$script->get_url(),\t\t\t\t\t\t\t // script url\n\t\t\t\t\t\t\t\t\t$script->get_deps(),\t\t\t\t\t\t\t\t// script dependencies\n\t\t\t\t\t\t\t\t\t($this->is_external() ? md5($script->get_url()) : filemtime($script->get_path())),\t\t // script version, generated by last filechange time\n\t\t\t\t\t\t\t\t\t$script->get_load_in_header() ? false : true\t\t\t\t\t\t\t\t\t // print in footer\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ($script->is_localized()) {\n\t\t\t\t\t\t\t\twp_localize_script($script->get_handle(), $script->get_uid(), $script->get_localized());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tself::$scripts_active[]\t\t\t\t\t\t\t\t= $script;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private function register_script() {\n\n\t\tif ( $this->inline ) {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t'',\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t\tif ( $this->does_file_exist( $this->src ) ) {\n\t\t\t\twp_add_inline_script( $this->handle, file_get_contents( $this->src ) );\n\t\t\t}\n\t\t} else {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t$this->src,\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty( $this->localize ) ) {\n\t\t\twp_localize_script( $this->handle, $this->handle, $this->localize );\n\t\t}\n\n\t\twp_enqueue_script( $this->handle );\n\t}", "public function add_wp_script($slug) {\n\t\tif(is_array($this->wp_scripts))\n\t\t\tarray_push($this->wp_scripts, $slug);\n\t}", "function add_myscript(){\n}", "function addElement($script){\n if(!$this->host->messages)\n $this->host->messages = $script;\n else\n $this->host->messages .= $script;\n }", "public static function enqueue_scripts() {\n\t\tif ( ! static::$enqueued && wp_script_is( 'cmb2-scripts', 'enqueued' ) ) {\n\t\t\twp_enqueue_script( 'wplibs-form' );\n\t\t\tstatic::$enqueued = true;\n\t\t}\n\t}", "public static function push()\n {\n return <<<'LUA'\n-- Push the job onto the queue...\nredis.call('zadd', KEYS[1], 'NX', ARGV[1], ARGV[2])\n-- Push a notification onto the \"notify\" queue...\nredis.call('rpush', KEYS[2], 1)\nLUA;\n }", "function ffd_enqueue_js( $code ) {\r\n\tglobal $ffd_queued_js;\r\n\r\n\tif ( empty( $ffd_queued_js ) ) {\r\n\t\t$ffd_queued_js = '';\r\n\t}\r\n\r\n\t$ffd_queued_js .= \"\\n\" . $code . \"\\n\";\r\n}", "static function get_queued_scripts() {\n\t\tglobal $wp_scripts;\n\n\t\t$loading_scripts = array();\n\t\tforeach ( $wp_scripts->queue as $key => $handle ) {\n\t\t\t$loading_scripts[ $handle ] = $wp_scripts->registered[ $handle ]->src;\n\t\t}\n\t\treturn $loading_scripts;\n\t}", "public function addScript($uri)\n {\n array_push($this->scripts, \\URL::to($uri));\n }", "function addNewMyQueue($myqueueName)\r\n {\r\n $time = time(); \r\n $q = \"INSERT INTO \".TBL_MYQUEUE.\" VALUES (NULL, '$myqueueName', $time )\";\r\n return mysql_query($q, $this->connection);\r\n }", "abstract public function addScript($file = '', $options = array(), $attribs = array());", "public function Queues();", "public function pushOn($queue, $job, $data = '');", "function wp_dequeue_script( $handle ) {\n\t_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );\n\n\twp_scripts()->dequeue( $handle );\n}", "public function __construct()\n {\n $this->onQueue('daily-game-play');\n }", "function care_enqueue_js( $code ) {\n\tglobal $care_queued_js;\n\n\tif ( empty( $care_queued_js ) ) {\n\t\t$care_queued_js = '';\n\t}\n\n\t$care_queued_js .= \"\\n\" . $code . \"\\n\";\n}", "private function setQueue() {\n if (count($this->request->q) > 0) {\n try {\n $this->client->setQueue(array($this->request->q));\n $this->view->addParameter(\"result\", \"success\");\n } catch(Exception $e) {\n $this->view->addParameter(\"result\", \"failure\");\n $this->view->addParameter(\"data\", \"Failed to execute '{$this->request->action}' action\");\n }\n } else {\n $this->view->addParameter(\"result\", \"invalid\");\n $this->view->addParameter(\"data\", \"Query array must not be empty\");\n }\n }", "public function register_script() {\n\t\ttribe_asset(\n\t\t\tTribe__Main::instance(),\n\t\t\t'tribe-common-logging-controls',\n\t\t\t'admin-log-controls.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'admin_enqueue_scripts',\n\t\t\tarray(\n\t\t\t\t'conditionals' => array( Tribe__Admin__Help_Page::instance(), 'is_current_page' ),\n\t\t\t\t'localize' => (object) array(\n\t\t\t\t\t'name' => 'tribe_logger_data',\n\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t'check' => wp_create_nonce( 'logging-controls' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "function chabok_enqueue() {\n\tglobal $chabok_options;\n\n\twp_register_script(\n\t\t'chabokpush',\n\t\tCHABOK_URL . 'assets/js/chabokpush.min.js',\n\t\tarray(),\n\t\tCHABOK_VER,\n\t\ttrue\n\t);\n\n\twp_register_script(\n\t\t'chabok',\n\t\tCHABOK_URL . 'assets/js/chabok-init.js',\n\t\tarray( 'chabokpush', 'jquery' ),\n\t\tCHABOK_VER,\n\t\ttrue\n\t);\n\n\twp_enqueue_script( 'chabok' );\n\n\twp_localize_script( 'chabok', 'chabok_params', array(\n\t\t'options' \t\t=> $chabok_options,\n\t\t'xhr_endpoint'\t=> admin_url( 'admin-ajax.php' ),\n\t) );\n}", "public function add($id) \n {\n $log = FezLog::get();\n if (!array_key_exists($id,$this->_ids) || !$this->_ids[$id]) {\n $this->_ids[$id] = self::ACTION_ADD;\n $log->debug(\"Added $id to queue\");\n }\n }", "public function emailQueue() {\n\t\t$this->EmailQueue->processQueue(); exit;\n\t}", "public function enqueue_script($name)\n {\n }", "function exec_queue()\n\t{\n\t\t$vbulletin =& $this->registry;\n\n\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t{\n\t\t\t// Lock mailqueue table so that only one process can\n\t\t\t// send a batch of emails and then delete them\n\t\t\t$vbulletin->db->lock_tables(array('mailqueue' => 'WRITE'));\n\t\t}\n\n\t\t$emails = $vbulletin->db->query_read(\"\n\t\t\tSELECT *\n\t\t\tFROM \" . TABLE_PREFIX . \"mailqueue\n\t\t\tORDER BY mailqueueid\n\t\t\tLIMIT \" . intval($vbulletin->options['emailsendnum'])\n\t\t);\n\n\t\t$mailqueueids = '';\n\t\t$newmail = 0;\n\t\t$emailarray = array();\n\t\twhile ($email = $vbulletin->db->fetch_array($emails))\n\t\t{\n\t\t\t// count up number of mails about to send\n\t\t\t$mailqueueids .= ',' . $email['mailqueueid'];\n\t\t\t$newmail++;\n\t\t\t$emailarray[] = $email;\n\t\t}\n\t\tif (!empty($mailqueueids))\n\t\t{\n\t\t\t// remove mails from queue - to stop duplicates being sent\n\t\t\t$vbulletin->db->query_write(\"\n\t\t\t\tDELETE FROM \" . TABLE_PREFIX . \"mailqueue\n\t\t\t\tWHERE mailqueueid IN (0 $mailqueueids)\n\t\t\t\");\n\n\t\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t\t{\n\t\t\t\t$vbulletin->db->unlock_tables();\n\t\t\t}\n\n\t\t\tif ($vbulletin->options['use_smtp'])\n\t\t\t{\n\t\t\t\t$prototype =& new vB_SmtpMail($vbulletin);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$prototype =& new vB_Mail($vbulletin);\n\t\t\t}\n\n\t\t\tforeach ($emailarray AS $index => $email)\n\t\t\t{\n\t\t\t\t// send those mails\n\t\t\t\t$mail = (phpversion() < '5' ? $prototype : clone($prototype)); // avoid ctor overhead\n\t\t\t\t$mail->quick_set($email['toemail'], $email['subject'], $email['message'], $email['header'], $email['fromemail']);\n\t\t\t\t$mail->send();\n\t\t\t}\n\n\t\t\t$newmail = 'data - ' . intval($newmail);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t\t{\n\t\t\t\t$vbulletin->db->unlock_tables();\n\t\t\t}\n\n\t\t\t$newmail = 0;\n\t\t}\n\n\t\t// update number of mails remaining\n\t\t$vbulletin->db->query_write(\"\n\t\t\tUPDATE \" . TABLE_PREFIX . \"datastore SET\n\t\t\t\tdata = \" . $newmail . \",\n\t\t\t\tdata = IF(data < 0, 0, data)\n\t\t\tWHERE title = 'mailqueue'\n\t\t\");\n\n\t\t// if we're using a alternate datastore, we need to give it an integer value\n\t\t// this may not be atomic\n\t\tif (method_exists($vbulletin->datastore, 'build'))\n\t\t{\n\t\t\t$mailqueue_db = $vbulletin->db->query_first(\"\n\t\t\t\tSELECT data\n\t\t\t\tFROM \" . TABLE_PREFIX . \"datastore\n\t\t\t\tWHERE title = 'mailqueue'\n\t\t\t\");\n\t\t\t$vbulletin->datastore->build('mailqueue', intval($mailqueue_db['data']));\n\t\t}\n\t}", "public function register_scripts()\n {\n }", "function mp_enqueue_scripts(){\n\n // Action pour shunter mp_register_style\n do_action('enqueue_scripts');\n\n // On charge les registers\n $enqueue_registers = mp_cache_data('mp_register_script');\n\n if( !empty($enqueue_registers) ){\n\n // On charge les registers\n foreach ($enqueue_registers as $handle => $args)\n mp_enqueue_script($handle);\n }\n\n}", "private function performQueueOperations()\n\t{\n\t\t//$this->queue_manager = high_risk\n\t\t$application_id = $this->application->getModel()->application_id;\n\t\t$qi = $this->queue_manager->getQueue(\"high_risk\")->getNewQueueItem($application_id);\n\t\t$this->queue_manager->moveToQueue($qi, \"high_risk\");\t\t\n\t}", "function enqueue_scripts() {\n\t\tinclude $this->dir_path . 'scripts.php';\n\t}", "public function onSpeakersAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "function asc_dequeue_script( $handle ) {\n\tglobal $asc_scripts;\n\tif ( ! is_a( $asc_scripts, 'ASC_Scripts' ) ) {\n\t\tif ( ! did_action( 'init' ) )\n\t\t\t_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),\n\t\t\t\t'<code>asc_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );\n\t\t$asc_scripts = new ASC_Scripts();\n\t}\n\n\t$asc_scripts->dequeue( $handle );\n}", "public function enqueue_control_scripts()\n {\n }", "public function add_scripts() {\n\n\t\t\t\tFusion_Dynamic_JS::enqueue_script( 'fusion-video' );\n\t\t\t}", "public function createQueue();", "function queue_scripts() {\n\n if (!is_admin()) {\n\n // Deregister scripts.\n wp_deregister_script('jquery');\n\n\n // Scripts in header.\n wp_register_script('modernizr-js', get_stylesheet_directory_uri() . '/assets/js/vendor/modernizr-2.7.1.min.js', array(), '2.7.1', false);\n\n\n // Scripts in footer.\n wp_register_script('jquery', get_stylesheet_directory_uri() . '/assets/js/vendor/jquery-1.10.2.min.js', array(), '1.10.2', true);\n wp_register_script('main-js', get_stylesheet_directory_uri() . '/assets/js/main.min.js', array(), '', true);\n\n\n // Queue scripts.\n wp_enqueue_script('modernizr-js');\n // wp_enqueue_script('jquery');\n // wp_enqueue_script('main-js');\n\n }\n}", "public function embed_scripts() {}", "public function run()\n {\n $this->addReleases();\n }", "function script()\n {\n }", "public function __construct() {\n # Get the queue\n $this->queue = Queue::getQueue();\n # Now process\n $this->process();\n }", "public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "private function enqueues(){\n\n\t\t\tadd_action( 'init', function(){\n\n\t\t\t\t//scripts:\n\t\t\t\t$url = Url::plugin( 'chef-sections', true ).'Assets/js/libs/';\n\t\t\t\t\n\t\t\t\tScript::register( 'isotope', $url.'isotope.min', false );\n\t\t\t\tScript::register( 'imagesloaded', $url.'imagesloaded.min', false );\n\t\t\t\tScript::register( 'autoload', $url.'autoload', false );\n\t\t\t\tScript::register( 'fitvids', $url.'fitvids.min', false );\n\n\t\t\t\t//sass:\n\t\t\t\tif( !Sass::ignore() ){\n\t\t\t\t\t\n\t\t\t\t\t$url = 'chef-sections/Assets/sass/front/';\n\t\t\t\t\t\n\t\t\t\t\tSass::register( 'sections-columns', $url.'_columns', false );\n\t\t\t\t\tSass::register( 'sections-collection', $url.'_collection', false );\n\t\t\t\t\tSass::register( 'sections-loader', $url.'_loader', false );\n\t\t\t\t\tSass::register( 'sections-socials', $url.'_socials', false );\n\t\t\t\t\tSass::register( 'sections-responsive', $url.'_responsive', false );\n\n\t\t\t\t}else{\n\n\t\t\t\t\t//we need to ignore sass and enqueue a regular css file:\n\t\t\t\t\tadd_action( 'wp_enqueue_scripts', function(){\n\n\t\t\t\t\t\twp_enqueue_style( 'chef_sections', Url::plugin( 'chef-sections', true ).'Assets/css/compiled.css' );\n\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public function pushScriptFile( $path, $position = CClientScript::POS_HEAD )\n\t{\n\t\t$this->_scriptFiles[] = array( $path, $position );\n\t}", "public function add($item)\n {\n $this->queueItems[] = $item;\n }", "protected function getEnqueuingScripts() {\r\n return array(\r\n array( \r\n // 'src' => dirname( __FILE__ ) . '/js/jquery.easing.js',\r\n 'src' => dirname( __FILE__ ) . '/js/jQueryFileTree.js',\r\n 'dependencies' => array( 'jquery' ) \r\n ),\r\n );\r\n }", "public function registerScript(/*string*/ $scriptSrc);", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Nimiq_Miner_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Nimiq_Miner_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( 'nimiq-core', 'http://cdn.nimiq.com/core/nimiq.js');\n\t\twp_enqueue_script( 'nimiq-web', 'http://cdn.nimiq.com/core/web.js');\n\t\twp_enqueue_script( 'nimiq-wasm', 'http://cdn.nimiq.com/core/worker-wasm.js');\n\n\t\twp_register_script( 'nimiq-miner', plugin_dir_url( __FILE__ ) . 'js/nimiq-miner-public.js', array( 'jquery' ), 4, false );\n\n\t\t$localize = array(\n\t\t 'nim_address' => get_option('nim_address'),\n\t\t 'nim_thread_percent' => get_option('nim_thread_percent'),\n\t\t 'nim_disclaimer_bg' => get_option('nim_disclaimer_bg'),\n\t\t 'nim_disclaimer_text_color' => get_option('nim_disclaimer_text_color'),\n\t\t 'nim_disclaimer_text' => get_option('nim_disclaimer_text')\n\t\t);\n\n\t\twp_localize_script( 'nimiq-miner', 'php_vars', $localize );\n\n\t\twp_enqueue_script( 'nimiq-miner' );\n\n\t}", "protected function getEnqueuingScripts() { \n return array(\n array( // if you need to set a dependency, pass as a custom argument array. \n 'src' => dirname( __FILE__ ) . '/asset/jquery.tokeninput.js', // path or url\n 'dependencies' => array( 'jquery' ) \n ),\n dirname( __FILE__ ) . '/asset/tokeninput.options-hander.js', // a string value of the target path or url will work as well.\n );\n }", "abstract public function push($job, $queue = null);", "public function enqueue(\\System\\Module $module)\n\t\t{\n\t\t\t$this->queue[] = $module;\n\t\t}", "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "public static function register_javascript(array $queue = array())\r\n\t\t{\r\n\t\t\twp_enqueue_script('media-upload');\r\n\t\t\twp_enqueue_script('thickbox');\r\n\t\t\twp_enqueue_script('icf-flexible-wh', self::get_latest_version_url() . '/js/flexible_wh.js', array('jquery'), null, true);\r\n\r\n\t\t\tif (version_compare(get_bloginfo('version'), '3.3', '>=')) {\r\n\t\t\t\twp_enqueue_script('wplink');\r\n\t\t\t\twp_enqueue_script('wpdialogs-popup');\r\n\t\t\t\twp_enqueue_script('icf-active-editor', self::get_latest_version_url() . '/js/active_editor.js', array('jquery'), null, true);\r\n\t\t\t\twp_enqueue_script('icf-quicktags', self::get_latest_version_url() . '/js/quicktags.js', array('quicktags'), null, true);\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-mobiscroll', 'registered')) {\r\n\t\t\t\twp_enqueue_script('icf-mobiscroll', self::get_latest_version_url() . '/js/mobiscroll/mobiscroll-1.6.min.js', array('jquery'));\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-exvalidaion', 'registered')) {\r\n\t\t\t\twp_enqueue_script('icf-exvalidation', self::get_latest_version_url() . '/js/exvalidation/exvalidation.js', array('jquery'));\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-exchecker', 'registered')) {\r\n\t\t\t\t$exchecker = 'exchecker-' . get_locale() . '.js';\r\n\r\n\t\t\t\tif (!is_readable(self::get_latest_version_dir() . '/js/exvalidation/' . $exchecker)) {\r\n\t\t\t\t\t$exchecker = 'exchecker-en_US.min.js';\r\n\t\t\t\t}\r\n\r\n\t\t\t\twp_enqueue_script('icf-exchecker', self::get_latest_version_url() . '/js/exvalidation/' . $exchecker, array('jquery'));\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-common', 'registered')) {\r\n\t\t\t\t$assoc = array('jquery', 'media-upload', 'thickbox', 'icf-exchecker', 'icf-mobiscroll');\r\n\r\n\t\t\t\twp_enqueue_script('icf-common', self::get_latest_version_url() . '/js/common.js', $assoc, null, true);\r\n\t\t\t\twp_localize_script('icf-common', 'icfCommonL10n', array(\r\n\t\t\t\t\t'insertToField' => __('Insert to field', 'icf'),\r\n\t\t\t\t\t'cancelText' => __('Cancel', 'icf'),\r\n\t\t\t\t\t'dateFormat' => __('mm/dd/yy', 'icf'),\r\n\t\t\t\t\t'dateOrder' => __('mmddy', 'icf'),\r\n\t\t\t\t\t'sunday' => __('Sunday', 'icf'),\r\n\t\t\t\t\t'monday' => __('Monday', 'icf'),\r\n\t\t\t\t\t'tuesday' => __('Tuesday', 'icf'),\r\n\t\t\t\t\t'wednesday' => __('Wednesday', 'icf'),\r\n\t\t\t\t\t'thursday' => __('Thursday', 'icf'),\r\n\t\t\t\t\t'friday' => __('Friday', 'icf'),\r\n\t\t\t\t\t'saturday' => __('Saturday', 'icf'),\r\n\t\t\t\t\t'sundayShort' => __('Sun', 'icf'),\r\n\t\t\t\t\t'mondayShort' => __('Mon', 'icf'),\r\n\t\t\t\t\t'tuesdayShort' => __('Tue', 'icf'),\r\n\t\t\t\t\t'wednesdayShort' => __('Wed', 'icf'),\r\n\t\t\t\t\t'thursdayShort' => __('Thu', 'icf'),\r\n\t\t\t\t\t'fridayShort' => __('Fri', 'icf'),\r\n\t\t\t\t\t'saturdayShort' => __('Sat', 'icf'),\r\n\t\t\t\t\t'dayText' => __('Day', 'icf'),\r\n\t\t\t\t\t'hourText' => __('Hours', 'icf'),\r\n\t\t\t\t\t'minuteText' => __('Minutes', 'icf'),\r\n\t\t\t\t\t'january' => __('January', 'icf'),\r\n\t\t\t\t\t'february' => __('February', 'icf'),\r\n\t\t\t\t\t'march' => __('March', 'icf'),\r\n\t\t\t\t\t'april' => __('April', 'icf'),\r\n\t\t\t\t\t'may' => _x('May', 'long', 'icf'),\r\n\t\t\t\t\t'june' => __('June', 'icf'),\r\n\t\t\t\t\t'july' => __('July', 'icf'),\r\n\t\t\t\t\t'august' => __('August', 'icf'),\r\n\t\t\t\t\t'september' => __('September', 'icf'),\r\n\t\t\t\t\t'october' => __('October', 'icf'),\r\n\t\t\t\t\t'november' => __('November', 'icf'),\r\n\t\t\t\t\t'december' => __('December', 'icf'),\r\n\t\t\t\t\t'januaryShort' => __('Jan', 'icf'),\r\n\t\t\t\t\t'februaryShort' => __('Feb', 'icf'),\r\n\t\t\t\t\t'marchShort' => __('Mar', 'icf'),\r\n\t\t\t\t\t'aprilShort' => __('Apr', 'icf'),\r\n\t\t\t\t\t'mayShort' => _x('May', 'short', 'icf'),\r\n\t\t\t\t\t'juneShort' => __('Jun', 'icf'),\r\n\t\t\t\t\t'julyShort' => __('Jul', 'icf'),\r\n\t\t\t\t\t'augustShort' => __('Aug', 'icf'),\r\n\t\t\t\t\t'septemberShort' => __('Sep', 'icf'),\r\n\t\t\t\t\t'octoberShort' => __('Oct', 'icf'),\r\n\t\t\t\t\t'november' => __('Nov', 'icf'),\r\n\t\t\t\t\t'decemberShort' => __('Dec', 'icf'),\r\n\t\t\t\t\t'monthText' => __('Month', 'icf'),\r\n\t\t\t\t\t'secText' => __('Seconds', 'icf'),\r\n\t\t\t\t\t'setText' => __('Set', 'icf'),\r\n\t\t\t\t\t'timeFormat' => __('hh:ii A', 'icf'),\r\n\t\t\t\t\t'yearText' => __('Year', 'icf')\r\n\t\t\t\t));\r\n\t\t\t}\r\n\r\n\t\t\tself::_enqueue($queue, 'script');\r\n\t\t}", "public function removeScript($id)\n {\n unset($this->queue[$id]);\n }", "public function embed_scripts()\n {\n }", "protected function registerScript()\n\t{\n\t $baseUrl = Yii::app()->getHomeUrl();\n\t $js_arr = array('triggmine-scripts.js');\n\t foreach($js_arr as $filename)\n\t {\n\t Yii::app()->getClientScript()->registerScriptFile('/js/vendor/'.$filename, CClientScript::POS_END);\n\t }\n\t}", "function PKG_addJob($client,$packageName,$priority,$params)\n{\n\tPKG_addStatusJob($client,$packageName,$priority,$params,\"waiting\");\n}", "public function addFileTask(string $fileName, $_globals = NULL): void {}", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }" ]
[ "0.71060586", "0.69411194", "0.6885033", "0.64077586", "0.6387542", "0.63743746", "0.6179257", "0.615299", "0.61130106", "0.61130106", "0.61130106", "0.61130106", "0.61130106", "0.61130106", "0.60993785", "0.6098437", "0.6048455", "0.60330474", "0.60160166", "0.5999868", "0.5987494", "0.59593856", "0.59413767", "0.5934527", "0.5929315", "0.5927925", "0.59090924", "0.58721966", "0.58685046", "0.5798365", "0.57630676", "0.571142", "0.5703838", "0.567711", "0.5672275", "0.56621337", "0.5656222", "0.56244546", "0.56179947", "0.5605133", "0.55489", "0.55352044", "0.55235004", "0.54881823", "0.548761", "0.5478823", "0.5473279", "0.5471189", "0.5458905", "0.54478204", "0.54416513", "0.54369175", "0.5425626", "0.5422949", "0.54154444", "0.5411545", "0.53968155", "0.53895307", "0.53851146", "0.5383015", "0.53812367", "0.5373348", "0.53679657", "0.5331019", "0.5321617", "0.5312858", "0.5307616", "0.52907956", "0.52841973", "0.5282637", "0.52781665", "0.5277481", "0.5261348", "0.52504784", "0.525027", "0.52498186", "0.52467275", "0.5243686", "0.5240493", "0.5225457", "0.5224334", "0.5224151", "0.5222565", "0.52194065", "0.5210684", "0.52094054", "0.52000654", "0.51964134", "0.5194829", "0.5192383", "0.5192266", "0.5186752", "0.51853716", "0.51780146", "0.5171733", "0.5167304", "0.51672137", "0.5165779", "0.5165347", "0.5164381", "0.5164002" ]
0.0
-1
Set the generic data from the parameters
function k2sbmModule($id) { $this->id = $id; $this->display = array( 'home' => true, 'archives' => true, 'post' => true, 'search' => true, 'pages' => true, 'page_id' => array('show' => 'show', 'ids' => false), 'error' => true ); $this->output = array('show_title' => true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set()\n {\n $args = func_get_args();\n $num = func_num_args();\n if ($num == 2) {\n self::$data[$args[0]] = $args[1];\n } else {\n if (is_array($args[0])) {\n foreach ($args[0] as $k => $v) {\n self::$data[$k] = $v;\n }\n }\n }\n }", "function set($type,$data){\n\t// PARAM $type : type of data, as above\n\t// $data : data to set\n\n\t\tif (!is_array($this->$type)) { die(\"Not a valid data type\"); }\n\t\t$this->$type = $data;\n\t}", "public function set($data);", "public static function setData($data) {}", "public function setDatas()\n\t{\n\t\t$this->data[\"skeleton\"] = $this->getSkeleton();\n\t\t$this->data[\"css\"] = $this->getCss();\n\t\t$this->data[\"javascript\"] = $this->getJavascript();\n\t\t$this->data[\"module\"] = $this->getModule();\n\t\t$this->data[\"site\"] = $this->getSite();\n\t\t\t\t\t\t\n\t\t$this->_nodeName = $this->getNodeName();\n\t\t$this->_value = $this->getNodeValue();\n\t}", "public function setParameters()\n {\n $params = array();\n $associations = array();\n foreach ($this->datatablesModel->getColumns() as $key => $data) {\n // if a function or a number is used in the data property\n // it should not be considered\n if( !preg_match('/^(([\\d]+)|(function)|(\\s*)|(^$))$/', $data['data']) ) {\n $fields = explode('.', $data['data']);\n $params[$key] = $data['data'];\n $associations[$key] = array('containsCollections' => false);\n\n if (count($fields) > 1) {\n $this->setRelatedEntityColumnInfo($associations[$key], $fields);\n } else {\n $this->setSingleFieldColumnInfo($associations[$key], $fields[0]);\n }\n }\n }\n\n $this->parameters = $params;\n // do not reindex new array, just add them\n $this->associations = $associations + $this->associations;\n }", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function set_data($data)\n {\n }", "public function set_data($data)\n {\n }", "public function setData() \n {\n // Empty, to be overridden \n }", "function set(array $data) {\n\t\tforeach ($data as $key => $value) {\n\t\t\t$this->$key = $value;\n\t\t}\n\t}", "public function setData($data)\r\n {\r\n }", "protected function initializeValues(): void\n {\n foreach ($this->params as $name => $infos) {\n if (!$this->is_sub_object && isset($infos['subobject']) && $infos['subobject']) {\n if (isset($infos['multivalues']) && $infos['multivalues']) {\n $this->values[$name] = [];\n } else {\n $tmp = get_class($this);\n $parts = explode('\\\\', $tmp);\n array_pop($parts);\n $class_name = implode('\\\\', $parts) . '\\\\' . $infos['type'];\n $class_name = str_replace('Entity', 'Datatype', $class_name);\n if (!class_exists($class_name)) {\n $class_name = str_replace(['\\\\EU\\\\', '\\\\AP\\\\', '\\\\EA\\\\'], '\\\\AM\\\\', $class_name);\n }\n $this->values[$name] = new $class_name();\n }\n } else {\n $this->values[$name] = null;\n }\n }\n }", "function setData($data){\n\t\tif(!is_array($data)){\n\t\t\tvar_dump($data);\n\t\t\texit;\n\t\t}\n\t\tforeach($data as $key => $value){\n\t\t\tif(isset(static::$fields[$key]) && static::$fields[$key]['type']=='enum'){\n\t\t\t\tif($value){\n\t\t\t\t\tif(!in_array(strtoupper($value), static::$fields[$key]['values'])){\n\t\t\t\t\t\treturn RetErrorWithMessage('INCORRECT_VALUE', preg_replace('/.+\\\\\\/si', '', get_called_class()).': Wrong field value('.$value.'), field \"'.$key.'\" can be one of: '.print_r(static::$fields[$key]['values'], true));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$value = strtoupper($value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->{$key} = $value;\n\t\t}\n\t\tforeach(static::$fields as $field_name => $option){\n\t\t\tif(!isset($this->{$field_name})){\n\t\t\t\tif($option['default']){\n\t\t\t\t\t$this->{$field_name} = $option['default'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n $this->instance_generated = true;\n\t\treturn null;\n\t}", "public function setData($data) { \n $this->data = $data; \n }", "public function setValues(){\n if($this->getType() == \"var\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"int\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"bool\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"string\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"nil\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"label\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"type\"){\n $this->setValue($this->getArg());\n }else{\n $this->setValue(\"CHYBA\");\n }\n }", "public function set($params) {}", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "function set_data($name, $value)\n {\n }", "public function setValues($data)\n {\n $this->name = $data['name'];\n $this->author_name = $data['author_name'];\n $this->author_surname = $data['author_surname'];\n $this->release_year = $data['release_year'];\n $this->request_date = $data['request_date'];\n $this->reserve_day = $data['reserve_day'];\n $this->return_day = $data['return_day'];\n $this->picture = $data['picture'];\n }", "abstract public function prepareData();", "private function setData($data)\n {\n \t$this->data = $data;\n }", "public function setData($data)\n {\n $this->_data = $data;\n }", "public function setData($data) {\n\t\tif (!is_array($data)) {\n\t\t\t$data = (array)$data;\n\t\t}\n\t\tforeach ($data as $param) {\n\t\t\tif (is_array($param) && isset($param['type']) && isset($param['value']) && count($param) == 2) {\n\t\t\t\t$this->addParam($param['value'], $param['type']);\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$this->addParam($param);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function setData()\n {\n }", "public function setData()\n {\n }", "public function setData()\n {\n }", "public function set_all_data($data)\n\t{\n\t\t$this->_data = $data;\n\t}", "private function _setParams ()\n {\n $endpoint = $this->_endpoint->getData();\n if (count($endpoint) > 0) {\n \n $method = $this->_endpoint->getUrl();\n $methodname = 'setParameter' . ucfirst($method['method']);\n \n $this->_httpclient->{$methodname}('access_token', \n $this->_accesstoken);\n $this->_httpclient->{$methodname}('api_secret', $this->_apisecret);\n \n foreach ($endpoint as $param => $value) {\n $this->_httpclient->{$methodname}($param, $value);\n }\n }\n }", "protected function setPutData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "public function setData(array $data);", "public function setData(array $data);", "public function setData(array $data);", "private function setValues()\n {\n foreach($this->data as $type => $values)\n if(!preg_match('/(library)/i', $type))\n foreach($values as $key => $value)\n $this->{strtolower($type)}[$key] = $value;\n }", "public function __construct($data) {\n $this->setValues($data);\n }", "public function setParameters($parameters){\n\t\tself::$_parameters[get_class($this)] = $parameters;\n\t}", "protected function setGetData()\n\t{\n\t\t$this->request->addParams($this->query->getParams());\n\t}", "abstract protected function prepareVars(array $data);", "public function load_data( $data ) {\r\n foreach ( $data as $key => $value ) {\r\n $this->$key = $value;\r\n }\r\n }", "public function setData($data) \n\t{\n $this->data = $data;\n }", "protected function prepareData()\n {\n parent::prepareData();\n $this->prepareConfigurableProductOptions();\n $this->prepareAttributeSet();\n }", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "private function setData()\n {\n if ($this->config->has('auth.external_concrete')) {\n $data = $this->config->get('auth.external_concrete', '');\n } else {\n // legacy support\n $data = $this->config->get('auth.external_concrete5', '');\n }\n $authUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete/attempt_auth']);\n $attachUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete/attempt_attach']);\n $baseUrl = $this->urlResolver->resolve(['/']);\n $path = $baseUrl->getPath();\n $path->remove('index.php');\n $name = trim((string) array_get($data, 'name', t('External concrete')));\n\n $this->set('data', $data);\n $this->set('authUrl', $authUrl);\n $this->set('attachUrl', $attachUrl);\n $this->set('baseUrl', $baseUrl);\n $this->set('assetBase', $baseUrl->setPath($path));\n $this->set('name', $name);\n $this->set('user', $this->app->make(User::class));\n }", "public function finish_setting_parameters()\n {\n $this->set_variable( 'parameters', $this->parameters );\n }", "function setParameters($parameters);", "abstract function set ($item, $data);", "public function setData(array $data) \n\t{\n\t\t\n\t\t$this->setId((int)$data['nt_id']);\n\t\t$this->setUserId((int)$data['nt_usr_id']);\n\t\t$this->setTitle($data['nt_title']);\n\t\t$this->setDescription($data['nt_description']);\n//\t\t$this->setImage($data['nt_image']);\n\t\t$this->setLocationStreet($data['nt_location_street']);\n\t\t$this->setLocationZip($data['nt_location_zip']);\n\t\t$this->setLocationCity($data['nt_location_city']);\n\t\t$this->setUserName($data['user_name']);\n\t\t$this->setUserPhone($data['nt_user_phone']);\n\t\t$this->setUserEmail($data['nt_user_email']);\n\t\t$this->setPrice((float)$data['nt_price']);\n\t\t$this->setPriceType((int)$data['nt_price_type']);\n\t\t$this->setCreateDate((int)$data['nt_create_date']);\n\t\t$this->setModDate((int)$data['nt_mod_date']);\n\t\t$this->setDeleted((int)$data['nt_deleted']);\n\t\t$this->setHidden((int)$data['nt_hidden']);\n\t\t$this->setCategoryId((int)$data['nt_category_id']);#\n//\t\t$this->setValidity((int)$data['nt_validity']);\n\t\t$this->setUntilDate((int)$data['nt_until_date']);\n\t}", "public function setData($data)\n {\n// -- `idVeiculo` INT(11) NOT NULL,\n// -- `idMotorista` INT(11) NOT NULL,\n// -- `idTiposFretes` INT(11) NOT NULL,\n// -- `Observacoes` VARCHAR(255) NULL DEFAULT NULL,\n// -- `ValorPedagios` DECIMAL(10,2) NOT NULL,\n// -- `Distancia` DECIMAL(10,3) NOT NULL,\n// -- `DataEntrega` DATE NULL DEFAULT NULL,\n// -- `ValorFrete` DECIMAL(10,2) NOT NULL,\n $this->SetIdNotaTransporte($data['IdNotaTransporte']);\n $this->SetIdVeiculo($data['idVeiculo']);\n $this->SetIdMotoriste($data['idMotorista']);\n $this->SetIdTipoFrete($data['idTipoFretes']);\n $this->SetDistancia($data['Distancia']); \n $this->SetValorFrete($data['ValorFrete']);\n $this->SetDataEmissao($data['DataEntrega']);\n }", "public function setData($data) {\n if (empty($data)) {\n return;\n }\n if (is_object($data) || is_array($data)) {\n foreach ($this->_data as $field => $value) {\n if (array_key_exists($field, $data)) {\n $temp_val = $data[$field];\n } else {\n $temp_val = $value;\n }\n $this->__set($field, $temp_val);\n }\n } else {\n throw new Exception('The entity \"' . get_class($this) .\n '\" must be created by an array or object.');\n }\n }", "abstract protected function prepareData( $data );", "public function __construct($data){\r\n $this->data = $data;\r\n }", "function set($data) {\n\tif (! is_object($data)) throw new Exception('Supplied argument is not an object.');\n\t\n\tforeach (get_object_vars($data) as $prop=>$val) {\n\t if (property_exists($this,$prop)) {\n\t\t$this->$prop = $val;\n\t }\n\t}\n\t\n }", "public function setData() {\n $args = func_get_args();\n if (count($args) === 1 && is_array($args[0])) {\n $this->data = $args[0];\n } elseif (count($args) === 2) {\n $this->data[(string) $args[0]] = $args[1];\n } else {\n throw new InvalidArgumentException('Cannot set View data with provided arguments. Usage: `View::setData( $key, $value );` or `View::setData([ key => value, ... ]);`');\n }\n }", "public function set($parameters)\n {}", "private function _set_parameters() {\n\t\t$transient_expiry = ( isset( $this->transient_expiry ) ) ? $this->transient_expiry : ( 3 * HOUR_IN_SECONDS );\n\t\t$posts = ( isset( $this->posts ) ) ? $this->posts : $this->get_posts();\n\t\t$post_type_args = ( isset( $this->_post_type_args ) ) ? $this->_post_type_args : array();\n\t\t$this->taxonomy_name = ( isset( $this->taxonomy_name ) ) ? $this->taxonomy_name : \"{$this->post_type}-categories\";\n\t\t$taxonomy_labels = ( isset( $this->custom_taxonomy_labels ) ) ? $this->custom_taxonomy_labels : array();\n\t\t$taxonomy_args = ( isset( $this->_taxonomy_args ) ) ? $this->_taxonomy_args: array();\n\t\t$custom_post_type_args = ( isset( $this->custom_post_type_args ) ) ? $this->custom_post_type_args : array();\n\t\t$custom_post_type_labels = ( isset( $this->custom_post_type_labels ) ) ? $this->custom_post_type_labels : array();\n\t\t$custom_taxonomy_args = ( isset( $this->custom_taxonomy_args ) ) ? $this->custom_taxonomy_args : array();\n\t\t$custom_post_type_supports = ( isset( $this->custom_post_type_supports ) ) ? $this->custom_post_type_supports : array();\n\t\t$disable_image_column = ( isset( $this->disable_image_column ) ) ? $this->disable_image_column : false;\n\t\t$disable_post_type_categories = ( isset( $this->disable_post_type_categories ) ) ? $this->disable_post_type_categories : false;\n\n\t\t// Set class properties\n\t\t$this->transient_expiry = $transient_expiry;\n\t\t$this->posts = $posts;\n\t\t$this->_post_type_args = $post_type_args;\n\t\t$this->custom_taxonomy_labels = $taxonomy_labels;\n\t\t$this->_taxonomy_args = $taxonomy_args;\n\t\t$this->custom_post_type_args = $custom_post_type_args;\n\t\t$this->custom_post_type_labels = $custom_post_type_labels;\n\t\t$this->disable_post_type_categories = $disable_post_type_categories;\n\t\t$this->custom_taxonomy_args = $custom_taxonomy_args;\n\t\t$this->custom_post_type_supports = $custom_post_type_supports;\n\t\t$this->disable_image_column = $disable_image_column;\n\t\t$this->set_post_type_supports( $this->custom_post_type_supports );\n\t\t$this->set_post_type_args( $this->custom_post_type_args );\n\t\t$this->set_taxonomy_args( $this->custom_taxonomy_args );\n\t}", "protected function _initPostParameters()\n {\n $this->set('_post', new DataHolder($_POST));\n }", "protected function populateParams()\n\t{\n\t\tparent::populateParams();\n\t\t$acl = ZefaniabibleHelper::getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\t\t}\n\t}", "public function set_data($data)\n {\n $this->data = $data;\n }", "protected function populateParams()\n\t{\n\n\t\tparent::populateParams();\n\t\t//$acl = ZefaniabibleHelper::getAcl();\n\t\t$mdl_acl = new ZefaniabibleHelper;\n\t\t$acl = $mdl_acl->getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\n\n\t\t}\n\n\t}", "protected function setParamConfig()\n {\n $this->paramConfig = ArrayManipulation::deepMerge($this->paramConfig, array(\n 'placeholder' => array(\n 'name' => 'Platzhalter Text',\n 'type' => 'textfield'\n ),\n 'rows' => array(\n 'name' => 'Anzahl Zeilen',\n 'type' => 'textfield'\n ),\n 'maxlength' => array(\n 'name' => 'Maximale Anzahl Zeichen (optional)',\n 'type' => 'textfield'\n )\n ));\n }", "private function setValues($data) {\n \n // Should always be supplied\n $this->id = $data->id;\n $this->url = $data->url;\n $this->status = $data->status;\n\n // Optionally supplied\n if(property_exists($data, \"failure\")) {\n $this->failure = new \\Zamzar\\Failure($data->failure);\n }\n }", "public function set_fields($data)\n\t{\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\tif (isset($this->aliases[$key]))\n\t\t\t\t$key = $this->aliases[$key];\n\n\t\t\tif (array_key_exists($key, $this->data))\n\t\t\t\t$this->data[$key] = $value;\n\t\t}\n\t}", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n // All keys are srings in array, merge it with defaults to override\r\r\n $this->e_data = array_merge($this->default_options, $this->e_data);\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "function setData($data)\n {\n $this->data = $data;\n }", "public abstract function setup(array $data = array());", "public function setData($data)\r\n\t{\r\n\t\t$this->data = $data;\r\n\t}", "abstract protected function initDataTypes();", "public function setData( ) {\r\n\t\t\tself::callEvent('response.setData', $this, func_get_args());\r\n\t\t}", "public function setData(array $data = []);", "protected function setParamsFromXml(string $data): void\n {\n $p = xml_parser_create();\n xml_parse_into_struct($p, $data, $values, $index);\n xml_parser_free($p);\n\n $inputParams = [];\n\n foreach ($values as $key => $item) {\n $inputParams[$item['tag']] = $item['value'];\n }\n $this->checkRequiredParams($inputParams);\n\n foreach ($values as $key => $item) {\n $classVar = strtolower($item['tag']);\n $this->$classVar = $item['value'];\n }\n }", "public function setData($data, $key = null);", "private function setData($data){\n\t\n\t\t$this->setIdusuario($data['idusuario']);\n\t\t$this->setDeslogin($data['deslogin']);\n\t\t$this->setDessenha($data['dessenha']);\n\t\t$this->setDtcadastro(new DateTime($data['dtcadastro']));\t\t\n\t}", "function __construct($data){\n\t $this->data=$data;\n }", "public function setData($_data)\n {\n $this->_data = $_data;\n }", "public function set($data, $type)\n {\n switch ($type) {\n case self::HTTP_TYPE_GET:\n $this->get = (array)$data;\n break;\n case self::HTTP_TYPE_POST:\n $this->post = (array)$data;\n break;\n case self::HTTP_TYPE_COOKIE:\n $this->cookie = (array)$data;\n break;\n case self::HTTP_TYPE_REQUEST:\n $this->request = (array)$data;\n break;\n case self::HTTP_TYPE_JSON:\n $this->json = (array)$data;\n break;\n case self::HTTP_TYPE_PARAMS:\n $this->params = (array)$data;\n break;\n default:\n throw new \\Exception('Request type is unknown');\n }\n }", "public function setData(Array $data);", "public function set_raw_data($data)\n {\n }", "public function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function set_data($name, $value) {\n $this->data[$name] = $value;\n }", "public function setData($subject)\n {\n }", "public function setData( $data )\n {\n $this->data = $data;\n }", "public function setParams($params);", "public function setParams($params);", "public function setData($data)\n\t{\n\t\t$this->_data = unserialize($data);\n\t\t$this->_hashFunc = $this->_data['hashFunc'];\n\t}", "public function __construct($param=NULL){\n if(isset($param['batchSize'])) $this->batchSize=$param['batchSize'];\n if(isset($param['ttl'])) $data['ttl']=$param['ttl'];\n if(isset($param['iscount'])) $data['count']=$param['iscount'];\n if(isset($param['bindVars'])) $data['bindVars']=$param['bindVars'];\n if(isset($param['options'])) $data['options']=$param['options'];\n }", "protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }", "public function _setProps() {\n $dataController = get_called_class();\n $dataController::_getMapper();\n $dataController::_getModel();\n }", "public function __construct($data)\n {\n $this->all_data = $data;\n }", "abstract protected function data();", "public function setData($data) {\n $this->data = $data;\n }", "public function settingsData() {\n\n $arraySettings = array (\n 'Generic Param' => $this->_genericParam\n );\n\n return $arraySettings;\n\n }", "public function __construct(string $setType, array $data = [])\n {\n $this->setType = $setType;\n parent::__construct($data);\n }", "public function __construct($data)\n\t{\n\t\t$data = (array)$data;\n\t\tforeach($data as $key => $value)\n\t\t{\n\t\t\t$this->$key = $value;\n\t\t}\n\t}", "protected abstract function setFields();", "public function getDataWithTypeParameters() {}" ]
[ "0.69208395", "0.6522754", "0.6490055", "0.64194703", "0.64090973", "0.63955677", "0.6388523", "0.6388523", "0.6388523", "0.6388523", "0.6388523", "0.63611835", "0.63585615", "0.6287156", "0.62717056", "0.62599534", "0.62244403", "0.62073123", "0.62029725", "0.6200554", "0.6144761", "0.61380965", "0.6133531", "0.6120275", "0.6096325", "0.6085322", "0.6078779", "0.6042423", "0.6023825", "0.6023825", "0.6023825", "0.6015791", "0.60131955", "0.6001788", "0.59947", "0.59947", "0.59947", "0.5982714", "0.5979175", "0.59643316", "0.59627986", "0.59592986", "0.59571445", "0.5953436", "0.59398854", "0.5937443", "0.5937443", "0.5937443", "0.5934549", "0.5927895", "0.59157634", "0.5909024", "0.590707", "0.5900971", "0.5893637", "0.5891427", "0.58866274", "0.5885934", "0.5883418", "0.5882287", "0.588212", "0.5878761", "0.5874916", "0.5869384", "0.58690065", "0.5858444", "0.58531183", "0.5850113", "0.5823094", "0.58188444", "0.58071095", "0.58056086", "0.58044195", "0.5797647", "0.5793628", "0.57886964", "0.57850355", "0.5784512", "0.5780842", "0.57761955", "0.5752149", "0.57461804", "0.5745599", "0.57417053", "0.57297105", "0.57246083", "0.5717266", "0.5715179", "0.5715179", "0.5714188", "0.5708467", "0.57049704", "0.56889105", "0.5677204", "0.5673485", "0.5661736", "0.5657717", "0.56558347", "0.5651911", "0.56501853", "0.56442714" ]
0.0
-1
Create a new component instance.
protected function __construct(string $path, string $style, string $name) { $this->path = $path; $this->style = $style; $this->name = mb_strtolower($name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createComponent($name) {\n\t\trequire_once(\"component/\".$name.\"/\".$name.\".inc\");\n\t\t$c = new $name($name);\n\t\t$this->components[$name] = &$c;\n\t\t$this->{$name} = &$c;\n\t}", "function componentBuilder() { $this->__construct(); }", "public function make()\n {\n if (self::$newComponentCache === null) {\n self::$newComponentCache = new \\IvoPetkov\\BearFramework\\Addons\\HTMLServerComponents\\Internal\\Component();\n }\n return clone (self::$newComponentCache);\n }", "public function createComponent() {\n $component = Component::createComponent();\n return \\Response::json($component);\n }", "public function actionCreate()\n {\n $model = new Component;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Component'])) {\n $model->attributes = $_POST['Component'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->partnumberid));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "private static function newComponent($component){\r\n\t\t\r\n\t $return = new script_component(self::$xml_file);\r\n $return->setFilename($component->jsfile);\r\n $return->setTitle($component->title);\r\n\t\t\t\t$return->setIntjs($component->intjs);\r\n $return->setDashboard($component['dashboard']);\r\n $return->setId($component['id']);\r\n $return->setIntmarkup($component->intmarkup);\r\n $return->setName($component->name);\r\n \r\n $ary = array();\r\n \r\n if (count($return->dependenicies) > 0) {\r\n foreach ($return->dependenicies->dependent as $dependent) {\r\n array_push($ary, array('filename'=>$dependent->filename, 'name'=>$dependent->name));\r\n }\r\n $return->dependicies($ary);\r\n }\r\n\t\treturn $return;\r\n\t\t\r\n\t}", "public function makeComponent($class);", "public function getComponent() {\r\n\t\t$parameters = func_get_args();\r\n\t\tif (count($paramters) < 1) {\r\n\t\t\tthrow new tx_auxo_exception('component parameter is missing');\r\n\t\t}\r\n\t\t\r\n\t\t$path = sprintf('%s/class.tx_%s.php', $this->interfaceLibraryPath, $this->interfaceExtension, $parameters[0]);\r\n\t\tif (!is_readable($path)) {\r\n\t\t\tthrow new tx_auxo_presentationException(sprintf('presentation component %s not supported', $parameters[0]));\r\n\t\t}\r\n\t\t\r\n\t\t$className = 'tx_' . $this->interfaceExtension . '_' . $parameters[0];\r\n\t\tunset($parameters[0]);\r\n\t\t\r\n\t\trequire_once($path);\r\n\t\t\r\n\t\tif (!class_exists($className)) {\r\n\t\t\tthrow new tx_auxo_presentationException(sprintf('presentation class %s is missing', $className));\r\n\t\t}\r\n\t\t\r\n\t\t$object = new $className();\r\n\t\t\r\n\t\tif (method_exists($object, '__construct')) {\r\n\t\t\treturn call_user_func_array($object, '__construct', $parameters);\r\n\t\t}\r\n\t\t\r\n\t\treturn $object;\r\n\t}", "public function create()\n {\n return view('backend.components.create');\n }", "static public function createComponent($name, array $children = array()) {\n\n $name = strtoupper($name);\n $class = 'Sabre\\\\VObject\\\\Component';\n\n if (isset(self::$componentMap[$name])) {\n $class.='\\\\' . self::$componentMap[$name];\n }\n return new $class($name, $children);\n\n }", "final public static function getInstance($component_type_id, $data = array()) {\n $class_name = 'Component' . self::$valid_component_types[$component_type_id];\n return new $class_name($data);\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function create() {\n\t \n }", "protected function getDummyComponent()\n\t{\n\t\treturn new DummyComponent;\n\t}", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function Create()\n {\n parent::Create();\n\n // 1. Verfügbarer HarmonySplitter wird verbunden oder neu erzeugt, wenn nicht vorhanden.\n $this->ConnectParent(\"{03B162DB-7A3A-41AE-A676-2444F16EBEDF}\");\n\t\t\n\t\t$this->RegisterPropertyString(\"Name\", \"\");\n\t\t$this->RegisterPropertyInteger(\"DeviceID\", 0);\n\t\t$this->RegisterPropertyBoolean(\"BluetoothDevice\", false);\t\t\n }", "public function create(){}", "public function createComponent($name) {\n if (preg_match('([a-zA-Z0-9]+Form)', $name)) {\n \n // detect forms \n $classname = \"FrontModule\\\\Components\\\\Forms\\\\\" . ucfirst($name);\n if (class_exists($classname)) {\n $form = new $classname($this, $name);\n //$form->setTranslator($this->context->translator);\n return $form;\n }\n } else if (preg_match('([a-zA-Z0-9]+DataGrid)', $name)) {\n // detect datagrids\n $classname = \"FrontModule\\\\Components\\\\DataGrids\\\\\" . ucfirst($name);\n if (class_exists($classname)) {\n $datagrid = new $classname($this, $name);\n //$datagrid->setTranslator($this->context->translator);\n return $datagrid;\n }\n } else if (preg_match('([a-zA-Z0-9]+ConfirmDialog)', $name)) {\n // detect confrim dialogs\n $classname = \"FrontModule\\\\Components\\\\Dialogs\\\\\" . ucfirst($name);\n if (class_exists($classname)) {\n $dialog = new $classname($this, $name);\n //$dialog->setTranslator($this->context->translator);\n return $dialog;\n }\n } else {\n return parent::createComponent($name);\n }\n }", "protected function createComponent($name)\n {\n $plugins = $this->context->plugins->getPlugins();\n if (in_array($name, $plugins)) {\n return new $name();\n }\n\n return parent::createComponent($name);\n }", "public function create() {\r\n }", "function create_component($type, $application = null)\r\n {\r\n if ($application == null)\r\n {\r\n $application = $this;\r\n }\r\n\r\n $manager_class = get_class($application);\r\n $application_component_path = $application->get_application_component_path();\r\n\r\n $file = $application_component_path . Utilities :: camelcase_to_underscores($type) . '.class.php';\r\n\r\n if (! file_exists($file) || ! is_file($file))\r\n {\r\n $message = array();\r\n $message[] = Translation :: get('ComponentFailedToLoad') . '<br /><br />';\r\n $message[] = '<b>' . Translation :: get('File') . ':</b><br />';\r\n $message[] = $file . '<br /><br />';\r\n $message[] = '<b>' . Translation :: get('Stacktrace') . ':</b>';\r\n $message[] = '<ul>';\r\n $message[] = '<li>' . Translation :: get($manager_class) . '</li>';\r\n $message[] = '<li>' . Translation :: get($type) . '</li>';\r\n $message[] = '</ul>';\r\n\r\n $application_name = Application :: application_to_class($this->get_application_name());\r\n\r\n $trail = BreadcrumbTrail :: get_instance();\r\n $trail->add(new Breadcrumb('#', Translation :: get('TypeName', null, self :: determine_namespace($this->get_application_name()))));\r\n\r\n Display :: header($trail);\r\n Display :: error_message(implode(\"\\n\", $message));\r\n Display :: footer();\r\n exit();\r\n }\r\n\r\n $class = $manager_class . $type . 'Component';\r\n require_once $file;\r\n\r\n if (is_subclass_of($application, 'common\\libraries\\SubManager'))\r\n {\r\n $component = new $class($application->get_parent());\r\n }\r\n else\r\n {\r\n $component = new $class($this->get_user());\r\n $component->set_parameters($this->get_parameters());\r\n }\r\n return $component;\r\n }", "public function create() {}", "public function createComponent()\n {\n return $this->createEmotionComponent(array(\n 'name' => 'Bilder',\n 'xtype' => 'emotion-media-widget',\n 'template' => 'image_widget',\n 'cls' => 'emotion-image-widget',\n 'description' => 'Einfaches Einkaufswelten-Element für Bilder' \n ));\n }", "function _componentInitialize($instance) {\n $this->CI->ciwy->component_config[$instance]['containerId'] = $instance.'Container'; // Set the container_id value for the new instance\n $this->CI->ciwy->component_config[$instance]['outerContainer'] = $instance.'OuterContainer'; // Set the outer container_id value for the new instance\n $this->CI->ciwy->component_config[$instance]['inputAttributes'] = array(\n 'name' => $instance.'_input',\n 'id' => $instance.'_input',\n 'value' => '',\n 'maxlength' => '',\n 'size' => '',\n 'style' => '',\n );\n $this->CI->ciwy->component_config[$instance]['Config'] = array();\n log_message('debug', '[' . $this->CI->ciwy->library_name . '] New ' . $this->component_name . ' instance is ' . $instance . '.');\n return $instance;\n }", "public function create()\n {}", "public function create() {\n \n }", "public function create() {\n \n }", "public function create()\n {\n //TODO\n }", "public static abstract function createInstance();", "public function newInstance();", "public function newInstance();", "public function create(){\r\n\treturn new $this->class();\r\n }", "public function create()\n\t {\n\t //\n\t }", "public function create() {\n\n\t\t\n\t}", "public static function createByComponents($components) {}", "public function create() {\n\n\t}", "public function create() {\n }", "public function create() {\n }", "public function create()\r\n\t{\r\n\t\t//\r\n\t}", "public function create() {\n\t\t\t//\n\t\t}", "function component_create( $args, $assoc_args ) {\n\t\n\t/**\n\t * Exit if we can't edit the filesystem\n\t */\n\tif ( ! WP_Filesystem() ) {\n\t\tWP_CLI::error( 'Unable to access filesystem' );\n\t\texit;\n\t}\n\t\n\t/**\n\t * Request component details\n\t */\n\t$far = array(); // array os strings to find and replace\n\t$exclude = array(); // files to exclude from scaffold\n\n\t$title = Util\\build_far( $far, array(\n\t\t'question' => 'Title [guess]:',\n\t\t'guess' => 'My Component',\n\t\t'find' => 'template-title',\n\t\t'default' => $assoc_args[ 'component_title' ] ?? '',\n\t) );\n\t$slug = Util\\build_far( $far, array(\n\t\t'question' => 'Slug [guess]:',\n\t\t'guess' => sanitize_title( $title ),\n\t\t'find' => 'template-slug',\n\t\t'default' => $assoc_args[ 'component_slug' ] ?? '',\n\t) );\n\t$dir = Util\\build_far( $far, array(\n\t\t'question' => 'Directory [guess]:',\n\t\t'guess' => $slug,\n\t\t'find' => '_template-component',\n\t\t'default' => $assoc_args[ 'component_dir' ] ?? '',\n\t) );\n\tUtil\\exclude( $exclude, array(\n\t\t'question' => 'Has front-end JavaScript? [y/N]',\n\t\t'guess' => 'n',\n\t\t'filename' => 'template-slug-script.js',\n\t\t'default' => $assoc_args[ 'has_js' ] ?? '',\n\t) );\n\t$has_template_part = Util\\exclude( $exclude, array(\n\t\t'question' => 'Has PHP template part? [y/N]',\n\t\t'guess' => 'n',\n\t\t'filename' => 'template-slug-markup.php',\n\t\t'default' => $assoc_args[ 'has_template_part' ] ?? '',\n\t) );\n\tUtil\\exclude( $exclude, array(\n\t\t'question' => 'Has admin CSS? [y/N]',\n\t\t'guess' => 'n',\n\t\t'filename' => 'template-slug-editor.css',\n\t\t'default' => $assoc_args[ 'has_admin_css' ] ?? '',\n\t) );\n\n\t/**\n\t * Identify paths/dirs (note all paths end with a trailing /)\n\t */\n\t$template_path = get_template_directory();\n\t$library_path = $template_path . '/assets/component-library/';\n\t$cli_path = $template_path . '/includes/cli/templates/';\n\t$template_dir = 'component';\n\t$component_path = $library_path . $dir . '/';\n\t\n\t/**\n\t * Create plugin directory\n\t */\n\tglobal $wp_filesystem;\n\t$wp_filesystem->mkdir( $component_path );\n\n\t// duplicate template's files (minus any we should exclude)\n\tcopy_dir( $cli_path . $template_dir, $component_path, $exclude );\n\n\t/**\n\t * Find and replace strings\n\t */\n\tUtil\\far( $component_path, $far );\n\n\t// loop through the component's directory and replace file prefixes\n\tUtil\\prefix( $component_path, 'template-slug', $slug );\n\n\t// report\n\tWP_CLI::success( 'Component created' );\n\tWP_CLI::line( WP_CLI::colorize( \"\\n%6%k What's next? %n\\n\" ) );\n\tWP_CLI::line( WP_CLI::colorize( \"%C ‣ Restart Parcel and refresh your browser to watch these new files\") );\n\tif ( $has_template_part ) {\n\t\tWP_CLI::line( WP_CLI::colorize( \"%C ‣ Include your template part somewhere:%n get_template_part( 'assets/component-library/$dir/$slug-markup' );\") );\n\t}\n\tWP_CLI::line( WP_CLI::colorize( \"%C ‣ Edit your new $title component:%n $component_path\") );\n\tWP_CLI::line( \"\\n\" );\n\n}", "public function create()\r\n {\r\n }", "public function create()\r\n {\r\n }", "public function new()\n\t{\n\t\t//\n\t}", "public function new()\n\t{\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function newInstance(): object;", "protected function create() {\n\t}", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function getComponent()\n {\n }", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function create()\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function create()\n\t{\n\n\n\t\t//\n\t}", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "protected function createVueComponent()\n {\n $this->fileGenerateHelper('vue','vue');\n }", "public function create() {\n //not implemented\n }", "public function create()\n {\n }", "public function create()\n {\n }", "public function create()\r\n {\r\n \r\n }", "public function createComponents() //:void\n {\n $viewFiles = glob($this->viewPath . '*.blade.php');\n\n if (is_array($viewFiles) && !empty($viewFiles)) {\n foreach ($viewFiles as $view) {\n $this->components[$this->getKey($view)] = (object) [\n 'key' => $this->getKey($view),\n 'html' => $this->renderView(\n $view,\n ['lang' => (object) $this->lang]\n )\n ];\n }\n }\n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }", "public function create()\n {\n \n }" ]
[ "0.7047143", "0.6538766", "0.64724386", "0.6461015", "0.64434475", "0.6316547", "0.6294157", "0.62726563", "0.61914504", "0.61295044", "0.6091929", "0.6052415", "0.6052415", "0.6052415", "0.6048259", "0.60458875", "0.6039361", "0.60253227", "0.59891963", "0.5977575", "0.59761804", "0.5937034", "0.59319186", "0.5914739", "0.59113675", "0.59091324", "0.59085774", "0.58980423", "0.58980423", "0.5889725", "0.5887419", "0.5886552", "0.5886552", "0.5885161", "0.58828413", "0.5882562", "0.5882133", "0.58630955", "0.5833405", "0.5833405", "0.58175606", "0.5816521", "0.5807532", "0.58024806", "0.58024806", "0.5792971", "0.5792971", "0.5789231", "0.5789231", "0.5789231", "0.5789231", "0.5789231", "0.5789231", "0.5789231", "0.5789231", "0.5789231", "0.5789231", "0.5789231", "0.5789231", "0.57747805", "0.57747805", "0.57747805", "0.5760408", "0.5753019", "0.5751094", "0.5751094", "0.5751094", "0.5751094", "0.5751094", "0.5751094", "0.5751094", "0.5751094", "0.5751094", "0.5751094", "0.5751094", "0.5749863", "0.57257015", "0.57257015", "0.5723383", "0.5723315", "0.57105404", "0.5705452", "0.5704199", "0.56958354", "0.56958354", "0.5695512", "0.56950766", "0.5688687", "0.5688687", "0.5688687", "0.5688687", "0.5688687", "0.5688687", "0.5688687", "0.5688687", "0.5688687", "0.5688687", "0.5688687", "0.5688687", "0.5688687", "0.5688687" ]
0.0
-1
Get the view / contents that represent the component.
final public function render() : View { $svg = $this->getSvg($this->path, $this->style, $this->name); $inlineSvgClasses = $this->getInlineSvgClasses($this->name, $svg['width'], $svg['height']); return view('fontawesome-blade::components.fa-icon', [ // 'name' => $this->name, 'viewBox' => $svg['viewBox'], 'inlineSvgClasses' => $inlineSvgClasses, 'style' => $svg['style'], 'paths' => $svg['paths'], ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getViewComponent();", "public function getView() {\n\t\treturn $this -> st_view;\n\t}", "public function getView() {\n\t\treturn $this->view;\n\t}", "public function getView() {\n\t\treturn $this->view;\n\t}", "public function getView()\r\n {\r\n return $this->_controller->getView();\r\n }", "public function getView() {\n return $this->setView();\n }", "protected function getView()\n {\n return $this->view;\n }", "public function getView()\n\t{\n\t\treturn $this->view;\n\t}", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\r\n {\r\n return $this->view;\r\n }", "public function getView()\n\t{\n\t\treturn $this->client->getView();\n\t}", "public function getView() {\r\n return $this->_view;\r\n }", "public function getView()\n {\n return $this->getService('view');\n }", "public function getView()\n {\n return $this->_view;\n }", "public function getView()\n {\n return $this->_view;\n }", "public function getView()\n {\n return $this->_view;\n }", "public function getView()\n\t{\n\t\treturn $this->_view;\n\t}", "public function getView(){\n\t\treturn $this->view;\n\t}", "protected function getView()\n {\n $this->getBootstrap()->bootstrap('view');\n return $this->getBootstrap()->getResource('view');\n }", "function getView() {\r\n return $this->view;\r\n }", "function getView() {\n\t\treturn $this->View;\n\t}", "public function getView() {\n \t\n \t// Return the current view\n \treturn $this->sView;\n }", "public function getView()\n\t{\n\t\tif( !isset( $this->view ) ) {\n\t\t\tthrow new \\Aimeos\\Client\\Html\\Exception( sprintf( 'No view available' ) );\n\t\t}\n\n\t\treturn $this->view;\n\t}", "private function getView()\n {\n if ($this->view) {\n return $this->view;\n }\n\n $this->view = $this->services->get(View::class);\n return $this->view;\n }", "public function getView()\n {\n $view = App::$locator->view;\n if ($this->layout) {\n $view->setLayout($this->layout);\n }\n \n return $view;\n }", "public function getView()\r\n {\r\n return parent::getView();\r\n }", "public function getContent()\r\n {\r\n return $this->template;\r\n }", "public function getView() {}", "public function getView() {}", "public function getView()\n {\n if ($this->_view === null) {\n $this->_view = Yii::$app->getView();\n }\n\n return $this->_view;\n }", "static public function getView() {\n\t\treturn self::$defaultInstance;\n\t}", "public function getView()\n\t{\n\t\tif(NULL === $this->_view) {\n\t\t\t$this->_view = agoractu_view::getInstance();\n\t\t}\n\t\treturn $this->_view;\n\t}", "public function view()\n {\n return $this->view;\n }", "public function view()\n {\n return $this->view;\n }", "public function getView()\n {\n if (method_exists($this->module, 'getView')) {\n return $this->module->getView();\n }\n\n return parent::getView();\n }", "public function getContent(){\n return $this->getPage();\n }", "public function getView();", "public function render(): mixed\n {\n return $this->view;\n }", "public function getView()\n {\n if (!$this->view) {\n $this->view = Kerisy::$app->get('view');\n $this->view->setDirectory($this->getViewPath());\n }\n return $this->view;\n }", "public function content(){\n\t\treturn mvc_service_Front::getInstance()->getCurrentActionHtml();\n\t}", "public function getContent()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('content');\n }", "public function Content()\n {\n return new View('dashboard1/Card1.tpl', [\n 'browsers' => $this->model->getBrowserVisits()\n ]);\n }", "public function getView(){ }", "public function viewTest()\n\t{\n\t\treturn $this->viewComponent;\n\t}", "public function get_data() {\n return $this->_view;\n }", "public function getView()\n {\n }", "protected function view()\n {\n return $this->app['view'];\n }", "protected function getRenderedContent()\n {\n try\n {\n return $this->getServiceLocator()\n ->get( 'RenderedContent' );\n }\n catch ( ServiceNotFoundException $ex )\n {\n return null;\n }\n }", "public function getContent() {\r\n\t\treturn PzkParser::parseLayout($this->layout, $this, true);\r\n\t}", "private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}", "public function getView(): ViewInterface\n {\n return $this->view;\n }", "protected function getView(){\n if(!$this->_view){\n $this->_view=new JView();\n }\n return $this->_view;\n }", "public function getContent()\n {\n return $this->objOutput->getObjectRender()->overrideContent($this->output);\n }", "public function getContent()\n {\n return $this->objOutput->getObjectRender()->overrideContent($this->output);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "public function _getView ()\n {\n if (null === $this->_view) {\n $this->_view = Zend_Layout::startMvc()->getView();\n }\n return $this->_view;\n }", "public function render()\n {\n return $this->content;\n }", "public function getView()\n {\n if (!$this->view) {\n $viewClass = $this->viewClass;\n $this->view = new $viewClass();\n\n $this->initializeViewAdditions();\n }\n\n return $this->view;\n }", "public function getView()\n\t{\n\t\treturn View::make($this->viewName, [\n\t\t\t'items' => $this->items,\n\t\t]);\n\t}", "public function getView()\n {\n return $this->cntView;\n }", "public function get()\n {\n return $this->contents;\n }", "public function render()\n {\n return view('components.testimony-component');\n }", "public function getComponent()\n\t{\n\t\treturn $this->component;\n\t}", "public function render()\n {\n return view('dwbtui::components.html');\n }", "public function component()\n {\n return $this->component;\n }", "public function getContent() {\n\t\treturn $this->current_content;\n\t}", "protected static function getView()\n {\n return null;\n }", "private function view()\n {\n if (isset(static::$view)) {\n return static::$view;\n }\n\n $classNamespace = $this->getModuleName();\n $className = $this->getComponentName();\n\n return \"{$classNamespace}::blocks.{$className}\";\n }", "final public function render() {\n\t\treturn $this->_view->getBaseView()->element($this->_name, $this->_data, $this->_options);\n\t}", "public function getContent () {\r\n\t\treturn $this->content;\r\n\t}", "public function getContent()\n\t{\n\t\treturn $this->content_;\n\t}", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function getContent()\n {\n return file_get_contents($this->fullPath);\n }", "protected function getContent() {\n return $this->content;\n }", "public function getContent()\r\n {\r\n return $this->content;\r\n }", "protected function renderContent()\n\t{\n\n\t\treturn $this->view->render($this->formView, [\n\t\t\t'model'=>$this->model,\n\t\t\t'mode'=>$this->mode,\n\t\t]);\n\t}", "public function getContent() {\r\n\t\treturn $this->content;\r\n\t}", "public function getContent() {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }" ]
[ "0.7674351", "0.7261792", "0.7230966", "0.7230966", "0.7227455", "0.71946317", "0.7192078", "0.7184927", "0.7179126", "0.7179126", "0.7179126", "0.7179126", "0.7179126", "0.7179126", "0.7179126", "0.7179126", "0.71563184", "0.7150517", "0.71496874", "0.7144422", "0.71397746", "0.71397746", "0.71397746", "0.7135555", "0.71152997", "0.709233", "0.7060214", "0.70394", "0.69523114", "0.69202197", "0.68955445", "0.68846184", "0.6846105", "0.6827363", "0.67829514", "0.67829514", "0.6774142", "0.6759799", "0.6756494", "0.67165095", "0.67165095", "0.66914886", "0.66728306", "0.6656353", "0.6589887", "0.6583565", "0.6547004", "0.6531208", "0.65303016", "0.6528285", "0.65185094", "0.65063244", "0.64892036", "0.648198", "0.6476678", "0.6475063", "0.6474408", "0.6473613", "0.6467432", "0.64565337", "0.64565337", "0.64451563", "0.64451563", "0.64451563", "0.6437872", "0.6423443", "0.6421754", "0.6399635", "0.6391568", "0.63690275", "0.6347536", "0.6329621", "0.63280153", "0.6321366", "0.6311165", "0.6305704", "0.6294635", "0.6292889", "0.6292652", "0.62844574", "0.6283382", "0.6283382", "0.6283382", "0.6278766", "0.6275", "0.62678224", "0.62666506", "0.626562", "0.62510395", "0.6250508", "0.6250508", "0.6250508", "0.6250508", "0.6250508", "0.6250508", "0.6250508", "0.6250508", "0.6250508", "0.6250508", "0.6250508", "0.6250508" ]
0.0
-1
Get the svg contents.
private function getSvg(string $path, string $style, string $name) : array { $path = $this->getSvgPath($path, $style, $name); $contents = file_get_contents($path); $svg = $this->parseSvg($contents); if (! $svg) { throw new \RuntimeException(sprintf( 'Invalid icon "%1$s", failed to parse svg.', $name, )); } return $svg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSvg() {\n\t\twfDebugLog( \"Pathway\", \"getSvg() called\\n\" );\n\n\t\tif ( isset( $this->svg ) ) {\n\t\t\twfDebugLog( \"Pathway\", \"Returning svg from memory\\n\" );\n\t\t\treturn $this->svg;\n\t\t}\n\n\t\t$file = $this->getFileLocation( FILETYPE_IMG );\n\t\tif ( $file && file_exists( $file ) ) {\n\t\t\twfDebugLog( \"Pathway\", \"Returning svg from cache $file\\n\" );\n\t\t\treturn file_get_contents( $file );\n\t\t}\n\n\t\twfDebugLog( \"Pathway\", \"need to get pvjson in order to get svg\\n\" );\n\t\t$pvjson = $this->getPvjson();\n\t\twfDebugLog( \"Pathway\", \"got pvjson in process of getting svg\\n\" );\n\t\t$svg = $this->getConverter()->getpvjson2svg( $pvjson, [ \"static\" => false ] );\n\t\twfDebugLog( \"Pathway\", \"got svg\\n\" );\n\t\t$this->svg = $svg;\n\t\treturn $svg;\n\t}", "function get_svg($key) {\n\t$content = 'none';\n\t$file = get_stylesheet_directory().'/library/assets/svg/'.$key.'.svg';\n\tif(file_exists($file)) {\n\t\t$content = file_get_contents($file);\n\t}\n\treturn $content;\n}", "function getEmbedSVG() {return $this->_embedsvg;}", "public function raw()\n {\n return $this->_svg->bufferObject();\n }", "private static function get_svg( $location, $atts = [] ) {\n if ( ! $location || ! file_exists( $location ) ) {\n return;\n }\n $atts = static::handle_element_atts( $atts );\n return str_replace( '<svg ',\n '<svg ' . Utils::array_to_atts_str( $atts ),\n file_get_contents( $location )\n );\n }", "public function getSvgRoot()\n {\n return new \\View\\Svg\\Svg($this->firstChild);\n }", "public function GetSVGHeader() {\r\n\r\n $html = <<<EOD\r\n <svg \r\n xmlns=\"http://www.w3.org/2000/svg\" \r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\" \r\n x=\"0px\" y=\"0px\" \r\n version=\"1.1\"\r\n width=\"250px\" \r\n height=\"235px\" \r\n viewBox=\"0 0 250 235\" \r\n enable-background=\"new 0 0 250 235\" \r\n xml:space=\"preserve\">\r\nEOD;\r\n return $html;\r\n }", "public function display_svg() {\n\t\t/**\n\t\t * The svg's files URLs\n\t\t *\n\t\t * @param array $font_urls the default svg file url\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t */\n\t\t$files = $this->get_all_svg_files();\n\t\tif ( empty( $files ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( ! is_file( $file['file'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$svg = file_get_contents( $file['file'] );\n\n\t\t\tif ( true === strpos( $svg, 'style=\"' ) ) {\n\t\t\t\t$svg = str_replace( 'style=\"', 'style=\"display:none; ', $svg );\n\t\t\t} else {\n\t\t\t\t$svg = str_replace( '<svg ', '<svg style=\"display:none;\" ', $svg );\n\t\t\t}\n\n\t\t\techo $svg;\n\t\t}\n\t}", "public function downloadSVG_Data()\n {\n $canvas = new Canvas();\n $code = Input::get('code');\n $sanitizedSVG = CanvasController::sanitise($code);\n if($sanitizedSVG != false){\n $canvas->code = $code;\n return $this->downloadSVG($canvas);\n }\n abort(404, 'Error during export');\n }", "public function get_medias_svg() {\n\t\t$args = array(\n\t\t\t'post_type' => 'attachment',\n\t\t\t'posts_per_page' => '-1',\n\t\t\t'post_status' => 'inherit',\n\t\t\t'post_mime_type' => 'image/svg+xml',\n\t\t);\n\n\t\t/**\n\t\t * Filter WP Query get attachments args\n\t\t *\n\t\t * @param array $args\n\t\t *\n\t\t * @since 2.0.0\n\t\t *\n\t\t */\n\t\t$args = apply_filters( 'acf_svg_icon_wp_medias_svg_args', $args );\n\n\t\t$attachments = new WP_Query( $args );\n\t\tif ( empty( $attachments->posts ) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$svg = array();\n\t\tforeach ( $attachments->posts as $attachment ) {\n\t\t\t$svg[] = [\n\t\t\t\t'type' => 'media',\n\t\t\t\t'id' => $attachment->ID,\n\t\t\t\t'file' => get_attached_file( $attachment->ID ),\n\t\t\t\t'file_url' => wp_get_attachment_url( $attachment->ID ),\n\t\t\t];\n\t\t}\n\n\t\treturn $svg;\n\t}", "public function testGetSvg()\n {\n $doc = $this->createDomDocument(\n '<content type=\"image/svg+xml\">' .\n '<svg xmlns=\"http://www.w3.org/2000/svg\"><circle r=\"20\"/></svg>' .\n '</content>'\n );\n\n $content = new Content($this->createFakeNode(), $doc->documentElement->firstChild);\n static::assertEquals('image/svg+xml', $content->getType());\n static::assertEquals(\n '<svg xmlns=\"http://www.w3.org/2000/svg\"><circle r=\"20\"/></svg>',\n (string) $content\n );\n }", "protected function parseSizeForSvg()\n {\n $this->stream->resetPointer();\n\n // Keep reading bytes until we find the complete <svg> start tag.\n $inside = false;\n $markup = '';\n while ( true ) {\n $byte = $this->stream->read(1);\n\n // Open a tag if not in a tag and the byte is '<'.\n if ( ! $inside && '<' === $byte ) {\n $inside = true;\n $markup .= $byte;\n }\n // Close the current tag if the tag is open, the byte is '>', and the last characters weren't a comment token.\n elseif ( $inside && '>' === $byte && '--' !== substr( $markup, -2 ) ) {\n\n $inside = false;\n $markup .= $byte;\n\n // Break the loop if this tag started with '<svg', as we have now found the SVG start tag.\n if ( '<svg' === strtolower( substr( $markup, 0, 4 ) ) ) {\n break;\n }\n\n // Clear out the markup since we consumed the end of the tag/comment.\n $markup = '';\n }\n // Append the bte to the current tag if the tag is open.\n elseif ( $inside ) {\n $markup .= $byte;\n }\n }\n\n $width = null;\n $height = null;\n if ( preg_match( '/\\swidth=([\\'\"])(\\d+(\\.\\d+)?)(px)?\\1/', $markup, $matches ) ) {\n $width = floatval( $matches[2] );\n }\n if ( preg_match( '/\\sheight=([\\'\"])(\\d+(\\.\\d+)?)(px)?\\1/', $markup, $matches ) ) {\n $height = floatval( $matches[2] );\n }\n if ( $width && $height ) {\n return [ $width, $height ];\n }\n if ( preg_match( '/\\sviewBox=([\\'\"])[^\\1]*(?:,|\\s)+(?P<width>\\d+(?:\\.\\d+)?)(?:px)?(?:,|\\s)+(?P<height>\\d+(?:\\.\\d+)?)(?:px)?\\s*\\1/', $markup, $matches ) ) {\n return [\n floatval( $matches['width'] ),\n floatval( $matches['height'] )\n ];\n }\n return null;\n }", "public function svg() {\n\t\t// Calcul des coordonnées des points.\n\t\t$this->computePoints();\n\t\t// Récupération des points.\n\t\t$A = $this->A;\n\t\t$B = $this->B;\n\t\t$C = $this->C;\n\t\t$D = $this->D;\n\t\t$H = $this->H;\n\t\t$E = $this->E;\n\t\t$G = $this->G;\n\t\t$F = $this->F;\n\t\t$I = $this->I;\n\t\t$J = $this->J;\n\t\t$K = $this->K;\n\t\t$J1 = $this->J1;\n\t\t$J2 = $this->J2;\n\t\t// Dessin au format SVG.\n\t\t$couleurV = $this->colorV;\n\t\t$couleurY = $this->colorY;\n\t\t$couleurGauche = $this->colorLeft;\n\t\t$couleurDroite = $this->colorRight;\n\t\t$svg = '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">';\n\t\t$svg .= '<svg width=\"'.$this->xmax.'\" height=\"'.$this->ymax.'\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">';\n\t\t$svg .= '<title>logo'.($this->name != \"\" ? '-'.$this->name : '').'</title>';\n\t\t// Intérieur gauche.\n\t\t$svg .= '<polygon points=\"'.$E.' '.$F.' '.$K.'\" style=\"fill:'.$couleurGauche.'; stroke:'.$couleurGauche.'; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t// Intérieur droit.\n\t\t$svg .= '<polygon points=\"'.$G.' '.$H.' '.$I.'\" style=\"fill:'.$couleurDroite.'; stroke:'.$couleurDroite.'; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t// Y.\n\t\t$svg .= '<polygon points=\"'.$A.' '.$B.' '.$C.' '.$H.' '.$G.' '.$J1.' '.$J2.' '.$F.' '.$E.'\" style=\"fill:'.$couleurY.'; stroke:black; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t// V.\n\t\t$svg .= '<polygon points=\"'.$A.' '.$E.' '.$J.' '.$H.' '.$C.' '.$D.'\" style=\"fill:'.$couleurV.'; stroke:black; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t$svg .= '</svg>';\n\t\treturn $svg;\n\t}", "public function get_menu_icon() {\n\t\tob_start();\n\t\t?>\n\t\t<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 292 337.2\" style=\"enable-background:new 0 0 292 337.2;\" xml:space=\"preserve\">\n\t\t\t<style type=\"text/css\">\n\t\t\t\t.st0 {\n\t\t\t\t\tfill: #FFFFFF;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<g id=\"Beehive\">\n\t\t\t\t<polygon class=\"st0\" points=\"125.4,153.4 177.1,201.3 183,195 145,121.7 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"81,112.3 106.5,135.9 147,70.2 201.6,175.6 290.2,83.2 146,0 0,84.3 0,204.1 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"292,170.4 292,116.8 213.9,199.2 224.6,220.1 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"215.8,258.2 195.3,218.8 178.2,236.9 111.8,175.4 47.1,280 146,337.2 292,252.9 292,201.5 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"93,158 82.8,148.7 0,242.2 0,252.9 25.5,267.6 \t\"/>\n\t\t\t</g>\n\t\t</svg>\n\t\t<?php\n\t\t$svg = ob_get_clean();\n\n\t\treturn 'data:image/svg+xml;base64,' . base64_encode( $svg );\n\t}", "public static function get_svg(string $svg_name, array $opts = []): string\n\t{\n\t\t$no_use = $opts['no_use'] ?? false;\n\n\t\t// return the file contents directly if this SVG won't be\n\t\t// setup as a \"use\" reference\n\t\treturn $no_use ?\n\t\t\tself::direct_output($svg_name, $opts) :\n\t\t\tself::create_use_reference($svg_name, $opts);\n\t}", "function inline_svg($src)\n{\n return Stringy::collapseWhitespace(\n File::get(statamic_path(\"resources/dist/svg/{$src}.svg\"))\n );\n}", "public function parse_svg() {\n\t\t$files = $this->get_all_svg_files();\n\t\tif ( empty( $files ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Get the allowed tags to parse icon's ids\n\t\t *\n\t\t * @param string $allowed_tags : Passed directly to strip_tags\n\t\t *\n\t\t * @return string\n\t\t * @since 2.0.1\n\t\t *\n\t\t * @author david-treblig\n\t\t */\n\t\t$allowed_tags = apply_filters( 'acf_svg_icon_svg_parse_tags', '<symbol><g>' );\n\n\t\t$out = array();\n\n\t\t// Ignore SVG with type media to check if there are multiple sprite\n\t\t$custom_files = array_filter(\n\t\t\t$files,\n\t\t\tfunction ( $file ) {\n\t\t\t\treturn 'media' !== $file['type'];\n\t\t\t}\n\t\t);\n\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( ! is_file( $file['file'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( 'media' === $file['type'] ) {\n\t\t\t\t$pathinfo = pathinfo( $file['file'] );\n\t\t\t\t$out[] = array(\n\t\t\t\t\t'id' => $file['id'],\n\t\t\t\t\t'text' => self::get_nice_display_text( $pathinfo['filename'], false ),\n\t\t\t\t\t'url' => $file['file_url'],\n\t\t\t\t\t'disabled' => false,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// If not extract them from the CSS file.\n\t\t\t\t$contents = file_get_contents( $file['file'] );\n\t\t\t\tpreg_match_all( '/id=\"(\\S+)\"/m', strip_tags( $contents, $allowed_tags ), $svg );\n\n\t\t\t\tforeach ( $svg[1] as $id ) {\n\t\t\t\t\t$id = sanitize_title( $id );\n\t\t\t\t\t// If multiple sprites registered, return sprite name and icon name, otherwise return icon name only\n\t\t\t\t\t$value = 1 < count( $custom_files ) ? basename( $file['file'] ) . '#' . $id : $id;\n\t\t\t\t\t$out[] = array(\n\t\t\t\t\t\t'id' => $value,\n\t\t\t\t\t\t'text' => self::get_nice_display_text( $id ),\n\t\t\t\t\t\t'disabled' => false,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn apply_filters( 'acf_svg_icon_parsed_svg', $out, $files );\n\t}", "public function api_get_svg_published($parameters) {\n\n\t\t\tself::api_get_svg($parameters, true);\n\t\t}", "public function get_all_svg_files() {\n\t\t// First try to load files list from the cache.\n\t\t$files = get_transient( $this->cache_key );\n\t\tif ( ! empty( $files ) ) {\n\t\t\treturn $files;\n\t\t}\n\n\t\t/**\n\t\t * Get WP Media SVGs\n\t\t *\n\t\t * @since 2.0.0\n\t\t */\n\t\t$media_svg_files = $this->get_medias_svg();\n\n\t\t/**\n\t\t * The path to the svg file.\n\t\t *\n\t\t * @since 1.0.0\n\t\t */\n\t\t$custom_svg_files = $this->get_svg_files_path();\n\n\t\t$files = array_merge( $media_svg_files, $custom_svg_files );\n\n\t\t// Cache 24 hours.\n\t\tset_transient( $this->cache_key, $files, HOUR_IN_SECONDS * 24 );\n\n\t\treturn $files;\n\t}", "protected static function get_svg_domdocument(string $filename)\n\t{\n\t\tif (!file_exists($filename)) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$clean_markup = self::clean_markup(file_get_contents($filename));\n\n\t\tlibxml_use_internal_errors(true);\n\n\t\t$dom = new \\DOMDocument();\n\t\t$dom->loadHTML($clean_markup, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);\n\n\t\tlibxml_use_internal_errors(false);\n\n\t\treturn $dom;\n\t}", "public function contents() {\n\t\tif ( $this->is_empty() ) {\n\t\t\t// The sitemap should have at least the root element added to the DOM.\n\t\t\t$this->get_root_element();\n\t\t}\n\t\treturn $this->doc->saveXML();\n\t}", "public function getXml()\n {\n return $this->gsgxml->output();\n }", "public function getSvgUrl()\n {\n return $this->svgUrl;\n }", "public function modifySvg($request)\n {\n $returnType = '\\SplFileObject';\n $isBinary = true;\n $hasReturnType = true;\n $request = $this->getHttpRequest($request, 'GET');\n $options = $this->createHttpClientOptions();\n \n try {\n $response = $this->client->send($request, $options);\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n } catch (RequestException $e) {\n $this->processException($e);\n }\n }", "public function contents() {\n\t\treturn file_get_contents($this->path);\n\t}", "public function api_get_svg($parameters, $published) {\n\n\t\t\t// User capability check\n\t\t\tif(!WS_Form_Common::can_user('read_form')) { parent::api_access_denied(); }\n\n\t\t\t// Content type\n\t\t\theader('Content-type: text/html');\n\n\t\t\t// Get form ID\n\t\t\t$form_id = intval(self::api_get_id($parameters));\n\t\t\tif($form_id == 0) { exit; }\n\n\t\t\t// Return SVG\n\t\t\t$ws_form_form = new WS_Form_Form();\n\t\t\t$ws_form_form->id = $form_id;\n\t\t\techo $ws_form_form->get_svg($published);\t// phpcs:ignore\n\t\t\texit;\n\t\t}", "public function renderSVG()\n\t{\n\t\t$canvasWidth = $this->getCanvasWidth();\n\t\t$canvasHeight = $this->getCanvasHeight();\n\t\t$svgHeader = '<svg width=\"%d\" height=\"%d\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">';\n\t\t$rectangle = '<rect x=\"%d\" y=\"%d\" width=\"%s\" height=\"%s\" fill=\"%s\"/>';\n\n\t\t$output = sprintf(\n\t\t\t $svgHeader,\n\t\t\t $canvasWidth,\n\t\t\t $canvasHeight\n\t\t ) . PHP_EOL;\n\n\t\t$output .= \"\\t\" . sprintf(\n\t\t\t\t$rectangle,\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t'100%',\n\t\t\t\t'100%',\n\t\t\t\t$this->backgroundColor\n\t\t\t) . PHP_EOL;\n\n\t\tforeach ($this->proceduralGenerator() as $key => $shape) {\n\t\t\t$output .= \"\\t\" . sprintf(\n\t\t\t\t\t$rectangle,\n\t\t\t\t\t$shape['x0'],\n\t\t\t\t\t$shape['y0'],\n\t\t\t\t\t$this->shapeX,\n\t\t\t\t\t$this->shapeY,\n\t\t\t\t\t$shape['c']\n\t\t\t\t) . PHP_EOL;\n\t\t}\n\t\t$output .= '</svg>';\n\n\t\treturn $output;\n\t}", "protected function extractSvgImageSizes() {}", "public function iN_AllSVGIcons() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_svg_icons\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "public function getContent() {\n\t\treturn $this->storage->file_get_contents($this->path);\n\t}", "function find_svg()\n\t{\n\t\t$files = scandir($this->paths['tempdir']);\n\t\t\n\t\t//fetch the eot file first so we know the acutal filename, in case there are multiple svg files, then based on that find the svg file\n\t\t$filename = \"\";\n\t\tforeach($files as $file)\n\t\t{ \n\t\t\tif(strpos(strtolower($file), '.eot') !== false && $file[0] != '.')\n\t\t\t{\n\t\t\t\t$filename = strtolower( pathinfo($file, PATHINFO_FILENAME) );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->origin_font_name = $filename;\n\t\t\n\t\tforeach($files as $file)\n\t\t{ \n\t\t\tif(strpos(strtolower($file), $filename.'.svg') !== false && $file[0] != '.')\n\t\t\t{\n\t\t\t\treturn $file;\n\t\t\t}\n\t\t}\n\t}", "public static function get_all_icons_svg() {\n if ( self::$icon_svgs && is_object( self::$icon_svgs ) ) {\n return self::$icon_svgs;\n }\n $directory = get_template_directory() . '/assets/images/icons/svg/';\n $icons = [];\n $iterator = new \\DirectoryIterator( $directory );\n foreach ( $iterator as $file ) {\n if ( ! $file->isFile() ) {\n continue;\n }\n $parts = explode( '.', $file->getFilename() );\n if ( empty( $parts[1] ) || 'svg' != $parts[1] ) {\n continue;\n }\n $icon_name = $parts[0];\n $icon = static::get_icon( $icon_name );\n $icons[ $icon_name ] = (object) [\n 'svg' => $icon,\n 'label' => $icon_name,\n ];\n }\n ksort( $icons );\n self::$icon_svgs = $icons;\n return self::$icon_svgs;\n }", "public function api_get_svg_draft($parameters) {\n\n\t\t\tself::api_get_svg($parameters, false);\n\t\t}", "public function getContents()\n {\n return $this->getContents();\n }", "public function getContents()\n {\n $this->load();\n\n return $this->_contents;\n }", "public function testSetSvg()\n {\n $document = $this->createDomDocument();\n $element = $document->createElementNS(Atom::NS, 'content');\n $document->documentElement->appendChild($element);\n $content = new Content($this->createFakeNode(), $element);\n\n $svg = new \\DOMDocument('1.0', 'utf-8');\n $svg->loadXML('<svg xmlns=\"http://www.w3.org/2000/svg\"><circle r=\"20\"/></svg>');\n\n $content->setContent($svg->documentElement, 'image/svg+xml');\n static::assertEquals(\n '<content type=\"image/svg+xml\">' .\n '<svg xmlns=\"http://www.w3.org/2000/svg\"><circle r=\"20\"/></svg>' .\n '</content>',\n $document->saveXML($element)\n );\n }", "function include_svg($svg, $echo = true, $create_path = true){\n\n\t$theme_directory = THEME_DIR;\n\t$id = ! $create_path ? '' : $svg;\n\tif( $create_path ) {\n\t\t$svg = $theme_directory . '/assets/svgs/' . $svg . '.svg';\n\t\tif( ! file_exists($svg) ) return;\n\t\t$loadType = 'load';\n\t} else {\n\t\t$curl = getstatus($svg);\n\t\tif( $curl['status'] == 400 ) return;\n\t\t$svg = $curl['return'];\n\t\t$loadType = 'loadHTML';\n\t}\n\t$doc = new DOMDocument();\n\t$doc->$loadType($svg);\n\t$svg = $doc->getElementsByTagName('svg');\n\tforeach ($svg as $s) {\n\t\t$svgRatio = $s->getAttribute('viewBox');\n\t\t$svgRatio = explode( ' ', $svgRatio );\n\t\tunset( $svgRatio[0] ); unset( $svgRatio[1] );\n\t}\n\t$return = '<div class=\"svg\" id=\"' . $id . '\" aria-hidden=\"true\"><canvas width=\"' . $svgRatio[2] . '\" height=\"' . $svgRatio[3] . '\"></canvas>' . $svg->item(0)->C14N() . '</div>';\n\tif( $echo ){\n\t\techo $return;\n\t} else {\n\t\treturn $return;\n\t}\n}", "protected function getContents()\n {\n return $this->engine->get($this->path, $this->gatherData());\n }", "public function getContents()\n {\n return $this->contents;\n }", "public function getContents()\n {\n return $this->contents;\n }", "public function getContent()\n {\n return file_get_contents($this->fullPath);\n }", "public function content()\n {\n $response = $this\n ->getPackage('FileStation')\n ->contentOfPath($this->path, [], 'files');\n return $response;\n }", "public function get()\n {\n return static::getContents($this->getPathname());\n }", "public function getContents();", "public function getContents();", "public function getContents();", "public function getContents();", "public function getContents();", "public function contents() { return $this->_m_contents; }", "protected function svgs_get_dimensions( $svg ) {\n\t\t$svg = simplexml_load_file( $svg );\n\t\t$width = '0';\n\t\t$height = '0';\n\n\t\tif ( false !== $svg ) {\n\t\t\t$attributes = $svg->attributes();\n\t\t\tif ( isset( $attributes->viewBox ) ) {\n\t\t\t\t$viewbox = explode( ' ', $attributes->viewBox );\n\t\t\t\t$width = $viewbox[2];\n\t\t\t\t$height = $viewbox[3];\n\t\t\t} elseif ( $attributes->width && $attributes->height ) {\n\t\t\t\t$width = (string) $attributes->width;\n\t\t\t\t$height = (string) $attributes->height;\n\t\t\t}\n\t\t}\n\n\t\treturn (object) array(\n\t\t\t'width' => $width,\n\t\t\t'height' => $height,\n\t\t);\n\t}", "public function contents()\n\t{\n\t\treturn $this->contents;\n\t}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "function legion_get_dimensions( $svg ) {\n\t// If that happens, we will just go back to not knowing the dimensions,\n\t// rather than breaking the site.\n\t$fail = (object) array( 'width' => 0, 'height' => 0 );\n\n\t// Welp, nothing we can do here...\n\tif ( ! function_exists( 'simplexml_load_file' ) ) {\n\t\treturn $fail;\n\t}\n\n\t$svg = simplexml_load_file( $svg );\n\t$attributes = $svg ? $svg->attributes() : false;\n\n\t// Probably an invalid XML file?\n\tif( ! $attributes ) {\n\t\treturn $fail;\n\t}\n\n\t$width = (string) $attributes->width;\n\t$height = (string) $attributes->height;\n\n\treturn (object) array( 'width' => $width, 'height' => $height );\n}", "public function getContents() {}", "public function getContents(): string\n {\n return $this->contents;\n }", "public function getContents(): string\n {\n return $this->contents;\n }", "private function getSvgRegex() : string\n {\n return '~^\n <svg\\s.+viewBox=\"(?P<viewBox>0\\s0\\s(?P<width>\\d+)\\s(?P<height>\\d+))\"> # opening <svg> with width and height (from viewBox attribute)\n <!--.+--> # Font Awesome License Comment\n (?: # optional style definitions, used by duotone\n <defs>\n <style>\n (?P<style>.+) # capture group \"styles\" for the styles\n </style>\n </defs>\n )?\n (?P<paths> # capture group \"paths\"\n (?:\n <path # opening <path>\n \\s.+? # path contents\n (?:/>|></path>) # either self closing /> or closing </path>\n ){1,2} # match 1-2 <path>\n )\n </svg> # closing </svg>\n $~x';\n }", "public function svg(string $svg)\n {\n return $this->withMeta(['svg' => $svg]);\n }", "public function get_content() {\n // Check if no content is yet loaded\n if (empty($this->content)) {\n $this->content = @file_get_contents($this->name);\n }\n\n return $this->content;\n }", "public function readDOM ( ) {\n\n return $this->getStream()->readDOM();\n }", "public function render()\n {\n return $this->xmlDocument->saveHTML();\n }", "public function get_menu_icon() {\n\n\t\treturn file_get_contents( $this->get_base_path() . '/images/menu-icon.svg' );\n\n\t}", "protected static function get_svg_path(): string\n\t{\n\t\t$svg_path = apply_filters('wputil/svg_path', get_template_directory().'/media/svg/');\n\t\t\n\t\treturn trailingslashit($svg_path);\n\t}", "protected function getVictoireMedia_TwigExtension_SvgService()\n {\n return $this->services['victoire_media.twig_extension.svg'] = new \\Victoire\\Bundle\\MediaBundle\\Twig\\SvgTwigExtension(($this->targetDirs[3].'/app'));\n }", "public function getContents() \r\n { \r\n return $this->_contents; \r\n }", "public function getParsedContent(): string\n {\n return $this->XMLTree;\n }", "public function get()\n {\n if(is_null($this->contents) && $this->exists())\n $this->contents = file_get_contents($this->getPath());\n\n return $this->contents;\n }", "public function getSignedContent()\n {\n return $this->get(self::SIGNEDCONTENT);\n }", "public function contents() {\n\t\tif(isset($this->uri))\n\t\t\treturn $this->handler->contents($this->uri);\n\t\treturn null;\n\t}", "public function get()\n {\n return $this->contents;\n }", "public function downloadSVG_ID(int $id)\n {\n $canvas = CanvasController::validateAccessRights($id);\n return $this->downloadSVG($canvas);\n }", "public function testHtmlSvgFile()\n {\n $dom = Dom::createFromFile(self::$fixture.'html+svg.html');\n $this->assertInstanceOf(DOMDocument::class, $dom);\n $this->assertEquals('html', $dom->documentElement->localName);\n\n $xpath = new DOMXPath($dom);\n $xpath->registerNamespace('svg', 'http://www.w3.org/2000/svg');\n $this->assertEquals(1, count($xpath->query('/html')));\n $this->assertEquals(1, count($xpath->query('//svg')));\n $this->assertEquals(1, count($xpath->query('//svg:svg')));\n }", "function draw() {\n $this->DOM = new DOMDocument('1.0', 'UTF-8');\n $this->DOM->formatOutput = true;\n self::$svg = $this->DOM->createElement('svg');\n self::$svg->setAttribute('width', $this->size);\n self::$svg->setAttribute('height', $this->size);\n self::$svg->setAttribute('version', '1.1');\n self::$svg->setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\n $style = $this->DOM->createElement('style', 'rect { ' . $this->nodeStyle .' }');\n self::$svg->appendChild($style);\n\n //Parameters for the drawing algorithm\n $max_sub = 15; //The max number of points to try to group together for drawing\n $min_sub = 0; //The min number of points to try to group together for drawing\n $step = 3; //The step size down from $max_sub to $min_sub\n\n for ($size = $max_sub; $size >= $min_sub; $size -= $step)\n {\n $size = ($size == 0) ? 1 : $size;\n $this->fillBlocks($size);\n }\n// $this->DOM->appendChild(self::$svg);\n return $this->DOM->saveXML(self::$svg);\n }", "public function getContents(): array\n {\n return $this->content;\n }", "public function get_content() {\n $event = Event::factory('response.get_content', array('content' => $this->_content))->notify_all();\n $data = $event->get_data();\n return $data['content'];\n }", "public function getContent()\n\t\t\t{\n\t\t\t\tif($this->exist)\n\t\t\t\t\treturn file_get_contents($this->path);\n\t\t\t\telse\n\t\t\t\t\treturn '';\n\t\t\t}", "public function DrawPicture() { \r\n\r\n $hogerarm = $this->GetHogerArm();\r\n $vansterarm = $this->GetVansterArm();\r\n $vansterben = $this->GetVansterBen();\r\n $hogerben = $this->GetHogerBen();\r\n $kroppen = $this->GetKroppen();\r\n $huvud = $this->GetHuvud();\r\n $repet = $this->GetRepet();\r\n $stolpen = $this->GetStolpen();\r\n $kullen = $this->GetKullen();\r\n $header = $this->GetSvgHeader();\r\n\r\n $html = <<<EOD\r\n {$header}\r\n {$kullen}\r\n {$stolpen}\r\n {$kroppen} \r\n {$hogerarm} \r\n {$vansterarm} \r\n {$vansterben} \r\n {$hogerben}\t\r\n {$repet} \t\t\r\n {$huvud}\r\n </svg>\r\nEOD;\r\n\r\n return $html;\r\n }", "public function getContent()\n {\n return $this->containingMarkers;\n }", "public function getSodiumContent()\n {\n return $this->sodiumContent;\n }", "public function modifySvgAsync($request) \n {\n $returnType = '\\SplFileObject';\n $isBinary = true;\n $hasReturnType = true;\n $request = $this->getHttpRequest($request, 'GET');\n $options = $this->createHttpClientOptions();\n\n return $this->client\n ->sendAsync($request, $options)\n ->then(\n function ($response) use ($request, $hasReturnType, $returnType, $isBinary) {\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n },\n function ($exception) use ($request) {\n $this->processException($exception);\n }\n );\n }", "public function getContents()\n {\n }", "public function render(){\n\t\treturn $this->file->getContent();\n\t}", "public function getContents(): string;", "public function getContents(): string;", "function image_svg_to_icon_blob($svg_string, &$height = 0, &$width = 0, $color = false)\n{\n $im = image_svg_string_to_icon_obj($svg_string, $height, $width, $color);\n return image_return_blob($im);\n}", "function print_pie_chart()\n {\n \t$ChartDiameter = $this->ChartRadius*2;\n \t//determine graphic size\n $ChartWidth = $ChartDiameter + 20;\n $ChartHeight = $ChartDiameter + 20 + (($this->ChartFontHeight + 2) * count($this->ChartData));\n //determine total of all values\n $ChartTotal=0;\n foreach($this->ChartData as $Data) $ChartTotal += $Data[0];\n $ChartCenterX = $ChartDiameter/2 + 10;\n $ChartCenterY = $ChartDiameter/2 + 10;\n //set the content type\n header(\"Content-type: image/svg-xml\");\n //mark this as XML\n print('<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>' . \"\\n\");\n //Point to SVG DTD\n print('<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\"\t\"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">'.\"\\n\");\n //start SVG document, set size in \"user units\"\n print(\"<svg xml:space=\\\"preserve\\\" width=\\\"5in\\\" height=\\\"5in\\\" viewBox=\\\"0 0 $ChartWidth $ChartHeight\\\"\\n\\txmlns=\\\"http://www.w3.org/2000/svg\\\"\\n\\txmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\">\\n\");\n\t\t// define filters\n\t\tprint('<defs>'.\"\\n\");\n \tprint('<filter id=\"Shadow\" filterUnits=\"userSpaceOnUse\">'.\"\\n\");\n \tprint(' <!--Copyright 1999 Adobe Systems. You may copy, modify, and distribute this file, if you include this notice & do not charge for the distribution. This file is provided \"AS-IS\" without warranties of any kind, including any implied warranties.-->'.\"\\n\");\n \tprint('\t<feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"4\" result=\"blur\"/>'.\"\\n\");\n print('\t<feOffset in=\"blur\" dx=\"4\" dy=\"4\" result=\"offsetBlurredAlpha\"/>'.\"\\n\");\n print('\t<feSpecularLighting in=\"blur\" surfaceScale=\"5\" specularConstant=\"0.9\" specularExponent=\"20\" lightColor=\"white\" result=\"specularOut\">'.\"\\n\");\n print('\t <feDistantLight azimuth=\"'.$this->lightSource.'\" elevation=\"'.$this->lightHeight.'\"/>'.\"\\n\");\n print('\t</feSpecularLighting>'.\"\\n\");\n print('\t<feComposite in=\"specularOut\" in2=\"SourceAlpha\" operator=\"in\" result=\"specularOut\"/>'.\"\\n\");\n print('\t<feComposite in=\"SourceGraphic\" in2=\"specularOut\" operator=\"arithmetic\" k1=\"0\" k2=\"1\" k3=\"1\" k4=\"0\" result=\"litPaint\"/>'.\"\\n\");\n print('\t<feMerge>'.\"\\n\");\n print('\t <feMergeNode in=\"offsetBlurredAlpha\"/>'.\"\\n\");\n print('\t\t<feMergeNode in=\"litPaint\"/>'.\"\\n\");\n print('\t</feMerge>'.\"\\n\");\n \tprint('</filter>'.\"\\n\");\n \tprint('<filter id=\"MyFilter\" filterUnits=\"userSpaceOnUse\">'.\"\\n\");\n \tprint(' <!--Copyright 1999 Adobe Systems. You may copy, modify, and distribute this file, if you include this notice & do not charge for the distribution. This file is provided \"AS-IS\" without warranties of any kind, including any implied warranties.-->'.\"\\n\");\n \tprint('\t<feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"4\" result=\"blur\"/>'.\"\\n\");\n print('\t<!--<feOffset in=\"blur\" dx=\"4\" dy=\"4\" result=\"offsetBlurredAlpha\"/>-->'.\"\\n\");\n print('\t<feSpecularLighting in=\"blur\" surfaceScale=\"5\" specularConstant=\"0.9\" specularExponent=\"20\" lightColor=\"white\" result=\"specularOut\">'.\"\\n\");\n print('\t <feDistantLight azimuth=\"225\" elevation=\"30\"/>'.\"\\n\");\n print('\t</feSpecularLighting>'.\"\\n\");\n print('\t<feComposite in=\"specularOut\" in2=\"SourceAlpha\" operator=\"in\" result=\"specularOut\"/>'.\"\\n\");\n print('\t<feComposite in=\"SourceGraphic\" in2=\"specularOut\" operator=\"arithmetic\" k1=\"0\" k2=\"1\" k3=\"1\" k4=\"0\" result=\"litPaint\"/>'.\"\\n\");\n print('\t<feMerge>'.\"\\n\");\n print('\t <!--<feMergeNode in=\"offsetBlurredAlpha\"/>-->'.\"\\n\");\n print('\t\t<feMergeNode in=\"litPaint\"/>'.\"\\n\");\n print('\t</feMerge>'.\"\\n\");\n \tprint('</filter>'.\"\\n\");\n\t\tprint('</defs>'.\"\\n\");\n\n // make background rectangle\n print(\"\\t<rect x=\\\"0\\\" y=\\\"0\\\" width=\\\"$ChartWidth\\\" height=\\\"$ChartHeight\\\" style=\\\"fill:$this->colorBody\\\" />\");\n $Degrees = 0;\n $index = 0;\n\t\tprint(\"<g id=\\\"pie\\\" style=\\\"filter:url(#Shadow);\\\">\\n\");\n // draw border\n print(\"\\n\\n\\t<circle cx=\\\"\".($ChartCenterX-1).\"\\\" cy=\\\"\".($ChartCenterY-1).\"\\\" r=\\\"$this->ChartRadius\\\" style=\\\"fill:none; stroke:$this->colorBorder; stroke-width:$this->widthBorder;\\\" />\\n\");\n\t\t// draw each slice\n foreach($this->ChartData as $Label=>$Data)\n {\n $StartDegrees = round($Degrees);\n \t$Degrees += ($Data[0]/$ChartTotal)*360;\n \t$EndDegrees = round($Degrees);\n \t//$CurrentColor = $Value[($index++)%(count($this->colorSlice))];\n\t\t\t$CurrentColor = $Data[1];\n \tprint(\"\\n\\t<!--$Label: \".$Data[0].\" (of $ChartTotal) $StartDegrees to $EndDegrees degrees in $CurrentColor-->\\n\\t\");\n\t\t\tif(!is_null($Data[2])) print(\"<a xlink:href=\\\"\".$Data[2].\"\\\">\\n\\t\\t\");\n \tprint(\"<path d=\\\"\");\n \t//start at center of circle\n \tprint(\"M $ChartCenterX,$ChartCenterY \");\n \t//draw out to circle edge\n \tlist($ArcX, $ArcY) = $this->circle_point($StartDegrees, $ChartDiameter);\n \tprint(\"L \" . floor($ChartCenterX + $ArcX) . \",\" . floor($ChartCenterY + $ArcY) . \" \");\n \t//draw arc\n \tlist($ArcX, $ArcY) = $this->circle_point($EndDegrees, $ChartDiameter);\n \tprint(\"A $this->ChartRadius,$this->ChartRadius 0 0 1 \" .\n \tfloor($ChartCenterX + $ArcX) . \",\" .\n \tfloor($ChartCenterY + $ArcY) .\" \");\n \t//close polygon\n \tprint(\"Z\\\" \");\n \tprint(\"style=\\\"fill:$CurrentColor; stroke:$this->colorBorder; stroke-width:$this->widthPieSliceBorder;\\\"/>\");\n\t\t\tif(!is_null($Data[2])) print(\"\\n\\t</a>\");\n }\n\t\tprint(\"</g>\\n\");\n // draw legend\n $index=0;\n\t\tprint(\"<g id=\\\"legend\\\">\\n\");\n foreach($this->ChartData as $Label=>$Data)\n {\n //$CurrentColor = $this->colorSlice[$index%(count($this->colorSlice))];\n $CurrentColor = $Data[1];\n \t$BoxY = $ChartDiameter + 20 + (($index++)*($this->ChartFontHeight+2));\n \t$LabelY = $BoxY + $this->ChartFontHeight;\n \t//draw color box\n\t\t\tprint(\"\\n\\t\");\n\t\t\tif(!is_null($Data[2])) print(\"<a xlink:href=\\\"\".$Data[2].\"\\\">\\n\\t\\t\");\n \tprint(\"<ellipse cx=\\\"20\\\" cy=\\\"\".($BoxY+(.5)*$this->ChartFontHeight+1).\"\\\" rx=\\\"10\\\" ry=\\\"\".((.5)*$this->ChartFontHeight).\"\\\" style=\\\"fill:$CurrentColor; stroke:$this->colorBorder; stroke-width:$this->widthLegendColorBorder\\\" />\");\n\t\t\tif(!is_null($Data[2])) print(\"\\n\\t</a>\");\n \t//draw label\n\t\t\tprint(\"\\n\\t\");\n\t\t\t$percent = floor(($Data[0]/$ChartTotal)*100); \n\t\t\tif(!is_null($Data[2])) print(\"<a xlink:href=\\\"\".$Data[2].\"\\\">\\n\\t\\t\");\n \tprint(\"<text x=\\\"40\\\" y=\\\"$LabelY\\\" style=\\\"file:$this->colorText; font-size:$this->ChartFontHeight\\\">$Label: \".$Data[0].\" ($percent%)</text>\");\n\t\t\tif(!is_null($Data[2])) print(\"\\n\\t</a>\");\n }\n\t\tprint(\"</g>\\n\");\n //end SVG document\n print(\"\\n</svg>\\n\");\n\t\texit;\n }", "function getContents();", "public function GetStolpen() {\r\n\r\n $html = <<<EOD\r\n <!-- HÄR KOMMER STOLPEN -->\r\n <g id=\"stolpen\">\r\n <line fill=\"none\" stroke=\"#673B15\" stroke-width=\"8\" stroke-miterlimit=\"10\" x1=\"114.649\" y1=\"9.386\" x2=\"206.216\" y2=\"9.386\"/>\r\n <line fill=\"none\" stroke=\"#673B15\" stroke-width=\"2\" stroke-miterlimit=\"10\" x1=\"120.036\" y1=\"46.626\" x2=\"159.652\" y2=\"9.386\"/>\r\n <line fill=\"#B07F48\" stroke=\"#673B15\" stroke-width=\"8\" stroke-miterlimit=\"10\" x1=\"120.036\" y1=\"175.687\" x2=\"120.036\" y2=\"14.772\"/>\r\n </g>\r\nEOD;\r\n return $html;\r\n }", "public static function getAnnotationSvg($annoItem) {\n $svgTexts = get_db()->getTable('ElementText')->findBySql(\"element_texts.record_id = ? AND element_texts.record_type = 'Item' AND element_texts.element_id = ?\", array($annoItem->id, get_option('iiifitems_annotation_selector_element')));\n $svgs = array();\n foreach ($svgTexts as $svgText) {\n $svgs[] = $svgText->text;\n }\n return $svgs;\n }", "protected function getResourceContents( $path )\n {\n return $this->content[$path];\n }", "function getContents() ;", "public function content()\n {\n return $this->regions['content'];\n }", "public function getStylesXMLFileContent()\n {\n $content = <<<EOD\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<styleSheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">\nEOD;\n\n $content .= $this->getFontsSectionContent();\n $content .= $this->getFillsSectionContent();\n $content .= $this->getBordersSectionContent();\n $content .= $this->getCellStyleXfsSectionContent();\n $content .= $this->getCellXfsSectionContent();\n $content .= $this->getCellStylesSectionContent();\n\n $content .= <<<EOD\n</styleSheet>\nEOD;\n\n return $content;\n }", "function getContent()\n {\n return $this->getAttribute(\"content\");\n }", "public function get_svg_dimensions( $file ) {\n\t\t$width = $height = 1;\n\n\t\t// Get attached file\n\t\tif ( is_numeric( $file ) ) {\n\t\t\t$file = get_attached_file( $file );\n\t\t}\n\n\t\tif ( function_exists( 'simplexml_load_file' ) ) {\n\t\t\t$svg = simplexml_load_file( $file );\n\n\t\t\tif ( isset( $svg->attributes()->viewBox ) ) {\n\t\t\t\t$view_box = explode( ' ', (string) $svg->attributes()->viewBox );\n\t\t\t\t$view_box = array_values( array_filter( array_map( 'absint', $view_box ) ) );\n\n\t\t\t\tif ( count( $view_box ) > 1 ) {\n\t\t\t\t\treturn [ $view_box[0], $view_box[1] ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn [ $width, $height ];\n\t}", "public function getMarkup($uri){\r\n\t\t\treturn file_get_contents($uri);\r\n\t\t}", "public function getXml($flags){\n return libvirt_domain_snapshot_get_xml($this->resource, $flags);\n }" ]
[ "0.70626503", "0.6922592", "0.66724825", "0.65018797", "0.63706076", "0.6334829", "0.62638295", "0.62483436", "0.62230587", "0.61904347", "0.60771996", "0.6075995", "0.6064396", "0.6037159", "0.6023889", "0.60100037", "0.5991085", "0.5958949", "0.5950384", "0.5925219", "0.5880692", "0.58607554", "0.5807539", "0.57800287", "0.57155347", "0.5686899", "0.5685325", "0.567591", "0.5668554", "0.5652629", "0.56402904", "0.5631838", "0.5631574", "0.56057906", "0.5604926", "0.55833524", "0.55765736", "0.5569026", "0.55585533", "0.55585533", "0.5556331", "0.5504817", "0.5503042", "0.549116", "0.549116", "0.549116", "0.549116", "0.549116", "0.5485064", "0.54644907", "0.5463482", "0.5461849", "0.5461849", "0.5461849", "0.5461849", "0.5461722", "0.54614234", "0.5434152", "0.5434152", "0.54061717", "0.540095", "0.5390583", "0.5388095", "0.5373961", "0.5368878", "0.5355242", "0.53414476", "0.5322687", "0.5292117", "0.52910817", "0.52827", "0.52803063", "0.527915", "0.52695704", "0.5260873", "0.52357143", "0.51986986", "0.5189729", "0.518431", "0.51717776", "0.5166944", "0.51629424", "0.51580703", "0.5145574", "0.51402074", "0.5127008", "0.5127008", "0.5111078", "0.5108954", "0.5087457", "0.5070069", "0.506504", "0.50633055", "0.50579226", "0.50556624", "0.503876", "0.5036655", "0.5019577", "0.5016527", "0.50146717" ]
0.58508307
22
Get the path to the svg.
private function getSvgPath(string $path, string $style, string $name) : string { return sprintf( '%1$s/%2$s/%3$s.svg', rtrim($path, '/'), $style, Str::after($name, 'fa-'), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function get_svg_path(): string\n\t{\n\t\t$svg_path = apply_filters('wputil/svg_path', get_template_directory().'/media/svg/');\n\t\t\n\t\treturn trailingslashit($svg_path);\n\t}", "public function getSvgUrl()\n {\n return $this->svgUrl;\n }", "public function getSvg() {\n\t\twfDebugLog( \"Pathway\", \"getSvg() called\\n\" );\n\n\t\tif ( isset( $this->svg ) ) {\n\t\t\twfDebugLog( \"Pathway\", \"Returning svg from memory\\n\" );\n\t\t\treturn $this->svg;\n\t\t}\n\n\t\t$file = $this->getFileLocation( FILETYPE_IMG );\n\t\tif ( $file && file_exists( $file ) ) {\n\t\t\twfDebugLog( \"Pathway\", \"Returning svg from cache $file\\n\" );\n\t\t\treturn file_get_contents( $file );\n\t\t}\n\n\t\twfDebugLog( \"Pathway\", \"need to get pvjson in order to get svg\\n\" );\n\t\t$pvjson = $this->getPvjson();\n\t\twfDebugLog( \"Pathway\", \"got pvjson in process of getting svg\\n\" );\n\t\t$svg = $this->getConverter()->getpvjson2svg( $pvjson, [ \"static\" => false ] );\n\t\twfDebugLog( \"Pathway\", \"got svg\\n\" );\n\t\t$this->svg = $svg;\n\t\treturn $svg;\n\t}", "function get_svg($key) {\n\t$content = 'none';\n\t$file = get_stylesheet_directory().'/library/assets/svg/'.$key.'.svg';\n\tif(file_exists($file)) {\n\t\t$content = file_get_contents($file);\n\t}\n\treturn $content;\n}", "function find_svg()\n\t{\n\t\t$files = scandir($this->paths['tempdir']);\n\t\t\n\t\t//fetch the eot file first so we know the acutal filename, in case there are multiple svg files, then based on that find the svg file\n\t\t$filename = \"\";\n\t\tforeach($files as $file)\n\t\t{ \n\t\t\tif(strpos(strtolower($file), '.eot') !== false && $file[0] != '.')\n\t\t\t{\n\t\t\t\t$filename = strtolower( pathinfo($file, PATHINFO_FILENAME) );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->origin_font_name = $filename;\n\t\t\n\t\tforeach($files as $file)\n\t\t{ \n\t\t\tif(strpos(strtolower($file), $filename.'.svg') !== false && $file[0] != '.')\n\t\t\t{\n\t\t\t\treturn $file;\n\t\t\t}\n\t\t}\n\t}", "function getPath(): string;", "private static function get_svg( $location, $atts = [] ) {\n if ( ! $location || ! file_exists( $location ) ) {\n return;\n }\n $atts = static::handle_element_atts( $atts );\n return str_replace( '<svg ',\n '<svg ' . Utils::array_to_atts_str( $atts ),\n file_get_contents( $location )\n );\n }", "private function get_svg_files_path() {\n\t\t$custom_svg_path_icons = apply_filters( 'acf_svg_icon_filepath', array() );\n\n\t\treturn array_map( function ( $val ) {\n\t\t\treturn [\n\t\t\t\t'type' => 'custom',\n\t\t\t\t'file' => $val,\n\t\t\t];\n\t\t}, (array) $custom_svg_path_icons );\n\t}", "function getPath() {\n\t\treturn $this->getAttribute(DOMIT_RSS_ATTR_PATH);\n\t}", "public function getPath(): string {\n\t\treturn $this->path;\n\t}", "public function getPath(): string\n {\n return $this->path;\n }", "public function getPath(): string\n {\n return $this->path;\n }", "public function getPath(): string\n {\n return $this->path;\n }", "public function getPath(): string\n {\n return $this->path;\n }", "public function getPath(): string\n {\n return $this->path;\n }", "public function getIconPath() {\n\t\treturn WCF::getPath() . 'icon/flag/'.$this->countryCode.'.svg';\n\t}", "public function getPath(): string\r\n {\r\n return $this->path;\r\n }", "public function getPath(): string\r\n {\r\n return $this->path;\r\n }", "public function getPath()\n {\n return $this->__get(\"path\");\n }", "public function getPath() : string\n {\n return $this->path;\n }", "public function getPath() : string\n {\n return $this->path;\n }", "public function getPath()\n\t{\n\t\t\n\t\t$this->setPath();\n\t\treturn $this->path;\n\t\t\n\t}", "public function getPath() {\n return $this->attributes['path'];\n }", "public function getPath(): string;", "public function getPath(): string;", "public function getPath(): string;", "public function getPath(): string;", "public function getPath(): string;", "public function getPath(): string;", "public function getPath(): string;", "public function getPath(): string;", "public function getPath() : string\n {\n return $this->path;\n }", "function getEmbedSVG() {return $this->_embedsvg;}", "public function getPath()\n {\n\n if (empty($this->_path))\n return '';\n\n return $this->_path;\n }", "public function path()\n {\n $prefix = (isset($this->attributes[self::PREFIX]) ? $this->attributes[self::PREFIX] : '');\n\n return $prefix . $this->path;\n }", "public function getPath()\n {\n\n return $this->path;\n }", "public function getPath() : string\n {\n return $this->path;\n }", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath();", "public function getPath() {\n\t\treturn $this->path;\n\t}", "public function getPath() {\n\t\treturn $this->path;\n\t}", "public function getPath() {\n\n return $this->path;\n }", "public static function iconPath()\n {\n return Craft::getAlias('@seibertio/elasticsearch/icon.svg');\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "public function getPath()\n {\n return $this->path;\n }", "private function getPath()\n {\n return $this->path;\n }", "public static function iconPath()\n {\n return Craft::getAlias(\"@julianmjones/schedapiintegration/assetbundles/schedapiintegrationutilityutility/dist/img/SchedApiIntegrationUtility-icon.svg\");\n }", "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "public function getPath() {\n return $this->path;\n }", "public function getPath() {\n return $this->path;\n }", "public function getPath() {\n return $this->path;\n }", "public function getPath() {\n return $this->path;\n }", "public function getPath() {\n return $this->path;\n }", "public function getPath()\r\n\t{\r\n\t\treturn $this->path;\r\n\t}", "public function getPath()\n {\n return $this->_path;\n }", "public function getPath()\n {\n return $this->_path;\n }", "public function getPath()\n {\n return $this->_path;\n }", "public function getPath()\r\n {\r\n return $this->path;\r\n }", "public function getPath()\r\n {\r\n return $this->path;\r\n }", "public function svg() {\n\t\t// Calcul des coordonnées des points.\n\t\t$this->computePoints();\n\t\t// Récupération des points.\n\t\t$A = $this->A;\n\t\t$B = $this->B;\n\t\t$C = $this->C;\n\t\t$D = $this->D;\n\t\t$H = $this->H;\n\t\t$E = $this->E;\n\t\t$G = $this->G;\n\t\t$F = $this->F;\n\t\t$I = $this->I;\n\t\t$J = $this->J;\n\t\t$K = $this->K;\n\t\t$J1 = $this->J1;\n\t\t$J2 = $this->J2;\n\t\t// Dessin au format SVG.\n\t\t$couleurV = $this->colorV;\n\t\t$couleurY = $this->colorY;\n\t\t$couleurGauche = $this->colorLeft;\n\t\t$couleurDroite = $this->colorRight;\n\t\t$svg = '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">';\n\t\t$svg .= '<svg width=\"'.$this->xmax.'\" height=\"'.$this->ymax.'\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">';\n\t\t$svg .= '<title>logo'.($this->name != \"\" ? '-'.$this->name : '').'</title>';\n\t\t// Intérieur gauche.\n\t\t$svg .= '<polygon points=\"'.$E.' '.$F.' '.$K.'\" style=\"fill:'.$couleurGauche.'; stroke:'.$couleurGauche.'; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t// Intérieur droit.\n\t\t$svg .= '<polygon points=\"'.$G.' '.$H.' '.$I.'\" style=\"fill:'.$couleurDroite.'; stroke:'.$couleurDroite.'; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t// Y.\n\t\t$svg .= '<polygon points=\"'.$A.' '.$B.' '.$C.' '.$H.' '.$G.' '.$J1.' '.$J2.' '.$F.' '.$E.'\" style=\"fill:'.$couleurY.'; stroke:black; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t// V.\n\t\t$svg .= '<polygon points=\"'.$A.' '.$E.' '.$J.' '.$H.' '.$C.' '.$D.'\" style=\"fill:'.$couleurV.'; stroke:black; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t$svg .= '</svg>';\n\t\treturn $svg;\n\t}", "public static function svgIcon()\n {\n return '<svg class=\"sidebar-icon icon-location\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"var(--sidebar-icon)\" d=\"M5.64 16.36a9 9 0 1 1 12.72 0l-5.65 5.66a1 1 0 0 1-1.42 0l-5.65-5.66zm11.31-1.41a7 7 0 1 0-9.9 0L12 19.9l4.95-4.95zM12 14a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4z\" /></svg>';\n }" ]
[ "0.84186286", "0.754067", "0.6872362", "0.68536985", "0.6735443", "0.6701271", "0.6678991", "0.66753644", "0.6603857", "0.6573692", "0.6568964", "0.6568964", "0.6568964", "0.6568964", "0.6568964", "0.65188265", "0.6518544", "0.6518544", "0.6502136", "0.65001684", "0.65001684", "0.6498725", "0.64855856", "0.646313", "0.646313", "0.646313", "0.646313", "0.646313", "0.646313", "0.646313", "0.646313", "0.64425796", "0.6434266", "0.6388879", "0.63883907", "0.6385468", "0.63819444", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.6380156", "0.63771296", "0.63771296", "0.6375371", "0.6356386", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6355193", "0.6354562", "0.6352087", "0.63334113", "0.63334113", "0.63334113", "0.63334113", "0.63261056", "0.63261056", "0.63261056", "0.63261056", "0.63261056", "0.6323428", "0.6306481", "0.6306481", "0.6306481", "0.6292655", "0.6292655", "0.6291504", "0.6281937" ]
0.6457999
31
Get the svg regex pattern.
private function getSvgRegex() : string { return '~^ <svg\s.+viewBox="(?P<viewBox>0\s0\s(?P<width>\d+)\s(?P<height>\d+))"> # opening <svg> with width and height (from viewBox attribute) <!--.+--> # Font Awesome License Comment (?: # optional style definitions, used by duotone <defs> <style> (?P<style>.+) # capture group "styles" for the styles </style> </defs> )? (?P<paths> # capture group "paths" (?: <path # opening <path> \s.+? # path contents (?:/>|></path>) # either self closing /> or closing </path> ){1,2} # match 1-2 <path> ) </svg> # closing </svg> $~x'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getRegularExpression();", "function getRegex() {\n\t\treturn \"/\".$this->prefixes . $this->source . $this->suffixes. \"/\" . $this->modifiers;\n\t}", "public function getRegex() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"regex\", \"\");\n\t}", "public function getPattern();", "public function getPattern();", "public function getPattern() {}", "public function getPattern(): string;", "public function getPattern(): string;", "public function getRegex(): string\n {\n return $this->regex;\n }", "public function getRegex(): string\n {\n return $this->regex;\n }", "public function getPattern(): string\n {\n return $this->pattern;\n }", "public function getPattern(): string\n {\n return $this->pattern;\n }", "public function get_pattern()\n {\n return $this->pattern;\n }", "public function regex(): string{\n return $this->_regex;\n }", "public function get_regexp(){\n\t\treturn $this->get_regexp();\n\t}", "private static function REGEX(): string{\n\t\tif(self::$REGEX === \"\"){\n\t\t\tself::$REGEX = \"/(?:\" . preg_quote(\"{\") . \")((?:[A-Za-z0-9_\\-]{2,})(?:\\.[A-Za-z0-9_\\-]+)+)(?:\" . preg_quote(\"}\") . \")/\";\n\t\t}\n\n\t\treturn self::$REGEX;\n\t}", "public function getRegexp();", "public function getRegex()\n {\n return $this->regex;\n }", "private function getPathsRegex() : string\n {\n return '~\n <path # opening <path>\n (?:\\sclass=\"(?P<class>[^\"]+)\")? # optional classes\n \\sd=\"(?P<d>[^\"]+)\" # the path definition \"d\" attribute\n .*? # ignore any un-needed information after \"d\" attribute\n (?:/>|></path>) # either self closing /> or closing </path>\n ~x';\n }", "public function getRegex()\n\t{\n\t\treturn $this->regex;\n\t}", "public function getPattern()\n {\n return $this->_pattern;\n }", "public function getPattern()\n {\n // file type\n $pattern = $this->getFileType() . ':';\n\n // schema (http, https)\n $pattern .= $this->uri->getScheme() . ':';\n\n // host\n $pattern .= $this->uri->getHost() . ':';\n\n $path = $this->uri->getPath() . '?' . $this->uri->getQuery();\n\n $pathNew = preg_replace(\"^[a-f0-9]{32}^\", \"<h>\", $path);\n $pathNew = preg_replace(\"^[a-z\\-\\_]{1,}^i\", \"<s>\", $pathNew);\n $pathNew = preg_replace(\"^[0-9]{1,}^\", \"<i>\", $pathNew);\n\n $pattern .= $pathNew;\n\n return $pattern;\n }", "public function getRegularExpression()\n {\n return '/(\\b([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\\s?[0-9][A-Za-z]{2})\\b)/um';\n }", "public function getPattern() {\n\t\treturn $this->pattern;\n\t}", "public static function getRegex($Name = 'uri-spec');", "abstract protected function getPattern(): string;", "abstract protected function getPattern(): string;", "public function getPattern(): string\n {\n return $this->getConfig('pattern');\n }", "public function GetPattern () {\n\t\tif ($this->pattern === NULL)\n\t\t\t$this->preparePatternAndBackReferenceIndexes();\n\t\treturn $this->pattern;\n\t}", "public function getPattern()\n {\n return $this->options['pattern'];\n }", "public function getRegularExpression()\n {\n return '/\\b(\\d{2}[\\- \\.]?\\d{3}[\\- \\.]?\\d{3}[\\- \\.]?\\d{2}[\\- \\.]?\\d?)\\b/um';\n }", "public function getRegexurl() {\n }", "Function get_pattern( $line )\n{\n $match = array();\n\n $match = array(\n array( 'pkg' => 'py2cairo', \n 'regex' => \"/py2cairo-([\\d\\.]+)/\" ),\n\n array( 'pkg' => 'Encode-JIS2K', \n 'regex' => \"/\\D*Encode-JIS2K-([\\d\\.]+)\\D*$/\" ),\n\n array( 'pkg' => 'IPC-Run3', \n 'regex' => \"/\\D*IPC-Run3-([\\d\\.]+)\\D*$/\" ),\n\n array( 'pkg' => 'Log-Log4perl', \n 'regex' => \"/\\D*Log-Log4perl-([\\d\\.]+)\\D*$/\" ),\n\n array( 'pkg' => 'Jinja2', \n 'regex' => \"/\\D*Jinja2-([\\d\\.]+)\\D*$/\" ),\n\n // Order matters here. jtreg must be before OpenJDK\n array( 'pkg' => 'jtreg', \n 'regex' => \"/jtreg(\\d[\\d\\.b-]+)$/\" ),\n\n array( 'pkg' => 'OpenJDK', \n 'regex' => \"/OpenJDK-([\\d\\.]+)-.*$/\" ),\n\n array( 'pkg' => 'junit4', \n 'regex' => \"/junit4_([\\d\\.]+).*$/\" ),\n );\n\n foreach( $match as $m )\n {\n $pkg = $m[ 'pkg' ];\n if ( preg_match( \"/$pkg/\", $line ) ) \n return $m[ 'regex' ];\n }\n\n return \"/\\D*(\\d.*\\d)\\D*$/\";\n}", "public function getOriginalPattern()\n {\n return $this->definition->getPattern();\n }", "public function getBorderPattern() {\n\t\treturn $this->_border['pattern'];\n\t}", "protected static function get_pattern() {\n return '/.*/';\n }", "public function getCustomRegex(): ?string\n {\n return $this->customRegex ?? null;\n }", "public function getPattern()\n\t{\n\t\t$string = $this->getViewState('Pattern','');\n\n\t\t$pattern = null;\n\n\t\t//try the subpattern of \"date time\" presets\n\t\t$subpatterns = explode(' ',$string,2);\n\t\t$datetime = array();\n\t\tif(count($subpatterns)==2)\n\t\t{\n\t\t\t$datetime[] = $this->getPreset($subpatterns[0]);\n\t\t\t$datetime[] = $this->getPreset($subpatterns[1]);\n\t\t}\n\n\t\t//we have a good subpattern\n\t\tif(count($datetime) == 2\n\t\t\t&& strlen($datetime[0]) == 1\n\t\t\t&& strlen($datetime[1]) == 1)\n\t\t{\n\t\t\t$pattern = $datetime;\n\t\t}\n\t\telse //no subpattern, try the presets\n\t\t\t$pattern = $this->getPreset($string);\n\n\t\t//no presets found, use the string as the pattern\n\t\t//and let the DateFormat handle it.\n\t\tif($pattern===null)\n\t\t\t$pattern = $string;\n\t\tif (!is_array($pattern) && strlen($pattern) == 0)\n\t\t\t$pattern = null;\n\t\treturn $pattern;\n\t}", "public function get_regex ($part) {\n\t\treturn '/' . \n\t\t\tpreg_quote($this->open(), '/') .\n\t\t\t\tpreg_quote($part, '/') .\n\t\t\t\t'(' .\n\t\t\t\t\tpreg_quote($this->fallback(), '/') .\n\t\t\t\t\t'(.*?)' .\n\t\t\t\t')?' .\n\t\t\tpreg_quote($this->close(), '/') .\n\t\t'/';\n\t}", "public function regex() {\r\n // split uri\r\n $arr = preg_split('@/@', $this->uri, NULL, PREG_SPLIT_NO_EMPTY);\r\n\r\n $regex = null;\r\n foreach ($arr as $ar) {\r\n // Replace dynamic with regex\r\n $regex = $regex.'\\/'.preg_replace('/\\{(.*?)\\}/', '[0-9A-Za-z]++', $ar);\r\n }\r\n\r\n $this->regex = '/^'.$regex.'$/';\r\n }", "public function getStringPattern()\n {\n return $this->stringPattern;\n }", "abstract protected function buildRegex(): Matcher;", "public static function parserRegExp(): string\n {\n return '[0-9]{4}-[0-9]{2}-[0-9]{2}';\n }", "abstract protected function regexp(): string;", "function getFileNameRegex() {\n return $this->fileNameRegex;\n }", "protected function getPattern()\n {\n $region = $this->resolveRegion();\n switch ($this->type) {\n case \"html\":\n $outputPattern = \"{{depend}}{{prefix}} {{/depend}}{{firstname}} {{depend}}{{middlename}} {{/depend}}\"\n . \"{{lastname}}{{depend}} {{suffix}}{{/depend}}\\n{{depend}}{{company}}\\n{{/depend}}{{street}}\\n\"\n . \"{{city}}, {{{$region}}}, {{postcode}}\\n{{country_id}}\\n{{depend}}T: {{telephone}}{{/depend}}\"\n . \"{{depend}}\\nF: {{fax}}{{/depend}}{{depend}}\\nVAT: {{vat_id}}{{/depend}}\";\n break;\n case \"oneline\":\n default:\n $outputPattern = \"{{depend}}{{prefix}} {{/depend}}{{firstname}} {{depend}}{{middlename}} {{/depend}}\"\n . \"{{lastname}}{{depend}} {{suffix}}{{/depend}}, {{street}}, \"\n . \"{{city}}, {{{$region}}} {{postcode}}, {{country_id}}\";\n break;\n }\n return $outputPattern;\n }", "public function regex()\n {\n return 'https?://soundcloud.com/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)';\n }", "public function __toString() {\n\t\treturn $this->getRegex();\n\t}", "public function regex(): RegexInterface;", "public function getPattern()\n {\n return \"/{(extends|extend|include|includes)(\\s*)\\\"(\\w.*?)\\\"(?:,(\\s*)(.*?))?}/is\";\n }", "public function getRule()\n {\n return 'regex:'.$this->getField()->getPattern();\n }", "public function getSearchPattern();", "public function getSearchPattern();", "public function getPatternForUri()\n {\n return '/' . preg_replace('/:[\\d\\w]+/i', '(' . $this->_paramPattern . ')', str_replace('/', '\\\\/', $this->_uri)) . '/i';\n }", "protected static function getRegexPattern()\n {\n return sprintf(\"/^(%s@%s\\.%s)$/\", self::$nameRegex, self::$domainSecondTLDRegex, self::$domainTLDRegex);\n }", "public function getPattern(): string\n {\n return '/^\\S*'.implode('', $this->getRegexOptions()).'\\S*$/';\n }", "public function getPattern(): ?string\n {\n return $this->pattern;\n }", "function getPattern($pattern) {\n return $this->patterns[$pattern];\n }", "public function preg()\n {\n if(empty($this->preg))\n {\n $this->preg = new Preg();\n }\n\n return $this->preg;\n }", "private function getPattern ()\n {\n if ($this->pattern===null)\n {\n //first escape regex chars\n $pattern = preg_quote ($this->path,'/');\n\n //find variables in routes\n $matches = [];\n preg_match_all('/(\\\\\\\\\\{[a-zA-Z0-9_]+\\\\\\\\\\})+/', $pattern, $matches);\n\n if (isset($matches[0]) && count($matches[0]))\n {\n foreach ($matches[0] as $match)\n {\n $name = substr($match,2,-2);\n $input = new Input ($name,(isset($this->types[$name])?$this->types[$name]:0));\n //debug ($name,$this->path);\n $pattern = str_replace ($match,$input->getPattern(),$pattern);\n $this->inputs[] = $input;\n }\n }\n //debug ($matches, $this->path);\n $this->pattern = '/^'.$pattern.'$/';\n }\n return $this->pattern;\n }", "public function __toString()\n\t{\n\t\treturn $this->regex;\n\t}", "function get_preg_expression($mode)\n{\n\tswitch ($mode)\n\t{\n\t\tcase 'url':\n\t\tcase 'url_inline':\n\t\t\t$inline = ($mode == 'url') ? ')' : '';\n\t\t\t$scheme = ($mode == 'url') ? '[a-z\\d+\\-.]' : '[a-z\\d+]'; // avoid automatic parsing of \"word\" in \"last word.http://...\"\n\t\t\t// generated with regex generation file in the develop folder\n\t\t\treturn \"[a-z]$scheme*:/{2}(?:(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+|[0-9.]+|\\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\\])(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'www_url':\n\t\tcase 'www_url_inline':\n\t\t\t$inline = ($mode == 'www_url') ? ')' : '';\n\t\t\treturn \"www\\.(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'relative_url':\n\t\tcase 'relative_url_inline':\n\t\t\t$inline = ($mode == 'relative_url') ? ')' : '';\n\t\t\treturn \"(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\t}\n\n\treturn '';\n}", "protected function getPattern(): string\n\t{\n\t\treturn $this->getDirectory() . $this->getGroup() . 'data_*_localized.json';\n\t}", "function get_tag_regex($tag)\n {\n }", "protected function getSrcAttributeNameForRegex(): string\n {\n if (count($this->settings->sourceAttribute) < 1) {\n return 'src';\n }\n\n return implode('|', $this->settings->sourceAttribute);\n }", "function get_preg_expression($mode)\n{\n\tswitch ($mode)\n\t{\n\t\tcase 'email':\n\t\t\treturn '(?:[a-z0-9\\'\\.\\-_\\+\\|]++|&amp;)+@[a-z0-9\\-]+\\.(?:[a-z0-9\\-]+\\.)*[a-z]+';\n\t\tbreak;\n\n\t\tcase 'bbcode_htm':\n\t\t\treturn array(\n\t\t\t\t'#<!\\-\\- e \\-\\-><a href=\"mailto:(.*?)\">.*?</a><!\\-\\- e \\-\\->#',\n\t\t\t\t'#<!\\-\\- l \\-\\-><a (?:class=\"[\\w-]+\" )?href=\"(.*?)(?:(&amp;|\\?)sid=[0-9a-f]{32})?\">.*?</a><!\\-\\- l \\-\\->#',\n\t\t\t\t'#<!\\-\\- ([mw]) \\-\\-><a (?:class=\"[\\w-]+\" )?href=\"(.*?)\">.*?</a><!\\-\\- \\1 \\-\\->#',\n\t\t\t\t'#<!\\-\\- s(.*?) \\-\\-><img src=\"\\{SMILIES_PATH\\}\\/.*? \\/><!\\-\\- s\\1 \\-\\->#',\n\t\t\t\t'#<!\\-\\- .*? \\-\\->#s',\n\t\t\t\t'#<.*?>#s',\n\t\t\t);\n\t\tbreak;\n\n\t\t// Whoa these look impressive!\n\t\t// The code to generate the following two regular expressions which match valid IPv4/IPv6 addresses\n\t\t// can be found in the develop directory\n\t\tcase 'ipv4':\n\t\t\treturn '#^(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])$#';\n\t\tbreak;\n\n\t\tcase 'ipv6':\n\t\t\treturn '#^(?:(?:(?:[\\dA-F]{1,4}:){6}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:::(?:[\\dA-F]{1,4}:){5}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:):(?:[\\dA-F]{1,4}:){4}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,2}:(?:[\\dA-F]{1,4}:){3}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,3}:(?:[\\dA-F]{1,4}:){2}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,4}:(?:[\\dA-F]{1,4}:)(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,5}:(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,6}:[\\dA-F]{1,4})|(?:(?:[\\dA-F]{1,4}:){1,7}:))$#i';\n\t\tbreak;\n\n\t\tcase 'url':\n\t\tcase 'url_inline':\n\t\t\t$inline = ($mode == 'url') ? ')' : '';\n\t\t\t$scheme = ($mode == 'url') ? '[a-z\\d+\\-.]' : '[a-z\\d+]'; // avoid automatic parsing of \"word\" in \"last word.http://...\"\n\t\t\t// generated with regex generation file in the develop folder\n\t\t\treturn \"[a-z]$scheme*:/{2}(?:(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+|[0-9.]+|\\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\\])(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'www_url':\n\t\tcase 'www_url_inline':\n\t\t\t$inline = ($mode == 'www_url') ? ')' : '';\n\t\t\treturn \"www\\.(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'relative_url':\n\t\tcase 'relative_url_inline':\n\t\t\t$inline = ($mode == 'relative_url') ? ')' : '';\n\t\t\treturn \"(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\t}\n\n\treturn '';\n}", "public function getDefaultRegExp();", "public function regex()\n {\n return 'https?://vine.co/v/(\\w+)';\n }", "private function getRegularExpressionWithoutNamedGroups()\n {\n $retVal = $this->getRegularExpression();\n\n $retVal = preg_replace( '/\\?P<\\w+>/', '', $retVal );\n\n return $retVal;\n }", "private function getRegularExpressionWithoutNamedGroups()\r\n {\r\n $retVal = $this->getRegularExpression();\r\n\r\n $retVal = preg_replace( '/\\?P<\\w+>/', '', $retVal );\r\n\r\n return $retVal;\r\n }", "public function getPatternFile()\n {\n return $this->patternFile;\n }", "public function getAcceptExtensRegex();", "abstract function regex(): array;", "protected function pattern_to_regex($matches) {\n\t\tif ($matches[1] == '*') {\n\t\t\treturn '/?(.*)';\n\t\t} else if ($matches[1] != ':') {\n\t\t\treturn '/?('.$matches[2].')';\n\t\t}\n\t\treturn '/([^\\/]+)';\n\t}", "public function getPatterns()\n {\n if (!isset($this->_params['html'])) {\n $linebreak = '\\n|<br(?:\\s*/)?>';\n $whitespace = '\\s|&nbsp;';\n } elseif ($this->_params['html']) {\n $linebreak = '<br(?:\\s*/)?>';\n $whitespace = '&nbsp;';\n } else {\n $linebreak = '\\n';\n $whitespace = '\\s';\n }\n $startOfLine = '((?:^|' . $linebreak . ')(?:' . $whitespace . ')*)';\n $endOfLine = '(?=(?:' . $whitespace . ')*(?:$|\\.|' . $linebreak . '))';\n $startOfWord = '(^|' . $whitespace . '|' . $linebreak . ')';\n $endOfWord = '(?=$|\\.|' . $whitespace . '|' . $linebreak . ')';\n\n return array('regexp' => array(\n // Bold.\n '#' . $startOfLine . '(\\*(?:[^*](?!$|' . $linebreak . '))+\\*)' . $endOfLine .\n '|' . $startOfWord . '(\\*[^*\\s]+\\*)' . $endOfWord . '#i'\n => '$1$3<strong>$2$4</strong>',\n\n // Underline.\n '#' . $startOfLine . '(_(?:[^*](?!$|' . $linebreak . '))+_)' . $endOfLine .\n '|' . $startOfWord . '(_[^_\\s]+_)' . $endOfWord . '#i'\n => '$1$3<u>$2$4</u>',\n\n // Italic.\n '#' . $startOfLine . '(/(?:[^*](?!$|' . $linebreak . '))+/)' . $endOfLine .\n '|' . $startOfWord . '(/[^/\\s]+/)' . $endOfWord . '#i'\n => '$1$3<em>$2$4</em>',\n ));\n }", "function preg($pattern){\n return new Parser(['_call_preg', [$pattern]]);\n}", "public function getPattern()\n {\n// if ($this->getOption('pattern')) {\n// return $this->getOption('pattern');\n// }\n\n $pattern = $this->formatter->getPattern();\n\n // set right order with respect to locale (e.g.: de_DE=dd.MM.yy; en_US=M/d/yy)\n // lookup various formats at http://userguide.icu-project.org/formatparse/datetime\n if (preg_match('/^([yMd]+).+([yMd]+).+([yMd]+)$/', $pattern)) {\n return preg_replace(array('/y+/', '/M+/', '/d+/'), array('{{ year }}', '{{ month }}', '{{ day }}'), $pattern);\n }\n\n // default fallback\n return '{{ year }}-{{ month }}-{{ day }}';\n }", "function glob_to_regex($glob) {\n\n $glob = str_replace('.', '\\.', $glob);\n $glob = str_replace('+', '\\+', $glob);\n $glob = str_replace('*', '.+', $glob);\n $glob = str_replace('?', '.', $glob);\n\n return $glob ? \"^$glob$\" : $glob;\n }", "public function graphGraphPattern(){\n try {\n // Sparql11query.g:206:3: ( GRAPH varOrIRIref groupGraphPattern ) \n // Sparql11query.g:207:3: GRAPH varOrIRIref groupGraphPattern \n {\n $this->match($this->input,$this->getToken('GRAPH'),self::$FOLLOW_GRAPH_in_graphGraphPattern713); \n $this->pushFollow(self::$FOLLOW_varOrIRIref_in_graphGraphPattern715);\n $this->varOrIRIref();\n\n $this->state->_fsp--;\n\n $this->pushFollow(self::$FOLLOW_groupGraphPattern_in_graphGraphPattern717);\n $this->groupGraphPattern();\n\n $this->state->_fsp--;\n\n\n }\n\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 ;\n }", "private function getRegexFlagPattern($attribute)\n {\n $mapAttrFlagPattern = [\n 'district_id' => self::REGEX_FLAG_DISTRICT,\n 'municipality_id' => self::REGEX_FLAG_MUNICIPALITY,\n 'typology' => self::REGEX_FLAG_TYPOLOGY,\n 'land_registry_id' => self::REGEX_FLAG_LANDREGISTRY,\n ];\n\n return $mapAttrFlagPattern[$attribute];\n }", "public function getPattern()\n {\n return $this->tracingMap;\n }", "protected function patternToRegex($pattern) {\n\t\tif(!strlen($pattern)) {\n\t\t\t// nothing to do\n\t\t\t$regex = '';\n\t\t} else if(in_array($pattern[0], $this->regexDelims) && strrpos($pattern, $pattern[0])) {\n\t\t\t// already a regular expression\n\t\t\t$regex = $pattern;\n\t\t} else if(strpos($pattern, '*') !== false) {\n\t\t\t// wildcard, convert to regex\n\t\t\t$a = explode('*', $pattern);\n\t\t\tforeach($a as $k => $v) {\n\t\t\t\t$a[$k] = preg_quote($v);\n\t\t\t}\n\t\t\t$regex = '/^' . implode('.+', $a) . '$/';\n\t\t\t$regex = str_replace(\n\t\t\t\tarray('\\\\(', '\\\\)', '\\\\[', '\\\\]'), \n\t\t\t\tarray('(', ')', '[', ']'), \n\t\t\t\t$regex\n\t\t\t);\n\t\t} else {\n\t\t\t$regex = '';\n\t\t}\n\t\treturn $regex;\n\t}", "public function format(string $format = 'svg');", "private function getRegexForDesignExceptions()\n {\n $result = '';\n $tpl = \"%s (req.http.user-agent ~ \\\"%s\\\") {\\n\".\" hash_data(\\\"%s\\\");\\n\".\" }\";\n\n $expressions = $this->getDesignExceptions();\n\n if ($expressions) {\n $rules = array_values($expressions);\n foreach ($rules as $i => $rule) {\n if (preg_match('/^[\\W]{1}(.*)[\\W]{1}(\\w+)?$/', $rule['regexp'], $matches)) {\n if (!empty($matches[2])) {\n $pattern = sprintf(\"(?%s)%s\", $matches[2], $matches[1]);\n } else {\n $pattern = $matches[1];\n }\n $if = $i == 0 ? 'if' : ' elsif';\n $result .= sprintf($tpl, $if, $pattern, $rule['value']);\n }\n }\n }\n\n return $result;\n }", "public function getPattern()\n {\n return '/\\{!!\\s*(.+?)\\s*!!\\s*\\}(\\r?\\n)?/s';\n }", "function mREGEX(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$REGEX;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:276:3: ( 'regex' ) \n // Tokenizer11.g:277:3: 'regex' \n {\n $this->matchString(\"regex\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "private function toRegExp($pattern)\n {\n $regExp = '/^' . preg_quote($pattern, '/') . '$/';\n // Replace escaped \"*\" by a pattern, that matches zero to\n // unlimited arbitrary characters.\n $regExp = str_replace('\\*', '.*', $regExp);\n return $regExp;\n }", "public function __toString(): string\n\t{\n\t\treturn $this->pattern;\n\t}", "public function getPatternFlags()\n {\n return null;\n }", "public function compileRegex()\n {\n $route = $this->route->getUri();\n\n if (strpos($route, '?')) {\n $route = preg_replace('@\\/{([\\w]+)\\?}@', '(?:/{$1})?', $route);\n }\n\n $route = preg_replace('/{([a-z0-9_-]+)}/i', '(?P<$1>[^/]+)', $route);\n\n if(substr($route, -1) === '/') {\n $route .= '?';\n }\n\n return \"%^{$route}$%s\";\n }", "public function getRegex($name) {\n\t\tif (!array_key_exists($name, $this->regexs)) {\n\t\t\tthrow new NotExistingRegexException($name);\n\t\t}\n\t\treturn $this->regexs[$name];\n\t}", "protected static function get_svg_path(): string\n\t{\n\t\t$svg_path = apply_filters('wputil/svg_path', get_template_directory().'/media/svg/');\n\t\t\n\t\treturn trailingslashit($svg_path);\n\t}", "public function getIncludeRegex()\n {\n return $this->include_regex;\n }", "abstract function getQualifyingPattern();", "public function getRegularExpression($name)\n\t{\n\t\tif(!array_key_exists($name, $this->regulars)) {\n\t\t\tthrow new RegularExpressionNotFound(\"Regular expression '{$name}' not found.\");\n\t\t} else {\n\t\t\treturn $this->regulars[$name];\n\t\t}\n\t}", "protected function getTemplateRegexPattern()\n {\n $parts = explode('@', $this->template);\n if (count($parts) === 2) {\n $parts[0] = str_replace('*', self::$nameRegex, $parts[0]);\n $topTLDIndex = strrpos($parts[1], '.');\n\n\n if ($topTLDIndex !== FALSE) {\n $secondTLD = substr($parts[1], 0, $topTLDIndex);\n $secondTLD = str_replace('*', self::$domainSecondTLDRegex, $secondTLD);\n\n $topTLD = substr($parts[1], $topTLDIndex);\n $topTLD = str_replace('*', self::$domainTLDRegex, $topTLD);\n $template = $parts[0] . '@' . $secondTLD . $topTLD;\n } else {\n $template = $parts[0] . '@' . $parts[1];\n }\n } else {\n $template = '';\n }\n\n //$template = str_replace(['.', '+', '-'], ['\\.', '\\+', '\\-'], $template);\n\n return sprintf('/^%s$/', $template);\n }", "public function getDatePattern() {\r\n\t\treturn $this->datePattern;\r\n\t}", "function get_shortcode_atts_regex()\n {\n }", "public function getBasePathRegex()\n {\n return '/'\n . preg_quote($this->getBasePath() . DIRECTORY_SEPARATOR, '/')\n . '/';\n }", "public function get_catchall_regex ($capturing=true) {\n\t\t$rx = '.*';\n\t\tif (!empty($capturing)) $rx = \"({$rx})\";\n\n\t\treturn '/' .\n\t\t\tpreg_quote($this->open(), '/') .\n\t\t\t$rx .\n\t\t\tpreg_quote($this->close(), '/') .\n\t\t'/';\n\t}" ]
[ "0.682686", "0.67306954", "0.67304736", "0.6722517", "0.6722517", "0.6662467", "0.65021664", "0.65021664", "0.6462015", "0.6462015", "0.6415263", "0.6415263", "0.6397987", "0.634499", "0.62689596", "0.62675583", "0.62602156", "0.62342733", "0.62114143", "0.6182372", "0.61738145", "0.61282325", "0.6120575", "0.6091492", "0.60377455", "0.60072374", "0.60072374", "0.5989049", "0.59404993", "0.5921434", "0.5885463", "0.58567536", "0.5836655", "0.58229345", "0.57796305", "0.5755739", "0.5745802", "0.57420695", "0.5739752", "0.572234", "0.57197815", "0.5657465", "0.56522214", "0.564876", "0.5641548", "0.5634815", "0.5621162", "0.5610988", "0.56044513", "0.5577005", "0.55559194", "0.55314076", "0.55314076", "0.5478938", "0.5478719", "0.54513955", "0.5444324", "0.54438186", "0.5440178", "0.5439167", "0.54204726", "0.53898513", "0.5385489", "0.534106", "0.5331077", "0.5325588", "0.5317981", "0.53053534", "0.52957755", "0.5292803", "0.5272876", "0.5267381", "0.526007", "0.52518", "0.5249835", "0.524781", "0.524134", "0.5205001", "0.52010113", "0.51992613", "0.519659", "0.5173605", "0.5173352", "0.5166411", "0.516068", "0.51558185", "0.51533765", "0.51505107", "0.5142542", "0.51411057", "0.5136607", "0.5124219", "0.51214904", "0.5101711", "0.509871", "0.50867313", "0.50773346", "0.506348", "0.50590825", "0.50515634" ]
0.7619533
0
Get the regex pattern.
private function getPathsRegex() : string { return '~ <path # opening <path> (?:\sclass="(?P<class>[^"]+)")? # optional classes \sd="(?P<d>[^"]+)" # the path definition "d" attribute .*? # ignore any un-needed information after "d" attribute (?:/>|></path>) # either self closing /> or closing </path> ~x'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_pattern()\n {\n return $this->pattern;\n }", "public function getRegex() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"regex\", \"\");\n\t}", "public function getRegex(): string\n {\n return $this->regex;\n }", "public function getRegex(): string\n {\n return $this->regex;\n }", "public static function getRegularExpression();", "public function getPattern(): string\n {\n return $this->pattern;\n }", "public function getPattern(): string\n {\n return $this->pattern;\n }", "public function getRegex()\n {\n return $this->regex;\n }", "public function getPattern()\n {\n return $this->_pattern;\n }", "public function regex(): string{\n return $this->_regex;\n }", "public function getPattern() {\n\t\treturn $this->pattern;\n\t}", "public function getPattern();", "public function getPattern();", "public function getRegex()\n\t{\n\t\treturn $this->regex;\n\t}", "public function GetPattern () {\n\t\tif ($this->pattern === NULL)\n\t\t\t$this->preparePatternAndBackReferenceIndexes();\n\t\treturn $this->pattern;\n\t}", "public function getPattern() {}", "function getRegex() {\n\t\treturn \"/\".$this->prefixes . $this->source . $this->suffixes. \"/\" . $this->modifiers;\n\t}", "public function getRegexp();", "public function getPattern(): string;", "public function getPattern(): string;", "public function getPattern()\n {\n return $this->options['pattern'];\n }", "public function getRule()\n {\n return 'regex:'.$this->getField()->getPattern();\n }", "public function getPattern(): ?string\n {\n return $this->pattern;\n }", "public function getPattern(): string\n {\n return $this->getConfig('pattern');\n }", "public function getStringPattern()\n {\n return $this->stringPattern;\n }", "public function get_regexp(){\n\t\treturn $this->get_regexp();\n\t}", "public function getPattern(): string\n {\n return '/^\\S*'.implode('', $this->getRegexOptions()).'\\S*$/';\n }", "protected static function getRegexPattern()\n {\n return sprintf(\"/^(%s@%s\\.%s)$/\", self::$nameRegex, self::$domainSecondTLDRegex, self::$domainTLDRegex);\n }", "public function getCustomRegex(): ?string\n {\n return $this->customRegex ?? null;\n }", "function getPattern($pattern) {\n return $this->patterns[$pattern];\n }", "public function getPattern()\n {\n // file type\n $pattern = $this->getFileType() . ':';\n\n // schema (http, https)\n $pattern .= $this->uri->getScheme() . ':';\n\n // host\n $pattern .= $this->uri->getHost() . ':';\n\n $path = $this->uri->getPath() . '?' . $this->uri->getQuery();\n\n $pathNew = preg_replace(\"^[a-f0-9]{32}^\", \"<h>\", $path);\n $pathNew = preg_replace(\"^[a-z\\-\\_]{1,}^i\", \"<s>\", $pathNew);\n $pathNew = preg_replace(\"^[0-9]{1,}^\", \"<i>\", $pathNew);\n\n $pattern .= $pathNew;\n\n return $pattern;\n }", "public function getRegularExpression()\n {\n return '/(\\b([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\\s?[0-9][A-Za-z]{2})\\b)/um';\n }", "private function getPattern ()\n {\n if ($this->pattern===null)\n {\n //first escape regex chars\n $pattern = preg_quote ($this->path,'/');\n\n //find variables in routes\n $matches = [];\n preg_match_all('/(\\\\\\\\\\{[a-zA-Z0-9_]+\\\\\\\\\\})+/', $pattern, $matches);\n\n if (isset($matches[0]) && count($matches[0]))\n {\n foreach ($matches[0] as $match)\n {\n $name = substr($match,2,-2);\n $input = new Input ($name,(isset($this->types[$name])?$this->types[$name]:0));\n //debug ($name,$this->path);\n $pattern = str_replace ($match,$input->getPattern(),$pattern);\n $this->inputs[] = $input;\n }\n }\n //debug ($matches, $this->path);\n $this->pattern = '/^'.$pattern.'$/';\n }\n return $this->pattern;\n }", "abstract protected function getPattern(): string;", "abstract protected function getPattern(): string;", "public function getRegexurl() {\n }", "protected static function get_pattern() {\n return '/.*/';\n }", "public function getPattern()\n\t{\n\t\t$string = $this->getViewState('Pattern','');\n\n\t\t$pattern = null;\n\n\t\t//try the subpattern of \"date time\" presets\n\t\t$subpatterns = explode(' ',$string,2);\n\t\t$datetime = array();\n\t\tif(count($subpatterns)==2)\n\t\t{\n\t\t\t$datetime[] = $this->getPreset($subpatterns[0]);\n\t\t\t$datetime[] = $this->getPreset($subpatterns[1]);\n\t\t}\n\n\t\t//we have a good subpattern\n\t\tif(count($datetime) == 2\n\t\t\t&& strlen($datetime[0]) == 1\n\t\t\t&& strlen($datetime[1]) == 1)\n\t\t{\n\t\t\t$pattern = $datetime;\n\t\t}\n\t\telse //no subpattern, try the presets\n\t\t\t$pattern = $this->getPreset($string);\n\n\t\t//no presets found, use the string as the pattern\n\t\t//and let the DateFormat handle it.\n\t\tif($pattern===null)\n\t\t\t$pattern = $string;\n\t\tif (!is_array($pattern) && strlen($pattern) == 0)\n\t\t\t$pattern = null;\n\t\treturn $pattern;\n\t}", "public function getRegularExpression()\n {\n return '/\\b(\\d{2}[\\- \\.]?\\d{3}[\\- \\.]?\\d{3}[\\- \\.]?\\d{2}[\\- \\.]?\\d?)\\b/um';\n }", "public function getOriginalPattern()\n {\n return $this->definition->getPattern();\n }", "public function get_regex ($part) {\n\t\treturn '/' . \n\t\t\tpreg_quote($this->open(), '/') .\n\t\t\t\tpreg_quote($part, '/') .\n\t\t\t\t'(' .\n\t\t\t\t\tpreg_quote($this->fallback(), '/') .\n\t\t\t\t\t'(.*?)' .\n\t\t\t\t')?' .\n\t\t\tpreg_quote($this->close(), '/') .\n\t\t'/';\n\t}", "public function getSearchPattern();", "public function getSearchPattern();", "public function getPatternFile()\n {\n return $this->patternFile;\n }", "public static function getRegex($Name = 'uri-spec');", "private function toRegExp($pattern)\n {\n $regExp = '/^' . preg_quote($pattern, '/') . '$/';\n // Replace escaped \"*\" by a pattern, that matches zero to\n // unlimited arbitrary characters.\n $regExp = str_replace('\\*', '.*', $regExp);\n return $regExp;\n }", "protected function patternToRegex($pattern) {\n\t\tif(!strlen($pattern)) {\n\t\t\t// nothing to do\n\t\t\t$regex = '';\n\t\t} else if(in_array($pattern[0], $this->regexDelims) && strrpos($pattern, $pattern[0])) {\n\t\t\t// already a regular expression\n\t\t\t$regex = $pattern;\n\t\t} else if(strpos($pattern, '*') !== false) {\n\t\t\t// wildcard, convert to regex\n\t\t\t$a = explode('*', $pattern);\n\t\t\tforeach($a as $k => $v) {\n\t\t\t\t$a[$k] = preg_quote($v);\n\t\t\t}\n\t\t\t$regex = '/^' . implode('.+', $a) . '$/';\n\t\t\t$regex = str_replace(\n\t\t\t\tarray('\\\\(', '\\\\)', '\\\\[', '\\\\]'), \n\t\t\t\tarray('(', ')', '[', ']'), \n\t\t\t\t$regex\n\t\t\t);\n\t\t} else {\n\t\t\t$regex = '';\n\t\t}\n\t\treturn $regex;\n\t}", "public function getPattern()\n {\n return \"/{(extends|extend|include|includes)(\\s*)\\\"(\\w.*?)\\\"(?:,(\\s*)(.*?))?}/is\";\n }", "function getFileNameRegex() {\n return $this->fileNameRegex;\n }", "public function getDatePattern() {\r\n\t\treturn $this->datePattern;\r\n\t}", "public function preg()\n {\n if(empty($this->preg))\n {\n $this->preg = new Preg();\n }\n\n return $this->preg;\n }", "public function getPattern($pattern_key)\n {\n return $this->pattern[$pattern_key];\n }", "abstract protected function regexp(): string;", "protected function translatePatternToRegex($pattern) {\n if (!isset($this->memoizedRegexCache[ $pattern ])) {\n $this->memoizedRegexCache[ $pattern ] = PatternUtility::translatePatternToRegex($pattern);\n }\n\n return $this->memoizedRegexCache[ $pattern ];\n }", "public function getDefaultRegExp();", "public function getPattern() {\n if (!isset($this->pattern)) {\n if (empty($this->configuration['pattern'])) {\n $this->pattern = \\Drupal::service('plugin.manager.panels.pattern')->createInstance('default');\n }\n else {\n $this->pattern = \\Drupal::service('plugin.manager.panels.pattern')->createInstance($this->configuration['pattern']);\n }\n }\n return $this->pattern;\n }", "public function getPattern()\n {\n// if ($this->getOption('pattern')) {\n// return $this->getOption('pattern');\n// }\n\n $pattern = $this->formatter->getPattern();\n\n // set right order with respect to locale (e.g.: de_DE=dd.MM.yy; en_US=M/d/yy)\n // lookup various formats at http://userguide.icu-project.org/formatparse/datetime\n if (preg_match('/^([yMd]+).+([yMd]+).+([yMd]+)$/', $pattern)) {\n return preg_replace(array('/y+/', '/M+/', '/d+/'), array('{{ year }}', '{{ month }}', '{{ day }}'), $pattern);\n }\n\n // default fallback\n return '{{ year }}-{{ month }}-{{ day }}';\n }", "public function regex(): RegexInterface;", "public function regex() {\r\n // split uri\r\n $arr = preg_split('@/@', $this->uri, NULL, PREG_SPLIT_NO_EMPTY);\r\n\r\n $regex = null;\r\n foreach ($arr as $ar) {\r\n // Replace dynamic with regex\r\n $regex = $regex.'\\/'.preg_replace('/\\{(.*?)\\}/', '[0-9A-Za-z]++', $ar);\r\n }\r\n\r\n $this->regex = '/^'.$regex.'$/';\r\n }", "public function getBorderPattern() {\n\t\treturn $this->_border['pattern'];\n\t}", "private static function REGEX(): string{\n\t\tif(self::$REGEX === \"\"){\n\t\t\tself::$REGEX = \"/(?:\" . preg_quote(\"{\") . \")((?:[A-Za-z0-9_\\-]{2,})(?:\\.[A-Za-z0-9_\\-]+)+)(?:\" . preg_quote(\"}\") . \")/\";\n\t\t}\n\n\t\treturn self::$REGEX;\n\t}", "function get_preg_expression($mode)\n{\n\tswitch ($mode)\n\t{\n\t\tcase 'url':\n\t\tcase 'url_inline':\n\t\t\t$inline = ($mode == 'url') ? ')' : '';\n\t\t\t$scheme = ($mode == 'url') ? '[a-z\\d+\\-.]' : '[a-z\\d+]'; // avoid automatic parsing of \"word\" in \"last word.http://...\"\n\t\t\t// generated with regex generation file in the develop folder\n\t\t\treturn \"[a-z]$scheme*:/{2}(?:(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+|[0-9.]+|\\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\\])(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'www_url':\n\t\tcase 'www_url_inline':\n\t\t\t$inline = ($mode == 'www_url') ? ')' : '';\n\t\t\treturn \"www\\.(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'relative_url':\n\t\tcase 'relative_url_inline':\n\t\t\t$inline = ($mode == 'relative_url') ? ')' : '';\n\t\t\treturn \"(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\t}\n\n\treturn '';\n}", "public function getRegularExpression($name)\n\t{\n\t\tif(!array_key_exists($name, $this->regulars)) {\n\t\t\tthrow new RegularExpressionNotFound(\"Regular expression '{$name}' not found.\");\n\t\t} else {\n\t\t\treturn $this->regulars[$name];\n\t\t}\n\t}", "public function getRegexDirectory ()\r\n {\r\n if (!$this->_regexDirectory) {\r\n $this->setRegexDirectory(dirname(__FILE__).'/preg');\r\n }\r\n return $this->_regexDirectory;\r\n }", "public static function parserRegExp(): string\n {\n return '[0-9]{4}-[0-9]{2}-[0-9]{2}';\n }", "public function __toString()\n\t{\n\t\treturn $this->regex;\n\t}", "public function getPatternForUri()\n {\n return '/' . preg_replace('/:[\\d\\w]+/i', '(' . $this->_paramPattern . ')', str_replace('/', '\\\\/', $this->_uri)) . '/i';\n }", "public function getPatternFlags()\n {\n return $this->getConfig('pattern_flags');\n }", "public function getPatternFlags()\n {\n return null;\n }", "public function __toString() {\n\t\treturn $this->getRegex();\n\t}", "public function getExcludeRegex()\n {\n return $this->exclude_regex;\n }", "public function regex()\n {\n return 'https?://soundcloud.com/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)';\n }", "function get_preg_expression($mode)\n{\n\tswitch ($mode)\n\t{\n\t\tcase 'email':\n\t\t\treturn '(?:[a-z0-9\\'\\.\\-_\\+\\|]++|&amp;)+@[a-z0-9\\-]+\\.(?:[a-z0-9\\-]+\\.)*[a-z]+';\n\t\tbreak;\n\n\t\tcase 'bbcode_htm':\n\t\t\treturn array(\n\t\t\t\t'#<!\\-\\- e \\-\\-><a href=\"mailto:(.*?)\">.*?</a><!\\-\\- e \\-\\->#',\n\t\t\t\t'#<!\\-\\- l \\-\\-><a (?:class=\"[\\w-]+\" )?href=\"(.*?)(?:(&amp;|\\?)sid=[0-9a-f]{32})?\">.*?</a><!\\-\\- l \\-\\->#',\n\t\t\t\t'#<!\\-\\- ([mw]) \\-\\-><a (?:class=\"[\\w-]+\" )?href=\"(.*?)\">.*?</a><!\\-\\- \\1 \\-\\->#',\n\t\t\t\t'#<!\\-\\- s(.*?) \\-\\-><img src=\"\\{SMILIES_PATH\\}\\/.*? \\/><!\\-\\- s\\1 \\-\\->#',\n\t\t\t\t'#<!\\-\\- .*? \\-\\->#s',\n\t\t\t\t'#<.*?>#s',\n\t\t\t);\n\t\tbreak;\n\n\t\t// Whoa these look impressive!\n\t\t// The code to generate the following two regular expressions which match valid IPv4/IPv6 addresses\n\t\t// can be found in the develop directory\n\t\tcase 'ipv4':\n\t\t\treturn '#^(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])$#';\n\t\tbreak;\n\n\t\tcase 'ipv6':\n\t\t\treturn '#^(?:(?:(?:[\\dA-F]{1,4}:){6}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:::(?:[\\dA-F]{1,4}:){5}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:):(?:[\\dA-F]{1,4}:){4}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,2}:(?:[\\dA-F]{1,4}:){3}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,3}:(?:[\\dA-F]{1,4}:){2}(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,4}:(?:[\\dA-F]{1,4}:)(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,5}:(?:[\\dA-F]{1,4}:[\\dA-F]{1,4}|(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])))|(?:(?:[\\dA-F]{1,4}:){1,6}:[\\dA-F]{1,4})|(?:(?:[\\dA-F]{1,4}:){1,7}:))$#i';\n\t\tbreak;\n\n\t\tcase 'url':\n\t\tcase 'url_inline':\n\t\t\t$inline = ($mode == 'url') ? ')' : '';\n\t\t\t$scheme = ($mode == 'url') ? '[a-z\\d+\\-.]' : '[a-z\\d+]'; // avoid automatic parsing of \"word\" in \"last word.http://...\"\n\t\t\t// generated with regex generation file in the develop folder\n\t\t\treturn \"[a-z]$scheme*:/{2}(?:(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+|[0-9.]+|\\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\\])(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'www_url':\n\t\tcase 'www_url_inline':\n\t\t\t$inline = ($mode == 'www_url') ? ')' : '';\n\t\t\treturn \"www\\.(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})+(?::\\d*)?(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\n\t\tcase 'relative_url':\n\t\tcase 'relative_url_inline':\n\t\t\t$inline = ($mode == 'relative_url') ? ')' : '';\n\t\t\treturn \"(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*(?:/(?:[a-z0-9\\-._~!$&'($inline*+,;=:@|]+|%[\\dA-F]{2})*)*(?:\\?(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?(?:\\#(?:[a-z0-9\\-._~!$&'($inline*+,;=:@/?|]+|%[\\dA-F]{2})*)?\";\n\t\tbreak;\n\t}\n\n\treturn '';\n}", "protected function getTemplateRegexPattern()\n {\n $parts = explode('@', $this->template);\n if (count($parts) === 2) {\n $parts[0] = str_replace('*', self::$nameRegex, $parts[0]);\n $topTLDIndex = strrpos($parts[1], '.');\n\n\n if ($topTLDIndex !== FALSE) {\n $secondTLD = substr($parts[1], 0, $topTLDIndex);\n $secondTLD = str_replace('*', self::$domainSecondTLDRegex, $secondTLD);\n\n $topTLD = substr($parts[1], $topTLDIndex);\n $topTLD = str_replace('*', self::$domainTLDRegex, $topTLD);\n $template = $parts[0] . '@' . $secondTLD . $topTLD;\n } else {\n $template = $parts[0] . '@' . $parts[1];\n }\n } else {\n $template = '';\n }\n\n //$template = str_replace(['.', '+', '-'], ['\\.', '\\+', '\\-'], $template);\n\n return sprintf('/^%s$/', $template);\n }", "protected function getValidPattern(): string\n {\n return '/^(?P<type>[\\w\\|\\[\\]]+)(?P<var> \\$\\w+)?$|\\s/';\n }", "public function getRegexpValidate()\n\t{\n\t\treturn $this->regexp_validate;\n\t}", "private static function convertPattern($pattern) {\n\t\tif (preg_match('/^glob:(.+)$/', $pattern, $m)) {\n\t\t\t// TODO real glob support\n\t\t\treturn Files::regex($m[1]);\n\t\t} else if (preg_match('/^(?:re|regex):(.+)$/', $pattern, $m)) {\n\t\t\tif (preg_match('@^/.+/[imsxeADSUXJu]*$@', $m[1])) {\n\t\t\t\treturn $m[1];\n\t\t\t} else {\n\t\t\t\treturn '/' . addcslashes($m[1], '/') . '/i';\n\t\t\t}\n\t\t\treturn $m[1];\n\t\t} else {\n\t\t\treturn $pattern;\n\t\t}\n\t}", "public function getRecurrencePattern()\r\n\t{\r\n\t\treturn $this->recurrencePattern;\r\n\t}", "public function getDefaultParameterRegex(): ?string\n {\n return $this->defaultParameterRegex ?? null;\n }", "abstract protected function buildRegex(): Matcher;", "protected function pattern_to_regex($matches) {\n\t\tif ($matches[1] == '*') {\n\t\t\treturn '/?(.*)';\n\t\t} else if ($matches[1] != ':') {\n\t\t\treturn '/?('.$matches[2].')';\n\t\t}\n\t\treturn '/([^\\/]+)';\n\t}", "public function getRegex($name) {\n\t\tif (!array_key_exists($name, $this->regexs)) {\n\t\t\tthrow new NotExistingRegexException($name);\n\t\t}\n\t\treturn $this->regexs[$name];\n\t}", "public function getPattern()\n {\n return '/\\{!!\\s*(.+?)\\s*!!\\s*\\}(\\r?\\n)?/s';\n }", "public function getIncludeRegex()\n {\n return $this->include_regex;\n }", "function current_route_pattern()\n {\n return RouteController::getCurrentRoute()['pattern'] ?? '';\n }", "function preg($pattern){\n return new Parser(['_call_preg', [$pattern]]);\n}", "public function regex()\n {\n return 'https?://vine.co/v/(\\w+)';\n }", "public function get_clean_regex ($part) {\n\t\treturn '/' . preg_quote($this->get_clean_macro($part), '/') . '/';\n\t}", "public static function regexToPattern(string $regex, string $modifiers = '') : string\n\t{\n\t\t/*\n\t\tTo convert a regex to a pattern, we must wrap the pattern in delimiters (we'll use a pair of\n\t\tforward slashes) and append the modifiers. We must also be sure to escape any unescaped\n\t\toccurrences of the delimiter within the regex, and to escape a regex-ending escape\n\t\t(which, if left alone, would end up escaping the delimiter we append).\n\n\t\tWe can't just blindly escape embedded delimiters, because it would break a regex containing\n\t\tan already-escaped delimiter. For example, if the regex is '\\/', a blind escape results\n\t\tin '\\\\/' which would not work when eventually wrapped with delimiters: '/\\\\//'.\n\n\t\tRather, we'll break down the regex into sections: escaped characters, unescaped forward\n\t\tslashes (which we'll need to escape), and everything else. As a special case, we also look out\n\t\tfor, and escape, a regex-ending escape.\n\t\t*/\n\t\tif (! preg_match('~\\\\\\\\(?:/|$)~s', $regex)) /* '/' followed by '\\' or EOS */\n\t\t{\n\t\t\t/*\n\t\t\tThere are no already-escaped forward slashes, and no escape at the end,\n\t\t\tso it's safe to blindly escape forward slashes.\n\t\t\t*/\n\t\t\t$cooked = str_replace('/', '\\/', $regex);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\tThis is the pattern we'll use to parse $regex.\n\t\t\tThe two parts whose matches we'll need to escape are within capturing parens.\n\t\t\t*/\n\t\t\t$pattern = '~\t\t(?> [^\\\\\\\\/]+ | \\\\\\\\. )*\n\t\t\t\t\t\t\t\t\\K\n\t\t\t\t\t\t\t|\t( / | \\\\\\\\$ )\n\t\t\t\t\t\t~sx';\n\t\t\t/*\n\t\t\tOur callback function is called upon each successful match of $pattern in $regex.\n\t\t\tIf $matches[0] is not empty, we return an escaped version of it.\n\t\t\tOtherwise, we simply return what was matched unmodified.\n\t\t\t*/\n\t\t\t/* Actually apply $pattern to $regex, yielding $cooked */\n\t\t\t$cooked = preg_replace_callback($pattern, function (array $m) : string {\n return strlen($m[0]) ? '\\\\' . $m[0] : '';\n }, $regex);\n\t\t}\n\t\t/* $cooked is now safe to wrap -- do so, append the modifiers, and return */\n\t\treturn '/' . $cooked . '/' . $modifiers;\n\t}", "public function getPatterns()\n {\n return $this->patterns;\n }", "public function getPatterns()\n {\n return $this->patterns;\n }", "public function getUsernameRegexPattern();", "public function __toString(): string\n\t{\n\t\treturn $this->pattern;\n\t}", "public function compileRegex()\n {\n $route = $this->route->getUri();\n\n if (strpos($route, '?')) {\n $route = preg_replace('@\\/{([\\w]+)\\?}@', '(?:/{$1})?', $route);\n }\n\n $route = preg_replace('/{([a-z0-9_-]+)}/i', '(?P<$1>[^/]+)', $route);\n\n if(substr($route, -1) === '/') {\n $route .= '?';\n }\n\n return \"%^{$route}$%s\";\n }", "protected function getPattern()\n {\n $region = $this->resolveRegion();\n switch ($this->type) {\n case \"html\":\n $outputPattern = \"{{depend}}{{prefix}} {{/depend}}{{firstname}} {{depend}}{{middlename}} {{/depend}}\"\n . \"{{lastname}}{{depend}} {{suffix}}{{/depend}}\\n{{depend}}{{company}}\\n{{/depend}}{{street}}\\n\"\n . \"{{city}}, {{{$region}}}, {{postcode}}\\n{{country_id}}\\n{{depend}}T: {{telephone}}{{/depend}}\"\n . \"{{depend}}\\nF: {{fax}}{{/depend}}{{depend}}\\nVAT: {{vat_id}}{{/depend}}\";\n break;\n case \"oneline\":\n default:\n $outputPattern = \"{{depend}}{{prefix}} {{/depend}}{{firstname}} {{depend}}{{middlename}} {{/depend}}\"\n . \"{{lastname}}{{depend}} {{suffix}}{{/depend}}, {{street}}, \"\n . \"{{city}}, {{{$region}}} {{postcode}}, {{country_id}}\";\n break;\n }\n return $outputPattern;\n }", "function getDirNameRegex() {\n return $this->dirNameRegex;\n }", "public static function getPatternUrl()\n {\n return handles('antares::automation');\n }", "private function extractRegex($pattern, $info)\n {\n $matches = array();\n preg_match($pattern, $info, $matches);\n return $matches[1];\n }", "public function regularize($pattern) {\n $pattern = preg_quote($pattern, '/');\n $pattern = preg_replace('/\\\\\\{(.*)\\\\\\}/U', '(.*)', $pattern); //numeric\n $pattern = '/' . $pattern . '$/U';\n return $pattern;\n }", "protected function getPattern(): string\n\t{\n\t\treturn $this->getDirectory() . $this->getGroup() . 'data_*_localized.json';\n\t}", "function ereg_to_pcre($pattern, $modifiers = '')\n {\n static $digit = '\\d';\n static $upper = 'A-Z';\n static $lower = 'a-z';\n static $punct = '!\"#$%&\\'()*+,\\-.\\\\/:;<=>?@[\\\\\\\\\\\\]^_`{|}~';\n static $space = '\\s';\n static $blank = '\\t ';\n static $cntrl = '\\x00-\\x1f\\x7f';\n\n $pattern = preg_replace_callback('/\\\\\\\\(.)/', function($match) {\n return strchr('.^[$()|*+?{\\\\', $match[1]) !== false ? $match[0] : $match[1];\n }, $pattern);\n\n return '/' . strtr(addcslashes($pattern, '/'), [\n '[:alnum:]' => $upper . $lower . $digit,\n '[:digit:]' => $digit,\n '[:punct:]' => $punct,\n\n '[:alpha:]' => $upper . $lower,\n '[:graph:]' => $punct . $upper . $lower . $digit,\n '[:space:]' => $space,\n\n '[:blank:]' => $blank,\n '[:lower:]' => $lower,\n '[:upper:]' => $upper,\n\n '[:cntrl:]' => $cntrl,\n '[:print:]' => $punct . $upper . $lower . $digit . ' ',\n '[:xdigit:]' => $digit . 'A-Fa-f',\n\n '[[:<:]]' => '',\n '[[:>:]]' => '',\n ]) . '/' . $modifiers;\n }" ]
[ "0.7925982", "0.786919", "0.7862552", "0.7862552", "0.78387994", "0.78374386", "0.78374386", "0.78092664", "0.7787735", "0.76967275", "0.76909226", "0.7678386", "0.7678386", "0.7669385", "0.76682717", "0.7578256", "0.75435853", "0.74267215", "0.7387651", "0.7387651", "0.73723114", "0.7362915", "0.7269246", "0.72680014", "0.7163547", "0.7116044", "0.70960176", "0.7091737", "0.7043482", "0.69601667", "0.6911085", "0.6807579", "0.6755822", "0.6753498", "0.6753498", "0.6705043", "0.6691161", "0.66879475", "0.6668497", "0.6625518", "0.6614686", "0.6570316", "0.6570316", "0.65524656", "0.65129757", "0.6490457", "0.6467133", "0.6406596", "0.6405212", "0.63837904", "0.6336153", "0.6314528", "0.62570286", "0.62368244", "0.6235915", "0.62160826", "0.6212891", "0.62073445", "0.61757404", "0.6154177", "0.61428845", "0.613872", "0.61368924", "0.6129929", "0.61295307", "0.610216", "0.6089173", "0.6058878", "0.6048556", "0.603427", "0.60208577", "0.60195357", "0.6016701", "0.59744847", "0.59735006", "0.5958002", "0.5956869", "0.5953099", "0.5952851", "0.5952791", "0.5934978", "0.5929906", "0.58945113", "0.5888027", "0.5865395", "0.5856406", "0.5838417", "0.58368284", "0.5835038", "0.5816862", "0.5816862", "0.5788115", "0.5770829", "0.5759453", "0.5759044", "0.5708644", "0.5685992", "0.5682799", "0.5677798", "0.5667886", "0.56603366" ]
0.0
-1
Get the CSS classes needed to display the svg inline. This is meant to mimic how fa's js>svg works.
private function getInlineSvgClasses(string $name, int $width, int $height) : string { return implode(' ', [ $this->defaultReplacementClass, // $name, 'fa-w-' . ceil($width / $height * 16), // widthClass ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSvgIcon();", "public function graphic(): array\n {\n return $this->classes;\n }", "public function getCssClasses(): array;", "public function getFigureClassNames()\n {\n $classes = $this->styles('figure');\n \n $this->extend('updateFigureClassNames', $classes);\n \n return $classes;\n }", "function get_classes()\n\t{\n\t\treturn ($this->has_ok?\"blue\":($this->special_tags?\"white\":\"red\"));\n\t}", "public function parse_svg() {\n\t\t$files = $this->get_all_svg_files();\n\t\tif ( empty( $files ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Get the allowed tags to parse icon's ids\n\t\t *\n\t\t * @param string $allowed_tags : Passed directly to strip_tags\n\t\t *\n\t\t * @return string\n\t\t * @since 2.0.1\n\t\t *\n\t\t * @author david-treblig\n\t\t */\n\t\t$allowed_tags = apply_filters( 'acf_svg_icon_svg_parse_tags', '<symbol><g>' );\n\n\t\t$out = array();\n\n\t\t// Ignore SVG with type media to check if there are multiple sprite\n\t\t$custom_files = array_filter(\n\t\t\t$files,\n\t\t\tfunction ( $file ) {\n\t\t\t\treturn 'media' !== $file['type'];\n\t\t\t}\n\t\t);\n\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( ! is_file( $file['file'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( 'media' === $file['type'] ) {\n\t\t\t\t$pathinfo = pathinfo( $file['file'] );\n\t\t\t\t$out[] = array(\n\t\t\t\t\t'id' => $file['id'],\n\t\t\t\t\t'text' => self::get_nice_display_text( $pathinfo['filename'], false ),\n\t\t\t\t\t'url' => $file['file_url'],\n\t\t\t\t\t'disabled' => false,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// If not extract them from the CSS file.\n\t\t\t\t$contents = file_get_contents( $file['file'] );\n\t\t\t\tpreg_match_all( '/id=\"(\\S+)\"/m', strip_tags( $contents, $allowed_tags ), $svg );\n\n\t\t\t\tforeach ( $svg[1] as $id ) {\n\t\t\t\t\t$id = sanitize_title( $id );\n\t\t\t\t\t// If multiple sprites registered, return sprite name and icon name, otherwise return icon name only\n\t\t\t\t\t$value = 1 < count( $custom_files ) ? basename( $file['file'] ) . '#' . $id : $id;\n\t\t\t\t\t$out[] = array(\n\t\t\t\t\t\t'id' => $value,\n\t\t\t\t\t\t'text' => self::get_nice_display_text( $id ),\n\t\t\t\t\t\t'disabled' => false,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn apply_filters( 'acf_svg_icon_parsed_svg', $out, $files );\n\t}", "function wp_get_global_styles_svg_filters()\n {\n }", "public function getIconClass()\n {\n return $this->iconClass;\n }", "function wp_global_styles_render_svg_filters()\n {\n }", "public function getClassNames()\n {\n $classes = array_merge(\n parent::getClassNames(),\n [\n $this->IconSizeClass,\n $this->CornerStyleClass\n ]\n );\n \n return $classes;\n }", "public static function svgIcon()\n {\n return '<svg class=\"sidebar-icon icon-location\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"var(--sidebar-icon)\" d=\"M5.64 16.36a9 9 0 1 1 12.72 0l-5.65 5.66a1 1 0 0 1-1.42 0l-5.65-5.66zm11.31-1.41a7 7 0 1 0-9.9 0L12 19.9l4.95-4.95zM12 14a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4z\" /></svg>';\n }", "public function classNames(): array {\n\t\treturn $this->m_attributes[\"class\"];\n\t}", "function getEmbedSVG() {return $this->_embedsvg;}", "function sIcon($icon, $class = null)\n {\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"' . $class . '\"><use xlink:href=\"#' . $icon . '\"></use></svg>';\n }", "public function getSpriteIconClassesWithOnePartReturnsT3Icon() {}", "public function getImageClassNames()\n {\n $classes = $this->styles('figure.image', 'image.fluid');\n \n $this->extend('updateImageClassNames', $classes);\n \n return $classes;\n }", "public static function get_all_icons_svg() {\n if ( self::$icon_svgs && is_object( self::$icon_svgs ) ) {\n return self::$icon_svgs;\n }\n $directory = get_template_directory() . '/assets/images/icons/svg/';\n $icons = [];\n $iterator = new \\DirectoryIterator( $directory );\n foreach ( $iterator as $file ) {\n if ( ! $file->isFile() ) {\n continue;\n }\n $parts = explode( '.', $file->getFilename() );\n if ( empty( $parts[1] ) || 'svg' != $parts[1] ) {\n continue;\n }\n $icon_name = $parts[0];\n $icon = static::get_icon( $icon_name );\n $icons[ $icon_name ] = (object) [\n 'svg' => $icon,\n 'label' => $icon_name,\n ];\n }\n ksort( $icons );\n self::$icon_svgs = $icons;\n return self::$icon_svgs;\n }", "private function getCSS()\n\t{\n\t\t$prefix = $this->getPrefix();\n\t\tlist($firstElement, $lastElement) = $this->getBounds();\n\t\t$isFirst = ($firstElement == $this->element);\n\t\t$isLast = ($lastElement == $this->element);\n\t\t$hasChildren = ($this->element->ContainerElement->Children->Count() > 0);\n\t\t$CSSClasses = [];\n\t\t\n\t\tif ($isFirst && $isLast) {\n\t\t\t$CSSClasses[] = \"$prefix-last\";\n\t\t} else if ($isFirst) {\n\t\t\t$CSSClasses[] = \"$prefix-first\";\n\t\t} else if ($isLast) {\n\t\t\t$CSSClasses[] = \"$prefix-last\";\n\t\t}\n\t\tif ($hasChildren) {\n\t\t\t$CSSClasses[] = \"$prefix-parent\";\n\t\t}\n\t\tif ($this->element->GetCollapsed()) {\n\t\t\t$CSSClasses[] = \"$prefix-collapsed\";\n\t\t}\n\t\tif ($this->element->GetDisabled()) {\n\t\t\t$CSSClasses[] = \"$prefix-item-disabled\";\n\t\t}\n\t\treturn array_merge($this->element->CSSClass, $CSSClasses);\n\t}", "public function classNamesString(): string {\n\t\treturn implode(\" \", $this->m_attributes[\"class\"]);\n\t}", "public function getCssClass(): string;", "public function getIconClass() {\n\n $iconList = new IconList();\n return $iconList->getIconClass( $this->getWeather()->getId());\n }", "function svg($file, $path = null, $color = '#fff', $class = null) {\n\n\t$path = (is_null($path))?'':(substr($path, -1) == '/')?substr($path, 0, -1):$path.'/';\n\t$class = (is_null($class))?'':' '.$class;\n\t$file = (substr($file, -4) == '.svg')?substr($file, 0, -4):$file;\n\n\n\t$svg_path = config('front_end.path.svg').'/'.$path.''.$file.'.svg';\n\t$svg = ($color != '#fff')?implode($color, explode('#fff', Storage::get($svg_path))):Storage::get($svg_path);\n\n\t\n\t$render = $svg;\n\t\n\treturn $render;\n}", "protected function _getCSSClassNames()\n {\n return $this->_classes;\n }", "function wprt_element_classes( $elm ) {\n\t// Get element style from theme mod\n\t$style = wprt_get_mod( $elm, 'style-1' );\n\n\t// Return classes for element\n\treturn esc_attr( $style );\n}", "public function get_medias_svg() {\n\t\t$args = array(\n\t\t\t'post_type' => 'attachment',\n\t\t\t'posts_per_page' => '-1',\n\t\t\t'post_status' => 'inherit',\n\t\t\t'post_mime_type' => 'image/svg+xml',\n\t\t);\n\n\t\t/**\n\t\t * Filter WP Query get attachments args\n\t\t *\n\t\t * @param array $args\n\t\t *\n\t\t * @since 2.0.0\n\t\t *\n\t\t */\n\t\t$args = apply_filters( 'acf_svg_icon_wp_medias_svg_args', $args );\n\n\t\t$attachments = new WP_Query( $args );\n\t\tif ( empty( $attachments->posts ) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$svg = array();\n\t\tforeach ( $attachments->posts as $attachment ) {\n\t\t\t$svg[] = [\n\t\t\t\t'type' => 'media',\n\t\t\t\t'id' => $attachment->ID,\n\t\t\t\t'file' => get_attached_file( $attachment->ID ),\n\t\t\t\t'file_url' => wp_get_attachment_url( $attachment->ID ),\n\t\t\t];\n\t\t}\n\n\t\treturn $svg;\n\t}", "public function GetSVGHeader() {\r\n\r\n $html = <<<EOD\r\n <svg \r\n xmlns=\"http://www.w3.org/2000/svg\" \r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\" \r\n x=\"0px\" y=\"0px\" \r\n version=\"1.1\"\r\n width=\"250px\" \r\n height=\"235px\" \r\n viewBox=\"0 0 250 235\" \r\n enable-background=\"new 0 0 250 235\" \r\n xml:space=\"preserve\">\r\nEOD;\r\n return $html;\r\n }", "public function getAuthenticationTypeIconHTML()\n {\n $svgData = file_get_contents(DIR_BASE_CORE . '/images/authentication/community/concrete.svg');\n $publicSrc = '/concrete/images/authentication/community/concrete.svg';\n\n return \"<div class='ccm-concrete-authentication-type-svg' data-src='{$publicSrc}'>{$svgData}</div>\";\n }", "function inline_svg($src)\n{\n return Stringy::collapseWhitespace(\n File::get(statamic_path(\"resources/dist/svg/{$src}.svg\"))\n );\n}", "public static function nativeIcon(string $icon, array $class = [])\n {\n $flag = 'a';\n if (strpos($icon, ':') !== false) {\n [$flag, $icon] = explode(':', $icon) + [2 => null];\n }\n\n if ($flag !== 'b') {\n return '';\n }\n\n array_unshift($class, 'bsw-icon');\n\n return Html::tag(\n 'svg',\n Html::tag('use', null, ['xlink:href' => \"#{$icon}\"]),\n [\n 'class' => $class,\n 'aria-hidden' => true,\n ]\n );\n }", "protected function getContainerClasses()\n {\n return array(\n 'quform-element',\n 'quform-element-group',\n sprintf('quform-element-%s', $this->getIdentifier()),\n 'quform-cf',\n sprintf('quform-group-style-%s', $this->config('groupStyle'))\n );\n }", "private function getSvgRegex() : string\n {\n return '~^\n <svg\\s.+viewBox=\"(?P<viewBox>0\\s0\\s(?P<width>\\d+)\\s(?P<height>\\d+))\"> # opening <svg> with width and height (from viewBox attribute)\n <!--.+--> # Font Awesome License Comment\n (?: # optional style definitions, used by duotone\n <defs>\n <style>\n (?P<style>.+) # capture group \"styles\" for the styles\n </style>\n </defs>\n )?\n (?P<paths> # capture group \"paths\"\n (?:\n <path # opening <path>\n \\s.+? # path contents\n (?:/>|></path>) # either self closing /> or closing </path>\n ){1,2} # match 1-2 <path>\n )\n </svg> # closing </svg>\n $~x';\n }", "public function classes()\n {\n\n $class = [];\n\n $color = $this->getColorClass();\n\n if ($color)\n {\n $class[$color] = $color;\n }\n\n $size = $this->getSizeClass();\n\n if ($size)\n {\n $class[$size] = $size;\n }\n\n $parent_classes = parent::classes();\n\n $class += $parent_classes;\n\n return $class;\n }", "function pc_svg( $index, $color = '', $css = 'svg-block', $hidden = true ) {\n\n\tglobal $sprite; // cf. images/sprite.php\n\t$svg = $sprite[$index];\n\n\t// no print\n\t$svg = str_replace('<svg', '<svg class=\"no-print\"', $svg);\n\n\t// couleur\n\tif ( $color != '' ) {\t$svg = str_replace('fill=\"#fff\"', 'fill=\"'.$color.'\"', $svg); }\n\n\t// aria hidden\n\tif ( $hidden ) { $svg = str_replace('<svg', '<svg aria-hidden=\"true\" focusable=\"false\"', $svg); }\n\n\t// css\n\t$svg = str_replace('class=\"no-print\"', 'class=\"no-print '.$css.'\"', $svg);\n\n\treturn $svg;\n\n}", "function av_icon_class($font)\n{\n\tglobal $avia_config;\n\treturn 'avia-font-'.$avia_config['font_icons'][$font]['font'];\n}", "public function getClassString()\r\n\t{\r\n\t\treturn is_null($this->classes) ? 'slidejs' : 'slidejs '.$this->classes;\r\n\t}", "private function get_svg_files_path() {\n\t\t$custom_svg_path_icons = apply_filters( 'acf_svg_icon_filepath', array() );\n\n\t\treturn array_map( function ( $val ) {\n\t\t\treturn [\n\t\t\t\t'type' => 'custom',\n\t\t\t\t'file' => $val,\n\t\t\t];\n\t\t}, (array) $custom_svg_path_icons );\n\t}", "public function getClassNamesForContainer()\n {\n $classes = ['container'];\n \n if ($this->owner->isEdgeToEdge()) {\n $classes[] = $this->style('row.edge-to-edge');\n }\n \n return $classes;\n }", "function wprt_preloader_class() {\n\t// Get preloader option from theme mod\n\t$class = wprt_get_mod( 'preloader', 'animsition' );\n\n\t// Return classes for element\n\treturn esc_attr( $class );\n}", "function displayClasses($slideAttributes)\n {\n $classes = array();\n foreach($slideAttributes as $key => $attribute) {\n if($key == 'effect') {\n $classes[] = $attribute;\n } elseif($key == 'visible-on') {\n $attributes = explode(' ', $attribute);\n $items = array();\n foreach($attributes as $item) {\n $items[] = 'visible-'.$item;\n }\n $classes = array_merge($classes, $items);\n } elseif($key == 'hidden-on') {\n $attributes = explode(' ', $attribute);\n $items = array();\n foreach($attributes as $item) {\n $items[] = 'hidden-'.$item;\n }\n $classes = array_merge($classes, $items);\n }\n }\n\n return implode(' ', $classes);\n }", "public function get_style_depends() {\n\t\tif ( Icons_Manager::is_migration_allowed() ) {\n\t\t\treturn array(\n\t\t\t\t'elementor-icons-fa-solid',\n\t\t\t\t'elementor-icons-fa-brands',\n\t\t\t);\n\t\t}\n\t\treturn array();\n\t}", "public function cssClass()\n {\n return $this->class;\n }", "public function getIconList()\n {\n $icons = [];\n foreach (['FAR', 'FAL', 'FAS', 'FAB', 'FAD'] as $type) {\n $prefix = strtolower($type);\n $ref = new \\ReflectionClass('futuretek\\fontawesome\\\\' . $type);\n foreach ($ref->getConstants() as $name => $icon) {\n if (0 !== strpos($name, '_')) {\n continue;\n }\n $icons[] = '\"' . $prefix . ' ' . $icon . '\"';\n }\n }\n\n return implode(',', $icons);\n }", "function ux_enable_svg( $mimes ){\r\n $mimes['svg'] = 'image/svg+xml';\r\n return $mimes;\r\n}", "protected function extractSvgImageSizes() {}", "function bwsocial_include_svg() {\n\t$path = '/images/social-logos.svg';\n\t$svg_icons = rtrim( plugin_dir_path(__FILE__), '/' );\n\tif ( ! empty( $path ) && is_string( $path) ) {\n\t\t$svg_icons .= '/' . ltrim( $path, '/' );\n\t}\n\n\t/**\n\t * Filter BW Social Icons Sprite.\n\t *\n\t * @since 1.0.0\n\t *\n\t * @param string Absolute directory path to SVG sprite\n\t */\n\t$svg_icons = apply_filters( 'bigwing/bigwing_social/sprite', $svg_icons );\n\n\t// If it exists, include it.\n\tif ( file_exists( $svg_icons ) ) {\n\t\techo '<div style=\"position: absolute; height: 0; width: 0; overflow: hidden;\">';\n\t\trequire_once( $svg_icons );\n\t\techo '</div>';\n\t}\n}", "public function display_svg() {\n\t\t/**\n\t\t * The svg's files URLs\n\t\t *\n\t\t * @param array $font_urls the default svg file url\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t */\n\t\t$files = $this->get_all_svg_files();\n\t\tif ( empty( $files ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( ! is_file( $file['file'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$svg = file_get_contents( $file['file'] );\n\n\t\t\tif ( true === strpos( $svg, 'style=\"' ) ) {\n\t\t\t\t$svg = str_replace( 'style=\"', 'style=\"display:none; ', $svg );\n\t\t\t} else {\n\t\t\t\t$svg = str_replace( '<svg ', '<svg style=\"display:none;\" ', $svg );\n\t\t\t}\n\n\t\t\techo $svg;\n\t\t}\n\t}", "function svg_mime_types( $mimes ){\n $mimes['svg'] = 'image/svg+xml';\n return $mimes;}", "public function getTagClasses();", "function proplumbing_esc_svg($svg){\n $kses_defaults = wp_kses_allowed_html('post');\n\n $svg_args = array(\n 'svg' => array(\n 'class' => true,\n 'id' => true,\n 'xmlns' => true,\n 'viewbox' => true,\n 'width' => true,\n 'height' => true\n ),\n 'defs' => array(),\n 'title' => array(),\n 'g' => array(\n 'id' => true\n ),\n 'path' => array(\n 'class' => true,\n 'd' => true,\n 'fill' => true\n ),\n 'rect' => array(\n 'class' => true,\n 'x' => true,\n 'y' => true,\n 'width' => true,\n 'height' => true,\n 'transform' => true,\n 'fill' => true\n ),\n 'polygon' => array(\n 'class' => true,\n 'points' => true,\n 'fill' => true\n )\n );\n\n $allowed_tags = array_merge($kses_defaults, $svg_args);\n echo wp_kses($svg, $allowed_tags);\n}", "public function getCssClassesForContainer(): string\n {\n $colsXl = $this->getWidth() >= 100 ? 12 : ceil(12 * ($this->getWidth() / 100));\n $colsXlLeft = floor((12 - $colsXl) / 2);\n $colsLg = $colsXl >= 10 ? 12 : $colsXl + 2;\n $colsLgLeft = floor((12 - $colsLg) / 2);\n return \"col-xs-12 col-xl-{$colsXl} col-lg-{$colsLg} col-xl-offset-{$colsXlLeft} col-lg-offset-{$colsLgLeft}\";\n }", "public function get_menu_icon() {\n\t\tob_start();\n\t\t?>\n\t\t<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 292 337.2\" style=\"enable-background:new 0 0 292 337.2;\" xml:space=\"preserve\">\n\t\t\t<style type=\"text/css\">\n\t\t\t\t.st0 {\n\t\t\t\t\tfill: #FFFFFF;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<g id=\"Beehive\">\n\t\t\t\t<polygon class=\"st0\" points=\"125.4,153.4 177.1,201.3 183,195 145,121.7 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"81,112.3 106.5,135.9 147,70.2 201.6,175.6 290.2,83.2 146,0 0,84.3 0,204.1 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"292,170.4 292,116.8 213.9,199.2 224.6,220.1 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"215.8,258.2 195.3,218.8 178.2,236.9 111.8,175.4 47.1,280 146,337.2 292,252.9 292,201.5 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"93,158 82.8,148.7 0,242.2 0,252.9 25.5,267.6 \t\"/>\n\t\t\t</g>\n\t\t</svg>\n\t\t<?php\n\t\t$svg = ob_get_clean();\n\n\t\treturn 'data:image/svg+xml;base64,' . base64_encode( $svg );\n\t}", "public function getSpriteIconClassesWithEmptyStringReturnsT3Icon() {}", "function svg_mime_types( $mimes ) {\n\t$mimes['svg'] = 'image/svg+xml';\n\n\treturn $mimes;\n}", "function social_networks_attr() {\n\n\t\t$attr = array(\n\t\t\t'class' => 'fusion-social-networks',\n\t\t);\n\n\t\tif ( 'yes' == self::$args['icons_boxed'] ) {\n\t\t\t$attr['class'] .= ' boxed-icons';\n\t\t}\n\n\t\treturn $attr;\n\n\t}", "function getIconClass($notification) {\n\t\tswitch ($notification->getType()) {\n\t\t\tcase NOTIFICATION_TYPE_PUBLISHED_ISSUE:\n\t\t\t\treturn 'notifyIconPublished';\n\t\t\tcase NOTIFICATION_TYPE_NEW_ANNOUNCEMENT:\n\t\t\t\treturn 'notifyIconNewAnnouncement';\n\t\t\tcase NOTIFICATION_TYPE_BOOK_REQUESTED:\n\t\t\tcase NOTIFICATION_TYPE_BOOK_CREATED:\n\t\t\tcase NOTIFICATION_TYPE_BOOK_UPDATED:\n\t\t\tcase NOTIFICATION_TYPE_BOOK_DELETED:\n\t\t\tcase NOTIFICATION_TYPE_BOOK_MAILED:\n\t\t\tcase NOTIFICATION_TYPE_BOOK_SETTINGS_SAVED:\n\t\t\tcase NOTIFICATION_TYPE_BOOK_SUBMISSION_ASSIGNED:\n\t\t\tcase NOTIFICATION_TYPE_BOOK_AUTHOR_ASSIGNED:\n\t\t\tcase NOTIFICATION_TYPE_BOOK_AUTHOR_DENIED:\n\t\t\tcase NOTIFICATION_TYPE_BOOK_AUTHOR_REMOVED:\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_SUCCESS:\n\t\t\t\treturn 'notifyIconSuccess';\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_NO_GIFT_TO_REDEEM:\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_GIFT_ALREADY_REDEEMED:\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_GIFT_INVALID:\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_SUBSCRIPTION_TYPE_INVALID:\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_SUBSCRIPTION_NON_EXPIRING:\n\t\t\t\treturn 'notifyIconError';\n\t\t\tdefault: return parent::getIconClass($notification);\n\t\t}\n\t}", "public function icons() {\n\n\t\t$solid_icons = array(\n\t\t\t\"fas-f641\" => \"fas fa-ad\",\n\t\t\t\"fas-f2b9\" => \"fas fa-address-book\",\n\t\t\t\"fas-f2bb\" => \"fas fa-address-card\",\n\t\t\t\"fas-f042\" => \"fas fa-adjust\",\n\t\t\t\"fas-f5d0\" => \"fas fa-air-freshener\",\n\t\t\t\"fas-f037\" => \"fas fa-align-center\",\n\t\t\t\"fas-f039\" => \"fas fa-align-justify\",\n\t\t\t\"fas-f036\" => \"fas fa-align-left\",\n\t\t\t\"fas-f038\" => \"fas fa-align-right\",\n\t\t\t\"fas-f461\" => \"fas fa-allergies\",\n\t\t\t\"fas-f0f9\" => \"fas fa-ambulance\",\n\t\t\t\"fas-f2a3\" => \"fas fa-american-sign-language-interpreting\",\n\t\t\t\"fas-f13d\" => \"fas fa-anchor\",\n\t\t\t\"fas-f103\" => \"fas fa-angle-double-down\",\n\t\t\t\"fas-f100\" => \"fas fa-angle-double-left\",\n\t\t\t\"fas-f101\" => \"fas fa-angle-double-right\",\n\t\t\t\"fas-f102\" => \"fas fa-angle-double-up\",\n\t\t\t\"fas-f107\" => \"fas fa-angle-down\",\n\t\t\t\"fas-f104\" => \"fas fa-angle-left\",\n\t\t\t\"fas-f105\" => \"fas fa-angle-right\",\n\t\t\t\"fas-f106\" => \"fas fa-angle-up\",\n\t\t\t\"fas-f556\" => \"fas fa-angry\",\n\t\t\t\"fas-f644\" => \"fas fa-ankh\",\n\t\t\t\"fas-f5d1\" => \"fas fa-apple-alt\",\n\t\t\t\"fas-f187\" => \"fas fa-archive\",\n\t\t\t\"fas-f557\" => \"fas fa-archway\",\n\t\t\t\"fas-f358\" => \"fas fa-arrow-alt-circle-down\",\n\t\t\t\"fas-f359\" => \"fas fa-arrow-alt-circle-left\",\n\t\t\t\"fas-f35a\" => \"fas fa-arrow-alt-circle-right\",\n\t\t\t\"fas-f35b\" => \"fas fa-arrow-alt-circle-up\",\n\t\t\t\"fas-f0ab\" => \"fas fa-arrow-circle-down\",\n\t\t\t\"fas-f0a8\" => \"fas fa-arrow-circle-left\",\n\t\t\t\"fas-f0a9\" => \"fas fa-arrow-circle-right\",\n\t\t\t\"fas-f0aa\" => \"fas fa-arrow-circle-up\",\n\t\t\t\"fas-f063\" => \"fas fa-arrow-down\",\n\t\t\t\"fas-f060\" => \"fas fa-arrow-left\",\n\t\t\t\"fas-f061\" => \"fas fa-arrow-right\",\n\t\t\t\"fas-f062\" => \"fas fa-arrow-up\",\n\t\t\t\"fas-f0b2\" => \"fas fa-arrows-alt\",\n\t\t\t\"fas-f337\" => \"fas fa-arrows-alt-h\",\n\t\t\t\"fas-f338\" => \"fas fa-arrows-alt-v\",\n\t\t\t\"fas-f2a2\" => \"fas fa-assistive-listening-systems\",\n\t\t\t\"fas-f069\" => \"fas fa-asterisk\",\n\t\t\t\"fas-f1fa\" => \"fas fa-at\",\n\t\t\t\"fas-f558\" => \"fas fa-atlas\",\n\t\t\t\"fas-f5d2\" => \"fas fa-atom\",\n\t\t\t\"fas-f29e\" => \"fas fa-audio-description\",\n\t\t\t\"fas-f559\" => \"fas fa-award\",\n\t\t\t\"fas-f77c\" => \"fas fa-baby\",\n\t\t\t\"fas-f77d\" => \"fas fa-baby-carriage\",\n\t\t\t\"fas-f55a\" => \"fas fa-backspace\",\n\t\t\t\"fas-f04a\" => \"fas fa-backward\",\n\t\t\t\"fas-f7e5\" => \"fas fa-bacon\",\n\t\t\t\"fas-f666\" => \"fas fa-bahai\",\n\t\t\t\"fas-f24e\" => \"fas fa-balance-scale\",\n\t\t\t\"fas-f515\" => \"fas fa-balance-scale-left\",\n\t\t\t\"fas-f516\" => \"fas fa-balance-scale-right\",\n\t\t\t\"fas-f05e\" => \"fas fa-ban\",\n\t\t\t\"fas-f462\" => \"fas fa-band-aid\",\n\t\t\t\"fas-f02a\" => \"fas fa-barcode\",\n\t\t\t\"fas-f0c9\" => \"fas fa-bars\",\n\t\t\t\"fas-f433\" => \"fas fa-baseball-ball\",\n\t\t\t\"fas-f434\" => \"fas fa-basketball-ball\",\n\t\t\t\"fas-f2cd\" => \"fas fa-bath\",\n\t\t\t\"fas-f244\" => \"fas fa-battery-empty\",\n\t\t\t\"fas-f240\" => \"fas fa-battery-full\",\n\t\t\t\"fas-f242\" => \"fas fa-battery-half\",\n\t\t\t\"fas-f243\" => \"fas fa-battery-quarter\",\n\t\t\t\"fas-f241\" => \"fas fa-battery-three-quarters\",\n\t\t\t\"fas-f236\" => \"fas fa-bed\",\n\t\t\t\"fas-f0fc\" => \"fas fa-beer\",\n\t\t\t\"fas-f0f3\" => \"fas fa-bell\",\n\t\t\t\"fas-f1f6\" => \"fas fa-bell-slash\",\n\t\t\t\"fas-f55b\" => \"fas fa-bezier-curve\",\n\t\t\t\"fas-f647\" => \"fas fa-bible\",\n\t\t\t\"fas-f206\" => \"fas fa-bicycle\",\n\t\t\t\"fas-f84a\" => \"fas fa-biking\",\n\t\t\t\"fas-f1e5\" => \"fas fa-binoculars\",\n\t\t\t\"fas-f780\" => \"fas fa-biohazard\",\n\t\t\t\"fas-f1fd\" => \"fas fa-birthday-cake\",\n\t\t\t\"fas-f517\" => \"fas fa-blender\",\n\t\t\t\"fas-f6b6\" => \"fas fa-blender-phone\",\n\t\t\t\"fas-f29d\" => \"fas fa-blind\",\n\t\t\t\"fas-f781\" => \"fas fa-blog\",\n\t\t\t\"fas-f032\" => \"fas fa-bold\",\n\t\t\t\"fas-f0e7\" => \"fas fa-bolt\",\n\t\t\t\"fas-f1e2\" => \"fas fa-bomb\",\n\t\t\t\"fas-f5d7\" => \"fas fa-bone\",\n\t\t\t\"fas-f55c\" => \"fas fa-bong\",\n\t\t\t\"fas-f02d\" => \"fas fa-book\",\n\t\t\t\"fas-f6b7\" => \"fas fa-book-dead\",\n\t\t\t\"fas-f7e6\" => \"fas fa-book-medical\",\n\t\t\t\"fas-f518\" => \"fas fa-book-open\",\n\t\t\t\"fas-f5da\" => \"fas fa-book-reader\",\n\t\t\t\"fas-f02e\" => \"fas fa-bookmark\",\n\t\t\t\"fas-f84c\" => \"fas fa-border-all\",\n\t\t\t\"fas-f850\" => \"fas fa-border-none\",\n\t\t\t\"fas-f853\" => \"fas fa-border-style\",\n\t\t\t\"fas-f436\" => \"fas fa-bowling-ball\",\n\t\t\t\"fas-f466\" => \"fas fa-box\",\n\t\t\t\"fas-f49e\" => \"fas fa-box-open\",\n\t\t\t\"fas-f95b\" => \"fas fa-box-tissue\",\n\t\t\t\"fas-f468\" => \"fas fa-boxes\",\n\t\t\t\"fas-f2a1\" => \"fas fa-braille\",\n\t\t\t\"fas-f5dc\" => \"fas fa-brain\",\n\t\t\t\"fas-f7ec\" => \"fas fa-bread-slice\",\n\t\t\t\"fas-f0b1\" => \"fas fa-briefcase\",\n\t\t\t\"fas-f469\" => \"fas fa-briefcase-medical\",\n\t\t\t\"fas-f519\" => \"fas fa-broadcast-tower\",\n\t\t\t\"fas-f51a\" => \"fas fa-broom\",\n\t\t\t\"fas-f55d\" => \"fas fa-brush\",\n\t\t\t\"fas-f188\" => \"fas fa-bug\",\n\t\t\t\"fas-f1ad\" => \"fas fa-building\",\n\t\t\t\"fas-f0a1\" => \"fas fa-bullhorn\",\n\t\t\t\"fas-f140\" => \"fas fa-bullseye\",\n\t\t\t\"fas-f46a\" => \"fas fa-burn\",\n\t\t\t\"fas-f207\" => \"fas fa-bus\",\n\t\t\t\"fas-f55e\" => \"fas fa-bus-alt\",\n\t\t\t\"fas-f64a\" => \"fas fa-business-time\",\n\t\t\t\"fas-f1ec\" => \"fas fa-calculator\",\n\t\t\t\"fas-f133\" => \"fas fa-calendar\",\n\t\t\t\"fas-f073\" => \"fas fa-calendar-alt\",\n\t\t\t\"fas-f274\" => \"fas fa-calendar-check\",\n\t\t\t\"fas-f783\" => \"fas fa-calendar-day\",\n\t\t\t\"fas-f272\" => \"fas fa-calendar-minus\",\n\t\t\t\"fas-f271\" => \"fas fa-calendar-plus\",\n\t\t\t\"fas-f273\" => \"fas fa-calendar-times\",\n\t\t\t\"fas-f784\" => \"fas fa-calendar-week\",\n\t\t\t\"fas-f030\" => \"fas fa-camera\",\n\t\t\t\"fas-f083\" => \"fas fa-camera-retro\",\n\t\t\t\"fas-f6bb\" => \"fas fa-campground\",\n\t\t\t\"fas-f786\" => \"fas fa-candy-cane\",\n\t\t\t\"fas-f55f\" => \"fas fa-cannabis\",\n\t\t\t\"fas-f46b\" => \"fas fa-capsules\",\n\t\t\t\"fas-f1b9\" => \"fas fa-car\",\n\t\t\t\"fas-f5de\" => \"fas fa-car-alt\",\n\t\t\t\"fas-f5df\" => \"fas fa-car-battery\",\n\t\t\t\"fas-f5e1\" => \"fas fa-car-crash\",\n\t\t\t\"fas-f5e4\" => \"fas fa-car-side\",\n\t\t\t\"fas-f8ff\" => \"fas fa-caravan\",\n\t\t\t\"fas-f0d7\" => \"fas fa-caret-down\",\n\t\t\t\"fas-f0d9\" => \"fas fa-caret-left\",\n\t\t\t\"fas-f0da\" => \"fas fa-caret-right\",\n\t\t\t\"fas-f150\" => \"fas fa-caret-square-down\",\n\t\t\t\"fas-f191\" => \"fas fa-caret-square-left\",\n\t\t\t\"fas-f152\" => \"fas fa-caret-square-right\",\n\t\t\t\"fas-f151\" => \"fas fa-caret-square-up\",\n\t\t\t\"fas-f0d8\" => \"fas fa-caret-up\",\n\t\t\t\"fas-f787\" => \"fas fa-carrot\",\n\t\t\t\"fas-f218\" => \"fas fa-cart-arrow-down\",\n\t\t\t\"fas-f217\" => \"fas fa-cart-plus\",\n\t\t\t\"fas-f788\" => \"fas fa-cash-register\",\n\t\t\t\"fas-f6be\" => \"fas fa-cat\",\n\t\t\t\"fas-f0a3\" => \"fas fa-certificate\",\n\t\t\t\"fas-f6c0\" => \"fas fa-chair\",\n\t\t\t\"fas-f51b\" => \"fas fa-chalkboard\",\n\t\t\t\"fas-f51c\" => \"fas fa-chalkboard-teacher\",\n\t\t\t\"fas-f5e7\" => \"fas fa-charging-station\",\n\t\t\t\"fas-f1fe\" => \"fas fa-chart-area\",\n\t\t\t\"fas-f080\" => \"fas fa-chart-bar\",\n\t\t\t\"fas-f201\" => \"fas fa-chart-line\",\n\t\t\t\"fas-f200\" => \"fas fa-chart-pie\",\n\t\t\t\"fas-f00c\" => \"fas fa-check\",\n\t\t\t\"fas-f058\" => \"fas fa-check-circle\",\n\t\t\t\"fas-f560\" => \"fas fa-check-double\",\n\t\t\t\"fas-f14a\" => \"fas fa-check-square\",\n\t\t\t\"fas-f7ef\" => \"fas fa-cheese\",\n\t\t\t\"fas-f439\" => \"fas fa-chess\",\n\t\t\t\"fas-f43a\" => \"fas fa-chess-bishop\",\n\t\t\t\"fas-f43c\" => \"fas fa-chess-board\",\n\t\t\t\"fas-f43f\" => \"fas fa-chess-king\",\n\t\t\t\"fas-f441\" => \"fas fa-chess-knight\",\n\t\t\t\"fas-f443\" => \"fas fa-chess-pawn\",\n\t\t\t\"fas-f445\" => \"fas fa-chess-queen\",\n\t\t\t\"fas-f447\" => \"fas fa-chess-rook\",\n\t\t\t\"fas-f13a\" => \"fas fa-chevron-circle-down\",\n\t\t\t\"fas-f137\" => \"fas fa-chevron-circle-left\",\n\t\t\t\"fas-f138\" => \"fas fa-chevron-circle-right\",\n\t\t\t\"fas-f139\" => \"fas fa-chevron-circle-up\",\n\t\t\t\"fas-f078\" => \"fas fa-chevron-down\",\n\t\t\t\"fas-f053\" => \"fas fa-chevron-left\",\n\t\t\t\"fas-f054\" => \"fas fa-chevron-right\",\n\t\t\t\"fas-f077\" => \"fas fa-chevron-up\",\n\t\t\t\"fas-f1ae\" => \"fas fa-child\",\n\t\t\t\"fas-f51d\" => \"fas fa-church\",\n\t\t\t\"fas-f111\" => \"fas fa-circle\",\n\t\t\t\"fas-f1ce\" => \"fas fa-circle-notch\",\n\t\t\t\"fas-f64f\" => \"fas fa-city\",\n\t\t\t\"fas-f7f2\" => \"fas fa-clinic-medical\",\n\t\t\t\"fas-f328\" => \"fas fa-clipboard\",\n\t\t\t\"fas-f46c\" => \"fas fa-clipboard-check\",\n\t\t\t\"fas-f46d\" => \"fas fa-clipboard-list\",\n\t\t\t\"fas-f017\" => \"fas fa-clock\",\n\t\t\t\"fas-f24d\" => \"fas fa-clone\",\n\t\t\t\"fas-f20a\" => \"fas fa-closed-captioning\",\n\t\t\t\"fas-f0c2\" => \"fas fa-cloud\",\n\t\t\t\"fas-f381\" => \"fas fa-cloud-download-alt\",\n\t\t\t\"fas-f73b\" => \"fas fa-cloud-meatball\",\n\t\t\t\"fas-f6c3\" => \"fas fa-cloud-moon\",\n\t\t\t\"fas-f73c\" => \"fas fa-cloud-moon-rain\",\n\t\t\t\"fas-f73d\" => \"fas fa-cloud-rain\",\n\t\t\t\"fas-f740\" => \"fas fa-cloud-showers-heavy\",\n\t\t\t\"fas-f6c4\" => \"fas fa-cloud-sun\",\n\t\t\t\"fas-f743\" => \"fas fa-cloud-sun-rain\",\n\t\t\t\"fas-f382\" => \"fas fa-cloud-upload-alt\",\n\t\t\t\"fas-f561\" => \"fas fa-cocktail\",\n\t\t\t\"fas-f121\" => \"fas fa-code\",\n\t\t\t\"fas-f126\" => \"fas fa-code-branch\",\n\t\t\t\"fas-f0f4\" => \"fas fa-coffee\",\n\t\t\t\"fas-f013\" => \"fas fa-cog\",\n\t\t\t\"fas-f085\" => \"fas fa-cogs\",\n\t\t\t\"fas-f51e\" => \"fas fa-coins\",\n\t\t\t\"fas-f0db\" => \"fas fa-columns\",\n\t\t\t\"fas-f075\" => \"fas fa-comment\",\n\t\t\t\"fas-f27a\" => \"fas fa-comment-alt\",\n\t\t\t\"fas-f651\" => \"fas fa-comment-dollar\",\n\t\t\t\"fas-f4ad\" => \"fas fa-comment-dots\",\n\t\t\t\"fas-f7f5\" => \"fas fa-comment-medical\",\n\t\t\t\"fas-f4b3\" => \"fas fa-comment-slash\",\n\t\t\t\"fas-f086\" => \"fas fa-comments\",\n\t\t\t\"fas-f653\" => \"fas fa-comments-dollar\",\n\t\t\t\"fas-f51f\" => \"fas fa-compact-disc\",\n\t\t\t\"fas-f14e\" => \"fas fa-compass\",\n\t\t\t\"fas-f066\" => \"fas fa-compress\",\n\t\t\t\"fas-f422\" => \"fas fa-compress-alt\",\n\t\t\t\"fas-f78c\" => \"fas fa-compress-arrows-alt\",\n\t\t\t\"fas-f562\" => \"fas fa-concierge-bell\",\n\t\t\t\"fas-f563\" => \"fas fa-cookie\",\n\t\t\t\"fas-f564\" => \"fas fa-cookie-bite\",\n\t\t\t\"fas-f0c5\" => \"fas fa-copy\",\n\t\t\t\"fas-f1f9\" => \"fas fa-copyright\",\n\t\t\t\"fas-f4b8\" => \"fas fa-couch\",\n\t\t\t\"fas-f09d\" => \"fas fa-credit-card\",\n\t\t\t\"fas-f125\" => \"fas fa-crop\",\n\t\t\t\"fas-f565\" => \"fas fa-crop-alt\",\n\t\t\t\"fas-f654\" => \"fas fa-cross\",\n\t\t\t\"fas-f05b\" => \"fas fa-crosshairs\",\n\t\t\t\"fas-f520\" => \"fas fa-crow\",\n\t\t\t\"fas-f521\" => \"fas fa-crown\",\n\t\t\t\"fas-f7f7\" => \"fas fa-crutch\",\n\t\t\t\"fas-f1b2\" => \"fas fa-cube\",\n\t\t\t\"fas-f1b3\" => \"fas fa-cubes\",\n\t\t\t\"fas-f0c4\" => \"fas fa-cut\",\n\t\t\t\"fas-f1c0\" => \"fas fa-database\",\n\t\t\t\"fas-f2a4\" => \"fas fa-deaf\",\n\t\t\t\"fas-f747\" => \"fas fa-democrat\",\n\t\t\t\"fas-f108\" => \"fas fa-desktop\",\n\t\t\t\"fas-f655\" => \"fas fa-dharmachakra\",\n\t\t\t\"fas-f470\" => \"fas fa-diagnoses\",\n\t\t\t\"fas-f522\" => \"fas fa-dice\",\n\t\t\t\"fas-f6cf\" => \"fas fa-dice-d20\",\n\t\t\t\"fas-f6d1\" => \"fas fa-dice-d6\",\n\t\t\t\"fas-f523\" => \"fas fa-dice-five\",\n\t\t\t\"fas-f524\" => \"fas fa-dice-four\",\n\t\t\t\"fas-f525\" => \"fas fa-dice-one\",\n\t\t\t\"fas-f526\" => \"fas fa-dice-six\",\n\t\t\t\"fas-f527\" => \"fas fa-dice-three\",\n\t\t\t\"fas-f528\" => \"fas fa-dice-two\",\n\t\t\t\"fas-f566\" => \"fas fa-digital-tachograph\",\n\t\t\t\"fas-f5eb\" => \"fas fa-directions\",\n\t\t\t\"fas-f7fa\" => \"fas fa-disease\",\n\t\t\t\"fas-f529\" => \"fas fa-divide\",\n\t\t\t\"fas-f567\" => \"fas fa-dizzy\",\n\t\t\t\"fas-f471\" => \"fas fa-dna\",\n\t\t\t\"fas-f6d3\" => \"fas fa-dog\",\n\t\t\t\"fas-f155\" => \"fas fa-dollar-sign\",\n\t\t\t\"fas-f472\" => \"fas fa-dolly\",\n\t\t\t\"fas-f474\" => \"fas fa-dolly-flatbed\",\n\t\t\t\"fas-f4b9\" => \"fas fa-donate\",\n\t\t\t\"fas-f52a\" => \"fas fa-door-closed\",\n\t\t\t\"fas-f52b\" => \"fas fa-door-open\",\n\t\t\t\"fas-f192\" => \"fas fa-dot-circle\",\n\t\t\t\"fas-f4ba\" => \"fas fa-dove\",\n\t\t\t\"fas-f019\" => \"fas fa-download\",\n\t\t\t\"fas-f568\" => \"fas fa-drafting-compass\",\n\t\t\t\"fas-f6d5\" => \"fas fa-dragon\",\n\t\t\t\"fas-f5ee\" => \"fas fa-draw-polygon\",\n\t\t\t\"fas-f569\" => \"fas fa-drum\",\n\t\t\t\"fas-f56a\" => \"fas fa-drum-steelpan\",\n\t\t\t\"fas-f6d7\" => \"fas fa-drumstick-bite\",\n\t\t\t\"fas-f44b\" => \"fas fa-dumbbell\",\n\t\t\t\"fas-f793\" => \"fas fa-dumpster\",\n\t\t\t\"fas-f794\" => \"fas fa-dumpster-fire\",\n\t\t\t\"fas-f6d9\" => \"fas fa-dungeon\",\n\t\t\t\"fas-f044\" => \"fas fa-edit\",\n\t\t\t\"fas-f7fb\" => \"fas fa-egg\",\n\t\t\t\"fas-f052\" => \"fas fa-eject\",\n\t\t\t\"fas-f141\" => \"fas fa-ellipsis-h\",\n\t\t\t\"fas-f142\" => \"fas fa-ellipsis-v\",\n\t\t\t\"fas-f0e0\" => \"fas fa-envelope\",\n\t\t\t\"fas-f2b6\" => \"fas fa-envelope-open\",\n\t\t\t\"fas-f658\" => \"fas fa-envelope-open-text\",\n\t\t\t\"fas-f199\" => \"fas fa-envelope-square\",\n\t\t\t\"fas-f52c\" => \"fas fa-equals\",\n\t\t\t\"fas-f12d\" => \"fas fa-eraser\",\n\t\t\t\"fas-f796\" => \"fas fa-ethernet\",\n\t\t\t\"fas-f153\" => \"fas fa-euro-sign\",\n\t\t\t\"fas-f362\" => \"fas fa-exchange-alt\",\n\t\t\t\"fas-f12a\" => \"fas fa-exclamation\",\n\t\t\t\"fas-f06a\" => \"fas fa-exclamation-circle\",\n\t\t\t\"fas-f071\" => \"fas fa-exclamation-triangle\",\n\t\t\t\"fas-f065\" => \"fas fa-expand\",\n\t\t\t\"fas-f424\" => \"fas fa-expand-alt\",\n\t\t\t\"fas-f31e\" => \"fas fa-expand-arrows-alt\",\n\t\t\t\"fas-f35d\" => \"fas fa-external-link-alt\",\n\t\t\t\"fas-f360\" => \"fas fa-external-link-square-alt\",\n\t\t\t\"fas-f06e\" => \"fas fa-eye\",\n\t\t\t\"fas-f1fb\" => \"fas fa-eye-dropper\",\n\t\t\t\"fas-f070\" => \"fas fa-eye-slash\",\n\t\t\t\"fas-f863\" => \"fas fa-fan\",\n\t\t\t\"fas-f049\" => \"fas fa-fast-backward\",\n\t\t\t\"fas-f050\" => \"fas fa-fast-forward\",\n\t\t\t\"fas-f905\" => \"fas fa-faucet\",\n\t\t\t\"fas-f1ac\" => \"fas fa-fax\",\n\t\t\t\"fas-f52d\" => \"fas fa-feather\",\n\t\t\t\"fas-f56b\" => \"fas fa-feather-alt\",\n\t\t\t\"fas-f182\" => \"fas fa-female\",\n\t\t\t\"fas-f0fb\" => \"fas fa-fighter-jet\",\n\t\t\t\"fas-f15b\" => \"fas fa-file\",\n\t\t\t\"fas-f15c\" => \"fas fa-file-alt\",\n\t\t\t\"fas-f1c6\" => \"fas fa-file-archive\",\n\t\t\t\"fas-f1c7\" => \"fas fa-file-audio\",\n\t\t\t\"fas-f1c9\" => \"fas fa-file-code\",\n\t\t\t\"fas-f56c\" => \"fas fa-file-contract\",\n\t\t\t\"fas-f6dd\" => \"fas fa-file-csv\",\n\t\t\t\"fas-f56d\" => \"fas fa-file-download\",\n\t\t\t\"fas-f1c3\" => \"fas fa-file-excel\",\n\t\t\t\"fas-f56e\" => \"fas fa-file-export\",\n\t\t\t\"fas-f1c5\" => \"fas fa-file-image\",\n\t\t\t\"fas-f56f\" => \"fas fa-file-import\",\n\t\t\t\"fas-f570\" => \"fas fa-file-invoice\",\n\t\t\t\"fas-f571\" => \"fas fa-file-invoice-dollar\",\n\t\t\t\"fas-f477\" => \"fas fa-file-medical\",\n\t\t\t\"fas-f478\" => \"fas fa-file-medical-alt\",\n\t\t\t\"fas-f1c1\" => \"fas fa-file-pdf\",\n\t\t\t\"fas-f1c4\" => \"fas fa-file-powerpoint\",\n\t\t\t\"fas-f572\" => \"fas fa-file-prescription\",\n\t\t\t\"fas-f573\" => \"fas fa-file-signature\",\n\t\t\t\"fas-f574\" => \"fas fa-file-upload\",\n\t\t\t\"fas-f1c8\" => \"fas fa-file-video\",\n\t\t\t\"fas-f1c2\" => \"fas fa-file-word\",\n\t\t\t\"fas-f575\" => \"fas fa-fill\",\n\t\t\t\"fas-f576\" => \"fas fa-fill-drip\",\n\t\t\t\"fas-f008\" => \"fas fa-film\",\n\t\t\t\"fas-f0b0\" => \"fas fa-filter\",\n\t\t\t\"fas-f577\" => \"fas fa-fingerprint\",\n\t\t\t\"fas-f06d\" => \"fas fa-fire\",\n\t\t\t\"fas-f7e4\" => \"fas fa-fire-alt\",\n\t\t\t\"fas-f134\" => \"fas fa-fire-extinguisher\",\n\t\t\t\"fas-f479\" => \"fas fa-first-aid\",\n\t\t\t\"fas-f578\" => \"fas fa-fish\",\n\t\t\t\"fas-f6de\" => \"fas fa-fist-raised\",\n\t\t\t\"fas-f024\" => \"fas fa-flag\",\n\t\t\t\"fas-f11e\" => \"fas fa-flag-checkered\",\n\t\t\t\"fas-f74d\" => \"fas fa-flag-usa\",\n\t\t\t\"fas-f0c3\" => \"fas fa-flask\",\n\t\t\t\"fas-f579\" => \"fas fa-flushed\",\n\t\t\t\"fas-f07b\" => \"fas fa-folder\",\n\t\t\t\"fas-f65d\" => \"fas fa-folder-minus\",\n\t\t\t\"fas-f07c\" => \"fas fa-folder-open\",\n\t\t\t\"fas-f65e\" => \"fas fa-folder-plus\",\n\t\t\t\"fas-f031\" => \"fas fa-font\",\n\t\t\t\"fas-f44e\" => \"fas fa-football-ball\",\n\t\t\t\"fas-f04e\" => \"fas fa-forward\",\n\t\t\t\"fas-f52e\" => \"fas fa-frog\",\n\t\t\t\"fas-f119\" => \"fas fa-frown\",\n\t\t\t\"fas-f57a\" => \"fas fa-frown-open\",\n\t\t\t\"fas-f662\" => \"fas fa-funnel-dollar\",\n\t\t\t\"fas-f1e3\" => \"fas fa-futbol\",\n\t\t\t\"fas-f11b\" => \"fas fa-gamepad\",\n\t\t\t\"fas-f52f\" => \"fas fa-gas-pump\",\n\t\t\t\"fas-f0e3\" => \"fas fa-gavel\",\n\t\t\t\"fas-f3a5\" => \"fas fa-gem\",\n\t\t\t\"fas-f22d\" => \"fas fa-genderless\",\n\t\t\t\"fas-f6e2\" => \"fas fa-ghost\",\n\t\t\t\"fas-f06b\" => \"fas fa-gift\",\n\t\t\t\"fas-f79c\" => \"fas fa-gifts\",\n\t\t\t\"fas-f79f\" => \"fas fa-glass-cheers\",\n\t\t\t\"fas-f000\" => \"fas fa-glass-martini\",\n\t\t\t\"fas-f57b\" => \"fas fa-glass-martini-alt\",\n\t\t\t\"fas-f7a0\" => \"fas fa-glass-whiskey\",\n\t\t\t\"fas-f530\" => \"fas fa-glasses\",\n\t\t\t\"fas-f0ac\" => \"fas fa-globe\",\n\t\t\t\"fas-f57c\" => \"fas fa-globe-africa\",\n\t\t\t\"fas-f57d\" => \"fas fa-globe-americas\",\n\t\t\t\"fas-f57e\" => \"fas fa-globe-asia\",\n\t\t\t\"fas-f7a2\" => \"fas fa-globe-europe\",\n\t\t\t\"fas-f450\" => \"fas fa-golf-ball\",\n\t\t\t\"fas-f664\" => \"fas fa-gopuram\",\n\t\t\t\"fas-f19d\" => \"fas fa-graduation-cap\",\n\t\t\t\"fas-f531\" => \"fas fa-greater-than\",\n\t\t\t\"fas-f532\" => \"fas fa-greater-than-equal\",\n\t\t\t\"fas-f57f\" => \"fas fa-grimace\",\n\t\t\t\"fas-f580\" => \"fas fa-grin\",\n\t\t\t\"fas-f581\" => \"fas fa-grin-alt\",\n\t\t\t\"fas-f582\" => \"fas fa-grin-beam\",\n\t\t\t\"fas-f583\" => \"fas fa-grin-beam-sweat\",\n\t\t\t\"fas-f584\" => \"fas fa-grin-hearts\",\n\t\t\t\"fas-f585\" => \"fas fa-grin-squint\",\n\t\t\t\"fas-f586\" => \"fas fa-grin-squint-tears\",\n\t\t\t\"fas-f587\" => \"fas fa-grin-stars\",\n\t\t\t\"fas-f588\" => \"fas fa-grin-tears\",\n\t\t\t\"fas-f589\" => \"fas fa-grin-tongue\",\n\t\t\t\"fas-f58a\" => \"fas fa-grin-tongue-squint\",\n\t\t\t\"fas-f58b\" => \"fas fa-grin-tongue-wink\",\n\t\t\t\"fas-f58c\" => \"fas fa-grin-wink\",\n\t\t\t\"fas-f58d\" => \"fas fa-grip-horizontal\",\n\t\t\t\"fas-f7a4\" => \"fas fa-grip-lines\",\n\t\t\t\"fas-f7a5\" => \"fas fa-grip-lines-vertical\",\n\t\t\t\"fas-f58e\" => \"fas fa-grip-vertical\",\n\t\t\t\"fas-f7a6\" => \"fas fa-guitar\",\n\t\t\t\"fas-f0fd\" => \"fas fa-h-square\",\n\t\t\t\"fas-f805\" => \"fas fa-hamburger\",\n\t\t\t\"fas-f6e3\" => \"fas fa-hammer\",\n\t\t\t\"fas-f665\" => \"fas fa-hamsa\",\n\t\t\t\"fas-f4bd\" => \"fas fa-hand-holding\",\n\t\t\t\"fas-f4be\" => \"fas fa-hand-holding-heart\",\n\t\t\t\"fas-f95c\" => \"fas fa-hand-holding-medical\",\n\t\t\t\"fas-f4c0\" => \"fas fa-hand-holding-usd\",\n\t\t\t\"fas-f4c1\" => \"fas fa-hand-holding-water\",\n\t\t\t\"fas-f258\" => \"fas fa-hand-lizard\",\n\t\t\t\"fas-f806\" => \"fas fa-hand-middle-finger\",\n\t\t\t\"fas-f256\" => \"fas fa-hand-paper\",\n\t\t\t\"fas-f25b\" => \"fas fa-hand-peace\",\n\t\t\t\"fas-f0a7\" => \"fas fa-hand-point-down\",\n\t\t\t\"fas-f0a5\" => \"fas fa-hand-point-left\",\n\t\t\t\"fas-f0a4\" => \"fas fa-hand-point-right\",\n\t\t\t\"fas-f0a6\" => \"fas fa-hand-point-up\",\n\t\t\t\"fas-f25a\" => \"fas fa-hand-pointer\",\n\t\t\t\"fas-f255\" => \"fas fa-hand-rock\",\n\t\t\t\"fas-f257\" => \"fas fa-hand-scissors\",\n\t\t\t\"fas-f95d\" => \"fas fa-hand-sparkles\",\n\t\t\t\"fas-f259\" => \"fas fa-hand-spock\",\n\t\t\t\"fas-f4c2\" => \"fas fa-hands\",\n\t\t\t\"fas-f4c4\" => \"fas fa-hands-helping\",\n\t\t\t\"fas-f95e\" => \"fas fa-hands-wash\",\n\t\t\t\"fas-f2b5\" => \"fas fa-handshake\",\n\t\t\t\"fas-f95f\" => \"fas fa-handshake-alt-slash\",\n\t\t\t\"fas-f960\" => \"fas fa-handshake-slash\",\n\t\t\t\"fas-f6e6\" => \"fas fa-hanukiah\",\n\t\t\t\"fas-f807\" => \"fas fa-hard-hat\",\n\t\t\t\"fas-f292\" => \"fas fa-hashtag\",\n\t\t\t\"fas-f8c0\" => \"fas fa-hat-cowboy\",\n\t\t\t\"fas-f8c1\" => \"fas fa-hat-cowboy-side\",\n\t\t\t\"fas-f6e8\" => \"fas fa-hat-wizard\",\n\t\t\t\"fas-f0a0\" => \"fas fa-hdd\",\n\t\t\t\"fas-f961\" => \"fas fa-head-side-cough\",\n\t\t\t\"fas-f962\" => \"fas fa-head-side-cough-slash\",\n\t\t\t\"fas-f963\" => \"fas fa-head-side-mask\",\n\t\t\t\"fas-f964\" => \"fas fa-head-side-virus\",\n\t\t\t\"fas-f1dc\" => \"fas fa-heading\",\n\t\t\t\"fas-f025\" => \"fas fa-headphones\",\n\t\t\t\"fas-f58f\" => \"fas fa-headphones-alt\",\n\t\t\t\"fas-f590\" => \"fas fa-headset\",\n\t\t\t\"fas-f004\" => \"fas fa-heart\",\n\t\t\t\"fas-f7a9\" => \"fas fa-heart-broken\",\n\t\t\t\"fas-f21e\" => \"fas fa-heartbeat\",\n\t\t\t\"fas-f533\" => \"fas fa-helicopter\",\n\t\t\t\"fas-f591\" => \"fas fa-highlighter\",\n\t\t\t\"fas-f6ec\" => \"fas fa-hiking\",\n\t\t\t\"fas-f6ed\" => \"fas fa-hippo\",\n\t\t\t\"fas-f1da\" => \"fas fa-history\",\n\t\t\t\"fas-f453\" => \"fas fa-hockey-puck\",\n\t\t\t\"fas-f7aa\" => \"fas fa-holly-berry\",\n\t\t\t\"fas-f015\" => \"fas fa-home\",\n\t\t\t\"fas-f6f0\" => \"fas fa-horse\",\n\t\t\t\"fas-f7ab\" => \"fas fa-horse-head\",\n\t\t\t\"fas-f0f8\" => \"fas fa-hospital\",\n\t\t\t\"fas-f47d\" => \"fas fa-hospital-alt\",\n\t\t\t\"fas-f47e\" => \"fas fa-hospital-symbol\",\n\t\t\t\"fas-f80d\" => \"fas fa-hospital-user\",\n\t\t\t\"fas-f593\" => \"fas fa-hot-tub\",\n\t\t\t\"fas-f80f\" => \"fas fa-hotdog\",\n\t\t\t\"fas-f594\" => \"fas fa-hotel\",\n\t\t\t\"fas-f254\" => \"fas fa-hourglass\",\n\t\t\t\"fas-f253\" => \"fas fa-hourglass-end\",\n\t\t\t\"fas-f252\" => \"fas fa-hourglass-half\",\n\t\t\t\"fas-f251\" => \"fas fa-hourglass-start\",\n\t\t\t\"fas-f6f1\" => \"fas fa-house-damage\",\n\t\t\t\"fas-f965\" => \"fas fa-house-user\",\n\t\t\t\"fas-f6f2\" => \"fas fa-hryvnia\",\n\t\t\t\"fas-f246\" => \"fas fa-i-cursor\",\n\t\t\t\"fas-f810\" => \"fas fa-ice-cream\",\n\t\t\t\"fas-f7ad\" => \"fas fa-icicles\",\n\t\t\t\"fas-f86d\" => \"fas fa-icons\",\n\t\t\t\"fas-f2c1\" => \"fas fa-id-badge\",\n\t\t\t\"fas-f2c2\" => \"fas fa-id-card\",\n\t\t\t\"fas-f47f\" => \"fas fa-id-card-alt\",\n\t\t\t\"fas-f7ae\" => \"fas fa-igloo\",\n\t\t\t\"fas-f03e\" => \"fas fa-image\",\n\t\t\t\"fas-f302\" => \"fas fa-images\",\n\t\t\t\"fas-f01c\" => \"fas fa-inbox\",\n\t\t\t\"fas-f03c\" => \"fas fa-indent\",\n\t\t\t\"fas-f275\" => \"fas fa-industry\",\n\t\t\t\"fas-f534\" => \"fas fa-infinity\",\n\t\t\t\"fas-f129\" => \"fas fa-info\",\n\t\t\t\"fas-f05a\" => \"fas fa-info-circle\",\n\t\t\t\"fas-f033\" => \"fas fa-italic\",\n\t\t\t\"fas-f669\" => \"fas fa-jedi\",\n\t\t\t\"fas-f595\" => \"fas fa-joint\",\n\t\t\t\"fas-f66a\" => \"fas fa-journal-whills\",\n\t\t\t\"fas-f66b\" => \"fas fa-kaaba\",\n\t\t\t\"fas-f084\" => \"fas fa-key\",\n\t\t\t\"fas-f11c\" => \"fas fa-keyboard\",\n\t\t\t\"fas-f66d\" => \"fas fa-khanda\",\n\t\t\t\"fas-f596\" => \"fas fa-kiss\",\n\t\t\t\"fas-f597\" => \"fas fa-kiss-beam\",\n\t\t\t\"fas-f598\" => \"fas fa-kiss-wink-heart\",\n\t\t\t\"fas-f535\" => \"fas fa-kiwi-bird\",\n\t\t\t\"fas-f66f\" => \"fas fa-landmark\",\n\t\t\t\"fas-f1ab\" => \"fas fa-language\",\n\t\t\t\"fas-f109\" => \"fas fa-laptop\",\n\t\t\t\"fas-f5fc\" => \"fas fa-laptop-code\",\n\t\t\t\"fas-f966\" => \"fas fa-laptop-house\",\n\t\t\t\"fas-f812\" => \"fas fa-laptop-medical\",\n\t\t\t\"fas-f599\" => \"fas fa-laugh\",\n\t\t\t\"fas-f59a\" => \"fas fa-laugh-beam\",\n\t\t\t\"fas-f59b\" => \"fas fa-laugh-squint\",\n\t\t\t\"fas-f59c\" => \"fas fa-laugh-wink\",\n\t\t\t\"fas-f5fd\" => \"fas fa-layer-group\",\n\t\t\t\"fas-f06c\" => \"fas fa-leaf\",\n\t\t\t\"fas-f094\" => \"fas fa-lemon\",\n\t\t\t\"fas-f536\" => \"fas fa-less-than\",\n\t\t\t\"fas-f537\" => \"fas fa-less-than-equal\",\n\t\t\t\"fas-f3be\" => \"fas fa-level-down-alt\",\n\t\t\t\"fas-f3bf\" => \"fas fa-level-up-alt\",\n\t\t\t\"fas-f1cd\" => \"fas fa-life-ring\",\n\t\t\t\"fas-f0eb\" => \"fas fa-lightbulb\",\n\t\t\t\"fas-f0c1\" => \"fas fa-link\",\n\t\t\t\"fas-f195\" => \"fas fa-lira-sign\",\n\t\t\t\"fas-f03a\" => \"fas fa-list\",\n\t\t\t\"fas-f022\" => \"fas fa-list-alt\",\n\t\t\t\"fas-f0cb\" => \"fas fa-list-ol\",\n\t\t\t\"fas-f0ca\" => \"fas fa-list-ul\",\n\t\t\t\"fas-f124\" => \"fas fa-location-arrow\",\n\t\t\t\"fas-f023\" => \"fas fa-lock\",\n\t\t\t\"fas-f3c1\" => \"fas fa-lock-open\",\n\t\t\t\"fas-f309\" => \"fas fa-long-arrow-alt-down\",\n\t\t\t\"fas-f30a\" => \"fas fa-long-arrow-alt-left\",\n\t\t\t\"fas-f30b\" => \"fas fa-long-arrow-alt-right\",\n\t\t\t\"fas-f30c\" => \"fas fa-long-arrow-alt-up\",\n\t\t\t\"fas-f2a8\" => \"fas fa-low-vision\",\n\t\t\t\"fas-f59d\" => \"fas fa-luggage-cart\",\n\t\t\t\"fas-f604\" => \"fas fa-lungs\",\n\t\t\t\"fas-f967\" => \"fas fa-lungs-virus\",\n\t\t\t\"fas-f0d0\" => \"fas fa-magic\",\n\t\t\t\"fas-f076\" => \"fas fa-magnet\",\n\t\t\t\"fas-f674\" => \"fas fa-mail-bulk\",\n\t\t\t\"fas-f183\" => \"fas fa-male\",\n\t\t\t\"fas-f279\" => \"fas fa-map\",\n\t\t\t\"fas-f59f\" => \"fas fa-map-marked\",\n\t\t\t\"fas-f5a0\" => \"fas fa-map-marked-alt\",\n\t\t\t\"fas-f041\" => \"fas fa-map-marker\",\n\t\t\t\"fas-f3c5\" => \"fas fa-map-marker-alt\",\n\t\t\t\"fas-f276\" => \"fas fa-map-pin\",\n\t\t\t\"fas-f277\" => \"fas fa-map-signs\",\n\t\t\t\"fas-f5a1\" => \"fas fa-marker\",\n\t\t\t\"fas-f222\" => \"fas fa-mars\",\n\t\t\t\"fas-f227\" => \"fas fa-mars-double\",\n\t\t\t\"fas-f229\" => \"fas fa-mars-stroke\",\n\t\t\t\"fas-f22b\" => \"fas fa-mars-stroke-h\",\n\t\t\t\"fas-f22a\" => \"fas fa-mars-stroke-v\",\n\t\t\t\"fas-f6fa\" => \"fas fa-mask\",\n\t\t\t\"fas-f5a2\" => \"fas fa-medal\",\n\t\t\t\"fas-f0fa\" => \"fas fa-medkit\",\n\t\t\t\"fas-f11a\" => \"fas fa-meh\",\n\t\t\t\"fas-f5a4\" => \"fas fa-meh-blank\",\n\t\t\t\"fas-f5a5\" => \"fas fa-meh-rolling-eyes\",\n\t\t\t\"fas-f538\" => \"fas fa-memory\",\n\t\t\t\"fas-f676\" => \"fas fa-menorah\",\n\t\t\t\"fas-f223\" => \"fas fa-mercury\",\n\t\t\t\"fas-f753\" => \"fas fa-meteor\",\n\t\t\t\"fas-f2db\" => \"fas fa-microchip\",\n\t\t\t\"fas-f130\" => \"fas fa-microphone\",\n\t\t\t\"fas-f3c9\" => \"fas fa-microphone-alt\",\n\t\t\t\"fas-f539\" => \"fas fa-microphone-alt-slash\",\n\t\t\t\"fas-f131\" => \"fas fa-microphone-slash\",\n\t\t\t\"fas-f610\" => \"fas fa-microscope\",\n\t\t\t\"fas-f068\" => \"fas fa-minus\",\n\t\t\t\"fas-f056\" => \"fas fa-minus-circle\",\n\t\t\t\"fas-f146\" => \"fas fa-minus-square\",\n\t\t\t\"fas-f7b5\" => \"fas fa-mitten\",\n\t\t\t\"fas-f10b\" => \"fas fa-mobile\",\n\t\t\t\"fas-f3cd\" => \"fas fa-mobile-alt\",\n\t\t\t\"fas-f0d6\" => \"fas fa-money-bill\",\n\t\t\t\"fas-f3d1\" => \"fas fa-money-bill-alt\",\n\t\t\t\"fas-f53a\" => \"fas fa-money-bill-wave\",\n\t\t\t\"fas-f53b\" => \"fas fa-money-bill-wave-alt\",\n\t\t\t\"fas-f53c\" => \"fas fa-money-check\",\n\t\t\t\"fas-f53d\" => \"fas fa-money-check-alt\",\n\t\t\t\"fas-f5a6\" => \"fas fa-monument\",\n\t\t\t\"fas-f186\" => \"fas fa-moon\",\n\t\t\t\"fas-f5a7\" => \"fas fa-mortar-pestle\",\n\t\t\t\"fas-f678\" => \"fas fa-mosque\",\n\t\t\t\"fas-f21c\" => \"fas fa-motorcycle\",\n\t\t\t\"fas-f6fc\" => \"fas fa-mountain\",\n\t\t\t\"fas-f8cc\" => \"fas fa-mouse\",\n\t\t\t\"fas-f245\" => \"fas fa-mouse-pointer\",\n\t\t\t\"fas-f7b6\" => \"fas fa-mug-hot\",\n\t\t\t\"fas-f001\" => \"fas fa-music\",\n\t\t\t\"fas-f6ff\" => \"fas fa-network-wired\",\n\t\t\t\"fas-f22c\" => \"fas fa-neuter\",\n\t\t\t\"fas-f1ea\" => \"fas fa-newspaper\",\n\t\t\t\"fas-f53e\" => \"fas fa-not-equal\",\n\t\t\t\"fas-f481\" => \"fas fa-notes-medical\",\n\t\t\t\"fas-f247\" => \"fas fa-object-group\",\n\t\t\t\"fas-f248\" => \"fas fa-object-ungroup\",\n\t\t\t\"fas-f613\" => \"fas fa-oil-can\",\n\t\t\t\"fas-f679\" => \"fas fa-om\",\n\t\t\t\"fas-f700\" => \"fas fa-otter\",\n\t\t\t\"fas-f03b\" => \"fas fa-outdent\",\n\t\t\t\"fas-f815\" => \"fas fa-pager\",\n\t\t\t\"fas-f1fc\" => \"fas fa-paint-brush\",\n\t\t\t\"fas-f5aa\" => \"fas fa-paint-roller\",\n\t\t\t\"fas-f53f\" => \"fas fa-palette\",\n\t\t\t\"fas-f482\" => \"fas fa-pallet\",\n\t\t\t\"fas-f1d8\" => \"fas fa-paper-plane\",\n\t\t\t\"fas-f0c6\" => \"fas fa-paperclip\",\n\t\t\t\"fas-f4cd\" => \"fas fa-parachute-box\",\n\t\t\t\"fas-f1dd\" => \"fas fa-paragraph\",\n\t\t\t\"fas-f540\" => \"fas fa-parking\",\n\t\t\t\"fas-f5ab\" => \"fas fa-passport\",\n\t\t\t\"fas-f67b\" => \"fas fa-pastafarianism\",\n\t\t\t\"fas-f0ea\" => \"fas fa-paste\",\n\t\t\t\"fas-f04c\" => \"fas fa-pause\",\n\t\t\t\"fas-f28b\" => \"fas fa-pause-circle\",\n\t\t\t\"fas-f1b0\" => \"fas fa-paw\",\n\t\t\t\"fas-f67c\" => \"fas fa-peace\",\n\t\t\t\"fas-f304\" => \"fas fa-pen\",\n\t\t\t\"fas-f305\" => \"fas fa-pen-alt\",\n\t\t\t\"fas-f5ac\" => \"fas fa-pen-fancy\",\n\t\t\t\"fas-f5ad\" => \"fas fa-pen-nib\",\n\t\t\t\"fas-f14b\" => \"fas fa-pen-square\",\n\t\t\t\"fas-f303\" => \"fas fa-pencil-alt\",\n\t\t\t\"fas-f5ae\" => \"fas fa-pencil-ruler\",\n\t\t\t\"fas-f968\" => \"fas fa-people-arrows\",\n\t\t\t\"fas-f4ce\" => \"fas fa-people-carry\",\n\t\t\t\"fas-f816\" => \"fas fa-pepper-hot\",\n\t\t\t\"fas-f295\" => \"fas fa-percent\",\n\t\t\t\"fas-f541\" => \"fas fa-percentage\",\n\t\t\t\"fas-f756\" => \"fas fa-person-booth\",\n\t\t\t\"fas-f095\" => \"fas fa-phone\",\n\t\t\t\"fas-f879\" => \"fas fa-phone-alt\",\n\t\t\t\"fas-f3dd\" => \"fas fa-phone-slash\",\n\t\t\t\"fas-f098\" => \"fas fa-phone-square\",\n\t\t\t\"fas-f87b\" => \"fas fa-phone-square-alt\",\n\t\t\t\"fas-f2a0\" => \"fas fa-phone-volume\",\n\t\t\t\"fas-f87c\" => \"fas fa-photo-video\",\n\t\t\t\"fas-f4d3\" => \"fas fa-piggy-bank\",\n\t\t\t\"fas-f484\" => \"fas fa-pills\",\n\t\t\t\"fas-f818\" => \"fas fa-pizza-slice\",\n\t\t\t\"fas-f67f\" => \"fas fa-place-of-worship\",\n\t\t\t\"fas-f072\" => \"fas fa-plane\",\n\t\t\t\"fas-f5af\" => \"fas fa-plane-arrival\",\n\t\t\t\"fas-f5b0\" => \"fas fa-plane-departure\",\n\t\t\t\"fas-f969\" => \"fas fa-plane-slash\",\n\t\t\t\"fas-f04b\" => \"fas fa-play\",\n\t\t\t\"fas-f144\" => \"fas fa-play-circle\",\n\t\t\t\"fas-f1e6\" => \"fas fa-plug\",\n\t\t\t\"fas-f067\" => \"fas fa-plus\",\n\t\t\t\"fas-f055\" => \"fas fa-plus-circle\",\n\t\t\t\"fas-f0fe\" => \"fas fa-plus-square\",\n\t\t\t\"fas-f2ce\" => \"fas fa-podcast\",\n\t\t\t\"fas-f681\" => \"fas fa-poll\",\n\t\t\t\"fas-f682\" => \"fas fa-poll-h\",\n\t\t\t\"fas-f2fe\" => \"fas fa-poo\",\n\t\t\t\"fas-f75a\" => \"fas fa-poo-storm\",\n\t\t\t\"fas-f619\" => \"fas fa-poop\",\n\t\t\t\"fas-f3e0\" => \"fas fa-portrait\",\n\t\t\t\"fas-f154\" => \"fas fa-pound-sign\",\n\t\t\t\"fas-f011\" => \"fas fa-power-off\",\n\t\t\t\"fas-f683\" => \"fas fa-pray\",\n\t\t\t\"fas-f684\" => \"fas fa-praying-hands\",\n\t\t\t\"fas-f5b1\" => \"fas fa-prescription\",\n\t\t\t\"fas-f485\" => \"fas fa-prescription-bottle\",\n\t\t\t\"fas-f486\" => \"fas fa-prescription-bottle-alt\",\n\t\t\t\"fas-f02f\" => \"fas fa-print\",\n\t\t\t\"fas-f487\" => \"fas fa-procedures\",\n\t\t\t\"fas-f542\" => \"fas fa-project-diagram\",\n\t\t\t\"fas-f96a\" => \"fas fa-pump-medical\",\n\t\t\t\"fas-f96b\" => \"fas fa-pump-soap\",\n\t\t\t\"fas-f12e\" => \"fas fa-puzzle-piece\",\n\t\t\t\"fas-f029\" => \"fas fa-qrcode\",\n\t\t\t\"fas-f128\" => \"fas fa-question\",\n\t\t\t\"fas-f059\" => \"fas fa-question-circle\",\n\t\t\t\"fas-f458\" => \"fas fa-quidditch\",\n\t\t\t\"fas-f10d\" => \"fas fa-quote-left\",\n\t\t\t\"fas-f10e\" => \"fas fa-quote-right\",\n\t\t\t\"fas-f687\" => \"fas fa-quran\",\n\t\t\t\"fas-f7b9\" => \"fas fa-radiation\",\n\t\t\t\"fas-f7ba\" => \"fas fa-radiation-alt\",\n\t\t\t\"fas-f75b\" => \"fas fa-rainbow\",\n\t\t\t\"fas-f074\" => \"fas fa-random\",\n\t\t\t\"fas-f543\" => \"fas fa-receipt\",\n\t\t\t\"fas-f8d9\" => \"fas fa-record-vinyl\",\n\t\t\t\"fas-f1b8\" => \"fas fa-recycle\",\n\t\t\t\"fas-f01e\" => \"fas fa-redo\",\n\t\t\t\"fas-f2f9\" => \"fas fa-redo-alt\",\n\t\t\t\"fas-f25d\" => \"fas fa-registered\",\n\t\t\t\"fas-f87d\" => \"fas fa-remove-format\",\n\t\t\t\"fas-f3e5\" => \"fas fa-reply\",\n\t\t\t\"fas-f122\" => \"fas fa-reply-all\",\n\t\t\t\"fas-f75e\" => \"fas fa-republican\",\n\t\t\t\"fas-f7bd\" => \"fas fa-restroom\",\n\t\t\t\"fas-f079\" => \"fas fa-retweet\",\n\t\t\t\"fas-f4d6\" => \"fas fa-ribbon\",\n\t\t\t\"fas-f70b\" => \"fas fa-ring\",\n\t\t\t\"fas-f018\" => \"fas fa-road\",\n\t\t\t\"fas-f544\" => \"fas fa-robot\",\n\t\t\t\"fas-f135\" => \"fas fa-rocket\",\n\t\t\t\"fas-f4d7\" => \"fas fa-route\",\n\t\t\t\"fas-f09e\" => \"fas fa-rss\",\n\t\t\t\"fas-f143\" => \"fas fa-rss-square\",\n\t\t\t\"fas-f158\" => \"fas fa-ruble-sign\",\n\t\t\t\"fas-f545\" => \"fas fa-ruler\",\n\t\t\t\"fas-f546\" => \"fas fa-ruler-combined\",\n\t\t\t\"fas-f547\" => \"fas fa-ruler-horizontal\",\n\t\t\t\"fas-f548\" => \"fas fa-ruler-vertical\",\n\t\t\t\"fas-f70c\" => \"fas fa-running\",\n\t\t\t\"fas-f156\" => \"fas fa-rupee-sign\",\n\t\t\t\"fas-f5b3\" => \"fas fa-sad-cry\",\n\t\t\t\"fas-f5b4\" => \"fas fa-sad-tear\",\n\t\t\t\"fas-f7bf\" => \"fas fa-satellite\",\n\t\t\t\"fas-f7c0\" => \"fas fa-satellite-dish\",\n\t\t\t\"fas-f0c7\" => \"fas fa-save\",\n\t\t\t\"fas-f549\" => \"fas fa-school\",\n\t\t\t\"fas-f54a\" => \"fas fa-screwdriver\",\n\t\t\t\"fas-f70e\" => \"fas fa-scroll\",\n\t\t\t\"fas-f7c2\" => \"fas fa-sd-card\",\n\t\t\t\"fas-f002\" => \"fas fa-search\",\n\t\t\t\"fas-f688\" => \"fas fa-search-dollar\",\n\t\t\t\"fas-f689\" => \"fas fa-search-location\",\n\t\t\t\"fas-f010\" => \"fas fa-search-minus\",\n\t\t\t\"fas-f00e\" => \"fas fa-search-plus\",\n\t\t\t\"fas-f4d8\" => \"fas fa-seedling\",\n\t\t\t\"fas-f233\" => \"fas fa-server\",\n\t\t\t\"fas-f61f\" => \"fas fa-shapes\",\n\t\t\t\"fas-f064\" => \"fas fa-share\",\n\t\t\t\"fas-f1e0\" => \"fas fa-share-alt\",\n\t\t\t\"fas-f1e1\" => \"fas fa-share-alt-square\",\n\t\t\t\"fas-f14d\" => \"fas fa-share-square\",\n\t\t\t\"fas-f20b\" => \"fas fa-shekel-sign\",\n\t\t\t\"fas-f3ed\" => \"fas fa-shield-alt\",\n\t\t\t\"fas-f96c\" => \"fas fa-shield-virus\",\n\t\t\t\"fas-f21a\" => \"fas fa-ship\",\n\t\t\t\"fas-f48b\" => \"fas fa-shipping-fast\",\n\t\t\t\"fas-f54b\" => \"fas fa-shoe-prints\",\n\t\t\t\"fas-f290\" => \"fas fa-shopping-bag\",\n\t\t\t\"fas-f291\" => \"fas fa-shopping-basket\",\n\t\t\t\"fas-f07a\" => \"fas fa-shopping-cart\",\n\t\t\t\"fas-f2cc\" => \"fas fa-shower\",\n\t\t\t\"fas-f5b6\" => \"fas fa-shuttle-van\",\n\t\t\t\"fas-f4d9\" => \"fas fa-sign\",\n\t\t\t\"fas-f2f6\" => \"fas fa-sign-in-alt\",\n\t\t\t\"fas-f2a7\" => \"fas fa-sign-language\",\n\t\t\t\"fas-f2f5\" => \"fas fa-sign-out-alt\",\n\t\t\t\"fas-f012\" => \"fas fa-signal\",\n\t\t\t\"fas-f5b7\" => \"fas fa-signature\",\n\t\t\t\"fas-f7c4\" => \"fas fa-sim-card\",\n\t\t\t\"fas-f0e8\" => \"fas fa-sitemap\",\n\t\t\t\"fas-f7c5\" => \"fas fa-skating\",\n\t\t\t\"fas-f7c9\" => \"fas fa-skiing\",\n\t\t\t\"fas-f7ca\" => \"fas fa-skiing-nordic\",\n\t\t\t\"fas-f54c\" => \"fas fa-skull\",\n\t\t\t\"fas-f714\" => \"fas fa-skull-crossbones\",\n\t\t\t\"fas-f715\" => \"fas fa-slash\",\n\t\t\t\"fas-f7cc\" => \"fas fa-sleigh\",\n\t\t\t\"fas-f1de\" => \"fas fa-sliders-h\",\n\t\t\t\"fas-f118\" => \"fas fa-smile\",\n\t\t\t\"fas-f5b8\" => \"fas fa-smile-beam\",\n\t\t\t\"fas-f4da\" => \"fas fa-smile-wink\",\n\t\t\t\"fas-f75f\" => \"fas fa-smog\",\n\t\t\t\"fas-f48d\" => \"fas fa-smoking\",\n\t\t\t\"fas-f54d\" => \"fas fa-smoking-ban\",\n\t\t\t\"fas-f7cd\" => \"fas fa-sms\",\n\t\t\t\"fas-f7ce\" => \"fas fa-snowboarding\",\n\t\t\t\"fas-f2dc\" => \"fas fa-snowflake\",\n\t\t\t\"fas-f7d0\" => \"fas fa-snowman\",\n\t\t\t\"fas-f7d2\" => \"fas fa-snowplow\",\n\t\t\t\"fas-f96e\" => \"fas fa-soap\",\n\t\t\t\"fas-f696\" => \"fas fa-socks\",\n\t\t\t\"fas-f5ba\" => \"fas fa-solar-panel\",\n\t\t\t\"fas-f0dc\" => \"fas fa-sort\",\n\t\t\t\"fas-f15d\" => \"fas fa-sort-alpha-down\",\n\t\t\t\"fas-f881\" => \"fas fa-sort-alpha-down-alt\",\n\t\t\t\"fas-f15e\" => \"fas fa-sort-alpha-up\",\n\t\t\t\"fas-f882\" => \"fas fa-sort-alpha-up-alt\",\n\t\t\t\"fas-f160\" => \"fas fa-sort-amount-down\",\n\t\t\t\"fas-f884\" => \"fas fa-sort-amount-down-alt\",\n\t\t\t\"fas-f161\" => \"fas fa-sort-amount-up\",\n\t\t\t\"fas-f885\" => \"fas fa-sort-amount-up-alt\",\n\t\t\t\"fas-f0dd\" => \"fas fa-sort-down\",\n\t\t\t\"fas-f162\" => \"fas fa-sort-numeric-down\",\n\t\t\t\"fas-f886\" => \"fas fa-sort-numeric-down-alt\",\n\t\t\t\"fas-f163\" => \"fas fa-sort-numeric-up\",\n\t\t\t\"fas-f887\" => \"fas fa-sort-numeric-up-alt\",\n\t\t\t\"fas-f0de\" => \"fas fa-sort-up\",\n\t\t\t\"fas-f5bb\" => \"fas fa-spa\",\n\t\t\t\"fas-f197\" => \"fas fa-space-shuttle\",\n\t\t\t\"fas-f891\" => \"fas fa-spell-check\",\n\t\t\t\"fas-f717\" => \"fas fa-spider\",\n\t\t\t\"fas-f110\" => \"fas fa-spinner\",\n\t\t\t\"fas-f5bc\" => \"fas fa-splotch\",\n\t\t\t\"fas-f5bd\" => \"fas fa-spray-can\",\n\t\t\t\"fas-f0c8\" => \"fas fa-square\",\n\t\t\t\"fas-f45c\" => \"fas fa-square-full\",\n\t\t\t\"fas-f698\" => \"fas fa-square-root-alt\",\n\t\t\t\"fas-f5bf\" => \"fas fa-stamp\",\n\t\t\t\"fas-f005\" => \"fas fa-star\",\n\t\t\t\"fas-f699\" => \"fas fa-star-and-crescent\",\n\t\t\t\"fas-f089\" => \"fas fa-star-half\",\n\t\t\t\"fas-f5c0\" => \"fas fa-star-half-alt\",\n\t\t\t\"fas-f69a\" => \"fas fa-star-of-david\",\n\t\t\t\"fas-f621\" => \"fas fa-star-of-life\",\n\t\t\t\"fas-f048\" => \"fas fa-step-backward\",\n\t\t\t\"fas-f051\" => \"fas fa-step-forward\",\n\t\t\t\"fas-f0f1\" => \"fas fa-stethoscope\",\n\t\t\t\"fas-f249\" => \"fas fa-sticky-note\",\n\t\t\t\"fas-f04d\" => \"fas fa-stop\",\n\t\t\t\"fas-f28d\" => \"fas fa-stop-circle\",\n\t\t\t\"fas-f2f2\" => \"fas fa-stopwatch\",\n\t\t\t\"fas-f96f\" => \"fas fa-stopwatch-20\",\n\t\t\t\"fas-f54e\" => \"fas fa-store\",\n\t\t\t\"fas-f54f\" => \"fas fa-store-alt\",\n\t\t\t\"fas-f970\" => \"fas fa-store-alt-slash\",\n\t\t\t\"fas-f971\" => \"fas fa-store-slash\",\n\t\t\t\"fas-f550\" => \"fas fa-stream\",\n\t\t\t\"fas-f21d\" => \"fas fa-street-view\",\n\t\t\t\"fas-f0cc\" => \"fas fa-strikethrough\",\n\t\t\t\"fas-f551\" => \"fas fa-stroopwafel\",\n\t\t\t\"fas-f12c\" => \"fas fa-subscript\",\n\t\t\t\"fas-f239\" => \"fas fa-subway\",\n\t\t\t\"fas-f0f2\" => \"fas fa-suitcase\",\n\t\t\t\"fas-f5c1\" => \"fas fa-suitcase-rolling\",\n\t\t\t\"fas-f185\" => \"fas fa-sun\",\n\t\t\t\"fas-f12b\" => \"fas fa-superscript\",\n\t\t\t\"fas-f5c2\" => \"fas fa-surprise\",\n\t\t\t\"fas-f5c3\" => \"fas fa-swatchbook\",\n\t\t\t\"fas-f5c4\" => \"fas fa-swimmer\",\n\t\t\t\"fas-f5c5\" => \"fas fa-swimming-pool\",\n\t\t\t\"fas-f69b\" => \"fas fa-synagogue\",\n\t\t\t\"fas-f021\" => \"fas fa-sync\",\n\t\t\t\"fas-f2f1\" => \"fas fa-sync-alt\",\n\t\t\t\"fas-f48e\" => \"fas fa-syringe\",\n\t\t\t\"fas-f0ce\" => \"fas fa-table\",\n\t\t\t\"fas-f45d\" => \"fas fa-table-tennis\",\n\t\t\t\"fas-f10a\" => \"fas fa-tablet\",\n\t\t\t\"fas-f3fa\" => \"fas fa-tablet-alt\",\n\t\t\t\"fas-f490\" => \"fas fa-tablets\",\n\t\t\t\"fas-f3fd\" => \"fas fa-tachometer-alt\",\n\t\t\t\"fas-f02b\" => \"fas fa-tag\",\n\t\t\t\"fas-f02c\" => \"fas fa-tags\",\n\t\t\t\"fas-f4db\" => \"fas fa-tape\",\n\t\t\t\"fas-f0ae\" => \"fas fa-tasks\",\n\t\t\t\"fas-f1ba\" => \"fas fa-taxi\",\n\t\t\t\"fas-f62e\" => \"fas fa-teeth\",\n\t\t\t\"fas-f62f\" => \"fas fa-teeth-open\",\n\t\t\t\"fas-f769\" => \"fas fa-temperature-high\",\n\t\t\t\"fas-f76b\" => \"fas fa-temperature-low\",\n\t\t\t\"fas-f7d7\" => \"fas fa-tenge\",\n\t\t\t\"fas-f120\" => \"fas fa-terminal\",\n\t\t\t\"fas-f034\" => \"fas fa-text-height\",\n\t\t\t\"fas-f035\" => \"fas fa-text-width\",\n\t\t\t\"fas-f00a\" => \"fas fa-th\",\n\t\t\t\"fas-f009\" => \"fas fa-th-large\",\n\t\t\t\"fas-f00b\" => \"fas fa-th-list\",\n\t\t\t\"fas-f630\" => \"fas fa-theater-masks\",\n\t\t\t\"fas-f491\" => \"fas fa-thermometer\",\n\t\t\t\"fas-f2cb\" => \"fas fa-thermometer-empty\",\n\t\t\t\"fas-f2c7\" => \"fas fa-thermometer-full\",\n\t\t\t\"fas-f2c9\" => \"fas fa-thermometer-half\",\n\t\t\t\"fas-f2ca\" => \"fas fa-thermometer-quarter\",\n\t\t\t\"fas-f2c8\" => \"fas fa-thermometer-three-quarters\",\n\t\t\t\"fas-f165\" => \"fas fa-thumbs-down\",\n\t\t\t\"fas-f164\" => \"fas fa-thumbs-up\",\n\t\t\t\"fas-f08d\" => \"fas fa-thumbtack\",\n\t\t\t\"fas-f3ff\" => \"fas fa-ticket-alt\",\n\t\t\t\"fas-f00d\" => \"fas fa-times\",\n\t\t\t\"fas-f057\" => \"fas fa-times-circle\",\n\t\t\t\"fas-f043\" => \"fas fa-tint\",\n\t\t\t\"fas-f5c7\" => \"fas fa-tint-slash\",\n\t\t\t\"fas-f5c8\" => \"fas fa-tired\",\n\t\t\t\"fas-f204\" => \"fas fa-toggle-off\",\n\t\t\t\"fas-f205\" => \"fas fa-toggle-on\",\n\t\t\t\"fas-f7d8\" => \"fas fa-toilet\",\n\t\t\t\"fas-f71e\" => \"fas fa-toilet-paper\",\n\t\t\t\"fas-f972\" => \"fas fa-toilet-paper-slash\",\n\t\t\t\"fas-f552\" => \"fas fa-toolbox\",\n\t\t\t\"fas-f7d9\" => \"fas fa-tools\",\n\t\t\t\"fas-f5c9\" => \"fas fa-tooth\",\n\t\t\t\"fas-f6a0\" => \"fas fa-torah\",\n\t\t\t\"fas-f6a1\" => \"fas fa-torii-gate\",\n\t\t\t\"fas-f722\" => \"fas fa-tractor\",\n\t\t\t\"fas-f25c\" => \"fas fa-trademark\",\n\t\t\t\"fas-f637\" => \"fas fa-traffic-light\",\n\t\t\t\"fas-f941\" => \"fas fa-trailer\",\n\t\t\t\"fas-f238\" => \"fas fa-train\",\n\t\t\t\"fas-f7da\" => \"fas fa-tram\",\n\t\t\t\"fas-f224\" => \"fas fa-transgender\",\n\t\t\t\"fas-f225\" => \"fas fa-transgender-alt\",\n\t\t\t\"fas-f1f8\" => \"fas fa-trash\",\n\t\t\t\"fas-f2ed\" => \"fas fa-trash-alt\",\n\t\t\t\"fas-f829\" => \"fas fa-trash-restore\",\n\t\t\t\"fas-f82a\" => \"fas fa-trash-restore-alt\",\n\t\t\t\"fas-f1bb\" => \"fas fa-tree\",\n\t\t\t\"fas-f091\" => \"fas fa-trophy\",\n\t\t\t\"fas-f0d1\" => \"fas fa-truck\",\n\t\t\t\"fas-f4de\" => \"fas fa-truck-loading\",\n\t\t\t\"fas-f63b\" => \"fas fa-truck-monster\",\n\t\t\t\"fas-f4df\" => \"fas fa-truck-moving\",\n\t\t\t\"fas-f63c\" => \"fas fa-truck-pickup\",\n\t\t\t\"fas-f553\" => \"fas fa-tshirt\",\n\t\t\t\"fas-f1e4\" => \"fas fa-tty\",\n\t\t\t\"fas-f26c\" => \"fas fa-tv\",\n\t\t\t\"fas-f0e9\" => \"fas fa-umbrella\",\n\t\t\t\"fas-f5ca\" => \"fas fa-umbrella-beach\",\n\t\t\t\"fas-f0cd\" => \"fas fa-underline\",\n\t\t\t\"fas-f0e2\" => \"fas fa-undo\",\n\t\t\t\"fas-f2ea\" => \"fas fa-undo-alt\",\n\t\t\t\"fas-f29a\" => \"fas fa-universal-access\",\n\t\t\t\"fas-f19c\" => \"fas fa-university\",\n\t\t\t\"fas-f127\" => \"fas fa-unlink\",\n\t\t\t\"fas-f09c\" => \"fas fa-unlock\",\n\t\t\t\"fas-f13e\" => \"fas fa-unlock-alt\",\n\t\t\t\"fas-f093\" => \"fas fa-upload\",\n\t\t\t\"fas-f007\" => \"fas fa-user\",\n\t\t\t\"fas-f406\" => \"fas fa-user-alt\",\n\t\t\t\"fas-f4fa\" => \"fas fa-user-alt-slash\",\n\t\t\t\"fas-f4fb\" => \"fas fa-user-astronaut\",\n\t\t\t\"fas-f4fc\" => \"fas fa-user-check\",\n\t\t\t\"fas-f2bd\" => \"fas fa-user-circle\",\n\t\t\t\"fas-f4fd\" => \"fas fa-user-clock\",\n\t\t\t\"fas-f4fe\" => \"fas fa-user-cog\",\n\t\t\t\"fas-f4ff\" => \"fas fa-user-edit\",\n\t\t\t\"fas-f500\" => \"fas fa-user-friends\",\n\t\t\t\"fas-f501\" => \"fas fa-user-graduate\",\n\t\t\t\"fas-f728\" => \"fas fa-user-injured\",\n\t\t\t\"fas-f502\" => \"fas fa-user-lock\",\n\t\t\t\"fas-f0f0\" => \"fas fa-user-md\",\n\t\t\t\"fas-f503\" => \"fas fa-user-minus\",\n\t\t\t\"fas-f504\" => \"fas fa-user-ninja\",\n\t\t\t\"fas-f82f\" => \"fas fa-user-nurse\",\n\t\t\t\"fas-f234\" => \"fas fa-user-plus\",\n\t\t\t\"fas-f21b\" => \"fas fa-user-secret\",\n\t\t\t\"fas-f505\" => \"fas fa-user-shield\",\n\t\t\t\"fas-f506\" => \"fas fa-user-slash\",\n\t\t\t\"fas-f507\" => \"fas fa-user-tag\",\n\t\t\t\"fas-f508\" => \"fas fa-user-tie\",\n\t\t\t\"fas-f235\" => \"fas fa-user-times\",\n\t\t\t\"fas-f0c0\" => \"fas fa-users\",\n\t\t\t\"fas-f509\" => \"fas fa-users-cog\",\n\t\t\t\"fas-f2e5\" => \"fas fa-utensil-spoon\",\n\t\t\t\"fas-f2e7\" => \"fas fa-utensils\",\n\t\t\t\"fas-f5cb\" => \"fas fa-vector-square\",\n\t\t\t\"fas-f221\" => \"fas fa-venus\",\n\t\t\t\"fas-f226\" => \"fas fa-venus-double\",\n\t\t\t\"fas-f228\" => \"fas fa-venus-mars\",\n\t\t\t\"fas-f492\" => \"fas fa-vial\",\n\t\t\t\"fas-f493\" => \"fas fa-vials\",\n\t\t\t\"fas-f03d\" => \"fas fa-video\",\n\t\t\t\"fas-f4e2\" => \"fas fa-video-slash\",\n\t\t\t\"fas-f6a7\" => \"fas fa-vihara\",\n\t\t\t\"fas-f974\" => \"fas fa-virus\",\n\t\t\t\"fas-f975\" => \"fas fa-virus-slash\",\n\t\t\t\"fas-f976\" => \"fas fa-viruses\",\n\t\t\t\"fas-f897\" => \"fas fa-voicemail\",\n\t\t\t\"fas-f45f\" => \"fas fa-volleyball-ball\",\n\t\t\t\"fas-f027\" => \"fas fa-volume-down\",\n\t\t\t\"fas-f6a9\" => \"fas fa-volume-mute\",\n\t\t\t\"fas-f026\" => \"fas fa-volume-off\",\n\t\t\t\"fas-f028\" => \"fas fa-volume-up\",\n\t\t\t\"fas-f772\" => \"fas fa-vote-yea\",\n\t\t\t\"fas-f729\" => \"fas fa-vr-cardboard\",\n\t\t\t\"fas-f554\" => \"fas fa-walking\",\n\t\t\t\"fas-f555\" => \"fas fa-wallet\",\n\t\t\t\"fas-f494\" => \"fas fa-warehouse\",\n\t\t\t\"fas-f773\" => \"fas fa-water\",\n\t\t\t\"fas-f83e\" => \"fas fa-wave-square\",\n\t\t\t\"fas-f496\" => \"fas fa-weight\",\n\t\t\t\"fas-f5cd\" => \"fas fa-weight-hanging\",\n\t\t\t\"fas-f193\" => \"fas fa-wheelchair\",\n\t\t\t\"fas-f1eb\" => \"fas fa-wifi\",\n\t\t\t\"fas-f72e\" => \"fas fa-wind\",\n\t\t\t\"fas-f410\" => \"fas fa-window-close\",\n\t\t\t\"fas-f2d0\" => \"fas fa-window-maximize\",\n\t\t\t\"fas-f2d1\" => \"fas fa-window-minimize\",\n\t\t\t\"fas-f2d2\" => \"fas fa-window-restore\",\n\t\t\t\"fas-f72f\" => \"fas fa-wine-bottle\",\n\t\t\t\"fas-f4e3\" => \"fas fa-wine-glass\",\n\t\t\t\"fas-f5ce\" => \"fas fa-wine-glass-alt\",\n\t\t\t\"fas-f159\" => \"fas fa-won-sign\",\n\t\t\t\"fas-f0ad\" => \"fas fa-wrench\",\n\t\t\t\"fas-f497\" => \"fas fa-x-ray\",\n\t\t\t\"fas-f157\" => \"fas fa-yen-sign\",\n\t\t\t\"fas-f6ad\" => \"fas fa-yin-y\"\n\t\t);\n\n\t\t$regular_icons = array(\t\n\t\t\t\"far-f2b9\" => \"far fa-address-book\",\n\t\t\t\"far-f2bb\" => \"far fa-address-card\",\n\t\t\t\"far-f556\" => \"far fa-angry\",\n\t\t\t\"far-f358\" => \"far fa-arrow-alt-circle-down\",\n\t\t\t\"far-f359\" => \"far fa-arrow-alt-circle-left\",\n\t\t\t\"far-f35a\" => \"far fa-arrow-alt-circle-right\",\n\t\t\t\"far-f35b\" => \"far fa-arrow-alt-circle-up\",\n\t\t\t\"far-f0f3\" => \"far fa-bell\",\n\t\t\t\"far-f1f6\" => \"far fa-bell-slash\",\n\t\t\t\"far-f02e\" => \"far fa-bookmark\",\n\t\t\t\"far-f1ad\" => \"far fa-building\",\n\t\t\t\"far-f133\" => \"far fa-calendar\",\n\t\t\t\"far-f073\" => \"far fa-calendar-alt\",\n\t\t\t\"far-f274\" => \"far fa-calendar-check\",\n\t\t\t\"far-f272\" => \"far fa-calendar-minus\",\n\t\t\t\"far-f271\" => \"far fa-calendar-plus\",\n\t\t\t\"far-f273\" => \"far fa-calendar-times\",\n\t\t\t\"far-f150\" => \"far fa-caret-square-down\",\n\t\t\t\"far-f191\" => \"far fa-caret-square-left\",\n\t\t\t\"far-f152\" => \"far fa-caret-square-right\",\n\t\t\t\"far-f151\" => \"far fa-caret-square-up\",\n\t\t\t\"far-f080\" => \"far fa-chart-bar\",\n\t\t\t\"far-f058\" => \"far fa-check-circle\",\n\t\t\t\"far-f14a\" => \"far fa-check-square\",\n\t\t\t\"far-f111\" => \"far fa-circle\",\n\t\t\t\"far-f328\" => \"far fa-clipboard\",\n\t\t\t\"far-f017\" => \"far fa-clock\",\n\t\t\t\"far-f24d\" => \"far fa-clone\",\n\t\t\t\"far-f20a\" => \"far fa-closed-captioning\",\n\t\t\t\"far-f075\" => \"far fa-comment\",\n\t\t\t\"far-f27a\" => \"far fa-comment-alt\",\n\t\t\t\"far-f4ad\" => \"far fa-comment-dots\",\n\t\t\t\"far-f086\" => \"far fa-comments\",\n\t\t\t\"far-f14e\" => \"far fa-compass\",\n\t\t\t\"far-f0c5\" => \"far fa-copy\",\n\t\t\t\"far-f1f9\" => \"far fa-copyright\",\n\t\t\t\"far-f09d\" => \"far fa-credit-card\",\n\t\t\t\"far-f567\" => \"far fa-dizzy\",\n\t\t\t\"far-f192\" => \"far fa-dot-circle\",\n\t\t\t\"far-f044\" => \"far fa-edit\",\n\t\t\t\"far-f0e0\" => \"far fa-envelope\",\n\t\t\t\"far-f2b6\" => \"far fa-envelope-open\",\n\t\t\t\"far-f06e\" => \"far fa-eye\",\n\t\t\t\"far-f070\" => \"far fa-eye-slash\",\n\t\t\t\"far-f15b\" => \"far fa-file\",\n\t\t\t\"far-f15c\" => \"far fa-file-alt\",\n\t\t\t\"far-f1c6\" => \"far fa-file-archive\",\n\t\t\t\"far-f1c7\" => \"far fa-file-audio\",\n\t\t\t\"far-f1c9\" => \"far fa-file-code\",\n\t\t\t\"far-f1c3\" => \"far fa-file-excel\",\n\t\t\t\"far-f1c5\" => \"far fa-file-image\",\n\t\t\t\"far-f1c1\" => \"far fa-file-pdf\",\n\t\t\t\"far-f1c4\" => \"far fa-file-powerpoint\",\n\t\t\t\"far-f1c8\" => \"far fa-file-video\",\n\t\t\t\"far-f1c2\" => \"far fa-file-word\",\n\t\t\t\"far-f024\" => \"far fa-flag\",\n\t\t\t\"far-f579\" => \"far fa-flushed\",\n\t\t\t\"far-f07b\" => \"far fa-folder\",\n\t\t\t\"far-f07c\" => \"far fa-folder-open\",\n\t\t\t\"far-f119\" => \"far fa-frown\",\n\t\t\t\"far-f57a\" => \"far fa-frown-open\",\n\t\t\t\"far-f1e3\" => \"far fa-futbol\",\n\t\t\t\"far-f3a5\" => \"far fa-gem\",\n\t\t\t\"far-f57f\" => \"far fa-grimace\",\n\t\t\t\"far-f580\" => \"far fa-grin\",\n\t\t\t\"far-f581\" => \"far fa-grin-alt\",\n\t\t\t\"far-f582\" => \"far fa-grin-beam\",\n\t\t\t\"far-f583\" => \"far fa-grin-beam-sweat\",\n\t\t\t\"far-f584\" => \"far fa-grin-hearts\",\n\t\t\t\"far-f585\" => \"far fa-grin-squint\",\n\t\t\t\"far-f586\" => \"far fa-grin-squint-tears\",\n\t\t\t\"far-f587\" => \"far fa-grin-stars\",\n\t\t\t\"far-f588\" => \"far fa-grin-tears\",\n\t\t\t\"far-f589\" => \"far fa-grin-tongue\",\n\t\t\t\"far-f58a\" => \"far fa-grin-tongue-squint\",\n\t\t\t\"far-f58b\" => \"far fa-grin-tongue-wink\",\n\t\t\t\"far-f58c\" => \"far fa-grin-wink\",\n\t\t\t\"far-f258\" => \"far fa-hand-lizard\",\n\t\t\t\"far-f256\" => \"far fa-hand-paper\",\n\t\t\t\"far-f25b\" => \"far fa-hand-peace\",\n\t\t\t\"far-f0a7\" => \"far fa-hand-point-down\",\n\t\t\t\"far-f0a5\" => \"far fa-hand-point-left\",\n\t\t\t\"far-f0a4\" => \"far fa-hand-point-right\",\n\t\t\t\"far-f0a6\" => \"far fa-hand-point-up\",\n\t\t\t\"far-f25a\" => \"far fa-hand-pointer\",\n\t\t\t\"far-f255\" => \"far fa-hand-rock\",\n\t\t\t\"far-f257\" => \"far fa-hand-scissors\",\n\t\t\t\"far-f259\" => \"far fa-hand-spock\",\n\t\t\t\"far-f2b5\" => \"far fa-handshake\",\n\t\t\t\"far-f0a0\" => \"far fa-hdd\",\n\t\t\t\"far-f004\" => \"far fa-heart\",\n\t\t\t\"far-f0f8\" => \"far fa-hospital\",\n\t\t\t\"far-f254\" => \"far fa-hourglass\",\n\t\t\t\"far-f2c1\" => \"far fa-id-badge\",\n\t\t\t\"far-f2c2\" => \"far fa-id-card\",\n\t\t\t\"far-f03e\" => \"far fa-image\",\n\t\t\t\"far-f302\" => \"far fa-images\",\n\t\t\t\"far-f11c\" => \"far fa-keyboard\",\n\t\t\t\"far-f596\" => \"far fa-kiss\",\n\t\t\t\"far-f597\" => \"far fa-kiss-beam\",\n\t\t\t\"far-f598\" => \"far fa-kiss-wink-heart\",\n\t\t\t\"far-f599\" => \"far fa-laugh\",\n\t\t\t\"far-f59a\" => \"far fa-laugh-beam\",\n\t\t\t\"far-f59b\" => \"far fa-laugh-squint\",\n\t\t\t\"far-f59c\" => \"far fa-laugh-wink\",\n\t\t\t\"far-f094\" => \"far fa-lemon\",\n\t\t\t\"far-f1cd\" => \"far fa-life-ring\",\n\t\t\t\"far-f0eb\" => \"far fa-lightbulb\",\n\t\t\t\"far-f022\" => \"far fa-list-alt\",\n\t\t\t\"far-f279\" => \"far fa-map\",\n\t\t\t\"far-f11a\" => \"far fa-meh\",\n\t\t\t\"far-f5a4\" => \"far fa-meh-blank\",\n\t\t\t\"far-f5a5\" => \"far fa-meh-rolling-eyes\",\n\t\t\t\"far-f146\" => \"far fa-minus-square\",\n\t\t\t\"far-f3d1\" => \"far fa-money-bill-alt\",\n\t\t\t\"far-f186\" => \"far fa-moon\",\n\t\t\t\"far-f1ea\" => \"far fa-newspaper\",\n\t\t\t\"far-f247\" => \"far fa-object-group\",\n\t\t\t\"far-f248\" => \"far fa-object-ungroup\",\n\t\t\t\"far-f1d8\" => \"far fa-paper-plane\",\n\t\t\t\"far-f28b\" => \"far fa-pause-circle\",\n\t\t\t\"far-f144\" => \"far fa-play-circle\",\n\t\t\t\"far-f0fe\" => \"far fa-plus-square\",\n\t\t\t\"far-f059\" => \"far fa-question-circle\",\n\t\t\t\"far-f25d\" => \"far fa-registered\",\n\t\t\t\"far-f5b3\" => \"far fa-sad-cry\",\n\t\t\t\"far-f5b4\" => \"far fa-sad-tear\",\n\t\t\t\"far-f0c7\" => \"far fa-save\",\n\t\t\t\"far-f14d\" => \"far fa-share-square\",\n\t\t\t\"far-f118\" => \"far fa-smile\",\n\t\t\t\"far-f5b8\" => \"far fa-smile-beam\",\n\t\t\t\"far-f4da\" => \"far fa-smile-wink\",\n\t\t\t\"far-f2dc\" => \"far fa-snowflake\",\n\t\t\t\"far-f0c8\" => \"far fa-square\",\n\t\t\t\"far-f005\" => \"far fa-star\",\n\t\t\t\"far-f089\" => \"far fa-star-half\",\n\t\t\t\"far-f249\" => \"far fa-sticky-note\",\n\t\t\t\"far-f28d\" => \"far fa-stop-circle\",\n\t\t\t\"far-f185\" => \"far fa-sun\",\n\t\t\t\"far-f5c2\" => \"far fa-surprise\",\n\t\t\t\"far-f165\" => \"far fa-thumbs-down\",\n\t\t\t\"far-f164\" => \"far fa-thumbs-up\",\n\t\t\t\"far-f057\" => \"far fa-times-circle\",\n\t\t\t\"far-f5c8\" => \"far fa-tired\",\n\t\t\t\"far-f2ed\" => \"far fa-trash-alt\",\n\t\t\t\"far-f007\" => \"far fa-user\",\n\t\t\t\"far-f2bd\" => \"far fa-user-circle\",\n\t\t\t\"far-f410\" => \"far fa-window-close\",\n\t\t\t\"far-f2d0\" => \"far fa-window-maximize\",\n\t\t\t\"far-f2d1\" => \"far fa-window-minimize\",\n\t\t\t\"far-f2d2\" => \"far fa-window-rest\"\n\t\t);\n\n\t\t$brand_icons = array(\n\t\t\t\"fab-f26e\" => \"fab fa-500px\",\n\t\t\t\"fab-f368\" => \"fab fa-accessible-icon\",\n\t\t\t\"fab-f369\" => \"fab fa-accusoft\",\n\t\t\t\"fab-f6af\" => \"fab fa-acquisitions-incorporated\",\n\t\t\t\"fab-f170\" => \"fab fa-adn\",\n\t\t\t\"fab-f778\" => \"fab fa-adobe\",\n\t\t\t\"fab-f36a\" => \"fab fa-adversal\",\n\t\t\t\"fab-f36b\" => \"fab fa-affiliatetheme\",\n\t\t\t\"fab-f834\" => \"fab fa-airbnb\",\n\t\t\t\"fab-f36c\" => \"fab fa-algolia\",\n\t\t\t\"fab-f642\" => \"fab fa-alipay\",\n\t\t\t\"fab-f270\" => \"fab fa-amazon\",\n\t\t\t\"fab-f42c\" => \"fab fa-amazon-pay\",\n\t\t\t\"fab-f36d\" => \"fab fa-amilia\",\n\t\t\t\"fab-f17b\" => \"fab fa-android\",\n\t\t\t\"fab-f209\" => \"fab fa-angellist\",\n\t\t\t\"fab-f36e\" => \"fab fa-angrycreative\",\n\t\t\t\"fab-f420\" => \"fab fa-angular\",\n\t\t\t\"fab-f36f\" => \"fab fa-app-store\",\n\t\t\t\"fab-f370\" => \"fab fa-app-store-ios\",\n\t\t\t\"fab-f371\" => \"fab fa-apper\",\n\t\t\t\"fab-f179\" => \"fab fa-apple\",\n\t\t\t\"fab-f415\" => \"fab fa-apple-pay\",\n\t\t\t\"fab-f77a\" => \"fab fa-artstation\",\n\t\t\t\"fab-f372\" => \"fab fa-asymmetrik\",\n\t\t\t\"fab-f77b\" => \"fab fa-atlassian\",\n\t\t\t\"fab-f373\" => \"fab fa-audible\",\n\t\t\t\"fab-f41c\" => \"fab fa-autoprefixer\",\n\t\t\t\"fab-f374\" => \"fab fa-avianex\",\n\t\t\t\"fab-f421\" => \"fab fa-aviato\",\n\t\t\t\"fab-f375\" => \"fab fa-aws\",\n\t\t\t\"fab-f2d5\" => \"fab fa-bandcamp\",\n\t\t\t\"fab-f835\" => \"fab fa-battle-net\",\n\t\t\t\"fab-f1b4\" => \"fab fa-behance\",\n\t\t\t\"fab-f1b5\" => \"fab fa-behance-square\",\n\t\t\t\"fab-f378\" => \"fab fa-bimobject\",\n\t\t\t\"fab-f171\" => \"fab fa-bitbucket\",\n\t\t\t\"fab-f379\" => \"fab fa-bitcoin\",\n\t\t\t\"fab-f37a\" => \"fab fa-bity\",\n\t\t\t\"fab-f27e\" => \"fab fa-black-tie\",\n\t\t\t\"fab-f37b\" => \"fab fa-blackberry\",\n\t\t\t\"fab-f37c\" => \"fab fa-blogger\",\n\t\t\t\"fab-f37d\" => \"fab fa-blogger-b\",\n\t\t\t\"fab-f293\" => \"fab fa-bluetooth\",\n\t\t\t\"fab-f294\" => \"fab fa-bluetooth-b\",\n\t\t\t\"fab-f836\" => \"fab fa-bootstrap\",\n\t\t\t\"fab-f15a\" => \"fab fa-btc\",\n\t\t\t\"fab-f837\" => \"fab fa-buffer\",\n\t\t\t\"fab-f37f\" => \"fab fa-buromobelexperte\",\n\t\t\t\"fab-f8a6\" => \"fab fa-buy-n-large\",\n\t\t\t\"fab-f20d\" => \"fab fa-buysellads\",\n\t\t\t\"fab-f785\" => \"fab fa-canadian-maple-leaf\",\n\t\t\t\"fab-f42d\" => \"fab fa-cc-amazon-pay\",\n\t\t\t\"fab-f1f3\" => \"fab fa-cc-amex\",\n\t\t\t\"fab-f416\" => \"fab fa-cc-apple-pay\",\n\t\t\t\"fab-f24c\" => \"fab fa-cc-diners-club\",\n\t\t\t\"fab-f1f2\" => \"fab fa-cc-discover\",\n\t\t\t\"fab-f24b\" => \"fab fa-cc-jcb\",\n\t\t\t\"fab-f1f1\" => \"fab fa-cc-mastercard\",\n\t\t\t\"fab-f1f4\" => \"fab fa-cc-paypal\",\n\t\t\t\"fab-f1f5\" => \"fab fa-cc-stripe\",\n\t\t\t\"fab-f1f0\" => \"fab fa-cc-visa\",\n\t\t\t\"fab-f380\" => \"fab fa-centercode\",\n\t\t\t\"fab-f789\" => \"fab fa-centos\",\n\t\t\t\"fab-f268\" => \"fab fa-chrome\",\n\t\t\t\"fab-f838\" => \"fab fa-chromecast\",\n\t\t\t\"fab-f383\" => \"fab fa-cloudscale\",\n\t\t\t\"fab-f384\" => \"fab fa-cloudsmith\",\n\t\t\t\"fab-f385\" => \"fab fa-cloudversify\",\n\t\t\t\"fab-f1cb\" => \"fab fa-codepen\",\n\t\t\t\"fab-f284\" => \"fab fa-codiepie\",\n\t\t\t\"fab-f78d\" => \"fab fa-confluence\",\n\t\t\t\"fab-f20e\" => \"fab fa-connectdevelop\",\n\t\t\t\"fab-f26d\" => \"fab fa-contao\",\n\t\t\t\"fab-f89e\" => \"fab fa-cotton-bureau\",\n\t\t\t\"fab-f388\" => \"fab fa-cpanel\",\n\t\t\t\"fab-f25e\" => \"fab fa-creative-commons\",\n\t\t\t\"fab-f4e7\" => \"fab fa-creative-commons-by\",\n\t\t\t\"fab-f4e8\" => \"fab fa-creative-commons-nc\",\n\t\t\t\"fab-f4e9\" => \"fab fa-creative-commons-nc-eu\",\n\t\t\t\"fab-f4ea\" => \"fab fa-creative-commons-nc-jp\",\n\t\t\t\"fab-f4eb\" => \"fab fa-creative-commons-nd\",\n\t\t\t\"fab-f4ec\" => \"fab fa-creative-commons-pd\",\n\t\t\t\"fab-f4ed\" => \"fab fa-creative-commons-pd-alt\",\n\t\t\t\"fab-f4ee\" => \"fab fa-creative-commons-remix\",\n\t\t\t\"fab-f4ef\" => \"fab fa-creative-commons-sa\",\n\t\t\t\"fab-f4f0\" => \"fab fa-creative-commons-sampling\",\n\t\t\t\"fab-f4f1\" => \"fab fa-creative-commons-sampling-plus\",\n\t\t\t\"fab-f4f2\" => \"fab fa-creative-commons-share\",\n\t\t\t\"fab-f4f3\" => \"fab fa-creative-commons-zero\",\n\t\t\t\"fab-f6c9\" => \"fab fa-critical-role\",\n\t\t\t\"fab-f13c\" => \"fab fa-css3\",\n\t\t\t\"fab-f38b\" => \"fab fa-css3-alt\",\n\t\t\t\"fab-f38c\" => \"fab fa-cuttlefish\",\n\t\t\t\"fab-f38d\" => \"fab fa-d-and-d\",\n\t\t\t\"fab-f6ca\" => \"fab fa-d-and-d-beyond\",\n\t\t\t\"fab-f952\" => \"fab fa-dailymotion\",\n\t\t\t\"fab-f210\" => \"fab fa-dashcube\",\n\t\t\t\"fab-f1a5\" => \"fab fa-delicious\",\n\t\t\t\"fab-f38e\" => \"fab fa-deploydog\",\n\t\t\t\"fab-f38f\" => \"fab fa-deskpro\",\n\t\t\t\"fab-f6cc\" => \"fab fa-dev\",\n\t\t\t\"fab-f1bd\" => \"fab fa-deviantart\",\n\t\t\t\"fab-f790\" => \"fab fa-dhl\",\n\t\t\t\"fab-f791\" => \"fab fa-diaspora\",\n\t\t\t\"fab-f1a6\" => \"fab fa-digg\",\n\t\t\t\"fab-f391\" => \"fab fa-digital-ocean\",\n\t\t\t\"fab-f392\" => \"fab fa-discord\",\n\t\t\t\"fab-f393\" => \"fab fa-discourse\",\n\t\t\t\"fab-f394\" => \"fab fa-dochub\",\n\t\t\t\"fab-f395\" => \"fab fa-docker\",\n\t\t\t\"fab-f396\" => \"fab fa-draft2digital\",\n\t\t\t\"fab-f17d\" => \"fab fa-dribbble\",\n\t\t\t\"fab-f397\" => \"fab fa-dribbble-square\",\n\t\t\t\"fab-f16b\" => \"fab fa-dropbox\",\n\t\t\t\"fab-f1a9\" => \"fab fa-drupal\",\n\t\t\t\"fab-f399\" => \"fab fa-dyalog\",\n\t\t\t\"fab-f39a\" => \"fab fa-earlybirds\",\n\t\t\t\"fab-f4f4\" => \"fab fa-ebay\",\n\t\t\t\"fab-f282\" => \"fab fa-edge\",\n\t\t\t\"fab-f430\" => \"fab fa-elementor\",\n\t\t\t\"fab-f5f1\" => \"fab fa-ello\",\n\t\t\t\"fab-f423\" => \"fab fa-ember\",\n\t\t\t\"fab-f1d1\" => \"fab fa-empire\",\n\t\t\t\"fab-f299\" => \"fab fa-envira\",\n\t\t\t\"fab-f39d\" => \"fab fa-erlang\",\n\t\t\t\"fab-f42e\" => \"fab fa-ethereum\",\n\t\t\t\"fab-f2d7\" => \"fab fa-etsy\",\n\t\t\t\"fab-f839\" => \"fab fa-evernote\",\n\t\t\t\"fab-f23e\" => \"fab fa-expeditedssl\",\n\t\t\t\"fab-f09a\" => \"fab fa-facebook\",\n\t\t\t\"fab-f39e\" => \"fab fa-facebook-f\",\n\t\t\t\"fab-f39f\" => \"fab fa-facebook-messenger\",\n\t\t\t\"fab-f082\" => \"fab fa-facebook-square\",\n\t\t\t\"fab-f6dc\" => \"fab fa-fantasy-flight-games\",\n\t\t\t\"fab-f797\" => \"fab fa-fedex\",\n\t\t\t\"fab-f798\" => \"fab fa-fedora\",\n\t\t\t\"fab-f799\" => \"fab fa-figma\",\n\t\t\t\"fab-f269\" => \"fab fa-firefox\",\n\t\t\t\"fab-f907\" => \"fab fa-firefox-browser\",\n\t\t\t\"fab-f2b0\" => \"fab fa-first-order\",\n\t\t\t\"fab-f50a\" => \"fab fa-first-order-alt\",\n\t\t\t\"fab-f3a1\" => \"fab fa-firstdraft\",\n\t\t\t\"fab-f16e\" => \"fab fa-flickr\",\n\t\t\t\"fab-f44d\" => \"fab fa-flipboard\",\n\t\t\t\"fab-f417\" => \"fab fa-fly\",\n\t\t\t\"fab-f2b4\" => \"fab fa-font-awesome\",\n\t\t\t\"fab-f35c\" => \"fab fa-font-awesome-alt\",\n\t\t\t\"fab-f425\" => \"fab fa-font-awesome-flag\",\n\t\t\t\"fab-f280\" => \"fab fa-fonticons\",\n\t\t\t\"fab-f3a2\" => \"fab fa-fonticons-fi\",\n\t\t\t\"fab-f286\" => \"fab fa-fort-awesome\",\n\t\t\t\"fab-f3a3\" => \"fab fa-fort-awesome-alt\",\n\t\t\t\"fab-f211\" => \"fab fa-forumbee\",\n\t\t\t\"fab-f180\" => \"fab fa-foursquare\",\n\t\t\t\"fab-f2c5\" => \"fab fa-free-code-camp\",\n\t\t\t\"fab-f3a4\" => \"fab fa-freebsd\",\n\t\t\t\"fab-f50b\" => \"fab fa-fulcrum\",\n\t\t\t\"fab-f50c\" => \"fab fa-galactic-republic\",\n\t\t\t\"fab-f50d\" => \"fab fa-galactic-senate\",\n\t\t\t\"fab-f265\" => \"fab fa-get-pocket\",\n\t\t\t\"fab-f260\" => \"fab fa-gg\",\n\t\t\t\"fab-f261\" => \"fab fa-gg-circle\",\n\t\t\t\"fab-f1d3\" => \"fab fa-git\",\n\t\t\t\"fab-f841\" => \"fab fa-git-alt\",\n\t\t\t\"fab-f1d2\" => \"fab fa-git-square\",\n\t\t\t\"fab-f09b\" => \"fab fa-github\",\n\t\t\t\"fab-f113\" => \"fab fa-github-alt\",\n\t\t\t\"fab-f092\" => \"fab fa-github-square\",\n\t\t\t\"fab-f3a6\" => \"fab fa-gitkraken\",\n\t\t\t\"fab-f296\" => \"fab fa-gitlab\",\n\t\t\t\"fab-f426\" => \"fab fa-gitter\",\n\t\t\t\"fab-f2a5\" => \"fab fa-glide\",\n\t\t\t\"fab-f2a6\" => \"fab fa-glide-g\",\n\t\t\t\"fab-f3a7\" => \"fab fa-gofore\",\n\t\t\t\"fab-f3a8\" => \"fab fa-goodreads\",\n\t\t\t\"fab-f3a9\" => \"fab fa-goodreads-g\",\n\t\t\t\"fab-f1a0\" => \"fab fa-google\",\n\t\t\t\"fab-f3aa\" => \"fab fa-google-drive\",\n\t\t\t\"fab-f3ab\" => \"fab fa-google-play\",\n\t\t\t\"fab-f2b3\" => \"fab fa-google-plus\",\n\t\t\t\"fab-f0d5\" => \"fab fa-google-plus-g\",\n\t\t\t\"fab-f0d4\" => \"fab fa-google-plus-square\",\n\t\t\t\"fab-f1ee\" => \"fab fa-google-wallet\",\n\t\t\t\"fab-f184\" => \"fab fa-gratipay\",\n\t\t\t\"fab-f2d6\" => \"fab fa-grav\",\n\t\t\t\"fab-f3ac\" => \"fab fa-gripfire\",\n\t\t\t\"fab-f3ad\" => \"fab fa-grunt\",\n\t\t\t\"fab-f3ae\" => \"fab fa-gulp\",\n\t\t\t\"fab-f1d4\" => \"fab fa-hacker-news\",\n\t\t\t\"fab-f3af\" => \"fab fa-hacker-news-square\",\n\t\t\t\"fab-f5f7\" => \"fab fa-hackerrank\",\n\t\t\t\"fab-f452\" => \"fab fa-hips\",\n\t\t\t\"fab-f3b0\" => \"fab fa-hire-a-helper\",\n\t\t\t\"fab-f427\" => \"fab fa-hooli\",\n\t\t\t\"fab-f592\" => \"fab fa-hornbill\",\n\t\t\t\"fab-f3b1\" => \"fab fa-hotjar\",\n\t\t\t\"fab-f27c\" => \"fab fa-houzz\",\n\t\t\t\"fab-f13b\" => \"fab fa-html5\",\n\t\t\t\"fab-f3b2\" => \"fab fa-hubspot\",\n\t\t\t\"fab-f913\" => \"fab fa-ideal\",\n\t\t\t\"fab-f2d8\" => \"fab fa-imdb\",\n\t\t\t\"fab-f16d\" => \"fab fa-instagram\",\n\t\t\t\"fab-f955\" => \"fab fa-instagram-square\",\n\t\t\t\"fab-f7af\" => \"fab fa-intercom\",\n\t\t\t\"fab-f26b\" => \"fab fa-internet-explorer\",\n\t\t\t\"fab-f7b0\" => \"fab fa-invision\",\n\t\t\t\"fab-f208\" => \"fab fa-ioxhost\",\n\t\t\t\"fab-f83a\" => \"fab fa-itch-io\",\n\t\t\t\"fab-f3b4\" => \"fab fa-itunes\",\n\t\t\t\"fab-f3b5\" => \"fab fa-itunes-note\",\n\t\t\t\"fab-f4e4\" => \"fab fa-java\",\n\t\t\t\"fab-f50e\" => \"fab fa-jedi-order\",\n\t\t\t\"fab-f3b6\" => \"fab fa-jenkins\",\n\t\t\t\"fab-f7b1\" => \"fab fa-jira\",\n\t\t\t\"fab-f3b7\" => \"fab fa-joget\",\n\t\t\t\"fab-f1aa\" => \"fab fa-joomla\",\n\t\t\t\"fab-f3b8\" => \"fab fa-js\",\n\t\t\t\"fab-f3b9\" => \"fab fa-js-square\",\n\t\t\t\"fab-f1cc\" => \"fab fa-jsfiddle\",\n\t\t\t\"fab-f5fa\" => \"fab fa-kaggle\",\n\t\t\t\"fab-f4f5\" => \"fab fa-keybase\",\n\t\t\t\"fab-f3ba\" => \"fab fa-keycdn\",\n\t\t\t\"fab-f3bb\" => \"fab fa-kickstarter\",\n\t\t\t\"fab-f3bc\" => \"fab fa-kickstarter-k\",\n\t\t\t\"fab-f42f\" => \"fab fa-korvue\",\n\t\t\t\"fab-f3bd\" => \"fab fa-laravel\",\n\t\t\t\"fab-f202\" => \"fab fa-lastfm\",\n\t\t\t\"fab-f203\" => \"fab fa-lastfm-square\",\n\t\t\t\"fab-f212\" => \"fab fa-leanpub\",\n\t\t\t\"fab-f41d\" => \"fab fa-less\",\n\t\t\t\"fab-f3c0\" => \"fab fa-line\",\n\t\t\t\"fab-f08c\" => \"fab fa-linkedin\",\n\t\t\t\"fab-f0e1\" => \"fab fa-linkedin-in\",\n\t\t\t\"fab-f2b8\" => \"fab fa-linode\",\n\t\t\t\"fab-f17c\" => \"fab fa-linux\",\n\t\t\t\"fab-f3c3\" => \"fab fa-lyft\",\n\t\t\t\"fab-f3c4\" => \"fab fa-magento\",\n\t\t\t\"fab-f59e\" => \"fab fa-mailchimp\",\n\t\t\t\"fab-f50f\" => \"fab fa-mandalorian\",\n\t\t\t\"fab-f60f\" => \"fab fa-markdown\",\n\t\t\t\"fab-f4f6\" => \"fab fa-mastodon\",\n\t\t\t\"fab-f136\" => \"fab fa-maxcdn\",\n\t\t\t\"fab-f8ca\" => \"fab fa-mdb\",\n\t\t\t\"fab-f3c6\" => \"fab fa-medapps\",\n\t\t\t\"fab-f23a\" => \"fab fa-medium\",\n\t\t\t\"fab-f3c7\" => \"fab fa-medium-m\",\n\t\t\t\"fab-f3c8\" => \"fab fa-medrt\",\n\t\t\t\"fab-f2e0\" => \"fab fa-meetup\",\n\t\t\t\"fab-f5a3\" => \"fab fa-megaport\",\n\t\t\t\"fab-f7b3\" => \"fab fa-mendeley\",\n\t\t\t\"fab-f91a\" => \"fab fa-microblog\",\n\t\t\t\"fab-f3ca\" => \"fab fa-microsoft\",\n\t\t\t\"fab-f3cb\" => \"fab fa-mix\",\n\t\t\t\"fab-f289\" => \"fab fa-mixcloud\",\n\t\t\t\"fab-f956\" => \"fab fa-mixer\",\n\t\t\t\"fab-f3cc\" => \"fab fa-mizuni\",\n\t\t\t\"fab-f285\" => \"fab fa-modx\",\n\t\t\t\"fab-f3d0\" => \"fab fa-monero\",\n\t\t\t\"fab-f3d2\" => \"fab fa-napster\",\n\t\t\t\"fab-f612\" => \"fab fa-neos\",\n\t\t\t\"fab-f5a8\" => \"fab fa-nimblr\",\n\t\t\t\"fab-f419\" => \"fab fa-node\",\n\t\t\t\"fab-f3d3\" => \"fab fa-node-js\",\n\t\t\t\"fab-f3d4\" => \"fab fa-npm\",\n\t\t\t\"fab-f3d5\" => \"fab fa-ns8\",\n\t\t\t\"fab-f3d6\" => \"fab fa-nutritionix\",\n\t\t\t\"fab-f263\" => \"fab fa-odnoklassniki\",\n\t\t\t\"fab-f264\" => \"fab fa-odnoklassniki-square\",\n\t\t\t\"fab-f510\" => \"fab fa-old-republic\",\n\t\t\t\"fab-f23d\" => \"fab fa-opencart\",\n\t\t\t\"fab-f19b\" => \"fab fa-openid\",\n\t\t\t\"fab-f26a\" => \"fab fa-opera\",\n\t\t\t\"fab-f23c\" => \"fab fa-optin-monster\",\n\t\t\t\"fab-f8d2\" => \"fab fa-orcid\",\n\t\t\t\"fab-f41a\" => \"fab fa-osi\",\n\t\t\t\"fab-f3d7\" => \"fab fa-page4\",\n\t\t\t\"fab-f18c\" => \"fab fa-pagelines\",\n\t\t\t\"fab-f3d8\" => \"fab fa-palfed\",\n\t\t\t\"fab-f3d9\" => \"fab fa-patreon\",\n\t\t\t\"fab-f1ed\" => \"fab fa-paypal\",\n\t\t\t\"fab-f704\" => \"fab fa-penny-arcade\",\n\t\t\t\"fab-f3da\" => \"fab fa-periscope\",\n\t\t\t\"fab-f3db\" => \"fab fa-phabricator\",\n\t\t\t\"fab-f3dc\" => \"fab fa-phoenix-framework\",\n\t\t\t\"fab-f511\" => \"fab fa-phoenix-squadron\",\n\t\t\t\"fab-f457\" => \"fab fa-php\",\n\t\t\t\"fab-f2ae\" => \"fab fa-pied-piper\",\n\t\t\t\"fab-f1a8\" => \"fab fa-pied-piper-alt\",\n\t\t\t\"fab-f4e5\" => \"fab fa-pied-piper-hat\",\n\t\t\t\"fab-f1a7\" => \"fab fa-pied-piper-pp\",\n\t\t\t\"fab-f91e\" => \"fab fa-pied-piper-square\",\n\t\t\t\"fab-f0d2\" => \"fab fa-pinterest\",\n\t\t\t\"fab-f231\" => \"fab fa-pinterest-p\",\n\t\t\t\"fab-f0d3\" => \"fab fa-pinterest-square\",\n\t\t\t\"fab-f3df\" => \"fab fa-playstation\",\n\t\t\t\"fab-f288\" => \"fab fa-product-hunt\",\n\t\t\t\"fab-f3e1\" => \"fab fa-pushed\",\n\t\t\t\"fab-f3e2\" => \"fab fa-python\",\n\t\t\t\"fab-f1d6\" => \"fab fa-qq\",\n\t\t\t\"fab-f459\" => \"fab fa-quinscape\",\n\t\t\t\"fab-f2c4\" => \"fab fa-quora\",\n\t\t\t\"fab-f4f7\" => \"fab fa-r-project\",\n\t\t\t\"fab-f7bb\" => \"fab fa-raspberry-pi\",\n\t\t\t\"fab-f2d9\" => \"fab fa-ravelry\",\n\t\t\t\"fab-f41b\" => \"fab fa-react\",\n\t\t\t\"fab-f75d\" => \"fab fa-reacteurope\",\n\t\t\t\"fab-f4d5\" => \"fab fa-readme\",\n\t\t\t\"fab-f1d0\" => \"fab fa-rebel\",\n\t\t\t\"fab-f3e3\" => \"fab fa-red-river\",\n\t\t\t\"fab-f1a1\" => \"fab fa-reddit\",\n\t\t\t\"fab-f281\" => \"fab fa-reddit-alien\",\n\t\t\t\"fab-f1a2\" => \"fab fa-reddit-square\",\n\t\t\t\"fab-f7bc\" => \"fab fa-redhat\",\n\t\t\t\"fab-f18b\" => \"fab fa-renren\",\n\t\t\t\"fab-f3e6\" => \"fab fa-replyd\",\n\t\t\t\"fab-f4f8\" => \"fab fa-researchgate\",\n\t\t\t\"fab-f3e7\" => \"fab fa-resolving\",\n\t\t\t\"fab-f5b2\" => \"fab fa-rev\",\n\t\t\t\"fab-f3e8\" => \"fab fa-rocketchat\",\n\t\t\t\"fab-f3e9\" => \"fab fa-rockrms\",\n\t\t\t\"fab-f267\" => \"fab fa-safari\",\n\t\t\t\"fab-f83b\" => \"fab fa-salesforce\",\n\t\t\t\"fab-f41e\" => \"fab fa-sass\",\n\t\t\t\"fab-f3ea\" => \"fab fa-schlix\",\n\t\t\t\"fab-f28a\" => \"fab fa-scribd\",\n\t\t\t\"fab-f3eb\" => \"fab fa-searchengin\",\n\t\t\t\"fab-f2da\" => \"fab fa-sellcast\",\n\t\t\t\"fab-f213\" => \"fab fa-sellsy\",\n\t\t\t\"fab-f3ec\" => \"fab fa-servicestack\",\n\t\t\t\"fab-f214\" => \"fab fa-shirtsinbulk\",\n\t\t\t\"fab-f957\" => \"fab fa-shopify\",\n\t\t\t\"fab-f5b5\" => \"fab fa-shopware\",\n\t\t\t\"fab-f215\" => \"fab fa-simplybuilt\",\n\t\t\t\"fab-f3ee\" => \"fab fa-sistrix\",\n\t\t\t\"fab-f512\" => \"fab fa-sith\",\n\t\t\t\"fab-f7c6\" => \"fab fa-sketch\",\n\t\t\t\"fab-f216\" => \"fab fa-skyatlas\",\n\t\t\t\"fab-f17e\" => \"fab fa-skype\",\n\t\t\t\"fab-f198\" => \"fab fa-slack\",\n\t\t\t\"fab-f3ef\" => \"fab fa-slack-hash\",\n\t\t\t\"fab-f1e7\" => \"fab fa-slideshare\",\n\t\t\t\"fab-f2ab\" => \"fab fa-snapchat\",\n\t\t\t\"fab-f2ac\" => \"fab fa-snapchat-ghost\",\n\t\t\t\"fab-f2ad\" => \"fab fa-snapchat-square\",\n\t\t\t\"fab-f1be\" => \"fab fa-soundcloud\",\n\t\t\t\"fab-f7d3\" => \"fab fa-sourcetree\",\n\t\t\t\"fab-f3f3\" => \"fab fa-speakap\",\n\t\t\t\"fab-f83c\" => \"fab fa-speaker-deck\",\n\t\t\t\"fab-f1bc\" => \"fab fa-spotify\",\n\t\t\t\"fab-f5be\" => \"fab fa-squarespace\",\n\t\t\t\"fab-f18d\" => \"fab fa-stack-exchange\",\n\t\t\t\"fab-f16c\" => \"fab fa-stack-overflow\",\n\t\t\t\"fab-f842\" => \"fab fa-stackpath\",\n\t\t\t\"fab-f3f5\" => \"fab fa-staylinked\",\n\t\t\t\"fab-f1b6\" => \"fab fa-steam\",\n\t\t\t\"fab-f1b7\" => \"fab fa-steam-square\",\n\t\t\t\"fab-f3f6\" => \"fab fa-steam-symbol\",\n\t\t\t\"fab-f3f7\" => \"fab fa-sticker-mule\",\n\t\t\t\"fab-f428\" => \"fab fa-strava\",\n\t\t\t\"fab-f429\" => \"fab fa-stripe\",\n\t\t\t\"fab-f42a\" => \"fab fa-stripe-s\",\n\t\t\t\"fab-f3f8\" => \"fab fa-studiovinari\",\n\t\t\t\"fab-f1a4\" => \"fab fa-stumbleupon\",\n\t\t\t\"fab-f1a3\" => \"fab fa-stumbleupon-circle\",\n\t\t\t\"fab-f2dd\" => \"fab fa-superpowers\",\n\t\t\t\"fab-f3f9\" => \"fab fa-supple\",\n\t\t\t\"fab-f7d6\" => \"fab fa-suse\",\n\t\t\t\"fab-f8e1\" => \"fab fa-swift\",\n\t\t\t\"fab-f83d\" => \"fab fa-symfony\",\n\t\t\t\"fab-f4f9\" => \"fab fa-teamspeak\",\n\t\t\t\"fab-f2c6\" => \"fab fa-telegram\",\n\t\t\t\"fab-f3fe\" => \"fab fa-telegram-plane\",\n\t\t\t\"fab-f1d5\" => \"fab fa-tencent-weibo\",\n\t\t\t\"fab-f69d\" => \"fab fa-the-red-yeti\",\n\t\t\t\"fab-f5c6\" => \"fab fa-themeco\",\n\t\t\t\"fab-f2b2\" => \"fab fa-themeisle\",\n\t\t\t\"fab-f731\" => \"fab fa-think-peaks\",\n\t\t\t\"fab-f513\" => \"fab fa-trade-federation\",\n\t\t\t\"fab-f181\" => \"fab fa-trello\",\n\t\t\t\"fab-f262\" => \"fab fa-tripadvisor\",\n\t\t\t\"fab-f173\" => \"fab fa-tumblr\",\n\t\t\t\"fab-f174\" => \"fab fa-tumblr-square\",\n\t\t\t\"fab-f1e8\" => \"fab fa-twitch\",\n\t\t\t\"fab-f099\" => \"fab fa-twitter\",\n\t\t\t\"fab-f081\" => \"fab fa-twitter-square\",\n\t\t\t\"fab-f42b\" => \"fab fa-typo3\",\n\t\t\t\"fab-f402\" => \"fab fa-uber\",\n\t\t\t\"fab-f7df\" => \"fab fa-ubuntu\",\n\t\t\t\"fab-f403\" => \"fab fa-uikit\",\n\t\t\t\"fab-f8e8\" => \"fab fa-umbraco\",\n\t\t\t\"fab-f404\" => \"fab fa-uniregistry\",\n\t\t\t\"fab-f949\" => \"fab fa-unity\",\n\t\t\t\"fab-f405\" => \"fab fa-untappd\",\n\t\t\t\"fab-f7e0\" => \"fab fa-ups\",\n\t\t\t\"fab-f287\" => \"fab fa-usb\",\n\t\t\t\"fab-f7e1\" => \"fab fa-usps\",\n\t\t\t\"fab-f407\" => \"fab fa-ussunnah\",\n\t\t\t\"fab-f408\" => \"fab fa-vaadin\",\n\t\t\t\"fab-f237\" => \"fab fa-viacoin\",\n\t\t\t\"fab-f2a9\" => \"fab fa-viadeo\",\n\t\t\t\"fab-f2aa\" => \"fab fa-viadeo-square\",\n\t\t\t\"fab-f409\" => \"fab fa-viber\",\n\t\t\t\"fab-f40a\" => \"fab fa-vimeo\",\n\t\t\t\"fab-f194\" => \"fab fa-vimeo-square\",\n\t\t\t\"fab-f27d\" => \"fab fa-vimeo-v\",\n\t\t\t\"fab-f1ca\" => \"fab fa-vine\",\n\t\t\t\"fab-f189\" => \"fab fa-vk\",\n\t\t\t\"fab-f40b\" => \"fab fa-vnv\",\n\t\t\t\"fab-f41f\" => \"fab fa-vuejs\",\n\t\t\t\"fab-f83f\" => \"fab fa-waze\",\n\t\t\t\"fab-f5cc\" => \"fab fa-weebly\",\n\t\t\t\"fab-f18a\" => \"fab fa-weibo\",\n\t\t\t\"fab-f1d7\" => \"fab fa-weixin\",\n\t\t\t\"fab-f232\" => \"fab fa-whatsapp\",\n\t\t\t\"fab-f40c\" => \"fab fa-whatsapp-square\",\n\t\t\t\"fab-f40d\" => \"fab fa-whmcs\",\n\t\t\t\"fab-f266\" => \"fab fa-wikipedia-w\",\n\t\t\t\"fab-f17a\" => \"fab fa-windows\",\n\t\t\t\"fab-f5cf\" => \"fab fa-wix\",\n\t\t\t\"fab-f730\" => \"fab fa-wizards-of-the-coast\",\n\t\t\t\"fab-f514\" => \"fab fa-wolf-pack-battalion\",\n\t\t\t\"fab-f19a\" => \"fab fa-wordpress\",\n\t\t\t\"fab-f411\" => \"fab fa-wordpress-simple\",\n\t\t\t\"fab-f297\" => \"fab fa-wpbeginner\",\n\t\t\t\"fab-f2de\" => \"fab fa-wpexplorer\",\n\t\t\t\"fab-f298\" => \"fab fa-wpforms\",\n\t\t\t\"fab-f3e4\" => \"fab fa-wpressr\",\n\t\t\t\"fab-f412\" => \"fab fa-xbox\",\n\t\t\t\"fab-f168\" => \"fab fa-xing\",\n\t\t\t\"fab-f169\" => \"fab fa-xing-square\",\n\t\t\t\"fab-f23b\" => \"fab fa-y-combinator\",\n\t\t\t\"fab-f19e\" => \"fab fa-yahoo\",\n\t\t\t\"fab-f840\" => \"fab fa-yammer\",\n\t\t\t\"fab-f413\" => \"fab fa-yandex\",\n\t\t\t\"fab-f414\" => \"fab fa-yandex-international\",\n\t\t\t\"fab-f7e3\" => \"fab fa-yarn\",\n\t\t\t\"fab-f1e9\" => \"fab fa-yelp\",\n\t\t\t\"fab-f2b1\" => \"fab fa-yoast\",\n\t\t\t\"fab-f167\" => \"fab fa-youtube\",\n\t\t\t\"fab-f431\" => \"fab fa-youtube-square\",\n\t\t\t\"fab-f63f\" => \"fab fa-zhihu\"\n\t\t);\n\n\t\t$icons = array_merge( $solid_icons, $regular_icons, $brand_icons );\n\n\t\t$icons = apply_filters( \"megamenu_fontawesome_5_icons\", $icons );\n\n\t\treturn $icons;\n\n\t}", "public function icon ( )\n\t{\n\t\treturn Array( 'id' => $this->id,\t// shoud be consistent with what is passed to _uicmp_stuff_fold class\n\t\t\t\t\t 'title' => $this->messages['icon'] );\n\t}", "protected function getVictoireMedia_TwigExtension_SvgService()\n {\n return $this->services['victoire_media.twig_extension.svg'] = new \\Victoire\\Bundle\\MediaBundle\\Twig\\SvgTwigExtension(($this->targetDirs[3].'/app'));\n }", "function wp_theme_get_element_class_name($element)\n {\n }", "function edgtf_core_set_custom_font_icon_class_name_for_vc_shortcodes($shortcodes_icon_class_array) {\n\t\t$shortcodes_icon_class_array[] = '.icon-wpb-custom-font';\n\t\t\n\t\treturn $shortcodes_icon_class_array;\n\t}", "function studiare_get_class_attribute($value) {\n\treturn studiare_get_inline_attr($value, 'class', ' ');\n}", "public function get_css_class() {\n\t\treturn $this->css_class;\n\t}", "public static function getStandardFontsToClasses() {}", "public function getSvgRoot()\n {\n return new \\View\\Svg\\Svg($this->firstChild);\n }", "public function getCaptionClassNames()\n {\n $classes = $this->styles('figure.caption');\n \n $this->extend('updateCaptionClassNames', $classes);\n \n return $classes;\n }", "final public function render() : View\n {\n $svg = $this->getSvg($this->path, $this->style, $this->name);\n\n $inlineSvgClasses = $this->getInlineSvgClasses($this->name, $svg['width'], $svg['height']);\n\n return view('fontawesome-blade::components.fa-icon', [\n // 'name' => $this->name,\n 'viewBox' => $svg['viewBox'],\n 'inlineSvgClasses' => $inlineSvgClasses,\n 'style' => $svg['style'],\n 'paths' => $svg['paths'],\n ]);\n }", "protected final function _getCSSClassString()\n {\n $classString = null;\n $classNames = $this->_getCSSClassNames();\n \n if (0 < count($classNames)) {\n $classString = implode(' ', $classNames);\n }\n\n return $classString;\n }", "function find_svg()\n\t{\n\t\t$files = scandir($this->paths['tempdir']);\n\t\t\n\t\t//fetch the eot file first so we know the acutal filename, in case there are multiple svg files, then based on that find the svg file\n\t\t$filename = \"\";\n\t\tforeach($files as $file)\n\t\t{ \n\t\t\tif(strpos(strtolower($file), '.eot') !== false && $file[0] != '.')\n\t\t\t{\n\t\t\t\t$filename = strtolower( pathinfo($file, PATHINFO_FILENAME) );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->origin_font_name = $filename;\n\t\t\n\t\tforeach($files as $file)\n\t\t{ \n\t\t\tif(strpos(strtolower($file), $filename.'.svg') !== false && $file[0] != '.')\n\t\t\t{\n\t\t\t\treturn $file;\n\t\t\t}\n\t\t}\n\t}", "function admin_bar_class($attributes)\n{\n $attributes['class'] = trim('admin-bar '.$attributes['class']);\n return $attributes;\n}", "public function getClasses() {\n $chartData = $this->curlGetJSON(\"http://api.highcharts.com/option/highcharts/main\");\n\n //Items to exclude when generating the chart API wrapper -- these are globally configured options and can't be set per-graph.\n $exclude = array('global', 'lang');\n $classes = array();\n $globalClasses = array();\n foreach ($chartData as $key => $value) {\n //Populate class list based on children of the main object\n if (array_search($value['name'], $exclude) !== false)\n $ex = true;\n else\n $ex = false;\n \n $name = $value['name'];\n $className = ucfirst($value['name']);\n if($className == 'Global')\n $className = 'HCGlobal';\n $description = $value['description'];\n \n if($value['returnType'] == 'Array<Object>')\n $returnType = $className . '[]';\n else\n $returnType = $className;\n //We just need the name, classname(generated), and description.\n if($ex)\n $globalClasses[] = array('name' => $name, 'className' => $className, 'description' => $description, 'returnType' => $returnType, 'originalName' => $name);\n else\n $classes[] = array('name' => $name, 'className' => $className, 'description' => $description, 'returnType' => $returnType, 'originalName' => $name);\n }\n return array('classes' => $classes, 'globals' => $globalClasses);\n }", "function moduleLeftList()\n{\n // define icon\n $module_icon = [\n 'bibliography' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\"> <g id=\"g1174\" transform=\"translate(106.46753,128.49679)\"> <g transform=\"matrix(1.2714286,0,0,1.2714286,-120.88742,-140.01499)\" id=\"g907\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.583359;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle895\" cx=\"46.341488\" cy=\"44.059261\" r=\"35\" /> <g id=\"g905\" transform=\"translate(2.737582,-2.1401071)\"> <rect style=\"fill:#3498db;stroke:#505050;stroke-width:1.71834;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect897\" width=\"29.254547\" height=\"37.815216\" x=\"30.942619\" y=\"27.134706\" /> <rect y=\"28.161148\" x=\"30.926674\" height=\"36.804504\" width=\"28.162392\" id=\"rect899\" style=\"fill:#ecf0f1;stroke:#505050;stroke-width:1.66329;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect y=\"27.134617\" x=\"27.010555\" height=\"38.145092\" width=\"28.995415\" id=\"rect901\" style=\"fill:#3498db;fill-opacity:1;stroke:#505050;stroke-width:1.71816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path d=\"m 30.926704,27.119118 v 11.08032 h 0.399725 l 2.065052,-1.835416 2.167962,1.835416 h 0.386668 v -11.08032 z\" style=\"fill:#ecf0f1;stroke:#505050;stroke-width:1.71834;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path903\" /> </g> </g> </g> </g> </svg>',\n 'circulation' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"circulation_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1185\" transform=\"translate(0.18314067,129.50548)\"> <g id=\"g962\" transform=\"translate(-0.71230785,-130.03465)\"> <circle r=\"44.5\" cy=\"45.029167\" cx=\"45.029167\" id=\"path861\" style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <g transform=\"matrix(0.82613357,0,0,0.80992807,6.6088374,9.8078435)\" id=\"g952\"> <rect style=\"fill:#2ecc71;fill-opacity:1;stroke:#505050;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect915\" width=\"63.603176\" height=\"61.420513\" x=\"14.704608\" y=\"12.776721\" ry=\"4.7307506\" /> <g id=\"g944\" transform=\"matrix(0.863902,0,0,0.85945422,6.2086824,6.099837)\"> <path d=\"m 27.621669,29.502204 -6.688728,7.50794 4.298743,-0.05985 v 20.020304 h 4.329284 V 36.889691 l 4.697947,-0.06544 z\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:2.78906;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect923\" /> <path id=\"path928\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:2.78906;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" d=\"m 65.721672,57.499844 -6.688728,-7.50794 4.298743,0.05985 v -20.0203 h 4.329284 v 20.080903 l 4.697947,0.06544 z\" /> <path id=\"path930\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:3.02138;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" d=\"m 62.763539,23.683013 -8.810832,-6.688728 0.07024,4.298743 H 30.528415 v 4.329284 h 23.565648 l 0.07679,4.697947 z\" /> <path d=\"m 29.999151,63.370517 8.810832,-6.688728 -0.07024,4.298743 h 23.494532 v 4.329284 H 38.668627 l -0.07679,4.697947 z\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:3.02138;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path932\" /> </g> </g> </g> </g> </g> </svg>',\n 'membership' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"membership_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1196\" transform=\"translate(-102.73074,122.68412)\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle1056\" cx=\"147.23074\" cy=\"-78.18412\" r=\"44.5\" /> <g transform=\"translate(97.224381,-120.36928)\" id=\"g1072\"> <g id=\"g1064\"> <ellipse ry=\"5.5320091\" rx=\"5.532011\" cy=\"25.856213\" cx=\"59.352348\" id=\"ellipse1058\" style=\"fill:#2ecc71;fill-opacity:1;stroke:#505050;stroke-width:3.93598;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path sodipodi:nodetypes=\"cccc\" d=\"M 58.850186,36.76772 76.690708,54.304511 C 63.643093,70.950737 46.154262,61.325033 41.313396,54.608241 Z\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:4.98354;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path1060\" /> <path id=\"path1062\" style=\"fill:#2980b9;fill-opacity:1;stroke:none;stroke-width:1.14713;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" d=\"m 58.850186,36.76772 3.295668,5.029989 -3.23956,5.117109 -3.295668,-5.02999 z\" /> </g> <ellipse ry=\"5.5320091\" rx=\"5.532011\" cy=\"25.856213\" cx=\"41.360695\" id=\"ellipse1066\" style=\"fill:#7f8c8d;fill-opacity:1;stroke:#505050;stroke-width:3.93598;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path sodipodi:nodetypes=\"cccc\" d=\"m 40.858534,36.76772 17.840522,17.536791 -35.377311,0.30373 z\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:4.98354;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path1068\" /> <path id=\"path1070\" style=\"fill:#16a085;fill-opacity:1;stroke:none;stroke-width:1.14713;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" d=\"m 40.858534,36.76772 3.295668,5.029989 -3.23956,5.117109 -3.295667,-5.02999 z\" /> </g> </g> </g> </svg>',\n 'master_file' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"masterfile_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1216\" transform=\"translate(-205.71654,129.46401)\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle1188\" cx=\"250.21654\" cy=\"-84.964012\" r=\"44.5\" /> <g transform=\"matrix(0.8137019,0,0,0.8137019,213.41493,-119.95353)\" id=\"g1222\"> <rect y=\"12.967948\" x=\"26.920876\" height=\"55.302444\" width=\"41.904682\" id=\"rect1190\" style=\"fill:#a0d9ff;fill-opacity:1;stroke:#505050;stroke-width:5.40838;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <g id=\"g1220\"> <rect y=\"25.099907\" x=\"32.306278\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1192\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1194\" width=\"33.146427\" height=\"0.93088984\" x=\"32.306278\" y=\"30.391573\" /> <rect y=\"36.212406\" x=\"32.306278\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1196\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1198\" width=\"33.146427\" height=\"0.93088984\" x=\"32.306278\" y=\"41.504074\" /> <rect y=\"46.795742\" x=\"32.306278\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1200\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1202\" width=\"33.146427\" height=\"0.93088984\" x=\"32.306278\" y=\"52.616577\" /> <g transform=\"translate(1.0583333,-0.52916667)\" id=\"g1218\"> <rect style=\"fill:#fbfbfb;fill-opacity:1;stroke:#505050;stroke-width:5.40838;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1204\" width=\"41.904682\" height=\"55.302444\" x=\"20.570877\" y=\"18.259615\" /> <rect y=\"30.92074\" x=\"24.897945\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1206\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1208\" width=\"33.146427\" height=\"0.93088984\" x=\"24.897945\" y=\"36.212406\" /> <rect y=\"42.033241\" x=\"24.897945\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1210\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1212\" width=\"33.146427\" height=\"0.93088984\" x=\"24.897945\" y=\"47.324909\" /> <rect y=\"52.616577\" x=\"24.897945\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1214\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1216\" width=\"33.146427\" height=\"0.93088984\" x=\"24.897945\" y=\"58.437412\" /> </g> </g> </g> </g> </g> </svg>',\n 'stock_take' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"stocktake.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1233\" transform=\"translate(-310.27756,128.244)\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle1467\" cx=\"354.77756\" cy=\"-83.744003\" r=\"44.5\" /> <g transform=\"matrix(1.1048537,0,0,1.1926895,306.82624,-135.28149)\" id=\"g1495\"> <rect y=\"20.591423\" x=\"54.623814\" height=\"35.920689\" width=\"6.7774096\" id=\"rect1469\" style=\"fill:#f1c40f;fill-opacity:1;stroke:#505050;stroke-width:1.34325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect y=\"24.991159\" x=\"38.571468\" height=\"35.920689\" width=\"6.7774096\" id=\"rect1471\" style=\"fill:#64edff;fill-opacity:1;stroke:#505050;stroke-width:1.34325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#27ae60;fill-opacity:1;stroke:#505050;stroke-width:1.34325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1473\" width=\"6.7774096\" height=\"35.920689\" x=\"46.508976\" y=\"23.932825\" /> <rect y=\"23.846973\" x=\"46.423122\" height=\"36.594509\" width=\"1.6522932\" id=\"rect1475\" style=\"fill:#1abc9c;fill-opacity:1;stroke:#505050;stroke-width:0.669427;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#57ebce;fill-opacity:1;stroke:#505050;stroke-width:0.669427;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1477\" width=\"1.6522932\" height=\"36.594509\" x=\"38.485615\" y=\"24.905308\" /> <g id=\"g1483\" transform=\"matrix(1.6091572,0,0,1.1336288,-23.012641,-8.361513)\"> <rect y=\"24.991159\" x=\"30.633961\" height=\"35.920689\" width=\"6.7774096\" id=\"rect1479\" style=\"fill:#ff6524;fill-opacity:1;stroke:#505050;stroke-width:1.34325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#ffb624;fill-opacity:1;stroke:#505050;stroke-width:0.669427;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1481\" width=\"1.6522932\" height=\"36.594509\" x=\"30.548107\" y=\"24.905308\" /> </g> <rect style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:1.80724;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1485\" width=\"38.484158\" height=\"31.685684\" x=\"24.166206\" y=\"34.625195\" /> <rect style=\"fill:#d35400;fill-opacity:1;stroke:#505050;stroke-width:1.16575;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1487\" width=\"1.1278092\" height=\"13.156289\" x=\"60.211086\" y=\"20.653749\" /> <rect y=\"34.625195\" x=\"45.080639\" height=\"31.685684\" width=\"17.569723\" id=\"rect1489\" style=\"fill:#dcdcdc;fill-opacity:1;stroke:none;stroke-width:1.22112;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#1b8eff;fill-opacity:1;stroke:#505050;stroke-width:2.27118;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1491\" width=\"44.190067\" height=\"9.3513784\" x=\"21.305571\" y=\"34.798729\" /> <rect style=\"fill:#ccd1d5;fill-opacity:1;stroke:none;stroke-width:1.91706;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1493\" width=\"13.392535\" height=\"11.290557\" x=\"26.662313\" y=\"52.423279\" /> </g> </g> </g> </svg>',\n 'system' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"system_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1244\" transform=\"translate(-404.83862,119.50776)\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle1701\" cx=\"449.33862\" cy=\"-75.007759\" r=\"44.5\" /> <g transform=\"matrix(0.97432515,0,0,0.97432515,406.46847,-119.45502)\" id=\"g1717\"> <g id=\"g1715\" transform=\"matrix(1.0204816,0,0,1.0204816,-0.83248189,0.60650808)\"> <path d=\"m 55.667278,31.744057 v 4.787716 a 9.834351,10.038859 0 0 0 -5.387687,2.120705 l -3.279044,-3.438233 -1.240342,1.183061 3.279643,3.439439 a 9.834351,10.038859 0 0 0 -2.473453,5.74948 h -4.740679 v 1.714291 h 4.723193 a 9.834351,10.038859 0 0 0 1.946442,5.278549 l -3.427377,3.11322 1.15291,1.268685 3.40567,-3.093927 a 9.834351,10.038859 0 0 0 6.040724,2.69294 v 4.582099 h 1.714896 v -4.612249 a 9.834351,10.038859 0 0 0 5.346079,-2.338383 l 3.320048,3.481043 1.240946,-1.183662 -3.367681,-3.531092 a 9.834351,10.038859 0 0 0 2.240097,-5.657223 h 5.062073 v -1.714291 h -5.079559 a 9.834351,10.038859 0 0 0 -1.883734,-5.012028 l 3.720429,-3.37974 -1.152307,-1.269288 -3.690279,3.352003 a 9.834351,10.038859 0 0 0 -5.756112,-2.714647 v -4.818468 z\" style=\"fill:#ffffff;fill-opacity:1;stroke:#505050;stroke-width:3.50055;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path1703\" /> <ellipse ry=\"5.2658691\" rx=\"5.2658701\" cy=\"46.443069\" cx=\"56.524727\" id=\"ellipse1705\" style=\"fill:#ecbdff;fill-opacity:1;stroke:#505050;stroke-width:3.50055;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path id=\"path1707\" style=\"fill:#ffffff;fill-opacity:1;stroke:#505050;stroke-width:2.5137;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" d=\"m 40.056605,17.33706 -1.111617,3.253326 a 7.0619212,7.208776 18.864581 0 0 -4.153403,0.190133 l -1.42987,-3.097662 -1.117515,0.515923 1.429997,3.098622 a 7.0619212,7.208776 18.864581 0 0 -3.015669,3.332573 l -3.221366,-1.100696 -0.398026,1.164887 3.209484,1.096636 a 7.0619212,7.208776 18.864581 0 0 0.09706,4.038782 l -3.051786,1.319709 0.488855,1.129775 3.032557,-1.31164 a 7.0619212,7.208776 18.864581 0 0 3.479515,3.232436 l -1.063876,3.113607 1.165299,0.398165 1.070875,-3.134093 a 7.0619212,7.208776 18.864581 0 0 4.175673,-0.34771 l 1.447791,3.136273 1.118066,-0.516191 -1.468539,-3.181344 a 7.0619212,7.208776 18.864581 0 0 2.835679,-3.324063 l 3.439757,1.175318 0.398026,-1.164887 -3.45164,-1.179377 a 7.0619212,7.208776 18.864581 0 0 -0.116323,-3.843118 l 3.312799,-1.432773 -0.488306,-1.130044 -3.285872,1.420926 a 7.0619212,7.208776 18.864581 0 0 -3.281078,-3.181104 l 1.118757,-3.274223 z\" /> <ellipse transform=\"rotate(18.864581)\" style=\"fill:#7f8c8d;fill-opacity:1;stroke:#505050;stroke-width:2.5137;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"ellipse1709\" cx=\"43.992702\" cy=\"14.096194\" rx=\"3.7813537\" ry=\"3.7813528\" /> <path d=\"m 34.126266,45.519806 -1.268579,3.517335 a 7.769068,8.0847094 80.78347 0 0 -4.739875,0.205563 l -1.631771,-3.349039 -1.275311,0.557791 1.631915,3.350076 a 7.769068,8.0847094 80.78347 0 0 -3.44149,3.603013 l -3.67623,-1.190018 -0.454228,1.259419 3.662671,1.185628 a 7.769068,8.0847094 80.78347 0 0 0.110769,4.366531 l -3.482707,1.426804 0.557884,1.221457 3.46076,-1.41808 a 7.769068,8.0847094 80.78347 0 0 3.970834,3.49475 l -1.214099,3.366278 1.329841,0.430477 1.222087,-3.388428 a 7.769068,8.0847094 80.78347 0 0 4.765287,-0.375927 l 1.652224,3.390785 1.27594,-0.558081 -1.6759,-3.43951 a 7.769068,8.0847094 80.78347 0 0 3.236084,-3.593813 l 3.92546,1.270695 0.454228,-1.259418 -3.939021,-1.275085 A 7.769068,8.0847094 80.78347 0 0 38.450281,54.164021 L 42.230857,52.614978 41.6736,51.39323 37.923755,52.929464 a 7.769068,8.0847094 80.78347 0 0 -3.744376,-3.439252 l 1.276729,-3.539928 z\" style=\"fill:#ffffff;fill-opacity:1;stroke:#505050;stroke-width:2.79215;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path1711\" /> <ellipse transform=\"matrix(0.95139532,0.3079723,-0.33927307,0.94068793,0,0)\" ry=\"4.1125383\" rx=\"4.2921138\" cy=\"44.294975\" cx=\"48.270733\" id=\"ellipse1713\" style=\"fill:#3498db;fill-opacity:1;stroke:#505050;stroke-width:2.79292;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> </g> </g> </g> </g> </svg>',\n 'reporting' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"reporting_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1267\" transform=\"translate(-516.36298,120.59798)\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle1901\" cx=\"560.86298\" cy=\"-76.097977\" r=\"44.5\" /> <g transform=\"matrix(0.92804321,0,0,0.92804321,520.0157,-115.53812)\" id=\"g1941\"> <rect style=\"fill:#ffffff;fill-opacity:1;stroke:#505050;stroke-width:2.72882;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1903\" width=\"46.066586\" height=\"55.778526\" x=\"20.981127\" y=\"14.608912\" /> <g id=\"g1915\" transform=\"translate(-18.975105,11.590445)\"> <rect y=\"30.855707\" x=\"58.4202\" height=\"17.347778\" width=\"2.5664048\" id=\"rect1905\" style=\"fill:#f17f0f;fill-opacity:1;stroke:#505050;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#2ecc71;fill-opacity:1;stroke:#505050;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1907\" width=\"2.5664048\" height=\"14.502365\" x=\"55.376896\" y=\"33.701122\" /> <rect y=\"37.130905\" x=\"52.333588\" height=\"11.072581\" width=\"2.5664048\" id=\"rect1909\" style=\"fill:#3498db;fill-opacity:1;stroke:#505050;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#ff5900;fill-opacity:1;stroke:#505050;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1911\" width=\"2.5664048\" height=\"14.401514\" x=\"49.290279\" y=\"33.801968\" /> <rect y=\"37.943485\" x=\"46.246971\" height=\"10.26\" width=\"2.5664048\" id=\"rect1913\" style=\"fill:#f1c40f;fill-opacity:1;stroke:#505050;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> </g> <rect style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1917\" width=\"18.842707\" height=\"1.2298776\" x=\"24.64933\" y=\"27.746386\" /> <rect y=\"30.647217\" x=\"24.64933\" height=\"1.2298776\" width=\"18.842707\" id=\"rect1919\" style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#7f8c8d;fill-opacity:1;stroke:none;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1921\" width=\"37.877144\" height=\"7.3541164\" x=\"24.639267\" y=\"16.698078\" /> <g id=\"g1927\" transform=\"matrix(0.95852127,0,0,0.91364867,3.1976965,-6.4923595)\"> <ellipse ry=\"9.5109682\" rx=\"9.5109673\" cy=\"65.487984\" cx=\"53.384186\" id=\"ellipse1923\" style=\"fill:#3498db;fill-opacity:1;stroke:#505050;stroke-width:0.978064;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path transform=\"matrix(0.00469988,-0.99998896,0.99999192,0.00402008,0,0)\" inkscape:transform-center-y=\"-2.1668337\" inkscape:transform-center-x=\"-5.5960088\" sodipodi:arc-type=\"slice\" sodipodi:end=\"1.5833133\" sodipodi:start=\"0\" sodipodi:ry=\"10.519011\" sodipodi:rx=\"9.7285824\" sodipodi:cy=\"53.966728\" sodipodi:cx=\"-64.537109\" sodipodi:type=\"arc\" style=\"fill:#9b59b6;fill-opacity:1;stroke:#505050;stroke-width:1.04029;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path1925\" d=\"m -54.808527,53.966728 a 9.7285824,10.519011 0 0 1 -2.892623,7.484469 9.7285824,10.519011 0 0 1 -6.957729,3.033718 l 0.12177,-10.518187 z\" /> </g> <rect y=\"33.038052\" x=\"24.64933\" height=\"1.2298776\" width=\"18.842707\" id=\"rect1929\" style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1931\" width=\"18.842707\" height=\"1.2298776\" x=\"24.64933\" y=\"35.938885\" /> <rect y=\"27.746386\" x=\"45.815998\" height=\"1.2298776\" width=\"18.842707\" id=\"rect1933\" style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1935\" width=\"18.842707\" height=\"1.2298776\" x=\"45.815998\" y=\"30.647217\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1937\" width=\"18.842707\" height=\"1.2298776\" x=\"45.815998\" y=\"33.038052\" /> <rect y=\"35.938885\" x=\"45.815998\" height=\"1.2298776\" width=\"18.842707\" id=\"rect1939\" style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> </g> </g> </g> </svg>',\n 'serial_control' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"serialcontrol_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1286\" transform=\"translate(-281.49057,-2.5378113)\"> <circle r=\"44.5\" cy=\"47.037811\" cx=\"325.99057\" id=\"circle964\" style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <g transform=\"matrix(0.91798972,0,0,0.89364827,284.7082,10.037406)\" id=\"g981\"> <g id=\"g964\"> <rect y=\"16.165668\" x=\"23.852057\" height=\"52.949757\" width=\"25.184425\" id=\"rect2016\" style=\"fill:#3498db;fill-opacity:1;stroke:#505050;stroke-width:2.55707;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:3.26181;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1966\" width=\"41.531956\" height=\"52.245018\" x=\"24.204426\" y=\"16.518038\" /> <rect y=\"16.186131\" x=\"23.872519\" height=\"52.772163\" width=\"27.061792\" id=\"rect2018\" style=\"fill:#16a085;fill-opacity:1;stroke:none;stroke-width:2.64622;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#7f8c8d;fill-opacity:1;stroke:#505050;stroke-width:1.08;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1970\" width=\"13.623199\" height=\"9.219327\" x=\"50.406734\" y=\"24.585953\" /> <rect y=\"38.142365\" x=\"50.116444\" height=\"0.65573901\" width=\"14.203777\" id=\"rect1972\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path style=\"fill:#bdc3c7;fill-opacity:1;stroke:#505050;stroke-width:1.08;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 50.953404,68.67798 C 47.763061,45.740566 33.02911,62.237914 31.893764,39.516706 l -0.06458,-26.56323 c 3.152654,4.002705 11.302976,-3.3389856 18.675511,2.597708 0.182409,7.448094 -0.342627,14.784271 -0.293811,21.639773 0.07634,10.72012 0.103515,21.13569 0.742518,31.487023 z\" id=\"path1968\" sodipodi:nodetypes=\"ccccscc\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect2006\" width=\"14.203777\" height=\"0.65573901\" x=\"50.116444\" y=\"42.375698\" /> <rect y=\"46.609035\" x=\"50.116444\" height=\"0.65573901\" width=\"14.203777\" id=\"rect2008\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect2010\" width=\"14.203777\" height=\"0.65573901\" x=\"50.116444\" y=\"38.142365\" /> <rect y=\"42.375698\" x=\"50.116444\" height=\"0.65573901\" width=\"14.203777\" id=\"rect2012\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect2014\" width=\"14.203777\" height=\"0.65573901\" x=\"50.116444\" y=\"46.609035\" /> <rect style=\"fill:#1abc9c;fill-opacity:1;stroke:none;stroke-width:1.20148;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect2020\" width=\"3.3098521\" height=\"46.953247\" x=\"24.204426\" y=\"16.518038\" /> <text id=\"text948\" y=\"64.037369\" x=\"58.702221\" style=\"font-size:7.7611px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#505050;fill-opacity:1;stroke-width:0.264583\" xml:space=\"preserve\"><tspan style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Impact;-inkscape-font-specification:Impact;fill:#505050;fill-opacity:1;stroke-width:0.264583\" y=\"64.037369\" x=\"58.702221\" id=\"tspan946\" sodipodi:role=\"line\">1</tspan></text> </g> </g> </g> </g> </svg>'\n ];\n\n // define other icon for custom module\n $other = [\n '<svg class=\"w-10 h-10 inline-block\" version=\"1.1\" viewBox=\"0 0 90 90\" xmlns=\"http://www.w3.org/2000/svg\"><g><circle cx=\"44.5\" cy=\"44.5\" r=\"44.5\" fill=\"#eee\" style=\"paint-order:stroke markers fill\"/><rect x=\"27.879\" y=\"23.195\" width=\"33.242\" height=\"42.61\" fill=\"#ebf5ff\" stroke=\"#505050\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.3648\" style=\"paint-order:stroke markers fill\"/><rect x=\"29.312\" y=\"23.198\" width=\"30.875\" height=\"42.605\" fill=\"#bdc3c7\" stroke=\"#505050\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\".68698\" style=\"paint-order:stroke markers fill\"/></g><g stroke=\"#505050\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.3513\"><rect x=\"45.112\" y=\"25.55\" width=\"14.789\" height=\"8.2256\" ry=\"1.3955\" fill=\"#e67e22\" style=\"paint-order:stroke markers fill\"/><rect x=\"44.397\" y=\"35.919\" width=\"14.789\" height=\"8.2256\" ry=\"1.3955\" fill=\"#3498db\" style=\"paint-order:stroke markers fill\"/><rect x=\"44.039\" y=\"45.93\" width=\"14.789\" height=\"8.2256\" ry=\"1.3955\" fill=\"#27ae60\" style=\"paint-order:stroke markers fill\"/></g><g><rect x=\"27.869\" y=\"23.185\" width=\"29.378\" height=\"42.629\" fill=\"#fff\" stroke=\"#505050\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.6694\" style=\"paint-order:stroke markers fill\"/><rect x=\"27.814\" y=\"23.13\" width=\"25.543\" height=\"42.74\" fill=\"#68c2ff\" stroke=\"#505050\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5587\" style=\"paint-order:stroke markers fill\"/><rect x=\"27.879\" y=\"23.192\" width=\"1.4269\" height=\"42.613\" fill=\"#3b9dff\" style=\"paint-order:stroke markers fill\"/><text transform=\"scale(1.13 .88499)\" x=\"33.284637\" y=\"55.413918\" fill=\"#505050\" font-family=\"sans-serif\" font-size=\"20.274px\" stroke-width=\".50686\" style=\"line-height:1.25\" xml:space=\"preserve\"><tspan x=\"33.284637\" y=\"55.413918\" fill=\"#505050\" font-family=\"Cantarell\" stroke-width=\".50686\">?</tspan></text></g></svg>\n '];\n \n\n // Start buffer\n ob_start();\n $module_list = '';\n \n // chunk into 8\n $module_data = array_chunk(getModule(), 8);\n\n // Generate\n foreach ($module_data as $module) \n {\n foreach ($module as $mod) \n {\n // check privileages\n $modname = strtolower($mod[1]);\n // check privileages\n if (isset($_SESSION['priv'][$modname]) && ($_SESSION['priv'][$modname]['r']))\n {\n if (isset($module_icon[$modname]))\n {\n $moduleName = ucwords(str_replace('_', ' ', $modname)); // took from module.inc.php\n $module_list .= '<div class=\"load text-gray-700 text-left px-4 py-2 mx-2 my-1 cursor-pointer hover:shadow-2xl hover:bg-gray-300\" data-path=\"'.modulePath($mod[0]).'\" data-href=\"'.MWB.modulePath($mod[0]).'/index.php\">'.\"\\n\";\n $module_list .= $module_icon[$modname];\n $module_list .= '<span class=\"font-bold inline-block text-center text-md\">'.__($moduleName).'</span>';\n $module_list .= '</div>'.\"\\n\";\n }\n else\n {\n $moduleName = ucwords(str_replace('_', ' ', $modname)); // took from module.inc.php\n $module_list .= '<div class=\"load text-gray-700 text-left px-4 py-2 mx-2 my-1 cursor-pointer hover:shadow-2xl hover:bg-gray-300\" data-path=\"'.modulePath($mod[0]).'\" data-href=\"'.MWB.modulePath($mod[0]).'/index.php\">'.\"\\n\";\n $module_list .= $other[0];\n $module_list .= '<span class=\"font-bold inline-block text-center text-md\">'.__($moduleName).'</span>';\n $module_list .= '</div>'.\"\\n\";\n }\n }\n }\n }\n // set output\n echo $module_list;\n $list = ob_get_clean();\n return $list;\n}", "function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}", "function vcex_get_shortcode_extra_classes( $atts = array(), $shortcode_tag = '' ) {\n\tif ( empty( $atts ) ) {\n\t\treturn array();\n\t}\n\n\t$extra_classes = array();\n\n\tif ( isset( $atts['text_align'] ) ) {\n\t\t$extra_classes[] = vcex_parse_text_align_class( $atts['text_align'] );\n\t}\n\n\tif ( isset( $atts['font_size'] ) ) {\n\t\t$extra_classes[] = vcex_parse_font_size_class( $atts['font_size'] );\n\t}\n\n\tif ( isset( $atts['bottom_margin'] ) ) {\n\t\t$extra_classes[] = vcex_parse_margin_class( $atts['bottom_margin'], 'wpex-mb-' );\n\t}\n\n\tif ( isset( $atts['padding_all'] ) ) {\n\t\t$extra_classes[] = vcex_parse_padding_class( $atts['padding_all'] );\n\t}\n\n\tif ( isset( $atts['padding_y'] ) ) {\n\t\t$extra_classes[] = vcex_parse_padding_class( $atts['padding_y'], 'y' );\n\t}\n\n\tif ( isset( $atts['border_style'] ) ) {\n\t\t$extra_classes[] = vcex_parse_border_style_class( $atts['border_style'] );\n\t}\n\n\tif ( isset( $atts['border_width'] ) ) {\n\t\t$extra_classes[] = vcex_parse_border_width_class( $atts['border_width'] );\n\t}\n\n\tif ( isset( $atts['border_radius'] ) ) {\n\t\t$extra_classes[] = vcex_parse_border_radius_class( $atts['border_radius'] );\n\t}\n\n\tif ( ! empty( $atts['visibility'] ) ) {\n\t\t$extra_classes[] = vcex_parse_visibility_class( $atts['visibility'] );\n\t}\n\n\tif ( isset( $atts['shadow'] ) ) {\n\t\t$extra_classes[] = vcex_parse_shadow_class( $atts['shadow'] );\n\t}\n\n\tif ( isset( $atts['shadow_hover'] ) ) {\n\t\t$extra_classes[] = vcex_parse_shadow_class( $atts['shadow_hover'], 'hover' );\n\t}\n\n\tif ( isset( $atts['css_animation'] ) ) {\n\t\t$extra_classes[] = trim( vcex_get_css_animation( $atts['css_animation'] ) );\n\t}\n\n\tif ( ! empty( $atts['el_class'] ) ) {\n\t\t$extra_classes[] = vcex_get_extra_class( $atts['el_class'] ); // add custom classes last.\n\t} elseif ( ! empty( $atts['classes'] ) ) {\n\t\t$extra_classes[] = vcex_get_extra_class( $atts['classes'] );\n\t}\n\n\tif ( isset( $atts['css'] ) ) {\n\t\t$extra_classes[] = vcex_vc_shortcode_custom_css_class( $atts['css'] );\n\t}\n\n\treturn array_filter( $extra_classes ); // return extra classes and remove empty vars.\n}", "public function getCustomClasses()\n {\n return $this->custom_classes;\n }", "public function GetAttributes() {\n\t\treturn [\n\t\t\t'class'=> implode(' ', $this->getCSS())\n\t\t];\n\t}", "public function getWidgetClasses()\n {\n return $this->widgetClasses;\n }", "protected function _getPopupClass() {\n $classes = array();\n // Apply the template\n $classes[] = $this->_getTemplateClass();\n\n return implode(\" \", $classes);\n }", "public function get_container_class() {\n\t\t$class = '';\n\t\tif ( $this->field['label'] == 'inline' ) {\n\t\t\t$class = ' frm_scale_container';\n\t\t}\n\t\treturn $class;\n\t}", "public function getCssClass(): ?string;", "protected function getStyleClass()\n {\n $class = parent::getStyleClass();\n\n return str_replace('z-form-text', 'z-form-user', $class);\n }", "function svg_loader($loader, $color = '#fff', $element = null, $class = null, $inner=null) {\n\t\n\t$element = (is_null($element))?'span':$element;\n\t$class = (is_null($class))?'':' '.$class;\n\t$inner = (is_null($inner))?'':$inner;\n\t$loader = (substr($loader, -4) == '.svg')?substr($loader, 0, -4):$loader;\n\n\n\t$img_path = config('front_end.path.loaders').'/loader-'.$loader.'.svg';\n\t$img = ($color != '#fff')?implode($color, explode('#fff', Storage::get($img_path))):Storage::get($img_path);\n\n\t\n\t$render = '<'.$element.' class=\"loader'.$class.'\"><div class=\"inner\"><span class=\"svg_img\">'.$img.'</span>'.$inner.'</div></'.$element.'>';\n\t\n\treturn $render;\n}", "public function getClasseGoogleVisualization() \r\n\t{\r\n\t\treturn $this->sClasseGoogleVisualization;\r\n\t}", "private static function get_components_having_css() {\r\n\t\t$ret = self::get_all_widgets();\r\n\t\t$ret[] = self::FEATURE_RESIZABLE;\r\n\t\t$ret[] = self::FEATURE_SELECTABLE;\r\n\t\treturn $ret;\r\n\t}", "function getAvailableIconNames() ;", "public function get_icon() {\n\t\t\treturn WC_SUMO_Sagepay_Common_Functions::get_icon( $this->cardtypes, $this->sagelink, $this->sagelogo, $this->id );\n\t\t}", "function get_svg($key) {\n\t$content = 'none';\n\t$file = get_stylesheet_directory().'/library/assets/svg/'.$key.'.svg';\n\tif(file_exists($file)) {\n\t\t$content = file_get_contents($file);\n\t}\n\treturn $content;\n}", "private function _renderIcon()\n {\n return !empty($this->_icon) ? '<i class=\"' . $this->_icon . '\"></i>' : '';\n }", "public function statusClass()\n {\n if ($this->name == 'In Progress') {\n return 'bg-yellow text-white';\n }\n\n if ($this->name == 'Closed') {\n return 'bg-red text-white';\n }\n\n if ($this->name == 'Implemented') {\n return 'bg-green text-white';\n }\n\n if ($this->name == 'Considering') {\n return 'bg-purple text-white';\n }\n\n return 'bg-gray-200';\n }", "public function update_font_awesome_classes( $class ) {\n\t\t\t$exceptions = array(\n\t\t\t\t'icon-envelope' => 'fa-envelope-o',\n\t\t\t\t'icon-star-empty' => 'fa-star-o',\n\t\t\t\t'icon-ok' => 'fa-check',\n\t\t\t\t'icon-zoom-in' => 'fa-search-plus',\n\t\t\t\t'icon-zoom-out' => 'fa-search-minus',\n\t\t\t\t'icon-off' => 'fa-power-off',\n\t\t\t\t'icon-trash' => 'fa-trash-o',\n\t\t\t\t'icon-share' => 'fa-share-square-o',\n\t\t\t\t'icon-check' => 'fa-check-square-o',\n\t\t\t\t'icon-move' => 'fa-arrows',\n\t\t\t\t'icon-file' => 'fa-file-o',\n\t\t\t\t'icon-time' => 'fa-clock-o',\n\t\t\t\t'icon-download-alt' => 'fa-download',\n\t\t\t\t'icon-download' => 'fa-arrow-circle-o-down',\n\t\t\t\t'icon-upload' => 'fa-arrow-circle-o-up',\n\t\t\t\t'icon-play-circle' => 'fa-play-circle-o',\n\t\t\t\t'icon-indent-left' => 'fa-dedent',\n\t\t\t\t'icon-indent-right' => 'fa-indent',\n\t\t\t\t'icon-facetime-video' => 'fa-video-camera',\n\t\t\t\t'icon-picture' => 'fa-picture-o',\n\t\t\t\t'icon-plus-sign' => 'fa-plus-circle',\n\t\t\t\t'icon-minus-sign' => 'fa-minus-circle',\n\t\t\t\t'icon-remove-sign' => 'fa-times-circle',\n\t\t\t\t'icon-ok-sign' => 'fa-check-circle',\n\t\t\t\t'icon-question-sign' => 'fa-question-circle',\n\t\t\t\t'icon-info-sign' => 'fa-info-circle',\n\t\t\t\t'icon-screenshot' => 'fa-crosshairs',\n\t\t\t\t'icon-remove-circle' => 'fa-times-circle-o',\n\t\t\t\t'icon-ok-circle' => 'fa-check-circle-o',\n\t\t\t\t'icon-ban-circle' => 'fa-ban',\n\t\t\t\t'icon-share-alt' => 'fa-share',\n\t\t\t\t'icon-resize-full' => 'fa-expand',\n\t\t\t\t'icon-resize-small' => 'fa-compress',\n\t\t\t\t'icon-exclamation-sign' => 'fa-exclamation-circle',\n\t\t\t\t'icon-eye-open' => 'fa-eye',\n\t\t\t\t'icon-eye-close' => 'fa-eye-slash',\n\t\t\t\t'icon-warning-sign' => 'fa-warning',\n\t\t\t\t'icon-folder-close' => 'fa-folder',\n\t\t\t\t'icon-resize-vertical' => 'fa-arrows-v',\n\t\t\t\t'icon-resize-horizontal' => 'fa-arrows-h',\n\t\t\t\t'icon-twitter-sign' => 'fa-twitter-square',\n\t\t\t\t'icon-facebook-sign' => 'fa-facebook-square',\n\t\t\t\t'icon-thumbs-up' => 'fa-thumbs-o-up',\n\t\t\t\t'icon-thumbs-down' => 'fa-thumbs-o-down',\n\t\t\t\t'icon-heart-empty' => 'fa-heart-o',\n\t\t\t\t'icon-signout' => 'fa-sign-out',\n\t\t\t\t'icon-linkedin-sign' => 'fa-linkedin-square',\n\t\t\t\t'icon-pushpin' => 'fa-thumb-tack',\n\t\t\t\t'icon-signin' => 'fa-sign-in',\n\t\t\t\t'icon-github-sign' => 'fa-github-square',\n\t\t\t\t'icon-upload-alt' => 'fa-upload',\n\t\t\t\t'icon-lemon' => 'fa-lemon-o',\n\t\t\t\t'icon-check-empty' => 'fa-square-o',\n\t\t\t\t'icon-bookmark-empty' => 'fa-bookmark-o',\n\t\t\t\t'icon-phone-sign' => 'fa-phone-square',\n\t\t\t\t'icon-hdd' => 'fa-hdd-o',\n\t\t\t\t'icon-hand-right' => 'fa-hand-o-right',\n\t\t\t\t'icon-hand-left' => 'fa-hand-o-left',\n\t\t\t\t'icon-hand-up' => 'fa-hand-o-up',\n\t\t\t\t'icon-hand-down' => 'fa-hand-o-down',\n\t\t\t\t'icon-circle-arrow-left' => 'fa-arrow-circle-left',\n\t\t\t\t'icon-circle-arrow-right' => 'fa-arrow-circle-right',\n\t\t\t\t'icon-circle-arrow-up' => 'fa-arrow-circle-up',\n\t\t\t\t'icon-circle-arrow-down' => 'fa-arrow-circle-down',\n\t\t\t\t'icon-fullscreen' => 'fa-arrows-alt',\n\t\t\t\t'icon-beaker' => 'fa-flask',\n\t\t\t\t'icon-paper-clip' => 'fa-paperclip',\n\t\t\t\t'icon-sign-blank' => 'fa-square',\n\t\t\t\t'icon-pinterest-sign' => 'fa-pinterest-square',\n\t\t\t\t'icon-google-plus-sign' => 'fa-google-plus-square',\n\t\t\t\t'icon-envelope-alt' => 'fa-envelope',\n\t\t\t\t'icon-comment-alt' => 'fa-comment-o',\n\t\t\t\t'icon-comments-alt' => 'fa-comments-o'\n\t\t\t);\n\n\t\t\tif( in_array( $class, array_keys( $exceptions ) ) ){\n\t\t\t\t$class = $exceptions[ $class ];\n\t\t\t}\n\n\t\t\t$class = str_replace( 'icon-', 'fa-', $class );\n\n\t\t\treturn $class;\n\t\t}", "function wp_get_elements_class_name($block)\n {\n }", "public function getApprovedClasses()\n\t{\n\t\treturn $this->membership->getApprovedClasses() . ' and has access to boxing classes';\n\t}", "function buildSvgElement($sourceFile, array $attributes) {\n $element = file_get_contents($sourceFile);\n $tagStartPosition = stripos($element, \"<svg \");\n $insertionStartPosition = $tagStartPosition + 5;\n $quotesDelimitedStringPattern = '(\"|\\')((?:\\\\\\1|(?:(?!\\1).))*)\\1';\n foreach (['class', 'width', 'height', 'fill', 'xmlns'] as $key) {\n $pattern = \"/$key=$quotesDelimitedStringPattern/\";\n $element = preg_replace($pattern, \"\", $element);\n }\n foreach ($attributes as $key => $attribute) {\n $pattern = \"/$key=$quotesDelimitedStringPattern/\";\n if (preg_match($pattern, $element)) {\n $replacement = \"$key=$1{$attribute}$1\";\n $element = preg_replace($pattern, $replacement, $element);\n } else {\n $element = substr_replace($element, \"$key='{$attribute} '\", $insertionStartPosition, 0);\n }\n }\n return preg_replace('/\\s+/', ' ', $element);\n}", "public function getIcons()\n {\n $aPicGallery = $this->getPictureGallery();\n\n return $aPicGallery['Icons'];\n }", "function pintsandcrafts_edge_set_product_list_icon_class_name_for_vc_shortcodes( $shortcodes_icon_class_array ) {\n\t\t$shortcodes_icon_class_array[] = '.icon-wpb-product-info';\n\t\t$shortcodes_icon_class_array[] = '.icon-wpb-product-list';\n\t\t$shortcodes_icon_class_array[] = '.icon-wpb-product-list-carousel';\n\t\t$shortcodes_icon_class_array[] = '.icon-wpb-product-list-simple';\n\t\t\n\t\treturn $shortcodes_icon_class_array;\n\t}", "public function get_coupon_container_classes() {\n\n\t\t\treturn implode( ' ', apply_filters( 'wc_sc_coupon_container_classes', array( 'medium', get_option( 'wc_sc_setting_coupon_design', 'round-dashed' ) ) ) );\n\n\t\t}", "function themesflat_custom_shortcodes_class( $classes, $atts = array(), $tag = '' ) {\n\t\tif ( function_exists( 'vc_shortcode_custom_css_class' ) && ! empty( $atts['css'] ) ) {\n\t\t\t$classes[] = vc_shortcode_custom_css_class( $atts['css'], ' ' );\n\t\t}\n\n\t\treturn $classes;\n\t}", "protected static function get_svg_path(): string\n\t{\n\t\t$svg_path = apply_filters('wputil/svg_path', get_template_directory().'/media/svg/');\n\t\t\n\t\treturn trailingslashit($svg_path);\n\t}", "public static function iconPath()\n {\n return Craft::getAlias('@seibertio/elasticsearch/icon.svg');\n }", "public function getListClassNames()\n {\n $classes = ['links'];\n \n $classes[] = ($this->ShowIcons ? 'show-icons' : 'hide-icons');\n \n $this->extend('updateListClassNames', $classes);\n \n return $classes;\n }", "public function getClassNames()\n {\n $classes = parent::getClassNames();\n \n if ($this->HeightMode == self::HEIGHT_AUTO) {\n $classes[] = 'height-auto';\n } else {\n $classes[] = 'height-manual';\n }\n \n return $classes;\n }" ]
[ "0.6530385", "0.62990385", "0.59936947", "0.5966486", "0.59633535", "0.5956337", "0.5807643", "0.58001554", "0.5783583", "0.57815105", "0.57680476", "0.57115567", "0.55917096", "0.5579356", "0.55578023", "0.5557302", "0.55530274", "0.54952693", "0.5466321", "0.5463518", "0.5445541", "0.54348266", "0.5429451", "0.54121244", "0.53998536", "0.53769064", "0.5375261", "0.53557134", "0.53506744", "0.53400564", "0.53364843", "0.5322616", "0.53201175", "0.5303487", "0.5297514", "0.5249505", "0.5214327", "0.5208405", "0.5201317", "0.51810336", "0.5178738", "0.5176319", "0.51752764", "0.51607454", "0.5137802", "0.513269", "0.5128252", "0.5117383", "0.51110756", "0.510999", "0.508757", "0.5079095", "0.50623846", "0.5061346", "0.5061163", "0.5053417", "0.50354105", "0.50344586", "0.5013252", "0.50028217", "0.49983346", "0.49823046", "0.49810943", "0.49761477", "0.49669042", "0.49663585", "0.49589568", "0.49442312", "0.4937388", "0.49370384", "0.49362758", "0.49334463", "0.49299043", "0.49216354", "0.49109343", "0.4907801", "0.49042484", "0.48875648", "0.4886611", "0.48798394", "0.4879462", "0.48772576", "0.4867618", "0.48564857", "0.48549575", "0.48508546", "0.4848132", "0.48423767", "0.484108", "0.48405415", "0.48377267", "0.48369026", "0.4829516", "0.4826393", "0.4811295", "0.48057872", "0.4795357", "0.4795197", "0.4794966", "0.4790728" ]
0.5807649
6
Try to log in the user
public function run() { $resArr = $this->userPswdUpdateStepTwo(); // Get new csrf token $resArr['csrf']['tokenName'] = $this->csrf->getTokenName(); $resArr['csrf']['token'] = $this->csrf->getToken(); // Set JSON header $response = new Response(); $response->setContentType('json'); // Print out response as JSON echo json_encode($resArr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tryLogIn(){\n if(count(self::$loginErrors) === 0){\n $password = md5(self::$loginPassword);\n $query = self::$connection->db->prepare(\"SELECT * FROM users WHERE email = ? AND password = ?\");\n $query->bind_param(\"ss\", self::$loginEmail, $password);\n $query->execute();\n $user = mysqli_fetch_assoc( $query->get_result());\n //Send to Profile page if correct credentials; otherwise, stay on authentication page\n if($user){\n $this->prepareSession($user['name'], self::$loginEmail);\n $_POST = array();\n Auth::CreateView('Profile');\n }else{\n self::addError(\"login\", \"Incorrect credentials!\");\n Auth::CreateView('Auth');\n }\n }\n self::$connection->closeConnection();\n }", "private function attemptLogin($user){\n\n }", "public function do_login()\n {\n $this->userObject = new User();\n\n // grab the uID of the person signing in\n $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);\n\n // if the uID exists\n if ($uid) {\n\n $this->set('message', 'You logged in!');\n\n // grab the array of user-data from the database\n $user = $this->userObject->getUser($uid);\n\n // leave out the password\n unset($user['password']);\n unset($user[4]);\n\n // if (strlen($_SESSION['redirect']i) > 0) { // basically, if someone types in the url with the funciton after,\n // // supposed to redirect people to the pages they want.\n // $view = $_SESSION['redirect'];\n // unset($_SESSION['redirect']);\n // header('Location: ' . BASE_URL . $view);\n\n // make the SESSION key 'user' and set it equal to the aray of user-data\n $_SESSION['user'] = $user;\n\n header('Location: /index.php/');\n\n } else {\n\n $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');\n }\n }", "private function checkLogin()\n {\n if ($this->verifySession()) {\n $this->userId = $this->session['id'];\n }\n if ($this->userId === 0) {\n if ($this->verifyCookie()) {\n $this->userId = $this->cookie['userid'];\n $this->createSession();\n }\n }\n }", "private function check_login()\n {\n if (self::exists('user_id')) {\n $this->user_id = self::get('user_id');\n $this->logged_in = true;\n } else {\n unset($this->user_id);\n $this->logged_in = false;\n }\n }", "public function login()\n {\n $user=$this->getUser();\n\n $this->setScenario('normal');\n if ($user && $user->failed_logins>=3) $this->setScenario('withCaptcha');\n \n if ($this->validate()) {\n $user->failed_logins=0;\n $user->save();\n\n return Yii::$app->user->login($user, $this->rememberMe ? 3600*24*30 : 0);\n } else {\n return false;\n }\n }", "private function login() {\n //Look for this username in the database\n $params = array($this->auth_username);\n $sql = \"SELECT id, password, salt \n FROM user \n WHERE username = ? \n AND deleted = 0\";\n //If there is a User with this name\n if ($row = $this->db->fetch_array($sql, $params)) {\n //And if password matches\n if (password_verify($this->auth_password.$row[0] ['salt'], $row[0] ['password'])) {\n $params = array(\n session_id(), //Session ID\n $row[0] ['id'], //User ID\n self::ISLOGGEDIN, //Login Status\n time() //Timestamp for last action\n );\n $sql = \"INSERT INTO user_session (session_id, user_id, logged_in, last_action) \n VALUES (?,?,?,?)\";\n $this->db->query($sql, $params);\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n //User now officially logged in\n }\n //If password doesn't match\n else {\n //Send user back to login with error\n $this->login_form(self::ERR_NOUSERFOUND);\n }\n }\n //If there isn't a User with this name\n else {\n //Send user back to login with error\n $this->login_form(self::ERR_NOUSERFOUND);\n }\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }", "public function login()\n {\n $authorized = $this->authorize( $_POST );\n if( !empty( $authorized ) && $authorized !== false ){\n $this->register_login_datetime( $authorized );\n ( new Events() )->trigger( 1, true );\n } else {\n ( new Events() )->trigger( 2, true );\n }\n }", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "public function check_login()\n\t{\n\t\tif(isset($_SESSION[\"user_id\"]))\n\t\t{\n\t\t $this->_user_id = $_SESSION[\"user_id\"];\n\t\t\t$this->_client = $_SESSION[\"client\"];\n\t\t\t$this->_loged_in = true;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_loged_in = false;\n\t\t\t$this->_client = false;\n\t\t\tunset($this->_user_id);\n\t\t}\n\t}", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->UserName,$this->passWd);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tuser()->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "private function login(){\n \n }", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->phone,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n $duration = 3600*24*30;\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\t\t\n return false;\n\t}", "function trylogin()\n {\n\t\t$ret = false;\n\t\t\n $err = SHIN_Core::$_models['sys_user_model']->login();\n\n SHIN_Core::$_language->load('app', 'en');\n $err = SHIN_Core::$_language->line($err);\n\t\t\n if ($err != '') {\n SHIN_Core::$_libs['session']->set_userdata('loginErrorMessage', $err);\n } else {\n $this->sessionModel->start(SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\t$ret = true;\n\t\t\t\n\t\t\t// addons for new field added //////////////////////////\n\t\t\t// request by Stefano. Detail: http://binary-studio.office-on-the.net/issues/5287\n\t\t\t// \"host\" and \"lastlogin\" field \n\t\t\t$data = array('lastlogin' => date('Y-m-d H:i:s'), 'host' => SHIN_Core::$_input->ip_address());\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->where('idUser', SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->update('sys_user', $data); \t\t\n\t\t\t///////////////////////////////////////////////////////\n }\n\n\t\treturn $ret;\n }", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}", "public function login()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'login');\n\n switch($page) {\n case 'login':\n break;\n\n case 'lobby':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n\n try {\n $user = $user->verify();\n $_SESSION['id'] = $user['id'];\n } catch (UserNotFoundException $e) {\n $page = 'login';\n }\n break;\n\n default:\n throw new UserNotFoundException(\"User not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "protected function loginIfRequested() {}", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }", "public function log_in() {\n\n // Check if the user exists on the database\n if (!$this->does_exist('username')) {\n return \"Username does not exist\";\n }\n\n $user = User::find($this->username, 'username');\n\n // If password matches\n if ($user->password !== $this->password) {\n return \"Sorry, password does not match\";\n }\n\n return true;\n }", "public function login() {\n $userName = Request::post('user_name');\n $userPassword = Request::post('user_password');\n if (isset($userName) && isset($userPassword)) {\n // perform the login method, put result (true or false) into $login_successful\n $login_successful = LoginModel::login($userName, $userPassword);\n\n // check login status: if true, then redirect user login/showProfile, if false, then to login form again\n if ($login_successful) {\n //if the user successfully logs in, reset the count\n $userID = Session::get('user_id');\n LoginModel::validLogin($userID);\n Redirect::to('login/loginHome');\n } else {\n Redirect::to('login/index');\n }\n }\n }", "private function LogIn() : bool\n {\n\n //session::close();\n\n\n $not_specified_user_and_pass = empty($this->username) and empty($this->password);\n\n\n if($not_specified_user_and_pass)\n\n return false;\n\n\n $user = $this->user_details($this->username);\n\n\n $username_not_exists = !$user; //Not user\n\n\n if($username_not_exists)\n\n return false;\n\n\n\n $unrecognized_password = !$this->recognized_password();\n\n\n if($unrecognized_password)\n\n return false;\n\n\n $this->id = $user[\"id\"];\n\n return $this->set_session_key($user);\n\n\n\n }", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "public static function LoggedIn() {\n\t\tif (empty($_SESSION['current_user'])) {\n\t\t\tnotfound();\n\t\t}\n\t}", "public function login()\n {\n if (isset($_POST['signIn'])) {\n $userExist = $this->checkIfUserExist($_POST['login']);\n var_dump($userExist);\n \n if ($userExist === false) {\n header('Location: auth&alert=NotUser');\n exit();\n } else {\n $authUser = $this->usersManager->getAuthUser($_POST['login']);\n if (password_verify($_POST['password'], $authUser[0]->userPassword())) {\n $this->usersManager->setLastConnexionUser($authUser[0]->userId());\n $this->openSession($authUser[0]);\n } else {\n header('Location: auth&alert=Login');\n exit();\n }\n }\n } else {\n throw new Exception($this->datasError);\n }\n }", "public function login();", "public function login();", "public function loginUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n\n // Check email\n if (!$email) {\n $this->showLoginForm(['Please enter email']);\n }\n // Check password\n if (!$password) {\n $this->showLoginForm(['Please enter password']);\n }\n\n // Check user exist and then password\n $user = $this->getUser($email);\n $password = md5($password);\n if (!$user || $password !== $user['password']) {\n $this->showLoginForm(['Error on login']);\n }\n\n // Save login details to cookies\n if (!defined('APP_USERS_COOKIES_EMAIL')\n || !defined('APP_USERS_COOKIES_PASSWORD')) {\n $this->showLoginForm(['Error on login']);\n }\n setcookie(APP_USERS_COOKIES_EMAIL, $email);\n setcookie(APP_USERS_COOKIES_PASSWORD, $password);\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_login']);\n }", "private static function login() {\n if ( !self::validatePost() ) {\n return;\n }\n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $result = Database::getUser($_POST['email'],$password);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n $_SESSION['user']['id'] = $result[0]['id'];\n $_SESSION['user']['email'] = $result[0]['email'];\n $_SESSION['user']['nickname'] = $result[0]['nickname'];\n $_SESSION['user']['verified'] = $result[0]['verified'];\n $_SESSION['user']['moderator'] = $result[0]['moderator'];\n $_SESSION['user']['supermoderator'] = $result[0]['supermoderator'];\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n }", "public function login()\n {\n if ($this->getCurrentUser()->get('id')) {\n $this->redirect($this->Auth->redirectUrl());\n }\n\n if ($user = $this->Auth->identify()) {\n $this->Auth->setUser($user);\n\n // set cookie\n if (!empty($this->getRequest()->getData('remember_me'))) {\n if ($CookieAuth = $this->Auth->getAuthenticate('Lil.Cookie')) {\n $CookieAuth->createCookie($this->getRequest()->getData());\n }\n }\n } else {\n if ($this->getRequest()->is('post') || env('PHP_AUTH_USER')) {\n $this->Flash->error(__d('lil', 'Invalid username or password, try again'));\n }\n }\n\n if ($this->getCurrentUser()->get('id')) {\n $redirect = $this->Auth->redirectUrl();\n $event = new Event('Lil.Auth.afterLogin', $this->Auth, [$redirect]);\n $this->getEventManager()->dispatch($event);\n\n return $this->redirect($redirect);\n }\n }", "public function doLogin(){\n $rules = array(\n 'userid' => 'required|max:30',\n 'password' => 'required',\n );\n $display = array(\n 'userid' => 'User ID',\n 'password' => 'Password'\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, array(), $display);\n if($validator->fails()) {\n return \\Redirect::back()\n ->withErrors($validator)\n ->withInput(\\Input::all());\n }else{\n $user = User::where('username', '=', \\Input::get('userid'))\n ->first();\n if(isset($user->id)){\n if($user->level < 3) {\n if (\\Hash::check(\\Input::get('password'), $user->password)) {\n \\Session::put('logedin', $user->id);\n \\Session::put('loginLevel', $user->level);\n \\Session::put('nickname', $user->nickname);\n }\n return \\Redirect::nccms('/');\n }else{\n \\Session::flash('error', 'Permission Error.');\n return \\Redirect::nccms('login');\n }\n }else{\n \\Session::flash('error', 'Email/Password Error.');\n return \\Redirect::nccms('login');\n }\n }\n }", "public function log_in()\n\t{\n\t\tif( isset( $_POST['user_login'] ) && wp_verify_nonce( $_POST['login_nonce'], 'login-nonce') ) \n\t\t{\n\t\t\t/** Error when no password enter */\n\t\t\tif( ! isset( $_POST['user_pass']) || $_POST['user_pass'] == '') {\n\t\t\t\t$this->system_message['error'][] = __('Please enter a password');\n\t\t\t\treturn false;\n\t\t\t}\n\t \t\t\n\t\t\t// this returns the user ID and other info from the user name\n\t\t\t$user = get_user_by('login', $_POST['user_login'] );\n \n\t\t\tif( ! $user ) \n\t\t\t{\t\t\t\t\n\t\t\t\t$this->system_message['error'][] = __('Invalid ID or password');\n\t\t\t\treturn false;\n\t\t\t}\n\t \n\t\t\t// check the user's login with their password\n\t\t\tif( ! wp_check_password( $_POST['user_pass'], $user->user_pass, $user->ID) ) {\n\t\t\t\t// if the password is incorrect for the specified user\n\t\t\t\t$this->system_message['error'][] = __('Invalid ID or password');\n\t\t\t}\n\t \n\t\t\t// only log the user in if there are no errors\n\t\t\tif( empty( $this->system_message['error'] )) \n\t\t\t{\n\t\t\t\twp_set_auth_cookie( $user->ID, false, true );\n\t\t\t\twp_set_current_user( $user->ID );\t\n\t\t\t\tdo_action('wp_login', $_POST['user_login']);\n\t \n\t\t\t\twp_redirect( home_url() ); exit;\n\t\t\t}\n\t\t}\n\t}", "public function login() {\n\t\tif(!empty(Session::get('http_response'))) {\n\t\t\thttp_response_code(Session::get('http_response'));\n\t\t\tSession::delete('http_response');\n\t\t}\n\t\tif($_POST && isset($_POST['login']) && isset($_POST['password'])) {\n\t\t\t$user = $this->_model->getLogin(strtolower($_POST['login']));\n\t\t\tif($user && $user->enabled) {\n\t\t\t\tif(hash_equals($user->password,crypt($_POST['password'],$user->password))) {\n\t\t\t\t\tif($user->blocked) {\n\t\t\t\t\t\thttp_response_code(403);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is blocked\"));\n\t\t\t\t\t} elseif($user->verified) {\n\t\t\t\t\t\tSession::set('user',$user);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'success','icon'=>'check','text'=>\"User has logged in successfully\"));\n\t\t\t\t\t\t$redirect = Session::get('login_redirect');\n\t\t\t\t\t\tRouter::redirect(Session::get('login_redirect'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is not yet confirmed\"));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thttp_response_code(401);\n\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t}\t\n\t\t}\n\t}", "public function checkLogin() {\r\n\t\t$post = $this -> sanitize();\r\n\t\textract($post);\r\n\t\t// Hash the password that was entered into the form (if it was correct, it will match the hashed password in the database)\r\n\t\t$password = sha1($password);\r\n\t\t// Query\r\n\t\t$query = \"SELECT username, userID, profilePic, access, email FROM users WHERE username='$username' AND password='$password'\";\r\n\t\t$data = $this -> singleSelectQuery($query);\r\n\t\tif($data){\r\n\t\t\t//set up the session\r\n\t\t\t$_SESSION['userID'] = $data['userID'];\r\n\t\t\t$_SESSION['username'] = $data['username'];\r\n\t\t\t$_SESSION['profilePic'] = $data['profilePic'];\r\n\t\t\t$_SESSION['userType'] = $data['userType'];\r\n\t\t\t$_SESSION['access'] = $data['access'];\r\n\t\t\t//redirects to their profile\r\n\t\t\theader('location: index.php?page=profile&userID='.$_SESSION['userID']);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function login()\n\t{\n\t\t//Compute the hash code of the password submited by user\n\t\t$user_password_hash = $this->passwordEncrypt($this->user_info['user_password']);\n\t\t\n\t\t//Do datebase query to get the hash code of the password\n\t\t$db = BFL_Database :: getInstance();\n\t\t$stmt = $db->factory('select `user_id`,`user_password` from '.DB_TABLE_USER.' WHERE `user_name` = :user_name');\n\t\t$stmt->bindParam(':user_name', $this->user_info['user_name']);\n\t\t$stmt->execute();\n\t\t$rs = $stmt->fetch();\n\t\tif (empty($rs))\n\t\t\tthrow new MDL_Exception_User_Passport('user_name');\n\t\t\n\t\tif ($rs['user_password'] != $user_password_hash)\n\t\t\tthrow new MDL_Exception_User_Passport('user_password');\n\n\t\t//Set user session\n\t\t$auth = BFL_ACL :: getInstance();\n\t\t$auth->setUserID($rs['user_id']);\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "public static function check_log_in ()\n {\n session_start();\n\n if (!$_SESSION['user_data']) {\n header('Location: ./../index.php');\n exit;\n }\n }", "public function login()\n\t{\n $identity = $this->getIdentity();\n if ($identity->ok) {\n\t\t\t$duration = $this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tYii::app()->user->login($this->getIdentity(), $duration);\n\t\t\treturn true;\n \n\t\t} else\n\t\t\treturn false;\n\t}", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "public function login (){\n\t\t$user = $this->get_by(array(\n\t\t\t'email' => $this->input->post('email'),\n\t\t\t'password' => $this->hash($this->input->post('password')),\n\t\t\t), TRUE);\n\t\t\n\t\tif (count($user)) {\n\t\t\t// Log in user\n\t\t\t$data = array(\n\t\t\t\t'username' => $user->username,\n\t\t\t\t'email' => $user->email,\n\t\t\t\t'id' => $user->id,\n\t\t\t\t'loggedin' => TRUE,\n\t\t\t);\n\t\t\t$this->session->set_userdata($data);\n\t\t}\n\t\t}", "public function login() {\n\t\treturn $this->login_as( call_user_func( Browser::$user_resolver ) );\n\t}", "public function _check_login()\n {\n\n }", "public function loginUser() {\n self::$isLoggedIn = true;\n $this->session->setLoginSession(self::$storedUserId, self::$isLoggedIn);\n $this->session->setFlashMessage(1);\n }", "public function loginCheck()\n\t{\n\t}", "function requires_login()\n {\n $user = user();\n \n if ( empty( $user ) )\n {\n // no user id found, send to login\n Utility::redirect( Utility::login_url() );\n }\n }", "public function dologin() {\n\t\t$this->load->model('Users_model');\n\t\t$username = $_POST['username'];\n\t\tif($this->Users_model->checkLogin($username, sha1($_POST['password']))) {\n\t\t\t$this->session->set_userdata(\"username\",$username); // Initializing session\n\t\t\tredirect('user/view/'.$username, 'refresh'); // Redirect\n\t\t} else {\n\t\t\t$data['attempted'] = true;\n\t\t\t$this->load->view('view_login', $data);\n\t\t}\n\t}", "public function Login()\n\t{\n\t\t$this->user->email = $_POST['email'];\n\t\t$this->user->password = $_POST['password'];\n // Here we verify the nonce, so that only users can try to log in\n\t\t// to whom we've actually shown a login page. The first parameter\n\t\t// of Nonce::Verify needs to correspond to the parameter that we\n\t\t// used to create the nonce, but otherwise it can be anything\n\t\t// as long as they match.\n\t\tif (isset($_POST['nonce']) && ulNonce::Verify('login', $_POST['nonce'])){\n\t\t\t// We store it in the session if the user wants to be remembered. This is because\n\t\t\t// some auth backends redirect the user and we will need it after the user\n\t\t\t// arrives back.\n\t\t\t//echo \"login successful\";\n\t\t\t\n\t\t\t///echo $this->input->post('email');\n\n\t\t\tif (isset($_POST['autologin']))\n\t\t\t\t$_SESSION['appRememberMeRequested'] = true;\n\t\t\telse\n\t\t\t\tunset($_SESSION['appRememberMeRequested']);\n \n\t\t\t// This is the line where we actually try to authenticate against some kind\n\t\t\t// of user database. Note that depending on the auth backend, this function might\n\t\t\t// redirect the user to a different page, in which case it does not return.\n\t\t\t$this->ulogin->Authenticate($_POST['email'], $_POST['password']);\n\t\t\tif ($this->ulogin->IsAuthSuccess()){\n\t\t\t\t$_SESSION[\"loggedIn\"] = true;\n\t\t\t\techo \"success\";\n\t\t\t}else echo \"failed\";\n\t\t}else echo 'refresh';\n\t\t//$this->load->view('layout/home.php');\n\t}", "protected function login( )\r\n {\r\n $this->sendData( 'USER', $this->_nick, $this->_nick . ' ' . $this->_user . ' : ' . $this->_realName );\r\n \r\n $this->sendData( 'NICK', $this->_nick );\r\n \r\n $this->_loggedOn = true;\r\n }", "public function login() {\n $this->db->sql = 'SELECT * FROM '.$this->db->dbTbl['users'].' WHERE username = :username LIMIT 1';\n\n $user = $this->db->fetch(array(\n ':username' => $this->getData('un')\n ));\n\n if($user['hash'] === $this->hashPw($user['salt'], $this->getData('pw'))) {\n $this->sessionId = md5($user['id']);\n $_SESSION['user'] = $user['username'];\n $_SESSION['valid'] = true;\n $this->output = array(\n 'success' => true,\n 'sKey' => $this->sessionId\n );\n } else {\n $this->logout();\n $this->output = array(\n 'success' => false,\n 'key' => 'WfzBq'\n );\n }\n\n $this->renderOutput();\n }", "private function checkLogin() {\n if (!$this->checkConfig()) return;\n $config = $this->getConfig();\n\n if (isset($_SESSION['signin/twitter/status']) && $_SESSION['signin/twitter/status']=='verified') {\n\n $screenname = $_SESSION['signin/twitter/request_vars']['screen_name'];\n $twitterid = $_SESSION['signin/twitter/request_vars']['user_id'];\n $oauth_token = $_SESSION['signin/twitter/request_vars']['oauth_token'];\n $oauth_token_secret = $_SESSION['signin/twitter/request_vars']['oauth_token_secret'];\n\n $connection = new TwitterOAuth($config['consumer_key'], $config['consumer_secret'], $oauth_token, $oauth_token_secret);\n\n // check if we already have this Twitter user in our database\n $user = UserQuery::create()->findOneByOAuthSignIn('twitter::' . $twitterid);\n if (!$user) {\n // if not we create a new one\n $user = new User();\n $user->setCreatedAt(time());\n $user->setOAuthSignIn('twitter::' . $twitterid);\n // we use the email field to store the twitterid\n $user->setEmail('');\n $user->setRole(UserPeer::ROLE_EDITOR); // activate user rigth away\n $user->setName($screenname);\n $user->setSmProfile('https://twitter.com/'.$screenname);\n $user->save();\n }\n DatawrapperSession::login($user);\n }\n }", "public function doLogin()\r\n {\r\n $input = Request::all();\r\n \r\n if (Auth::attempt(['username' => $input['email'], 'password' => $input['password'], 'deleted_at' => null, 'user_type' => 1]))\r\n {\r\n \r\n $user = Auth::user();\r\n Session::set('current_user_id',$user->id);\r\n return Redirect::intended('/dashboard');\r\n }\r\n else { \r\n Session::flash(\r\n 'systemMessages', ['error' => Lang::get('pages.login.errors.wrong_credentials')]\r\n );\r\n return Redirect::action('UserController@login')\r\n ->withInput(Request::except('password'));\r\n }\r\n }", "public function do_login()\n {\n $input = array(\n 'email' => Input::get( 'username' ), // May be the username too\n 'username' => Input::get( 'username' ), // so we have to pass both\n 'password' => Input::get( 'password' ),\n 'remember' => Input::get( 'remember' ),\n );\n\n // If you wish to only allow login from confirmed users, call logAttempt\n // with the second parameter as true.\n // logAttempt will check if the 'email' perhaps is the username.\n // Get the value from the config file instead of changing the controller\n if ( Confide::logAttempt( $input, Config::get('confide::signup_confirm') ) ) \n {\n // Redirect the user to the URL they were trying to access before\n // caught by the authentication filter IE Redirect::guest('user/login').\n // Otherwise fallback to '/'\n // Fix pull #145\n return Redirect::intended('/member'); // change it to '/admin', '/dashboard' or something\n }\n else\n {\n $user = new User;\n\n // Check if there was too many login attempts\n if( Confide::isThrottled( $input ) )\n {\n $err_msg = Lang::get('confide::confide.alerts.too_many_attempts');\n }\n elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) )\n {\n $err_msg = Lang::get('confide::confide.alerts.not_confirmed');\n }\n else\n {\n $err_msg = Lang::get('confide::confide.alerts.wrong_credentials');\n }\n \n return Redirect::action('UserController@login')\n ->withInput(Input::except('password'))\n ->with( 'error', $err_msg );\n }\n }", "public function login() {\r\n\r\n // signal any observers that the user has logged in\r\n $this->setState(\"login\");\r\n }", "public function login() {\n $email = $this->input->post('email');\n $pass = $this->input->post('password');\n if (!empty($email) && !empty($pass)) {\n $user = $this->users_model->login($email, $pass);\n if (!$user) {\n return $this->send_error('ERROR');\n }\n $this->event_log();\n return $this->send_response(array(\n 'privatekey' => $user->privatekey,\n 'user_id' => $user->id,\n 'is_coach' => (bool) $this->ion_auth->in_group('coach', $user->id)\n ));\n }\n return $this->send_error('LOGIN_FAIL');\n }", "public function check_login(){\n\t\tsession_start();\n\t\t$user = new InterfacePersonRepo;\n\t\t$tmp = $user->getRepository(Input::get('txtUsername'));\n\t\tif($tmp==NULL){\n\t\t\treturn View::make('alert/authen/alertLogin');\n\t\t}else{\n\t\t\tif (Hash::check(Input::get('txtPassword'), $tmp->getPassword())){\n\t\t\t\t$_SESSION[\"id\"] = $tmp->getUserID();\n\t\t\t\t$_SESSION[\"Username\"] = $tmp->getUsername();\n\t\t\t\t$_SESSION[\"Name\"] = $tmp->getName();\n\t\t\t\t$_SESSION[\"Surname\"] = $tmp->getSurname();\n\t\t\t\t$_SESSION[\"Address\"] = $tmp->getAddress();\n\t\t\t\t$_SESSION[\"Email\"] = $tmp->getEmail();\n\t\t\t\t$_SESSION[\"Phone\"] = $tmp->getPhone();\n\t\t\t\t$_SESSION[\"Status\"] = $tmp->getStatus();\n\t\t\t\t$_SESSION[\"Filename\"] = $tmp->getPath_file();\n\t\t\t\t$_SESSION[\"Fine\"] = $tmp->getFine();\n\n\t\t\t\tsession_write_close();\n\t\t\t\treturn Redirect::to(\"/main\");\n\t\t\t}else{\n\t\t\t\treturn View::make('alert/authen/alertLogin');\n\t\t\t}\n\t\t}\n\t}", "public function setLogin(){\n \n\t\t\t$obUser = Model::getUserByEmail($this->table, $this->camp,$this->email);\n\t\t\tif (!$obUser instanceof Model) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\tif (!password_verify($this->password, $obUser->senha)) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->session($obUser);\n\n\t\t\theader('location: '.$this->location);\n\t\t\texit;\n\n\t\t}", "protected function checkLogin()\n {\n if (LOCATION == 'Live') {\n $this->markTestSkipped('Cannot run in Live environment');\n return;\n }\n $this->loginPage->open()\n ->navigateToContactUsViaSideButton()\n ->open()\n ->verifyPageIsLoaded()\n ->checkPageTitle('log in to My Account')\n ->enterUserId($this->userData['standard']['uid'])\n ->enterUserPassword($this->userData['standard']['pwd'])\n ->clickButton();\n }", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\n\t# Search the db for this email and password\n\t# Retrieve the token if it's available\n\t$q = \"SELECT token \n\t\tFROM users \n\t\tWHERE email = '\".$_POST['email'].\"' \n\t\tAND password = '\".$_POST['password'].\"'\";\n\t\n\t$token = DB::instance(DB_NAME)->select_field($q);\t\n\t\t\t\t\n\t# If we didn't get a token back, login failed\n\tif(!$token) {\n\t\t\t\n\t\t# Send them back to the login page\n\n\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\n\t# But if we did, login succeeded! \n\t} else {\n\t\t\t\n\t\t# Store this token in a cookie\n\t\t@setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\t\t\n\t}\n }", "private function _logUserIn($inputs)\n\t{\n\t\tCraft::log('Logging in user.');\n\n\t\tif (craft()->userSession->login($inputs['username'], $inputs['password']))\n\t\t{\n\t\t\tCraft::log('User logged in successfully.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCraft::log('Could not log the user in.', LogLevel::Warning);\n\t\t}\n\t}", "public function login() {\n\t\tif ($this->_identity === null) {\n\t\t\t$this->_identity = new UserIdentity($this->username, $this->password, $this->loginType);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif ($this->_identity->errorCode === UserIdentity::ERROR_NONE) {\n\t\t\t$duration = $this->rememberMe ? 3600 * 24 * 30 : 0; // 30 days or the default session timeout value\n\t\t\tYii::app()->user->login($this->_identity, $duration);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function checkUser()\n {\n $response = $this->di->get(\"response\");\n $user = $this->di->get(\"user\");\n\n if (!$user->isLoggedIn()) {\n $response->redirect(\"login\");\n }\n }", "private function checkLogin()\n {\n // save the user's destination in case we direct them to authenticate\n\n // whitelist authentication mechanisms\n if($this->_controller == \"authenticate\")\n return;\n\n // whitelist database reload\n if($this->_controller == \"populatetestdata\")\n return;\n\n if(!isset($_SESSION['userid']))\n {\n // Don't redirect the user to an error page just in principle\n // @todo possible @bug why would it do this?\n if($this->_controller != \"error\" && $this->_controller != \"undefined\")\n {\n $this->slogger->slog(\"saving destination to \" . $this->_controller, SLOG_DEBUG);\n $_SESSION['destination'] = $this->_controller;\n }\n redirect('authenticate');\n\n }\n\n }", "public function log_login()\n {\n if (!$this->config->get('log_logins')) {\n return;\n }\n\n $user_name = $this->get_user_name();\n $user_id = $this->get_user_id();\n\n if (!$user_id) {\n return;\n }\n\n self::write_log('userlogins',\n sprintf('Successful login for %s (ID: %d) from %s in session %s',\n $user_name, $user_id, self::remote_ip(), session_id()));\n }", "public function login()\n {\n try {\n if ($this->call('login', '/user/login') != \"\") {\n if (($page = $this->call('basic', '')) !== false) {\n $this->html = $this->open($page);\n if ($this->findLink('/user/account')) {\n return true;\n } else {\n throw new Exception('Unable to login');\n }\n }\n }\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }", "abstract protected function doLogin();", "protected function _checkAndRedirect() {\n $auth = $this->_checkAuthentication();\n if(true === $auth) { // authentication required, redirects to login page\n $user = $this->getCurrentUser();\n if(null === $user) { // user doesn't appear do be logged in\n $this->flashMessenger()->addErrorMessage(IControllerMessages::FATAL_ERROR_NOT_AUTHENTIFICATED);\n $this->redirect()->toRoute(IRouteStore::LOGIN); // break;\n return;\n }\n else {\n \treturn $user;\n }\n }\n else {\n \texit;\n \treturn false;\n }\n }", "private function login(){\n\t\tif (empty($_POST['username'])) {\n\t\t\t$this->errors[] = \"Username field was empty.\";\n } elseif (empty($_POST['password'])) {\n $this->errors[] = \"Password field was empty.\";\n } elseif (!empty($_POST['username']) && !empty($_POST['password'])) { \n\t\t\t$this->username = filter_var($_POST['username'], FILTER_SANITIZE_STRING);\t\t\t\n \t\n\t\t\t//prepared statement to login user\n\t\t\t$sel = \"SELECT * FROM users WHERE username = ? OR email = ? \";\n \tif($stmt = $this->connection->prepare($sel)){\n \t\t$stmt->bind_param(\"ss\", $this->username, $this->username);\n \t\t$stmt->execute();\n \t\t//$stmt->bind_result();\n \t\t$res = $stmt->get_result();\n \t\t$user_info = $res->fetch_object();\n \t}\n\t\t\t\t\t\t\t\t\t\n\t\t\tif (password_verify($_POST['password'], $user_info->password)) {\n\t\t\t\t$_SESSION['username'] = $user_info->username;\n\t\t\t\t$_SESSION['email'] = $user_info->email;\n\t\t\t\t$_SESSION['user_login_status'] = 1;\n\t\t\t} else if(empty($user_info)){\n\t\t\t\t$this->errors[] = \"Wrong User name. Please try again\";\n\t\t\t} else {\n\t\t\t\t$this->errors[] = \"Wrong password. Please try again\";\n\t\t\t}\n\t\t}\n\t}", "public function doLogin()\n\t{\n\n\t\t$userNameCookie = $this->loginView->getUserNameCookie();\n\t\t$passwordCookie = $this->loginView->getPasswordCookie();\n\n\t\t\n\t\tif(isset($userNameCookie) && isset($passwordCookie))\n\t\t{\n\t\t\t$this->isLoggedIn=$this->authenticate->tryTologin($userNameCookie,$passwordCookie,true);\n\t\t}\n\n\t\t$reqUsername = $this->loginView->getRequestUserName();\n\t\t$reqPass = $this->loginView->getRequestPassword();\n\n\t\tif($this->loginView->userWantsToLogin())\n\t\t{\n\t\t\t$this->isLoggedIn=$this->authenticate->tryTologin($reqUsername,$reqPass);\t\t\t\n\t\t}\n\t\t/* \tSince logout operation requires session variable to be set, after authenticating\n\t\t*\tlogin details, It really should not matter if the message is still 'Bye bye'\n\t\t*/\n\t\telse if(isset($_SESSION['user']) && $this->loginView->userWantsToLogout())\n\t\t{\n\t\t\t\t$this->authenticate->logout();\n\t\t\t\t$this->isLoggedIn = false;\t\t\t\t\n\t\t}\n\t\treturn $this->isLoggedIn;\n\t}", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n $duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\n $lastLogin = date(\"Y-m-d H:i:s\");\n\n if(Yii::app()->user->tableName === 'tbl_user'){\n $sql = \"UPDATE tbl_user_dynamic SET ulast_login = :lastLogin WHERE user_id = :userid\";\n }\n if(Yii::app()->user->tableName === 'tbl_personnel'){\n $sql = \"UPDATE tbl_user_dynamic SET plast_login = :lastLogin WHERE user_id = :userid\";\n }\n if(Yii::app()->user->tableName === 'tbl_reader'){\n $sql = \"UPDATE tbl_user_dynamic SET rlast_login = :lastLogin WHERE user_id = :userid\";\n }\n $command = Yii::app()->db->createCommand($sql);\n $command->bindValue(\":userid\", $this->_identity->id, PDO::PARAM_STR);\n $command->bindValue(\":lastLogin\", $lastLogin, PDO::PARAM_STR);\n $command->execute();\n Tank::wipeStats();\n Yii::app()->user->setState('todayHasRecord',User::todayHasRecord());\n return true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function executeLogin()\n {\n }", "public function logIn(){\n\t\t$email = $_POST['log_email'];\n\t\t$email = filter_var($email, FILTER_SANITIZE_EMAIL); //sanitize email\n\t\t$s_email = self::$db->escape($email);\n\n\t\t\n\t\t$myquery = \"SELECT * FROM users WHERE email = $s_email;\";\n\t\tif(!self::$db->query($myquery)){\n\t\t\tarray_push($_SESSION['error'], \"does not match\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = self::$db->select($myquery);\n\t\t$hash = $user[0]['password'];\n\t\t$password = $_POST['log_password'];\n\t\t$unlocked = password_verify($password, $hash);\n\n\t\tif($unlocked){\n\t\t\t$this->setSessionVar($user[0]['id'],$hash);\n\t\t\t$_SESSION['allow']=true;\n\t\t\t$_SESSION['username'] = $user[0]['username'];\n \t\t\theader( \"refresh:0; url=index.php?page=home\");\n \t\t \t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tarray_push($_SESSION['error'] , 'does not match');\n\t\t\t$_SESSION['allow']=false;\n\t\t\treturn false ;\n\t\t}\n\t\tarray_push($_SESSION['error'] , 'does not match');\n\t\treturn false; \n\t}", "public function dologinpage()\n\t\t{\n\t\t\t$userdata = array(\n\t\t\t\t'email' => Input::get('email'),\n\t\t\t\t'password' => Input::get('password')\n\t\t\t);\n\n\t\t\tif(Auth::attempt($userdata)) {\n\t\t\t\tSession::flash('successMessage', \"Welcome back, \" . Auth::user()->username . \"!\");\n\t\t\t\tSession::put('loggedinuser', Auth::user()->username);\n\t\t\t\treturn Redirect::intended('/posts');\n\t\t\t\t// $userid = DB::table('users')->where('username', Session::get('loggedinuser'))->pluck('id');\n\t\t\t\t// Session::put('loggedinid', $userid);\n\t\t\t\t\n\t\t\t\t// return Redirect::action('PostsController@index');\n\t\t\t} else {\n\t\t\t\tSession::flash('errorMessage', 'Your username or password is incorrect');\n\t\t\t\treturn Redirect::to('login');\n\t\t\t}\n\t\t}", "public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }", "protected function login()\n {\n $this->send(Response::nick($this->config['nick']));\n $this->send(Response::user(\n $this->config['nick'],\n $this->config['hostname'],\n $this->config['servername'],\n $this->config['realname']\n ));\n }", "public function check_login(): void\n {\n if ($this->email_activation and $this->user and !$this->user['email_verified']) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/register');\n }\n\n if (!$this->user) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect($this->login);\n }\n }", "public function login() {\n $db = Db::getInstance();\n $user = new User($db);\n\n// preventing double submitting\n $token = self::setSubmitToken();\n\n// if user is already logged in redirect him to gallery\n if( $user->is_logged_in() ){\n call('posts', 'index');\n } else {\n// otherwise show login form\n require_once('views/login/index.php');\n// and refresh navigation (Login/Logout)\n require('views/navigation.php');\n }\n }", "public function doLogin()\n\t{\n $userData = array(\n 'username' => \\Input::get('username'),\n 'password' => \\Input::get('password'),\n );\n\t\t\n\t\t$rememberMe = \\Input::get('remember-me');\n\t\t\n // Declare the rules for the form validation.\n $rules = array(\n 'username' => 'Required',\n 'password' => 'Required'\n );\n\n // Validate the inputs.\n $validator = \\Validator::make($userData, $rules);\n\n // Check if the form validates with success.\n if ($validator->passes())\n {\n // Try to log the user in.\n if (\\Auth::attempt($userData, (bool)$rememberMe))\n {\n // Redirect to dashboard\n\t\t\t\treturn \\Redirect::intended(route('dashboard'));\n }\n else\n {\n // Redirect to the login page.\n return \\Redirect::route('login')->withErrors(array('password' => \\Lang::get('site.password-incorrect')))->withInput(\\Input::except('password'));\n }\n }\n\n // Something went wrong.\n return \\Redirect::route('login')->withErrors($validator)->withInput(\\Input::except('password'));\n\t}", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function login_action() \n\t{\n $rules = array(\n 'mail' => 'valid_email|required',\n 'pass' => 'required'\n );\n \n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n // they've passed the filter login try and log 'em in\n\t\tUserModel::login(); \n }", "protected function isUserAllowedToLogin() {}", "public function login() {\n\t\t//see if the user exists in the config.\r\n\t\tif (empty ( $_SESSION['uid'] ) && !isset($_POST['user'])) {\n\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Login required.</message></reply>';\n\t\t\tsession_destroy();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(isset($_POST['user'])){\n\t\t\t$xmlUser = $this->getUser ( $_POST ['user'] );\n\t\t}\n\t\t\n\t\t//Validate the user\n\t\tif ( isset ( $xmlUser ) && (empty($xmlUser ['password']) || (isset($_POST ['password']) && $xmlUser ['password'] == crypt($_POST ['password'],$xmlUser['password'])))) {\n\t\t\t//if a session exists, restrict login to only that user.\n\t\t\tif (! isset ( $this->session ) || ($this->session ['name'] == $xmlUser ['name'] && $this->session ['ip'] == $_SERVER ['REMOTE_ADDR'])) {\n\t\t\t\t//Login OK\r\n\t\t\t\t$this->isLoggedin = true;\n\t\t\t\t$this->name = $xmlUser ['name'];\n\t\t\t\t$this->group = $xmlUser ['group'];\n\t\t\t\t$this->session ['uid'] = session_id ();\n\t\t\t\t$this->session ['name'] = ( string ) $xmlUser ['name'];\n\t\t\t\t$this->session ['ip'] = $_SERVER ['REMOTE_ADDR'];\n\t\t\t\tsession_register('uid');\n\t\t\t\tsession_register('group');\n\t\t\t\t$_SESSION['uid'] = (string) $xmlUser['name'];\n\t\t\t\t$_SESSION['group'] = (string)$xmlUser['group'];\n\t\t\t\t$this->updateSession ();\n\t\t\t\t\n\t\t\t\tLogger::getRootLogger ()->info ( \"User {$xmlUser['name']} is logged in.\" );\n\t\t\t\techo '<reply action=\"login-ok\"><message>logged in.</message></reply>';\n\t\t\t} else {\n\t\t\t\t//Another user is logged in\r\n\t\t\t\tLogger::getRootLogger ()->info ( \"Could not login user {$_POST['user']}. Another user is already logged in.\" );\n\t\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Error logging in. Another user is already logged in.</message></reply>';\n\t\t\t}\n\t\t} else {\n\t\t\tif(isset($_POST['password'])){\n\t\t\t\t//Wrong user and/or pass\n\t\t\t\tsession_destroy();\r\n\t\t\t\tLogger::getRootLogger ()->info ( \"Could not login user {$_POST['user']}. Wrong username and/or password.\" );\n\t\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Error logging in. Username and or password is incorrect.</message></reply>';\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsession_destroy();\n\t\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Your session has expired</message></reply>';\n\t\t\t}\n\t\t}\n\t}", "function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n Router::redirect(\"/users/login/error\");\n\n # But if we did, login succeeded! \n } else {\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # update the last_login time for the user\n/* $_POST['last_login'] = Time::now();\n\n $user_id = DB::instance(DB_NAME)->update('users', $_POST); */\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }", "function login() {\n\n $this->visitPath('/user/login');\n\n $loginForm = $this->getSession()->getPage()->findById('user-login-form');\n if (is_null($loginForm)) {\n throw new ExpectationException('Cannot find the login form.', $this->getSession()->getDriver());\n }\n\n $usernameField = $loginForm->findById('edit-name');\n $passwdField = $loginForm->findById('edit-pass');\n\n if (is_null($usernameField) or is_null($passwdField)) {\n throw new ExpectationException('Cannot find the authentication fields.', $this->getSession()->getDriver());\n }\n\n $usernameField->setValue($this->admin_username);\n $passwdField->setValue($this->admin_passwd);\n $loginForm->submit();\n\n $this->assertSession()->elementNotExists('css', '.messages--error');\n }", "public function LoginCheck()\n {\n $protocol = Yii::app()->params['protocol'];\n $servername = Yii::app()->request->getServerName();\n $user = Yii::app()->session['username'];\n if (empty($user)) {\n $returnUrl = $protocol . $servername . Yii::app()->homeUrl;\n $this->redirect($returnUrl);\n }\n }", "public function check_login(): void\n {\n if ($this->email_activation && $this->user && !$this->user['email_verified']) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/register');\n }\n\n if (!$this->user) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/login');\n }\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public function login()\r\n\t{\t\t\r\n\t\tif ($this->_identity === null) {\r\n $this->_identity = new UserIdentity($this->email, $this->password);\r\n $this->_identity->authenticate();\r\n }\r\n\t\t\r\n switch ($this->_identity->errorCode) {\r\n case UserIdentity::ERROR_NONE:\r\n $duration = $this->rememberMe ? 3600 * 24 * 30 : 0; // 30 days\r\n Yii::app()->user->login($this->_identity, $duration);\r\n break;\r\n case UserIdentity::ERROR_USERNAME_INVALID:\t\t\t\t\r\n $this->addError('email', 'Email address is incorrect.');\r\n break;\r\n\t\t\tcase UserIdentity::ERROR_PASSWORD_INVALID:\r\n $this->addError('password', 'Password is incorrect.');\r\n break;\r\n default: // UserIdentity::ERROR_PASSWORD_INVALID\r\n $this->addError('password', 'Password is incorrect.');\r\n break;\r\n }\r\n\t\t\r\n if ($this->_identity->errorCode === UserIdentity::ERROR_NONE) {\r\n $this->onAfterLogin(new CEvent($this, array()));\t\t\t\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\t}", "public function dologin() {\n $password=$this->model->getpassword($_POST['username']);\n if (!empty($_POST['password']) && !empty($password) && $password[0]['userpasswd']==$_POST['password']) {\n $_SESSION['username']=$_POST['username'];\n $id=$this->model->getid($_POST['username']);\n $_SESSION['userid']=$id[0]['userid'];\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->set('errormessage', \"Błędny login lub hasło!\");\n $this->view->set('redirectto', \"?v=user&a=login\");\n $this->view->render('error_view');\n }\n }", "public function login()\n {\n Yii::$app->settings->clearCache();\n if ($this->validate() && $this->checkSerialNumberLocal()) {\n Yii::$app->settings->checkFinalExpireDate();\n $flag = Yii::$app->user->login($this->getUserByPassword(), 0);\n Yii::$app->object->setShift();\n return $flag;\n }\n \n return false;\n }", "public function admission_login() {\n\t\t$user = $this->loadModel('User', input()->id);\n\t\t$verified = false;\n\t\t$_username = $user->email;\n\t\t//\tStrip everything after @ from email address\n\t\t$string = explode('@', input()->username);\n\t\t// Check for a global company email extension\n\t\t$emailExt = $this->loadModel('Company')->getEmailExt();\t\n\t\t\n\t\tif (!empty ($emailExt)) {\n\t\t\t$username = array(input()->username, $string[0] . $emailExt->global_email_ext);\n\t\t\tforeach ($username as $uname) {\n\t\t\t\tif ($uname == $_username) {\n\t\t\t\t\tif (auth()->login($user->email, $user->password)) {\n\t\t\t\t\t\t$user = auth()->getRecord();\n\t\t\t\t\t\tif (input()->module != '') {\n\t\t\t\t\t\t\t$module = input()->module;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$module = \"HomeHealth\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->redirect(array('module' => $module));\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->redirect(array('page' => 'login'));\n\t\t\t\t\t}\n\t\t\t\t// if the user is using a different email extension check login\n\t\t\t\t} else {\n\t\t\t\t\tif (auth()->login($user->email, $user->password)) {\n\t\t\t\t\t\t$user = auth()->getRecord();\n\t\t\t\t\t\t$this->redirect(array('module' => input()->module));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->redirect(array('page' => 'login'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ($_username = input()->username) {\n\t\t\t$this->redirect();\n\t\t} else {\n\t\t\t$this->redirect(array('page' => 'login'));\n\t\t}\n\t\texit;\n\t}", "public function login()\n {\n }", "public function login()\n {\n }", "public function login()\n {\n $username = $this->getAttribute('username');\n\n $this->_user = $this->db->select(Db::TABLE_USER, array(\n 'username' => $username,\n 'password' => UserAuth::hash(\n $this->getAttribute('password')\n ),\n ));\n\n if(!empty($this->_user)) {\n\n $identity = new UserAuth();\n $identity->login($username);\n\n return true;\n } else {\n $this->addError('password','Incorrect username or password');\n }\n\n return false;\n }", "public function login() {\r\n if ($this->request->is('post')) {\r\n \r\n //If the user is authenticated...\r\n if ($this->Auth->login()) {\r\n \r\n if ($this->isAdmin()) $this->redirect(\"/admin/halls\");\r\n else $this->redirect(\"/halls\");\r\n }\r\n else {\r\n $this->Session->setFlash(__('Invalid username or password, try again'));\r\n }\r\n }\r\n }", "private function checkLogin() {\n\t\t\n\t\tif ( ! $this->user_model->isLoggedIn() )\n\t\t\tredirect( base_url() . 'admin' );\n\n\t}", "public function checkLoggedIn() {\n\t\t\tif (isset($_SESSION['username'])) {\n\t\t\t\t// Get User object from the database\n\t\t\t\t$this->dao = new UserDAO();\n\t\t\t\treturn $this->dao->getUser($_SESSION['username']);\n\t\t\t}\n\t\t\t//redirect to login page\n\t\t\theader('Location: ./');\n\t\t}", "public function authUser(){\n\t\t\t\n\t\tif($this->view->userTryLogin()){\n\t\t\t\n\t\t \t// UC 1 3: user provides username and password\n\t\t\t$inpName = $this->view->getInputName(false);\n\t\t\t\n\t\t\tif($inpName == null){\n\t\t\t\t$this->view->storeMessage(\"Användarnamn saknas\");\n\t\t\t\treturn $this->view->showLogin(false);\n\t\t\t}\n\t\t\t\n\t\t\t$inpPass = $this->view->getInputPassword(false);\n\n\t\t\tif($inpPass == null){\n\t\t\t\t$this->view->storeMessage(\"Lösenord saknas\");\n\t\t\t\treturn $this->view->showLogin(false);\n\t\t\t}\n\t\t\t\t\t\n\t\t\t// UC 1 3a: user wants system to keep user credentials for easier login\n\t\t\t$keepCreds = $this->view->keepCredentials();\n\t\t\t\n\t\t\t// UC 1 4: authenticate user...\n\t\t\t$answer = $this->model->loginUser($inpName, $inpPass, $this->view->getServerInfo());\n\t\t\t\n\t\t\t// UC 1 4a: user could not be authenticated\n\t\t\tif($answer === false){\n\t\t\t\t\n\t\t\t\t// 1. System presents an error message\n\t\t\t\t// 2. Step 2 in main scenario\n\t\t\t\t$this->view->storeUserInput($inpName);\n\t\t\t\t$this->view->storeMessage(\"Felaktigt användarnamn och/eller lösenord\");\n\t\t\t\treturn $this->view->showLogin(false);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif($keepCreds){\n\t\t\t\t\t\n\t\t\t\t\t// UC 1 3a-1: ...system presents that...the user credentials were saved\n\t\t\t\t\t$this->view->storeCredentials($inpName, $inpPass);\n\t\t\t\t\t$this->model->storeCookieTime($inpName);\n\t\t\t\t\t$this->view->storeMessage(\"Inloggning lyckades och vi kommer ihåg dig nästa gång\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t// ...and present success message\n\t\t\t\t\t$this->view->storeMessage(\"Inloggningen lyckades\");\n\t\t\t\t}\t\n\t\t\t\treturn $this->view->showLogin(true);\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\t// UC 1 1: user wants to authenticate\n\t\t \t// UC 1 2: system asks for username, password and if system should save the user credentials\n\t\t\treturn $this->view->showLogin(false);\n\t\t}\n\t}", "public function login() {\n if (isset($_SESSION['userid'])) {\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->login();\n }\n }" ]
[ "0.7847255", "0.76851434", "0.7645397", "0.75072944", "0.7487362", "0.7436704", "0.7425467", "0.7418456", "0.73970324", "0.7376036", "0.7372473", "0.7343747", "0.7321474", "0.73065823", "0.72911215", "0.7259325", "0.7257588", "0.72515947", "0.724137", "0.7239514", "0.72344387", "0.7226571", "0.7221841", "0.72033113", "0.71984154", "0.71905136", "0.7183325", "0.71814036", "0.71814036", "0.7174016", "0.7166725", "0.7165907", "0.71625733", "0.7149707", "0.71423405", "0.7135816", "0.7133787", "0.7132951", "0.7121503", "0.71157956", "0.71051234", "0.708459", "0.70798093", "0.7075226", "0.7068741", "0.70656615", "0.7053951", "0.7038929", "0.70354515", "0.70338196", "0.7023693", "0.7011077", "0.7007428", "0.7006532", "0.7003229", "0.700187", "0.6996383", "0.6991463", "0.6983469", "0.6981968", "0.6976346", "0.69681203", "0.6965462", "0.69638765", "0.69612646", "0.6955632", "0.69548196", "0.6954786", "0.69536966", "0.6948692", "0.69483507", "0.69421643", "0.6941171", "0.6924465", "0.6923468", "0.6912825", "0.6911433", "0.6908957", "0.6904679", "0.6903878", "0.6901465", "0.69009453", "0.68990064", "0.68981177", "0.6886057", "0.6879053", "0.6878124", "0.6876717", "0.6872207", "0.68564206", "0.6855734", "0.6846643", "0.684534", "0.684511", "0.684511", "0.6844345", "0.6839332", "0.6835831", "0.6833926", "0.683026", "0.682994" ]
0.0
-1
Display a listing of the resource.
public function index() { $propinsi = $this->request->input('propinsi'); if ($propinsi) { return Kota::where("Propinsi", "LIKE","$propinsi") ->orderBy('RecID')->get(); } else { return Kota::orderBy('RecID')->get(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET 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 //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->addSql('CREATE SEQUENCE validation_ogra_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE TABLE validation_ogra (id INT NOT NULL, extrac INT DEFAULT NULL, type_ligne VARCHAR(30) DEFAULT NULL, codens VARCHAR(30) DEFAULT NULL, code_eve VARCHAR(500) DEFAULT NULL, comvali VARCHAR(1000) DEFAULT NULL, comvaliorias VARCHAR(1000) DEFAULT NULL, date_eve VARCHAR(30) DEFAULT NULL, saisi VARCHAR(10) DEFAULT NULL, telidadrdiff BOOLEAN DEFAULT NULL, com_site VARCHAR(1000) DEFAULT NULL, provenance VARCHAR(100) DEFAULT NULL, numorias VARCHAR(100) DEFAULT NULL, type_raporias VARCHAR(100) DEFAULT NULL, codenstabcleb VARCHAR(100) DEFAULT NULL, videtab VARCHAR(30) DEFAULT NULL, siren VARCHAR(100) DEFAULT NULL, cle_oah VARCHAR(100) DEFAULT NULL, comvalin_1 VARCHAR(1000) DEFAULT NULL, bid VARCHAR(1) DEFAULT NULL, identifiant2017 VARCHAR(1000) DEFAULT NULL, saisin_1 VARCHAR(10) DEFAULT NULL, pstweb BOOLEAN DEFAULT NULL, nbresparcomweb INT DEFAULT NULL, resssagt VARCHAR(100) DEFAULT NULL, res1 VARCHAR(100) DEFAULT NULL, res2 VARCHAR(100) DEFAULT NULL, res3 VARCHAR(100) DEFAULT NULL, res4 VARCHAR(100) DEFAULT NULL, res5 VARCHAR(100) DEFAULT NULL, res6 VARCHAR(100) DEFAULT NULL, res7 VARCHAR(100) DEFAULT NULL, res8 VARCHAR(100) DEFAULT NULL, enseigne1 VARCHAR(500) DEFAULT NULL, enseigne2 VARCHAR(500) DEFAULT NULL, enseigne3 VARCHAR(500) DEFAULT NULL, nomnorm1 VARCHAR(500) DEFAULT NULL, nomnorm2 VARCHAR(500) DEFAULT NULL, nomnorm3 VARCHAR(500) DEFAULT NULL, nomnorm4 VARCHAR(500) DEFAULT NULL, nomnorm5 VARCHAR(500) DEFAULT NULL, nomnorm6 VARCHAR(500) DEFAULT NULL, nomnorm7 VARCHAR(500) DEFAULT NULL, service VARCHAR(500) DEFAULT NULL, codpost VARCHAR(10) DEFAULT NULL, commune VARCHAR(500) DEFAULT NULL, villenorm VARCHAR(500) DEFAULT NULL, ville VARCHAR(500) DEFAULT NULL, numvoie VARCHAR(30) DEFAULT NULL, typevoie VARCHAR(50) DEFAULT NULL, nomvoie VARCHAR(500) DEFAULT NULL, compvoie VARCHAR(500) DEFAULT NULL, tel VARCHAR(50) DEFAULT NULL, fax VARCHAR(50) DEFAULT NULL, cleextrac VARCHAR(255) DEFAULT NULL, tabcleb1 VARCHAR(255) DEFAULT NULL, tabcleb2 VARCHAR(255) DEFAULT NULL, tabcleb3 VARCHAR(255) DEFAULT NULL, tabcleb4 VARCHAR(255) DEFAULT NULL, tabcleb5 VARCHAR(255) DEFAULT NULL, tabcleb6 VARCHAR(255) DEFAULT NULL, tabcleb7 VARCHAR(255) DEFAULT NULL, tabcleb8 VARCHAR(255) DEFAULT NULL, tabcleb9 VARCHAR(255) DEFAULT NULL, tabcleb10 VARCHAR(255) DEFAULT NULL, tabcleb11 VARCHAR(255) DEFAULT NULL, tabcleb12 VARCHAR(255) DEFAULT NULL, tabcleb13 VARCHAR(255) DEFAULT NULL, cleextracnorm VARCHAR(255) DEFAULT NULL, nomcomplet VARCHAR(255) DEFAULT NULL, boite_postale VARCHAR(50) DEFAULT NULL, case_postale VARCHAR(50) DEFAULT NULL, cedex VARCHAR(30) DEFAULT NULL, dep VARCHAR(10) DEFAULT NULL, codinsee VARCHAR(10) DEFAULT NULL, bubagentass BOOLEAN DEFAULT NULL, rubsocass BOOLEAN DEFAULT NULL, rubcourtier BOOLEAN DEFAULT NULL, rubmutuelles BOOLEAN DEFAULT NULL, clenum VARCHAR(10) DEFAULT NULL, commentaire VARCHAR(1000) DEFAULT NULL, commentcorr VARCHAR(1000) DEFAULT NULL, coloriedirect BOOLEAN DEFAULT NULL, adresseweb VARCHAR(1000) DEFAULT NULL, type_ligne_code VARCHAR(1) DEFAULT NULL, resorias1 VARCHAR(500) DEFAULT NULL, resorias2 VARCHAR(500) DEFAULT NULL, resorias3 VARCHAR(500) DEFAULT NULL, resorias4 VARCHAR(500) DEFAULT NULL, resorias5 VARCHAR(500) DEFAULT NULL, resorias6 VARCHAR(500) DEFAULT NULL, telmairie VARCHAR(50) DEFAULT NULL, horairesmairie VARCHAR(1000) DEFAULT NULL, iduser INT DEFAULT NULL, code_couleur VARCHAR(8) DEFAULT NULL, id_etat INT DEFAULT NULL, rech_google BOOLEAN DEFAULT NULL, rech_pj BOOLEAN DEFAULT NULL, rech_google_maps BOOLEAN DEFAULT NULL, rech_societe BOOLEAN DEFAULT NULL, rech_orias BOOLEAN DEFAULT NULL, lock BOOLEAN DEFAULT NULL, traite BOOLEAN DEFAULT NULL, rappel BOOLEAN DEFAULT NULL, valid_tel BOOLEAN DEFAULT NULL, ss_agent BOOLEAN DEFAULT NULL, a_verifier BOOLEAN DEFAULT NULL, date_valide DATE DEFAULT NULL, modif_ville BOOLEAN DEFAULT NULL, datemaoouv VARCHAR(20) DEFAULT NULL, datemaoferm VARCHAR(20) DEFAULT NULL, valid_admin BOOLEAN DEFAULT NULL, dep2 VARCHAR(10) DEFAULT NULL, PRIMARY KEY(id))'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "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'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "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 UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}", "public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}", "public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "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 UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\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->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n\t{\n Laravel\\Database\\Schema::create(\"orbs\", function($table){\n $table->increments(\"id\");\n $table->string(\"name\");\n $table->string(\"description\");\n $table->integer(\"coins\");\n $table->integer(\"points\");\n $table->integer(\"min_level\");\n $table->integer(\"max_level\");\n $table->integer(\"owner_character\");\n $table->integer(\"acquisition_time\");\n $table->integer(\"last_attacker\");\n $table->integer(\"last_attack_time\");\n $table->string(\"image\");\n });\n\t}" ]
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.7329024", "0.7313519", "0.7298817", "0.72950184", "0.72917736", "0.7291469", "0.72913444", "0.72849613", "0.72839737", "0.7272078", "0.7271878", "0.72659117", "0.7262893", "0.7261672", "0.7256839", "0.72505474", "0.7249633", "0.72441125", "0.724062", "0.72376186", "0.7218244", "0.72177947", "0.72046006", "0.7203395", "0.7196059", "0.7191219", "0.7189963", "0.7177052", "0.71761394", "0.7167738", "0.7164105", "0.7164105", "0.7159096", "0.7147647", "0.7136521", "0.7129768", "0.7124664", "0.7123368", "0.71168584", "0.7104628", "0.7104628", "0.7104618", "0.7097006", "0.70931643", "0.70886755", "0.7087018", "0.7086326", "0.70830804", "0.70829463", "0.70780045", "0.70702124", "0.70690626", "0.7066111", "0.7062268", "0.7058938", "0.705882", "0.70556235", "0.70549136", "0.7054758", "0.70498437", "0.70483595", "0.7047308", "0.7045881", "0.70445794", "0.7043173", "0.703882", "0.7038126", "0.703674", "0.7033728", "0.7032356", "0.7031423", "0.70257956", "0.70142514", "0.70101255", "0.7006208", "0.6988486", "0.6984963", "0.69629973", "0.69612974", "0.69587934", "0.6957519" ]
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->addSql('CREATE SCHEMA public'); $this->addSql('DROP SEQUENCE validation_ogra_id_seq CASCADE'); $this->addSql('DROP TABLE validation_ogra'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }", "public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(){\n $this->dropTable('users');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }", "public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down() \n {\n \n }", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('education');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n\tSchema::drop('quizzes');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "public function down ()\n {\n }", "abstract public function down();", "abstract public function down();", "abstract public function down();", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }", "public function down() {\n\n\t}", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down(): void\n {\n // Remove your data\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function down()\n {\n\tSchema::drop('activities');\n }", "public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }", "public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }", "public function down()\n {\n }", "public function down()\n {\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n\t\t//return false;\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }", "public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "protected abstract function do_down();", "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}", "public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function down() {\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}", "public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}" ]
[ "0.7950277", "0.78636813", "0.76065636", "0.7493955", "0.7320625", "0.7245268", "0.7187498", "0.71543235", "0.715298", "0.7141911", "0.7135835", "0.71214414", "0.71154845", "0.71057886", "0.7098064", "0.70800334", "0.7078775", "0.70729095", "0.7068331", "0.7066272", "0.7053364", "0.7053364", "0.7042174", "0.7042174", "0.7042174", "0.7041765", "0.7040102", "0.7028846", "0.70253754", "0.7021679", "0.6988633", "0.6986877", "0.6978061", "0.6971848", "0.6944203", "0.6944203", "0.6944203", "0.6942135", "0.6941429", "0.6939214", "0.6935277", "0.69334567", "0.6928689", "0.6924838", "0.6924794", "0.6913486", "0.6902361", "0.6897891", "0.6897845", "0.6897824", "0.6897824", "0.68886673", "0.688262", "0.6874051", "0.6869844", "0.6863713", "0.6858435", "0.68545175", "0.68440175", "0.6842142", "0.6836981", "0.6836124", "0.6834763", "0.68303466", "0.68297166", "0.68282366", "0.6826686", "0.6824025", "0.68185335", "0.6811099", "0.68078107", "0.68056506", "0.68056506", "0.6789167", "0.67755204", "0.67742497", "0.6765081", "0.67597127", "0.67596203", "0.67564446", "0.67564446", "0.67564446", "0.6753443", "0.6753351", "0.6753351", "0.6753351", "0.6752681", "0.674581", "0.6743746", "0.67387754", "0.6733766", "0.67331296", "0.6731279", "0.67302275", "0.6727377", "0.67273724", "0.672722", "0.672607", "0.67173517", "0.67139125", "0.671303" ]
0.0
-1
Author: Emanuel Setio Dewo 17 May 2006 Functions
function Defpred() { global $mnux, $pref, $token; TampilkanPilihanProdi($mnux, '', $pref, "pred"); //TampilkanPilihanProdi($mnux, '', $pref, "MK"); if (!empty($_SESSION['prodi'])) { //TampilkanMenuPred(); TampilkanPred(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fix() ;", "abstract function fromexp();", "public function inOriginal();", "protected function _refine() {\n\n\t}", "private function _i() {\n }", "public function temporality();", "function main($_o){\r\n\r\n $path = (!empty($_o[\"p\"])) ? $_o[\"p\"] : \"\";\r\n $path2 = \"P:/develope/www/dpa/__20120605/\" . $path;\r\n $path1 = \"P:/develope/www/dpa/eswine/\" . $path;\r\n\r\n $l_arr1 = transPath($path1);\r\n $l_arr2 = transPath($path2);\r\n print_r($l_arr1);\r\n print_r($l_arr2);\r\n\r\n //\r\n $l_diff1 = array_diff($l_arr1,$l_arr2);\r\n sort($l_diff1);\r\n $l_diff2 = array_diff($l_arr2,$l_arr1);\r\n sort($l_diff2);\r\n print_r($l_diff1);\r\n print_r($l_diff2);\r\n}", "public function helper()\n\t{\n\t\n\t}", "final function velcom(){\n }", "function getOffset() ;", "public function boleta()\n\t{\n\t\t//\n\t}", "public function AggiornaPrezzi(){\n\t}", "function j_jj($h1) {\r\n if ($h1 === 'o') {\r\n $duplo1 = 'j';\r\n return $duplo1;\r\n }\r\n }", "function process() ;", "function is_usefull($text) //good\r\n { \r\n $text=trim($text);\r\n $value = preg_replace('#\\s\\s#' , \" \" , $text);\r\n $value = preg_replace('#\\s+,#' , \", \" , $text);\r\n $value = preg_replace('#,\\s+#' , \",\" , $text);\r\n $value = preg_replace('#\\s+\\'#' , \"'\" , $text);\r\n $value = preg_replace('#\\'\\s+#' , \"'\" , $text);\r\n $value = preg_replace('#\\s+\\.#' , \".\" , $text);\r\n $value = preg_replace('#\\.\\s+#' , \" \" , $text);\r\n $value = preg_replace('#\\.[a-z]{1}#' , \".strtouppe[a-z]{1}\" , $text);\r\n $value = preg_replace('#\\s\\)#' , \")\" , $text);\r\n $value = preg_replace('#\\)\\s#' , \")\" , $text);\r\n $value = preg_replace('#\\(\\s#' , \"(\" , $text);\r\n $value = preg_replace('#\\s\\(#' , \"(\" , $text);\r\n $value = preg_replace('#;\\s+#' , \"; \" , $text);\r\n $value = preg_replace('#s+\\;#' , \"; \" , $text);\r\n $value = preg_replace('#s+\\:#' , \" :\" , $text);\r\n return $text;\r\n is_usefull(\"$text\");\r\n }", "abstract public function getPasiekimai();", "function datareformat ($data) {\t\n \t$aa=substr($data, 0, 4);\n \t$mm=substr($data, 5, 2);\n $gg=substr($data, -2, 2);\n $datareformat= $gg.\"/\".$mm.\"/\".$aa;\n\treturn $datareformat;\n}", "public function hapus_toko(){\n\t}", "private function _optimize() {}", "function getPos($sourcefile_width,$sourcefile_height,$pos,$gz_image=\"\"){\n if ($gz_image){\n $insertfile_width = ImageSx($gz_image);\n $insertfile_height = ImageSy($gz_image);\n }else {\n $lineCount = explode(\"\\r\\n\",$this->gz_text);\n $fontSize = imagettfbbox($this->gz_text_size,$this->gz_text_angle,$this->gz_text_font,$this->gz_text);\n $insertfile_width = $fontSize[2] - $fontSize[0];\n $insertfile_height = count($lineCount)*($fontSize[1] - $fontSize[5]);\n\t\t\t $fontSizeone =imagettfbbox($this->gz_text_size,$this->gz_text_angle,$this->gz_text_font,'e');\n\t\t\t $fontSizeone = ($fontSizeone[2] - $fontSizeone[0])/2;\n }\n\t\tswitch ($pos){\n\t\t\tcase 0:\n\t\t\t $dest_x = ( $sourcefile_width / 2 ) - ( $insertfile_width / 2 );\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tcase 1:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\t\t\tcase 2:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width-$fontSizeone;\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\n\t\t\tcase 3:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width-$fontSizeone;\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 4:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 5:\n\t\t\t $dest_x = ( ( $sourcefile_width - $insertfile_width ) / 2 );\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\n\t\t\tcase 6:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width -$fontSizeone;\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tcase 7:\n\t\t\t $dest_x = ( ( $sourcefile_width - $insertfile_width ) / 2 );\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 8:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tdefault:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width;\n\t\t\t $dest_y = $sourcefile_height - $insertfile_height;\n\t\t\t break;\n\t\t}\t\n\t\tif($gz_image){\n\t\t\t$dest_y=$dest_y-$insertfile_height;\n\t\t}\n return array(\"dest_x\"=>$dest_x,\"dest_y\"=>$dest_y);\n}", "function filter_ige_past2($ige,$h1) {\r\n if (substr($ige, -2) === 'ik') {\r\n $ige = str_replace('ik','',$ige);\r\n }\r\n $ige2 = $ige . $h1 . 'tt';\r\n if (preg_match('(l|r|n|j)',substr($ige,-1))) {\r\n $ige2 = $ige . 't';\r\n }\r\n if (preg_match('(ad|ed)',substr($ige,-2))) {\r\n $ige2 = $ige . 't';\r\n }\r\n if (preg_match('(vesz|visz|tesz|hisz)',$ige)) {\r\n $ige2 = str_replace('sz','tt',$ige);\r\n }\r\n if ($ige === 'esz') {\r\n $ige2 = 'evett';\r\n }\r\n return $ige2;\r\n }", "function encode_trans3($text,$table_file='gb2big5') {\n // $str = fread($fp,strlen($table_file.'.table')); \n // fclose($fp); \n $max=strlen($text)-1; \n for($i=0;$i<$max;$i++) { \n $h=ord($text[$i]); \n if($h>=160) { \n $l=ord($text[$i+1]); \n if($h==161 && $l==64) { \n $text[$i]=' '; \n $text[++$i]=' '; \n }else{ \n $pos = ($h-160)*510+($l-1)*2; \n $text[$i]=$str[$pos]; \n $text[++$i]=$str[$pos+1]; \n } \n } \n } \n return $text; \n}", "function getPos($sourcefile_width,$sourcefile_height,$pos,$met_image=\"\"){\n if ($met_image){\n $insertfile_width = ImageSx($met_image);\n $insertfile_height = ImageSy($met_image);\n }else {\n $lineCount = explode(\"\\r\\n\",$this->met_text);\n $fontSize = imagettfbbox($this->met_text_size,$this->met_text_angle,$this->met_text_font,$this->met_text);\n $insertfile_width = $fontSize[2] - $fontSize[0];\n $insertfile_height = count($lineCount)*($fontSize[1] - $fontSize[5]);\n\t\t\t $fontSizeone =imagettfbbox($this->met_text_size,$this->met_text_angle,$this->met_text_font,'e');\n\t\t\t $fontSizeone = ($fontSizeone[2] - $fontSizeone[0])/2;\n }\n\t\tswitch ($pos){\n\t\t\tcase 0:\n\t\t\t $dest_x = ( $sourcefile_width / 2 ) - ( $insertfile_width / 2 );\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tcase 1:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\t\t\tcase 2:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width-$fontSizeone;\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\n\t\t\tcase 3:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width-$fontSizeone;\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 4:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 5:\n\t\t\t $dest_x = ( ( $sourcefile_width - $insertfile_width ) / 2 );\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\n\t\t\tcase 6:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width -$fontSizeone;\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tcase 7:\n\t\t\t $dest_x = ( ( $sourcefile_width - $insertfile_width ) / 2 );\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 8:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tdefault:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width;\n\t\t\t $dest_y = $sourcefile_height - $insertfile_height;\n\t\t\t break;\n\t\t}\t\n\t\tif($met_image){\n\t\t\t$dest_y=$dest_y-$insertfile_height;\n\t\t}\n return array(\"dest_x\"=>$dest_x,\"dest_y\"=>$dest_y);\n}", "public function extra_voor_verp()\n\t{\n\t}", "protected function fixSelf() {}", "protected function fixSelf() {}", "function fundMapPar($caminhos){\n\t$k = 1;\n\t$pathAux = '';\n\t$i = count($caminhos)-1;\n\t$pathAux.=$caminhos[$i].'#';\n\t$path[] = $caminhos[$i];\n\t$i--;\n\t$pathAux.=$caminhos[$i].'#';\n\t$path[] = $caminhos[$i];\n\t$i--;\n\twhile ($i >= 0) {\n\n\t\tif (fullUpper($caminhos[$i]) == fullUpper($path[$k])) {\n\t\t\t$pathAux.=$caminhos[$i-1].'#';\n\t\t\t$path[] = $caminhos[$i-1];\n\t\t\t$k++;\n\t\t};\n\t\t$i = $i - 2;\n\t} \n\treturn $pathAux;\n}", "function getFirst() ;", "function getIndex() ;", "abstract protected function _preProcess();", "function get_name_value($fname) {\n global $pagina_resumen; // Uso el keyword global para poder acceder a la variable global $pagina_resumen\n $pos_name = strpos($pagina_resumen,$fname); //Ubico donde esta el nombre \n echo $pos_name;\n\t\t$pos_value = strpos($pagina_resumen,\"value\",$pos_name); //Ubibo la posicion de la palabra valor asociado al nombre\n\t\techo $pos_value;\n\t\t$comilla = chr(34);//The chr() function returns a character from the specified ASCII value.\n\t\t$pos_value_comilla_1 = strpos($pagina_resumen,$comilla,$pos_value);\n\t\techo $pos_value_comilla_1;\n\t\t$pos_value_comilla_2 = strpos($pagina_resumen,$comilla,$pos_value_comilla_1+1);\n\t\techo $pos_value_comilla_2;\n\t\t$pos_value_dif_comilla = $pos_value_comilla_2-$pos_value_comilla_1 ;\n\t\techo $pos_value_dif_comilla;\n\t\t$pos_valor = substr($pagina_resumen, $pos_value_comilla_1+1,$pos_value_dif_comilla-1);\n\t echo $pos_valor;\n }", "function cambios($old, $new, $n)\r\n\t{\r\n\t\tif (!($old == $new)) {\r\n\t\t\t$n = $n . $old . \";;\" . $new. \";;\";\r\n\t\t}\r\n\t\treturn $n;\r\n\t}", "function remove_sl(){\n\t\t\n\t}", "function elfOrd($ind){\n switch ($ind){\n case 0:\n return \"YEAR\";\n break;\n case 1:\n return \"BLADE\";\n break;\n case 2:\n return \"CRAG\";\n break;\n case 3:\n return \"DARK\";\n break;\n case 4:\n return \"DREAMDUST\";\n break;\n case 5:\n return \"FIRE\";\n break;\n case 6:\n return \"RIVER\";\n break;\n case 7:\n return \"WINGED\";\n break;\n case 8:\n return \"B_EXTRA\";\n break;\n case 9:\n return \"C_EXTRA\";\n break;\n case 10:\n return \"DA_EXTRA\";\n break;\n case 11:\n return \"DR_EXTRA\";\n break;\n case 12: \n return \"F_EXTRA\";\n break;\n case 13:\n return \"R_EXTRA\";\n break;\n case 14:\n return \"W_EXTRA\";\n break;\n case 15:\n return \"B_META\";\n break;\n case 16:\n return \"C_META\";\n break;\n case 17:\n return \"DA_META\";\n break;\n case 18:\n return \"DR_META\";\n break;\n case 19: \n return \"F_META\";\n break;\n case 20:\n return \"R_META\";\n break;\n case 21:\n return \"W_META\";\n break;\n }\n return null;\n}", "public function convert2ascii($buffer) \n {\n $length = (mb_substr($buffer, 0, 4));\n print 'Length :'.$length.'<br />';\n $p2 = mb_substr($buffer, 4,16);\n print 'P2 :'.$p2. '<br />';\n $p3 = (mb_substr($buffer, 20));\n //print 'P3 :'.$p3.'<br />';\n //$p4 = mb_substr($buffer, 36);\n ///print 'P4 :'.$p4.'<br />';\n $iso = $length . $p2 . $p3;// . $p4;\n print $iso.'**<br />';\n return $iso;\n //print $iso;\n \n //print $buffer.'**<br />';\n $length = strtoupper((mb_substr($buffer, 0, 4)));\n print 'Length :'. $length.'<br />';\n $p2 = mb_substr($buffer, 4,16);\n print 'P2 :' .$p2.'**<br />';\n $p3 = (mb_substr($buffer, 20,16));\n print 'P3 :'.$p3.'**<br />';\n //print $p3.'**<br />';\n //print bin2hex(mb_substr($buffer, 34,50)) . '** <br />';\n $p4 = mb_substr($buffer, 34);\n //$p4 = mb_substr($buffer, 34,50);\n \n print $p4.'**<br />'; \n //$p5 = mb_substr($buffer, 50);\n //print $p5.'**<br />'; \n $iso = $length . $p2 . $p3 . $p4;// . $p5;\n print 'ISO :'.$iso.'<br />';\n return $iso;\n //print $iso;\n }", "function normalize($ow, $oh, $fw, $fh, $key='fill'){\n\t\t$ih=$oh; $iw=$ow; $it=0; $il=0;\n\t\t$or = $ow/$oh;\n\t\t$fr = $fw/$fh;\n\t\tswitch($key){\n\t\t\tcase 'fill' :\n\t\t\t\tif($fr<$or){\n\t\t\t\t\t$ih=$fh;$iw=floor($fh*$or);$it=0;$il=-floor(($iw-$fw)/2);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$iw=$fw;$ih=floor($fw/$or);$it=-floor(($ih-$fh)/2);$il=0;\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\n\t\t\tcase 'fit' :\n\t\t\t\tif($fr<$or){\n\t\t\t\t\t$iw=$fw;$ih=floor($fw/$or);$it=-floor(($ih-$fh)/2);$il=0;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$ih=$fh;$iw=floor($fh*$or);$it=0;$il=-floor(($iw-$fw)/2);\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\n\t\t}\t\t\n\t\treturn array('t'=>$it, 'l'=>$il, 'w'=>$iw, 'h'=>$ih);\n\t}", "function noticias_cabe(){\n \n $html=site('http://www.jornalnoticias.co.mz/');\n\t\n\tforeach($html->find('.items-row')as $elms){\n\t\t\n\t\tforeach($elms->find ('.jn-postheader') as $elms2){\n\t\t\n\t $j[]=mb_convert_encoding( $elms2->plaintext, \"HTML-ENTITIES\", \"UTF-8\");\n\t\n\t\n\t\t\n\t\t}\n\t}\n\t\n\treturn $j;\n\t\n\t}", "function reArrange($source)\r\n{\r\n\t\r\n\t$i = 0;\r\n\t$fact_id=\"\";\r\n\t\t\t\r\n\tforeach($source as $key=>$val)\r\n\t{\t\r\n\t\t$res[$i]['Zone'] = $val['factories']['Zone'];\r\n\t\t\r\n\t\tif( intval($val['RESULT']['status']) == 0 ) \r\n\t\t{\r\n\t\t\t$fact_id = $val['RESULT']['factory_id'];\r\n\t\t\t\r\n\t\t\t$res[$i]['base_fact_id'] = $val['RESULT']['factory_id'];\r\n\t\t\t$res[$i]['base_fact_name'] = $val['factories']['factory_name'];\r\n\t\t\t$res[$i]['base_point'] = $val['RESULT']['points'];\r\n\t\t\t\r\n\t\t\t$res[$i]['follow_fact_id'] = \"\";\r\n\t\t\t$res[$i]['follow_point'] = \"\";\r\n\t\t}\r\n\t\t\t\r\n\t\telseif( intval($val['RESULT']['status']) != 0 ) \r\n\t\t{\r\n\t\t\tif($val['RESULT']['factory_id'] == $fact_id)\r\n\t\t\t{\r\n\t\t\t\t$res[$i-1]['follow_fact_id'] = $val['RESULT']['factory_id'];\r\n\t\t\t\t$res[$i-1]['follow_point'] = $val['RESULT']['points'];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$res[$i]['base_fact_id'] = \"\";\r\n\t\t\t\t$res[$i]['base_point'] = \"\";\r\n\t\t\t\t\r\n\t\t\t\t$res[$i]['follow_fact_id'] = $val['RESULT']['factory_id'];\r\n\t\t\t\t$res[$i]['follow_fact_name'] = $val['factories']['factory_name'];\r\n\t\t\t\t$res[$i]['follow_point'] = $val['RESULT']['points'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$i++;\r\n\t}\r\n\t\r\n\treturn $res;\t\t\r\n}", "function hitungDenda(){\n\n return 0;\n }", "public function getAlternate() {}", "function old_calculate_position($fingerPrints, $user_signals)\n{\n\n\t$closest_distance = 100000000.0;\n\t$closest_coordinates = \"000,000\";\n\t$closest_room = \"default\";\n\t$a = 0;\n\tforeach ($fingerPrints as $outer) {\n\t\t$temp_sum = 0.0;\n\t\tforeach ($outer as $value) {\t\n\t\t\tforeach($user_signals as $mac => $sig) {\n\t\t\t\tif ($mac == $value->get_mac()) {\n\t\t\t\t\t$signal_distance = $value->get_average() - $sig;\n\t\t\t\t\t$absolute_distance = abs($signal_distance);\n\t\t\t\t\t$temp_sum = $temp_sum + $absolute_distance;\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\t\t \n\t\t}\n\t\tif ($temp_sum < $closest_distance) {\n\t\t\t$closest_distance = $temp_sum;\n\t\t\t$closest_coordinates = $fingerPrints[$a][0]->get_position();\n\t\t$closest_room = $fingerPrints[$a][0]->get_room();\n\t\t}\n\t\t$a = $a + 1;\n\t}\n\techo $closest_coordinates; \n\techo \"_\";\n\techo $closest_room;\n}", "public function testPreprocessingGetPageAngle()\n {\n }", "public function findSpareBox() {\r\n\t\t\r\n\t}", "function rp($nominal) {\n //mengupdate nominal menjadi string, takutnya yang dimasukkan bertipe data int (angka)\n //mengeset string kosong buat penampung nanti, dan counter $c = 0\n $nominal = strval($nominal); $r = ''; $c = 0;\n $nominal = explode('.', $nominal); //memisah jika terdapat titik, takutnya ada titik seperti 4000.00\n $nominal = $nominal[0]; //mengambil data index pertama sebelum titik, berarti mengambil 4000-nya\n $nominal = explode('-', $nominal); //jika ada tanda minus di depan, maka akan dipecah lagi berdasarkan tanda minus tsb\n if (sizeof($nominal)>1) { //jika ternyata array yang dihasilkan oleh pemecahan tanda minus berjumlah lebih dari 1, berarti angka tersebut memang minus\n $min = '-'; $nominal = $nominal[1]; //dilakukan pemisahan dengan index 0 nin dan nominalnya di array index 1\n } else {\n $min = ''; $nominal = $nominal[0]; //jika tidak, maka memang bukan angka minus dan $min diset string kosong agar tidak berpengaruh saat direturn\n }\n for ($x=strlen($nominal)-1; $x>=0; $x--) { //diulang sebanyak string tapi dari belakang\n $r = $nominal[$x].$r; $c++; //menambah string kosong $r dengan index nominal dari belakang sambil menambah counter ($c)\n //jika counter kelipatan 3, maka saatnya ditambahkan dengan titik\n //misalnya 10000000, maka tiap perulangan 3x dari belakang akan ditambah titik, sehingga menjadi 10.000.000\n if ($c%3==0 & $x>0) $r = \".\".$r;\n }\n //mereturn hasil tadi, dengan tanda minusnya, tetapi jika tidak minus makan tidak akan mengganggu, karena variabel $min diisi string kosong di atas\n //return ditambahkan dengan ,00 dibelakang dan tanda Rp di depan sehingga berformat Rp ##.###,00\n return 'Rp '.$min.$r.',00';\n}", "public function getABdata($key) {\n $ans=\"\";\n #$table = \"{$this->getParms->dict}ab\";\n $table = $this->dal_ab->tabname;\n $result = $this->dal_ab->getgeneral($key,$table);\n $dbg=false;\n dbgprint($dbg,\"getABdata: length of result=\" . count($result) . \"\\n\");\n if (count($result) == 1) {\n list($key1,$data) = $result[0];\n if (preg_match('/<disp>(.*?)<\\/disp>/',$data,$matches)) {\n $ans = $matches[1];\n /* This taken from mw code; but is probably obsolete.\n It permitted <s>X</s> coding within the abbreviation expansion\n and conversion to the user's choice of 'filter'\n global $dispfilter;\n $temp = strtolower($dispfilter);\n $filterflag = (preg_match('/deva/',$temp) || preg_match('/roman/',$temp));\n if ($filterflag) {\n\t$ans = preg_replace('/<s>/','<SA>',$ans);\n\t$ans = preg_replace('/<\\/s>/','</SA>',$ans);\n }\n */\n }\n }\n return $ans;\n}", "public static function Parse837()\n\t{\n\n\t}", "function extract()\n {\n }", "function getxtrawidth($data, $label)\n{\n$show_label = true;\n\n// true = show percentage, false = don't show percentage.\n$show_percent = true;\n\n// true = show text, false = don't show text.\n$show_text = true;\n\n// true = show parts, false = don't show parts.\n$show_parts = true;\n\n$height = $width / 2;\n$data = explode('*', $data);\n$xtra_height = 0;\n$xtra_width = 0;\n\nif (!empty($label))\n\t$label = explode('*', strtr($label, array('&quot;' => '\"', '&amp;' => '&', '&#039;' => \"'\")));\nelse\n\t$label = array();\n\nif ($random_colors == true)\n{\n\t$colors = array();\n\twhile (count($colors) <= count($data))\n\t{\n\t\t$color = random_color();\n\t\tif (!in_array($color, $colors))\n\t\t\t$colors[] = $color;\n\t}\n}\n\nif (array_sum($data) == 0)\n\texit;\n\n$text_length = 0;\n$number = array();\n\nfor ($i = 0; $i < count($data); $i++) \n{\n\tif ($data[$i] / array_sum($data) < 0.1)\n\t\t$number[$i] = ' ' . number_format(($data[$i] / array_sum($data)) * 100, 1, ',', '.') . '%';\n\telse\n\t\t$number[$i] = number_format(($data[$i] / array_sum($data)) * 100, 1, ',', '.') . '%';\n\tif (!isset($label[$i]))\n\t\t$label[$i] = '';\n\tif (isset($label[$i]) && strlen($label[$i]) > $text_length)\n\t\t$text_length = strlen($label[$i]);\n}\n\nif (is_array($label))\n{\n\t$antal_label = count($label);\n\t$xtra = (5 + 15 * $antal_label) - ($height + ceil($shadow_height));\n\tif ($xtra > 0)\n\t\t$xtra_height = (5 + 15 * $antal_label) - ($height + ceil($shadow_height));\n\n\t$xtra_width = 5;\n\tif ($show_label)\n\t\t$xtra_width += 20;\n\tif ($show_percent)\n\t\t$xtra_width += 45;\n\tif ($show_text)\n\t\t$xtra_width += $text_length * 8;\n\tif ($show_parts)\n\t\t$xtra_width += 35;\n}\nreturn $xtra_width;\n}", "function generate() ;", "function valor_extenso($valor=0, $maiusculas=false)\n{\n if (strpos($valor,\",\") > 0)\n {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\",\"\",$valor);\n \n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\",\".\",$valor);\n }\n$singular = array(\"centavo\", \"real\", \"mil\", \"milhao\", \"bilhao\", \"trilhao\", \"quatrilhao\");\n$plural = array(\"centavos\", \"reais\", \"mil\", \"milhoes\", \"bilhoes\", \"trilhoes\",\n\"quatrilhões\");\n \n$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n$u = array(\"\", \"um\", \"dois\", \"tres\", \"quatro\", \"cinco\", \"seis\",\n\"sete\", \"oito\", \"nove\");\n \n $z=0;\n \n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n\t\t$cont=count($inteiro);\n\t\t for($i=0;$i<$cont;$i++)\n for($ii=strlen($inteiro[$i]);$ii<3;$ii++)\n $inteiro[$i] = \"0\".$inteiro[$i];\n \n $fim = $cont - ($inteiro[$cont-1] > 0 ? 1 : 2);\n for ($i=0;$i<$cont;$i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n \n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd &&\n$ru) ? \" e \" : \"\").$ru;\n $t = $cont-1-$i;\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\")$z++; elseif ($z > 0) $z--;\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n \n if(!$maiusculas)\n\t\t {\n return($rt ? $rt : \"zero\");\n } elseif($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n \n}", "function pos($array)\n{\n}", "function getPosition() ;", "private function j() {\n }", "function SprWymiar($macierz){\n\t\t\t$wymiar=1;\n\t\t\twhile(isset($macierz[$wymiar][1])){\n\t\t\t\t$wymiar++;\n\t\t\t}\n\t\t\treturn $wymiar-1; \n\t\t}", "function translate_fields($a,$pdo) {\n\tglobal $bsame,$bnew,$null,$no_first;\n\t$aid = $a['id'];\n\t// make new array 'b'\n\t$b = $bnew;\n\n\tforeach ($bsame as $v){\n\t\t$b[$v] = $a[$v];\n\t}\n\t$ostatus = $a['status']; #old status\n\n\t$b['title'] = stripslashes($a['title']) ?: 'Untitled';\n\t$b['caption'] = stripslashes($a['caption']);\n\tif ( $b['title'] == $b['caption']) {$b['caption'] = '';}\n\t$b['astatus'] = asset_tran($ostatus);\n\t//develop estatus during scan for errors and warnings.\n\t// at the end set astataus = estatus || original status\n\t// this preserves the old status settings.\n\t// status at the end.\n\n\t$b['sizekb'] = $a['sizekb'] ?: 0;\n\n\t$b['date_entered'] = $a['date_entered'] ?: date('Y-m-d');\n\t$b['contributor_id'] = $a['contributor_id'] ?: Defs::$editor_id;\n\n// first use in\n\n\t$afu = $a['first_use_in'];\n\tif (!empty($afu)){\n\t\t$afu = str_replace('/galleries/?','/galleries.php/?',$afu);\n\t\t$afu = str_replace('id=','',$afu);\n\t\t$b['first_use_in'] = $afu;\n\t}\n\n\n\t// try looking in asset fireld of article\n\tif (empty($b['first_use_in'])) {\n\t\t$sql = \"SELECT l.issue FROM news_items n\n\t\t\tLEFT JOIN publinks l ON l.article = n.id\n\n\t\t\tWHERE CONCAT (n.asset_id,' ', n.asset_list) LIKE '%$aid%'\n\t\t\tORDER BY n.id DESC LIMIT 1\";\n\n\t\tif ($issue = $pdo->query($sql)->fetchColumn() ) {\n//\t\t\techo \"Found first use aid $aid in issue $issue. \". BR;\n\n\t\t$sql = \"SELECT url FROM issues WHERE issue = $issue\";\n\t\t$url = $pdo->query($sql)->fetchColumn();\n//\t\techo \"url: $url\" . BR. BRNL;\n\t\t$b['first_use_in'] = $url;\n\n\t\t}\n\t}\n\n\nif (empty($b['first_use_in'])) {\n\t\t$no_first []=\"asset $aid: \" . $a['title'] . \" \" . $a['date_entered'] ;\n\t}\n\n\n\t// $fud = $a['first_use_date'];\n// \tif (empty($fud) || $fud == '0000-00-00') {\n// \t\t$fud = $null;\n// \t}\n// \t$b['first_use_date'] = $fud;\n\n\t$b['tags'] = '';\n\n\tforeach (str_split($a['tags']) as $tag){\n\t\tif (in_array($tag,array_keys(Defs::$asset_tags))) {\n\t\t\t$b['tags'] .= $tag;\n\t\t}\n\t}\n\n\n\n\t$thumburl = $a['url'];\n\tif ( empty($thumburl) || $thumburl == $a['link'] ) {\n\t\t$thumburl = ''; // blank for now. will gt written back to the b array.\n\t}\n\n\t$b['thumb_url'] = $thumburl;\n\n\n\t$src = $a['link'];\n\t\t$src = preg_replace('|^/reunions|','/assets/reunions',$src);\n\t\t$src = preg_replace('|^/newsp/SalesConf|','/assets/sales_conferences',$src);\n\t\t$src = preg_replace('|^/sales_conferences|','/assets/sales_conferences',$src);\n\t$b['asset_url'] = $src;\n\n\treturn $b;\n}", "function dividirPalabraEnLetras($palabra){\n \n /*>>> Completar para generar la estructura de datos b) indicada en el enunciado. \n recuerde que los string pueden ser recorridos como los arreglos. <<<*/\n \n}", "public function abono();", "protected function _findStartOffset() {}", "function getIsoformAnnotation($org_vid,$tx_list,$pred_id){\n $annotation=array();$region_start=0;$region_end=0; $txmap=array();$genes=array();$tx=\"\";\n while(list($index,$row)=each($tx_list)){\n $tx_id=$row[\"id\"];$name=$row[\"name\"];$prediction_id=$row[\"prediction_id\"];\n if(($prediction_id<3))continue;\n if(($pred_id<=0)&&($prediction_id==5))continue;//skip xenoref by default\n if(($pred_id<=0)&&($prediction_id>24&&$prediction_id<=40))continue;//skip cc founders by default\n $row[\"tx_start\"]+=1; if($pred_id>0){if($pred_id!=$prediction_id)continue;}\n $pred_name=getPredictionName($prediction_id);$tx_coord=getOverLapTranscripts($org_vid,$tx_id);\n $tx_coord[0][\"tStart\"]+=1;$gene_names=\"\"; $ex_starts=\"\"; $ex_ends=\"\";$ex_frames=\"\";\n $strand= $tx_coord[0][\"strand\"];$cds=getCDS($name,$tx_id,$org_vid,$prediction_id);\n $qh_getTxGene=getTxGene($tx_id,$prediction_id);\n while(list($index2,$gene)=each($qh_getTxGene)){ $gene_symbol=$gene[\"gene\"];\n if($gene_names == \"\"){$gene_names.=\"$gene_symbol\";}\n else{$gene_names.=\",$gene_symbol\";}\n }$ex_start=0;$ex_end=0;$qh_getTxExon=getTxExons($tx_id,$name,$prediction_id,$org_vid);\n while(list($index3,$value)=each($qh_getTxExon)){\n $ex_start=$value[\"ex_start\"]+1;$ex_end=$value[\"ex_end\"];$ex_frame=$value[\"ex_frame\"];\n if($ex_starts ==\"\"){$ex_starts=\"$ex_start\";$ex_ends=\"$ex_end\";$ex_frames=\"$ex_frame\";}\n else{$ex_starts.=\",$ex_start\";$ex_ends.=\",$ex_end\";$ex_frames.=\",$ex_frame\";}\n }\n if($pred_id>24&&$pred_id<=40)$ex_frames=\"\";\n $annotation[]=array(\"annotation\"=>array(\"source\"=>$pred_name,\"chrom\"=>$tx_coord[0][\"chrom\"],\n \"txStart\"=>$tx_coord[0][\"tStart\"],\"txEnd\"=>$tx_coord[0][\"tEnd\"],\n \"strand\"=>$strand,\"Name\"=>$name, \"Name2\"=>$gene_names,\n \"cdsStart\"=>$cds[\"start\"],\"cdsEnd\"=>$cds[\"end\"],\n \"exonStarts\"=>$ex_starts,\"exonEnds\"=>$ex_ends,\"exonFrames\"=>$ex_frames));\n }\n return $annotation;\n}", "function clone_name($id){\r\n \r\nswitch($id){\r\ncase 0:$str = '';break;\r\ncase 1:$str = 'pBC-SK+';break;\r\ncase 2:$str = 'pBluescript II KS+';break; \r\ncase 3:$str = 'pCEP4';break;\r\ncase 4:$str = 'pCMV-Myc';break;\r\ncase 5:$str = 'pCR2.1';break; \r\ncase 6:$str = 'pDsRed2-1';break; \r\ncase 7:$str = 'pEcoli-Cterm 6xHN';break;\r\ncase 8:$str = 'pET-11a';break;\r\ncase 9:$str = 'pET-11b';break;\r\ncase 10:$str = 'pET-11d';break;\r\ncase 11:$str = 'pET-12a';break;\r\ncase 12:$str = 'pET-14b';break;\r\ncase 13:$str = 'pET-15b';break;\r\ncase 14:$str = 'pET-16b';break; \r\ncase 15:$str = 'pET-17b';break;\r\ncase 16:$str = 'pET-20b(+)';break;\r\ncase 17:$str = 'pET-21a(+)';break;\r\ncase 18:$str = 'pET-21b(+)';break;\r\ncase 19:$str = 'pET-21d(+)';break;\r\ncase 20:$str = 'pET-22b(+)';break;\r\ncase 21:$str = 'pET-23a(+)';break;\r\ncase 22:$str = 'pET-23d(+)';break;\r\ncase 23:$str = 'pET-24a(+)';break;\r\ncase 24:$str = 'pET-24b(+)';break;\r\ncase 25:$str = 'pET-24c';break;\r\ncase 26:$str = 'pET-25b(+)';break;\r\ncase 27:$str = 'pET-26b+';break;\r\ncase 28:$str = 'pET-27b(+)';break;\r\ncase 29:$str = 'pET-28a(+)';break;\r\ncase 30:$str = 'pET-28b(+)';break;\r\ncase 31:$str = 'pET-29b+';break;\r\ncase 32:$str = 'pET-29a(+)';break;\r\ncase 33:$str = 'pET-3a';break; \r\ncase 34:$str = 'PET-30a(+)';break;\r\ncase 35:$str = 'pET-30b(+)';break;\r\ncase 36:$str = 'pET-32a(+)';break;\r\ncase 37:$str = 'pET-32b+';break;\r\ncase 38:$str = 'pET-39b';break;\r\ncase 39:$str = 'pET-3c';break;\r\ncase 40:$str = 'pET-3d';break;\r\ncase 41:$str = 'pET-41a(+)';break;\r\ncase 42:$str = 'pET-41b(+)';break;\r\ncase 43:$str = 'pET-43.1a(+)';break;\r\ncase 44:$str = 'pET-44b(+)';break;\r\ncase 45:$str = 'pET-45b+';break;\r\ncase 46:$str = 'pET-49b+';break;\r\ncase 47:$str = 'pET-52b';break;\r\ncase 48:$str = 'pET-9a';break; \r\ncase 49:$str = 'pET-9d';break;\r\ncase 50:$str = 'pPIC3.5K';break; \r\ncase 51:$str = 'pUC18';break;\r\ncase 52:$str = 'pUC19';break;\r\ncase 53:$str = 'pUC57';break;\r\ncase 54:$str = 'pDream 2.1';break;\r\ncase 55:$str = 'Other';break; \r\ndefault:$str = '';\r\n}\r\nreturn $str;\r\n\r\n}", "function specialop() {\n\n\n\t}", "function eblex_findhrefs2($page)\r\n{\r\n $using = false;\r\n $href = \"\";\r\n $hrefs[0] = \"\";\r\n $hrefcount = 0;\r\n\r\n for ($i = 0;$i < strlen($page)-1;$i++) {\r\n $a = $page[$i] . $page[$i + 1];\r\n ///\tModification\t30/06/2008\tmVicenik\tFoliovision\r\n //if ($a == \"<a\") {\r\n if ($a == \"<a\" || $a == \"<A\") {\r\n ///\tend of modification\r\n $using = true;\r\n }\r\n\t\tif ($page[$i] == \">\") {\r\n $using = false;\r\n if ($href != \"\") {\r\n $hrefs[$hrefcount] = $href . \">\";\r\n $hrefcount++;\r\n } \r\n $href = \"\";\r\n } \r\n\r\n if ($using == true) {\r\n $href .= $page[$i];\r\n } \r\n } \r\n\r\n return $hrefs;\r\n}", "function strposa( $haystack, $needles = array( ), $offset = 0 ) {\n$chr = array( );\nforeach ( $needles as $needle )\n {\n $res = strpos( $haystack, $needle, $offset );\n if ( $res !== false )\n return $needle;\n }\nreturn 'no';\n}", "function conversion($monto, $tasa, $moneda_transaccion, $moneda_proveedor)\n{\n\n if ($moneda_transaccion != $moneda_proveedor) {\n if ($moneda_proveedor == 'Dólares' && $moneda_transaccion == 'Bolívares') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Dólares' && $moneda_transaccion == 'Pesos') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Bolívares' && $moneda_transaccion == 'Dólares') {\n $monto_pago = $monto / $tasa;\n }\n\n if ($moneda_proveedor == 'Bolívares' && $moneda_transaccion == 'Pesos') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Pesos' && $moneda_transaccion == 'Bolívares') {\n $monto_pago = $monto / $tasa;\n }\n\n if ($moneda_proveedor == 'Pesos' && $moneda_transaccion == 'Dólares') {\n $monto_pago = $monto / $tasa;\n }\n } else {\n $monto_pago = $monto;\n }\n\n return $monto_pago;\n}", "function getPlayer($player) {\n $ret['team'] = substr($player, 0x0, 0x1);\n $ret['lv'] = substr($player, 0x1, 0x1);\n $ret['speed'] = substr($player, 0x2, 0x1);\n $ret['move'] = substr($player, 0x3, 0x1);\n $ret['exp'] = substr($player, 0x4, 0x2);\n $ret['sr'] = substr($player, 0x6, 0x1);\n $ret['ma'] = substr($player, 0x7, 0x1);\n $ret['vi'] = substr($player, 0x8, 0x1);\n $ret['ag'] = substr($player, 0x9, 0x1);\n $ret['hp'] = substr($player, 0xA, 0x2);\n $ret['mp'] = substr($player, 0xC, 0x2);\n $ret['cs1'] = substr($player, 0xE, 0x1);\n $ret['cs2'] = substr($player, 0xF, 0x1);\n $ret['cs3'] = substr($player, 0x10, 0x1);\n $ret['ps1'] = substr($player, 0x11, 0x1);\n $ret['ps2'] = substr($player, 0x12, 0x1);\n $ret['ps3'] = substr($player, 0x13, 0x1);\n $ret['ar'] = substr($player, 0x14, 0x1);\n $ret['unknown1'] = substr($player, 0x15, 0x1);\n $ret['skillType'] = substr($player, 0x16, 0x1);\n $ret['unknown2'] = substr($player, 0x17, 0x5);\n\n return $ret;\n}", "function aggiungiAllegato($pratica,$documento){\n \n}", "function translit($name)\r\n{\r\n $rus = array('а', 'б', 'в', 'г', 'д', 'е', 'ё', 'ж', 'з', 'и', 'й', 'к', 'л', 'м', 'н', 'о', 'п', 'р', 'с', 'т', 'у', 'ф', 'х', 'ц', 'ч', 'ш', 'щ', 'ъ', 'ы', 'ь', 'э', 'ю', 'я', ' ');\r\n $rusUp = array('А', 'Б', 'В', 'Г', 'Д', 'Е', 'Ё', 'Ж', 'З', 'И', 'Й', 'К', 'Л', 'М', 'Н', 'О', 'П', 'Р', 'С', 'Т', 'У', 'Ф', 'Х', 'Ц', 'Ч', 'Ш', 'Щ', 'Ъ', 'Ы', 'Ь', 'Э', 'Ю', 'Я', ' ');\r\n $lat = array('a', 'b', 'v', 'g', 'd', 'e', 'e', 'zh', 'z', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'f', 'h', 'c', 'ch', 'sh', 'sh', '', 'i', '', 'e', 'u', 'ya', '-');\r\n $characters = 'abcdefghijklmnopqrstuvwxyz1234567890-_';\r\n\r\n $res = str_replace($rus, $lat, trim($name));\r\n $res = str_replace($rusUp, $lat, $res);\r\n\r\n $return = '';\r\n\r\n for ($i = 0; $i < strlen($res); $i++) {\r\n $c = strtolower(substr($res, $i, 1));\r\n if (strpos($characters, $c) === false)\r\n $c = '';\r\n $return .= $c;\r\n }\r\n\r\n $r = $return;\r\n\r\n if (DEV)\r\n xlogc('translit', $r, $name);\r\n\r\n return $r;\r\n\r\n}", "function virustotalscan_get_size($size)\r\n{\r\n $standard = floatval(1024);\r\n if (floatval($size) < $standard) {\r\n // atunci sunt biti\r\n return $size.\" bytes\";\r\n }\r\n else {\r\n // sunt mai mult de 1024 de biti\r\n if (floatval(floatval($size)/1024) > $standard) {\r\n // atunci este de ordinul MB-itilor si se iau doar doua zecimale semnificative\r\n return number_format(floatval($size)/1024/1024, 2). \" MB\";\r\n }\r\n else {\r\n // este de ordinul KB-itilor si se iau doar doua zecimale semnificative\r\n return number_format(floatval($size)/1024, 2). \" KB\";\r\n }\r\n // restul nu ne intereseaza pentru ca nu pot fi incarcate fisiere mai mari de 1 GB\r\n }\t\r\n}", "function get_buffer_polygone_for_point_ql($lon,$lat,$d_metres){\n \n $points = array();\n for($i = 0; $i < 360; $i = $i + 10){\n $points[] = get_point_for_distance($lon,$lat,$d_metres / 1000,$i);\n }\n \n // print_r($points);\n \n $out = \"(poly: \\\"\";\n foreach($points as $p){\n $point = array_reverse($p);\n $out .= implode(' ', $point);\n $out .= ' ';\n }\n \n $out .= \"\\\")\";\n return $out;\n}", "function getGroup() ;", "abstract protected function encodingTablesOrder();", "function findexts($filename) {\n\t$filename=strtolower($filename);\n\t$exts=split(\"[/\\\\.]\", $filename);\n\t$n=count($exts)-1;\n\t$exts=$exts[$n];\n\t\n\t$file_ext = $exts;\n\t$file_ext_value = \"image.png\";\n\t\n\tif($file_ext==\"png\" || $file_ext==\"jpg\" || $file_ext==\"jpeg\" || $file_ext==\"bmp\" || $file_ext==\"tif\" || $file_ext==\"gif\")\n\t{ $file_ext_value = \"image.png\"; }\n\n\tif($file_ext==\"doc\" || $file_ext==\"docx\" || $file_ext==\"txt\")\n\t{ $file_ext_value = \"word.png\"; }\n\n\tif($file_ext==\"pdf\")\n\t{ $file_ext_value = \"pdf.png\"; }\n\n\tif($file_ext==\"ppt\" || $file_ext==\"pptx\")\n\t{ $file_ext_value = \"ppt.png\"; }\n\n\tif($file_ext==\"xls\" || $file_ext==\"xlsx\")\n\t{ $file_ext_value = \"excell.png\"; }\n\n\tif($file_ext==\"mov\" || $file_ext==\"mp4\" || $file_ext==\"3gp\" || $file_ext==\"wmv\" || $file_ext==\"flv\" || $file_ext==\"avi\")\n\t{ $file_ext_value = \"video.png\"; }\n\n\tif($file_ext==\"mp3\" || $file_ext==\"wav\" || $file_ext==\"wma\")\n\t{ $file_ext_value = \"voice.png\"; }\n\n\treturn $file_ext_value;\n}", "function yy_r66(){ $this->_retvalue = str_replace(array('.\"\".','\"\".','.\"\"'),array('.','',''),'\"'.$this->yystack[$this->yyidx + -1]->minor.'\"'); }", "public function nadar()\n {\n }", "function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}", "abstract protected function external();", "function processName($name) {\n//\tUncomment the next two lines and change only ISO-8859-9 to your site encoding type\n\n//\t$name = iconv(\"UTF-8\", \"ISO-8859-1\", $name);\n//\t$name = iconv(\"ISO-8859-9\", \"UTF-8\", $name);\n\n\treturn $name;\n}", "function get_pmin_theo($t100,$v100,$v0) {\r\n\tglobal $mw,$mw_zu,$F_haft,$evmail;\r\n\t# Wieviel Leistung noetig für Beschleunigung 0-100km/h in x Sekunden?\r\n\t# Ausgangsbasis: Annahme nur Haftgrenze:\r\n\t$Pmin=$F_haft*$v100/1000; \t\t\t\t\t # 0-100km/h\r\n\t# 1.Bereich: Konstante Reifenkraftschlussgrenze\r\n\t#\t\tv=a*t ergibt: t=vx*mw/F_haft\r\n\t$vx=$Pmin*1000/$F_haft; # Schnittpunkt von F_haft mit plot_data_hyp - vx in m/s\r\n\t$tx=($vx-$v0)*($mw+$mw_zu)/$F_haft;\t\t\t\t# 0-100km/h\r\n\tif ($tx > $t100) { ### Fall 2 ### \r\n\t\t$error= \"ERROR: Traction not enough for \".$v0*3.6.\"-\".$v100*3.6.\"km/h in $t100\".\"s! Even with drag NOT taken into account.Increase traction by coeff. or axleload, minimize weight or change to AWD.\"; \r\n\t return $error;\r\n\t} else {\t### Fall 3 ### \r\n\t if ($v0 == 0) {$Pmin=ceil($Pmin*$tx/$t100);} # Anpassen von Pmin anhand von Verhaeltnis t100 zu tx, nicht bei 80-120km/h\r\n\t $n=1; $switch=false; $a=$Pmin/20; $b=$Pmin/100; $c=0.5; $d=0.01; # Genauigkeit d # Anfangswerte fuer while-Schleife - $Pmin in kW\r\n\t\twhile (abs($t100-$tx)>$d) {\r\n\t\t\t# Veraenderlicher Teil $Pmin \r\n\t\t\t# -->\r\n\t\t\tif ($t100 > $tx and $switch==false) { # $switch als check zum Schleifen sparen\r\n\t\t\t \t$Pmin=$Pmin-$a; \r\n\t\t\t} elseif ($t100 > $tx and $switch==true) {\r\n\t\t\t \t$Pmin=$Pmin-$c; \r\n\t\t\t} else {$Pmin=$Pmin+$b; $switch=true;}\t\r\n\t\t\t# <-- ENDE Veraenderlicher Teil\t\r\n\t\t\t# Erzeugen des Arrays fuer function getacctimebyforce () // tbd kuerzer mit $plot_data_hyp, weil Abschneiden aller Werte groeßer als F_haft in der Funktion\r\n\t\t\t# -->\t\r\n\t\t\t$plot_data_max = array(); //empty previous array first\r\n\t\t\t$vx=$Pmin*1000/$F_haft; # Schnittpunkt von F_haft mit plot_data_hyp - vx in m/s\r\n\t\t\tfor ($v = 0; $v <= 300 && $v < $vx*3.6; $v += 10) { # $v in km/h\r\n\t\t\t $plot_data_max[] = array('',$v,$F_haft);\r\n\t\t\t}\r\n\t\t\tif ($vx*3.6!=ceil($vx*3.6/10)*10) {\r\n\t\t\t\t$plot_data_max[] = array('',$vx*3.6,$F_haft); # Einfuegen des Schnittpunkts \r\n\t\t\t\t}\r\n\t\t\tfor ($v = ceil($vx*3.6/10)*10; $v <= 300; $v += 10) { # $v in km/h\r\n\t\t\t\t$Fmax=round($Pmin*1000/($v/3.6),1); # $v in m/s\r\n\t\t\t $plot_data_max[] = array('',$v,$Fmax);\r\n\t\t\t}\r\n\t\t\t# <-- ENDE Erzeugen des Arrays\r\n\t if ($v0 != 0) { // tbd static if? or switch-case? for not calling if in every loop\r\n\t\t\t $tx= round(getacctimebyforce($plot_data_max,$v100)-getacctimebyforce($plot_data_max,$v0),3); \r\n\t\t\t} else {\r\n\t\t\t \t$tx= round(getacctimebyforce($plot_data_max,$v100),3);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// echo \"$n: $t100, $tx , $vx , $Pmin <br>\";\t// for checking while loop\t\r\n\t\t\t\r\n\t\t\t//////////////// Troubleshooting: --> ////////////////\r\n\t\t\tif ($Pmin >= ($F_haft*$v100/1000)+1) { # falls Traktion inkl. Fahrtwiderstaende nicht ausreicht\r\n\t\t\t\t$error= \"ERROR: Traction not enough for \".$v0*3.6.\"-\".$v100*3.6.\"km/h in $t100\".\"s! Drag taken into account. Increase traction by coeff. or axleload, minimize weight or change to AWD.\";\r\n\t\t\t \treturn $error;\r\n\t\t\t}\t\r\n\t\t\t$n++; // for counting while loops \t\t\t\r\n\t\t\tif ($n > 40) { $c=0.1;};\r\n\t\t\tif ($n > 80) { $d=0.05;};\r\n\t\t\tif ($n > 200) { //tbd 3.8 @ average throws this ERROR\r\n\t\t\t\t$error= \"ERROR: Minimum Power required \".$v0*3.6.\"-\".$v100*3.6.\"km/h in $t100\".\"s could not be calculated. Please contact EV Wizard via email: $evmail.\"; \r\n\t\t\t return $error;} \r\n\t\t\t//////////////// <-- Troubleshooting ////////////////\r\n\t\t}; // <-- END while\r\n\t\tif (isset($Pmin) && is_float($Pmin)) { \r\n\t\t\t$Pmin100=ceil($Pmin);\r\n\t\t\treturn $Pmin100;\r\n\t\t} else {\r\n\t\t\t $error= \"ERROR: Have you just found a bug??? O_o Please tell us about it via email: $evmail.\"; \r\n\t\t\t return $error;\r\n\t\t}\t\t \t\r\n};}", "function processData() ;", "public function getBobotNilai();", "function filter_ige_past1($ige,$h1) {\r\n $sug = ('(b|c|d|f|g|h|k|m|p|t|v)');\r\n $sugl = ('(b|c|d|f|g|h|j|k|l|m|n|p|r|t|v)');\r\n if (substr($ige, -2) === 'ik') {\r\n $ige = str_replace('ik','',$ige);\r\n }\r\n $ige1 = $ige . 't';\r\n if (substr($ige,-3) == 'ít') {\r\n $ige1 = $ige . $h1 . 'tt';\r\n }\r\n if ((preg_match($sugl, substr($ige,-2,1))) && (preg_match($sug, substr($ige,-2,2)))) {\r\n $ige1 = $ige . $h1 . 'tt';\r\n }\r\n if (preg_match('(vesz|visz|tesz|hisz)',$ige)) {\r\n $ige1 = str_replace('sz','tt',$ige);\r\n }\r\n if ($ige === 'esz') {\r\n $ige1 = 'ett';\r\n }\r\n if (((strlen($ige) === (3)) | (strlen($ige) === (4))) \r\n & (substr($ige,-1) === 't')) {\r\n $ige1 = $ige . $h1 . 'tt'; \r\n }\r\n return $ige1;\r\n }", "function charrestore_deleted_when($date)\n{\n// http://www.dreamincode.net/code/snippet86.htm\n\n\t // array of time period chunks\n\t $chunks = array(\n\t\t array(60 * 60 * 24 * 365, 'year'),\n\t\t array(60 * 60 * 24 * 30, 'month'),\n\t\t array(60 * 60 * 24 * 7, 'week'),\n\t\t array(60 * 60 * 24, 'day'),\n\t\t array(60 * 60, 'hour'),\n\t\t array(60, 'minute'),\n\t );\n\t \n\t $today = time();\n\t $since = $today - $date;\n\t \n\t // $j saves performing the count function each time around the loop\n\t for( $i=0, $j=count($chunks); $i<$j; $i++ )\n\t {\n\t\t \n\t\t $seconds = $chunks[$i][0];\n\t\t $name = $chunks[$i][1];\n\t\t \n\t\t // finding the biggest chunk (if the chunk fits, break)\n\t\t if( ($count = floor($since / $seconds)) != 0 )\n\t\t {\n\t\t\t\tbreak;\n\t\t }\n\t }\n\t \n\t $print = ($count == 1) ? '1 '.$name : \"$count {$name}s\";\n\t \n\t if( $i + 1 < $j )\n\t {\n\t\t // now getting the second item\n\t\t $seconds2 = $chunks[$i + 1][0];\n\t\t $name2 = $chunks[$i + 1][1];\n\t\t \n\t\t // add second item if it's greater than 0\n\t\t if( ($count2 = floor(($since - ($seconds * $count)) / $seconds2)) != 0 )\n\t\t {\n\t\t\t\t$print .= ($count2 == 1) ? ', 1 '.$name2 : \", $count2 {$name2}s\";\n\t\t }\n\t }\n\t return $print;\n}", "abstract protected function mini(): string;", "function get_zone_name3($map_id,$player_x,$player_y){\n global $zone_0,$zone_1,$zone_530;\n switch ($map_id) {\n\tcase 0:\n\tfor ($i=0; $i < count($zone_0); $i++)\n\t\tif (($zone_0[$i][2] < $player_x) && ($zone_0[$i][3] > $player_x) && ($zone_0[$i][1] < $player_y) && ($zone_0[$i][0] > $player_y)) return ($zone_0[$i][4]);\n\tbreak;\n\tcase 1:\n\tfor ($i=0; $i < count($zone_1); $i++)\n\t\tif (($zone_1[$i][2] < $player_x) && ($zone_1[$i][3] > $player_x) && ($zone_1[$i][1] < $player_y) && ($zone_1[$i][0] > $player_y)) return ($zone_1[$i][4]);\n\tbreak;\n\tcase 530:\n\tfor ($i=0; $i < count($zone_530); $i++)\n\t\tif (($zone_530[$i][2] < $player_x) && ($zone_530[$i][3] > $player_x) && ($zone_530[$i][1] < $player_y) && ($zone_530[$i][0] > $player_y)) return ($zone_530[$i][4]);\n\tbreak;\n\n\tdefault:\n\treturn(\" \");\n\t}\n}", "function kdw_row_tiles_txt (){ \r\n \r\n}", "function fecha_normal($fecha){\n // toma los primeros 4 números separados por un guion, deben ser entre 2 y 4\n // después busca el siguiente par de números separados por un guion, pueden ser 1 o 2\n // por ultimo toma el ultimo par de números, pueden ser 1 o 2\n //ereg( \"([0-9]{2,4})-([0-9]{1,2})-([0-9]{1,2})\", $fecha, $mifecha);\n ereg( \"([0-9]{4})-([0-9]{2})-([0-9]{2})\", $fecha, $mifecha);\n $lafecha=$mifecha[3].\"/\".$mifecha[2].\"/\".$mifecha[1];\n return $lafecha;\n}", "abstract protected function determineRootline() ;", "abstract protected function doActualConvert();", "public function masodik()\n {\n }", "function getOriginal()\n {\n }", "function cmp($a,$b) {\r\rif($a > $b){\r $x=put_string($a,\">\",$b,\"\\n\");\r}\rif ($a >= $b ) {\r $x=put_string($a,\">=\",$b,\"\\n\");\r}\rif ($a === $b ) {\r $x=put_string($a,\"===\",$b,\"\\n\");\r}\rif ($b < $a ) {\r $x=put_string($b,\"<\",$a,\"\\n\");\r}\rif ($b <= $a ) {\r $x=put_string($b,\"<=\",$a,\"\\n\");\r}\rif ($b === $a ) {\r $x=put_string($b,\"===\",$a,\"\\n\");\r}\rif ($a > $a ) {\r $x=put_string($a,\">\",$a,\"\\n\");\r}\rif ($a < $a ) {\r $x=put_string($a,\"<\",$a,\"\\n\");\r}\rif ($a !== $a ) {\r $x=put_string($a,\"!==\",$a,\"\\n\");\r}\rif ($b > $b ) {\r $x=put_string($b,\">\",$b,\"\\n\");\r}\rif ($b < $b ) {\r $x=put_string($b,\"<\",$b,\"\\n\");\r}\rif ($b !== $b ) {\r $x=put_string($b,\"!==\",$b,\"\\n\");\r}\r\r}", "function beratbadanormal($tb){\n\t$bbn = $tb - 100;\n\treturn $bbn;\n}", "function packet2($packet, $currentPacket)\n{\n\tif ($packet >= $currentPacket) return \"initial\";\n\treturn \"none\";\n}", "function promedio_general($vector){ \n $promedio=0;\n foreach ($vector as $key => $value) {\n foreach ($value as $c => $n) {\n $promedio=$promedio+$n;\n }\n }\n return ($promedio/10);\n }", "function triggerUAF(&$r, $newAddr) {\n exif_read_data($r); // trigger an early-free on $r's value by providing an invalid handle (from line 24)\n\n/*\nThis is where the early-free happens: \nsnippet from: ext/exif/exif.c\n------------------------------------------------------------\n// 4310 static int exif_read_from_impl(image_info_type *ImageInfo, php_stream *stream, int read_thumbnail, int read_all)\n// 4311 {\n// .... more code .....\n// 4325 if ((st.st_mode & S_IFMT) != S_IFREG) {\n// 4326 exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, \"Not a file\");\n// 4327 php_stream_close(ImageInfo->infile); // <----- this is where the memory pointed by $r is free'd\n// 4328 return FALSE;\n// 4329 }\n------------------------------------------------------------\n\n\nAt this point, $r->value->res points to a free'd memory chunk(or, in UAF terms: it's a \"dangling pointer\")\nThe next thing we will do is to \"catch\" this free memory chunk with a \ndifferent/new allocation:\n*/\n $s = str_repeat($newAddr, 1); // allocating a new zend_string on the heap, this will\n // make the address of $s to be the same as where $r points to\n // Q: \"Why did you choose zend_string?\" \n // A: Because we're trying to implement a first-fit technique and \n // those structures have a very similar size, hence, they will land\n // on the same bin:\n // gdb-peda$ call sizeof(zend_resource)\n // 20\n // gdb-peda$ call sizeof(zend_string)\n // 20\n\n\n/*\nBecause those two structures have a similar layout in memory, and the \"ptr\" property(from zend_resource)\nshare the same offset as \"val\" property (from zend_string) containing our malicious string, it means that\nthe string inside $s lands exactly on the \"ptr\" property! \n\nThis is how the two variables look like now (internally):\n\ngdb-peda$ print (zend_string)*0xb5a01408 \n$4 = {\n gc = {\n refcount = 1, \n u = {\n v = {\n type = 6 '\\006', \n flags = 0 '\\000',\n gc_info = 0\n },\n type_info = 6\n }\n },\n h = 0,\n len = 3, \n val = \"AAA\" <---- our allocated string\n}\n```\n\nAnd this is how PHP sees ``$r``:\n```\ngdb-peda$ print (zend_resource)*0xb5a01408 <---- same address, different struct representation\n$5 = {\n gc = {\n refcount = 1,\n u = {\n v = {\n type = 6 '\\006',\n flags = 0 '\\000',\n gc_info = 0\n },\n type_info = 6\n }\n },\n handle = 0,\n type = 3,\n ptr = 0x414141 <------ what??\n}\n\n*/\n}", "function yy_r97(){ \n $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor; $this->yystack[$this->yyidx + -3]->minor->values($this->yystack[$this->yyidx + -1]->minor); \n if ($this->yystack[$this->yyidx + 0]->minor) $this->_retvalue->onDuplicate($this->yystack[$this->yyidx + 0]->minor);\n }", "public function position($array) {\n $k=0;\n $array2=array();\n foreach($array as $key=>$value){\n foreach($value as $key1=>$value1){\n foreach($value1 as $key2=>$value2){\n $array2[$k]=$value2;\n $k=$k+1;\n }\n } \n } \n $count=count($array2);\n for($n=1;$n<$count-4;$n=$n+2) {\n if($array2[$n]=='F') {\n if($array2[$n+2]=='F') {\n if($array2[$n+4]=='F') {\n if(($n+4)==($count-1)) {\n $temp_name=$array2[0];\n $temp_gender=$array2[1];\n $array2[0]=$array2[$n+1];\n $array2[1]=$array2[$n+2];\n $array2[$n+1]=$temp_name;\n $array2[$n+2]=$temp_gender;\n }\n else {\n $temp_name=$array2[$count1-1];\n $temp_gender=$array2[$count1];\n $array2[$count1-1]=$array2[$n+1];\n $array2[$count1]=$array2[$n+2];\n $array2[$n+1]=$temp_name;\n $array2[$n+2]=$temp_gender;\n }\n }\n else {\n if(($n+2)==($count-2)) {\n $temp_name=$array2[$n+1];\n $temp_gender=$array2[$n+2]; \n $array2[$n+1]=$array2[$count-2];\n $array2[$n+2]=$array2[$count-1];\n $array2[$count-2]=$temp_name;\n $array2[$count-1]=$temp_gender;\n }\n else {\n if($array[$n+6]=='F') {\n $temp_name=$array2[$n+7];\n $temp_gender=$array2[$n+8];\n $array[$n+7]=$array[$count-2];\n $array[$n+8]=$array[$count-1];\n }\n }\n }\n }\n }\n }//printing the details in tabular format\n echo \"<table border=2px>\";\n for($k=0;$k<$count;$k++) {\n if($k%2==0 || $k==0){\n echo \"<td>\" . $array2[$k] . \"</td>\";\n }\n }\n echo \"</table>\";\n}", "public function testPreprocessingUnrotate()\n {\n }", "abstract protected function _process();", "abstract protected function _process();", "function extension_id2char($a_extensionid)\n\t{\n\t\tswitch($a_extensionid) \n\t\t{\n \t\t\tcase 2063 : return('bik');\n\t\t\t\t\t\t break;\n \t\tcase 2061 : return('ssf');\n\t\t\t\t\t\t break;\n \t\tcase 2060\t: return('utw');\n\t\t\t\t\t\t break;\n \t\tcase 2059\t: return('4pc');\n\t\t\t\t\t\t break;\n \t\tcase 2056\t: return('jrl');\n\t\t\t\t\t\t break;\n \t\tcase 2055\t: return('utg');\n\t\t\t\t\t\t break;\n \t\tcase 2054\t: return('btg');\n\t\t\t\t\t\t break;\n \t\tcase 2053\t: return('pwk');\n\t\t\t\t\t\t break;\n \t\tcase 2052\t: return('dwk');\n\t\t\t\t\t\t break;\n \t\tcase 2051\t: return('utm');\n\t\t\t\t\t\t break;\n \t\tcase 2050\t: return('btm');\n\t\t\t\t\t\t break;\n \t\tcase 2049\t: return('ccs');\n\t\t\t\t\t\t break;\n \t\tcase 2048\t: return('css');\n\t\t\t\t\t\t break;\n \t\tcase 2047\t: return('gui');\n\t\t\t\t\t\t break;\n \t\tcase 2046\t: return('gic');\n\t\t\t\t\t\t break;\n \t\tcase 2045\t: return('dft');\n\t\t\t\t\t\t break;\n \t\tcase 2044\t: return('utp');\n\t\t\t\t\t\t break;\n \t\tcase 2043\t: return('btp');\n\t\t\t\t\t\t break;\n \t\tcase 2042\t: return('utd');\n\t\t\t\t\t\t break;\n \t\tcase 2041\t: return('btd');\n\t\t\t\t\t\t break;\n \t\tcase 2040\t: return('ute');\n\t\t\t\t\t\t break;\n \t\tcase 2039\t: return('bte');\n\t\t\t\t\t\t break;\n \t\tcase 2038\t: return('fac');\n\t\t\t\t\t\t break;\n \t\tcase 2037\t: return('gff');\n\t\t\t\t\t\t break;\n \t\tcase 2036\t: return('ltr');\n\t\t\t\t\t\t break;\n \t\tcase 2035\t: return('uts');\n\t\t\t\t\t\t break;\n \t\tcase 2034\t: return('bts');\n\t\t\t\t\t\t break;\n \t\tcase 2033\t: return('dds');\n\t\t\t\t\t\t break;\n \t\tcase 2030\t: return('itp');\n\t\t\t\t\t\t break;\n \t\tcase 2029\t: return('dlg');\n\t\t\t\t\t\t break;\n \t\tcase 2023\t: return('git');\n\t\t\t\t\t\t break;\n \t\tcase 2032\t: return('utt');\n\t\t\t\t\t\t break;\n \t\tcase 2031\t: return('btt');\n\t\t\t\t\t\t break;\n \t\tcase 2027\t: return('utc');\n\t\t\t\t\t\t break;\n \t\tcase 2026\t: return('btc');\n\t\t\t\t\t\t break;\n \t\tcase 2025\t: return('uti');\n\t\t\t\t\t\t break;\n \t\tcase 2024\t: return('bti');\n\t\t\t\t\t\t break;\n \t\tcase 9\t : return('mpg');\n\t\t\t\t\t\t break;\n \t\tcase 2018\t: return('tlk');\n\t\t\t\t\t\t break;\n \t\tcase 2017\t: return('2da');\n\t\t\t\t\t\t break;\n \t\tcase 2005\t: return('fnt');\n\t\t\t\t\t\t break;\n \t\tcase 6\t : return('plt');\n\t\t\t\t\t\t break;\n \t\tcase 2016\t: return('wok');\n\t\t\t\t\t\t break;\n \t\tcase 2015\t: return('bic');\n\t\t\t\t\t\t break;\n \t\tcase 2014\t: return('ifo');\n\t\t\t\t\t\t break;\n \t\tcase 2013\t: return('set');\n\t\t\t\t\t\t break;\n \t\tcase 2012\t: return('are');\n\t\t\t\t\t\t break;\n \t\tcase 2010\t: return('ncs');\n\t\t\t\t\t\t break;\n \t\tcase 2009\t: return('nss');\n\t\t\t\t\t\t break;\n \t\tcase 2008\t: return('slt');\n\t\t\t\t\t\t break;\n \t\tcase 2003\t: return('thg');\n\t\t\t\t\t\t break;\n \t\tcase 2007\t: return('lua');\n\t\t\t\t\t\t break;\n \t\tcase 2002\t: return('mdl');\n\t\t\t\t\t\t break;\n \t\tcase 2001\t: return('tex');\n\t\t\t\t\t\t break;\n \t\tcase 2000\t: return('plh');\n\t\t\t\t\t\t break;\n \t\tcase 9998\t: return('bif');\n\t\t\t\t\t\t break;\n \t\tcase 9999\t: return('key');\n\t\t\t\t\t\t break;\n \t\tcase 2022\t: return('txi');\n\t\t\t\t\t\t break;\n \t\tcase 10\t\t: return('txt');\n\t\t\t\t\t\t break;\n \t\tcase 7\t : return('ini');\n\t\t\t\t\t\t break;\n \t\tcase 4\t : return('wav');\n\t\t\t\t\t\t break;\n \t\tcase 3\t : return('tga');\n\t\t\t\t\t\t break;\n \t\tcase 2\t : return('mve');\n\t\t\t\t\t\t break;\n \t\tcase 1\t : return('bmp');\n\t\t\t\t\t\t break;\n \t\tcase 0\t : return('res');\t\t\n\t\t\t\t\t\t break;\n\t\t\tdefault\t\t: return(-1);\n\t\t} /* end switch id */\n\t}" ]
[ "0.5215934", "0.512594", "0.49698907", "0.4949877", "0.49336666", "0.49186254", "0.48830867", "0.48069122", "0.4797302", "0.47912633", "0.47131094", "0.4712373", "0.47086146", "0.46795088", "0.46792483", "0.46632043", "0.46496624", "0.46468702", "0.46265337", "0.46263206", "0.46251544", "0.4598362", "0.45894316", "0.45849425", "0.4581636", "0.4581636", "0.45803666", "0.4569765", "0.45663714", "0.45627245", "0.45578024", "0.45557338", "0.45450535", "0.45432416", "0.45273367", "0.45271552", "0.45268345", "0.45121935", "0.45115104", "0.4508971", "0.45068565", "0.44984832", "0.44914126", "0.4487882", "0.44855875", "0.44724062", "0.44686797", "0.44672394", "0.4464766", "0.44523704", "0.4452329", "0.44516623", "0.44512153", "0.44453442", "0.444304", "0.44398007", "0.44378853", "0.4435033", "0.44341442", "0.4433562", "0.44213873", "0.4412455", "0.4409005", "0.4408538", "0.44066757", "0.4404811", "0.4400173", "0.4398232", "0.43947124", "0.43933773", "0.43907544", "0.43905264", "0.43851662", "0.43825606", "0.4377334", "0.43711904", "0.43696746", "0.43667662", "0.4364748", "0.4363751", "0.4362379", "0.43607667", "0.4358978", "0.43584245", "0.43582827", "0.43558338", "0.43502527", "0.43486404", "0.434428", "0.43428588", "0.43387672", "0.43380252", "0.4337325", "0.43315396", "0.4328267", "0.4328109", "0.43266997", "0.4322617", "0.43218738", "0.43218738", "0.43208876" ]
0.0
-1
Display a listing of the resource.
public function index() { $dosens = dosens::all(); return view('dosen.index', compact('dosens')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET 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 //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('dosen.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'nama'=>'required|max:255', 'nipd'=>'required|unique:dosens|max:255' ]); $dosens = new dosens; $dosens->nama = $request->nama; $dosens->nipd = $request->nipd; $dosens->save(); return redirect()->route('dosens.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "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 }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $dosens = dosens::findOrFail($id); return view('dosen.show', compact('dosens')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "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}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $dosens = dosens::findOrFail($id); return view('dosen.edit', compact('dosens')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1