query
stringlengths
10
8.11k
document
stringlengths
17
398k
negatives
listlengths
19
20
metadata
dict
Cretes new PathFinder_Location object and specifies it's contents. You can subsequentially add more contents by calling: :php:meth:`PathFinder_Location::defineContents`.
public function addLocation($contents = array(), $old_contents = null) { if ($old_contents && @$this->app->compat_42) { return $this->base_location->addRelativeLocation($contents, $old_contents); } /** @type PathFinder_Location $loc */ $loc = $this->add('PathFinder_Location'); return $loc->defineContents($contents); }
[ "public function getContentLocation();", "public function newLocation()\n\t{\n\t\t$this->location = new Location;\n\t}", "function createLocation() {\r\n if( empty( $this->location )) return FALSE;\r\n if( empty( $this->location['value'] ))\r\n return ( $this->getConfig( 'allowEmpty' )) ? $this->_createElement( 'LOCATION' ) : FALSE;\r\n $attributes = $this->_createParams( $this->location['params'], array( 'ALTREP', 'LANGUAGE' ));\r\n $content = iCalUtilityFunctions::_strrep( $this->location['value'], $this->format, $this->nl );\r\n return $this->_createElement( 'LOCATION', $attributes, $content );\r\n }", "function createLocation() {\n if (empty($this->location))\n return FALSE;\n if (empty($this->location['value']))\n return ( $this->getConfig('allowEmpty')) ? $this->_createElement('LOCATION') : FALSE;\n $attributes = $this->_createParams($this->location['params'], array('ALTREP', 'LANGUAGE'));\n $content = ICalUtilityFunctions::_strrep($this->location['value'], $this->format, $this->nl);\n return $this->_createElement('LOCATION', $attributes, $content);\n }", "public function setContentLocation($contentLocation)\n {\n $this->contentLocation = $contentLocation;\n return $this;\n }", "public function setLocation($var)\n {\n GPBUtil::checkString($var, True);\n $this->location = $var;\n\n return $this;\n }", "public function addPart(string $location, string $content, ?int $seek = null): void;", "public function addLocationElements()\n {\n $hat = $this->options['auth']->getIdentity()->hat;\n /** @var \\InterpretersOffice\\Entity\\Repository\\LocationRepository $repo*/\n $repo = $this->objectManager->getRepository(Entity\\Location::class);\n\n $options = $repo->getLocationOptionsForHat($hat);\n array_unshift($options, ['label' => ' ','value' => '']);\n $this->add(\n [\n 'type' => 'Laminas\\Form\\Element\\Select',\n 'name' => 'location',\n 'options' => [\n 'label' => 'location',\n 'value_options' => $options,\n ],\n 'attributes' => ['class' => 'custom-select text-muted', 'id' => 'location'],\n ]\n );\n $this->add([\n 'type' => 'textarea',\n 'name' => 'comments',\n 'attributes' => ['id' => 'comments', 'class' => 'form-control',\n 'placeholder' => 'any noteworthy details or special instructions'\n ]\n ]);\n\n return $this;\n }", "public function testCreateLocation()\n {\n\n }", "public function addLocation(Recipe $r, Location $l);", "public function __construct($pathname) {\r\n if ($pathname) {\r\n if (!is_string($pathname)) {\r\n $msg = 'FileContents: pathname must be string, not '.gettype($pathname).'.';\r\n throw new InvalidArgumentException($msg);\r\n } else if (trim($pathname) === '') {\r\n $msg = 'FileContents: pathname is a blank string.';\r\n throw new InvalidArgumentException($msg);\r\n } else if (strpbrk($pathname, '*?') !== FALSE) {\r\n $msg = \"FileContents: pathname is a glob.\";\r\n throw new InvalidArgumentException($msg);\r\n }\r\n if (is_dir($pathname)) {\r\n $msg = \"FileContents: pathname is a directory, not a file: $pathname\";\r\n throw new UnexpectedValueException($msg);\r\n }\r\n $this->pathname = realpath($pathname);\r\n if (is_file($this->pathname)) {\r\n $this->contents = file_get_contents($pathname);\r\n } else if(!file_exists($this->pathname)) { //11/7/16\r\n echo \"\\nFileContents: File does not exist: $pathname\\n\";\r\n } else {\r\n echo \"\\nFileContents: Not a file: $pathname\\n\";\r\n }\r\n } else {\r\n $msg= \"In FileContents constructor bad pathname: ($pathname)\\n\";\r\n //throw new InvalidArgumentException($msg);\r\n }\r\n }", "public function createFileOfLocation()\n {\n $entityClass = 'MU\\\\YourCityModule\\\\Entity\\\\FileOfLocationEntity';\n\n $entity = new $entityClass();\n\n $this->entityInitialiser->initFileOfLocation($entity);\n\n return $entity;\n }", "public function addLocation($location);", "public abstract function copy($location);", "function addLocation($uri) {}", "function setLocation($value) {\n return $this->setFieldValue('location', $value);\n }", "public function addLocation(string $location);", "public function loadLocation( $locationId )\n {\n \n #$spiLocation = $this->persistenceHandler->locationHandler()->load( $locationId );\n #$location = $this->domainMapper->buildLocationDomainObject( $spiLocation );\n #if ( !$this->repository->canUser( 'content', 'read', $location->getContentInfo(), $location ) )\n # throw new UnauthorizedException( 'content', 'read' );\n\n $contentInfo = new ContentInfo(\n array(\n 'id' => 57,\n 'name' => 'My Solr Home',\n 'sectionId' => 1,\n 'mainLocationId' => 1,\n 'contentTypeId' => 23,\n 'alwaysAvailable' => 1,\n 'currentVersionNo' => 1,\n 'published' => true,\n 'ownerId' => 14,\n 'modificationDate' => new \\DateTime(),\n 'publishedDate' => new \\DateTime(),\n 'mainLanguageCode' => \"ger-DE\",\n 'mainLocationId' => 2,\n )\n );\n $newlocation = new Location(\n array(\n 'contentInfo' => $contentInfo,\n 'id' => 2,\n 'priority' => 0,\n 'hidden' => false,\n 'invisible' => false,\n 'remoteId' => \"f3e90596361e31d496d4026eb624c983\",\n 'parentLocationId' => 57,\n 'pathString' => \"/1/2/\",\n 'depth' => 1,\n 'sortField' => 8,\n 'sortOrder' => 1,\n )\n );\n #return $location;\n return $newlocation;\n }", "private function getNewLocation()\n {\n $faker = Faker::create();\n\n $type = $faker->randomElement(Location::getAllowedTypeValues());\n\n $data = [\n 'name' => $faker->sentence(2),\n 'description' => $faker->text(300),\n 'type' => $type,\n ];\n\n $location = new Location($data);\n\n // For a magazine or a website, associate a date\n if ($location->hasDate()) {\n $location->date = $faker->dateTimeThisYear();\n }\n\n return $location;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove and returns an array of deleted roles
private function deleteRole($roles) { $result = []; try { foreach ($roles as $value) { $role = $this->entityTypeManager->getStorage('user_role')->load($value); $this->entityTypeManager->getStorage('user_role')->delete([$role]); $result['success'][] = [ 'role-id' => $value, 'role-name' => $value ]; } } catch (\Exception $e) { $result['error'] = [ 'error' => 'Error: ' . get_class($e) . ', code: ' . $e->getCode() . ', message: ' . $e->getMessage() ]; } return $result; }
[ "public function deleteUserRoles() \n {\n $all = Input::all();\n $user = User::find($all['user_id'])->roles();\n $user->detach($all['role_id']);\n //return Response::jsend('success', $user->get());\n }", "public function removeUsersFromRole(Request $request) {\n\n // Make sure the array is not empty.\n if (empty($request->deletion_array)) {\n throw new \\Exception('682: Missing deletion_array!');\n }\n\n // Build out a query from the passed $deletion_array\n $q = \"DELETE FROM roles_lookup WHERE \";\n foreach($request->deletion_array as $delete) {\n // Don't build a query with a blank value.\n if (empty($delete['user_id']) or empty($delete['role_id'])) {\n throw new \\Exception('683: Missing deletion_array->value!');\n }\n $q .= \"(user_id=\";\n $q .= $delete['user_id'];\n $q .= \" AND role_id=\";\n $q .= $delete['role_id'];\n $q .= \") OR \";\n }\n // Remove the trailing or and close the sql statement;\n $q = rtrim($q, ' OR ');\n $q .= \";\";\n\n // TODO: test and make sure the check_permissions is not allowing this if you don't have Delete rights.\n // Delete the roles lookup table entry for these user(s) within this role.\n $result = DB::delete($q);\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // If all went okay then say so to the flash message.\n //TODO: ummm...flash is not working from here. (??)\n // but session() is available from blade so there may be an opportunity to do this right before the page load.\n /*\n if ($result) {\n session()->flash('message',count($request->deletion_array).' users removed from this role.');\n } else {\n session()->flash('message','Something went wrong.');\n }\n */\n // testing to get the flash to work:\n // \"Too many redirect\" ???\n //return redirect('/roles/'.$request->deletion_array[0]['role_id'].'/?module_id='.$request->frm_module_list);\n\n }", "public function removeAllRoles()\n {\n }", "public function get_roles_can_delete() {\n\n $default_role = get_option( 'default_role' );\n $wp_built_in_roles = $this->get_wp_built_in_roles();\n $roles_can_delete = array();\n $users = count_users();\n $roles = $this->lib->get_user_roles();\n foreach ($roles as $key => $role) {\n $can_delete = true;\n // check if it is default role for new users\n if ( $key === $default_role ) {\n $can_delete = false;\n continue;\n }\n // Do not allow to delete WordPress built-in role\n if ( in_array( $key, $wp_built_in_roles ) ) {\n continue;\n }\n // check if role has capabilities prohibited for the single site administrator\n if ( $this->role_contains_caps_not_allowed_for_simple_admin( $key ) ) {\n continue;\n } \n if ( !isset( $users['avail_roles'][$key] ) ) {\n $roles_can_delete[$key] = $role['name'] . ' (' . $key . ')';\n }\n }\n \n return $roles_can_delete;\n }", "public function getUsersToRemove();", "public function detachAllRoles();", "public function destroyRoles()\n {\n $model_type = get_class($this->model);\n $model_id = $this->model->getKey();\n\n return Role::where('model_type', $model_type)\n ->where('model_id', $model_id)\n ->delete();\n }", "public function removeAllRoles()\n {\n $type = Item::TYPE_ROLE;\n $names = $this->getAllItemsName($type);\n \n $this->mongodb->getCollection($this->itemChildCollection)->update([\n 'children'=>[\n '$in'=>$names\n ]\n ],[\n '$pullAll'=>[\n 'children'=>$names\n ]\n ],['multi'=>true]);\n \n $this->mongodb->getCollection($this->itemChildCollection)->remove([\n 'name'=>[\n '$in'=>$names\n ]\n ],['justOne'=>false]);\n \n $this->removeAllItems($type,$names);\n }", "public function getRemovedIds(): array;", "public function delete()\n\t{\n\t\tif (!has_permissions('roles', 'delete'))\n\t\t{\n\t\t\taccess_denied('roles', 'delete');\n\t\t}\n\n\t\t$role_id = $this->input->post('role_id');\n\t\t$users = $this->users->get_many_by(array('role' => $role_id));\n\n\t\tif ($users == NULL)\n\t\t{\n\t\t\t$result = $this->roles->delete($role_id);\n\t\t\tlog_activity(_l('deleted', _l('role')).\" [ID:$role_id]\");\n\t\t\techo 'deleted';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlog_activity(\"Error \"._l('deleted', _l('role')).\" [ID:$role_id]\");\n\t\t\techo 'error';\n\t\t}\n\t}", "function delete_multiple_user_role()\n {\n $user_role_ids = $this->input->post('table_records');\n foreach ($user_role_ids as $user_role_id) :\n $data = array(\n 'is_deleted' => '1'\n );\n $this->db->where('user_role_id', $user_role_id);\n $this->db->update('admin_user_role', $data);\n endforeach;\n }", "public function voffice_remove_roles() {\n //For development purposes only\n //remove_role( 'vp' );\n //remove_role( 'dm' );\n }", "public function removeRoles()\n {\n $this->roles()->detach();\n }", "public function deleted()\n {\n $roles = Role::onlyTrashed()->orderBy('name', 'asc')->get();\n return view('roles.deleted')->with('roles', $roles);\n }", "function remove_roles() {\n\n remove_role( 'subscriber' );\n remove_role( 'contributor' );\n\n}", "function headache_remove_roles(): void\n{\n remove_role('author');\n remove_role('contributor');\n remove_role('subscriber');\n}", "public function removeRoles() {\n $this->roles()->detach();\n }", "public function remvoveAllRoles()\n {\n $this->roles->clear();\n }", "public function getUndeletedRoleSets() {\n return $this->em->getRepository('CoreUserBundle:RoleSet')->findAllUndeleted();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function is used to get the user's business photos upload url
function USER_UPLOAD_BUSINESS_PHOTO_URL() { return STATIC_SITE_URL().'admin/uploads/user/business_photos'."/"; }
[ "public function getUserPhotoUrl()\n\t{\n\t\treturn $this->user_photo_url;\n\t}", "public function getPhotoURL(){\n\t\treturn $this->photoFile->exists() \n\t\t\t\t\t\t? \\GO::url('addressbook/company/photo', array('id'=>$this->id,'mtime'=>$this->photoFile->mtime())) \n\t\t\t\t\t\t: null;\n\t}", "public function getPhotoUrl() \n {\n if ($this->photo && is_file(public_path('/storage/users/' . $this->photo))) {\n return url('/storage/users/' . $this->photo); \n }\n return 'https://via.placeholder.com/200';\n }", "public function get_upload_url()\n { \n if(isset(Application::$config['global']['URL']['Upload'])) return Application::$config['global']['URL']['Upload'];\n else return '';\n }", "public function getPictureUrl()\n {\n $user = $this->getOauthUser();\n return $user['pic_url'];\n }", "public function getUserPhotoUploadUri($userId) {\n $result = $this->getUploadRootUri() . self::USER_PHOTO_DIR . '/'. $userId . '/';\n return $result;\n }", "public static function getLoginBgImageUploadUrl(): string {\n return Helper::getUploadDirectoryURL(self::LOGIN_BG_UPLOAD_PATH);\n }", "function myProfilePhotoUrl() {\n\t$url = login( 'photo_url' );\n\tif ( $url ) {\n\t\treturn $url;\n\t} else {\n\t\treturn ANONYMOUS_PROFILE_PHOTO;\n\t}\n}", "public function getUploadUri() {\n return @$this->attributes['upload_uri'];\n }", "public function getUploadUrl()\n {\n return $this->upload_url;\n }", "public function profilePhotoUrl()\n {\n return url($this->profile_photo_path.'/'.$this->profile_photo_name);\n }", "public function getImageUploadURL() {\n $dir = $this->getImageUploadDir();\n return str_replace('/admin', '', $this->getRootURL() . '/' . IMG_UPLOAD_FOLDER);\n }", "public function get_uploadBaseUrl()\n {\n return $this->_uploadBaseUrl;\n }", "public function photo_path(){\n return !empty($this->photo_name) ? $this -> upload_dir . DS . $this -> photo_name : $this->upload_dir . DS . $this->placeholder_photo;\n }", "function getPhotoUrl($person_name) {\n // TODO: here is just the fake url\n //return \"http://hdn.xnimg.cn/photos/hdn421/20120325/2320/large_RB2E_16746b019117.jpg\";\n //return \"http://fmn.rrimg.com/fmn064/20120804/2130/original_Hnvu_794d0000334d118e.jpg\";\n //return \"http://202.114.74.136/pic/4310031992102465532011302580362.jpg\";\n //return \"http://b75.photo.store.qq.com/psu?/968c9d62-75f4-4cb2-9f29-e58e41941c33/V7yp8.82phhJNs69jaP*RjHyyTHjRifQQ4EGZCVq9rQ!/b/YTDhxCzUJAAAYvUxtyzpJAAA&bo=ngL2AQAAAAABAEw!&rf=photoDetail\";\n //return \"http://hdn.xnimg.cn/photos/hdn221/20130409/1715/h_large_UeDp_2c1800000e30113e.jpg\";\n return $_GET[\"url\"];\n}", "function bp_flickr_photo_url(){\n echo bp_flickr_get_photo_url();\n}", "public function getCoverPhotoRemoteUrl(): string;", "public function getPhotoUrl(string $storageUid): string;", "public static function uploadUrl() {\n return file_create_url(self::uploadDir(FALSE));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
weighted_random_simple() Pick a random item based on weights.
function weighted_random_simple($values, $weights) { $count = count($values); $i = 0; $n = 0; echo array_sum($weights); echo "<br>"; $num = mt_rand(0, array_sum($weights)); echo $num; echo "<br>"; while ($i < $count) { $n += $weights[$i]; if ($n >= $num) { break; } $i++; } return $values[$i]; }
[ "function weighted_random_simple($values, $weights){ \n $count = count($values); \n $i = 0; \n $n = 0; \n $num = mt_rand(0, array_sum($weights)); \n while($i < $count){\n $n += $weights[$i]; \n if($n >= $num){\n break; \n }\n $i++; \n } \n return $values[$i]; \n}", "private function weightedRandomTreatment() {\n\t\t$weights = $this->getWeightings();\n\t\t$max = array_sum($weights);\n\t\t$soFar = 0;\n\t\t$random = mt_rand(0, $max - 1);\n\t\tforeach($weights as $k => $v) {\n\t\t\t$soFar += $v;\n\t\t\tif ($random < $soFar) {\n\t\t\t\treturn $k;\n\t\t\t}\n\t\t}\n\t}", "function random_weighted($kv)\n{\n\t$sum = array_sum(array_values($kv));\n\t$rnd = (mt_rand() / mt_getrandmax()) * $sum;\n\tforeach ($kv as $k => $v)\n\t{\n\t\tif ($v >= $rnd)\n\t\t\treturn $k;\n\t\t$rnd -= $v;\n\t}\n\ttrigger_error('unreachable');\n}", "function getRandomWeightedElement(array $weightedValues) {\n $rand = mt_rand(1, (int) array_sum($weightedValues));\n\n foreach ($weightedValues as $key => $value) {\n $rand -= $value;\n if ($rand <= 0) {\n return $key;\n }\n }\n }", "function getRandomWeightedElement(array $weightedValues) {\n $rand = mt_rand(1, (int) array_sum($weightedValues));\n\n foreach ($weightedValues as $key => $value) {\n $rand -= $value;\n if ($rand <= 0) {\n return $key;\n }\n }\n}", "function array_weighted_rand(array $list)\n{\n $totalWeight = gmp_init(0);\n foreach ($list as $key => $weight) {\n if ($weight < 0) {\n throw new \\InvalidArgumentException(\"Weights cannot be negative. Found $key => $weight.\");\n }\n $totalWeight += $weight;\n }\n\n if ($totalWeight == 0) {\n throw new \\InvalidArgumentException(\"Total weight must exceed zero.\");\n } elseif ($totalWeight == 1) {\n return array_search(1, $list);\n }\n\n $rand = gmp_random_range(1, $totalWeight);\n foreach ($list as $key => $weight) {\n $rand -= $weight;\n if ($rand <= 0) {\n return $key;\n }\n }\n}", "public static function weighted_chance($options, $weights = array()){\n\n // Count the number of values passed\n $option_amount = count($options);\n\n // If no weights have been defined, auto-generate\n if (empty($weights)){\n $weights = array();\n for ($i = 0; $i < $option_amount; $i++){\n $weights[] = 1;\n }\n }\n\n // Generate a single weighted values array\n $weighted_values = array();\n foreach ($options AS $key => $option){ $weighted_values[$option] = $weights[$key]; }\n\n // Collect a random number and check which key it matches\n $random_int = mt_rand(1, array_sum($weighted_values));\n foreach ($weighted_values as $option => $weight) {\n $random_int -= $weight;\n if ($random_int <= 0) {\n return $option;\n }\n }\n\n }", "static public function getRandomWeightedElement(array $weightedValues) {\n $rand = mt_rand(1, (int) array_sum($weightedValues));\n\n foreach ($weightedValues as $key => $value) {\n $rand -= $value;\n if ($rand <= 0) {\n return $key;\n }\n }\n }", "protected function getRandomWeight() \n {\n return ((mt_rand(0, 1000) / 1000) - 0.5) / 2;\n }", "function rand_weighted($numbers) {\r\n\t$total = 0;\r\n\tforeach ($numbers as $number => $weight) {\r\n\t\t$total += $weight;\r\n\t\t$distribution[$number] = $total;\r\n\t}\r\n\t$rand = mt_rand(0, $total - 1);\r\n\tforeach ($distribution as $number => $weights) {\r\n\t\tif ($rand < $weights) { return $number; }\r\n\t}\r\n}", "function array_fetch_random_weighted_value( &$array )\n {\n if( !empty($array) )\n {\n $total_weight = 0;\n foreach( $array as $element )\n {\n $weight = is_array($element) ? (isset($element['weight']) ? $element['weight'] : 0) : (isset($element->weight) ? $element->weight : 0);\n $total_weight += max(0, $weight);\n }\n\n if( $total_weight <= 0 )\n {\n return null;\n }\n\n $roll = mt_rand(0, $total_weight-1);\n\n foreach( $array as $key => $element )\n {\n $weight = is_array($element) ? (isset($element['weight']) ? $element['weight'] : 0) : (isset($element->weight) ? $element->weight : 0);\n $roll -= max(0, $weight);\n if( $roll < 0 )\n {\n return $element;\n }\n\n }\n }\n\n return null;\n }", "function aecom_weighted_random_sort( $weight_a, $weight_b ) {\n $order_a = mt_rand( 0, 1000 ) + ( (int) $weight_a * 10000 );\n $order_b = mt_rand( 0, 1000 ) + ( (int) $weight_b * 10000 );\n return $order_b - $order_a;\n}", "function randomSimpleUCWeight()\n {\n return mt_rand($this->range_positions['min_xSimple'] * 100, $this->range_positions['max_xSimple'] * 100) / 100;\n }", "function weighted_randomize($prob_array, $at_key)\r\n{\r\n\t$prob_list = $prob_array[$at_key];\r\n\t\r\n\t// Create an array containing cutpoints for randomization\r\n\t$cumul_prob = array();\r\n\t$cumulative = 0.0;\r\n\tfor ($i=0; $i<count($prob_list); $i++){\r\n\t\t$cumul_prob[$i] = $cumulative;\r\n\t\t$cumulative = $cumulative + floatval($prob_list[$i]);\r\n\t}\r\n\r\n\t// Generate a uniform random floating point value between 0.0 and 1.0\r\n\t$unif_rand = mt_rand() / mt_getrandmax();\r\n\r\n\t// Figure out which integer should be returned\r\n\t$outInt = 0;\r\n\tfor ($k = 0; $k < count($cumul_prob); $k++){\r\n\t\tif ($cumul_prob[$k] <= $unif_rand){\r\n\t\t\t$outInt = $k + 1;\r\n\t\t}\r\n\t}\r\n\r\n\treturn($outInt);\r\n\r\n}", "function weighted_randomize($prob_array, $at_key)\n{\n\t$prob_list = $prob_array[$at_key];\n\t\n\t// Create an array containing cutpoints for randomization\n\t$cumul_prob = array();\n\t$cumulative = 0.0;\n\tfor ($i=0; $i<count($prob_list); $i++){\n\t\t$cumul_prob[$i] = $cumulative;\n\t\t$cumulative = $cumulative + floatval($prob_list[$i]);\n\t}\n\n\t// Generate a uniform random floating point value between 0.0 and 1.0\n\t$unif_rand = mt_rand() / mt_getrandmax();\n\n\t// Figure out which integer should be returned\n\t$outInt = 0;\n\tfor ($k = 0; $k < count($cumul_prob); $k++){\n\t\tif ($cumul_prob[$k] <= $unif_rand){\n\t\t\t$outInt = $k + 1;\n\t\t}\n\t}\n\n\treturn($outInt);\n\n}", "function fann_randomize_weights($ann, $min_weight, $max_weight)\n{\n}", "function randomSimpleUCWeight()\n {\n $MIN = 5;\n $MAX = 7.49;\n return mt_rand($MIN * 100, $MAX * 100) / 100;\n }", "abstract public function randomWeightedSubsetWithReplacement(int $n, array $weights);", "public function random()\r\n\t{\r\n\t\treturn $this->_items[array_rand($this->_items)];\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
setCargVigente() Sets the value of [carg_r_fecha_creacion] column to a normalized version of the date/time value specified.
public function setCargRFechaCreacion($v) { $dt = PropelDateTime::newInstance($v, null, 'DateTime'); if ($this->carg_r_fecha_creacion !== null || $dt !== null) { if ($this->carg_r_fecha_creacion === null || $dt === null || $dt->format("Y-m-d H:i:s.u") !== $this->carg_r_fecha_creacion->format("Y-m-d H:i:s.u")) { $this->carg_r_fecha_creacion = $dt === null ? null : clone $dt; $this->modifiedColumns[CargoTableMap::COL_CARG_R_FECHA_CREACION] = true; } } // if either are not null return $this; }
[ "public function setRb_fecha_carga($rb_fecha_carga)\r\n\t{\r\n\t\t$this->rb_fecha_carga = $rb_fecha_carga;\r\n\t}", "public function setActiRFechaCreacion($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->acti_r_fecha_creacion !== null || $dt !== null) {\n if ($this->acti_r_fecha_creacion === null || $dt === null || $dt->format(\"Y-m-d H:i:s.u\") !== $this->acti_r_fecha_creacion->format(\"Y-m-d H:i:s.u\")) {\n $this->acti_r_fecha_creacion = $dt === null ? null : clone $dt;\n $this->modifiedColumns[ActividadTableMap::COL_ACTI_R_FECHA_CREACION] = true;\n }\n } // if either are not null\n\n return $this;\n }", "public function setOrdencompraFecha($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->ordencompra_fecha !== null || $dt !== null) {\n $currentDateAsString = ($this->ordencompra_fecha !== null && $tmpDt = new DateTime($this->ordencompra_fecha)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->ordencompra_fecha = $newDateAsString;\n $this->modifiedColumns[] = OrdencompraPeer::ORDENCOMPRA_FECHA;\n }\n } // if either are not null\n\n\n return $this;\n }", "public function setFecha_carga($fecha_carga)\r\n\t{\r\n\t\t$this->fecha_carga = $fecha_carga;\r\n\t}", "public function setClienteFecharegistro($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->cliente_fecharegistro !== null || $dt !== null) {\n $currentDateAsString = ($this->cliente_fecharegistro !== null && $tmpDt = new DateTime($this->cliente_fecharegistro)) ? $tmpDt->format('Y-m-d') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->cliente_fecharegistro = $newDateAsString;\n $this->modifiedColumns[] = ClientePeer::CLIENTE_FECHAREGISTRO;\n }\n } // if either are not null\n\n\n return $this;\n }", "public function setDictRFechaCreacion($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->dict_r_fecha_creacion !== null || $dt !== null) {\n if ($this->dict_r_fecha_creacion === null || $dt === null || $dt->format(\"Y-m-d H:i:s.u\") !== $this->dict_r_fecha_creacion->format(\"Y-m-d H:i:s.u\")) {\n $this->dict_r_fecha_creacion = $dt === null ? null : clone $dt;\n $this->modifiedColumns[DictacionTableMap::COL_DICT_R_FECHA_CREACION] = true;\n }\n } // if either are not null\n\n return $this;\n }", "function uf_convertir_cxc_dt_cargos() \n\t{\n\t\t///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t//\t Function: uf_convertir_cxc_dt_cargos\n\t\t//\t\t Access: private\n\t\t//\t Returns: lb_valido True si se ejecuto el insert ó False si hubo error en el insert\n\t\t//\t Description: Funcion que selecciona los campos de moneda de la tabla cxc_dt_cargos e inserta el valor reconvertido\n\t\t//\t Creado Por: santi consultores\n\t\t// Fecha Creación: 13/05/2018 \t\t\t\t\t\t\t\tFecha Última Modificación : \n\t\t///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t$lb_valido=true;\n\t\t$ls_sql=\"SELECT codemp, codproceso, id_doc, id_fact, codcar, \".\n\t\t\t\t\" monbasimp, monimp, montot\".\n\t\t\t\t\" FROM cxc_dt_cargos\".\n\t\t\t\t\" WHERE codemp='\".$this->ls_codemp.\"'\";\n\n\t\t$rs_data=$this->io_sql_origen->select($ls_sql);\n\t\tif($rs_data===false)\n\t\t{ \n\t\t\t$this->io_mensajes->message(\"CLASE->sigesp_rcm_c_cxc MÉTODO->SELECT->uf_convertir_cxc_dt_cargos ERROR->\".$this->io_funciones->uf_convertirmsg($this->io_sql->message));\n\t\t\t$lb_valido=false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$la_seguridad=\"\";\n\t\t\twhile(($row=$this->io_sql_origen->fetch_row($rs_data))&&($lb_valido))\n\t\t\t{\n\t\t\t\t$ls_codemp= $row[\"codemp\"]; \n\t\t\t\t$ls_codproceso= $row[\"codproceso\"];\n\t\t\t\t$ls_id_doc = $row[\"id_doc\"];\n\t\t\t\t$ls_id_fact = $row[\"id_fact\"];\n\t\t\t\t$ls_codcar = $row[\"codcar\"];\n\n\n\t\t\t\t$li_monbasimp= $row[\"monbasimp\"];\n\t\t\t\t$li_montot= $row[\"montot\"];\n\t\t\t\t$li_monimp= $row[\"monimp\"];\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->io_rcbsf->io_ds_datos->insertRow(\"campo\",\"monimp\");\n\t\t\t\t$this->io_rcbsf->io_ds_datos->insertRow(\"monto\",$li_monimp);\n\t\t\t\t\n\t\t\t\t$this->io_rcbsf->io_ds_datos->insertRow(\"campo\",\"montot\");\n\t\t\t\t$this->io_rcbsf->io_ds_datos->insertRow(\"monto\",$li_montot);\n\n\t\t\t\t$this->io_rcbsf->io_ds_datos->insertRow(\"campo\",\"monbasimp\");\n\t\t\t\t$this->io_rcbsf->io_ds_datos->insertRow(\"monto\",$li_monbasimp);\n\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"filtro\",\"codemp\");\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"valor\",$ls_codemp);\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"tipo\",\"C\");\n\t\t\t\t\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"filtro\",\"codproceso\");\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"valor\",$ls_codproceso);\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"tipo\",\"C\");\n\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"filtro\",\"id_doc\");\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"valor\",$ls_id_doc);\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"tipo\",\"C\");\n\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"filtro\",\"codcar\");\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"valor\",$ls_codcar);\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"tipo\",\"C\");\n\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"filtro\",\"id_fact\");\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"valor\",$ls_id_fact);\n\t\t\t\t$this->io_rcbsf->io_ds_filtro->insertRow(\"tipo\",\"C\");\n\n\n\t\t\t\t$lb_valido=$this->io_rcbsf->uf_reconvertir_datos(\"cxc_dt_cargos\",$la_seguridad);\n\t\t\t}\n\t\t}\t\t\n\t\treturn $lb_valido;\n\t}", "public function setMarcRFechaCreacion($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->marc_r_fecha_creacion !== null || $dt !== null) {\n if ($this->marc_r_fecha_creacion === null || $dt === null || $dt->format(\"Y-m-d H:i:s.u\") !== $this->marc_r_fecha_creacion->format(\"Y-m-d H:i:s.u\")) {\n $this->marc_r_fecha_creacion = $dt === null ? null : clone $dt;\n $this->modifiedColumns[MarcadorTableMap::COL_MARC_R_FECHA_CREACION] = true;\n }\n } // if either are not null\n\n return $this;\n }", "public function setGruFechaRegistroSistema($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->gru_fecha_registro_sistema !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->gru_fecha_registro_sistema !== null && $tmpDt = new DateTime($this->gru_fecha_registro_sistema)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->gru_fecha_registro_sistema = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = GrupoEquipoPeer::GRU_FECHA_REGISTRO_SISTEMA;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function getFechaCreacionFacturaCuentaVivienda(){\n return $this->fechaCreacionFacturaCuentaVivienda;\n }", "public function setMontacargasC($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->montacargas_c !== $v) {\n $this->montacargas_c = $v;\n $this->modifiedColumns[] = MontacargasPeer::MONTACARGAS_C;\n }\n\n\n return $this;\n }", "public function setFechaCreacionGastoComun($fechaCreacionGastoComun){\n $this->fechaCreacionGastoComun = $fechaCreacionGastoComun;\n }", "public function setMetFechaRegistroSistema($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->met_fecha_registro_sistema !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->met_fecha_registro_sistema !== null && $tmpDt = new DateTime($this->met_fecha_registro_sistema)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->met_fecha_registro_sistema = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = MetodoPeer::MET_FECHA_REGISTRO_SISTEMA;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function setFechaIngreso($v)\n\t{\n\t\t$dt = PropelDateTime::newInstance($v, null, 'DateTime');\n\t\tif ($this->fecha_ingreso !== null || $dt !== null) {\n\t\t\t$currentDateAsString = ($this->fecha_ingreso !== null && $tmpDt = new DateTime($this->fecha_ingreso)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newDateAsString = $dt ? $dt->format('Y-m-d') : null;\n\t\t\tif ($currentDateAsString !== $newDateAsString) {\n\t\t\t\t$this->fecha_ingreso = $newDateAsString;\n\t\t\t\t$this->modifiedColumns[] = ProductoPeer::FECHA_INGRESO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function setDataFechamento($v)\n\t{\n\t\t$dt = PropelDateTime::newInstance($v, null, 'DateTime');\n\t\tif ($this->data_fechamento !== null || $dt !== null) {\n\t\t\t$currentDateAsString = ($this->data_fechamento !== null && $tmpDt = new DateTime($this->data_fechamento)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n\t\t\tif ($currentDateAsString !== $newDateAsString) {\n\t\t\t\t$this->data_fechamento = $newDateAsString;\n\t\t\t\t$this->modifiedColumns[] = ProcessoPeer::DATA_FECHAMENTO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "function set_fechaIngreso( $fechaIngreso ) {\n // sets the value of fechaIngreso\n $this->fechaIngreso = $fechaIngreso;\n }", "public function setDataCadastro($v)\n\t{\n\t\t$dt = PropelDateTime::newInstance($v, null, 'DateTime');\n\t\tif ($this->data_cadastro !== null || $dt !== null) {\n\t\t\t$currentDateAsString = ($this->data_cadastro !== null && $tmpDt = new DateTime($this->data_cadastro)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newDateAsString = $dt ? $dt->format('Y-m-d') : null;\n\t\t\tif ($currentDateAsString !== $newDateAsString) {\n\t\t\t\t$this->data_cadastro = $newDateAsString;\n\t\t\t\t$this->modifiedColumns[] = IgrejaPeer::DATA_CADASTRO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public static function crear($cxc_movimiento_id, $fecha_registro, $valor_pagado)\n {\n // El documento_cartera_id, se puede repetir si se genera desde distintas aplicaciones, ventas, tesoreria, gestión de cobros, etc. Por eso siempre hay que validar también la transacción origen del documento \n $estado_documento = CxcEstadoCartera::where('cxc_movimiento_id', $cxc_movimiento_id)->orderBy('fecha_registro','DESC')->first();\n\n // Registro por primera vez\n $nuevo_valor_pagado = 0;\n $nuevo_saldo_pendiente = $valor_pagado;\n\n if ( !is_null($estado_documento) ) \n {\n // El campo valor_pagado va acumulando el valor de los pagos hechos al documento de cartera\n $nuevo_valor_pagado = $estado_documento->valor_pagado + $valor_pagado;\n $nuevo_saldo_pendiente = $estado_documento->saldo_pendiente - $valor_pagado;\n }\n\n $estado = 'Pendiente';\n if ( $nuevo_saldo_pendiente == 0) \n {\n $estado = 'Pagado';\n }\n\n CxcEstadoCartera::create( [ 'cxc_movimiento_id' => $cxc_movimiento_id ] +\n [ 'fecha_registro' => $fecha_registro ] + \n [ 'valor_pagado' => $nuevo_valor_pagado ] + \n [ 'saldo_pendiente' => $nuevo_saldo_pendiente ] +\n [ 'estado' => $estado ] +\n [ 'creado_por' => Auth()->user()->email ] +\n [ 'modificado_por' => '' ] );\n }", "public function getFechaCreacionGastoComun(){\n return $this->fechaCreacionGastoComun;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function: getValue Returns the value for key in dictionary or the given default value if no value is defined for the key. Parameters: dict Dictionary that contains the key, value pairs. key Key whose value should be returned. default Default value to return if the key is undefined. Default is null.
static function getValue($dict, $key, $default=null) { $value = null; if (isset($dict[$key])) { $value = $dict[$key]; } else { $value = $default; } return $value; }
[ "public function getOrDefault($key, $default);", "static function read($key, $default = null) {\n if (self::exists($key)) {\n $result = self::first(array('conditions' => array('key' => $key)));\n return $result['value'];\n } else {\n return $default;\n }\n }", "function array_get_key_value(array $array, $key, $default = null)\n {\n if (array_key_exists($key, $array)) {\n return $array[$key];\n } else {\n return $default;\n }\n }", "public function getValue($key, $default = null)\n {\n if (is_array($this->kwargs) && isset($this->kwargs[$key])) {\n return $this->kwargs[$key];\n }\n return $default; // @codeCoverageIgnore\n }", "public static function getValue($array, $key, $default = null)\n {\n if (is_array($array)) {\n return isset($array[$key]) || array_key_exists($key, $array) ? $array[$key] : $default;\n } else {\n return $array->$key;\n }\n }", "public function get(?string $key = null, $default = null);", "function getValue($xml, $key, $default = null) {\n\n for ($i=0; $i < count($xml->dict->key); $i++) { \n if($key == $xml->dict->key[$i]) {\n return (string)$xml->dict->string[$i];\n }\n }\n \n return $default;\n }", "public function tryGet(string $key, $default = null) {\n return $this->has($key) ? $this->innerMap[$key] : $default;\n }", "public function getOr($key, $default_value = '')\n\t{\n\t\ttry {\n\t\t\treturn $this->get($key);\n\t\t}\n\t\tcatch ( Exception $e )\n\t\t{}\n\t\t\n\t\treturn $default_value;\n\t}", "public function get($key = null) {\n\t\t/* @var $i Iterator */\n\t\t/* @var $e Map\\Entry */\n\t\t$i = $this->entrySet()->getIterator();\n\t\tif ($key == null) {\n\t\t\twhile ( $i->hasNext() ) {\n\t\t\t\t$e = $i->next();\n\t\t\t\tif ($e->getKey() == null) {\n\t\t\t\t\treturn $e->getValue();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\twhile ( $i->hasNext() ) {\n\t\t\t\t$e = $i->next();\n\t\t\t\tif ($key == $e->getKey()) {\n\t\t\t\t\treturn $e->getValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "function get_or_default($arr, $key, $default) {\r\n\tif(isset($arr[$key])) {\r\n\t\treturn $arr[$key];\r\n\t} else {\r\n\t\treturn $default;\r\n\t}\r\n}", "public function get(string $key, mixed $default = null): mixed\n {\n $value = $this->cache->get($key);\n\n if ($value === null) {\n return $default;\n }\n\n return $value;\n }", "public static function get_get($key, $default = NULL) {\n if (isset($_GET)) return parent::arr_get($_GET, $key, $default);\n return $default;\n }", "public static function value($keys, array $arr, $default = null)\n {\n $keys = self::makeArray($keys);\n foreach($keys as $key)\n {\n if (array_key_exists($key, $arr))\n return $arr[$key];\n }\n\n return $default;\n }", "public function getOrDefault(mixed $key, mixed $defaultValue): mixed\n {\n return $this->get($key) ?? $defaultValue;\n }", "public static function getValue($array, $key, $default = null)\n {\n if ($key instanceof \\Closure) {\n return $key($array, $default);\n }\n\n if (is_array($key)) {\n $lastKey = array_pop($key);\n foreach ($key as $keyPart) {\n $array = static::getValue($array, $keyPart);\n }\n $key = $lastKey;\n }\n\n if (is_array($array) && (isset($array[$key]) || array_key_exists($key, $array))) {\n return $array[$key];\n }\n\n if (($pos = strrpos($key, '.')) !== false) {\n $array = static::getValue($array, substr($key, 0, $pos), $default);\n $key = substr($key, $pos + 1);\n }\n\n if (is_object($array)) {\n // this is expected to fail if the property does not exist, or __get() is not implemented\n // it is not reliably possible to check whether a property is accessible beforehand\n return $array->$key;\n } elseif (is_array($array)) {\n return (isset($array[$key]) || array_key_exists($key, $array)) ? $array[$key] : $default;\n }\n\n return $default;\n }", "public function valueForKey($key)\n\t{\n\t\t$row = Defaults::defalutTable()->findWhere(\"key = ?\", $key);\n\t\tif( count($row) == 1 )\n\t\t{\n\t\t\treturn $row[0]->value;\n\t\t}\n\t\treturn NULL;\n\t}", "public static function defaultVal($arr, $key, $default = null) {\n\t\tif (isset($arr[$key])) {\n\t\t\treturn $arr[$key];\n\t\t}\n\t\treturn $default;\n\t}", "public function getKey(mixed $key, mixed $default = null): mixed\n {\n return Arr::getKey($this->value, $key, $default);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the subject of the message.
public function getSubject(): string { return $this->message->getSubject(); }
[ "public function getMsgSubject()\n\t{\n\t\t$temp = $this->message;\n\t\treturn temp->msgSubject;\n\t}", "public function getSubject()\n {\n return $this->getMessage()->getSubject();\n }", "public function getMessageSubject()\n {\n return $this->messageSubject;\n }", "public function getSubject()\n {\n return $this->getProperty(self::SUBJECT);\n }", "public function getSubject()\n {\n return $this->getHeaders()->get('subject');\n }", "final public function getSubject()\n {\n return $this->getHeaders()->get('subject');\n }", "private function getSubject() {\n\t\treturn $this->ticket->getSubject();\n\t}", "public function getSubject()\n {\n return call_user_func($this->_normalizer, $this->client->getSubject());\n }", "function getSubject() {\n return $this->getFieldValue('subject');\n }", "public function getSubject() {\n if (isset($this->_headerinfo->subject)) {\n return $this->_decodeMimeHeader($this->_headerinfo->subject, $this->_defaultcharset);\n }\n return '';\n }", "public function getSubject()\n\t{\n\t\t//TODO loadFromDB\n\t\treturn $this->subject;\n\t}", "public function getMailSubject();", "protected function getSubject()\n {\n return $this->getObserver()->getSubject();\n }", "protected function getSubject()\n {\n $subject = $this->resolveTemplate($this->option('subject', I18n::translate('uniform-email-subject')));\n \n // Remove newlines to prevent malicious modifications of the email header.\n return str_replace(\"\\n\", '', $subject);\n }", "public function getEmailSubject() {\n return $this->_emailSubject;\n }", "public function getContactSubject()\n {\n if ($this->_sContactSubject === null) {\n $this->_sContactSubject = oxRegistry::getConfig()->getRequestParameter('c_subject');\n }\n\n return $this->_sContactSubject;\n }", "public function getSubject()\n {\n return $this->getImplodedField('subject');\n }", "private function getMailSubject()\n {\n $hostname = gethostname();\n\n return sprintf($this->mailSubject, $hostname, date('Y-m-d H:i:s'));\n }", "public function getSubject()\n\t{\n\t\treturn $this->getClaim('sub');\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Authenticated users may edit their own links
public function authenticated_users_may_only_edit_their_own_links() { $this->signIn(); $link = create('App\Link', ['user_id' => Auth::id()]); $updatedLink = [ 'title' => 'Updated title', 'url' => 'http://updated.com' ]; $this->patch(route('links.update', $link), $updatedLink); $this->assertDatabaseHas('links', $updatedLink); }
[ "function editingLink() {\n\t$editlink = get_edit_post_link();\n\tif (current_user_can('administrator')) {\n\t\t\tprint '<a href=\"' . $editlink .'\" class=\"edit\"><i class=\"icon-circle-arrow-right\"></i></a>';\n\t}\n\telseif (current_user_can('editor')) {\n\t\t\tprint '<a href=\"' . $editlink .'\" class=\"edit\"><i class=\"icon-circle-arrow-right\"></i></a>';\n\t}\n}", "function get_edit_user_link($user_id = \\null)\n {\n }", "public function hasEditAccess() { \n\t\t\n\t\t// any twitter handle in gods will get access to all pages\n\t\t$gods = array('jenrobinson','rochers','clustertruck', 'hkatalin2006');\n\t\t\n\t\tif (!isset($_GET['asUser']) && $this->loged && (in_array($this->user['name'],$gods) || strtolower($this->user['name']) == strtolower($this->truck['twitter']))) { \n\t\t\treturn true;\n\t\t}\n\t\t\n\t}", "function edit_link() {\n\t\tif( current_user_can( self::CAPABILITY ) ) {\n\t\t\treturn '<span class=\"plugin-notes-edit\">' . __( 'edit notes' ) . '</span>';\n\t\t}\n\n\t\treturn '';\n\t}", "public function add_edit_access()\n\t{\n\t\treturn;\n\t}", "public function allowEdit()\n\t{\n\t\treturn $this->id == Auth::user() -> id || Auth::user() -> admin;\n\t}", "public function getEditLink()\n {\n return false;\n }", "public function authorizePatch()\n {\n return $this->user()->can('links.update');\n }", "function maybe_redirect_edit()\n {\n }", "function admin_edit_link() {\n\t\t\tif ($this->uid) {\n\t\t\t\t$params = array ('view' => 'edit_post',\n\t\t\t\t\t'cat_uid' => $this->category_id,\n\t\t\t\t\t'conf_uid' => $this->conference_id,\n\t\t\t\t\t'thread_uid' => $this->thread_id,\n\t\t\t\t\t'post_uid' => $this->uid,\n\t\t\t\t\t'flag' => 'edit');\n\t\t\t\t$img_path = $this->fconf['tmpl_img_path'].'edit.'.$this->fconf['image_ext_type'];\n\t\t\t\t$title = '<img src=\"'.$img_path.'\"> '.tx_chcforum_shared::lang('btn_edit');\n\n\t\t\t\t$out.= tx_chcforum_shared::makeLink($params, $title, $attr);\n\n\t\t\t\treturn $out;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function canEditUsers();", "function bbp_is_single_user_edit()\n{\n}", "private function doManagerLink() {\n\t\tif (VCDUtils::hasPermissionToChange($this->itemObj)) {\n\t\t\t$this->assign('isOwner', true);\n\t\t}\n\t}", "function hasEditPermission() {\n\t\tglobal $login;\n\t\treturn $login->isWebmaster();\n\t}", "public function testEditLinkVisibleOnlyWhenLoggedIn()\n\t{\n\t\t// Check that a report owned by a user shows an edit link\n\t\t$this->loginTestUser();\n\t\t$reportHeader = $this->visit($this->getTestDomain() . '/report/24')->find('#report-header')->text();\n\t\t$this->assertContains('Edit report', $reportHeader);\n\t}", "public function get_url_edit() {\n if ($this->uid == NULL) {\n throw new Exception(\"Trying to get link for a nonexistent user.\");\n } \n return base_url('user/' . $this->uid . '/edit') ;\n }", "function fusion_should_add_fe_edit_link() {\n\tif ( 0 === fusion_library()->get_page_id() || false === fusion_library()->get_page_id() || '0-archive' === fusion_library()->get_page_id() || is_preview_only() ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "function pendrell_author_edit_link( $buttons ) {\n if ( is_author() ) {\n $edit_author_link = get_edit_user_link(); // Author edit link for users with the appropriate capabilities\n if ( !empty( $edit_author_link ) )\n $buttons .= '<a href=\"' . $edit_author_link . '\" class=\"button edit-link\">' . pendrell_icon_text( 'author-edit', __( 'Edit', 'pendrell' ) ) . '</a>';\n }\n return $buttons;\n}", "public function editMyAccess()\n {\n $user = $this->Users->get($this->Auth->user('id'));\n if ($this->request->is(['post', 'patch', 'put'])) {\n $user = $this->Users->patchEntity($user, $this->request->getData());\n if ($this->Users->save($user)) {\n $this->Auth->setUser($user);\n $this->Flash->success(__('Vos accès ont été modifiés.'));\n } else {\n $this->Flash->error(__('Une erreur est survenue. Vos accès n\\'ont pas pu être modifiés.'));\n }\n \n return $this->redirect($this->referer());\n }\n $this->set('user', $user);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isset shippingPackageDetails Lists the various shipping packages supported by the specified site. Note: This container is only returned if ShippingPackageDetails is included as a DetailName filter in the request, or if no DetailName filters are used in the request.
public function issetShippingPackageDetails($index) { return isset($this->shippingPackageDetails[$index]); }
[ "public function getShippingPackageDetails()\n {\n return $this->shippingPackageDetails;\n }", "public function getShippingInformation();", "public function getShippingPackageInfo()\n {\n return $this->shippingPackageInfo;\n }", "public function getShippingInfo();", "public function getShippingServicePackageDetails()\n {\n return $this->shippingServicePackageDetails;\n }", "public function setShippingPackageDetails(array $shippingPackageDetails)\n {\n $this->shippingPackageDetails = $shippingPackageDetails;\n return $this;\n }", "public function get_shipping_packages()\n {\n }", "protected function _hasShipping()\n {\n return true;\n }", "public function getShippingInformation(){\n return $this->_getData(self::SHIPPING_INFORMATION);\n }", "public function isSetShipping()\n {\n return !is_null($this->_fields['Shipping']['FieldValue']);\n\n }", "public function setShippingServicePackageDetails(array $shippingServicePackageDetails)\n {\n $this->shippingServicePackageDetails = $shippingServicePackageDetails;\n return $this;\n }", "private function setShippingInformation()\n {\n if ($this->_checkoutSession->getLastRealOrder()->getIsVirtual()) {\n $this->_paymentRequest->setShipping()->setAddressRequired()->withParameters('false');\n } else {\n $this->_paymentRequest->setShipping()->setAddressRequired()->withParameters('true');\n $shipping = $this->_checkoutSession->getLastRealOrder()->getShippingAddress();\n if ($shipping) {\n if (count($shipping->getStreet()) === 4) {\n $this->_paymentRequest->setShipping()->setAddress()->withParameters(\n $shipping->getStreetLine(1),\n $shipping->getStreetLine(2),\n $shipping->getStreetLine(4),\n \\UOL\\PagSeguro\\Helper\\Data::fixPostalCode($shipping->getPostcode()),\n $shipping->getCity(),\n $this->getRegionAbbreviation($shipping),\n $this->getCountryName($shipping['country_id']),\n $shipping->getStreetLine(3)\n );\n } else {\n $address = \\UOL\\PagSeguro\\Helper\\Data::addressConfig($shipping['street']);\n\n $this->_paymentRequest->setShipping()->setAddress()->withParameters(\n $this->getShippingAddress($address[0], $shipping),\n $this->getShippingAddress($address[1]),\n $this->getShippingAddress($address[3]),\n \\UOL\\PagSeguro\\Helper\\Data::fixPostalCode($shipping->getPostcode()),\n $shipping->getCity(),\n $this->getRegionAbbreviation($shipping),\n $this->getCountryName($shipping['country_id']),\n $this->getShippingAddress($address[2])\n );\n }\n\n $this->_paymentRequest->setShipping()->setType()\n ->withParameters(\\PagSeguro\\Enum\\Shipping\\Type::NOT_SPECIFIED); //Shipping Type\n $this->_paymentRequest->setShipping()->setCost()\n ->withParameters(number_format($this->getShippingAmount(), 2, '.', '')); //Shipping Coast\n }\n }\n }", "protected function hasShippingData()\n {\n return (bool) $this->getShipmentMethod();\n }", "public function hasShipping();", "public function getShippingAdditionalInformation();", "public function setShipping($var)\n {\n GPBUtil::checkMessage($var, \\Pb\\Shipping::class);\n $this->shipping = $var;\n\n return $this;\n }", "public function getShippingPackage()\n {\n return $this->shippingPackage;\n }", "public static function init_shipping_info() {\r\n\t\t\r\n\t\tself::$dimensions = array(\r\n\t\t\t'_dims_weight' => array(\r\n\t\t\t\t'label' => __( 'Total shipping weight:', 'envoimoinscher' ),\r\n\t\t\t\t'unit' => 'kg',\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t\t'_dims_width' => array(\r\n\t\t\t\t'label' => __( 'Total shipping width:', 'envoimoinscher' ),\r\n\t\t\t\t'unit' => 'cm',\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t\t'_dims_length' => array(\r\n\t\t\t\t'label' => __( 'Total shipping length:', 'envoimoinscher' ),\r\n\t\t\t\t'unit' => 'cm',\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t\t'_dims_height' => array(\r\n\t\t\t\t'label' => __( 'Total shipping height:', 'envoimoinscher' ),\r\n\t\t\t\t'unit' => 'cm',\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t);\r\n\t\t\r\n\t\tself::$content_description = array(\r\n\t\t\t'_desc_content' => array(\r\n\t\t\t\t'label' => __( 'Content description:', 'envoimoinscher' ),\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t\t'_desc_value' => array(\r\n\t\t\t\t'label' => __( 'Declared content value:', 'envoimoinscher' ),\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t);\r\n\t\t\r\n\t\tself::$dimensions = array(\r\n\t\t\t'_dims_weight' => array(\r\n\t\t\t\t'label' => __( 'Total shipping weight:', 'envoimoinscher' ),\r\n\t\t\t\t'label_simple' => __( 'weight', 'envoimoinscher' ),\r\n\t\t\t\t'unit' => 'kg',\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t\t'_dims_width' => array(\r\n\t\t\t\t'label' => __( 'Total shipping width:', 'envoimoinscher' ),\r\n\t\t\t\t'label_simple' => __( 'width', 'envoimoinscher' ),\r\n\t\t\t\t'unit' => 'cm',\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t\t'_dims_length' => array(\r\n\t\t\t\t'label' => __( 'Total shipping length:', 'envoimoinscher' ),\r\n\t\t\t\t'label_simple' => __( 'length', 'envoimoinscher' ),\r\n\t\t\t\t'unit' => 'cm',\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t\t'_dims_height' => array(\r\n\t\t\t\t'label' => __( 'Total shipping height:', 'envoimoinscher' ),\r\n\t\t\t\t'label_simple' => __( 'height', 'envoimoinscher' ),\r\n\t\t\t\t'unit' => 'cm',\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t);\r\n\t\t\r\n\t\tself::$parcel_pickup_point = array(\r\n\t\t\t'_pickup_point' => array(\r\n\t\t\t\t\t'label' => __( 'Customer pickup point:', 'envoimoinscher' ),\r\n\t\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t);\r\n\t\t\r\n\t\tself::$parcel_dropoff_point = array(\r\n\t\t\t'_dropoff_point' => array(\r\n\t\t\t\t'label' => __( 'Dropoff point:', 'envoimoinscher' ),\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t);\r\n\t\t\r\n\t\tself::$insurance = array(\r\n\t\t\t'_insurance' => array(\r\n\t\t\t\t'label' => __( 'Insure this shipment with AXA', 'envoimoinscher' ),\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t);\r\n\t\t\r\n\t\tself::$pickup_date = array(\r\n\t\t\t'_pickup_date' => array(\r\n\t\t\t\t'label' => __( 'Departure date:', 'envoimoinscher' ),\r\n\t\t\t\t'show' => true,\r\n\t\t\t),\r\n\t\t);\r\n \r\n $international_filter = array();\r\n $i = 1; // item type count\r\n\t\t\r\n\t\t$international_filter['proforma_reason'] = array(\r\n 'label' => __( 'Reason for your shipment *', 'envoimoinscher' ),\r\n 'id' => 'proforma_reason',\r\n 'name' => 'proforma_reason',\r\n 'type' => 'select',\r\n 'options' => array(\r\n 'sale' => __( 'Sale', 'envoimoinscher' ),\r\n 'repair' \t=> __( 'Repair', 'envoimoinscher' ),\r\n 'return' => __( 'Return', 'envoimoinscher' ),\r\n 'present' => __( 'Present, gift', 'envoimoinscher' ),\r\n 'sample' \t=> __( 'Sample, model', 'envoimoinscher' ),\r\n 'personal' \t=> __( 'Personal use', 'envoimoinscher' ),\r\n 'company' => __( 'Inter-company documents', 'envoimoinscher' ),\r\n 'other' \t=> __( 'Other', 'envoimoinscher' )\r\n ),\r\n 'show' => true,\r\n 'required' => true\r\n );\r\n\t\t\r\n foreach ( self::$items as $item_id => $item ) {\r\n\t\t\t$international_filter['proforma_'.$i.'_post_title_en'] = array(\r\n\t\t\t\t'label' => __( 'Describe your goods (English):', 'envoimoinscher' ),\r\n\t\t\t\t'show' => true,\r\n\t\t\t);\r\n \r\n $international_filter['proforma_'.$i.'_post_title_fr'] = array(\r\n\t\t\t\t'label' => __( 'Describe your goods (language of the country of origin):', 'envoimoinscher' ),\r\n\t\t\t\t'show' => true,\r\n\t\t\t);\r\n \r\n $international_filter['proforma_'.$i.'_qty'] = array(\r\n\t\t\t\t'label' => __( 'Quantity:', 'envoimoinscher' ),\r\n 'show' => true,\r\n );\r\n \r\n $international_filter['proforma_'.$i.'_price'] = array(\r\n\t\t\t\t'label' => __( 'Unit price:', 'envoimoinscher' ),\r\n\t\t\t\t'unit' => '€',\r\n\t\t\t\t'show' => true,\r\n\t\t\t);\r\n \r\n $international_filter['proforma_'.$i.'_origin'] = array(\r\n\t\t\t\t'label' => __( 'Country:', 'envoimoinscher' ),\r\n\t\t\t\t'show' => true,\r\n\t\t\t);\r\n\r\n\t\t\t$international_filter['proforma_'.$i.'_weight'] = array(\r\n\t\t\t\t'label' => __( 'Unit weight:', 'envoimoinscher' ),\r\n\t\t\t\t'unit' => 'kg',\r\n\t\t\t\t'show' => true,\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$i++;\r\n }\r\n \r\n self::$shipping_international = $international_filter;\r\n\t}", "public function getShippingServiceDetails()\n {\n return $this->shippingServiceDetails;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes all user content for a user in a context in all plagiarism plugins.
public static function delete_plagiarism_for_user(int $userid, \context $context) { static::call_plugin_method('delete_plagiarism_for_user', [$userid, $context]); }
[ "public static function delete_data_for_all_users_in_context(\\context $context) {\n if ($context->contextlevel != CONTEXT_USER) {\n return;\n }\n static::delete_user_data($context->instanceid);\n }", "public static function delete_data_for_all_users_in_context(context $context) {\n }", "public static function delete_data_for_all_users_in_context(\\context $context) {\n }", "public static function delete_data_for_all_users_in_context(\\context $context) {\n // Delete data only for user context.\n if ($context->contextlevel == CONTEXT_USER) {\n static::delete_data($context->instanceid);\n }\n }", "public static function delete_data_for_all_users_in_context(\\context $context) {\n // Only delete data for a user context.\n if ($context->contextlevel == CONTEXT_USER) {\n static::delete_user_data($context->instanceid, $context);\n }\n }", "public static function delete_data_for_all_users_in_context(\\context $context) {\n // Only delete data for user contexts.\n if ($context->contextlevel == CONTEXT_USER) {\n static::delete_user_data($context->instanceid);\n }\n }", "public function deleteAllSuggestionsForUser($user);", "public static function _delete_data_for_all_users_in_context($context) {\n static::delete_data_for_users_and_contexts(\n [],\n [$context->id]\n );\n }", "function delete_all_users();", "function delete_all_user_settings()\n {\n }", "public function deleteAllUser() {\n $this->Detail->deleteAll(array(1 => 1), false);\n $log = $this->Detail->getDataSource()->getLog(false, false);\n debug($log);\n die();\n }", "function delete_all_user_settings()\n{\n}", "function deleteAllUserDataObject()\n\t{\n\t\tilUtil::sendQuestion($this->lng->txt(\"confirm_delete_all_user_data\"));\n\t\t$this->tpl->addBlockFile(\"ADM_CONTENT\", \"adm_content\", \"tpl.il_as_tst_maintenance.html\", \"Modules/Test\");\n\n\t\t$this->tpl->setCurrentBlock(\"confirm_delete\");\n\t\t$this->tpl->setVariable(\"BTN_CONFIRM_DELETE_ALL\", $this->lng->txt(\"confirm\"));\n\t\t$this->tpl->setVariable(\"BTN_CANCEL_DELETE_ALL\", $this->lng->txt(\"cancel\"));\n\t\t$this->tpl->parseCurrentBlock();\n\n\t\t$this->tpl->setCurrentBlock(\"adm_content\");\n\t\t$this->tpl->setVariable(\"FORM_ACTION\", $this->ctrl->getFormAction($this));\n\t\t$this->tpl->parseCurrentBlock();\n\t}", "private function delete_all_user_meta() {\n\t\tglobal $wpdb;\n\n\t\t// Wildcard matches\n\t\t$wpdb->query( \"DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE '%wp_stream%';\" );\n\n\t\t// Specific user meta\n\t\tforeach ( $this->user_meta as $meta_key ) {\n\t\t\t$wpdb->query(\n\t\t\t\t$wpdb->prepare( \"DELETE FROM {$wpdb->usermeta} WHERE meta_key = %s;\", $meta_key )\n\t\t\t);\n\t\t}\n\t}", "private function delete_plugin_data() {\n\t\tdelete_site_transient( 'wp_rocket_update_data' );\n\n\t\t// Delete all user meta related to WP Rocket.\n\t\tdelete_metadata( 'user', '', 'rocket_boxes', '', true );\n\n\t\tarray_walk( $this->transients, 'delete_transient' );\n\t\tarray_walk( $this->options, 'delete_option' );\n\n\t\tforeach ( $this->events as $event ) {\n\t\t\twp_clear_scheduled_hook( $event );\n\t\t}\n\t}", "public function remove_user_from_all_objects($user_id = 0, $meta_key = '', $meta_type = 'post')\n {\n }", "function user_pref_delete_all( $p_user_id ) {\n\t\t$c_user_id\t\t= db_prepare_int( $p_user_id );\n\n\t\tuser_ensure_unprotected( $p_user_id );\n\n\t\t$t_user_pref_table = config_get( 'mantis_user_pref_table' );\n\n\t\t$query = \"DELETE\n\t\t\t\t FROM $t_user_pref_table\n\t\t\t\t WHERE user_id='$c_user_id'\";\n\t\tdb_query( $query );\n\n\t\tuser_pref_clear_cache( $p_user_id );\n\n\t\t# db_query() errors on failure so:\n\t\treturn true;\n\t}", "public static function delete_data_for_all_users_in_context(\\context $context) {\n if ($bookking = self::load_bookking_for_context($context)) {\n $bookking->delete_all_slots();\n }\n }", "function bp_gameful_remove_data( $user_id ) {\n\t/* You'll want to run a function here that will delete all information from any component tables\n\t for this $user_id */\n\n\t/* Remember to remove usermeta for this component for the user being deleted */\n\tdelete_usermeta( $user_id, 'bp_gameful_some_setting' );\n\n\tdo_action( 'bp_gameful_remove_data', $user_id );\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Perform the actual upload from an iframe
public function uploadIframeFile() { //----------------------------------------- // Init //----------------------------------------- $post_key = trim( IPSText::alphanumericalClean( $this->request['post_key'] ) ); $this->error = ''; $insert_id = 0; //----------------------------------------- // Process upload //----------------------------------------- $insert_id = $this->_doUpload( $post_key ); //----------------------------------------- // Output result //----------------------------------------- if( $this->error ) { $JSON = $this->getJson( $this->error, 1, $insert_id ); } else { $JSON = $this->getJson( 'upload_ok', 0, $insert_id ); } $this->ajax->returnHtml( $this->registry->output->getTemplate('bitracker_submit')->filesIframe( $JSON, $this->request['type'] ) ); }
[ "abstract protected function doUpload();", "public function formUploaderFrame() {\n $uploader = UploadFactory::getInstance()->uploaderFromRequest('form');\n die($uploader->getFrameXHtml());\n }", "function formUpload() {\n\t\t$we_button = new we_button();\n\t\t$uploadButton = $we_button->create_button(\"upload\", \"javascript:we_cmd('editor_uploadFile')\", true,150,22,\"\",\"\",false,true,\"\",true);\n\t\t$fs = $GLOBALS[\"we_doc\"]->getFilesize();\n\t\t$fs = $GLOBALS[\"l_metadata\"][\"filesize\"].\": \".round(($fs / 1024),2).\"&nbsp;KB\";\n\t\t$_metaData = $this->getMetaData();\n\t\t$_mdtypes = array();\n\n\t\tif ($_metaData) {\n\t\t\tif (isset($_metaData[\"exif\"]) && count($_metaData[\"exif\"])) {\n\t\t\t\t$_mdtypes[] = \"Exif\";\n\t\t\t}\n\t\t\tif (isset($_metaData[\"iptc\"]) && count($_metaData[\"iptc\"])) {\n\t\t\t\t$_mdtypes[] = \"IPTC\";\n\t\t\t}\n\n\t\t}\n\n\t\t$filetype = $GLOBALS[\"l_metadata\"][\"filetype\"].\": \";\n\t\tif(!empty($this->Extension)) {\n\t\t\t$filetype .= substr($this->Extension,1);\n\t\t}\n\n\t\tif ($_SESSION[\"we_mode\"] == \"seem\") {\n\t\t\t$md = \"\";\n\t\t} else {\n\t\t\t$md = $GLOBALS[\"l_metadata\"][\"supported_types\"].\": \";\n\t\n\t\t\tif(count($_mdtypes) > 0) {\n\t\t\t\t$_mdTypesTxt = implode(\", \", $_mdtypes);\n\t\t\t} else {\n\t\t\t\t$_mdTypesTxt = $GLOBALS[\"l_metadata\"][\"none\"];\n\t\t\t}\n\t\n\t\t\t$md .= '<a href=\"javascript:parent.frames[0].setActiveTab(\\'tab_2\\');we_cmd(\\'switch_edit_page\\',2,\\''.$GLOBALS['we_transaction'].'\\');\">';\n\t\t\t$md.= $_mdTypesTxt;\n\t\t\t$md .= '</a>';\n\t\t}\n\t\t\n\t\t$foo = '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"500\">\n\t\t';\n\t\t\t$foo .= '<tr style=\"vertical-align:top;\">\n\t\t\t\t\t\t<td class=\"defaultfont\">' .\n\t\t\t\t\t\t$uploadButton . '<br />' .\n\t\t\t\t\t\t$fs . '<br />' .\n\t\t\t\t\t\t$filetype . '<br />'.\n\t\t\t\t\t\t$md . '</td>\n\t\t\t\t\t\t<td width=\"100px\" style=\"text-align:right;\">';\n\t\t\t\t\t\t\t$foo.=$this->getThumbnail();\n\t\t\t$foo .= '</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>' . getPixel(2, 20) . '</td>\n\t\t\t\t\t\t\t<td>' . getPixel(2, 20) . '</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>';\n\t\t\tif($GLOBALS[\"we_doc\"]->getFilesize() != 0){\n\t\t\t\t\t$foo .= '<td colspan=\"2\" class=\"defaultfont\">' . htmlAlertAttentionBox($GLOBALS['l_we_class'][\"upload_will_replace\"],1,508) . '</td>';\n\t\t\t} else {\n\t\t\t\t\t$foo .= '<td colspan=\"2\" class=\"defaultfont\">' . htmlAlertAttentionBox($GLOBALS['l_we_class'][\"upload_single_files\"],1,508) . '</td>';\n\t\t\t}\n\t\t\t$foo .= '</tr>';\n\n\n\t\t$foo .= '</table>';\n\n\t\treturn $foo;\n\t}", "public function upload()\n {\n $callback = 'null';\n $url = '';\n $get = array();\n\n // for form action, pull CKEditorFuncNum from GET string. e.g., 4 from\n // /form/upload?CKEditor=content&CKEditorFuncNum=4&langCode=en\n // Convert GET parameters to PHP variables\n $qry = $_SERVER['REQUEST_URI'];\n parse_str(substr($qry, strpos($qry, '?') + 1), $get);\n\n if (!isset($_POST) || !isset($get['CKEditorFuncNum'])) {\n $msg = 'CKEditor instance not defined. Cannot upload image.';\n } else {\n $callback = $get['CKEditorFuncNum'];\n\n try {\n $url = $this->_move_image($_FILES['upload']);\n $msg = \"File uploaded successfully to: {$url}\";\n\n // Persist additions to file manager CMS here.\n\n } catch (Exception $e) {\n $url = '';\n $msg = $e->getMessage();\n }\n }\n\n $output = '<html><body><script type=\"text/javascript\">' .\n 'window.parent.CKEDITOR.tools.callFunction(' .\n $callback .\n ', \"' .\n $url .\n '\", \"' .\n $msg .\n '\");</script></body></html>';\n\n echo $output;\n }", "function instant_ide_file_editor_upload_form() {\n\n?>\n <div id=\"instant-ide-file-editor-upload-form-overlay\" style=\"display:none;\"></div>\n <div id=\"instant-ide-file-editor-upload-form-container\" style=\"display:none;\">\n <form id=\"instant-ide-file-editor-upload-form\" action=\"/\" method=\"POST\">\n <i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i>\n <div id=\"instant-ide-file-upload-wrap\">\n <p>Select file to upload: <input type=\"file\" id=\"instant-ide-file-upload\" name=\"uploads[]\" multiple=\"\"/></p>\n </div>\n <button id=\"instant-ide-upload-button\" type=\"submit\">Upload</button>\n <img class=\"instant-ide-ajax-save-spinner\" src=\"<?php echo IIDE_URL; ?>assets/css/images/ajax-save-in-progress.gif\" />\n <div id=\"instant-ide-file-upload-progress\"></div>\n </form>\n </div>\n<?php\n\t\n}", "function getUploadIframe() {\n\t\treturn <<<HTML\n\t\t<iframe name=\"AssetAdmin_upload\" src=\"admin/assets/uploadiframe/{$this->ID}\" id=\"AssetAdmin_upload\" border=\"0\" style=\"border-style none !important; width: 97%; min-height: 300px; height: 100%; height: expression(document.body.clientHeight) !important;\">\n\t\t</iframe>\nHTML;\n\t}", "public function upload();", "private function __common_remote_file_upload() {\n\t\t$url = $this->request->query ['url'];\n\t\t\n\t\t$sub_folder_path = $this->request->query ['sub_folder_path'];\n\t\t$document_type = isset ( $this->request->query ['document_type'] ) ? $this->request->query ['document_type'] : '';\n\t\t$url_upload_sql_no = isset ( $this->request->query ['url_upload_sql_no'] ) ? $this->request->query ['url_upload_sql_no'] : '';\n\t\t$client_role_id = isset ( $this->request->query ['client_role_id'] ) ? $this->request->query ['client_role_id'] : '';\n\t\t\n\t\t$upload_dir = $this->__getUploadDirPath ( $sub_folder_path );\n\t\t// by default we accept only images\n\t\t$accept_file_types = $this->__getAcceptedDocumentTypes ( $document_type );\n\t\t\n\t\t$options = array (\n\t\t\t\t'url' => $url,\n\t\t\t\t'upload_dir' => $upload_dir,\n\t\t\t\t'accept_file_types' => $accept_file_types,\n\t\t\t\t'upload_url' => $upload_dir,\n\t\t\t\t'client_role_id' => $client_role_id,\n\t\t\t\t'url_upload_sql_no' => $url_upload_sql_no,\n\t\t\t\t'max_file_size' => $this->MAX_FILE_SIZE_ALLOWED_IN_BYTES ,\n\t\t\t\t'document_type'=>$document_type\n\t\t);\n \n if(isset($data['contract_of_sale']))\n $options['contract_of_sale'] =$data['contract_of_sale']; \n \n\t\t$this->RemoteFileUpload->upload_remote_file ( $options );\n\t}", "function processUpload()\r\n\t{\r\n\t}", "function ombumedia_page_media_ajax_upload() {\n module_load_include('inc', 'file_entity', 'file_entity.pages');\n $errors = array();\n $validators = file_entity_get_upload_validators();\n if ($file = file_save_upload(0, $validators)) {\n\n $type_candidates = file_entity_get_filetype_candidates($file);\n\n if (count($type_candidates) >= 1) {\n\n if ($moved_file = file_move($file, 'public://' . file_uri_target($file->uri), FILE_EXISTS_RENAME)) {\n $type_candidates_keys = array_keys($type_candidates);\n $file = $moved_file;\n $file->type = reset($type_candidates_keys);;\n }\n else {\n $errors[] = 'Error saving file.';\n }\n\n }\n else {\n $errors[] = 'Unrecognized file type.';\n }\n\n }\n else {\n $messages = drupal_get_messages('error');\n if (!empty($messages['error'])) {\n $errors[] = $messages['error'];\n }\n else {\n $errors[] = 'Error saving file.';\n }\n }\n\n if (empty($errors)) {\n $file->display = TRUE;\n $file->status = FILE_STATUS_PERMANENT;\n file_save($file);\n $file = file_load($file->fid);\n drupal_json_output(array(\n 'file' => (array) $file,\n ));\n\n }\n else {\n drupal_json_output(array('errors' => $errors));\n }\n drupal_exit();\n}", "function media_upload_xhr($ns,$auth){\n if(!checkSecurityToken()) return false;\n global $INPUT;\n\n $id = $INPUT->get->str('qqfile');\n list($ext,$mime) = mimetype($id);\n $input = fopen(\"php://input\", \"r\");\n if (!($tmp = io_mktmpdir())) return false;\n $path = $tmp.'/'.md5($id);\n $target = fopen($path, \"w\");\n $realSize = stream_copy_to_stream($input, $target);\n fclose($target);\n fclose($input);\n if (isset($_SERVER[\"CONTENT_LENGTH\"]) && ($realSize != (int)$_SERVER[\"CONTENT_LENGTH\"])){\n unlink($path);\n return false;\n }\n\n $res = media_save(\n array('name' => $path,\n 'mime' => $mime,\n 'ext' => $ext),\n $ns.':'.$id,\n (($INPUT->get->str('ow') == 'checked') ? true : false),\n $auth,\n 'copy'\n );\n unlink($path);\n if ($tmp) io_rmdir($tmp, true);\n if (is_array($res)) {\n msg($res[0], $res[1]);\n return false;\n }\n return $res;\n}", "private function uploadMeInASession()\n\t{\n\t\t$files = array(__FILE__);\n\t\t$ch = \\curl_init();\n\t\t\\curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . self::SESSION_ID);\n\t\t$refs = \\Foomo\\Zugspitze\\Upload\\Client::uploadFilesToRemoteServer($files, null, $ch);\n\t\t$me = file_get_contents(__FILE__);\n\t\tforeach ($refs as $uploadReference) $upload = \\Foomo\\Zugspitze\\Upload\\Server::getUpload($uploadReference->id);\n\t\t$server = \\Foomo\\Utils::getServerUrl();\n\t\t$reflectionUrl = $server . \\Foomo\\ROOT_HTTP . '/modules/' . \\Foomo\\Zugspitze\\Module::NAME . '/upload.php?id=' . $uploadReference->id . '&d';\n\t\t\\curl_setopt($ch, CURLOPT_POST, 0);\n\t\t\\curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\\curl_setopt($ch, CURLOPT_URL, $reflectionUrl);\n\t\treturn $ch;\n\t}", "public function do_media_upload_form( $width, $height ) {\r\n\r\n // Prepare globals and variables.\r\n global $is_IE, $is_opera;\r\n $sizes = array( 'KB', 'MB', 'GB' );\r\n $max_upload_size = wp_max_upload_size();\r\n\r\n ?>\r\n <script type=\"text/javascript\">var resize_width = <?php echo $width; ?>, resize_height = <?php echo $height; ?>;</script>\r\n <div id=\"soliloquy-upload-error\"></div>\r\n <div id=\"soliloquy-plupload-upload-ui\" class=\"hide-if-no-js\">\r\n <?php do_action( 'pre-plupload-upload-ui' ); ?>\r\n <div id=\"soliloquy-drag-drop-area\">\r\n <div class=\"drag-drop-inside\">\r\n <p class=\"drag-drop-info\"><?php _e( 'Drop images here', 'soliloquy' ); ?></p>\r\n <p><?php _ex( 'or', 'Uploader: Drop images here - or - Select Images', 'soliloquy' ); ?></p>\r\n <p class=\"drag-drop-buttons\">\r\n <input id=\"soliloquy-plupload-browse-button\" type=\"button\" value=\"<?php esc_attr_e( 'Select Images', 'soliloquy' ); ?>\" class=\"button\" />\r\n </p>\r\n </div>\r\n </div>\r\n <?php do_action( 'post-plupload-upload-ui' ); ?>\r\n </div>\r\n\r\n <div id=\"soliloquy-html-upload-ui\" class=\"hide-if-js\">\r\n <?php do_action('pre-html-upload-ui'); ?>\r\n <p id=\"soliloquy-async-upload-wrap\">\r\n <label class=\"screen-reader-text\" for=\"soliloquy-async-upload\"><?php _e( 'Upload', 'soliloquy' ); ?></label>\r\n <input type=\"file\" name=\"async-upload\" id=\"soliloquy-async-upload\" />\r\n <?php submit_button( __( 'Upload', 'soliloquy' ), 'button', 'html-upload', false ); ?>\r\n <a href=\"#\" onclick=\"try{top.tb_remove();}catch(e){};return false;\"><?php _e( 'Cancel', 'soliloquy' ); ?></a>\r\n </p>\r\n <div class=\"clear\"></div>\r\n <?php do_action( 'post-html-upload-ui' ); ?>\r\n </div>\r\n\r\n <span class=\"max-upload-size\"><?php printf( __( 'Maximum upload file size: %d%s.', 'soliloquy' ), esc_html( $this->get_upload_size_unit( $sizes ) ), esc_html( $sizes[$this->get_upload_size_unit( $sizes, 'unit' )] ) ); ?></span>\r\n <?php\r\n\r\n // Output a notice if the browser may have trouble with uploading large images.\r\n if ( ( $is_IE || $is_opera ) && $max_upload_size > 100 * 1400 * 1400 ) {\r\n echo '<span class=\"big-file-warning\">' . __( 'Your browser has some limitations uploading large files with the multi-file uploader. Please use the browser uploader for files over 100MB.', 'soliloquy' ) . '</span>';\r\n }\r\n\r\n do_action( 'post-upload-ui' );\r\n\r\n }", "function imagepicker_upload() {\n variable_del('imagepicker_advanced_browser_pagestart');\n if (variable_get('imagepicker_upload_progress_enabled', 1)) {\n $content = imagepicker_upload_progress_get_script(variable_get('imagepicker_upload_progress_delay', 0));\n }\n $content .= imagepicker_quota_ok('iframe', FALSE, '', t('Upload images. You can give them a title and description'));\n theme('imagepicker', $content);\n}", "function upload_share() {\n\t\t$forceXHR = setXHRDebug($this, 0);\n\t\t$data = $_POST ? $_POST : $this->data;\n\t\t$this->autoRender = false;\t\t\n\t\tif (!empty($data)){\n\t\t\t$this->log(\"POST to /gallery/upload_share\", LOG_DEBUG);\n\t\t\t$this->log($data, LOG_DEBUG);\n\t\t\t$success = true;\n\t\t\t$message = \"POST data logged on server.\";\n\t\t\t$response = $data;\n\t\t\t$this->viewVars['jsonData'] = compact('success', 'message', 'response');\n\t\t\t$done = $this->renderXHRByRequest('json', null, null , 0);\t\t\t\n\t\t\tif ($done) return; \n\t\t}\n\t}", "public function handleFileUpload()\n {\n $publicId = sha1(uniqid(rand(), true));\n $uploader = phpb_instance(Uploader::class, ['files']);\n $uploader\n ->file_name($publicId . '/' . str_replace(' ', '-', $uploader->file_src_name))\n ->upload_to(phpb_config('storage.uploads_folder') . '/')\n ->run();\n\n if (! $uploader->was_uploaded) {\n die(\"Upload error: {$uploader->error}\");\n } else {\n $originalFile = str_replace(' ', '-', $uploader->file_src_name);\n $originalMime = $uploader->file_src_mime;\n $serverFile = $uploader->final_file_name;\n\n $uploadRepository = new UploadRepository;\n $uploadedFile = $uploadRepository->create([\n 'public_id' => $publicId,\n 'original_file' => $originalFile,\n 'mime_type' => $originalMime,\n 'server_file' => $serverFile\n ]);\n\n echo json_encode([\n 'data' => [\n 'public_id' => $publicId,\n 'src' => $uploadedFile->getUrl(),\n 'type' => 'image'\n ]\n ]);\n exit();\n }\n }", "public function uploadVideo()\n {\n return $this->directUpload();\n }", "public function uploader_action() {\r\n\t\tMainWP_Child_Misc::get_instance()->uploader_action();\r\n\t}", "static function upload_file() {\n\t\tcheck_ajax_referer( 'wpuf_featured_img_upload', 'nonce' );\n\n\t\t$upload_data = array(\n\t\t\t'name' => $_FILES['wpuf_featured_img']['name'],\n\t\t\t'type' => $_FILES['wpuf_featured_img']['type'],\n\t\t\t'tmp_name' => $_FILES['wpuf_featured_img']['tmp_name'],\n\t\t\t'error' => $_FILES['wpuf_featured_img']['error'],\n\t\t\t'size' => $_FILES['wpuf_featured_img']['size']\n\t\t);\n\n\t\t$attach_id = wpuf_upload_file( $upload_data );\n\n\t\tif ( $attach_id ) {\n\t\t\t$html = WPUF_Featured_Image::attach_html( $attach_id );\n\n\t\t\t$response = array(\n\t\t\t\t'success' => true,\n\t\t\t\t'html' => $html,\n\t\t\t);\n\n\t\t\techo json_encode( $response );\n\t\t\texit;\n\t\t}\n\n\t\t$response = array('success' => false);\n\t\techo json_encode( $response );\n\t\texit;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to help debug a function that uses SQL
function debug_sqlfnc($sql, $dberr) { print "<br /><br /><pre>error: " . $dberr . "<br />"; print "SQL is: " . $sql; print "</pre><br /><br />"; }
[ "protected function printSqlCheck() {}", "function debug_sql() {\n global $c_debug_sql;\n global $c_debug_sql_analyze;\n global $debuginfo;\n if ($c_debug_sql == 1) {\n echo \"<div class='centerbig'>\\n\";\n echo \"<div class='block'>\\n\";\n echo \"<div class='dataBlock'>\\n\";\n echo \"<div class='blockHeader'>SQL Debugging</div>\\n\";\n echo \"<div class='blockContent'>\\n\";\n echo \"<textarea rows=20 class='debugsql'>\";\n if (is_array($debuginfo)) {\n foreach ($debuginfo as $val) {\n echo \"$val\\n\";\n if ($c_debug_sql_analyze == 1) {\n $pattern = '/^SELECT.*$/';\n if (preg_match($pattern, $val)) {\n echo str_repeat(\"-\", 80) .\"\\n\";\n $sql = \"EXPLAIN ANALYZE $val\";\n $result = pg_query($sql);\n while ($row = pg_fetch_assoc($result)) {\n $stuff = $row[\"QUERY PLAN\"];\n echo \"$stuff\\n\";\n }\n echo str_repeat(\"-\", 80) .\"\\n\";\n }\n }\n echo \"\\n\";\n }\n }\n echo \"</textarea>\\n\";\n echo \"</div>\\n\"; #</blockContent>\n echo \"<div class='blockFooter'></div>\\n\";\n echo \"</div>\\n\"; #</dataBlock>\n echo \"</div>\\n\"; #</block>\n echo \"</div>\\n\"; #</centerbig>\n }\n}", "function debug_sql($cmd, $level) {\n $trace = $_GET['sql'];\n if ($trace >= $level) {\n print(\"\\n<pre>SQL: $cmd</pre>\");\n }\n}", "function execLog($sql){\n }", "public function debug_query()\n\t{\n\t\t$this->db->debug_query();\n\t}", "function ociinternaldebug () {}", "function dumpSQL() {\n $db = Zend_Db_Table::getDefaultAdapter();\n $dbProfiler = $db->getProfiler();\n $dbQuery = $dbProfiler->getLastQueryProfile();\n $dbSQL = $dbQuery->getQuery();\n\n print_r($dbSQL);\n\n return;\n}", "public function get_sql();", "function coder_test_sql() {\n $sql = 'select * from {node}'; // lower case\n $sql = 'insert into {node} (changed) VALUES (%d)'; // lower case\n $sql = 'delete from {node}'; // lower case\n $sql = 'update {node} set changed = now()'; // lower case\n $var = t('select something from this');\n $var = t('update something');\n $var = t('insert something');\n $var = t('delete something');\n $sql = 'INSERT INTO node (changed) VALUES (1)';\n $sql = 'SELECT * FROM {node} LIMIT 10';\n $sql = \"SELECT * FROM {node} WHERE nid=$nid\"; // unsecure \n}", "function print_query($function_name, $query){\n//output = \n print \"------------$function_name----------\\n\";\n print \"sql_query = $query\\n\";\n print \"---------------------------------\\n\";\n}", "public function debugQuery($q = NULL) {\r\n\t\t$this->debug($q, 'SQL');\r\n\t\t$this->debug(mysql_error());\r\n\t}", "public function debug_query()\n\t{\n\t\t$this->_parent_model->db()->debug_query();\n\t}", "function writeDebug($SSHresults,$tdrug,$patientSearch,$orderday){\n\t}", "public function getRealSQLStatement();", "function display_sql(){\n #\n # Formating for sqlplus\n #\n u::p('set linesize 200');\n u::p('set pagesize 999');\n u::p('set feedback off');\n u::p('col s_time format a8');\n u::p('col active_sessions format a20');\n u::p('col on_cpu format 900');\n u::p('col user_io format 900');\n u::p('col system_io format 900');\n u::p('col other format 900');\n u::p('col sessions_in_lock format a15');\n u::p('col sql_id format a15');\n u::p('col sql_ids format a60');\n u::p('col sql_text format a90');\n u::p('col sid format 9999');\n u::p('col to_kill format a25');\n u::p('col username format a10');\n u::p('col program format a40');\n u::p('col sids_on_cpu format a40');\n u::p('col sids_user_io format a15');\n u::p('col sids_system_io format a15');\n u::p('col sids_blocked format a16');\n u::p('col others format a15'); \n u::p('----------------------');\n #\n # Dump out the sql we have run\n #\n foreach( $this->sql_details as $sql_detail ) u::p($sql_detail);\n }", "static function print_queries()\n\t{\n\t\tstatic::debug(DB::getQueryLog());\n\t}", "public function logToSQL() {\n\n }", "function msql_error()\n{\n}", "static public function debugPDO($raw_sql, $parameters) {\n\n $keys = array();\n $values = $parameters;\n\n foreach ($parameters as $key => $value) {\n\n // check if named parameters (':param') or anonymous parameters ('?') are used\n if (is_string($key)) {\n $keys[] = '/' . $key . '/';\n } else {\n $keys[] = '/[?]/';\n }\n\n // bring parameter into human-readable format\n if (is_string($value)) {\n $values[$key] = \"'\" . $value . \"'\";\n } elseif (is_array($value)) {\n $values[$key] = implode(',', $value);\n } elseif (is_null($value)) {\n $values[$key] = 'NULL';\n }\n }\n\n /*\n if (ENVIRONMENT != 'release') {\n echo \"<br> [DEBUG] Keys:<pre>\";\n print_r($keys);\n echo \"\\n[DEBUG] Values: \";\n print_r($values);\n echo \"</pre>\";\n }\n */\n \n \n $raw_sql = preg_replace($keys, $values, $raw_sql, 1, $count);\n\n return $raw_sql;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modifyes the display depending on the state of the session object.
function updateDisplay(&$sessionobject, &$displayobject) { if ($sessionobject->_session_vars['system'] == 'NONE') { $displayobject->update_basic('status', 'Please choose a system to import from'); $displayobject->update_basic('displaymodules', 'FALSE'); $displayobject->update_basic('choosesystem', 'TRUE'); } else { $displayobject->update_basic('system', $sessionobject->_session_vars['system']); } for ($i = 0; $i <= $sessionobject->get_number_of_modules(); $i++) { $position = str_pad($i, 3, '0', STR_PAD_LEFT); if ($sessionobject->_session_vars[$position] == 'WORKING') { $displayobject->update_basic('displaylinks', 'FALSE'); } } }
[ "public static function display()\n\t{\n\t\techo '<pre>';\n\t\tprint_r($_SESSION);\n\t\techo '</pre>';\n\t}", "public function setDisplay( $bool );", "function displaySessions()\n\t{\n\t\trequire_once('Services/Authentication/classes/class.ilSessionControl.php');\n\n\t\t$this->checkDisplayMode(\"setup_sessions\");\n\n\t\tif (!$this->setup->getClient()->db_installed)\n\t\t{\n\t\t\t// program should never come to this place\n\t\t\t$message = \"No database found! Please install database first.\";\n\t\t\tilUtil::sendInfo($message);\n\t\t}\n\n\t\t$setting_fields = ilSessionControl::getSettingFields();\n\n\t\t$valid = true;\n\t\t$settings = array();\n\n\t\tforeach( $setting_fields as $field )\n\t\t{\n\t\t\tif( $field == 'session_allow_client_maintenance' )\n\t\t\t{\n\t\t\t\tif( isset($_POST[$field]) )\t\t$_POST[$field] = '1';\n\t\t\t\telse\t\t\t\t\t\t\t$_POST[$field] = '0';\n\t\t\t}\n\n\t\t\tif( isset($_POST[$field]) && $_POST[$field] != '' )\n\t\t\t{\n\t\t\t\t$settings[$field] = $_POST[$field];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$valid = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tif($valid) $this->setup->setSessionSettings($settings);\n\n\t\t$settings = $this->setup->getSessionSettings();\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\n\t\tinclude_once 'Services/Authentication/classes/class.ilSession.php';\n\n\t\t// BEGIN SESSION SETTINGS\n\t\t// create session handling radio group\n\t\t$ssettings = new ilRadioGroupInputGUI($this->lng->txt('sess_mode'), 'session_handling_type');\n\t\t$ssettings->setValue($settings['session_handling_type'], ilSession::SESSION_HANDLING_FIXED);\n\n\t\t// first option, fixed session duration\n\t\t$fixed = new ilRadioOption($this->lng->txt('sess_fixed_duration'), ilSession::SESSION_HANDLING_FIXED);\n\n\t\t// add session handling to radio group\n\t\t$ssettings->addOption($fixed);\n\n\t\t// second option, session control\n\t\t$ldsh = new ilRadioOption($this->lng->txt('sess_load_dependent_session_handling'), ilSession::SESSION_HANDLING_LOAD_DEPENDENT);\n\n\t\t// this is the max count of active sessions\n\t\t// that are getting started simlutanously\n\t\t$ti = new ilTextInputGUI($this->lng->txt('sess_max_session_count'), \"session_max_count\");\n\t\t$ti->setInfo($this->lng->txt('sess_max_session_count_info'));\n\t\t$ti->setMaxLength(5);\n\t\t$ti->setSize(5);\n\t\t$ti->setValue($settings['session_max_count']);\n\t\t$ldsh->addSubItem($ti);\n\n\t\t// after this (min) idle time the session can be deleted,\n\t\t// if there are further requests for new sessions,\n\t\t// but max session count is reached yet\n\t\t$ti = new ilTextInputGUI($this->lng->txt('sess_min_session_idle'), \"session_min_idle\");\n\t\t$ti->setInfo($this->lng->txt('sess_min_session_idle_info'));\n\t\t$ti->setMaxLength(5);\n\t\t$ti->setSize(5);\n\t\t$ti->setValue($settings['session_min_idle']);\n\t\t$ldsh->addSubItem($ti);\n\n\t\t// after this (max) idle timeout the session expires\n\t\t// and become invalid, so it is not considered anymore\n\t\t// when calculating current count of active sessions\n\t\t$ti = new ilTextInputGUI($this->lng->txt('sess_max_session_idle'), \"session_max_idle\");\n\t\t$ti->setInfo($this->lng->txt('sess_max_session_idle_info'));\n\t\t$ti->setMaxLength(5);\n\t\t$ti->setSize(5);\n\t\t$ti->setValue($settings['session_max_idle']);\n\t\t$ldsh->addSubItem($ti);\n\n\t\t// this is the max duration that can elapse between the first and the secnd\n\t\t// request to the system before the session is immidietly deleted\n\t\t$ti = new ilTextInputGUI($this->lng->txt('sess_max_session_idle_after_first_request'), \"session_max_idle_after_first_request\");\n\t\t$ti->setInfo($this->lng->txt('sess_max_session_idle_after_first_request_info'));\n\t\t$ti->setMaxLength(5);\n\t\t$ti->setSize(5);\n\t\t$ti->setValue($settings['session_max_idle_after_first_request']);\n\t\t$ldsh->addSubItem($ti);\n\n\t\t// add session control to radio group\n\t\t$ssettings->addOption($ldsh);\n\n\t\t$form->addItem($ssettings);\n\n\t\t// controls the ability t maintenance the following\n\t\t// settings in client administration\n\t\t$chkb = new ilCheckboxInputGUI($this->lng->txt('sess_allow_client_maintenance'), \"session_allow_client_maintenance\");\n\t\t$chkb->setInfo($this->lng->txt('sess_allow_client_maintenance_info'));\n\t\t$chkb->setChecked($settings['session_allow_client_maintenance'] ? true : false);\n\t\t$form->addItem($chkb);\n\t\t// END SESSION SETTINGS\n\n\t\t// save and cancel commands\n\t\t$form->addCommandButton(\"sess\", $this->lng->txt('save'));\n\n\t\t$form->setTitle($this->lng->txt(\"sess_sessions\"));\n\t\t$form->setFormAction('setup.php?client_id='.$this->client_id.'&cmd=sess');\n\n\t\t$this->tpl->setVariable(\"TXT_SETUP_TITLE\",ucfirst(trim($this->lng->txt('sess_sessions'))));\n\t\t$this->tpl->setVariable(\"TXT_INFO\", '');\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\", $form->getHTML());\n\n\t\t/*$this->setButtonPrev(\"db\");\n\n\t\tif($this->setup->checkClientSessionSettings($this->client,true))\n\t\t{\n\t\t\t$this->setButtonNext(\"lang\");\n\t\t}*/\n\n\t\t$this->checkPanelMode();\n\t}", "public function changeViewStyle()\r\n\t\t{\r\n\t\t\tif(isset($_SESSION['primrix']['user'])){ //security check\r\n\t\t\t\tif(UserModel::getLoginSession()){ //session time check\t\t\t\r\n\t\t\t\t\t$vS = Uri::$array[3];\r\n\t\t\t\t\tif($vS == 's') $_SESSION['assetManager']['viewStyle'] = 's';\r\n\t\t\t\t\telse if($vS == 'm') $_SESSION['assetManager']['viewStyle'] = 'm';\r\n\t\t\t\t\telse if($vS == 'l') $_SESSION['assetManager']['viewStyle'] = 'l';\r\n\t\t\t\t\techo '';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function show()\n {\n if (isset($_SESSION['message'])) {\n //echo $_SESSION['status'];\n echo $_SESSION['message'];\n //unset($_SESSION['message']);\n //unset($_SESSION['status']);\n session_destroy();\n }\n }", "public function display()\n {\n $this->mode->display();\n }", "public function display() {\n $_SESSION['game']->updateScore();\n $_SESSION['game']->updateState();\n if ($_SESSION['game']->getState() == Game::INGAME) {\n $this->onAction();\n $_SESSION['game']->updateState();\n }\n $this->gameDao->updateGame($_SESSION['game']);\n $this->gameVue->vue($_SESSION['game'], $this->gameDao->getBestScore($_SESSION['login']));\n }", "public function _system_settings_display()\n\t{\n\t\tView::factory('system_settings_display')->render(TRUE);\n\t}", "function display() {\r\n\t\tif(is_admin()) {\r\n\t\t\t$is_updated = $this->configuration();\r\n\t\t\tinclude_once('views/admin.php');\r\n\t\t} // end if\r\n\t}", "public static function display(){\n\t if(isset($_SESSION['flash']))\n\t {$message_name = array_keys($_SESSION['flash'])[0]; \n\t echo \"<div class=\\\"alert alert-{$message_name} text-dark\\\" role=\\\"alert\\\">\n\t {$_SESSION['flash'][$message_name]} \n\t </div>\";\n\t unset($_SESSION['flash']); \n\t };\n\t}", "public function setConfigDisplay($input) {\n\t\t$this->_configDisplay = ($input ? 1 : 0);\n\t}", "function showStatusPage() {\n\t\t$this->setCacheLevelNone();\n\t\t\n\t\t$this->getEngine()->assign('oModel', utilityOutputWrapper::wrap($this->getModel()));\n\t\t\n\t\t$this->getEngine()->assign($this->getModel()->getStats());\n\t\t\n\t\t$sections = $this->getEngine()->getTemplateVar('sections');\n\t\t$server_status = $this->getEngine()->getTemplateVar('server_status');\n\t\t\n\t\t$this->getEngine()->assign('tables', 1);\n\t\t$this->getEngine()->assign('rows_per_table', ceil(count($sections['com']['vars'])/$this->getEngine()->getTemplateVar('tables')));\n\t\t$this->getEngine()->assign('perc_factor', 100 / ($server_status['Questions'] - $server_status['Connections']));\n\t\t\n\t\t$this->render($this->getTpl('status'));\n\t}", "public function showState() {\n\t\tprintf(\"Original Status: %s\\n\", $this->getState());\n\t}", "public function render() {\n /* if the user and view(s) are defined, \n * assign the user session to the view(s)\n */\n if ($this->user) {\n if ($this->actionView) {\n $key = \"user\";\n if ($this->actionView->get($key, false)) {\n $key = \"__user\";\n }\n $this->actionView->set($key, $this->user);\n }\n if ($this->layoutView) {\n $key = \"user\";\n if ($this->layoutView->get($key, false)) {\n $key = \"__user\";\n }\n $this->layoutView->set($key, $this->user);\n }\n }\n parent::render();\n }", "public function render() {\n /* if the user and view(s) are defined, \n * assign the user session to the view(s)\n */\n if ($this->user) {\n if ($this->actionView) {\n $key = \"user\";\n if ($this->actionView->get($key, false)) {\n $key = \"__user\";\n }\n $this->actionView->set($key, $this->user);\n }\n if ($this->layoutView) {\n $key = \"user\";\n if ($this->layoutView->get($key, false)) {\n $key = \"__user\";\n }\n $this->layoutView->set($key, $this->user);\n }\n }\n parent::render();\n }", "function stShowCards() {\r\n $this->gamestate->setAllPlayersMultiactive();\r\n }", "public function display($key = null) {\n if ($this->is_set($key)) {\n echo '<pre>';\n print_r($_SESSION[$key]);\n echo '</pre>';\n } elseif (is_null($key)) {\n echo '<pre>';\n print_r($_SESSION);\n echo '</pre>';\n }\n }", "function render(){\r\n\t\t\t$this->auth->is_auth() ? $this->index->state['user']() : $this->index->state['guest']();\r\n\t\t}", "public function displayEditScreen()\n {\n if ($this->conf['edit']) { // If editing is enabled\n $origArr = $this->getTypoScriptFrontendController()->sys_page->getRawRecord($this->theTable, $this->dataArr['uid'] ? $this->dataArr['uid'] : $this->recUid);\n\n if ($this->getTypoScriptFrontendController()->loginUser || $this->aCAuth($origArr)) { // Must be logged in OR be authenticated by the aC code in order to edit\n // If the recUid selects a record.... (no check here)\n if (is_array($origArr)) {\n if ($this->aCAuth($origArr) || $this->DBmayFEUserEdit($this->theTable, $origArr, $this->getTypoScriptFrontendController()->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf'])) {\n // Display the form, if access granted.\n $content = $this->displayEditForm($origArr);\n } else { // Else display error, that you could not edit that particular record...\n $content = $this->getPlainTemplate('###TEMPLATE_NO_PERMISSIONS###');\n }\n } elseif ($this->getTypoScriptFrontendController()->loginUser) {\n // If the recUid did not select a record, we display a menu of records. (eg. if no recUid)\n $lockPid = $this->conf['edit.']['menuLockPid'] ? ' AND pid='.intval($this->thePid) : '';\n\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n '*',\n $this->theTable,\n '1 ' .\n $lockPid.\n $this->DBmayFEUserEditSelect(\n $this->theTable,\n $this->getTypoScriptFrontendController()->fe_user->user,\n $this->conf['allowedGroups'],\n $this->conf['fe_userEditSelf']\n ) .\n $this->getTypoScriptFrontendController()->sys_page->deleteClause($this->theTable)\n );\n\n if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) { // If there are menu-items ...\n $templateCode = $this->getPlainTemplate('###TEMPLATE_EDITMENU###');\n $out = '';\n $itemCode = $this->cObj->getSubpart($templateCode, '###ITEM###');\n while ($menuRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n $markerArray = $this->cObj->fillInMarkerArray(array(), $menuRow, '', true, 'FIELD_', $this->recInMarkersHSC);\n $markerArray = $this->setCObjects($itemCode, $menuRow, $markerArray, 'ITEM_');\n $out .= $this->cObj->substituteMarkerArray($itemCode, $markerArray);\n }\n $content = $this->cObj->substituteSubpart($templateCode, '###ALLITEMS###', $out);\n } else { // If there are not menu items....\n $content = $this->getPlainTemplate('###TEMPLATE_EDITMENU_NOITEMS###');\n }\n } else {\n $content = $this->getPlainTemplate('###TEMPLATE_AUTH###');\n }\n } else {\n // Finally this is if there is no login user. This must tell that you must login. Perhaps link to a page with create-user or login information.\n $content = $this->getPlainTemplate('###TEMPLATE_AUTH###');\n }\n } else {\n $content = 'Edit-option is not set in TypoScript';\n }\n\n return $content;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the object mode property The object mode may be one of: 'list' 'fixed' 'singleton' Singleton mode should make objects act as an array with one and only one element. Fixed mode should make objects act as an array with fixed keys. List mode is the default behavior Throw an exception if "mode" has no meaning in your class.
public function getMode() { $ret_val = false; switch ($this->_mode) { case 'list': case 'fixed': case 'singleton': $ret_val = $this->_mode; break; } return $ret_val; }
[ "abstract public function getMode();", "function getMode() {\n\t\treturn $this->_mode;\n\t}", "public static function getMode()\n\t{\n\t\treturn self::$mode;\n\t}", "public static function getMode()\n {\n return self::$_mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n\t{\n\t\treturn $this->mode;\n\t}", "public function getMode() {\n return $this->mode;\n }", "public function getListMode();", "public function get_mode()\n {\n return $this->mode;\n }", "public function modes() {\n\t\t$options = [\n\t\t\t$this->getVar(static::ModeGetVar, self::PersistExact),\n\t\t\t\\Director::get_current_page()->config()->get('gridlist_default_mode'),\n\t\t\t$this->config()->get('default_mode'),\n\t\t];\n\t\treturn array_filter($options);\n\t}", "public function get_mode()\n {\n return $this->m_mode;\n }", "public function get_mode() {\n\n\t\tif ( is_null( $this->mode ) ) {\n\t\t\t$this->mode = $this->get( 'mode', 'grid' );\n\t\t}\n\n\t\treturn $this->mode;\n\t}", "public function getMode ()\n {\n return $this->getConfigData('mode');\n }", "public function get_mode()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (is_null($this->config))\n $this->_load_config();\n\n // Return the configured mode if OpenLDAP has been already initialized \n if (! empty($this->config['mode']))\n return $this->config['mode'];\n\n // Otherwise, return the mode implied by the system mode\n $system_mode = Mode::create();\n $mode = $system_mode->get_mode();\n\n return $mode;\n }", "public function getMode()\n {\n switch ($this->source['mode']) {\n case 'in': return self::MODE_IN;\n case 'out': return self::MODE_OUT;\n case 'both': return self::MODE_BOTH;\n }\n }", "public function check_mode($mode){\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\treturn $mode;\r\n\t\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t}", "public function getListMode() {\n return $this->listMode;\n }", "public function getMode()\n {\n return $this->getOpenIdObject()->mode;\n }", "public function getModes()\n {\n return $this->modes;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation keywordListsKeywordListIdGetAsync Keyword List
public function keywordListsKeywordListIdGetAsync($keyword_list_id) { return $this->keywordListsKeywordListIdGetAsyncWithHttpInfo($keyword_list_id) ->then( function ($response) { return $response[0]; } ); }
[ "public function keywordListsKeywordListIdKeywordsGetAsync($keyword_list_id, $limit, $offset)\n {\n return $this->keywordListsKeywordListIdKeywordsGetAsyncWithHttpInfo($keyword_list_id, $limit, $offset)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function keywordListsKeywordListIdKeywordsGetAsyncWithHttpInfo($keyword_list_id, $limit, $offset)\n {\n $returnType = 'string[]';\n $request = $this->keywordListsKeywordListIdKeywordsGetRequest($keyword_list_id, $limit, $offset);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function keywordListsKeywordListIdKeywordsGetWithHttpInfo($keyword_list_id, $limit, $offset)\n {\n $request = $this->keywordListsKeywordListIdKeywordsGetRequest($keyword_list_id, $limit, $offset);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('string[]' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, 'string[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = 'string[]';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "protected function keywordListsKeywordListIdKeywordsGetRequest($keyword_list_id, $limit, $offset)\n {\n // verify the required parameter 'keyword_list_id' is set\n if ($keyword_list_id === null || (is_array($keyword_list_id) && count($keyword_list_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $keyword_list_id when calling keywordListsKeywordListIdKeywordsGet'\n );\n }\n // verify the required parameter 'limit' is set\n if ($limit === null || (is_array($limit) && count($limit) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $limit when calling keywordListsKeywordListIdKeywordsGet'\n );\n }\n // verify the required parameter 'offset' is set\n if ($offset === null || (is_array($offset) && count($offset) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $offset when calling keywordListsKeywordListIdKeywordsGet'\n );\n }\n\n $resourcePath = '/keyword_lists/{keyword_list_id}/keywords';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($limit)) {\n $limit = ObjectSerializer::serializeCollection($limit, '', true);\n }\n if ($limit !== null) {\n $queryParams['limit'] = $limit;\n }\n // query params\n if (is_array($offset)) {\n $offset = ObjectSerializer::serializeCollection($offset, '', true);\n }\n if ($offset !== null) {\n $queryParams['offset'] = $offset;\n }\n\n\n // path params\n if ($keyword_list_id !== null) {\n $resourcePath = str_replace(\n '{' . 'keyword_list_id' . '}',\n ObjectSerializer::toPathValue($keyword_list_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api_key');\n if ($apiKey !== null) {\n $queryParams['api_key'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function keywordListsKeywordListIdDeleteAsync($keyword_list_id)\n {\n return $this->keywordListsKeywordListIdDeleteAsyncWithHttpInfo($keyword_list_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function testKeywordListsKeywordListIdGet()\n {\n }", "protected function keywordListsKeywordListIdKeywordsDeleteRequest($keyword_list_id, $body)\n {\n // verify the required parameter 'keyword_list_id' is set\n if ($keyword_list_id === null || (is_array($keyword_list_id) && count($keyword_list_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $keyword_list_id when calling keywordListsKeywordListIdKeywordsDelete'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling keywordListsKeywordListIdKeywordsDelete'\n );\n }\n\n $resourcePath = '/keyword_lists/{keyword_list_id}/keywords';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($keyword_list_id !== null) {\n $resourcePath = str_replace(\n '{' . 'keyword_list_id' . '}',\n ObjectSerializer::toPathValue($keyword_list_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api_key');\n if ($apiKey !== null) {\n $queryParams['api_key'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function listsByListIdGet($list_id)\n {\n list($response) = $this->listsByListIdGetWithHttpInfo($list_id);\n return $response;\n }", "public function get($advertiserId, $negativeKeywordListId, $optParams = array())\n {\n $params = array('advertiserId' => $advertiserId, 'negativeKeywordListId' => $negativeKeywordListId);\n $params = array_merge($params, $optParams);\n return $this->call('get', array($params), \"Google_Service_DisplayVideo_NegativeKeywordList\");\n }", "public function keywordListsKeywordListIdKeywordsDelete($keyword_list_id, $body)\n {\n $this->keywordListsKeywordListIdKeywordsDeleteWithHttpInfo($keyword_list_id, $body);\n }", "public function keywordListsKeywordListIdPutAsync($keyword_list_id, $name = null, $active = null, $relation_type = null, $file_name = null)\n {\n return $this->keywordListsKeywordListIdPutAsyncWithHttpInfo($keyword_list_id, $name, $active, $relation_type, $file_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function getKeyword($keywordId) {\n\t\t$uri = \"/\".$this->apiHost->getContextPath().\"/keywords/\";\n\t\tif($this->apiHost->getContextPath() == \"\"){\n\t\t\t$uri = '/keywords/';\n\t\t}\n\t\n\t\n\t\tif (is_numeric($keywordId))\n\t\t\treturn new ApiMoKeyWord(ApiHelper::getJson\n\t\t\t\t\t($this->apiHost, 'GET', $uri.$keywordId));\n\t\tthrow new Smsgh_ApiException\n\t\t(\"Parameter 'keywordId' must be of type 'number'\");\n\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $keywords = $em->getRepository('AppBundle:Keyword')->findAll();\n //Authors can edit.\n /** @var User|string $loggedInUser */\n $loggedInUser = $this->getUser();\n //Most users only see content that is marked available.\n $authorOrBetter = false;\n if (!is_null($loggedInUser)) {\n $authorOrBetter = $loggedInUser->isAuthorOrBetter();\n }\n return $this->render('keyword/keyword_list.html.twig', array(\n 'keywords' => $keywords,\n 'authorOrBetter' => $authorOrBetter,\n ));\n }", "public function getListWords($list_permalink) {\n $this->ensureAuthentic();\n return $this->callApi('/wordList.json/'.$list_permalink.'/words');\n }", "public function getKeyword($id)\r\n {\r\n return tlKeyword::getByID($this->db,$id);\r\n }", "function getById($id){\n return(($this->_db)->query(\"SELECT * FROM keywords\n WHERE keywords.idK = $id\n ORDER BY keywords.idK\")->fetchAll(PDO::FETCH_ASSOC));\n }", "public function ipListsIpListIdGetAsync($ip_list_id)\n {\n return $this->ipListsIpListIdGetAsyncWithHttpInfo($ip_list_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function getKeywordListAttribute()\n { \n $keywords = explode(\",\", $this->keywords);\n return $keywords;\n }", "public function getKeywordId()\n {\n return $this->keyword_id;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles \Doctrine\ORM\Events::loadClassMetadata event by modifying metadata of Go! AOP proxied classes. This method intercepts loaded metadata of Doctrine's entities which are weaved by Go! AOP, and denotes them as mapped superclass. If weaved entities uses mappings from traits (such as Timestampable, Blameable, etc... from it will remove all mappings from proxied class for fields inherited from traits in order to prevent collision with concrete subclass of weaved entity. Fields from trait will be present in concrete subclass of weaved entitites.
public function loadClassMetadata(LoadClassMetadataEventArgs $args): void { $metadata = $args->getClassMetadata(); if (1 === preg_match(sprintf('/.+(%s)$/', AspectContainer::AOP_PROXIED_SUFFIX), $metadata->name)) { $metadata->isMappedSuperclass = true; $metadata->isEmbeddedClass = false; $metadata->table = []; $metadata->customRepositoryClassName = null; $this->removeMappingsFromTraits($metadata); } }
[ "protected function loadMetadata(): void\n {\n if (is_subclass_of(static::entityClass(), Mapping\\MetadataInterface::class)) {\n (static::entityClass())::loadMetadata($this->classMetadata);\n\n // prepare the Entity persister\n $this->entityPersister = new EntityPersister(static::entityClass(), $this->classMetadata);\n }\n }", "protected function overrideMetadata( LoadClassMetadataEventArgs $event, string $class ): void\n {\n $event->getClassMetadata()->discriminatorMap = $this->cachedMap[ $class ][ 'map' ];\n $event->getClassMetadata()->discriminatorValue = $this->cachedMap[ $class ][ 'discr' ];\n\n if ( isset( $this->cachedMap[ $class ][ 'isParent' ] ) && $this->cachedMap[ $class ][ 'isParent' ] ) {\n $subClasses = $this->cachedMap[ $class ][ 'map' ];\n unset( $subClasses[ $this->cachedMap[ $class ][ 'discr' ] ] );\n $event->getClassMetadata()->subClasses = array_values( $subClasses );\n }\n }", "protected function loadMetadata()\n {\n $entityClass = $this->getClassName();\n if (empty($entityClass)) {\n $this->processLoadedMetadata(null);\n\n return;\n }\n\n try {\n $metadata = null;\n $config = $this->getConfig();\n if (null !== $config) {\n $metadata = $this->metadataProvider->getMetadata(\n $entityClass,\n $this->getVersion(),\n $this->getRequestType(),\n $config,\n $this->getMetadataExtras()\n );\n }\n $this->processLoadedMetadata($metadata);\n } catch (\\Exception $e) {\n $this->processLoadedMetadata(null);\n\n throw $e;\n }\n }", "public function loadClassMetadata(LoadClassMetadataEventArgs $args)\n\t{\n\t\t/** @var ClassMetadata $meta_class */\n\t\t$meta_class = $args->getClassMetadata();\n\n\t\t/** @var Sequenceable $_entity */\n\t\tif( !SequenceableHelper::isSequenceable($meta_class) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$class_name = $meta_class->getReflectionClass()->getName();\n\n\t\tif( !array_key_exists($class_name, $this->_classMetadataContainer) )\n\t\t{\n\t\t\t$this->_classMetadataContainer[ $class_name ] = new SequenceableEntityContainer($meta_class, $args->getEntityManager());\n\t\t}\n\t}", "public static function forceClassContentLoadOnApplicationInit(Event $event): void\n {\n $app = $event->getTarget();\n $container = $app->getContainer();\n $entityMgr = $app->getEntityManager();\n if ($app->isRestored()) {\n if ($container->hasParameter('all_classcontents_classnames')) {\n $metadata = $entityMgr->getClassMetadata(AbstractClassContent::class);\n foreach ($container->getParameter('all_classcontents_classnames') as $short => $full) {\n $metadata->addDiscriminatorMapClass($short, $full);\n }\n }\n\n return;\n }\n\n $metadata = [];\n $classnames = [];\n\n try {\n foreach ($container->get('classcontent.manager')->getAllClassContentClassnames() as $classname) {\n class_exists($classname);\n $metadata[] = $entityMgr->getClassMetadata($classname);\n $classnames[AbstractClassContent::getShortClassname($classname)] = $classname;\n }\n } catch (Exception $e) {\n return;\n }\n\n $entityMgr->getProxyFactory()->generateProxyClasses($metadata);\n $container->setParameter('all_classcontents_classnames', $classnames);\n }", "abstract public function setMappedClass();", "public function postLoadDoctrine(): ProxyInterface\n {\n //Call the method of the trait to initialize local attributes of the proxy\n $this->initializeStateProxy();\n //Select good state\n $this->updateStates();\n\n return $this;\n }", "public function loadClassMetadata(LoadClassMetadataEventArgs $event)\n {\n $classMetadata = $event->getClassMetadata();\n if ('Omeka\\Entity\\Resource' == $classMetadata->name) {\n $classMetadata->discriminatorMap = $this->discriminatorMap;\n }\n }", "function loadClassMetadataFromCache(\\ReflectionClass $class);", "public function onInclude(Event $event)\n {\n $shortClassname = AbstractClassContent::getShortClassname($event->getTarget());\n $fullClassname = AbstractClassContent::getFullClassname($event->getTarget());\n foreach (class_parents($fullClassname) as $classname) {\n// @gvf todo container injection\n $this->serviceContainer->get('doctrine.orm.default_entity_manager')->getClassMetadata($classname)->addDiscriminatorMapClass($shortClassname, $fullClassname);\n\n if ('BackBee\\CoreDomain\\ClassContent\\AbstractClassContent' === $classname) {\n break;\n }\n }\n }", "protected function reflectClass(string $className): void\n {\n $this->log(sprintf('Reflecting class %s', $className), LogLevel::DEBUG);\n\n $className = $this->cleanClassName($className);\n if (str_starts_with($className, 'Neos\\Flow\\Persistence\\Doctrine\\Proxies') && in_array(DoctrineProxy::class, class_implements($className), true)) {\n throw new InvalidClassException('The class with name \"' . $className . '\" is a Doctrine proxy. It is not supported to reflect doctrine proxy classes.', 1314944681);\n }\n\n $class = new ClassReflection($className);\n if (!isset($this->classReflectionData[$className])) {\n $this->classReflectionData[$className] = [];\n }\n\n if ($class->isAbstract() || $class->isInterface()) {\n $this->classReflectionData[$className][self::DATA_CLASS_ABSTRACT] = true;\n }\n if ($class->isFinal()) {\n $this->classReflectionData[$className][self::DATA_CLASS_FINAL] = true;\n }\n if ($class->isReadOnly()) {\n $this->classReflectionData[$className][self::DATA_CLASS_READONLY] = true;\n }\n\n foreach ($this->getParentClasses($class) as $parentClass) {\n $this->addParentClass($className, $parentClass);\n }\n\n foreach ($class->getInterfaces() as $interface) {\n $this->addImplementedInterface($className, $interface);\n }\n\n foreach ($this->annotationReader->getClassAnnotations($class) as $annotation) {\n $annotationClassName = get_class($annotation);\n $this->annotatedClasses[$annotationClassName][$className] = true;\n $this->classReflectionData[$className][self::DATA_CLASS_ANNOTATIONS][] = $annotation;\n }\n if (PHP_MAJOR_VERSION >= 8) {\n foreach ($class->getAttributes() as $attribute) {\n $annotationClassName = $attribute->getName();\n if ($this->isAttributeIgnored($annotationClassName)) {\n continue;\n }\n $this->annotatedClasses[$annotationClassName][$className] = true;\n $this->classReflectionData[$className][self::DATA_CLASS_ANNOTATIONS][] = $attribute->newInstance();\n }\n }\n\n foreach ($class->getProperties() as $property) {\n $this->reflectClassProperty($className, $property);\n }\n\n foreach ($class->getMethods() as $method) {\n $this->reflectClassMethod($className, $method);\n }\n // Sort reflection data so that the cache data is deterministic. This is\n // important for comparisons when checking if classes have changed in a\n // Development context.\n ksort($this->classReflectionData);\n\n $this->updatedReflectionData[$className] = true;\n }", "private function loadProperties()\n {\n $super_class = 'Empathy\\MVC\\Entity';\n\n $r = new \\ReflectionClass(get_class($this));\n\n if ($r->getParentClass()->getName() != $super_class) {\n $props = array();\n while (($class = $r->getName()) != $super_class) {\n $props[] = $r->getProperties();\n $r = $r->getParentClass();\n }\n $props = array_reverse($props);\n $properties = array();\n foreach ($props as $p) {\n foreach ($p as $rp) {\n $name = $rp->name;\n if (!in_array($name, $properties) && $name != 'table') {\n $properties[] = $name;\n }\n }\n }\n $properties[] = 'table';\n $this->properties = $properties;\n } else {\n // it's a straightforward single subclass\n foreach ($r->getProperties() as $item) {\n if (!$item->isPrivate()) {\n array_push($this->properties, $item->name);\n }\n }\n }\n $this->properties = array_diff($this->properties, $this->globally_ignored_property);\n }", "private function loadMetaDataForEntityClass($entityClass)\n {\n if (!isset($this->allMetadata[$entityClass])) {\n $this->allMetadata[$entityClass] = $this->em->getClassMetadata($entityClass);\n }\n }", "protected function loadDefinitions() {\n if (!empty($this->decorators)) {\n return;\n }\n\n $decoratorManager = $this->getEntityDecoratorManager();\n foreach ($decoratorManager->getDefinitions() as $definition) {\n $keys = array_filter([\n $definition['entityType'],\n $definition['bundle'],\n ]);\n $key = implode('-', $keys);\n $this->decorators[$key] = $definition['id'];\n }\n }", "public function loadClassMetadata(LoadClassMetadataEventArgs $args)\n {\n $metadata = $args->getClassMetadata();\n if ($metadata->name == 'Opifer\\\\EavBundle\\\\Entity\\\\Value') {\n $metadata->setDiscriminatorMap($this->getDiscriminatorMap());\n }\n }", "function importAdditionalMetadata($a_meta)\n\t{\n\t\t// overwrite in inherited classes\n\t}", "public function eliminateProxy(&$className)\n {\n // Not use instanceof, since Doctrine\\ORM\\Proxy\\Proxy might not be known at all.\n if (!array_search('Doctrine\\ORM\\Proxy\\Proxy', class_implements($className))) {\n return ;\n }\n \n $className = get_parent_class($className);\n }", "protected function replaceEntity($entity) {\n\t\tif ($entity instanceof Proxy && !$entity->__isInitialized__) {\n\t\t\t// TODO: This ReflectionClass is actually already inside the reflFields of ClassMetadata - use that instead as it will be more efficient\n\t\t\t$reflectionClass = new \\ReflectionClass($entity);\n\n\t\t\t$identifierProperty = $reflectionClass->getProperty(\"_identifier\");\n\t\t\t$identifierProperty->setAccessible(true);\n\t\t\t$identifier = $identifierProperty->getValue($entity);\n\n\t\t\tforeach ($identifier as $idAttribute => $id)\n\t\t\t\t$entity->$idAttribute = $id;\n\n\t\t}\n\t\t\n\t\treturn $entity;\n\t}", "public function loadMetadataForClass($className, ClassMetadata $metadata)\n\t{\n\t\tif (!$typeMapping = $this->getTypeMapping($className)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->loadTypeMapping($metadata->type, $typeMapping);\n\n\t\t$indexMapping = $this->getIndexMapping($typeMapping['index']);\n\t\t$this->loadIndexMapping($metadata->index, $indexMapping);\n\n\t\tif (!empty($typeMapping['river'])) {\n\t\t\t$metadata->riverImplementation = $typeMapping['river'];\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Settings::setTemplateCookie() To set the new template in cookie
public function setTemplateCookie() { //set cookie and session... if($this->fields_arr['pref_template']) { $template = explode('__', $this->fields_arr['pref_template']); setcookie('template', $template[0], time()+ 4320000, '/'); //expire in 50 days (50x24x60x60) setcookie('style', $template[1], time()+ 4320000, '/'); //expire in 50 days (50x24x60x60) unset($_SESSION['user']['pref_template']); unset($_SESSION['user']['pref_style']); $_SESSION['user']['pref_template'] = $template[0]; $_SESSION['user']['pref_style'] = $template[1]; $this->CFG['user']['pref_template'] = $template[0]; $this->CFG['user']['pref_style'] = $template[1]; } }
[ "function wc_set_template_cache($cache_key, $template)\n {\n }", "public static function getUserTemplate()\r\n\t\t{\r\n \r\n\t\t\tif(!isset($_GET['previewtemplate'])){\r\n\t\t\t\tif(isset($_COOKIE['usertemplate']) && self::checkTemplate($_COOKIE['usertemplate'])){\r\n\t\t\t\t\tself::setTemplate($_COOKIE['usertemplate']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function setTemplateVars(){}", "public function setup_template_message() {\n if ( empty( $this->template_message ) ) {\n if ( isset( $_COOKIE['crud-message'] ) ) {\n $this->template_message = [\n 'type' => 'success',\n 'message' => stripslashes( $_COOKIE['crud-message'] ),\n ];\n }\n\n if ( isset( $_COOKIE['crud-message-type'] ) ) {\n $this->template_message['type'] = stripslashes( $_COOKIE['crud-message-type'] );\n }\n }\n\n if ( isset( $_COOKIE['crud-message'] ) ) {\n @setcookie( 'crud-message', false, time() - 1000, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );\n }\n\n if ( isset( $_COOKIE['crud-message-type'] ) ) {\n @setcookie( 'crud-message-type', false, time() - 1000, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );\n }\n }", "protected function setVarToTemplates()\n {\n $this->templates->set_tpl($this->varName, $this->checkNewCommondaty());\n }", "protected function setTemplateVariables() {}", "public function set()\n\t{\n\t\t$cookie = $this->_package();\n\t\tsetcookie($this->cookiename, $cookie, 0);\n\t\t//sfwLogger::log(\"sfwCookie: set() - all done!\", LOGGER_LEVEL_DEBUG);\n }", "private function setCookie() {\r\n\t\t$data = md5($this->id.'|'.$this->username.'|'.$this->created);\r\n\t\tsetcookie($this->cookieName, $data, time() + $this->cookieDuration, '/', '.'.$this->domain); // two week login cookie\r\n\t}", "public function setShowcase() \r\n\t{\r\n\t\t$showcase = JRequest::getVar('atColor', '');\r\n\t\t$this->_showcase = ($showcase != '') ? $showcase : (($this->_jparams->get('template_showcase')) ? $this->_jparams->get('template_showcase') : -1);\r\n\t\t\r\n\t\t$colorC = isset($_COOKIE[$this->_jtemplate->template.'-showcase']) ? $_COOKIE[$this->_jtemplate->template.'-showcase'] : '';\r\n\t\t\r\n\t\tif ($colorC == '' && $this->_showcase > 0) {\r\n\t\t\tsetcookie($this->_jtemplate->template.'-showcase', $this->_showcase, time()+60*60*24*365, '/');\r\n\t\t} \r\n\t\t\r\n\t\t$this->_showcase = JRequest::getVar($this->_jtemplate->template.'-showcase', '', 'COOKIE');\r\n\t}", "function define_settings_cookie()\n\t{\n\t\t\n\t\t$settings = json_decode($_COOKIE['doctor'], TRUE);\n\t\t\n\t\t//Did the user change the theme?\n\t\tif ( isset($_POST['theme']) && ($settings['theme'] != $_POST['theme']) ) $settings = define_theme_colors($_POST['theme'], $settings);\n\n\t\t//Were the .htpasswd credentials changed?\n\t\tif (isset($_POST['enableHtaccess']))\n\t\t{\n\t\t\tif ( update_htacess_protection($_POST['htaccess']) ) \n\t\t\t{\n\t\t\t\tif ($_POST['enableHtaccess'] == 'true') $settings['htpasswd'] = TRUE;\n\t\t\t\telse $settings['htpasswd'] = FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$settings = json_encode($settings);\n\t\tsetcookie( 'doctor', $settings, time()+(3600*24)*30, '/' );\n\t}", "public function setForTemplate($setting, $value, $template)\n {\n $sql = sprintf(\n \"DELETE FROM\n career_portal_template_site\n WHERE\n career_portal_template_site.setting = %s\n AND\n career_portal_template_site.career_portal_name = %s\n AND\n site_id = %s\",\n $this->_db->makeQueryString($setting),\n $this->_db->makeQueryString($template),\n $this->_siteID\n );\n $this->_db->query($sql);\n\n $sql = sprintf(\n \"INSERT INTO career_portal_template_site (\n setting,\n value,\n site_id,\n career_portal_name\n )\n VALUES (\n %s,\n %s,\n %s,\n %s\n )\",\n $this->_db->makeQueryString($setting),\n $this->_db->makeQueryString($value),\n $this->_siteID,\n $this->_db->makeQueryString($template)\n );\n $this->_db->query($sql);\n }", "public function setTemplate( $template = '' );", "protected function setVarToTemplates()\n {\n $this->templates->set_tpl($this->varName, $this->getGiftExist());\n }", "function phorum_switch_template($template = NULL, $template_path = NULL, $template_http_path = NULL)\n{\n global $PHORUM;\n\n if ($template !== NULL) {\n $PHORUM['template'] = basename($template);\n }\n if ($template_path !== NULL) {\n $PHORUM['template_path'] = $template_path;\n }\n if ($template_http_path !== NULL) {\n $PHORUM['template_http_path'] = $template_http_path;\n }\n\n $PHORUM[\"DATA\"][\"TEMPLATE\"] = htmlspecialchars($PHORUM['template']);\n $PHORUM[\"DATA\"][\"URL\"][\"TEMPLATE\"] =\n htmlspecialchars(\"$PHORUM[template_http_path]/$PHORUM[template]\");\n\n ob_start();\n include(phorum_get_template('settings'));\n ob_end_clean();\n}", "function setTemplate( $file );", "public function setTemplate(string $template);", "function setTemplate($file_template) {\n\t\t$this->template = $file_template;\n\t}", "public function set_cookie(){\r\n\t\tglobal $current_user;\r\n\t\t$uid = (isset($current_user->ID)) ? $current_user->ID : 0;\r\n\t\t$post_id = url_to_postid(IHC_PROTOCOL . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\r\n\t\tif ($post_id && $uid){\r\n\t\t\t $this->increment_user_posts_views($uid, $post_id);\r\n\t\t}\r\n\t}", "function setCookie($cookie);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the specified fields from the hash stored at key. Nonexisting fields are ignored. Nonexisting keys are treated as empty hashes and this command returns 0. Parameters: ($key, $field1, $field2...) or: ($key, array($field1,$field2...))
public function hDel($key, $field);
[ "public function removeFields($fields){\n foreach ($fields as $idx => $field){\n unset($this->_data[$field]);\n }\n }", "public function __unset($key)\n {\n unset( $this->_Fields[ $key ] );\n }", "public function __unset($key){\n if(isset($this->fields[$key])){\n $this->fields[$key] = null;\n }//if\n }", "public function deleteFields(array $fields)\r\n {\r\n $fields = Helpers\\Validate::arrToLower($fields);\r\n\r\n Helpers\\Validate::table($this->name)->fields($fields);\r\n\r\n $config = $this->config();\r\n $config->schema = array_diff_key($this->schema(), array_flip($fields));\r\n\r\n $data = $this->getData();\r\n foreach ($data as $key => $object)\r\n {\r\n foreach ($fields as $name)\r\n {\r\n unset($data[$key]->{$name});\r\n }\r\n }\r\n\r\n Helpers\\Data::table($this->name)->put($data);\r\n Helpers\\Config::table($this->name)->put($config);\r\n }", "public function hDel( $key, $hashKey ){}", "public function removeField(array $field);", "public function unsetInfo ($key);", "function removeField($field = null) \n {\n $args = func_get_args();\n\n $removed = array();\n\n foreach ($args as $index => $fieldToRemove) \n {\n if (is_object($fieldToRemove)) \n {\n foreach ($this->fields as $i => $f) \n {\n if ($f === $fieldToRemove) \n {\n unset($this->fields[$i]);\n $removed[] = $f;\n }\n }\n } \n else \n {\n foreach ($this->fields as $i => $f) \n {\n if (is_object($f) and property_exists($f, 'name') and $f->name === $fieldToRemove) \n {\n unset($this->fields[$i]);\n $removed[] = $f;\n }\n }\n }\n }\n\n return $removed;\n }", "public function deleteFields($fields)\n {\n if (empty($fields)) {\n return;\n }\n $resource = Mage::getSingleton('core/resource');\n $connection = $resource->getConnection('core_write');\n $tableName = $resource->getTableName(\"amcustomerattr/guest\");\n $columnsStr = implode(\n ',', array_map(\n function ($field) {\n return \"DROP COLUMN `$field`\";\n }, $fields\n )\n );\n $sql = \"ALTER TABLE `\" . $tableName . \"` \" . $columnsStr;\n $connection->query($sql);\n $connection->resetDdlCache();\n }", "public function filterOutFields(array $fields)\n {\n $vars = get_object_vars($this);\n\n foreach ($vars as $key => $value) {\n\n if (!in_array($key, $fields)) {\n unset($this->{$key});\n }\n }\n }", "protected function removeFields($mutation, $field, $key, $model)\n {\n if (method_exists($mutation, 'remove')) {\n $response = $mutation->remove($field, $key, $model);\n\n //Get model table name\n $modelKey = $this->getModelKey($model);\n\n //Remove acutal key\n if ($response === true) {\n $this->remove[$modelKey][] = $key;\n } elseif (is_string($response)) {\n $this->remove[$modelKey][] = $response;\n } elseif (is_array($response)) {\n foreach ($response as $key) {\n $this->remove[$modelKey][] = $key;\n }\n }\n }\n }", "public function removeFieldFromFormGroup($key);", "function deleteIdField($fields) {\n\t//var_dump($fields);\n\tif(isset($fields[\"_id\"]))\n\t\tunset($fields[\"_id\"]);\n\n\tforeach($fields as $key => $value) {\n\t\tif(gettype($value) == \"object\" || gettype($value) == \"array\")\n\t\t\t$fields[$key] = deleteIdField($value);\n\t}\n\treturn $fields;\n}", "function __unset($field){\n\n $this->_unset[$field] = 1;\n unset($this->_data[$field]);\n\n }", "function acf_delete_json_field_group($key) {}", "public function removeField($field) {}", "static function remove(&$data,$keys){\n $ne = count($data);\n if(!is_array($keys)) $keys = array($keys);\n foreach($keys as $ck) unset($data[$ck]);\n return($ne - count($data));\n }", "public function unsetData($key);", "protected function dataUnsetter($data = array(), $fields = array()) {\n if (empty($data) || empty($fields)) {\n return $data;\n }\n foreach ($fields as $field) {\n if (isset($data[$field])) {\n unset($data[$field]);\n }\n }\n return $data;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation updateNetworkApplianceTrafficShapingRulesWithHttpInfo Update the traffic shaping settings rules for an MX network
public function updateNetworkApplianceTrafficShapingRulesWithHttpInfo($network_id, $update_network_appliance_traffic_shaping_rules = null) { $returnType = 'object'; $request = $this->updateNetworkApplianceTrafficShapingRulesRequest($network_id, $update_network_appliance_traffic_shaping_rules); try { $options = $this->createHttpClientOption(); try { $response = $this->client->send($request, $options); } catch (RequestException $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null ); } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $request->getUri() ), $statusCode, $response->getHeaders(), $response->getBody() ); } $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = $responseBody->getContents(); if ($returnType !== 'string') { $content = json_decode($content); } } return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), 'object', $e->getResponseHeaders() ); $e->setResponseObject($data); break; } throw $e; } }
[ "public function updateNetworkWirelessSsidTrafficShapingRulesWithHttpInfo($network_id, $number, $update_network_wireless_ssid_traffic_shaping_rules = null)\n {\n $returnType = 'object';\n $request = $this->updateNetworkWirelessSsidTrafficShapingRulesRequest($network_id, $number, $update_network_wireless_ssid_traffic_shaping_rules);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function updateNetworkApplianceTrafficShapingRulesAsyncWithHttpInfo($network_id, $update_network_appliance_traffic_shaping_rules = null)\n {\n $returnType = 'object';\n $request = $this->updateNetworkApplianceTrafficShapingRulesRequest($network_id, $update_network_appliance_traffic_shaping_rules);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function testUpdateNetworkApplianceTrafficShapingRules()\n {\n }", "public function updateNetworkApplianceTrafficShapingWithHttpInfo($network_id, $update_network_appliance_traffic_shaping = null)\n {\n $returnType = 'object';\n $request = $this->updateNetworkApplianceTrafficShapingRequest($network_id, $update_network_appliance_traffic_shaping);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function updateNetworkApplianceTrafficShapingRulesAsync($network_id, $update_network_appliance_traffic_shaping_rules = null)\n {\n return $this->updateNetworkApplianceTrafficShapingRulesAsyncWithHttpInfo($network_id, $update_network_appliance_traffic_shaping_rules)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "protected function updateNetworkWirelessSsidTrafficShapingRulesRequest($network_id, $number, $update_network_wireless_ssid_traffic_shaping_rules = null)\n {\n // verify the required parameter 'network_id' is set\n if ($network_id === null || (is_array($network_id) && count($network_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $network_id when calling updateNetworkWirelessSsidTrafficShapingRules'\n );\n }\n // verify the required parameter 'number' is set\n if ($number === null || (is_array($number) && count($number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $number when calling updateNetworkWirelessSsidTrafficShapingRules'\n );\n }\n\n $resourcePath = '/networks/{networkId}/wireless/ssids/{number}/trafficShaping/rules';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($network_id !== null) {\n $resourcePath = str_replace(\n '{' . 'networkId' . '}',\n ObjectSerializer::toPathValue($network_id),\n $resourcePath\n );\n }\n // path params\n if ($number !== null) {\n $resourcePath = str_replace(\n '{' . 'number' . '}',\n ObjectSerializer::toPathValue($number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($update_network_wireless_ssid_traffic_shaping_rules)) {\n $_tempBody = $update_network_wireless_ssid_traffic_shaping_rules;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function updateNetworkApplianceFirewallPortForwardingRulesWithHttpInfo($network_id, $update_network_appliance_firewall_port_forwarding_rules)\n {\n $returnType = 'object';\n $request = $this->updateNetworkApplianceFirewallPortForwardingRulesRequest($network_id, $update_network_appliance_firewall_port_forwarding_rules);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function updateNetworkWirelessSsidTrafficShapingRulesAsync($network_id, $number, $update_network_wireless_ssid_traffic_shaping_rules = null)\n {\n return $this->updateNetworkWirelessSsidTrafficShapingRulesAsyncWithHttpInfo($network_id, $number, $update_network_wireless_ssid_traffic_shaping_rules)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function updateNetworkApplianceTrafficShaping($network_id, $update_network_appliance_traffic_shaping = null)\n {\n list($response) = $this->updateNetworkApplianceTrafficShapingWithHttpInfo($network_id, $update_network_appliance_traffic_shaping);\n return $response;\n }", "public function updateNetworkApplianceTrafficShapingAsyncWithHttpInfo($network_id, $update_network_appliance_traffic_shaping = null)\n {\n $returnType = 'object';\n $request = $this->updateNetworkApplianceTrafficShapingRequest($network_id, $update_network_appliance_traffic_shaping);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function testUpdateNetworkApplianceTrafficShaping()\n {\n }", "public function updateNetworkApplianceFirewallCellularFirewallRulesWithHttpInfo($network_id, $update_network_appliance_firewall_cellular_firewall_rules = null)\n {\n $returnType = 'object';\n $request = $this->updateNetworkApplianceFirewallCellularFirewallRulesRequest($network_id, $update_network_appliance_firewall_cellular_firewall_rules);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "protected function getNetworkApplianceTrafficShapingRulesRequest($network_id)\n {\n // verify the required parameter 'network_id' is set\n if ($network_id === null || (is_array($network_id) && count($network_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $network_id when calling getNetworkApplianceTrafficShapingRules'\n );\n }\n\n $resourcePath = '/networks/{networkId}/appliance/trafficShaping/rules';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($network_id !== null) {\n $resourcePath = str_replace(\n '{' . 'networkId' . '}',\n ObjectSerializer::toPathValue($network_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "protected function updateNetworkApplianceFirewallPortForwardingRulesRequest($network_id, $update_network_appliance_firewall_port_forwarding_rules)\n {\n // verify the required parameter 'network_id' is set\n if ($network_id === null || (is_array($network_id) && count($network_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $network_id when calling updateNetworkApplianceFirewallPortForwardingRules'\n );\n }\n // verify the required parameter 'update_network_appliance_firewall_port_forwarding_rules' is set\n if ($update_network_appliance_firewall_port_forwarding_rules === null || (is_array($update_network_appliance_firewall_port_forwarding_rules) && count($update_network_appliance_firewall_port_forwarding_rules) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $update_network_appliance_firewall_port_forwarding_rules when calling updateNetworkApplianceFirewallPortForwardingRules'\n );\n }\n\n $resourcePath = '/networks/{networkId}/appliance/firewall/portForwardingRules';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($network_id !== null) {\n $resourcePath = str_replace(\n '{' . 'networkId' . '}',\n ObjectSerializer::toPathValue($network_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($update_network_appliance_firewall_port_forwarding_rules)) {\n $_tempBody = $update_network_appliance_firewall_port_forwarding_rules;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getNetworkApplianceTrafficShapingUplinkBandwidthWithHttpInfo($network_id)\n {\n $returnType = 'object';\n $request = $this->getNetworkApplianceTrafficShapingUplinkBandwidthRequest($network_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function getNetworkApplianceTrafficShapingWithHttpInfo($network_id)\n {\n $returnType = 'object';\n $request = $this->getNetworkApplianceTrafficShapingRequest($network_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function getNetworkApplianceTrafficShapingRulesAsync($network_id)\n {\n return $this->getNetworkApplianceTrafficShapingRulesAsyncWithHttpInfo($network_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function updateNetworkApplianceFirewallCellularFirewallRulesAsyncWithHttpInfo($network_id, $update_network_appliance_firewall_cellular_firewall_rules = null)\n {\n $returnType = 'object';\n $request = $this->updateNetworkApplianceFirewallCellularFirewallRulesRequest($network_id, $update_network_appliance_firewall_cellular_firewall_rules);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function updateNetworkApplianceFirewallOneToManyNatRulesAsyncWithHttpInfo($network_id, $update_network_appliance_firewall_one_to_many_nat_rules)\n {\n $returnType = 'object';\n $request = $this->updateNetworkApplianceFirewallOneToManyNatRulesRequest($network_id, $update_network_appliance_firewall_one_to_many_nat_rules);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation getNetworkCameraQualityRetentionProfilesAsync List the quality retention profiles for this network
public function getNetworkCameraQualityRetentionProfilesAsync($network_id) { return $this->getNetworkCameraQualityRetentionProfilesAsyncWithHttpInfo($network_id) ->then( function ($response) { return $response[0]; } ); }
[ "public function getNetworkCameraQualityRetentionProfileAsync($network_id, $quality_retention_profile_id)\n {\n return $this->getNetworkCameraQualityRetentionProfileAsyncWithHttpInfo($network_id, $quality_retention_profile_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function getNetworkCameraQualityRetentionProfile($network_id, $quality_retention_profile_id)\n {\n list($response) = $this->getNetworkCameraQualityRetentionProfileWithHttpInfo($network_id, $quality_retention_profile_id);\n return $response;\n }", "public function getNetworkCameraQualityRetentionProfileWithHttpInfo($network_id, $quality_retention_profile_id)\n {\n $returnType = 'object';\n $request = $this->getNetworkCameraQualityRetentionProfileRequest($network_id, $quality_retention_profile_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function getNetworkCameraQualityRetentionProfilesAsyncWithHttpInfo($network_id)\n {\n $returnType = 'object';\n $request = $this->getNetworkCameraQualityRetentionProfilesRequest($network_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "protected function getNetworkCameraQualityRetentionProfileRequest($network_id, $quality_retention_profile_id)\n {\n // verify the required parameter 'network_id' is set\n if ($network_id === null || (is_array($network_id) && count($network_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $network_id when calling getNetworkCameraQualityRetentionProfile'\n );\n }\n // verify the required parameter 'quality_retention_profile_id' is set\n if ($quality_retention_profile_id === null || (is_array($quality_retention_profile_id) && count($quality_retention_profile_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $quality_retention_profile_id when calling getNetworkCameraQualityRetentionProfile'\n );\n }\n\n $resourcePath = '/networks/{networkId}/camera/qualityRetentionProfiles/{qualityRetentionProfileId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($network_id !== null) {\n $resourcePath = str_replace(\n '{' . 'networkId' . '}',\n ObjectSerializer::toPathValue($network_id),\n $resourcePath\n );\n }\n // path params\n if ($quality_retention_profile_id !== null) {\n $resourcePath = str_replace(\n '{' . 'qualityRetentionProfileId' . '}',\n ObjectSerializer::toPathValue($quality_retention_profile_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getSocialMediaProfiles();", "private function getQualityProfilesFromURL($url){\n\t\t$qp = [];\n\t\t$qp[5] = [\"flv\", \"240p\", \"Sorenson H.263\", \"N/A\", \"0.25\", \"MP3\", \"64\"];\n\t\t$qp[17] = [\"3gp\", \"144p\", \"MPEG-4 Visual\", \"Simple\", \"0.05\", \"AAC\", \"24\"];\n\t\t$qp[36] = [\"3gp\", \"240p\", \"MPEG-4 Visual\", \"Simple\", \"0.17\", \"AAC\", \"38\"];\n\t\t$qp[43] = [\"webm\", \"360p\", \"VP8\", \"N/A\", \"0.5\", \"Vorbis\", \"128\"];\n\t\t$qp[100] = [\"webm\", \"360p\", \"VP8\", \"3D\", \"N/A\", \"Vorbis\", \"128\"];\n\t\t$qp[18] = [\"mp4\", \"360p\", \"H.264\", \"Baseline\", \"0.5\", \"AAC\", \"96\"];\n\t\t$qp[22] = [\"mp4\", \"720p\", \"H.264\", \"High\", \"2-2.9\", \"AAC\", \"192\"];\n\t\t$qp[82] = [\"mp4\", \"360p\", \"H.264\", \"3D\", \"0.5\", \"AAC\", \"96\"];\n\t\t$qp[83] = [\"mp4\", \"240p\", \"H.264\", \"3D\", \"0.5\", \"AAC\", \"96\"];\n\t\t$qp[84] = [\"mp4\", \"720p\", \"H.264\", \"3D\", \"2-2.9\", \"AAC\", \"152\"];\n\t\t$qp[85] = [\"mp4\", \"1080p\", \"H.264\", \"3D\", \"2-2.9\", \"AAC\", \"152\"];\n\t\tforeach($qp as $k => $q){\n\t\t\t$keys = [\"extension\", \"resolution\", \"video_codec\", \"profile\", \"video_bitrate\", \"audio_codec\", \"audio_bitrate\"];\n\t\t\tforeach($keys as $k2 => $v){\n\t\t\t\t$qp[$k][$v] = $q[$k2];\n\t\t\t}\n\t\t\tforeach(array_keys($qp[$k]) as $key){\n\t\t\t\tif(!in_array($key, $keys, true)){\n\t\t\t\t\tunset($qp[$k][$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$itagPattern = '/itag=(\\d+)/';\n\t\tpreg_match_all($itagPattern, $url, $itag);\n\t\tif(isset($itag[1][0]) && intval($itag[1][0]) > -1){\n\t\t\t$itag = intval($itag[1][0]);\n\n\t\t\treturn $qp[$itag];\n\t\t}\n\n\t\treturn false;\n\t}", "public function getProfiles();", "public function getDeviceCameraQualityAndRetentionAsync($serial)\n {\n return $this->getDeviceCameraQualityAndRetentionAsyncWithHttpInfo($serial)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function list_radius_profiles()\n {\n return $this->fetch_results('/api/s/' . $this->site . '/rest/radiusprofile');\n }", "public function getRecommendationProfiles()\n {\n return $this->recommendationProfiles;\n }", "public function getProfiles(): Collection;", "public function getMediaQualityList()\n {\n if (array_key_exists(\"mediaQualityList\", $this->_propDict)) {\n if (is_a($this->_propDict[\"mediaQualityList\"], \"\\Microsoft\\Graph\\Model\\TeleconferenceDeviceMediaQuality\") || is_null($this->_propDict[\"mediaQualityList\"])) {\n return $this->_propDict[\"mediaQualityList\"];\n } else {\n $this->_propDict[\"mediaQualityList\"] = new TeleconferenceDeviceMediaQuality($this->_propDict[\"mediaQualityList\"]);\n return $this->_propDict[\"mediaQualityList\"];\n }\n }\n return null;\n }", "public function getProfiles()\n {\n return $this->getFileOperator()->getProfiles();\n }", "public function getAllProfiles()\n {\n return self::$profiles;\n }", "public function getProfiles() {\n return $this->profiles;\n }", "public function testGetNetworkCameraQualityRetentionProfile()\n {\n }", "function GetListOfProfiles()\n {\n return $this->ApplicationObj->GetListOfProfiles();\n }", "public function getProfileSizes() : array {\n return $this->fetch()['images']['profile_sizes'];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the controller by using the routing information and request data.
protected function createController( ezcMvcRoutingInformation $routingInformation, ezcMvcRequest $request ) { $controllerClass = $routingInformation->controllerClass; $controller = new $controllerClass( $routingInformation->action, $request ); return $controller; }
[ "public function createFromGlobals(){\n global $app;\n\n $route = $this;\n\n require_once $app->path() . '/Http/routes.php';\n\n $request = Request::createFromGlobals();\n\n $this->getMetthod();\n\n $context = new RequestContext();\n $context->fromRequest($request);\n $matcher = new UrlMatcher($this->routes, $context);\n\n $this->getRoute = $attributes = $matcher->match($request->getPathInfo());\n\n // Call function run controller.\n call_user_func_array(\n 'atlBeginAction', \n array(\n 'App\\Http\\Controllers\\\\' . $attributes['_controller'], \n $attributes['_action'],\n $this->getParameters($attributes)\n )\n );\n }", "protected function makeController() {\n\t\t$cg = new ControllerGenerator($this->files, $this->command);\n\t\t$cg->generate($this->name, $this->schema);\n\t}", "abstract public function __controllerConstruct();", "private function _setupNewController()\n {\n $this->controller_module_id = (!isset($this->controller_module_id)) ? \\filter_input(\\INPUT_POST, 'id_module', \\FILTER_SANITIZE_SPECIAL_CHARS) : $this->controller_module_id;\n $this->controller_model_id = (!isset($this->controller_model_id)) ? \\filter_input(\\INPUT_POST, 'sw_id_model', \\FILTER_VALIDATE_INT) : $this->controller_model_id;\n $this->controller_name = (!isset($this->controller_name)) ? \\filter_input(\\INPUT_POST, 'f_controller', \\FILTER_SANITIZE_SPECIAL_CHARS) : $this->controller_name;\n $this->controller_description = (!isset($this->controller_description)) ? filter_input(\\INPUT_POST, 'f_controller_description', \\FILTER_SANITIZE_SPECIAL_CHARS) : $this->controller_description;\n \n $this->_setPathController();\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(MakeModuleController::class, array_filter([\n 'name' => \"{$controller}Controller\",\n 'module' => $this->argument('module'),\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--requests' => $this->option('requests') || $this->option('all'),\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('build:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "private function createRCAController(){\r\n\t\t$route = $this->_request->getParam('controller_route');\r\n\t\t$conroller = $this->_request->getParam('controller_controller');\r\n\t\t$action = $this->_request->getParam('controller_action');\r\n\t\t$controller_type = $this->_request->getParam('controller_type');\r\n\r\n\t\t$crr = $this->_request->getParam('controller_route_regex');\r\n\t\t$ccr = $this->_request->getParam('controller_controller_regex');\r\n\t\t$car = $this->_request->getParam('controller_action_regex');\r\n\r\n\t\t$extends = $this->_request->getParam('extend_to_class');\r\n\r\n\t\t$sampleTemplate = 'sample_template.phtml';\r\n\t\t$isAdmin = false;\r\n\r\n\t\tif($controller_type == 'admin'){\r\n\t\t\t$sampleTemplate = 'admin/sample_template.phtml';\r\n\t\t\t$isAdmin = true;\r\n\t\t}\r\n\r\n\t\tif(!strlen($route)){\r\n\t\t\t$route = \"Index\";\r\n\t\t}\r\n\t\tif(!strlen($conroller)){\r\n\t\t\t$conroller = \"Index\";\r\n\t\t}\r\n\t\tif(!strlen($action)){\r\n\t\t\t$action = \"Index\";\r\n\t\t} \r\n\r\n\t\tif($route == 'system' || $route == 'System'){\r\n\t\t\t$this->returnError('400', 'System route is reserved for Opoink\\'s developer panel.');\r\n\t\t} else {\r\n\t\t\t$invalidPatternMsg = 'You will use regex for the {{path}}, but your pattern seems to be invalid. To avoid error please make sure your pattern is valid.';\r\n\t\t\tif($crr === 'yes'){\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $route)) {\r\n\t\t\t\t\t$route = 'Reg'.sha1($route);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'route', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($ccr === 'yes'){;\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $conroller)) {\r\n\t\t\t\t\t$conroller = 'Reg'.sha1($conroller);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'conroller', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($car === 'yes'){\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $action)) {\r\n\t\t\t\t\t$action = 'Reg'.sha1($action);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'action', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$conType = 'public';\r\n\t\t\t$xmlFilename = strtolower($route.'_'.$conroller.'_'.$action);\r\n\t\t\t$controllerClass = \"\\\\\".$this->vendor_name.\"\\\\\".$this->module_name.\"\\\\Controller\\\\\".ucfirst($route).\"\\\\\".ucfirst($conroller).\"\\\\\".ucfirst($action);\r\n\r\n\t\t\tif($controller_type == 'admin'){\r\n\t\t\t\t$conType = 'admin';\r\n\t\t\t\t$xmlFilename = 'admin_'.strtolower($route.'_'.$conroller.'_'.$action);\r\n\t\t\t\t$controllerClass = \"\\\\\".$this->vendor_name.\"\\\\\".$this->module_name.\"\\\\Controller\\\\Admin\\\\\".ucfirst($route).\"\\\\\".ucfirst($conroller).\"\\\\\".ucfirst($action);\r\n\t\t\t}\r\n\r\n\t\t\tif(!empty($extends)){\r\n\t\t\t\ttry {\r\n\t\t\t\t\t/* \r\n\t\t\t\t\t * this is to try if the class to extend exists\r\n\t\t\t\t\t * if it is not injector will raise an error\r\n\t\t\t\t\t */\r\n\t\t\t\t\t$this->_di->make($extends);\r\n\t\t\t\t} catch (\\Exception $e) {\r\n\t\t\t\t\t$this->returnError('400', $e->getMessage());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->_controller->setExtends($extends);\r\n\t\t\t}\r\n\r\n\t\t\t$create = $this->_controller->setVendor($this->vendor_name)\r\n\t\t\t->setModule($this->module_name)\r\n\t\t\t->setRoute($route)\r\n\t\t\t->setController($conroller)\r\n\t\t\t->setAction($action)\r\n\t\t\t->create($conType);\r\n\r\n\t\t\tif($create){\r\n\t\t\t\t/** insert into module config */\r\n\t\t\t\tif($crr === 'yes' || $ccr === 'yes' || $car === 'yes'){\r\n\t\t\t\t\t$regexCount = 0;\r\n\t\t\t\t\twhile (isset($this->config['controllers']['regex_'.$regexCount])) {\r\n\t\t\t\t\t\t$regexCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$routerName = 'regex_'.$regexCount;\r\n\t\t\t\t\t$routerInfo = [\r\n\t\t\t\t\t\t'route' => $this->routerInfoHelper($crr, 'controller_route'),\r\n\t\t\t\t\t\t'route_regex' => $crr === 'yes' ? true : false,\r\n\t\t\t\t\t\t'controller' => $this->routerInfoHelper($crr, 'controller_controller'),\r\n\t\t\t\t\t\t'controller_regex' => $ccr === 'yes' ? true : false,\r\n\t\t\t\t\t\t'action' => $this->routerInfoHelper($crr, 'controller_action'),\r\n\t\t\t\t\t\t'action_regex' => $car === 'yes' ? true : false,\r\n\t\t\t\t\t\t'class' => $controllerClass\r\n\t\t\t\t\t];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$routerName = $xmlFilename;\r\n\t\t\t\t\t$routerInfo = $controllerClass;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->config['controllers'][$routerName] = $routerInfo;\r\n\r\n\t\t\t\t$this->_configManager->setConfig($this->config)\r\n\t\t\t\t->createConfig();\r\n\t\t\t\t/** end insert into module config */\r\n\r\n\t\t\t\t/** insert into installation config */\r\n\t\t\t\t$_config = ROOT . DS . 'etc' . DS. 'Config.php';\r\n\t\t\t\tif(file_exists($_config)){\r\n\t\t\t\t\t$_config = include($_config);\r\n\r\n\t\t\t\t\t$vm = $this->vendor_name.\"_\".$this->module_name;\r\n\t\t\t\t\tif(isset($_config['controllers'][$vm])){\r\n\t\t\t\t\t\t$_config['controllers'][$vm][$routerName] = $routerInfo;\r\n\r\n\t\t\t\t\t\t$data = '<?php' . PHP_EOL;\r\n\t\t\t\t\t\t$data .= 'return ' . var_export($_config, true) . PHP_EOL;\r\n\t\t\t\t\t\t$data .= '?>';\r\n\r\n\t\t\t\t\t\t$_writer = new \\Of\\File\\Writer();\r\n\t\t\t\t\t\t$_writer->setDirPath(ROOT . DS . 'etc' . DS)\r\n\t\t\t\t\t\t->setData($data)\r\n\t\t\t\t\t\t->setFilename('Config')\r\n\t\t\t\t\t\t->setFileextension('php')\r\n\t\t\t\t\t\t->write();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/** end insert into installation config */\r\n\r\n\t\t\t\t/** create controller xml layout here */\r\n\r\n\t\t\t\t$body = \"\\t\\t\".'<container xml:id=\"main_container\" htmlId=\"main_container\" htmlClass=\"main_container\" weight=\"1\">' . PHP_EOL;\r\n\t\t\t\t\t$body .= \"\\t\\t\\t\".'<template xml:id=\"sample_template\" vendor=\"'.$this->vendor_name.'\" module=\"'.$this->module_name.'\" template=\"'.$sampleTemplate.'\" cacheable=\"1\" max-age=\"604800\"/>' . PHP_EOL;\r\n\t\t\t\t$body .= \"\\t\\t\".'</container>' . PHP_EOL;\r\n\r\n\t\t\t\t$this->_xml->setVendor($this->vendor_name)\r\n\t\t\t\t->setModule($this->module_name)\r\n\t\t\t\t->setFileName($xmlFilename);\r\n\t\t\t\tif($isAdmin){\r\n\t\t\t\t\t$this->_xml->create(false, $isAdmin, 999, $body);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->_xml->create(true, $isAdmin, 999, $body);\r\n\t\t\t\t}\r\n\t\t\t\t/** end create controller xml layout here */\r\n\r\n\t\t\t\t/** create the sample template here */\r\n\t\t\t\t$target = ROOT.DS.'App'.DS.'Ext'.DS.$this->vendor_name.DS.$this->module_name.DS.'View'.DS.'Template';\r\n\t\t\t\tif($controller_type == 'admin'){\r\n\t\t\t\t\t$target .= DS.'admin';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$data = \"<p>\".$route.\" \".$conroller.\" \".$action.\" works</p>\";\r\n\t\t\t\t$_writer = new \\Of\\File\\Writer();\r\n\t\t\t\t$_writer->setDirPath($target)\r\n\t\t\t\t->setData($data)\r\n\t\t\t\t->setFilename('sample_template')\r\n\t\t\t\t->setFileextension('phtml')\r\n\t\t\t\t->write();\r\n\t\t\t\t/** end create the sample template here */\r\n\r\n\t\t\t\t$response = [];\r\n\t\t\t\t$response['error'] = 0;\r\n\t\t\t\t$response['message'] = 'New conroller created.';\r\n\t\t\t\t$this->jsonEncode($response);\r\n\t\t\t} else {\r\n\t\t\t\t$this->returnError('400', 'Cannot create, controller is already existing.');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('mappweb:make-controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n ]);\n }", "protected function createController()\n {\n $model = $this->argument('model');\n\n $this->call('make:api:controller', array_filter([\n 'name' => \"{$model}Controller\",\n '--model' => $model,\n '--force' => $this->option('force')\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('modelName')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n dd($modelName);\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n\n return; \n }", "public function createRouter( ezcMvcRequest $request );", "private function createControllers()\n {\n $this->controllers = new Controllers($this);\n $this->controllers->createDefault();\n $this->controllers->createEntity($this->formatControllersPath(), DefaultInterface::CONTROLLER_POSTFIX);\n }", "private function instantiatingController()\n {\n require_once $this->controllerAddress;\n $this->controllerReflectionInstance = new \\ReflectionClass($this->controllerName);\n $this->controllerInstance = $this->controllerReflectionInstance->newInstance(self::$registry->getInstance());\n\n return;\n }", "protected function run(){\n $programRoute = $this->findProgramRoute();\n $parts = explode('/', $programRoute);\n $controller = \"controllers\\\\\" . ucfirst(array_shift($parts) . \"Controller\");\n $action = lcfirst(array_shift($parts));\n $params = $parts;\n $this->createController($controller,$action,$params);\n }", "private function createController(Request $request) {\r\n // Thanks to the rewrite, incoming URL look like :\r\n // index.php?controller=XXX&action=YYY&id=ZZZ\r\n\r\n $controller = \"Home\"; // Default controller\r\n if ($request->parameterExist('controller')) {\r\n $controller = $request->getParameter('controller');\r\n // First letter in captial\r\n $controller = ucfirst(strtolower($controller));\r\n }\r\n // Create file name of controller\r\n // e.g. : Controller/Controller<$controller>.php\r\n $classController = \"Controller\" . $controller;\r\n $fileController = \"Controller/\" . $classController . \".php\";\r\n if (file_exists($fileController)) {\r\n // Require of the needed controller\r\n require($fileController);\r\n $controller = new $classController();\r\n $controller->setRequest($request);\r\n return $controller;\r\n }\r\n else {\r\n throw new Exception(\"File '$fileController' introuvable\");\r\n }\r\n }", "private function createRoutes(): void\n {\n foreach ( $this->controllerSet as $controllerName )\n {\n try\n {\n $contReflect = new ReflectionClass($controllerName);\n }\n catch ( ReflectionException )\n {\n continue;\n }\n\n if ( ! $contReflect->isSubclassOf($this->parentControllerName) )\n {\n continue;\n }\n\n $controllerLoader = new Controller($contReflect);\n $controllerLoader->run();\n }\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('component:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n ]);\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $controller = str_replace(\"Service\", \"\", $controller);\n\n $this->call('gemboot:make-controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $this->argument('model'),\n '--service' => \"{$controller}Service\",\n '--resource' => $this->option('resource'),\n ]));\n }", "private function makeApiController()\n {\n\n new MakeApiController($this, $this->files);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getRowOutputType retourne le type pour row output (row ou rows)
final public function getRowOutputType(string $value):?string { return ($this->isRowOutput($value) && strpos($value,'rows') === 0)? 'rows':'row'; }
[ "public function getRowClass();", "public function rowDefinition(): IRowType;", "protected abstract function getTableRowTypes();", "public static function row_as($query, $type='arr'){\n if($type == 'arr'){\n return $query->row_array();\n }\n return $query->row();\n }", "public function readRow()\n\t{\n\t\t\n\t}", "public function getRow()\n\t{\n\t}", "public function getExportRow();", "public function getRow() : ?int ;", "abstract protected function getLineUsageType($row);", "public function getIteratorRow () {}", "public function getRow()\n {\n return $this->_row;\n }", "public function returnRow(){\n\t\treturn $this->_row;\n\t}", "function getRow() {\n return $this->row;\n }", "public function getRowClass()\n {\n return $this->_rowClass;\n }", "public function readRow(): ?array;", "public function getRowIterator();", "private function getRowType(string $row)\n {\n // remove leading and trailing whitespaces\n $row = trim($row);\n // empty is empty is empty\n if (empty($row)) {\n return self::ROW_TYPE_EMPTY;\n }\n // comment lines should start with a '#'\n if (substr($row, 0, 1) === '#') {\n return self::ROW_TYPE_COMMENT;\n }\n // row is not empty and doesn't start with a #\n // should be a command line\n return self::ROW_TYPE_COMMAND;\n }", "public function getRowClass()\n\t{\n\t\treturn $this->row_class;\n\t}", "public function getRowClass()\r\n\t{\r\n\t\treturn $this->rowClass;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build the model replacement values.
protected function buildModelReplacements() { $modelClass = $this->qualifyClass($this->getNameInput()); $rootNamespace = explode('/', $this->getNameInput()); $rootNamespace = count($rootNamespace) > 1 ? current($rootNamespace) : ''; $url = $this->kebab($this->getNameInput(), '/'); $route = str_replace('/', '.', $url); $method = $this->stub; $urlMethod = sprintf('%s/%s', $url, $method); $routeMethod = str_replace('/', '.', $urlMethod); return [ 'DummyViewRootNamespace' => $this->getDefaultNamespace($this->getNamespace($this->rootNamespace())), 'DummyViewClassNamespace' => $modelClass, 'DummyViewClass' => class_basename($modelClass), 'DummyViewVariable' => $this->camel(class_basename($modelClass)), 'DummyViewKebabVariable' => $this->kebab(class_basename($modelClass)), 'DummyViewSnakeVariable' => $this->snake(class_basename($modelClass)), 'DummyViewUrlMethod' => $urlMethod, 'DummyViewRouteMethod' => $routeMethod, 'DummyViewUrlClass' => $url, 'DummyViewRouteClass' => $route, 'DummyViewMethod' => $method, 'DummyViewNamespaceRoot' => strtolower($rootNamespace), ]; }
[ "protected function buildModelReplacements()\n {\n $this->defaultNamespace = $this->laravel['config']->get('generator.model');\n\n $modelClass = $this->qualifyClass($this->option('model'));\n\n $this->call('generator:model', [\n 'name' => $this->option('model'),\n '--parent' => true,\n ]);\n\n return [\n 'DummyModelRootNamespace' => $this->getDefaultNamespace($this->getNamespace($this->rootNamespace())),\n 'DummyModelClassNamespace' => $modelClass,\n 'DummyModelClass' => class_basename($modelClass),\n 'DummyModelVariable' => $this->camel(class_basename($modelClass)),\n 'DummyModelKebabVariable' => $this->kebab(class_basename($modelClass)),\n 'DummyModelSnakeVariable' => $this->snake(class_basename($modelClass)),\n ];\n }", "protected function get_replacement_variables()\n {\n }", "private function applyValues(){\n\t foreach($this->elements as $element){\n\t $name = $element->getName();\n\t if(isset($this->values[$name]))\n\t $element->setValue($this->values[$name]);\n\t elseif(substr($name, -2) == \"[]\" && isset($this->values[substr($name, 0, -2)]))\n\t $element->setValue($this->values[substr($name, 0, -2)]);\n\t }\n\t }", "private function applyVars()\r\n\t{\r\n\t\t\r\n\t\t$this->output = str_replace(array_keys($this->assignedVars),$this->assignedVars,$this->output);\r\n\t\t$this->output = str_replace(array_keys($this->assignedVars),$this->assignedVars,$this->output);\r\n\t}", "protected function get_unique_replacement_variables()\n {\n }", "protected function buildModelReplacements(array $replace)\n {\n $modelClass = $this->parseModel($this->option('model'));\n\n return array_merge(\n $replace,\n [\n 'DummyFullModelClass' => $modelClass,\n '{{ namespacedModel }}' => $modelClass,\n '{{namespacedModel}}' => $modelClass,\n 'DummyModelClass' => class_basename($modelClass),\n '{{ model }}' => class_basename($modelClass),\n '{{model}}' => class_basename($modelClass),\n '{{ table }}' => Str::snake(Str::plural(class_basename($modelClass))),\n '{{table}}' => Str::snake(Str::plural(class_basename($modelClass))),\n '{{ route }}' => Str::kebab(Str::plural(class_basename($modelClass))),\n '{{route}}' => Str::kebab(Str::plural(class_basename($modelClass))),\n '{{ with }}' => $this->relations(),\n 'DummyModelVariable' => lcfirst(Str::snake(class_basename($modelClass))),\n '{{ modelVariable }}' => lcfirst(Str::snake(class_basename($modelClass))),\n '{{modelVariable}}' => lcfirst(Str::snake(class_basename($modelClass))),\n '{{ modelVariables }}' => Str::plural(lcfirst(Str::snake(class_basename($modelClass)))),\n '{{modelVariables}}' => Str::plural(lcfirst(Str::snake(class_basename($modelClass)))),\n ]\n );\n }", "public function updateOriginalValues() {\n foreach ($this->fields as $name => $properties) {\n foreach ($properties as $langcode => $property) {\n $this->values[$name][$langcode] = $property->getValue();\n }\n }\n }", "protected function setFieldOriginalValue()\n {\n// static::doNotSnakeAttributes($this->model);\n\n $values = $this->model->toArray();\n\n $this->builder->fields()->each(function (Field $field) use ($values) {\n $field->setOriginal($values);\n });\n }", "function prepFieldSubstitutions() {\n $rawFacetVals = variable_get(\"islandora_solr_search_block_facets\", 'dc.subject ~ Subject,dc.type ~ Type');\n $this->facetFieldArray = islandora_build_substitution_list($rawFacetVals);\n\n $rawSearchTerms = variable_get('islandora_solr_searchterms', 'dc.title ~ Title');\n $this->searchFieldArray = islandora_build_substitution_list($rawSearchTerms);\n\n $rawResultFields = variable_get('islandora_solr_search_result_fields', 'dc.subject ~ Subject,dc.type ~ Type');\n $this->resultFieldArray = islandora_build_substitution_list($rawResultFields);\n\n $this->allSubsArray = array_merge($this->facetFieldArray, $this->searchFieldArray, $this->resultFieldArray);\n }", "protected function buildDimensionValues() {\n\t\t$dimensionValues = array();\n\t\tforeach ($this->dimensions as $dimension) {\n\t\t\t/** @var NodeDimension $dimension */\n\t\t\t$dimensionValues[$dimension->getName()][] = $dimension->getValue();\n\t\t}\n\t\t$this->dimensionsHash = Utility::sortDimensionValueArrayAndReturnDimensionsHash($dimensionValues);\n\t\t$this->dimensionValues = $dimensionValues;\n\t}", "protected function migrateValues(): void\n {\n $migrationMapping = $this->loadTable('migration');\n if (!$migrationMapping) {\n $this->logger->warn(\n 'No migration file is defined or it is empty.' // @translate\n );\n return;\n }\n\n // Prepare the template groups.\n // The process for all should be the first.\n $templateGroups = [self::TYPE_ALL_PRE => self::TYPE_ALL_PRE];\n\n // Les règles varient selon les 4 types d'origine, qui ont été remplacés\n // par des modèles dans l'étape précédente.\n $templates = $this->configs['templates'] ?? null;\n if (is_null($templates)) {\n $this->logger->warn(\n 'There is no mapping for old and new templates.' // @translate\n );\n } else {\n $templates = array_filter($templates);\n if (count($templates)) {\n // Get the templates by group.\n foreach ($templates as $templateLabel => $templateGroup) {\n $templateGroups[$templateGroup][] = $templateLabel;\n }\n } else {\n $this->logger->warn(\n 'The mapping for old and new templates is empty.' // @translate\n );\n }\n }\n\n $normalizedMapping = $this->loadTableWithIds('properties', 'Property');\n if (!$normalizedMapping) {\n $this->logger->warn(\n 'The mapping defined for values should use terms or property ids.' // @translate\n );\n return;\n }\n\n // Check if value suggest is available in order to prepare a temp table.\n if (!empty($this->modulesActive['ValueSuggest'])) {\n $sql = <<<'SQL'\nDROP TABLE IF EXISTS `_temporary_valuesuggest`;\nCREATE TABLE `_temporary_valuesuggest` (\n `id` int(11) NOT NULL,\n `property_id` int(11) DEFAULT NULL,\n `source` longtext COLLATE utf8mb4_unicode_ci,\n `items` longtext COLLATE utf8mb4_unicode_ci,\n `uri` longtext COLLATE utf8mb4_unicode_ci,\n `label` longtext COLLATE utf8mb4_unicode_ci,\n `info` longtext COLLATE utf8mb4_unicode_ci,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n\nSQL;\n $this->connection->executeStatement($sql);\n }\n\n // Mettre à jour la colonne des éléments.\n foreach ($migrationMapping as $key => &$map) {\n $field = $map['source'] ?? null;\n if (empty($field)) {\n unset($migrationMapping[$key]);\n } else {\n foreach ($normalizedMapping as $nMap) {\n if ($field === $nMap['source']) {\n $mapped = $map;\n unset($mapped['source']);\n $map = [\n 'source' => $map['source'],\n 'destination' => $nMap['destination'],\n 'property_id' => $nMap['property_id'],\n 'map' => array_filter($mapped),\n ];\n if (empty($map['map'])) {\n unset($migrationMapping[$key]);\n }\n break;\n }\n }\n if (empty($map['property_id'])) {\n unset($migrationMapping[$key]);\n $this->logger->warn(\n 'No map for field \"{label}\".', // @translate\n ['label' => $field]\n );\n }\n }\n }\n unset($map);\n\n if (!count($migrationMapping)) {\n $this->logger->warn(\n 'The mapping defined to migrate values should use terms or property ids.' // @translate\n );\n return;\n }\n\n // The process for all-post should be the last.\n if (isset($templateGroups[self::TYPE_ALL_POST])) {\n $v = $templateGroups[self::TYPE_ALL_POST];\n unset($templateGroups[self::TYPE_ALL_POST]);\n $templateGroups[self::TYPE_ALL_POST] = $v;\n } else {\n $templateGroups[self::TYPE_ALL_POST] = null;\n }\n\n $this->stats['removed'] = 0;\n $this->stats['not_managed'] = [];\n foreach ($templateGroups as $group => $templateLabels) {\n $processAll = $group === self::TYPE_ALL_PRE\n || $group === self::TYPE_ALL_POST;\n if ($processAll) {\n $templateId = null;\n $this->logger->notice(\n 'Processing values for all templates.' // @translate\n );\n } else {\n $templateIds = [];\n foreach ($templateLabels as $templateLabel) {\n $templateId = $this->bulk->getResourceTemplateId($templateLabel);\n if (!$templateId) {\n $this->logger->warn(\n 'Skipping \"{template_group}\": no template for \"{label}\".', // @translate\n ['template_group' => $group, 'label' => $templateLabel]\n );\n continue 2;\n }\n $templateIds[] = $templateId;\n }\n $this->logger->notice(\n 'Processing values for template group \"{template_group}\".', // @translate\n ['template_group' => $group]\n );\n }\n\n if ($processAll) {\n $sqlAndWhere = '';\n $baseBind = [];\n $baseTypes = [];\n } else {\n $sqlAndWhere = 'AND `resource`.`resource_template_id` IN (:resource_template_ids)';\n $baseBind = ['resource_template_ids' => $templateIds];\n $baseTypes = ['resource_template_ids' => $this->connection::PARAM_INT_ARRAY];\n }\n\n // Pre-process on whole resource.\n $this->transformValues(\n [\n 'map' => [\n $group => '* Pre',\n ],\n ],\n [\n 'group' => $group,\n 'templateLabels' => $templateLabels,\n 'sqlAndWhere' => $sqlAndWhere,\n 'baseBind' => $baseBind,\n 'baseTypes' => $baseTypes,\n ]\n );\n\n // Main process on each map.\n foreach ($migrationMapping as $map) {\n if (empty($map['map'][$group])) {\n continue;\n }\n // All is the first process, so skip next ones when all is set.\n if ($group !== self::TYPE_ALL_PRE && !empty($map['map'][self::TYPE_ALL_PRE])) {\n continue;\n }\n // All-post is the only process, so skip next ones when set.\n if ($group !== self::TYPE_ALL_POST && !empty($map['map'][self::TYPE_ALL_POST])) {\n continue;\n }\n if ($this->isErrorOrStop()) {\n break 2;\n }\n\n $this->transformValues($map, [\n 'group' => $group,\n 'templateLabels' => $templateLabels,\n 'sqlAndWhere' => $sqlAndWhere,\n 'baseBind' => $baseBind,\n 'baseTypes' => $baseTypes,\n ]);\n }\n\n // Post-process on whole resource.\n $this->transformValues(\n [\n 'map' => [\n $group => '* Post',\n ],\n ],\n [\n 'group' => $group,\n 'templateLabels' => $templateLabels,\n 'sqlAndWhere' => $sqlAndWhere,\n 'baseBind' => $baseBind,\n 'baseTypes' => $baseTypes,\n ]\n );\n }\n\n // Check if value suggest is available in order to prepare a temp table.\n if (!empty($this->modulesActive['ValueSuggest'])) {\n $this->saveMappingsSourceUris();\n $sql = <<<'SQL'\nDROP TABLE IF EXISTS `_temporary_valuesuggest`;\nSQL;\n $this->connection->executeStatement($sql);\n }\n\n $sql = <<<'SQL'\nDROP TABLE IF EXISTS `_temporary_value`;\nSQL;\n $this->connection->executeStatement($sql);\n\n if ($this->stats['removed']) {\n $this->logger->warn(\n 'A total of {total} values were removed.', // @translate\n ['total' => $this->stats['removed']]\n );\n }\n\n if (count($this->stats['not_managed'])) {\n $this->logger->warn(\n 'The following processes are not managed: \"{list}\".', // @translate\n ['list' => implode('\", \"', $this->stats['not_managed'])]\n );\n }\n\n $this->logger->notice(\n 'Values were transformed.' // @translate\n );\n\n $this->entityManager->flush();\n $this->entityManager->clear();\n $this->refreshMainResources();\n }", "protected function buildValuesForUpdate()\n {\n $values = array();\n foreach ($this->values as $col => $value) {\n $values[] = \"{$col} = {$value}\";\n }\n return PHP_EOL . 'SET' . $this->indentCsv($values);\n }", "private function buildValues() {\n\t\t$sql = \"\";\n\t\tif (!empty($this->fields)) {\n\t\t\t$i=0;\n\t\t\t$fields = \"\";\n\t\t\t$values = \"\";\n\t\t\tforeach ($this->fields as $field => $value) {\n\t\t\t\t$fields .= ($i > 0 ? \", \" : \"\") . $this->escapeField($field);\n\t\t\t\t$values .= ($i > 0 ? \", \" : \"\");\n\t\t\t\t\n\t\t\t\tif (is_array($value)) {\n\t\t\t\t\tif (isset($value['bind_value']) && $value['bind_value'] === false)\n\t\t\t\t\t\t$values .= (isset($value['escape']) && $value['escape'] ? $this->escapeField($value['value']) : $value['value']);\n\t\t\t\t\telse {\n\t\t\t\t\t\t$values .= \"?\";\n\t\t\t\t\t\t$this->values[] = $value['value'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$values .= \"?\";\n\t\t\t\t\t$this->values[] = $value;\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t$sql .= \" (\" . $fields . \") VALUES (\" . $values . \")\";\n\t\t}\n\t\t\n\t\treturn $sql;\n\t}", "protected function setNewValues()\n {\n $keys = array_keys( $this->model->attributes() );\n foreach( $keys as $key )\n {\n $newValue = $this->container->get('request_stack')->getCurrentRequest()->get($key);\n if( isset($newValue) && ($key != $this->model->primary_key[0]))\n {\n $this->model->$key = $newValue;\n }\n } \n }", "protected function setFieldOriginalValue()\n {\n $values = $this->model->toArray();\n\n $this->builder->fields()->each(function (Field $field) use ($values) {\n $field->setOriginal($values);\n });\n }", "public function GenerateData()\n\t{\n\t\t$data_state = $this->_Generate($this->_Prepare($this->_pattern));\n\t\t\n\t\t// Perform subpattern substitutions\n\t\tif ($count = count($data_state->subpattern_products))\n\t\t{\n\t\t\t$data_state->subpattern_products = array_merge(array(' '), $data_state->subpattern_products);\n\n\t\t\t++$count;\n\t\t\tfor ($i=$count-1; $i > 0; --$i) // last references processed first\n\t\t\t{\n\t\t\t\t$data_state->product = str_replace('${'.$i.'}', $data_state->subpattern_products[$i], $data_state->product);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$data_state->product = str_replace('${0}', str_replace('${0}', '', $data_state->product), $data_state->product);\n\t\t\n\t\treturn $data_state->product;\n\t}", "protected function buildEavAttributeValues() : void\n {\n $attributeSet = $this->_getAttributeSet();\n\n foreach (self::$eavRawAttributes[$attributeSet->getKey()] as $eavRawAttribute) {\n $eavRawAttribute->setForeignEavName($this->getForeign());\n $value = $eavRawAttribute->getValueInstance($this->id, $this->getForeign(), $this->_languageId);\n $this->attributes[$eavRawAttribute->code] = $value->value;\n $this->eavRawAttributeValues[$eavRawAttribute->code] = $value;\n }\n }", "protected function applyValues()\n {\n foreach ($this->_elements as $element) {\n $name = $element->getAttribute(\"name\");\n if (isset($this->_values[$name])) {\n $element->setAttribute(\"value\", $this->_values[$name]);\n } elseif (substr($name, -2) == \"[]\" && isset($this->_values[substr($name, 0, -2)])) {\n $element->setAttribute(\"value\", $this->_values[substr($name, 0, -2)]);\n }\n }\n }", "protected function prepareValuesForValid() {\n\t\t$this->valuesForValid = array();\n\t\t$value = $this->getValue();\n\t\tif (is_array($value)) {\n\t\t\tforeach($value as $v) {\n\t\t\t\t$this->valuesForValid[] = $v[db::getCfg('relatedValue')];\n\t\t\t}\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of denunciante_id.
public function getDenuncianteId() { return $this->denunciante_id; }
[ "public function getDenunciadoId()\n {\n return $this->denunciado_id;\n }", "public function getDeId()\n {\n return $this->de_id;\n }", "public function get_id_d() {\n return $this->id_d;\n }", "public function getDealId()\n {\n $value = $this->get(self::DEAL_ID);\n return $value === null ? (string)$value : $value;\n }", "public function get_id_d() {\n return $this->mo->get_id_d();\n }", "public function getDNID();", "public function obtenerID() {\n return $this->id;\n }", "public function getDepositId()\n {\n return (string) $this->json()->deposit_id;\n }", "public function getDonationId(): Uuid {\n\t\treturn ($this->donationId);\n\t}", "public function getDistrictid()\n {\n return $this->districtid;\n }", "public function getDistrictId()\n {\n return $this->districtId;\n }", "public function getProfileDistrictId(): int {\n\t\treturn ($this->profileDistrictId);\n\t}", "public function getDistrictId()\n {\n return $this->district_id;\n }", "public function getDistrictId();", "public function getDistrictID()\n {\n return $this->districtID;\n }", "public function getID() {\n return $this->getAttribute('id');\n }", "public function getID() {\n\t\treturn $this->getAttribute('id');\n\t}", "public function getIdDemande()\r\n {\r\n return $this->idDemande;\r\n }", "public function _get_id_district() {\n\t\treturn $this->_id_district;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns DateTime as string in ISO8601 with format "Ymd\TH:i:sO"
public function toISO8601() { return $this->toNativeDateTime()->format(\DateTime::ISO8601); }
[ "public function toIso8601(): string\n {\n return $this->dateTime->format('c');\n }", "public function toISO8601(): Str\n {\n return $this->toFormatInternal(\\Datetime::ISO8601);\n }", "public function toIso8601String()\r\n {\r\n return $this->format(static::ISO8601);\r\n }", "public function AsISO8601() {\n // 2004-02-12T15:19:21+00:00\n\n return ( date(\"A\", $this->AsTimeStamp() ) );\n }", "public function getDateIso8601()\n {\n return date(\\DateTime::ISO8601, $this->timestamp);\n }", "public function toIso8601String()\n {\n return $this->toAtomString();\n }", "public function Iso8601() {\n\n\t\treturn $this->owner->Format( DateTime::ISO8601 );\n\n\t}", "public static function datetimeISO8601($datetime = null)\n {\n $out = date('c', $datetime ? strtotime(self::datetime($datetime)) : time());\n return str_replace('+00:00', 'Z', $out);\n }", "public static function isoString()\n {\n return gmdate(\"Y-m-d\\TH:i:s\\Z\");\n }", "public static function getPrintableDatetime(): string\n {\n return (new DateTime())->format(\"Y-m-d\\TH:i:s.vP\");\n }", "public function toDateTimeString(): string\n {\n list($date, $time, $micros) =\n explode(' ', $this->format('Y-m-d H:i:s u'));\n\n return $date . ' ' . $time . ($micros != 0 ? rtrim('.' . $micros, '0') : '');\n }", "public function iso()\n {\n return $this->format('Y-m-d\\TH:i:sP');\n }", "function datetime_to_iso8601($d)\n{\n return $d->format(DateTime::ATOM);\n}", "public function toDatetimeString(): Str\n {\n return $this->toFormatInternal('Y-m-d H:i:s');\n }", "public function toISOFormat($dateTime)\n {\n $isoDateObj = new \\DateTime($dateTime);\n \n return $isoDateObj->format('Y-m-d\\TH:i:s\\Z');\n }", "public function convert_to_iso_8601($datetime) {\n if(empty($datetime)) \n $datetime = time();\n else\n $datetime = strtotime($datetime);\n if($this->is_valid_date($datetime))\n return date('c',$datetime);\n return date('c',0);\n }", "public function getIso8601() {\n return $this->iso8601;\n }", "public static function toIso8601ZuluWithoutMs(DateTime $date_time): string\n {\n return $date_time->format('Y-m-d\\\\TH:i:s\\\\Z');\n }", "public function getXml()\n\t{\n\t\treturn '<dateTime.iso8601>'.$this->getIso().'</dateTime.iso8601>';\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get any schedule overrides for today's date. If currenthour is true, only overrides that are in effect NOW will be returned
function master_get_overrides($currenthour = false) { global $wpdb; $now = strtotime(current_time("mysql")); $date = date('Y-m-d', $now); $show_shifts = $wpdb->get_results("SELECT `meta`.`post_id` FROM ".$wpdb->prefix."postmeta AS `meta` WHERE `meta_key` = 'show_override_sched' AND `meta_value` LIKE '%".$date."%';"); $scheds = array(); if($show_shifts) { foreach($show_shifts as $shift) { $next_sched = get_post_meta($shift->post_id,'show_override_sched',false); $time = $next_sched[0]; if($currenthour) { //convert to 24 hour time $check = array(); $check = $time; $time = station_convert_time($time); //compare to the current timestamp if($time['start_timestamp'] <= $now && $time['end_timestamp'] >= $now) { $title = get_the_title($shift->post_id); $scheds[] = array('post_id' => $shift->post_id, 'title' => $title, 'sched' => $time); } else { continue; } } else { $title = get_the_title($shift->post_id); $sched = get_post_meta($shift->post_id,'show_override_sched',false); $scheds[] = array('post_id' => $shift->post_id, 'title' => $title, 'sched' => $sched[0]); } } } return $scheds; }
[ "public function started_schedules_daily()\n {\n $startedSchedulesDaily = $this->daily_scope('pickupdate', $this->started_schedules());\n\n return $startedSchedulesDaily;\n }", "public function getToday()\n {\n return $this->getTasks()\n ->where('schedule', '<=', Carbon::today()->format('Y-m-d'))\n ->orderBy('schedule')\n ->orderBy('importance', 'desc');\n }", "private static function is_overriding_schedule($day) {\n\t\treturn isset(self::$override_schedules[$day]);\n\t}", "public static function get_his_defaults() {\n\t\t$query = \"SELECT cd.race_meet_id,\n rm.track_id,\n rm.start_date,\n rm.end_date,\n rm.name AS meet_name,\n cd.past_days,\n cd.previous_track_id,\n cd.default_previous_date,\n\t\t\t\t\t cd.age,\n trk.site_url,\n trk.scratches_url,\n trk.name AS track_name\n FROM current_defaults AS cd\n INNER JOIN race_meet AS rm\n USING (race_meet_id)\n INNER JOIN track as trk\n USING (track_id)\n LIMIT 1\n \";\n\n\t\t$conn = new PDOConnection ();\n\t\t$stmt = $conn->pdo->prepare ( $query );\n\t\t$stmt->execute ( );\n\t\t\n\t\t$defaults = $stmt->fetch( PDO::FETCH_ASSOC );\n\t\t$defaults ['meet_name'] = addslashes ( $defaults ['meet_name'] );\n\t\t$defaults ['track_name'] = addslashes ( $defaults ['track_name'] );\n\t\t\n\t\t$defaults ['meet_filter'] = \"race_date >= '{$defaults['start_date']}' AND\n race_date <= '{$defaults['end_date']}' AND\n track_id = '{$defaults['track_id']}'\";\n\t\treturn $defaults;\n\t}", "public function completed_schedules_daily()\n {\n $completedSchedulesDaily = $this->daily_scope('pickupdate', $this->completed_schedules());\n\n return $completedSchedulesDaily;\n }", "public static function GetTodayAssignments()\n {\n // $today = EsomoDate::GetCurrentDate();\n $yesterday = EsomoDate::GetYesterday();\n $tomorrow = EsomoDate::GetTomorrow();\n\n $assignments = self::GetAssignmentsInTimeframe($yesterday,$tomorrow);\n\n return $assignments;\n }", "public function getActiveScheduleEmails();", "public function getPendingByCurrent()\n {\n return $this->model->where('scheduled_at',Carbon::now()->format('Y-m-d H:i'))->get();\n }", "public function getCurrentSchedule()\n {\n return Mage::registry('current_schedule');\n }", "public static function reloadSchedules(){\n self::$schedules = self::getSchedules();\n return self::$schedules;\n }", "function station_current_schedule($scheds = array()) {\r\n\t$now = current_time(\"timestamp\");\r\n\t$current = array();\r\n\t\r\n\tforeach($scheds as $sched) {\r\n\t\r\n\t\tif($sched['day'] != date(\"l\", $now)) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t\t\r\n\t\t$start = strtotime(date('Y-m-d', $now).$sched['start_hour'].':'.$sched['start_min'].' '.$sched['start_meridian']);\r\n\t\t\t\r\n\t\tif($sched['start_meridian'] == 'pm' && $sched['end_meridian'] == 'am') { //check for shows that run overnight into the next morning\r\n\t\t\t$end = strtotime(date('Y-m-d', ($now+86400)).$sched['end_hour'].':'.$sched['end_min'].' '.$sched['end_meridian']);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$end = strtotime(date('Y-m-d', $now).$sched['end_hour'].':'.$sched['end_min'].' '.$sched['end_meridian']);\r\n\t\t}\r\n\t\t\r\n\t\t//a show can't end before it begins... if it does, it ends the following day.\r\n\t\tif($end <= $start) {\r\n\t\t\t$end = $end + 86400;\r\n\t\t}\r\n\t\t\t\r\n\t\t//compare to the current timestamp\r\n\t\tif($start <= $now && $end >= $now) {\r\n\t\t\t$current = $sched;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $current;\r\n}", "public function setScheduleDefaults () {\r\n\t$this->ensureLoggedIn();\r\n\r\n\treturn $this->request(array('req' => 'setscheduledefaults'));\r\n\t}", "public function getFutureSchedule(){\n $schedule = DB::table('scheduler')\n ->join('scheduler_parent', 'scheduler_parent.id', '=', 'scheduler.parent_id')\n ->join('users', 'users.id', '=', 'scheduler_parent.user_id')\n ->where('scheduler_parent.vendor_id', $this->id)\n ->whereDate('scheduler.start', '>', Carbon::today()->toDateString())\n ->get();\n\n return $schedule;\n\n }", "public static function getListCustomerIdHaveScheduleToday($date = '') {\n $from = time();\n $retVal = array();\n// $arrModel = self::model()->findAll();\n// $agentId = isset(Yii::app()->user) ? Yii::app()->user->agent_id : '';\n// foreach ($arrModel as $value) {\n//// if ($value->status != self::STATUS_INACTIVE\n//// && DateTimeExt::isToday($value->start_date, DomainConst::DATE_FORMAT_1)\n//// && !DateTimeExt::isToday($value->created_date, DomainConst::DATE_FORMAT_1)) {\n// if ($value->isScheduleOnDate($date)) {\n// $customerId = $value->getCustomer();\n// $mCustomer = $value->getCustomerModel();\n// if (isset($mCustomer) && ($mCustomer->getAgentId() == $agentId)) {\n// $retVal[] = $mCustomer->id;\n// }\n// }\n// }\n $agentId = isset(Yii::app()->user) ? Yii::app()->user->agent_id : '';\n $criteria=new CDbCriteria;\n $criteria->addCondition('t.status !='. self::STATUS_INACTIVE);\n if(empty($date)){\n $today = CommonProcess::getCurrentDateTime(DomainConst::DATE_FORMAT_4);\n $criteria->compare('DATE(t.start_date)', $today);\n $criteria->addCondition('DATE(t.created_date) != \"'. $today.'\"');\n }else{\n $criteria->compare('DATE(t.start_date)', $date);\n }\n $tblTreatmentSchedules = TreatmentSchedules::model()->tableName();\n $tblMedicalRecords = MedicalRecords::model()->tableName();\n $tblOneMany = OneMany::model()->tableName();\n $criteria->join = 'JOIN '.$tblTreatmentSchedules.' AS tr ON t.schedule_id = tr.id';\n $criteria->join .= ' JOIN '.$tblMedicalRecords.' AS me ON tr.record_id = me.id';\n $criteria->join .= ' JOIN '.$tblOneMany.' AS om ON me.customer_id = om.many_id';\n $criteria->compare('om.type', OneMany::TYPE_AGENT_CUSTOMER);\n $criteria->compare('om.one_id', $agentId);\n $criteria->select = 'DISTINCT me.customer_id as id';\n $arrModel = self::model()->findAll($criteria);\n foreach ($arrModel as $mScheduleDetail) {\n $retVal[] = $mScheduleDetail->id; // id -> customer_id\n }\n return $retVal;\n }", "public function get_effective_current_day() {\n\t\t$effective_current_day = false;\n\t\t$allowed_days = $this->get_allowed_delivery_days();\n\t\t$ready_to_set = false;\n\n\t\t// loop forever, until break\n\t\tfor ( $x = 0; $x >= 0; $x ++ ) {\n\t\t\tforeach ( $allowed_days as $day => $allowed ) {\n\t\t\t\tif ( $ready_to_set && $allowed ) {\n\t\t\t\t\t$effective_current_day = $day;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( $this->current_day_number == $day ) {\n\t\t\t\t\tif ( $allowed ) {\n\t\t\t\t\t\t$effective_current_day = $day;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t$ready_to_set = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $effective_current_day !== false ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $effective_current_day;\n\t}", "public static function getListCustomerHaveScheduleTodayCreatedToday() {\n $retVal = array();\n// $arrModel = self::model()->findAll();\n// $agentId = isset(Yii::app()->user) ? Yii::app()->user->agent_id : '';\n// foreach ($arrModel as $value) {\n// if ($value->status != self::STATUS_INACTIVE\n// && DateTimeExt::isToday($value->start_date, DomainConst::DATE_FORMAT_1)\n// && DateTimeExt::isToday($value->created_date, DomainConst::DATE_FORMAT_1)) {\n// $mCustomer = $value->getCustomerModel();\n//// if (isset($mCustomer)) {\n// if (isset($mCustomer) && ($mCustomer->getAgentId() == $agentId)) {\n// $retVal[] = $mCustomer;\n// }\n// }\n// }\n $arrCus = [];\n $agentId = isset(Yii::app()->user) ? Yii::app()->user->agent_id : '';\n $criteria=new CDbCriteria;\n $criteria->addCondition('t.status !='. self::STATUS_INACTIVE);\n $today = CommonProcess::getCurrentDateTime(DomainConst::DATE_FORMAT_4);\n// set date\n $criteria->compare('DATE(t.start_date)', $today);\n $criteria->compare('DATE(t.created_date)',$today);\n $tblTreatmentSchedules = TreatmentSchedules::model()->tableName();\n $tblMedicalRecords = MedicalRecords::model()->tableName();\n $tblOneMany = OneMany::model()->tableName();\n $criteria->join = 'JOIN '.$tblTreatmentSchedules.' AS tr ON t.schedule_id = tr.id';\n $criteria->join .= ' JOIN '.$tblMedicalRecords.' AS me ON tr.record_id = me.id';\n $criteria->join .= ' JOIN '.$tblOneMany.' AS om ON me.customer_id = om.many_id';\n $criteria->compare('om.type', OneMany::TYPE_AGENT_CUSTOMER);\n $criteria->compare('om.one_id', $agentId);\n $criteria->select = 'DISTINCT me.customer_id as id';\n $arrModel = self::model()->findAll($criteria);\n foreach ($arrModel as $mScheduleDetail) {\n $arrCus[] = $mScheduleDetail->id; // id -> customer_id\n }\n// find cus\n $criteriaCus=new CDbCriteria;\n $criteriaCus->addInCondition('t.id', $arrCus);\n $retVal = Customers::model()->findAll($criteriaCus);\n\n return $retVal;\n }", "public function getUserDateTimePreferences()\n {\n global $sugar_config, $db, $timedate, $current_user;\n\n $user = $this->_userFocus;\n\n $prefDate = array();\n\n if(!empty($user) && $this->loadPreferences('global')) {\n // forced to set this to a variable to compare b/c empty() wasn't working\n $timeZone = TimeDate::userTimezone($user);\n $timeFormat = $user->getPreference(\"timef\");\n $dateFormat = $user->getPreference(\"datef\");\n\n // cn: bug xxxx cron.php fails because of missing preference when admin hasn't logged in yet\n $timeZone = empty($timeZone) ? 'America/Los_Angeles' : $timeZone;\n\n if(empty($timeFormat)) $timeFormat = $sugar_config['default_time_format'];\n if(empty($dateFormat)) $dateFormat = $sugar_config['default_date_format'];\n\n $prefDate['date'] = $dateFormat;\n $prefDate['time'] = $timeFormat;\n $prefDate['userGmt'] = TimeDate::tzName($timeZone);\n $prefDate['userGmtOffset'] = $timedate->getUserUTCOffset($user);\n\n return $prefDate;\n } else {\n $prefDate['date'] = $timedate->get_date_format();\n $prefDate['time'] = $timedate->get_time_format();\n\n if(!empty($user) && $user->object_name == 'User') {\n $timeZone = TimeDate::userTimezone($user);\n // cn: bug 9171 - if user has no time zone, cron.php fails for InboundEmail\n if(!empty($timeZone)) {\n $prefDate['userGmt'] = TimeDate::tzName($timeZone);\n $prefDate['userGmtOffset'] = $timedate->getUserUTCOffset($user);\n }\n } else {\n $timeZone = TimeDate::userTimezone($current_user);\n if(!empty($timeZone)) {\n $prefDate['userGmt'] = TimeDate::tzName($timeZone);\n $prefDate['userGmtOffset'] = $timedate->getUserUTCOffset($current_user);\n }\n }\n\n return $prefDate;\n }\n }", "public function get_calendar_settings() {\n\t\t\t$date_format = wc_od_get_date_format( 'php' );\n\t\t\t$args = $this->get_delivery_date_args();\n\t\t\n\t\t\t[$days_timeslots, $days_timeslots_collection_obj] = $this->get_days_of_week_having_timeslots();\n\t\t\t\n\t\t\t$_ = $this->merge_days_timeslots($args['delivery_days'], $days_timeslots);\n\t\t\n\t\t\t$delivery_days_status = $this->custom_wc_od_get_delivery_days_status(\n\t\t\t\t$_,\n\t\t\t\tarray(\n\t\t\t\t\t'shipping_method' => $args['shipping_method'],\n\t\t\t\t),\n\t\t\t\t'checkout'\n\t\t\t);\n\n\t\t\t\n\t\t\t$daysOfWeekDisabled = array_keys($delivery_days_status, 'no', true);\n\n\t\t\treturn wc_od_get_calendar_settings(\n\t\t\t\tarray(\n\t\t\t\t\t'startDate' => wc_od_localize_date( $args['start_date'], $date_format ),\n\t\t\t\t\t'endDate' => wc_od_localize_date( ( wc_od_get_timestamp( $args['end_date'] ) - DAY_IN_SECONDS ), $date_format ), // Inclusive.\n\t\t\t\t\t'daysOfWeekDisabled' => $daysOfWeekDisabled, \n\t\t\t\t\t'datesDisabled' => array_map( 'wc_od_localize_date', $args['disabled_days'] ),\n\t\t\t\t),\n\t\t\t\t'checkout'\n\t\t\t);\n\t\t}", "public function fetchToday()\n {\n return $this->order\n ->where(DB::raw('DATE(updated_at)'), '>=', Carbon::now()->startOfDay())\n ->get();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the specified return type of a function Gets the specified return type of a reflected function.
public function getReturnType(): \ReflectionType {}
[ "public abstract function getReturnType() : ?_Type;", "private function getReturnType(): Type\n {\n switch ($this->getMethodNamePrefix()) {\n case 'set':\n case 'uns':\n $returnType = new ObjectType($this->classReflection->getName());\n break;\n case 'has':\n $returnType = new BooleanType();\n break;\n default:\n $returnType = new MixedType();\n break;\n }\n\n return $returnType;\n }", "public function getReturnType(): Type\n {\n if (! isset($this->returnType)) {\n /** @var \\Nuwave\\Lighthouse\\Schema\\ExecutableTypeNodeConverter $typeNodeConverter */\n $typeNodeConverter = app(ExecutableTypeNodeConverter::class);\n $this->returnType = $typeNodeConverter->convert($this->field->type);\n }\n\n return $this->returnType;\n }", "public function getReturnType(): Type\n {\n if ($this->returnType === null) {\n /** @var \\Nuwave\\Lighthouse\\Schema\\ExecutableTypeNodeConverter $typeNodeConverter */\n $typeNodeConverter = app(ExecutableTypeNodeConverter::class);\n $this->returnType = $typeNodeConverter->convert($this->field->type);\n }\n\n return $this->returnType;\n }", "public function getReturnType()\n {\n $returnPart = strstr($this->getDocComment(), '@return');\n if (false === $returnPart) {\n return null;\n }\n \n $returnParts = explode(' ', trim(str_replace('@return', '', $returnPart)));\n $returnType = trim($returnParts[0]);\n try {\n $reflectionType = stubReflectionPrimitive::forName(new ReflectionClass('stubReflectionPrimitive'), $returnType);\n } catch (stubIllegalArgumentException $iae) {\n $reflectionType = new stubReflectionClass($returnType);\n }\n \n return $reflectionType;\n }", "public function getReturnType()\n {\n return $this->return_type;\n }", "public function getFunctionReturnType($function, $paramTypes);", "public function getReturnValueType($type, $getter);", "public function callbackReturnType($callback): ?ReflectionType\n {\n return $this->callbackReflector($callback)->getReturnType();\n }", "public function getReturnType()\n {\n $phpDocReturnType = ($phpDocType = $this->getDocReturnType()) ? PhpDocTypeHelper::toType($phpDocType) : null;\n $inferredReturnType = $this->getCodeReturnType();\n\n $phpDocReturnType?->setAttribute('fromPhpDoc', true);\n\n if (! $phpDocReturnType) {\n return $inferredReturnType;\n }\n\n if ($phpDocType->getAttribute('source') === 'response') {\n return $phpDocReturnType;\n }\n\n if ($inferredReturnType instanceof UnknownType) {\n return $phpDocReturnType;\n }\n\n if (\n $phpDocReturnType instanceof Generic\n && (new TypeWalker)->first($phpDocReturnType, fn (Type $t) => $t->isInstanceOf(JsonResource::class) || $t->isInstanceOf(Model::class))\n ) {\n return $phpDocReturnType;\n }\n\n $phpDocReturnTypeWeight = $phpDocReturnType ? $this->countKnownTypes($phpDocReturnType) : 0;\n $inferredReturnTypeWeight = $this->countKnownTypes($inferredReturnType);\n if ($phpDocReturnTypeWeight > $inferredReturnTypeWeight) {\n return $phpDocReturnType;\n }\n\n return $inferredReturnType;\n }", "public static function returnType(ReflectionMethod $reflectionMethod): ?ReflectionType\n {\n if ($reflectionMethod->getReturnType()) {\n return ReflectionType::makeForBetterReflectionType(\n $reflectionMethod->getReturnType()\n );\n }\n\n return ReflectionType::makeForPhpDocumentorTypes(\n array_map('strval', $reflectionMethod->getDocBlockReturnTypes())\n );\n }", "public function get_function_reflector() {\n\t\tif ( ! $this->is_function_reflector_set ) {\n\t\t\t$this->set_function_reflector( $this->derive_function_reflector() );\n\t\t}\n\t\treturn $this->function_reflector;\n\t}", "public function setReturnType(string $type);", "public function getThrowTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $funcCall, Scope $scope): ?\\PHPStan\\Type\\Type\n\t{\n\t}", "public function getMethodReturnType($typeName, $methodName)\n {\n return $this->getMethodsMap($typeName)[$methodName]['type'];\n }", "public function getReturnTypeAttribute()\n\t{\n\t\t\n\t\treturn self::getReturnTypes()[$this->return_type_id] ?? \"-\";\n\t\t\n\t}", "public function setReturnType($var)\n {\n GPBUtil::checkEnum($var, \\Aliyun\\OTS\\ProtoBuffer\\Protocol\\ColumnReturnType::class);\n $this->return_type = $var;\n $this->has_return_type = true;\n\n return $this;\n }", "public function getReturnTypeOf(O\\Expression $expression);", "public function setReturnType($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Api\\Expr\\V1beta1\\DeclType::class);\n $this->return_type = $var;\n\n return $this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets query for [[Prereq]].
public function getPrereq() { return $this->hasOne(Course::className(), ['course_id' => 'prereq_id']); }
[ "public function getPrereqInfo() {\n \treturn '';\n }", "public function getRelationQuery() {\r\n\t\t$relationModel = $this->getRelationModel();\r\n\t\t$recordModel = $this->getParentRecordModel();\r\n\t\t$query = $relationModel->getQuery($recordModel);\r\n\t\treturn $query;\r\n\t}", "private function getWhereQuery() {\n\t\t$where = \"relatedTo='\" . $this->relatedTo . \"' and relatedID='\" . $this->relatedID . \"'\";\n\t\treturn($where);\n\t}", "public function getPhpcrQuery()\n {\n return $this->query;\n }", "public function getPrereqInfo() {\n \t$val = $this->cacheGetPlain('prerequisites');\n \tif (is_null($val))\n \t\treturn $this->cacheSetPlain('prerequisites', $this->getOffering()->getPrereqInfo());\n \telse\n \t\treturn $val;\n\t}", "public function getQ()\n {\n return $this->get(self::Q);\n }", "public function getQuery()\n\t\t{\n\t\t\tif($this->pop_state != \"\" || $this->pop_race != \"\")\n\t\t\t{\n\t\t\t\t// Set the fields chosen\n\t\t\t\t$this->setFields();\n\n\t\t\t\t// Check if race was chosen\n\t\t\t\tif(sizeof($this->columns) == 3)\n\t\t\t\t{\n\t\t\t\t\t$this->columns = array();\n\t\t\t\t\tarray_push($this->columns, \"*\");\n\t\t\t\t}\n\n\t\t\t\t// Build the query\n\t\t\t\t$this->build();\n\t\t\t}\n\t\t\t\n\t\t\t// Return it\n\t\t\treturn $this->query;\n\t\t}", "public function getQuery();", "public function getQuery() {\n $jql= $this->what.' '.$this->op->forValue($this->value);\n \n foreach ($this->next as $query) $jql .= sprintf(\n ' %s %s',\n $query[0],\n $query[1]->size() ? '('.$query[1]->getQuery().')' : $query[1]->getQuery()\n );\n \n if (sizeof($this->order)) {\n $jql.= ' order by';\n \n foreach ($this->order as $i => $order) {\n $jql.= ' '.$order[0].' '.$order[1].($i+1 < sizeof($this->order) ? ', ' : '');\n }\n }\n \n return $jql;\n }", "public function getSparqlQuery()\n {\n return $this->sparqlQuery;\n }", "public function getQq()\n {\n return $this->qq;\n }", "public function getAdditionalQuery()\n {\n return $this->additionalQuery;\n }", "public function getQuery()\n {\n return $this->job_note;\n }", "public function getQuery()\n {\n return isset ($this->_parts['query']) ? $this->_parts['query'] : null;\n }", "public function getQuery()\n\t\t{\n\t\t\t// Offense selected and maybe race\n\t\t\tif($this->arrests_offense != \"\")\n\t\t\t{\n\t\t\t\t// Set the fields\n\t\t\t\t$this->setFields();\n\n\t\t\t\t// Check if race was chosen\n\t\t\t\tif(sizeof($this->columns) == 3)\n\t\t\t\t{\n\t\t\t\t\t$this->columns = array();\n\t\t\t\t\tarray_push($this->columns, \"*\");\n\t\t\t\t}\n\n\t\t\t\t// Build the query\n\t\t\t\t$this->build();\n\t\t\t}\n\t\t\t// Offense not selected and maybe race\n\t\t\telse if($this->arrests_offense == \"\" && $this->arrests_race != \"\")\n\t\t\t{\n\t\t\t\t$this->setFields();\n\t\t\t\t$this->build();\n\t\t\t}\n\n\t\t\treturn $this->query;\n\t\t}", "public function getQuery() : ?string \n {\n if ( ! $this->hasQuery()) {\n $this->setQuery($this->getDefaultQuery());\n }\n return $this->query;\n }", "public function get_query() {\n return $this->query;\n }", "protected function where_clause_Recruitme()\n\t{\n\t\tif(!method_exists($this->incoming_record, 'get_Recruitme'))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$Recruitme = $this->incoming_record->get_Recruitme();\n\t\t$where_fragment = '';\n\t\tif($Recruitme != '')\n\t\t{\n\t\t\t$where_fragment=\" and sp.Recruitme = {$this->db->quote($Recruitme)}\";\n\t\t}\n\t\treturn $where_fragment;\n\t}", "public function getOtherQuery(): string\n {\n return $this->otherQuery;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate random file name
private function randomFileName() { $fileName = ''; // Generate the datetime format file name if ($this->randomNameType == 1) { date_default_timezone_set($this->timezone); $date = date($this->randomLength); echo $dir = $this->savePath . $date; if ( !file_exists($dir) ) { mkdir($dir, $this->mode, true); } $fileName = $date . '/' . time(); } elseif ($this->randomNameType == 2) // Generate random character file name { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; $max = strlen($chars) - 1; mt_srand( (double) microtime() * 1000000); for ($i = 0; $i < $this->randomLength; $i++) { $fileName .= $chars[mt_rand(0, $max)]; } } else { } $this->fileExt = $this->getFileExt($this->files["name"]); $fileName = $fileName . '.' . $this->fileExt; return $fileName; }
[ "public function generateRandomFilename() {\n $count = 0;\n do {\n $random = random_bytes(16);\n $randomString = bin2hex($random);\n $count++;\n }\n while(file_exists($this->getUploadRootDir().'/'.$randomString.'.'.$this->getFile()->guessExtension()) && $count < 50);\n\n return $randomString;\n }", "public function generateRandomFilename()\n {\n $count = 0;\n do {\n $random = random_bytes(16);\n $randomString = bin2hex($random);\n $count++;\n } while (file_exists($this->getUploadRootDir() . '/' . $randomString . '.' . $this->getFile()->guessExtension()) && $count < 50);\n return $randomString;\n }", "private function generateFileName()\n {\n return md5(time().rand(1000, 9999));\n }", "private function getRandomFileName()\n {\n foreach (range(0, 10) as $number) {\n $hash = hash('sha1', $number . mt_rand(1, 1000000));\n $random_filename = $this->uploads_directory . DIRECTORY_SEPARATOR . $hash;\n if (!file_exists($random_filename)) {\n if (file_put_contents($random_filename, '', LOCK_EX) !== false) {\n if (stristr(PHP_OS, 'WIN') === false) {\n if (chmod($random_filename, 0644) === false) {\n @unlink($random_filename);\n throw new ILException(__METHOD__ . ' Can\\'t changing the mode of access to the file!', self::ERR_CHMOD);\n }\n }\n return $random_filename;\n }\n }\n }\n throw new ILException(__METHOD__ . ' Can\\'t create a file with a random name', self::ERR_CREATE_RANDOM_FILENAME);\n }", "public function generateFilename()\n {\n return sha1($this->getOriginalName().mt_rand(11111, 99999)).$this->getExtension($this->getOriginalExtension());\n }", "private function RandomFileName(){\r\n /**\r\n * var abc taken from the Conf class\r\n */\r\n return substr(str_shuffle($this->abc), 0, 10);\r\n }", "private function genFilename()\t{\n\t\t$charset = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t\t$randString = '';\n\t\tfor ($i = 0; $i < 15; $i++) {\n\t\t\t$randString .= $charset[rand(0, strlen($charset)-1)];\n\t\t}\n\t\t$path = DIRECTORY_SEPARATOR . \"Data\" . DIRECTORY_SEPARATOR . \"cookies\" . DIRECTORY_SEPARATOR . \"cookieFile\" . $randString;\n\t\treturn realpath(dirname(dirname(dirname(__FILE__)))) . $path;\n\t}", "public function newNameFile() : string\n {\n return md5(uniqid(rand(), true));\n }", "private function generateUniqueFileName()\n {\n // which is based on timestamps\n return md5(uniqid());\n }", "public function getRandomName($filename)\n\t{\n \t$strSecret = '!@#$%^&*()_+QBGFTNKU' . time() . rand(111111,999999);\n \t\t$filenameMd5 = substr(md5($filename . $strSecret),0,10);\n \t\treturn date('Y_m_d') . '_' . $filenameMd5 . '.' . $this->getExtension($filename);\n \t}", "private function generateUniqueFileName() {\r\n \r\n return md5(uniqid());\r\n }", "private function createFileName() {\n\t\t$extension = $this->getFileExtension($this->originalFileName);\n\t\t$number = rand(100000, 500000);\n\t\treturn 'vid'.$number.'.'.$extension;\n\t}", "public static function GET_RANDOM_NAME(): string\n\t{\n\t\t$extension = self::$thiss->getExtension();\n\t\t$extension = empty($extension) ? '' : '.' . $extension;\n\t\treturn time() . '_' . bin2hex(random_bytes(10)) . $extension;\n\t}", "public function generate_filename(){\n\t\t\t$md5 = md5(microtime() * time());\n\n\t\t\t$filename = $md5 . \".jpg\";\n\n\t\t\treturn $filename;\n\t\t}", "protected function generateFilename()\n {\n $format = $this->determineFormat();\n $name = '';\n for ($i = 0; $i < 7; $i++)\n $name .= chr(rand(97, 122));\n return \"image-data-$name-\" . time() . \".$format\";\n }", "protected function generateFileName()\r\n {\r\n $name = md5(uniqid()) . '.pdf';\r\n\r\n return $name;\r\n }", "function create_filename($folder, $fn, $rnd = true)\n{\n $ok = false;\n $foo = pathinfo($fn);\n $ext = $foo['extension'];\n $add = '';\t// addtional random string(for safe filename), eg: 3c1_somename.ext, '3c1_' is additional string\n while (!$ok) {\n if ($rnd) {\n $tmp_name = random_str(16) . '.' . $ext;\n } else {\n $tmp_name = $add . safe_filename($fn);\n }\n\n if (!file_exists($folder . '/' . $tmp_name)) {\n $ok = true;\n }\n $add = random_str(3) . '_';\n }\n return $tmp_name;\n}", "protected function makeRandomName()\n {\n return $this->name . md5(time() . uniqid());\n }", "public function getRandomFilename($extension = '');" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update a custom field
public function update_custom_field($data){ global $wpdb; if( !isset($data['option']) ) $data['option'] = array(); //check group if(!$data['core']['custom_group_id']){ $custom_group_id = $this->get_default_custom_group($data['core']['post_type']); $data['core']['custom_group_id'] = $custom_group_id; } $data['core']['name'] = str_replace(" ","_",$data['core']['name']); $sql = sprintf( "UPDATE %s ". "SET name = '%s', label = '%s', description = '%s',type = '%s', required_field = %d, ". "duplicated = %d, options = '%s' ". "WHERE id = %d", MF_TABLE_CUSTOM_FIELDS, $data['core']['name'], $data['core']['label'], $data['core']['description'], $data['core']['type'], $data['core']['required_field'], $data['core']['duplicate'], serialize($data['option']), $data['core']['id'] ); $wpdb->query($sql); }
[ "public function testUpdateCustomField()\n {\n }", "public function updated(CustomField $customField)\n {\n //\n }", "public function testUpdateAisleCustomFields()\n {\n }", "function update_field($field)\n {\n }", "public function update_custom_field_post()\n {\n //field id\n $id = $this->input->post('id', true);\n if ($this->field_model->update_field($id)) {\n //update field name\n $this->field_model->update_field_name($id);\n $this->session->set_flashdata('success', trans(\"msg_updated\"));\n redirect($this->agent->referrer());\n } else {\n $this->session->set_flashdata('error', trans(\"msg_error\"));\n redirect($this->agent->referrer());\n }\n }", "public function testUpdateItemCustomFields()\n {\n }", "public function testUpdateWorkCustomFields()\n {\n }", "public function testUpdateField()\n {\n $lead_id = '52219adccce8b4a68d000070';\n $field_id = '52219a33cce8b46dd400006a';\n $value = 'Updated value';\n\n $client = new ClinchPadClient('api-key');\n $resource = new ClinchPadFields($client);\n $resource->updateField($lead_id, $field_id, $value);\n\n $this->assertEquals('PUT', $client->getClient()->method);\n $this->assertEquals($client->getEndpoint() . '/leads/'.$lead_id.'/fields/' . $field_id, $client->getClient()->uri);\n }", "function acf_update_value($value, $post_id, $field)\n{\n}", "public function testUpdateExtraFields(): void { }", "function update_custom_field($key, $custom_field_details) {\n return $this->put_request($this->_lists_base_route.'customfields/'.rawurlencode($key).'.json',\n $custom_field_details);\n }", "function wpdb_update($field, $value){\n\n\t\tapply_filters( 'remo/update_value' , $field, $value);\n\n\t\tglobal $wpdb;\n\n\t}", "function update() \n {\n if(strtolower($this->name) == @$_POST['post_type']) \n {\n //set custom fields with posted value\n HTTP::setPostVars($this->Fields());\n \n $id = $_POST['post_ID'];\n \n $this->save($id);\n }\n }", "public function testUpdateProductionModelCustomFields()\n {\n }", "function edit_field($field_name,$field_title,$field_type,$db_field,$default_value,$edit_id)\r\n{\r\n global $db;\r\n $sql = \"UPDATE \".tbl(\"custom_field\").\" SET field_name= '\".$field_name.\"',field_type='$field_type',field_title='$field_title',default_value='$default_value',db_field='$db_field' WHERE custom_field_list_id='\".$edit_id.\"'\";\r\n $db->Execute($sql);\r\n}", "function update_value($value, $post_id, $field)\n {\n }", "public function testUpdateReplenishmentProcessCustomFields()\n {\n }", "public function update_custom_field_option_post()\n {\n $this->field_model->update_field_options();\n redirect($this->agent->referrer());\n }", "public function testUpdateQuickAdjustmentCustomFields()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a single Settings: client property
public function getSingleSettingClientPropertie($id = NULL) { $this->setRequestData(sprintf(self::RESOURCE_SETTING_CLIENTPROPERTIE, $id)); }
[ "public static function getClientSettings()\n\t{\n\t\tif(! self::$client_settings)\n\t\t{\n\t\t\tself::$client_settings = self::getDefaultClientSettings();\n\t\t}\n\t\t\n\t\treturn self::$client_settings;\n\t}", "public function getSingleClientPropertyValue($id = NULL)\n {\n\treturn $this->setRequestData(sprintf(self::RESOURCE_CLIENT_PROPERTYVALUE, $id));\n }", "public function getClientSettings ()\n {\n if (!isset($this->clientSettings))\n {\n $clientSettingsService = new ClientSettingsService();\n $this->clientSettings = $clientSettingsService->getClientSettings($this->id, $this->dealerId);\n }\n\n return $this->clientSettings;\n }", "public function getSettings()\n {\n return new ClientSettings($this->settings);\n }", "public function getSingle($key, $forClientId = null)\n\t{\n\t\t$params = array('key' => $key);\n\n\t\tif ($forClientId) {\n\t\t\t$params['for_client_id'] = $forClientId;\n\t\t}\n\n\t\treturn $this->post('settings/get', $params);\n\t}", "public function getSetting(){\n\t\treturn $this->findById(1);\n\t}", "public function settings()\n {\n return (new SettingsClient($this, 'settings'));\n }", "public function billing_client_settings_get($client_id = 0)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->login();\n\t\t\treturn $this->get_empty($this->client->billing_client_settings_get($this->session_id, $client_id));\n\t\t}\n\t\tcatch (SoapFault $e)\n\t\t{\n\t\t\treturn $this->get_error($e->getMessage());\n\t\t}\n\t}", "public function GetSettingValue($name)\r\n\t\t{\r\n\t\t\treturn $this->DB->GetOne(\"SELECT value FROM client_settings WHERE clientid=? AND `key`=?\",\r\n\t\t\t\tarray($this->ID, $name)\r\n\t\t\t);\r\n\t\t}", "public function client()\n {\n return Client::where('id', $this->clientID)->first()->slug;\n }", "function getProjectClientId() {\n return (integer) $this->getAdditionalProperty('project_client_id');\n }", "public function getSettingByPath($path) {\n\t\treturn Tx_Extbase_Reflection_ObjectAccess::getPropertyPath($this->settings, $path);\n\t}", "function getConfig($client_id=0)\n\t{\n\t\t//$this->db->cache_on();\n\t\t$return = $this->BASE_Select( TBL_APP_SETTINGS, array(\"id\"=>0), \"*\", array(), 1);\n\t\t//$this->db->cache_off();\n\t\t\n\t\treturn $return;\n\t}", "public function get_client_id() {\n return $this->get_option( 'client-id', '' );\n }", "public function getSetting()\n {\n return $this->setting;\n }", "public function client()\n {\n if (! $this->bean->fetchAs('person')->client) {\n $this->bean->client = R::dispense('person');\n }\n return $this->bean->fetchAs('person')->client;\n }", "static function get_client($post_id){\n $client = '';\n $source_meta = meta::get_meta( $post_id , 'source' );\n \n if( isset($source_meta['post_client']) && trim($source_meta['post_client']) != ''){\n $client = $source_meta['post_client'];\n }\n \n return $client; \n }", "public function getSoundcloudClientId()\n {\n $soundcloudClientId = Settings::where('label', 'soundcloud_client_id')->limit(1)->pluck('value');\n\n return response()->json($soundcloudClientId[0]);\n }", "public function client()\n {\n if ( ! $this->bean->fetchAs('person')->client) $this->bean->client = R::dispense('person');\n return $this->bean->fetchAs('person')->client;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if an userid is owner of the blog
function userIsBlogOwner($userid, $blogid){ $conn = open_db(); $query = "SELECT id FROM blogs WHERE userid = ".(int)$userid." AND id = ".(int)$blogid; $result = mysqli_query($conn, $query); if($result){ $row = mysqli_fetch_assoc($result); } close_db($conn); if((int)$row['id'] > 0) return true; return false; }
[ "function is_post_owner()\n\t{\n\t\t//initializing variables\n\t\tglobal $authordata;\n\t\t$user =& get_user();\n\t\t\n\t\tif (!is_object($user)) return false;\n\t\tif (!is_object($authordata)) return false;\n\t\tif ($authordata->ID != $user->ID) return false;\n\t\treturn true;\n\t}", "function posterOrOwnerOfPost($idpost, $iduser){\n\t$sql = 'SELECT id_user FROM wall_post WHERE id='.$idpost;\n\t$query = mysql_query($sql);\n\n\tif(!$query) return false;\n\n\t$result = mysql_fetch_assoc($query);\n\treturn $result['id_user']==$iduser;\n}", "public function isOwner()\n {\n return $this->getUser()->id === $this->getSite()->get('owner');\n }", "function check_if_blog_author($blog_id){\n\tglobal $db;\n\t$blog = get_blog($blog_id);\n\tif ($blog['username_id'] == $_SESSION['id']){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n\n}", "public function isOwner(GWF_User $user)\n\t{\n\t\treturn $user->isUser() ? $user->getID() === $this->getVar('page_author') : false;\n\t}", "public function isOwnedBy($userId){\n\t\t\treturn $this->ownerId == $userId;\n\t\t}", "function UserIsOwner($tag = \"\")\r\n\t{\r\n\t\t// check if user is logged in\r\n\t\tif (!$this->GetUser()) return false;\r\n\r\n\t\t// set default tag\r\n\t\tif (!$tag = trim($tag)) $tag = $this->GetPageTag();\r\n\r\n\t\t// check if user is owner\r\n\t\tif ($this->GetPageOwner($tag) == $this->GetUserName()) return true;\r\n\t}", "function photos_is_owner($photo_id, $user_id) {\n\t$photo_info = photos_get_photo($photo_id, array('user_id'));\n\treturn $photo_info[0] && $photo_info[1]['user_id'] == $user_id;\n}", "public function isOwnedBy($post, $user) {\n\t\treturn $this->field('id', array('id' => $post, 'user_id' => $user)) !== false;\n\t}", "function bp_single_pic_check_owner() {\r\n global $bp, $single_pic_template;\r\n if ($bp->displayed_user->id == $single_pic_template->user_id)\r\n return true;\r\n\r\n return false;\r\n}", "public function isOwnedBy($post, $user) {\n return $this->field('id', array('id' => $post, 'user_id' => $user)) !== false;\n }", "public function isOwner()\n {\n return (int)Auth::user()->id === (int)$this->user_id;\n }", "public function isOwner($targetUserId) {\r\n\t\treturn $this->record['creator'] == $targetUserId;\r\n\t}", "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 }", "public function isOwner($user_id, $template_id);", "function IsOwner() {\n\t\treturn (Permission::check('BLOGMANAGEMENT') || Permission::check('ADMIN'));\n\t}", "function isOwner( $user, $image )\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_Image WHERE ID='$image'\");\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 }", "function current_user_owns_post( $post_id = null ) {\n\t\tif ( null == $post_id ) {\n\t\t\treturn false;\n\t\t}\n\t\tglobal $current_user;\n\t\t$post = get_post( $post_id, 'OBJECT' );\n\t\treturn ( $post->post_author == $current_user->id );\n\t}", "protected function checkOwner()\n\t{\n\t\treturn ($this->object->getOwner() == $this->user->getId());\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return an array of fields that can be filtered via the API.
public static function getFilterableFields(): array;
[ "public static function getFilterableFields(): array\n {\n return ['name', 'accessCode'];\n }", "public function getAvailableFilterFields(): array;", "public function filterFields()\n {\n return property_exists($this, 'filterable') ? $this->filterable : [];\n }", "public function getFieldsSearchable()\n {\n return [];\n }", "public function filterableFields() {\n\t\treturn static::FILTERABLE_FIELDS;\n\t}", "public abstract function getSearchableFields() : array;", "protected function getFilterFields()\n {\n return $this->transform->getField(\n $this->scopeIdentifier\n );\n }", "public function getSearchFields();", "public function getFields();", "public function getListFields();", "public function getFilterByFields()\n {\n return $this->filterByFields;\n }", "public function querableFields() {\n return array(\n 'given' => 'Name.given',\n 'family' => 'Name.family',\n 'mail' => 'EmailAddress.mail'\n );\n }", "public function apiFields()\n\t{\n\t\tif (!property_exists($this, 'apiFields') || empty($this->apiFields))\n\t\t{\n\t\t\treturn $this->toArray();\n\t\t}\n\n\t\treturn $this->onlyFields($this->apiFields);\n\t}", "public function getFilterFieldDescriptions();", "abstract public function filterFields();", "public function getQueryFields();", "public function getSearchFields()\n {\n //return $this->searchFields;\n return ['_all'];\n }", "public function apiFields()\n\t{\n\t\treturn $this->map(function($item)\n\t\t{\n\t\t\treturn $item->apiFields();\n\t\t});\n\t}", "public function getFieldsSearchable()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a checkable item to the end of the menu.
function AppendCheckItem($id, $item, $help=wxEmptyString){}
[ "public function append(MenuItemInterface $item);", "function MenuItem_Adding(&$Item) {\n\n\t//var_dump($Item);\n\t// Return FALSE if menu item not allowed\n\n\treturn TRUE;\n}", "public function add($key, MenuBasicInterface $item);", "public function appendMenuItems()\n {\n }", "public function createChecklistItem();", "public function add(BreadcrumbItemInterface $item);", "private function addMenuItem()\n\t\t{\n\t\t\t$this->saveMenu();\n\t\t\t$id = (int)$_REQUEST['id'];\n\t\t\t$value = DB::selectValue(\"menu\", \"value\", \"WHERE id=$id\");\n\t\t\t$value .= \"\\n\";\n\t\t\tDB::update(\"menu\", array(\n\t\t\t\t\"value\"=>$value\n\t\t\t\t), \"WHERE id=$id\");\n\t\t}", "public function addLast($item): void;", "function insert_menu_item () {\n\t\t$file_name = 'app/views/app_header.php';\n\t\t$content = '\t\t\t\t\tif (AppUser::has_permission(\\''.$this->name['class'].'_read\\')) {'.PHP_EOL;\n\t\t$content .= '\t\t\t\t\t\techo \\'<li\\'.(($this->page_title == \\''.$this->name['plural'].'\\') ? \\' class=\"active\"\\' : \\'\\').\\'>'.\n\t\t\t\t\t'<a href=\"\\'.$this->url.\\'/'.$this->name['variable'].'\"><i class=\"fa fa-link\"></i> <span>'.$this->name['plural'].'</span></a></li>\\';'.PHP_EOL;\n\t\t$content .= '\t\t\t\t\t}'.PHP_EOL;\n\n\t\t$this->insert_before($file_name, '\t\t\t\t\t// generator header menu hook', $content);\n\t}", "function add_usermenuitem() {\n $menuitems = get_config(\"core\", 'customusermenuitems');\n if (strpos($menuitems, \"accessibilitytool,local_accessibilitytool\") !== false) {\n return;\n }\n\n $linetoadd = \"accessibilitytool,local_accessibilitytool|/local/accessibilitytool/manage.php|../e/accessibility_checker\\n\";\n $menuitems = $linetoadd . $menuitems;\n set_config('customusermenuitems', $menuitems);\n}", "function admin_bar_menu() {\n\t\t\tglobal $wp_admin_bar;\n\t\t\tif ( $user_id = get_current_user_id() ) {\n\t\t\t\t$membership = pmpro_getMembershipLevelForUser( $user_id );\n\t\t\t\tif ( $membership && $membership->id === static::$membership_level_id ) {\n\t\t\t\t\t$menu_item = array(\n\t\t\t\t\t\t'parent' => 'user-actions',\n\t\t\t\t\t\t'id' => 'makerspace-checkinout',\n\t\t\t\t\t\t'title' => 'Checkin',\n\t\t\t\t\t\t'href' => '#checkin',\n\t\t\t\t\t);\n\t\t\t\t\tif ( static::is_member_in( $user_id ) ) {\n\t\t\t\t\t\t$menu_item['title'] = 'Checkout';\n\t\t\t\t\t\t$menu_item['href'] = '#checkout';\n\t\t\t\t\t}\n\t\t\t\t\t$wp_admin_bar->add_node( $menu_item );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function addItem(Item $item);", "public function appendItem(Item $item)\n {\n $this->items[] = $item;\n }", "abstract public function addMenu();", "function create_menu_item() {\n\t\treturn false;\n\t}", "public function addLast(mixed $item): void;", "public function addCheck(CheckInterface $checker): void\n {\n $this->checks[] = $checker;\n }", "function add_new_item_in_admin_bar() {\n\tif (current_user_can('level_10')) return;\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->add_menu(array(\n\t\t'id' \t=> 'admin_bar_logout',\n\t\t'title' => __('Log out',''),\n\t\t'href' \t=> wp_logout_url()\n\t\t)\n\t);\n}", "public function add( $item );" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse an object literal or binding pattern.
public function fnParseObj($bIsPattern, $oRefDestructuringErrors) { $oNode = $this->fnStartNode(); $bFirst = true; $aPropHash = []; $oNode->aProperties = []; $this->fnNext(); while (!$this->fnEat(TokenTypes::$aTypes['braceR'])) { if (!$bFirst) { $this->fnExpect(TokenTypes::$aTypes['comma']); if ($this->fnAfterTrailingComma(TokenTypes::$aTypes['braceR'])) break; } else $bFirst = false; $oProp = $this->fnParseProperty($bIsPattern, $oRefDestructuringErrors); if (!$bIsPattern) $this->fnCheckPropClash($oProp, $aPropHash, $oRefDestructuringErrors); array_push($oNode->aProperties, $oProp); } return $this->fnFinishNode($oNode, $bIsPattern ? "ObjectPattern" : "ObjectExpression"); }
[ "public function parse($object);", "private function _parse_pattern($pattern)\n {\n $parameters = [];\n $this->_parameters = [];\n preg_match_all('/(\\{[\\d\\w]+\\})/', $pattern, $parameters);\n unset($parameters[1]);\n $this->_pattern = '/^' . str_replace('/', chr(92) . '/', $pattern) . '$/';\n if (count($parameters[0]))\n {\n foreach ($parameters[0] as $key => $parameter)\n {\n $extracted_parameter = str_replace('{', '', $parameter);\n $extracted_parameter = str_replace('}', '', $extracted_parameter);\n $this->_parameters[] = $extracted_parameter;\n $this->_pattern = str_replace($parameter, '(?P<' . $extracted_parameter . '>[\\d\\w\\-\\_]+)', $this->_pattern);\n }\n }\n preg_match_all('/(\\([\\d\\w]+\\))/', $pattern, $parameters);\n unset($parameters[1]);\n if (count($parameters[0]))\n {\n foreach ($parameters[0] as $key => $parameter)\n {\n $extracted_parameter = str_replace('(', '', $parameter);\n $extracted_parameter = str_replace(')', '', $extracted_parameter);\n $this->_parameters[] = $extracted_parameter;\n $this->_pattern = str_replace($parameter, '(?P<' . $extracted_parameter . '>[\\d]+)', $this->_pattern);\n }\n }\n }", "private function parse()\n\t\t{\n\t\t\tGLOBAL $_MIND;\n\t\t\t\n\t\t\t$str= $this->definition;\n\t\t\t$one= 1;\n\n\t\t\t// identifying the data type\n\t\t\t$typeStart= strpos($str, ':')+1;\n\t\t\t$typeEnd= strpos($str, '(');\n\t\t\t$typeEnd= $typeEnd? $typeEnd- $typeStart: strLen($str);\n\t\t\t$type= substr($str, $typeStart, $typeEnd);\n\t\t\t$this->setType($type);\n\n\t\t\t// identifying the name\n\t\t\t$this->setName(Mind::$lexer->fixWordChars(substr($str, 0, $typeStart-1)));\n\n\t\t\t// identifying details\n\t\t\tif(preg_match(PROP_DETAILS, $str, $details))\n\t\t\t{\n\t\t\t\t$details= $details[0];\n\n\t\t\t\t// identifying the default value\n\t\t\t\tif(preg_match(PROP_DEFAULT, $details, $default))\n\t\t\t\t{\n\t\t\t\t\t$default= $default[0];\n\t\t\t\t\t$details= str_replace($default, \"\", $str, $one);\n\n\t\t\t\t\t// checking if the default value isn't a value or a function call\n\t\t\t\t\tif($default[1]=='=' || strtolower(substr($default, 1, 5)) == EXEC_STRING)\n\t\t\t\t\t{\n\t\t\t\t\t\t$default= preg_replace(PROP_DEFEXEC, \"\", $default);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->setDefault($default);\n\t\t\t\t}\n\n\t\t\t\t// identifying if it is required\n\t\t\t\tif(self::isRequired($details))\n\t\t\t\t\t$this->setRequired(true);\n\n\t\t\t\t// identifying if it is a forced key\n\t\t\t\tif(self::isKey($details))\n\t\t\t\t\t$this->setAsKey();\n\n\t\t\t\t// identifying its size\n\t\t\t\tif(preg_match(PROP_SIZE, $details, $size))\n\t\t\t\t\t$this->setSize($size[0]);\n\t\t\t\telse{\n\t\t\t\t\tif($this->type == 'varchar' || $this->type == 'char')\n\t\t\t\t\t\t$this->setSize($_MIND->\n\t\t\t\t\t\t\t\t\t\tdefaults['default_character_length']);\n\t\t\t\t}\n\n\t\t\t\t// identifying the options\n\t\t\t\tif(preg_match(PROP_OPTIONS, $details, $options))\n\t\t\t\t{\n\t\t\t\t\t$options= explode('|',\n\t\t\t\t\t\t\t\tpreg_replace(PROP_OPTIONS_CLEAR,\n\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t$options[0])\n\t\t\t\t\t\t\t);\n\t\t\t\t\tforeach($options as &$opt)\n\t\t\t\t\t{\n\t\t\t\t\t\t$opt= explode('=', $opt, 2);\n\t\t\t\t\t}\n\t\t\t\t\t$this->setOptions($options);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// checking if it is unique\n\t\t\t\tif(self::isUnique($details))\n\t\t\t\t{\n\t\t\t\t\t$this->setUnique(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "function parse($raw, Environment $env);", "function walkLiteral($literal);", "public function parse(array $tokenStruct);", "public static function parseLiteral($ast)\n {\n //TODO just a guess at the moment - returning the same as parseValue\n return self::parseValue($ast->value);\n }", "#[@test, @expect(FormatException::class)]\n public function newWithoutBraces() {\n $this->parse('new Object;');\n }", "public function parse($expression);", "public function parse($input);", "public static function parse($statement, $args)\n\t{\n if (empty($args)) return $statement;\n \n\t\tif (is_object($statement)) {\n\t\t $source = $statement;\n\t\t $statement = $statement->getStatement();\n\t\t}\n \n\t\tif (!is_array($args) && isset($args)) $args = array($args);\n\t\t\n\t\t$i = 0;\n\t\t$statement = preg_replace('/`[^`]*+`|\"(?:[^\"\\\\\\\\]++|\\\\\\\\.)*+\"|\\'(?:[^\\'\\\\\\\\]++|\\\\\\\\.)*+\\'|(\\?\\!?)|:(\\!)?(\\w++)/e', !isset($args) ? \"'$1$3' ? NULL : str_replace('\\\\\\\"', '\\\"', '\\$0')\" : \"'\\$3' && array_key_exists('\\$3', \\$args) ? ('\\$2' ? \\$args[':\\$3'] : Q\\DB_MySQL_SQLSplitter::quote(\\$args[':\\$3'])) : ('\\$1' ? ('\\$1' === '?!' ? \\$args[\\$i++] : Q\\DB_MySQL_SQLSplitter::quote(\\$args[\\$i++])) : str_replace('\\\\\\\"', '\\\"', '\\$0'))\", $statement);\n\t\t\n\t\tif (isset($source)) {\n\t\t $class = get_class($source);\n\t\t return new $class($source, $statement);\n\t\t}\n\t\t\n\t\treturn $statement;\n\t}", "public static function parse($statement, $args);", "abstract public function parse($string);", "private function _handleTypePrefixedLiterals()\n {\n $id = $this->_token->Id;\n if ($id != ExpressionTokenId::IDENTIFIER) {\n return;\n }\n\n $quoteFollows = $this->_ch == '\\'';\n if (!$quoteFollows) {\n return;\n }\n\n $tokenText = $this->_token->Text;\n\n if (strcasecmp('datetime', $tokenText) == 0) {\n $id = ExpressionTokenId::DATETIME_LITERAL;\n } else if (strcasecmp('guid', $tokenText) == 0) {\n $id = ExpressionTokenId::GUID_LITERAL;\n } else if (strcasecmp('binary', $tokenText) == 0\n || strcasecmp('X', $tokenText) == 0\n || strcasecmp('x', $tokenText) == 0\n ) {\n $id = ExpressionTokenId::BINARY_LITERAL;\n } else {\n return;\n }\n\n $tokenPos = $this->_token->Position;\n do {\n $this->_nextChar();\n } while ($this->_ch != '\\0' && $this->_ch != '\\'');\n\n if ($this->_ch == '\\0') {\n $this->_parseError(\n Messages::expressionLexerUnterminatedStringLiteral(\n $this->_textPos, $this->_text\n )\n );\n }\n\n $this->_nextChar();\n $this->_token->Id = $id;\n $this->_token->Text\n = substr($this->_text, $tokenPos, $this->_textPos - $tokenPos);\n }", "public function parse($format, $args = '') {\r\n preg_match_all('/[\\w]*:[\\w\\s\\(\\),]*/', $format, $matches);\r\n\r\n foreach ($matches[0] as $match) {\r\n $arr = explode(':', str_replace(array('{', '}'), '', $match));\r\n\r\n // optional substring specification search\r\n // example: People:lastName (0,1)\r\n preg_match('/[\\w]* \\([0-9]*,[0-9]*\\)/', $arr[1], $subMatch);\r\n if ($subMatch != null) {\r\n $res = explode(' ', str_replace(array('(', ')'), '', $arr[1]));\r\n $arr[1] = reset($res);\r\n }\r\n\r\n if ($args != '')\r\n $value = $this->generator->$arr[0]->$arr[1]($args);\r\n else\r\n $value = $this->generator->$arr[0]->$arr[1];\r\n\r\n if ($subMatch != null) {\r\n $res = explode(',', end($res));\r\n $value = substr($value, $res[0], $res[1]);\r\n $match = str_replace('(', '\\(', str_replace(')', '\\)', $match));\r\n }\r\n\r\n $format = preg_replace('/{' . $match . '}/', $value, $format, 1);\r\n }\r\n\r\n return $format;\r\n }", "public function createParser();", "function _pdf_parse_object($data)\n\t{\n\t$retval = [];\n\n\tif(preg_match(\"/^(\\d+)[\\s|\\n]+(\\d+)[\\s|\\n]+obj[\\s|\\n]*(.+)[\\s|\\n]*endobj.*/is\", $data, $matches) == 0)\n\t\tdie(__FUNCTION__ . \": something is seriously wrong.\");\n\n\tlist($null, $retval[\"id\"], $retval[\"version\"], $data) = $matches;\n\n\t# try to overcome this\n\t$data = ltrim($data);\n\n \tif(substr($data, 0, 2) == \"<<\")\n\t\t{\t\t\n\t\t$data = substr($data, 2);\n\t\tlist($retval[\"dictionary\"], $data) = _pdf_parse_dictionary($data);\n\t\t$data = substr($data, 2);\n\n\t\t# try to overcome this\n\t\t$data = ltrim($data);\n\n\t\tif(preg_match(\"/^stream[\\s|\\n]+(.+)[\\s|\\n]+endstream.*/is\", $data, $matches) == 1) # !!! fails on hex streams sometimes\n\t\t\tlist($null, $retval[\"stream\"]) = $matches; # data for value\n\t\t}\n\telseif(preg_match(\"/^stream[\\s|\\n]+(.+)[\\s|\\n]+endstream.*/is\", $data, $matches) == 1) # !!! fails on hex streams sometimes\n\t\tlist($null, $retval[\"stream\"]) = $matches; # data for value\n\telse\n\t\t$retval[\"value\"] = $data;\n\n\t# return object and nothing\n\treturn([$retval, \"\"]);\n\t}", "public function parseFormat($format)\n {\n $this->keys = array();\n\n $regex = '';\n $curr = '';\n $beforeGroup = '';\n $afterGroup = '';\n\n $split = str_split($format);\n $count = count($split);\n for ($i=0; $i<$count; $i++) {\n $c = $split[$i];\n if ($c == '{') {\n $regex .= preg_quote($curr, '/');\n $curr = '';\n if ($i+1 < $count && $split[$i+1] == '{') {\n $beforeGroup = $i != 0 ? $split[$i-1] : '';\n $i++;\n continue;\n }\n } else if ($c == '}' && ($i+1 < $count && $split[$i+1] == '}')) {\n $afterGroup = $i+2 < $count ? $split[$i+2] : '';\n $regex .= $this->parseCapturingGroup(trim($curr), $beforeGroup, $afterGroup);\n $curr = '';\n $i++;\n continue;\n }\n $curr .= $c;\n }\n\n if (empty($this->keys)) {\n throw new \\InvalidArgumentException('$format must have at least one capturing group');\n }\n\n # use /s flag so that wildcard char also matches \"\\n\"\n $this->regex = '/^' . $regex . preg_quote($curr, '/') . '$/s';\n }", "public function parse($value);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get records list model.
public function getRecordsListModel(): array { $recordsModel = []; if (!empty($this->recordsList['records'])) { foreach ($this->recordsList['records'] as $id => $value) { $recordModel = Record::getInstance($this->getModuleName()); if (isset($value['recordLabel'])) { $recordModel->setName($value['recordLabel']); unset($value['recordLabel']); } if (isset($this->recordsList['rawData'][$id])) { $recordModel->setRawData($this->recordsList['rawData'][$id]); } $recordModel->setData($value)->setId($id)->setPrivileges($this->recordsList['permissions'][$id]); $recordsModel[$id] = $recordModel; } } return $recordsModel; }
[ "public function getRecords();", "protected function getRecords()\n {\n return $this->records;\n }", "public function getRecords()\n {\n \treturn $this->records;\n }", "public function getRecords()\n {\n return $this->records;\n }", "public function getAllRecords(){\n return $this->records;\n }", "public function getAllRecords();", "public function getRecord(): Model;", "public function getAllRecords() {\n\t}", "public function get_list_model()\n {\n return $this->list_model;\n }", "public function getAllRecords() {\r\n\t\t$select = $this->makeSelect(1);\r\n\t\treturn $this->fetchAll($select);\r\n\t}", "public function records()\n {\n return $this->morphMany(Record::class, 'context');\n }", "public function getRecords() {\r\n\t\treturn $this->_recordSet;\r\n\t}", "private function getModelRecord ()\n {\n //create dynamo client\n $client = AWS::createClient(\"DynamoDb\");\n\n //query the db against the given elements\n $iterator = $client->getIterator('Query',\n array(\n 'TableName' => $this->dynamo_table,\n 'KeyConditions' => array(\n 'model_hash' => array(\n 'AttributeValueList' => array(\n array('S' => '' . $this->class_hash . ''),\n ),\n 'ComparisonOperator' => 'EQ',\n ),\n 'model_id' => array(\n 'AttributeValueList' => array(\n array('N' => '' . $this->id . ''),\n ),\n 'ComparisonOperator' => 'EQ',\n ),\n ),\n ),\n array(\n 'limit' => 1,\n ));\n\n //return first element which every is returned from the request\n foreach ( $iterator as $item ) {\n return $item;\n }\n\n return [];\n }", "public function records() {\n return $this->hasMany(Record::class, 'student_id');\n }", "public function records()\n {\n return (new RecordClient($this->httpClient))->auth($this->token);\n }", "public function getModels();", "public function records() {\n if( ! property_exists($this->response(), 'records') ) return [];\n\n return $this->response()->records;\n }", "public static function getRecords() {\r\n\t\t$activities\t= self::getAllActivities();\r\n\t\t$reformConfig\t\t= array(\r\n\t\t\t'id'\t=> 'id',\r\n\t\t\t'title'\t=> 'label'\r\n\t\t);\r\n\r\n\t\treturn TodoyuArray::reform($activities, $reformConfig);\r\n\t}", "public function getRecord();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Save stores in warehouse
public function inventoryplus_warehouse_save_after($observer) { $warehouse = $observer->getEvent()->getWarehouse(); Mage::helper('inventorywarehouse/storepickup')->updateStore($warehouse); Mage::helper('inventorywarehouse/storelocator')->updateStore($warehouse); if (Mage::getStoreConfig('inventoryplus/general/select_warehouse') != 4) { return; } //Get action from observer if ($data = Mage::app()->getRequest()->getPost()) { /* didn't open associated store tab */ if (!isset($data['selected_store'])) { return; } $warehouse = $observer->getEvent()->getWarehouse(); $warehouseId = $warehouse->getId(); // Get all stores of warehouse $existingStoresOfWarehouse = Mage::getModel('core/store_group') ->getCollection() ->addFieldToFilter('warehouse_id', array('eq' => $warehouseId)); // Get all unchecked stores $uncheckedStoreIds = array(); foreach ($existingStoresOfWarehouse as $store) { if (!isset($data['selected_store']) || !$data['selected_store']) { array_push($uncheckedStoreIds, $store->getId()); } else { if (!in_array($store->getId(), $data['selected_store'])) { array_push($uncheckedStoreIds, $store->getId()); } } } // Save warehouseId in all checked stores if (isset($data['selected_store']) && $data['selected_store']) { foreach ($data['selected_store'] as $selectedStoreId) { $selectedStore = Mage::getModel('core/store_group')->load($selectedStoreId); $selectedStore->setWarehouseId($warehouseId); try { $selectedStore->save(); } catch (Exception $e) { throw $e; } } } // For all unchecked warehouses, set warehouseId to primary warehouse in system $rootWarehouse = Mage::helper('inventoryplus/warehouse')->getPrimaryWarehouse(); $rootWarehouseId = $rootWarehouse->getId(); foreach ($uncheckedStoreIds as $uncheckedStoreId) { $uncheckedStore = Mage::getModel('core/store_group')->load($uncheckedStoreId); $uncheckedStore->setWarehouseId($rootWarehouseId); try { $uncheckedStore->save(); } catch (Exception $e) { throw $e; } } } }
[ "function save() {\n $statement = $GLOBALS['DB']->exec(\"INSERT INTO stores (store_name)\n VALUES ('{$this->getStoreName()}');\");\n $this->id = $GLOBALS['DB']->lastInsertId();\n }", "public static function save($storeName = '');", "private function processStores()\n {\n /* load default store and update it as Baltic_EN*/\n $this->storeBalticEn = $this->saveStore(\n self::DEF_STORE_ID_DEFAULT, true, 'EN' /* don't change 'default' code for default store */\n );\n /* create RU-store for Baltic group */\n $this->storeBalticRu = $this->saveStore(\n self::DEF_STORE_ID_BALTIC_RU, true, 'RU', 'baltic_ru',\n Cfg::DEF_WEBSITE_ID_BASE, $this->groupBaltic->getId(), 10\n );\n /* create Ru-store for Russian group */\n $this->storeRussianRu = $this->saveStore(\n self::DEF_STORE_ID_RUSSIAN_RU, true, 'RU', 'russian_ru',\n Cfg::DEF_WEBSITE_ID_BASE, $this->groupRussian->getId(), 10\n );\n }", "public function save($storeData);", "public function save()\n {\n $this->dbh->update(Kernel::REGISTRY_COLLECTION, $this->store);\n }", "public function stores() {\n\t\t$this->out(\"\\n----------------- Importing Stores -----------------\");\n\t\t$stores = array(\n\t\t\t1 => array(\n\t\t\t\t'slug' => 'hyvee',\n\t\t\t\t'name' => 'Hy-Vee',\n\t\t\t),\n\t\t\t2 => array(\n\t\t\t\t'slug' => 'aldi',\n\t\t\t\t'name' => 'Aldi',\n\t\t\t),\n\t\t\t3 => array(\n\t\t\t\t'slug' => 'dahls',\n\t\t\t\t'name' => 'Dahl\\'s',\n\t\t\t),\n\t\t\t4 => array(\n\t\t\t\t'slug' => 'trader-joes',\n\t\t\t\t'name' => 'Trader Joe\\'s',\n\t\t\t),\n\t\t\t5 => array(\n\t\t\t\t'slug' => 'costco',\n\t\t\t\t'name' => 'Costco',\n\t\t\t),\n\t\t\t6 => array(\n\t\t\t\t'slug' => 'sams-club',\n\t\t\t\t'name' => 'Sam\\'s Club',\n\t\t\t),\n\t\t\t7 => array(\n\t\t\t\t'slug' => 'target',\n\t\t\t\t'name' => 'Target',\n\t\t\t),\n\t\t\t8 => array(\n\t\t\t\t'slug' => 'walgreens',\n\t\t\t\t'name' => 'Walgreen\\'s',\n\t\t\t),\n\t\t\t9 => array(\n\t\t\t\t'slug' => 'walmart',\n\t\t\t\t'name' => 'WalMart',\n\t\t\t),\n\t\t\t10 => array(\n\t\t\t\t'slug' => 'whole-foods',\n\t\t\t\t'name' => 'Whole Foods',\n\t\t\t),\n\t\t);\n\n\t\t$store = ClassRegistry::init('Store');\n\t\t$store->saveAll($stores);\n\t}", "public function saveSettings()\n {\n $this->getStore()->save($this->data);\n }", "public function store(StoreWarehousesRequest $request)\n {\n if (! Gate::allows('warehouse_create')) {\n return abort(401);\n }\n $warehouse = Warehouse::create($request->all());\n\n\n\n return redirect()->route('admin.warehouses.index');\n }", "public function storeAction()\n {\n try {\n if (Mage::getModel('Antidot/observer')->storesFullExport('UI')) {\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('Antidot')->__('Stores exported')\n );\n } else {\n Mage::getSingleton('adminhtml/session')->addWarning(\n Mage::helper('Antidot')->__('No store to export')\n );\n }\n }\n catch(Exception $ex) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('Antidot')->__('An error occured : %s', $ex->getMessage())\n );\n }\n $this->_redirectReferer();\n }", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "function save() //CREATE\n {\n //do not save to database if already existing\n $existing_store = Store::findByName($this->getName());\n\n if($existing_store == null){\n $statement = $GLOBALS['DB']->query(\"INSERT INTO stores (name)\n VALUES ('{$this->getName()}')\n RETURNING id;\");\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n $this->setId($result['id']);\n }\n }", "private function setProductStore()\n {\n $sql = 'insert into ' . DB_PREFIX . 'product_to_store (product_id,store_id) values';\n foreach ($this->sku_data as $goods) $sql .= '(\\'' . $goods['product_id'] . '\\',\\'0\\'),';\n\n $this->db->query(trim($sql, ','));\n }", "public function persistStoreWebsite(array $storeWebsite);", "public function create_store();", "public function setStore(Store $store);", "function SaveStore($form_data) {\n\t\t$this -> db -> insert('stores', $form_data);\n\n\t\tif ($this -> db -> affected_rows() == '1') {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public function doStore() {\n }", "function addStore($store) {\n if ($store->getIsActive()) {\n $website = $store->getWebsite();\n if (!isset($this->websites[$website->getId()])) {\n $this->websites[$website->getId()] = $website;\n }\n if (!isset($this->stores[$website->getId()][$store->getId()])) {\n //construct lists of stores grouped by websiteid\n $this->stores[$website->getId()][$store->getId()] = $store;\n //construct list of all storeids\n $this->storeIds[] = $store->getId();\n //construct list of rootcategoryIds\n if (!isset($this->rootCategoryIds[$store->getRootCategoryId()])) {\n $this->rootCategoryIds[$store->getRootCategoryId()] = array();\n }\n $this->rootCategoryIds[$store->getRootCategoryId()][] = $store;\n }\n }\n\n }", "private function setWebsiteStoreData(Store $store)\n {\n if (!$store->getStoreId()) {\n $store->persist();\n }\n $website = $store->getDataFieldConfig('group_id')['source']\n ->getStoreGroup()->getDataFieldConfig('website_id')['source']->getWebsite();\n $this->data[] = $website->getName();\n $this->websites[] = $website;\n $this->stores[] = $store;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the Timesheet Data Access Object
public function getTimesheetService() { if (is_null($this->timesheetService)) { $this->timesheetService = new TimesheetService(); } return $this->timesheetService; }
[ "public function getDataObject()\n {\n if (!$this->do instanceof DB_DataObject) {\n if (!empty($this->tableName)) {\n $this->do = DB_DataObject::factory($this->tableName);\n } else {\n $this->do = new DB_DataObject;\n }\n }\n\n return $this->do;\n\n }", "public function getTimesheetPeriodDao() {\n\n\n\t\tif (is_null($this->timesheetPeriodDao)) {\n\t\t\t$this->timesheetPeriodDao = new TimesheetPeriodDao();\n\t\t}\n\n\t\treturn $this->timesheetPeriodDao;\n\t}", "public function getDataAccessor() : DataAccessInterface;", "public function gettimeDataView() {\n\n\t\t\t\t\t$this->db->select('*');\n\t\t\t\t\t$this->db->from('timesheet d');\t\n\t\t\t\t\t$this->db->where('d.timestatus',0);\n\t\t\t\t\t$query = $this->db->get();\n\t\t\t\t\treturn $query->result();\n\n\t\t\t\t}", "public function testTimesheetsTimesheetIDGet()\n {\n }", "public function timesheet()\n {\n return $this->belongsTo(TimeSheet::class);\n }", "public function getDateTimeObject()\n {\n return $this->dt;\n }", "protected function getDataTable() {\n if (!isset($this->_dataTable)) {\n $class = $this->getClass();\n $this->_dataTable = new $class();\n }\n\n return $this->_dataTable;\n }", "final public function GetDataObj()\n\t{\n\t global $g_BizSystem;\n\t if (!$this->m_DataObj) {\n\t if ($this->m_DataObjName)\n $this->m_DataObj = $g_BizSystem->GetObjectFactory()->GetObject($this->m_DataObjName);\n if($this->m_DataObj)\n $this->m_DataObj->m_BizFormName = $this->m_Name;\n\t }\n return $this->m_DataObj;\n\t}", "protected function getDataTable() {\n if (!$this->_dataTable) if (in_array($this->params('table'), $this->getNameManager()->getTableNames())) {\n $DataTable = \"\\\\{$this->getNameManager()->namespace_model}\\\\{$this->getNameManager()->modelName}\";\n $this->_dataTable = new $DataTable();\n }\n return $this->_dataTable;\n }", "public function getDataUtils()\n {\n if (is_null($this->_oDataAccess)) {\n $this->_oDataAccess = $this->getShop()->getDataAccess();\n }\n\n return $this->_oDataAccess;\n }", "public function getDt();", "function getCalendarObject() {\n\t\tif(!$this->calendarObject) {\n\t\t\t$modelObj = &tx_cal_registry::Registry('basic','modelcontroller');\n\t\t\t$this->calendarObject = $modelObj->findCalendar($this->getCalendarUid());\n\t\t}\n\t\t\n\t\treturn $this->calendarObject;\n\t}", "public function dataObject()\n\t{\n\t\treturn (object)$this->_data;\n\t}", "function getInstance(){\n\t\t\t\tif(self::$_instance==null){\n\t\t\t\t\tself::$_instance = new Data();\n\t\t\t\t}\n\t\t\t\treturn self::$_instance;\n\t\t}", "function &getTrialSiteObject() {\n\t\t$trialSiteDao =& DAORegistry::getDAO('TrialSiteDAO');\n $trialSiteObject = $trialSiteDao->getTrialSiteById($this->getSiteId());\n\t\treturn $trialSiteObject;\n\t}", "public static function dataTable()\n {\n return new ScoutDataTable(new static);\n }", "public function testCreateTimesheet()\n {\n }", "public function findById( $id )\n {\n return \\R::findOne( 'timesheet', ' id = ? ', [ $id ] );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Try removing an unexisting version
public function testDeleteUnexistingVersion() { $version = $this->vm->checkpoint("/tests_version_base/versioned"); $history = $this->vm->getVersionHistory("/tests_version_base/versioned"); $history->removeVersion('unexisting'); }
[ "public function remove(string $version);", "public function testNodeRemoveOnVersion()\n {\n $this->expectException(RepositoryException::class);\n\n $version = $this->vm->checkpoint('/tests_version_base/versioned');\n $version->remove();\n }", "public function testVersionCleanupOnDelete() {\r\n $snippet=$this->objFromFixture('Snippet', 'snippet1');\r\n $snippetID=$snippet->ID;\r\n \r\n \r\n //Verify that there are snippet versions for the located snippet\r\n $this->assertGreaterThan(0, SnippetVersion::get()->filter('ParentID', $snippetID)->count(), 'Snippet versions cannot be found');\r\n \r\n \r\n //Delete the snippet\r\n $snippet->delete();\r\n \r\n \r\n //Test to see if the versions have been properly removed\r\n $this->assertEquals(0, SnippetVersion::get()->filter('ParentID', $snippetID)->count(), 'Snippet versions were found');\r\n }", "protected function deleteVersionFile() : bool\n {\n return Storage::delete(static::NEW_VERSION_FILE);\n }", "function version_ensure_exists( $p_project_id, $p_version ) {\n\t\tif ( ! version_exists( $p_project_id, $p_version ) ) {\n\t\t\ttrigger_error( ERROR_VERSION_NOT_FOUND, ERROR );\n\t\t}\n\t}", "function version_ensure_exists( $p_version_id ) {\n\tif( !version_exists( $p_version_id ) ) {\n\t\terror_parameters( $p_version_id );\n\t\ttrigger_error( ERROR_VERSION_NOT_FOUND, ERROR );\n\t}\n}", "function version_ensure_exists( $p_version_id ) {\r\n\t\tif ( !version_exists( $p_version_id ) ) {\r\n\t\t\terror_parameters( $p_version_id );\r\n\t\t\ttrigger_error( ERROR_VERSION_NOT_FOUND, ERROR );\r\n\t\t}\r\n\t}", "function deleteVersion() {\n\t\t$uuid = $this->config->getRequestVar(\"v\");\n\t\tAppVersion::DeleteAppVersion($uuid);\n\t\t$filter = $this->config->getRequestVar(\"filter\");\n\t\t$redirect = $this->config->dashboardURL;\n\t\tif($filter) {\n\t\t\t$redirect .= \"?a=\".$filter;\n\t\t}\n\t\theader(\"Location: \" . $redirect);\n\t}", "function wpb_remove_version() {\n\treturn '';\n}", "public function remove_plugin_version() {\n\n $name = Dba::escape('Plugin_' . $this->_plugin->name);\n\n $sql = \"DELETE FROM `update_info` WHERE `key`='$name'\";\n $db_results = Dba::read($sql);\n\n return true;\n\n }", "public function upgradeExistsTo($version);", "function wpb_remove_version() {\nreturn '';\n}", "protected function clearMigratedVersionsOnUninstall() : bool {}", "function version_ensure_unique( $p_version, $p_project_id = null ) {\r\n\t\tif ( !version_is_unique( $p_version, $p_project_id ) ) {\r\n\t\t\ttrigger_error( ERROR_VERSION_DUPLICATE, ERROR );\r\n\t\t}\r\n\t}", "public function testRemoveThrowsErrorOnFeatureNotFound()\n {\n $this->addTestFeature();\n\n $feature = Feature::fromNameAndStatus('unknown.feature', true);\n\n $this->repository->remove($feature);\n }", "public function removeVersionCallback($args)\n {\n $version = $args['version'];\n $version->setData($args['row']);\n\n try {\n $version->delete();\n } catch (Mage_Core_Exception $e) {\n // If we have situation when revision from\n // orphaned private version published we should\n // change its access level to protected so publisher\n // will have chance to see it and assign to some user\n $version->setAccessLevel(Gri_Cms_Model_Page_Version::ACCESS_LEVEL_PROTECTED);\n $version->save();\n }\n }", "public function testRemovalByString()\n {\n $versions = [\n $this->mockVersion('1.0.0.0', '2000-01-01 00:00:00'),\n $this->mockVersion('1.1.0.0', '2010-01-01 00:00:00'),\n $this->mockVersion('1.1.5.0', '2012-04-15 10:00:00'),\n $this->mockVersion('1.2.0.0', '2015-01-01 10:00:00'),\n ];\n\n $versioned = new VersionedPackage($this->mockVersion('0.1.0.0', '2000-01-01 00:00:00'), $versions);\n\n array_shift($versions);\n\n $this->assertEquals($versioned, $versioned->removeVersion('1.0.0.0'));\n $this->assertEquals($versions, array_values($versioned->getVersions()));\n }", "abstract protected function removeMigrationHistory($version);", "private function unlinkPhp($version)\n {\n $isUnlinked = true;\n info(\"[php@$version] Unlinking\");\n output($this->cli->runAsUser('brew unlink ' . self::PHP_FORMULA_PREFIX.self::SUPPORTED_PHP_FORMULAE[$version], function () use (&$isUnlinked) {\n $isUnlinked = false;\n }));\n if ($isUnlinked === false) {\n warning(\n \"Could not unlink PHP version!\" . PHP_EOL .\n \"There appears to be an issue with your PHP $version installation!\" . PHP_EOL .\n \"See the output above for more information.\"\n );\n }\n\n return $isUnlinked;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end function buildRequest_ShipFrom() Builds the shipment elements
protected function buildRequest_Shipment(&$shipment) { /** build the shipment node **/ $service = $shipment->appendChild(new DOMElement('Service')); $service->appendChild(new DOMElement('Code', $this->shipment['service'])); // iterate over the pacakges to create the package element foreach ($this->shipment['packages'] as $package) { $this->buildRequest_Package($shipment, $package); } // end for each package $this->buildRequest_ServiceOptions($shipment); return $shipment; }
[ "Function Shipment( \t$shipTo_City = FALSE,\r\n\t\t\t\t\t\t$shipTo_Postcode = FALSE,\r\n\t\t\t\t\t\t$shipTo_Countrycode = FALSE,\r\n\t\t\t\t\t\t$package_weight = FALSE,\r\n\t\t\t\t\t\t$bl_residential = FALSE,\r\n\t\t\t\t\t\t$bl_ShipperNumber = FALSE,\r\n\t\t\t\t\t\t$PickupType = FALSE,\r\n\t\t\t\t\t\t$shipFrom_Postcode = FALSE,\r\n\t\t\t\t\t\t$shipFrom_City = FALSE,\r\n\t\t\t\t\t\t$shipFrom_Countrycode = FALSE,\r\n\t\t\t\t\t\t$service_code = FALSE,\r\n\t\t\t\t\t\t$PackagingType_Code = FALSE,\r\n\t\t\t\t\t\t$UnitOfMeasurement_Code = FALSE,\r\n\t\t\t\t\t\t$Dimensions_Length = FALSE,\r\n\t\t\t\t\t\t$Dimensions_Width = FALSE,\r\n\t\t\t\t\t\t$Dimensions_Height = FALSE,\r\n\t\t\t\t\t\t$PackageWeight_Code = FALSE\r\n\t\t\t\t\t) {\r\n\r\n\t\tif ($package_weight > 30) {\r\n\t\t\t$this->int_package_number = $package_weight / 10;\r\n\t\t\t$package_weight = $package_weight / $this->int_package_number;\r\n\t\t} else {\r\n\t\t\t$this->int_package_number = 1;\r\n\t\t\tif ($package_weight < UPS_MINIMUM_WEIGHT) {\r\n\t\t\t\t$package_weight = UPS_MINIMUM_WEIGHT;\r\n\t\t\t}\r\n\t\t}\t\r\n\t\tif ($bl_ShipperNumber) {\r\n\t\t$this->ups[\"Shipment\"][\"Shipper\"][\"ShipperNumber\"] = $GLOBALS[\"ary_config\"][\"UpsShipperNumber\"];\r\n\t\t} else {\r\n\t\t$this->ups[\"Shipment\"][\"Shipper\"][\"ShipperNumber\"] = $bl_ShipperNumber;\r\n\t\t}\r\n\t\t\t\t\t\r\n\t\t$this->ups[\"PickupType\"][\"Code\"] = $PickupType;\r\n\t\t$this->ups[\"Shipment\"][\"ShipTo\"][\"Address\"][\"City\"] = $shipTo_City;\r\n\t\t$this->ups[\"Shipment\"][\"ShipTo\"][\"Address\"][\"PostalCode\"] = $shipTo_Postcode;\r\n\t\t$this->ups[\"Shipment\"][\"ShipTo\"][\"Address\"][\"CountryCode\"] = $shipTo_Countrycode;\r\n\t\t$this->ups[\"Shipment\"][\"ShipTo\"][\"Address\"][\"ResidentialAddressIndicator\"] = $bl_residential;\r\n\t\t$this->ups[\"Shipment\"][\"ShipFrom\"][\"Address\"][\"City\"] = $shipFrom_City;\r\n\t\t$this->ups[\"Shipment\"][\"ShipFrom\"][\"Address\"][\"PostalCode\"] = $shipFrom_Postcode;\r\n\t\t$this->ups[\"Shipment\"][\"ShipFrom\"][\"Address\"][\"CountryCode\"] = $shipFrom_Countrycode;\r\n\r\n\t\tif($service_code) {\r\n\t\t\t$this->ups[\"Shipment\"][\"Service\"][\"Code\"] = $service_code;\r\n\t\t}\r\n\t\tif($PackagingType_Code) {\r\n\t\t\t$this->ups[\"Shipment\"][\"Package\"][\"PackagingType\"][\"Code\"] = $PackagingType_Code;\r\n\t\t}\r\n\r\n\t\t$this->ups[\"Shipment\"][\"Package\"][\"Dimensions\"][\"UnitOfMeasurement\"][\"Code\"] = $UnitOfMeasurement_Code;\r\n\t\t$this->ups[\"Shipment\"][\"Package\"][\"Dimensions\"][\"Length\"] = $Dimensions_Length;\r\n\t\t$this->ups[\"Shipment\"][\"Package\"][\"Dimensions\"][\"Width\"] = $Dimensions_Width;\r\n\t\t$this->ups[\"Shipment\"][\"Package\"][\"Dimensions\"][\"Height\"] = $Dimensions_Height;\r\n\t\t$this->ups[\"Shipment\"][\"Package\"][\"PackageWeight\"][\"UnitOfMeasurement\"][\"Code\"] = $PackageWeight_Code;\r\n\t\t$this->ups[\"Shipment\"][\"Package\"][\"PackageWeight\"][\"Weight\"] = $package_weight;\r\n\t\t\r\n\t\t$this->Xmlparser();\r\n\t}", "protected function buildRequest_Shipper(&$dom_element) {\n\t\t/** build the destination element and its children **/\n\t\t$shipper = $dom_element->appendChild(new DOMElement('Shipper'));\n\t\t$shipper->appendChild(new DOMElement('Name',\n\t\t\t$this->shipper['name']));\n\t\t$shipper->appendChild(new DOMElement('PhoneNumber',\n\t\t\t$this->shipper['phone']));\n\t\t\n\t\t// check to see if we have a shipper number\n\t\tif (isset($this->shipper['number']) &&\n\t\t\t!empty($this->shipper['number'])) {\n\t\t\t$shipper->appendChild(new DOMElement('ShipperNumber',\n\t\t\t\t$this->shipper['number']));\n\t\t} // end if we have a shipper number\n\t\t\n\t\t$address = $shipper->appendChild(new DOMElement('Address'));\n\t\t\n\t\t\n\t\t/** build the address elements children **/\n\t\t$address->appendChild(new DOMElement('AddressLine1',\n\t\t\t$this->shipper['street']));\n\t\t\n\t\t// check to see if there is a second steet line\n\t\tif (isset($this->shipper['street2']) &&\n\t\t\t!empty($this->shipper['street2'])) {\n\t\t\t$address->appendChild(new DOMElement('AddressLine2',\n\t\t\t\t$this->shipper['street2']));\n\t\t} // end if there is a second street line\n\t\t\n\t\t// check to see if there is a third steet line\n\t\tif (isset($this->shipper['street3']) &&\n\t\t\t!empty($this->shipper['street3'])) {\n\t\t\t$address->appendChild(new DOMElement('AddressLine3',\n\t\t\t\t$this->shipper['street3']));\n\t\t} // end if there is a second third line\n\t\t\n\t\t// build the rest of the address\n\t\t$address->appendChild(new DOMElement('City',\n\t\t\t$this->shipper['city']));\n\t\t$address->appendChild(new DOMElement('StateProvinceCode',\n\t\t\t$this->shipper['state']));\n\t\t$address->appendChild(new DOMElement('PostalCode',\n\t\t\t$this->shipper['zip']));\n\t\t$address->appendChild(new DOMElement('CountryCode',\n\t\t\t$this->shipper['country']));\n\t\t\n\t\treturn $shipper;\n\t}", "function _buildRequest($data){\n global $wpdb;\n $config = get_option(\"wpsc_fedex_settings\");\n\n $timestamp = date('c');\n\n $region_data = $wpdb->get_results(\"SELECT `\".WPSC_TABLE_REGION_TAX.\"`.* FROM `\".WPSC_TABLE_REGION_TAX.\"`\n WHERE `\".WPSC_TABLE_REGION_TAX.\"`.`id` = '\".get_option('base_region').\"' \",ARRAY_A);\n\n $state = (is_array($region_data)) ? $region_data[0]['code'] : \"\";\n\n $request['WebAuthenticationDetail'] = array('UserCredential' =>\n array('Key' => base64_decode($config['key']), 'Password' => base64_decode($config['password'])));\n $request['ClientDetail'] = array('AccountNumber' => base64_decode($config['account']), 'MeterNumber' => base64_decode($config['meter']));\n $request['TransactionDetail'] = array('CustomerTransactionId' => 'wpsc-fedex-'.session_id());\n $request['Version'] = array('ServiceId' => 'crs', 'Major' => '7', 'Intermediate' => '0', 'Minor' => '0');\n $request['ReturnTransitAndCommit'] = true;\n $request['RequestedShipment']['DropoffType'] = $config['DropoffType'];\n $request['RequestedShipment']['ShipTimestamp'] = date('c');\n // Service Type and Packaging Type are not passed in the request\n $request['RequestedShipment']['Shipper'] = array('Address' => array(\n 'StateOrProvinceCode' => $state,\n 'PostalCode' => get_option('base_zipcode'),\n 'CountryCode' =>get_option('base_country')\n ));\n $request['RequestedShipment']['Recipient'] = array('Address' => array (\n 'StateOrProvinceCode' => $data[\"dest_state\"],\n 'PostalCode' => $data['dest_zipcode'],\n 'CountryCode' => $data['dest_country'],\n 'Residential' => $config['residential']\n )\n );\n $request['RequestedShipment']['ShippingChargesPayment'] = array(\n 'PaymentType' => 'SENDER',\n 'Payor' => array(\n 'AccountNumber' => base64_decode($config['account']),\n 'CountryCode' => get_option('base_country')));\n $request['RequestedShipment']['RateRequestTypes'] = $config['rate_type'];\n //$request['RequestedShipment']['RequestedPackageDetailType'] = 'PACKAGE_SUMMARY';\n // Okay so Fedex only allows individul packages to be 150lbs. with that being the case,\n // We do a little math to smartly balance large weights into multiple packages.\n $weight = 0;\n $numBoxes = 1;\n if($data['weight'] != 0){\n $numBoxes = ceil($data['weight']/150);\n $weight = ceil($data['weight']/$numBoxes);\n }else{\n $numBoxes = 1;\n $weight = 0.1;\n }\n if ($data[\"weight\"] < 0.1){\n $data[\"weight\"] = 0.1;\n }\n\n $request['RequestedShipment']['PackageCount'] = $numBoxes;\n //$request['RequestedShipment']['PackageDetail'] = 'INDIVIDUAL_PACKAGES';\n $request['RequestedShipment']['PackageDetail'] = 'PACKAGE_SUMMARY';\n $request['RequestedShipment']['PackagingType'] = $config[\"container\"];\n $request['RequestedShipment']['TotalWeight'] = array(\n \"Units\" => \"LB\",\n \"Value\" => $data['weight']\n );\n\n $request['RequestedShipment']['ShippingChargesPayment'][\"Payment\"] = array(\n \"PaymentType\" => \"SENDER\"\n );\n\n return $request;\n }", "protected function _formShipmentRequest(\\Magento\\Framework\\DataObject $request)\n {\n $itemsShipment = $request->getPackageItems();\n foreach ($itemsShipment as $itemShipment) {\n $item = new \\Magento\\Framework\\DataObject();\n $item->setData($itemShipment);\n $this->_debug($item);\n }\n $send_method = trim($request->getShippingMethod());\n $pickup_method = $this->getConfigData('pickup');\n $service = \"\";\n switch ($pickup_method.' '.$send_method){\n case 'COURIER PARCEL_TERMINAL':\n $service = \"PU\";\n break;\n case 'COURIER COURIER':\n $service = \"QH\";\n break;\n case 'PARCEL_TERMINAL COURIER':\n $service = \"PK\";\n break;\n case 'PARCEL_TERMINAL PARCEL_TERMINAL':\n $service = \"PA\";\n break;\n default:\n $service = \"\";\n break;\n }\n $parcel_terminal = \"\";\n\n if ($send_method == \"PARCEL_TERMINAL\")\n $parcel_terminal = 'offloadPostcode=\"'.$request->getOrderShipment()->getOrder()->getShippingAddress()->getOmnivaltParcelTerminal().'\" ';\n $payment_method = $request->getOrderShipment()->getOrder()->getPayment()->getMethodInstance()->getCode();\n $cod = \"\";\n if ($payment_method == 'msp_cashondelivery') {\n $cod = '<monetary_values>\n <cod_receiver>' . $this->getConfigData('cod_company') . '</cod_receiver>\n <values code=\"item_value\" amount=\"' . round($request->getOrderShipment()->getOrder()->getGrandTotal(), 2) . '\"/>\n </monetary_values>\n <account>' . $this->getConfigData('cod_bank_account') . '</account>\n <reference_number>' . $this->getReferenceNumber($request->getOrderShipment()->getOrder()->getId()) . '</reference_number>';\n }\n $additionalService = '';\n if ($service == \"PA\" || $service == \"PU\")\n $additionalService = '\n <add_service>\n <option code=\"ST\" />\n </add_service>';\n if (($service == \"PA\" || $service == \"PU\") && $cod)\n $additionalService = '\n <add_service>\n <option code=\"ST\" />\n <option code=\"BP\" />\n </add_service>';\n $name = $this->getConfigData('cod_company');\n $phone = $this->getConfigData('company_phone');\n $street = $this->getConfigData('company_address');\n $postcode = $this->getConfigData('company_postcode');\n $city = $this->getConfigData('company_city');\n $country = $this->getConfigData('company_countrycode');\n \n $client_address = 'postcode=\"'.$request->getRecipientAddressPostalCode().'\" deliverypoint=\"'.$request->getRecipientAddressCity().'\" country=\"'.$request->getRecipientAddressCountryCode().'\" street=\"'.$request->getRecipientAddressStreet1().'\" ';\n if ($parcel_terminal)\n $client_address .= $parcel_terminal;\n $xmlRequest = '\n <soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://service.core.epmx.application.eestipost.ee/xsd\">\n <soapenv:Header/>\n <soapenv:Body>\n <xsd:businessToClientMsgRequest>\n <partner>'.$this->getConfigData('account').'</partner>\n <interchange msg_type=\"info11\">\n <header file_id=\"'.\\Date('YmdHms').'\" sender_cd=\"'.$this->getConfigData('account').'\" > \n </header>\n <item_list>\n <!--1 or more repetitions:-->\n <item service=\"'.$service.'\" >\n '.$additionalService.'\n <measures weight=\"'.$request->getPackageWeight().'\" />\n ' . $cod . '\n <receiverAddressee >\n <person_name>'.$request->getRecipientContactPersonName().'</person_name>\n <mobile>'.$request->getRecipientContactPhoneNumber().'</mobile>\n <address '. $client_address . ' ></address>\n </receiverAddressee>\n <!--Optional:-->\n <returnAddressee >\n <person_name>'.$name.'</person_name>\n <phone>'.$phone.'</phone>\n <address postcode=\"'.$postcode .'\" deliverypoint=\"'.$city.'\" country=\"'.$country.'\" street=\"'.$street.'\" ></address>\n </returnAddressee>\n </item>\n </item_list>\n </interchange>\n </xsd:businessToClientMsgRequest>\n </soapenv:Body>\n </soapenv:Envelope>';\n return $xmlRequest;\n }", "function shipTo($params) {\n\t\t$shipTo = $this->ups->sandwich($this->ups->templatePath.'Rates/RatingServiceSelection_ShipTo.xml', array('{SHIPTO_COMPANY_NAME}',\n\t\t\t'{SHIPTO_ATTN_NAME}',\n\t\t\t'{SHIPTO_PHONE}',\n\t\t\t'{SHIPTO_ADDRESS_1}',\n\t\t\t'{SHIPTO_ADDRESS_2}',\n\t\t\t'{SHIPTO_ADDRESS_3}',\n\t\t\t'{SHIPTO_CITY}',\n\t\t\t'{SHIPTO_STATE}',\n\t\t\t'{SHIPTO_POSTAL_CODE}',\n\t\t\t'{SHIPTO_COUNTRY_CODE}'), array($params['companyName'],$params['attentionName'],\n\t\t\t\t\t\t\t\t\t\t$params['phone'],$params['address1'],$params['address2'],\n\t\t\t\t\t\t\t\t\t\t$params['address3'],$params['city'],$params['state'],\n\t\t\t\t\t\t\t\t\t\t$params['postalCode'],$params['countryCode']));\n\t\t$this->shipToXML = $shipTo;\n\t\treturn $shipTo;\n\t}", "public function setShipTo($ship_to)\n {\n $el = $this->simple_xml_element->Request->OrderRequest->OrderRequestHeader;\n $ShipTo = $el->addChild('ShipTo');\n $Address = $ShipTo->addChild('Address');\n if (isset($ship_to->addressID)) {\n $Address['addressID'] = $ship_to->addressID;\n }\n if (isset($ship_to->Name)) {\n $Name = $Address->addChild('Name', $ship_to->Name);\n $Name['xml:lang'] = 'en';\n }\n $PostalAddress = $Address->addChild('PostalAddress');\n if (isset($ship_to->name)) {\n $PostalAddress['name'] = $ship_to->name;\n }\n $PostalAddress->addChild('DeliverTo', $ship_to->DeliverTo);\n $PostalAddress->addChild('Street', $ship_to->Street);\n $PostalAddress->addChild('City', $ship_to->City);\n $PostalAddress->addChild('State', $ship_to->State);\n $PostalAddress->addChild('PostalCode', $ship_to->PostalCode);\n $country = $PostalAddress->addChild('Country', $ship_to->Country);\n $country['isoCountryCode'] = $ship_to->isoCountryCode;\n }", "function shipTo($params) {\n\t\t$shipTo = $this->connector->sandwich('Rates/RatingServiceSelection_ShipTo.xml', array('{SHIPTO_COMPANY_NAME}',\n\t\t\t'{SHIPTO_ATTN_NAME}',\n\t\t\t'{SHIPTO_PHONE}',\n\t\t\t'{SHIPTO_ADDRESS_1}',\n\t\t\t'{SHIPTO_ADDRESS_2}',\n\t\t\t'{SHIPTO_ADDRESS_3}',\n\t\t\t'{SHIPTO_CITY}',\n\t\t\t'{SHIPTO_STATE}',\n\t\t\t'{SHIPTO_POSTAL_CODE}',\n\t\t\t'{SHIPTO_COUNTRY_CODE}'), array($params['companyName'],$params['attentionName'],\n\t\t\t\t\t\t\t\t\t\t$params['phone'],$params['address1'],$params['address2'],\n\t\t\t\t\t\t\t\t\t\t$params['address3'],$params['city'],$params['state'],\n\t\t\t\t\t\t\t\t\t\t$params['postalCode'],$params['countryCode']));\n\t\t$this->shipToXML = $shipTo;\n\t\treturn $shipTo;\n\t}", "function ship_order ()\n {\n $this->load->helper('fedex');\n $this->orderid = $this->uri->segment(3);\n $this->userid = $this->uri->segment(4);\n $this->gen_contents['shipdetails'] = $this->admin_user_model->select_single_order_details($this->orderid);\n\n $shipdetails = $this->admin_user_model->select_single_order_details($this->orderid);\n\n\n /*$aryOrder = array(\n 'TotalPackages' => 1,\n 'PackageType' => 'YOUR_PACKAGING', //FEDEX_10KG_BOX, FEDEX_25KG_BOX, FEDEX_BOX, FEDEX_ENVELOPE, FEDEX_PAK, FEDEX_TUBE, YOUR_PACKAGING\n 'ServiceType' => 'FEDEX_GROUND',\n 'TermsOfSaleType' => \"DDU\", # DDU/DDP\n 'DropoffType' => 'REGULAR_PICKUP' // BUSINESS_SERVICE_CENTER, DROP_BOX, REGULAR_PICKUP, REQUEST_COURIER, STATION\n );*/\n\n $aryOrder = get_fedex_order_array($this->admin_user_model->get_course_ordered_book_count($this->orderid));\n $aryRecipient = array(\n 'Contact' => array(\n 'PersonName' => $shipdetails['firstname'] . \" \" . $shipdetails['lastname'],\n //'CompanyName' => 'Company Name',\n 'PhoneNumber' => $shipdetails['phone']\n ),\n 'Address' => array(\n 'StreetLines' => $shipdetails['s_address'].\", \".$shipdetails['unit_number'],\n 'City' => $shipdetails['s_city'],\n 'StateOrProvinceCode' => $shipdetails['s_state'],\n 'PostalCode' => $shipdetails['s_zipcode'],\n 'CountryCode' => $shipdetails['s_country'],\n 'Residential' => false)\n );\n\n $courseDetails = $this->admin_user_model->get_course_details($this->orderid);\n $course_weight = $courseDetails['course_weight'];\n $course_amount = $courseDetails['course_amount'];\n $arrCourseDetails = $courseDetails['arrCourseDetails'];\n\n $package_weight = $courseDetails['course_weight'];\n $est_amount = $courseDetails['course_amount'];\n $arrCourseDetails = $courseDetails['arrCourseDetails'];\n\n $order_id = $this->orderid;\n\n $packetDescription = \"FEDEX Package for order \" . $order_id;\n $packageDetails = array(\n 0 => array(\n 'weight' => $package_weight,\n 'ItemDescription' => $packetDescription\n )\n );\n $packageDetails[0] = array_merge($packageDetails[0], get_fedex_packaging_dimension($aryOrder['PackageType']));\n //echo '<pre>';print_r($packageDetails);exit;\n $cnt = 0;\n foreach ($arrCourseDetails as $courseDetails)\n {\n $aryPackageItems[$cnt]['item_qty'] = 1;\n $aryPackageItems[$cnt]['item_price'] = $courseDetails['amount'];\n $aryPackageItems[$cnt]['item_name'] = $courseDetails['course_name'];\n $aryPackageItems[$cnt]['item_weight'] = $courseDetails['wieght'];\n\n $cnt++;\n }\n\n $realPackages = array(\n 0 => array(\n 'packageDetails' => $packageDetails,\n 'aryPackageItems' => $aryPackageItems,\n 'package_amount' => $est_amount\n )\n );\n\n\n $ship = setShipment($aryOrder, $aryRecipient, $realPackages, $course_amount, $course_weight);\n\n //$this->gen_contents['admindetails'] = $this->admin_user_model->get_admin_details();\n //$course_weight=$this->admin_user_model->get_courseweight($this->orderid);\n //$ship = $this->admin_user_model->shiporder($this->gen_contents['shipdetails'],$course_weight,$this->gen_contents['admindetails']);\n\n if ($ship != 'error')\n {\n $this->admin_user_model->update_orderdetails($this->orderid, $ship['trackingno'], $ship['label']);\n $this->gen_contents[\"userdetails\"] = $this->admin_user_model->select_single_userdetails($this->userid);\n $this->gen_contents['orderdetails'] = $this->admin_user_model->select_single_order_details($this->orderid);\n //$this->admin_user_model->mail_touser($this->gen_contents[\"userdetails\"], $this->gen_contents['orderdetails']);\n $this->_mail_touser($this->gen_contents[\"userdetails\"], $this->gen_contents['orderdetails']);\n $this->session->set_flashdata('success', 'Order shipped successfully');\n redirect('admin_user/view_order_details/' . $this->gen_contents['shipdetails']['id']);\n }\n else\n {\n\n $this->session->set_flashdata('error', 'Request Failed');\n redirect('admin_user/view_order_details/' . $this->gen_contents['shipdetails']['id']);\n }\n }", "function buildConfirmXML() {\r\n global $db, $messageStack;\r\n\t$methods = $this->loadShippingMethods();\r\n\t$this->strXML = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>' . chr(10);\r\n\t$this->strXML .= '<Request>' . chr(10);\r\n\t$this->strXML .= xmlEntry('Version', '2.00');\r\n\t$this->strXML .= xmlEntry('UserName', OPENCART_USERNAME);\r\n\t$this->strXML .= xmlEntry('UserPassword', OPENCART_PASSWORD);\r\n\t$this->strXML .= xmlEntry('Language', $_SESSION['language']);\r\n\t$this->strXML .= xmlEntry('Operation', 'ShipConfirm');\r\n\t$this->strXML .= xmlEntry('Action', 'OrderConfirm');\r\n\t$this->strXML .= xmlEntry('Reference', 'Order Ship Confirmation');\r\n\t// fetch every shipment for the given post_date\r\n\t$result = $db->Execute(\"select ref_id, carrier, method, tracking_id from \".TABLE_SHIPPING_LOG.\" \r\n\t where ship_date like '\".$this->post_date.\" %'\");\r\n\tif ($result->RecordCount() == 0) {\r\n\t $messageStack->add(OPENCART_ERROR_CONFRIM_NO_DATA, 'caution');\r\n\t return false;\r\n\t}\r\n\t// foreach shipment, fetch the PO Number (it is the OpenCart order number)\r\n\twhile (!$result->EOF) {\r\n\t if (strpos($result->fields['ref_id'], '-') !== false) {\r\n\t $purchase_invoice_id = substr($result->fields['ref_id'], 0, strpos($result->fields['ref_id'], '-'));\r\n\t } else {\r\n\t $purchase_invoice_id = $result->fields['ref_id'];\r\n\t }\r\n\t $details = $db->Execute(\"select so_po_ref_id from \".TABLE_JOURNAL_MAIN.\" \r\n\t where journal_id = 12 and purchase_invoice_id = '$purchase_invoice_id' order by id desc limit 1\");\r\n\t\t// check to see if the order is complete\r\n\t\tif ($details->fields['so_po_ref_id']) {\r\n\t\t $details = $db->Execute(\"select closed, purchase_invoice_id from \".TABLE_JOURNAL_MAIN.\" \r\n\t where id = '\".$details->fields['so_po_ref_id'].\"'\");\r\n\t\t if ($details->RecordCount() == 1) {\r\n\t\t $message = sprintf(OPENCART_CONFIRM_MESSAGE, $this->post_date, $methods[$result->fields['carrier']]['title'], $methods[$result->fields['carrier']][$result->fields['method']], $result->fields['tracking_id']);\r\n\t\t $this->strXML .= '<Order>' . chr(10);\r\n\t\t\t$this->strXML .= xmlEntry('ID', $details->fields['purchase_invoice_id']);\r\n\t\t\t$this->strXML .= xmlEntry('Status', $details->fields['closed'] ? OPENCART_STATUS_CONFIRM_ID : OPENCART_STATUS_PARTIAL_ID);\r\n\t\t\t$this->strXML .= xmlEntry('Message', $message);\r\n\t\t $this->strXML .= '</Order>' . chr(10);\r\n\t\t }\r\n\t\t}\r\n\t\t$result->MoveNext();\r\n\t}\r\n\t$this->strXML .= '</Request>' . chr(10);\r\n\treturn true;\r\n }", "public function build() {\n\n\t\t$this->requestblock = $this->xml->dom->getElementsByTagName('requestblock')->item(0);\n\n\t\t//create the operation nodes\n\t\t$this->request = new DOMElement('request');\n\t\t$this->requestblock->appendChild($this->request);\n\n\t\t//get nodes\n\t\t$operation \t= $this->_getOperationNode();\n\t\t$billing \t= $this->_getBillingNode();\n\n\t\t//set attributes of request node\n\t\t$this->request->setAttribute('type', $this->requestType);\n\n\t\t//add child elements of request\n\t\t$this->request->appendChild($operation);\n\t\t$this->request->appendChild($billing);\n\n\t\t//save\n\t\treturn $this->base;\n\t}", "function submit_pickup_request($order_id){\n if(get_post_meta( $order_id, '_way_bill_number', true ) == '' || get_post_meta( $order_id, '_way_bill_number', true ) == 'N/A'){\n //create an order instance\n $order = wc_get_order($order_id);\n $shipments = [];\n $items = '';\n foreach ($order->get_items() as $item ) {\n $product = wc_get_product($item->get_product_id());\n array_push($shipments, [\n 'ProductId' => $product->get_id(),\n 'ItemName' => $product->get_name(),\n 'ItemUnitCost' => $product->get_price(),\n 'ItemQuantity' => $item->get_quantity()\n ]);\n $items .= $product->get_name().', ';\n } \n try{\n $origin = setOrigin(get_post_meta($order_id, '_shipping_city', true ));\n $client = new \\GuzzleHttp\\Client;\n $response = $client->post(SELF_API,[\n 'http_errors' => false,\n 'headers' => [\n 'Content-Type' => 'application/x-www-form-urlencoded'\n ],\n 'form_params' => [\n 'method' => 'POST',\n 'endpoint' => 'clicknship/Operations/PickupRequest',\n 'header_content_type' => 'application/x-www-form-urlencoded',\n \n 'OrderNo' => $order_id,\n 'Description' => $items.' and Love to be delivered to '.get_post_meta( $order->id, '_shipping_fullname', true ).' at '.get_post_meta( $order->id, '_shipping_address', true ).' from Perfect Trust Cosmetics',\n // 'Weight' => '2.5',\n \n // senders info\n 'SenderName' => $origin['name'],\n 'SenderCity' => $origin['city'],\n 'SenderTownID' => $origin['town_id'],\n 'SenderAddress' => $origin['address'],\n 'SenderPhone' => $origin['phone'],\n 'SenderEmail' => $origin['email'],\n \n // recipient info\n 'RecipientName' => get_post_meta( $order->id, '_shipping_fullname', true ),\n 'RecipientCity' => get_post_meta( $order->id, '_shipping_city', true ),\n 'RecipientTownID' => get_post_meta( $order->id, '_shipping_town', true ),\n 'RecipientAddress' => get_post_meta( $order->id, '_shipping_address', true ),\n 'RecipientPhone' => get_post_meta( $order->id, '_delivery_phone', true ),\n 'RecipientEmail' => get_post_meta( $order->id, '_delivery_email', true ),\n \n // 'PaymentType' => get_post_meta( $order->id, '_payment_type', true ),\n // 'DeliveryType' => get_post_meta( $order->id, '_delivery_type', true ),\n 'PaymentType' => 'prepaid',\n 'DeliveryType' => 'Normal Delivery',\n \n 'ShipmentItems' => $shipments \n ]\n ]);\n \n if($response->getStatusCode() == 200 && $response->getBody() != null){\n $transaction = json_decode($response->getBody());\n $sending_from = $origin['name'].'. '.$origin['city'] == 'MAINLAND' ? 'LAGOS MAINLAND' : $origin['city'];\n update_post_meta( $order_id, '_pickup_request_status', esc_attr($transaction->TransStatus));\n update_post_meta( $order_id, '_pickup_request_status_details', esc_attr($transaction->TransStatusDetails));\n update_post_meta( $order_id, '_way_bill_number', esc_attr($transaction->WaybillNumber));\n update_post_meta( $order_id, '_delivery_fee', esc_attr($transaction->DeliveryFee));\n update_post_meta( $order_id, '_vat_amount', esc_attr($transaction->VatAmount));\n update_post_meta( $order_id, '_total_amount', esc_attr($transaction->TotalAmount));\n }\n // echo $response->getBody();\n }\n catch(Exception $e){\n echo ['exception' => $e->getMessage()];\n } \n }\n\n \n}", "protected function _formUsExpressShipmentRequest(Varien_Object $request)\n {\n $packageParams = $request->getPackageParams();\n\n $packageWeight = $request->getPackageWeight();\n if ($packageParams->getWeightUnits() != Zend_Measure_Weight::OUNCE) {\n $packageWeight = round(Mage::helper('usa')->convertMeasureWeight(\n $request->getPackageWeight(),\n $packageParams->getWeightUnits(),\n Zend_Measure_Weight::OUNCE\n ));\n }\n\n list($fromZip5, $fromZip4) = $this->_parseZip($request->getShipperAddressPostalCode());\n list($toZip5, $toZip4) = $this->_parseZip($request->getRecipientAddressPostalCode(), true);\n\n $rootNode = 'ExpressMailLabelRequest';\n // the wrap node needs for remove xml declaration above\n $xmlWrap = new SimpleXMLElement('<?xml version = \"1.0\" encoding = \"UTF-8\"?><wrap/>');\n $xml = $xmlWrap->addChild($rootNode);\n $xml->addAttribute('USERID', $this->getConfigData('userid'));\n $xml->addAttribute('PASSWORD', $this->getConfigData('password'));\n $xml->addChild('Option');\n $xml->addChild('Revision');\n $xml->addChild('EMCAAccount');\n $xml->addChild('EMCAPassword');\n $xml->addChild('ImageParameters');\n $xml->addChild('FromFirstName', $request->getShipperContactPersonFirstName());\n $xml->addChild('FromLastName', $request->getShipperContactPersonLastName());\n $xml->addChild('FromFirm', $request->getShipperContactCompanyName());\n $xml->addChild('FromAddress1', $request->getShipperAddressStreet2());\n $xml->addChild('FromAddress2', $request->getShipperAddressStreet1());\n $xml->addChild('FromCity', $request->getShipperAddressCity());\n $xml->addChild('FromState', $request->getShipperAddressStateOrProvinceCode());\n $xml->addChild('FromZip5', $fromZip5);\n $xml->addChild('FromZip4', $fromZip4);\n $xml->addChild('FromPhone', $request->getShipperContactPhoneNumber());\n $xml->addChild('ToFirstName', $request->getRecipientContactPersonFirstName());\n $xml->addChild('ToLastName', $request->getRecipientContactPersonLastName());\n $xml->addChild('ToFirm', $request->getRecipientContactCompanyName());\n $xml->addChild('ToAddress1', $request->getRecipientAddressStreet2());\n $xml->addChild('ToAddress2', $request->getRecipientAddressStreet1());\n $xml->addChild('ToCity', $request->getRecipientAddressCity());\n $xml->addChild('ToState', $request->getRecipientAddressStateOrProvinceCode());\n $xml->addChild('ToZip5', $toZip5);\n $xml->addChild('ToZip4', $toZip4);\n $xml->addChild('ToPhone', $request->getRecipientContactPhoneNumber());\n $xml->addChild('WeightInOunces', $packageWeight);\n $xml->addChild('WaiverOfSignature', $packageParams->getDeliveryConfirmation());\n $xml->addChild('POZipCode');\n $xml->addChild('ImageType', 'PDF');\n\n $xml = $xmlWrap->{$rootNode}->asXML();\n return $xml;\n }", "function shipallAction() {\r\n $orderApi = Mage::getModel('sales/order_api');\r\n $shipApi = Mage::getModel('ordermanager/sales_order_shipment_api');\r\n $successes = array();\r\n $errors = array();\r\n\r\n //Get order_ids from POST\r\n $orderIds = $this->getRequest()->getPost('order_ids');\r\n sort($orderIds);\r\n $trackingNumbers = $this->_getTrackingNumbers();\r\n $carrierCodes = $this->_getCarrierCodes();\r\n\r\n $sendEmail = Mage::helper('ordermanager')->getStoreConfig('shipaction/sendemail');\r\n $newOrderStatus = Mage::helper('ordermanager')->getStoreConfig('shipaction/newstatus');\r\n\r\n //loop through orders\r\n if (is_array($orderIds) && !empty($orderIds)) {\r\n foreach ($orderIds as $orderId) {\r\n $order = Mage::getModel('sales/order')->load($orderId);\r\n $orderIncrementId = $order->getIncrementId();\r\n\r\n try {\r\n //temporarily suppress the automatic copy to admin\r\n $copyTo = Mage::getStoreConfig(Mage_Sales_Model_Order_Shipment::XML_PATH_EMAIL_COPY_TO, $order->getStoreId());\r\n $order->getStore()->setConfig(Mage_Sales_Model_Order_Shipment::XML_PATH_EMAIL_COPY_TO, ''); //this is not saved to db\r\n\r\n //let's create the shipment\r\n $shipmentIncrementId = $shipApi->create(\r\n $orderIncrementId, //order increment id\r\n array(), //items Qty, null = all\r\n Mage::helper('ordermanager')->__('Created Shipment'), //comment\r\n false, //email customer\r\n false //include comment in email\r\n );\r\n\r\n $shipmentTrackId = true;\r\n //add tracking info if we have it\r\n if($shipmentIncrementId && isset($carrierCodes[$orderId]) && isset ($trackingNumbers[$orderId]) && !empty($trackingNumbers[$orderId])) {\r\n $shipmentTrackId = $shipApi->addTrack(\r\n $shipmentIncrementId, //shipment increment id\r\n $carrierCodes[$orderId], //carrier code\r\n Mage::helper('ordermanager')->getCarrierTitle($carrierCodes[$orderId]), //title\r\n $trackingNumbers[$orderId] //tracking number\r\n ); \r\n }\r\n //are we updating the status?\r\n if($newOrderStatus) {\r\n $orderApi->addComment (\r\n $orderIncrementId,\r\n $newOrderStatus,\r\n Mage::helper('ordermanager')->__('Created Shipment'),\r\n false\r\n );\r\n\r\n }\r\n \r\n //set back to original\r\n $order->getStore()->setConfig(Mage_Sales_Model_Order_Shipment::XML_PATH_EMAIL_COPY_TO, $copyTo);\r\n //send email\r\n if($sendEmail) {\r\n $shipApi->sendEmail($shipmentIncrementId);\r\n }\r\n\r\n if($shipmentIncrementId && $shipmentTrackId) {\r\n $successes[] = $orderIncrementId;\r\n }else {\r\n $errors[] = $orderIncrementId;\r\n }\r\n }\r\n catch (Mage_Api_Exception $e ) {\r\n $errors[] = $orderIncrementId.\": \".$e->getCustomMessage();\r\n }\r\n catch (Exception $e ) {\r\n $errors[] = $orderIncrementId.\": \".$e->getMessage();\r\n }\r\n unset($order);\r\n }\r\n }\r\n //Add results to session\r\n if(!empty($errors)) {\r\n $this->_getSession()->addError(implode(\"<br/>\",$errors));\r\n }\r\n if(!empty($successes)) {\r\n $this->_getSession()->addSuccess(Mage::helper('ordermanager')->__('Shipped').': '.implode(\",\",$successes));\r\n }\r\n //go back to the order overview page\r\n $this->_redirect('adminhtml/sales_order/');\r\n\r\n }", "public function buildDelivery()\n {\n $address = $this->_shippingAddress;\n\n $this->_delivery = new stdClass();\n\n $this->_delivery->email = $address->getEmail();\n \t// @todo: Street line?\n $this->_delivery->address_line = $address->getStreet(1);\n\n // $this->_delivery->city = $address->getCity();\n $this->_delivery->postal_code = $address->getPostcode();\n $this->_delivery->country_code = strtolower($address->getCountryId());\n $this->_delivery->phone_number = $address->getTelephone();\n\n $this->_delivery->name = $address->getFirstname().' '.$address->getLastname();\n\n if ($address->getCompany()) {\n $this->_delivery->name = $address->getCompany().' / '.$this->_delivery->name;\n }\n\n $this->_delivery->after = $this->_timeWindow->getDeliveryFrom();\n $this->_delivery->before = $this->_timeWindow->getDeliveryTo();\n\n return $this->_delivery;\n }", "public function setCompleteShipTo() {\n\t\t$rawShipTos = ShipTo::$rawShipTos;\n\t\tif (isset($rawShipTos[$this->idShipTo]['nameOfRecipient'])) {\n\t\t\t$this->setNameOfRecipient($rawShipTos[$this->idShipTo]['nameOfRecipient']);\n\t\t}\n\t\tif (isset($rawShipTos[$this->idShipTo]['address'])) {\n\t\t\t$this->setAddress($rawShipTos[$this->idShipTo]['address']);\n\t\t}\n\t\tif (isset($rawShipTos[$this->idShipTo]['city'])) {\n\t\t\t$this->setCity($rawShipTos[$this->idShipTo]['city']);\n\t\t}\n\t\tif (isset($rawShipTos[$this->idShipTo]['country'])) {\n\t\t\t$this->setCountry($rawShipTos[$this->idShipTo]['country']);\n\t\t}\n\t}", "public function construct_request_xmltime() {\r\n\r\n\t\t$ObjShoppingCart = Cart::getFromSession(FALSE);\r\n\r\n\t\t// Get the pickup date.\r\n\t\t$currentdate = $ObjShoppingCart->getEstimatedDate();\r\n\r\n\t\t// Generate the XML using s_country, s_zip, t_country, t_zip, and the result of getEstimatedDate()\r\n\t\t$xml = \"<?xml version=\\\"1.0\\\"?>\r\n\t\t\t\t<AccessRequest xml:lang=\\\"en-US\\\">\r\n\t\t\t\t\t<AccessLicenseNumber>\".$this->encode_xml_string($this->accesskey).\"</AccessLicenseNumber>\r\n\t\t\t\t\t<UserId>\".$this->encode_xml_string($this->userid).\"</UserId>\r\n\t\t\t\t\t<Password>\".$this->encode_xml_string($this->passwd).\"</Password>\r\n\t\t\t\t</AccessRequest>\r\n\t\t\t\t<?xml version=\\\"1.0\\\"?>\r\n\t\t\t\t<TimeInTransitRequest xml:lang=\\\"en-US\\\">\r\n\t\t\t\t\t<Request>\r\n\t\t\t\t\t\t<TransactionReference>\r\n\t\t\t\t\t\t\t<CustomerContext>TNT_D Origin Country Code</CustomerContext>\r\n\t\t\t\t\t\t\t<XpciVersion>1.0002</XpciVersion>\r\n\t\t\t\t\t\t</TransactionReference>\r\n\t\t\t\t\t\t<RequestAction>TimeInTransit</RequestAction>\r\n\t\t\t\t\t</Request>\r\n\t\t\t\t\t<TransitFrom>\r\n\t\t\t\t\t\t<AddressArtifactFormat>\r\n\t\t\t\t\t\t\t<PoliticalDivision2>Garfield</PoliticalDivision2>\r\n\t\t\t\t\t\t\t<PoliticalDivision1>NJ</PoliticalDivision1>\r\n\t\t\t\t\t\t\t<CountryCode>US</CountryCode>\r\n\t\t\t\t\t\t\t<PostcodePrimaryLow>07026</PostcodePrimaryLow>\r\n\t\t\t\t\t\t</AddressArtifactFormat>\r\n\t\t\t\t\t</TransitFrom>\r\n\t\t\t\t\t<TransitTo>\r\n\t\t\t\t\t\t<AddressArtifactFormat>\r\n\t\t\t\t\t\t\t<PoliticalDivision2>\".$this->encode_xml_string($this->city).\"</PoliticalDivision2>\r\n\t\t\t\t\t\t\t<PoliticalDivision1>\".$this->encode_xml_string($this->state).\"</PoliticalDivision1>\r\n\t\t\t\t\t\t\t<CountryCode>\".$this->encode_xml_string($this->t_country).\"</CountryCode>\r\n\t\t\t\t\t\t\t<PostcodePrimaryLow>\".$this->encode_xml_string($this->t_zip).\"</PostcodePrimaryLow>\r\n\t\t\t\t\t\t</AddressArtifactFormat>\r\n\t\t\t\t\t</TransitTo>\r\n\t\t\t\t\t<PickupDate>\".$this->encode_xml_string($currentdate['shipdate_formatted']).\"</PickupDate>\r\n\t\t\t\t\t\t<ShipmentWeight>\r\n\t\t\t\t\t\t\t<UnitOfMeasurement>\r\n\t\t\t\t\t\t\t\t<Code>LBS</Code>\r\n\t\t\t\t\t\t\t</UnitOfMeasurement>\r\n\t\t\t\t\t\t\t<Weight>\".$this->encode_xml_string($this->weight).\"</Weight>\r\n\t\t\t\t\t\t</ShipmentWeight>\r\n\t\t\t\t\t<DocumentsOnlyIndicator />\r\n\t\t\t\t</TimeInTransitRequest>\";\r\n\r\n\t\treturn $xml;\r\n\r\n\t}", "abstract public function buildRequest();", "function add_ship_info_f($entry, $form) {\n global $wpdb, $SHIP_AND_INSPECT_DAYS;\n $current_vid = return_vid();\n $order_ship_carrier = $entry['1'];\n if ($order_ship_carrier == \"Other\") $order_ship_carrier = $entry['2'];\n $ship_date_mysql = date(\"Y-m-d H:i:s\");\n $inspect_due_mysql = no_holidays(date(\"Y-m-d\"), date(\"Y-m-d\",strtotime(\" + \". $SHIP_AND_INSPECT_DAYS . ' weekdays'))); //current time converted to unix format, quote duration added, converted back to mysql format\n $order_tracking = $entry['3'];\n $data = array(\n 'order_phase' => 'Order Shipped',\n 'order_ship_carrier' => $order_ship_carrier,\n 'order_ship_tracking' => $order_tracking,\n 'order_shipped_date' => $ship_date_mysql,\n 'inspect_due_date' => $inspect_due_mysql\n );\n $oid_filter = filter_input( INPUT_GET, \"oid\", FILTER_SANITIZE_STRING );\n $wpdb->update(\n 'orders',\n $data,\n array('oid' => \"$oid_filter\")\n );\n $wpdb->insert('logs', array('user_type' => 'vendor', 'log_type' => 'Order Shipped', 'log_entry' => \"Order $oid_filter Shipped\")); //log the event\n\n $order_row = $wpdb->get_row(\"SELECT * FROM orders WHERE oid = '$oid_filter'\", ARRAY_A);\n $cid = $order_row['cid'];\n $cust_row = $wpdb->get_row(\"SELECT * FROM cust_info WHERE cid = '$cid'\", ARRAY_A); //get all of the customer contact details\n\n $email1 = $cust_row['contact_email'];\n $email2 = $cust_row['alt_email'];\n $email_array = array($email1);\n if ($email2 != NULL) {\n $email_array[] = $email2;\n }\n $headers[] = 'From: Merafab Notify <notify@merafab.com>';\n\n $msg = \"Your order $order_name (Order Number $oid_filter) has been shipped via $order_ship_carrier with tracking number $order_tracking\";\n wp_mail($email_array, \"Order Shipped!\", $msg, $headers);\n}", "public function __construct($_shipUPSRequest = NULL)\n {\n parent::__construct(array('shipUPSRequest'=>$_shipUPSRequest),false);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the last SOAP response header values as an associative array.
public function getLastResponseHeaderValues() { return $this->lastResponseHeaderValues; }
[ "public function getLastHeaders()\n {\n return $this->getRequest()->getHeadersFromLastResponse();\n }", "public function getLastResponseHeaders()\n {\n return $this->responseHeaders;\n }", "public function getResponseHeaders()\n {\n return $this->lastResponseHeaders;\n }", "public function getLastResponse()\r\n\t{\r\n\t\treturn array('headers' => $this->response_headers[count($this->response_headers)-1],\r\n\t\t'content' => $this->response_content);\r\n\t}", "public function getResponseHeaderArray()\n\t{\n\t\treturn (array) $this->header_arr;\n\t}", "public function getLastOutputHeaders()\n {\n return $this->_outputHeaders;\n }", "public function getLastResponseHeaders()\n {\n return $this->last_response_headers;\n }", "public function getLastResponseHeaders()\n {\n return $this->client->getLastResponseHeaders();\n }", "public function getResponseHeaders(): array\n {\n return headers_list();\n }", "public function getResponseHeaders()\r\n {\r\n return $this->fields['ResponseHeaders']['value'];\r\n }", "public function getLastResponseHeaders() {}", "public function getResponseHeaders(){\n \n $filterManager = Amfphp_Core_FilterManager::getInstance();\n $headers = array('Content-Type' => $this->contentType);\n $headers = $filterManager->callFilters(self::FILTER_HEADERS, $headers, $this->contentType);\n $ret = array();\n foreach($headers as $key => $value){\n $ret[] = $key . ': ' . $value;\n }\n return $ret;\n }", "public function GetHeaders()\n {\n return HttpResponse::extractHeaders($this->_rawHttpBatchResponse);\n }", "private function responseHeaders() {\n\t\tif (function_exists('apache_response_headers'))\n\t\t\treturn apache_response_headers();\n\t\t\t\n\t\t$headers = array();\n\t\tforeach(headers_list() as $h) {\n\t\t\tlist($header_name, $value) = preg_split('/:\\s/', $h);\n\t\t\t$headers[$header_name] = $value;\n\t\t}\n\t\t\n\t\treturn $headers;\n\t}", "public function getHeaders () : array\n\t{ return $this->_request->headers->all(); }", "public function getHeaders() {\n return $this->headers->getArray();\n }", "public static function headers() {\n\t\t$ret = array();\n\t\tforeach(self::$headers as $name => $value) {\n\t\t\tif ($value) {\n\t\t\t\t$value = $name . ': ' . $value; \n\t\t\t}\n\t\t\t$ret[strtolower($name)] = $value;\n\t\t}\n\t\treturn $ret;\n\t}", "public function getHeaders(): array\n {\n $data = stream_get_meta_data($this->handle);\n\n return $data['wrapper_data'];\n }", "public function getHeaders(): array;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/! Saves the file to disk. If filename is given the file is saved with that name if not the current name is used. If \a $useOverride is true then the file will be placed in the override directory, if \a $useOverride is "append" it will append ".append" to the filename.
function save( $fileName = false, $suffix = false, $useOverride = false, $onlyModified = false, $useRootDir = true, $resetArrays = false, $encapsulateInPHP = true ) { $lineSeparator = eZSys::lineSeparator(); $pathArray = array(); $dirArray = array(); if ( $fileName === false ) $fileName = $this->FileName; if ( $useRootDir === true ) { $pathArray[] = $this->RootDir; $dirArray[] = $this->RootDir; } else if ( is_string( $useRootDir ) ) { $pathArray[] = $useRootDir; $dirArray[] = $useRootDir; } if ( $useOverride ) { $pathArray[] = 'override'; $dirArray[] = 'override'; } if ( $useOverride === 'append' ) $fileName .= '.append'; if ( $suffix !== false ) $fileName .= $suffix; /* Try to guess which filename would fit better: 'xxx.apend' or 'xxx.append.php'. * We choose 'xxx.append.php' in all cases except when * 'xxx.append' exists already and 'xxx.append.php' does not exist. */ if( strstr( $fileName, '.append' ) ) { $fnAppend = preg_replace( '#\.php$#', '', $fileName ); $fnAppendPhp = $fnAppend.'.php'; $fpAppend = eZDir::path( array_merge( $pathArray, array( $fnAppend ) ) ); $fpAppendPhp = eZDir::path( array_merge( $pathArray, array( $fnAppendPhp ) ) ); $fileName = ( file_exists( $fpAppend ) && !file_exists( $fpAppendPhp ) ) ? $fnAppend : $fnAppendPhp; } $originalFileName = $fileName; $backupFileName = $originalFileName . eZSys::backupFilename(); $fileName .= '.tmp'; $dirPath = eZDir::path( $dirArray ); if ( !file_exists( $dirPath ) ) eZDir::mkdir( $dirPath, octdec( '777' ), true ); $filePath = eZDir::path( array_merge( $pathArray, array( $fileName ) ) ); $originalFilePath = eZDir::path( array_merge( $pathArray, array( $originalFileName ) ) ); $backupFilePath = eZDir::path( array_merge( $pathArray, array( $backupFileName ) ) ); $fp = @fopen( $filePath, "w+"); if ( !$fp ) { trigger_error( "Failed opening file '$filePath' for writing", E_USER_ERROR ); return false; } $writeOK = true; $written = 0; $charset = $this->Codec ? $this->Codec->RequestedOutputCharsetCode : $this->Charset; if ( $encapsulateInPHP ) { $written = fwrite( $fp, "<?php /* #?ini charset=\"$charset\"?$lineSeparator$lineSeparator" ); } else { $written = fwrite( $fp, "#?ini charset=\"$charset\"?$lineSeparator$lineSeparator" ); } if ( $written === false ) $writeOK = false; $i = 0; if ( $writeOK ) { foreach( array_keys( $this->BlockValues ) as $blockName ) { if ( $onlyModified ) { $groupHasModified = false; if ( isset( $this->ModifiedBlockValues[$blockName] ) ) { foreach ( $this->ModifiedBlockValues[$blockName] as $modifiedValue ) { if ( $modifiedValue ) $groupHasModified = true; } } if ( !$groupHasModified ) continue; } $written = 0; if ( $i > 0 ) $written = fwrite( $fp, "$lineSeparator" ); if ( $written === false ) { $writeOK = false; break; } $written = fwrite( $fp, "[$blockName]$lineSeparator" ); if ( $written === false ) { $writeOK = false; break; } foreach( array_keys( $this->BlockValues[$blockName] ) as $blockVariable ) { if ( $onlyModified ) { if ( !isset( $this->ModifiedBlockValues[$blockName][$blockVariable] ) or !$this->ModifiedBlockValues[$blockName][$blockVariable] ) continue; } $varKey = $blockVariable; $varValue = $this->BlockValues[$blockName][$blockVariable]; if ( is_array( $varValue ) ) { if ( count( $varValue ) > 0 ) { $customResetArray = ( isset( $this->BlockValues[$blockName]['ResetArrays'] ) and $this->BlockValues[$blockName]['ResetArrays'] == 'false' ) ? true : false; if ( $resetArrays and !$customResetArray ) $written = fwrite( $fp, "$varKey" . "[]$lineSeparator" ); foreach ( $varValue as $varArrayKey => $varArrayValue ) { if ( is_string( $varArrayKey ) ) $written = fwrite( $fp, "$varKey" . "[$varArrayKey]=$varArrayValue$lineSeparator" ); else { if ( $varArrayValue == NULL ) $written = fwrite( $fp, "$varKey" . "[]$lineSeparator" ); else $written = fwrite( $fp, "$varKey" . "[]=$varArrayValue$lineSeparator" ); } if ( $written === false ) break; } } else $written = fwrite( $fp, "$varKey" . "[]$lineSeparator" ); } else { $written = fwrite( $fp, "$varKey=$varValue$lineSeparator" ); } if ( $written === false ) { $writeOK = false; break; } } if ( !$writeOK ) break; ++$i; } } if ( $writeOK ) { if ( $encapsulateInPHP ) { $written = fwrite( $fp, "*/ ?>" ); if ( $written === false ) $writeOK = false; } } @fclose( $fp ); if ( !$writeOK ) { unlink( $filePath ); return false; } chmod( $filePath, self::$filePermission ); if ( file_exists( $backupFilePath ) ) unlink( $backupFilePath ); if ( file_exists( $originalFilePath ) ) { if ( !rename( $originalFilePath, $backupFilePath ) ) return false; } if ( !rename( $filePath, $originalFilePath ) ) { rename( $backupFilePath, $originalFilePath ); return false; } return true; }
[ "protected function createFile($alias, $override = true)\n {\n $path = \\Yii::getAlias($alias);\n if (file_exists($path) && $override) {\n @unlink($path);\n }\n $dir = dirname($path);\n if (!file_exists($dir)) {\n $this->createFolder($dir);\n }\n touch($path);\n }", "public function save($filename);", "public function saveAs(string $dest, bool $override = true): void\n {\n if (file_exists($dest) && $override) {\n unlink($dest);\n }\n\n if(!empty($this->file_content)) {\n file_put_contents($dest, $this->file_content);\n } else {\n if (!move_uploaded_file($this->getTempName(), $dest)) {\n // Was not successful. Show error\n throw new FileSystemException(\"File upload failed\");\n }\n }\n }", "public function setSavedFilename() {\n\t\t$this->savedFileName = realpath( $this->originalsRoot . $this->filename );\n\t}", "public function writeEnableOverwrite() {\n $this->writeDisable(); //for clear/initialize all hooks\n $this->writeEnable();\n //when local file are different remove it and save from repo\n $this->fnConflict = function($par_arr) {\n unlink($par_arr['fullPathFileName']);//remove local version of file\n return true; //true = write file\n };\n }", "function putFile() {\n\t\t\n\t}", "public function addOverride($filename)\n {\n return TestLib::addOverride($filename);\n }", "public function saveFile()\n {\n $newFileName = $this->generateFilename();\n $this->getOwner()->setAttribute($this->attributeName, $newFileName);\n return $this->uploadManager->save($this->getUploadedFileInstance(), $this->getUploadPath(), $newFileName);\n }", "public function saveAs($filename) {\n file_put_contents($filename, $this->generateIni());\n }", "function SaveFile()\r\n\t\t{\r\n\t\t\t//creates the file with the specified name and backups the old one\r\n\t\t copy($this->request->post[path_to_file], $_SERVER['DOCUMENT_ROOT'].'/app/spanel_backup/'.pathinfo($this->request->post[path_to_file], PATHINFO_BASENAME).'_'.date('Y_m_d_H_i_s').'.bak');\r\n\t\t\t$fp = fopen($this->request->post[path_to_file], 'w+');\r\n\r\n\t\t\t//writes to the file\r\n\t\t\t$content = iconv('UTF-8', 'windows-1251', $this->request->post[content]);\r\n\t\t\tfwrite($fp, $content);\r\n\t\t\t\r\n\t\t\t//closes the file\r\n\t\t\tfclose($fp);\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\texit();\r\n\t\t}", "public function saveFile($filename) {\n\t\tfile_put_contents($filename, $this->getContent());\n\t}", "public function save()\n\t{\n\t\tset_time_limit(0);\n\t\tTwitchHelper::log(TwitchHelper::LOG_INFO, \"Save {$this->basename}\");\n\n\t\tforeach ($this->associatedFiles as $file) {\n\t\t\tif (file_exists($this->directory . DIRECTORY_SEPARATOR . $file)) {\n\t\t\t\tTwitchHelper::log(TwitchHelper::LOG_DEBUG, \"Save {$file}\");\n\t\t\t\trename($this->directory . DIRECTORY_SEPARATOR . $file, TwitchHelper::$public_folder . DIRECTORY_SEPARATOR . \"saved_vods\" . DIRECTORY_SEPARATOR . $file);\n\t\t\t}\n\t\t}\n\t}", "function writefile ($afile, $adata, $abackup = NULL)\n{\n // Move the old file into Backup one\n if ($abackup != NULL)\n {\n if (file_exists ($afile))\n {\n if (file_exists ($abackup))\n if (!unlink ($abackup))\n exit;\n if (!rename ($afile, $abackup))\n exit;\n }\n }\n\n $fp = fopen ($afile, \"w\", 0);\n if (!$fp)\n exit;\n\n fputs ($fp, $adata);\n fclose ($fp);\n}", "public function Save ( $forced = false, $file = null )\r\n\t {\r\n \t\tif ( ! $file && ! $this -> File )\r\n \t\t\tthrow ( new Exception ( \"IniFile::Save() called, but not file has been specified.\" ) ) ;\r\n\r\n\t\tif ( ! $this -> Dirty && ! $forced )\r\n\t\t\treturn ;\r\n\r\n\t\tif ( ! $file )\r\n\t\t\t$file = $this -> File ;\r\n\r\n\t\tfile_put_contents ( $file, $this -> AsString ( ) ) ;\r\n\t\t$this -> Dirty = false ;\r\n\t }", "public function write()\n\t{\n\t\t// notifications for switches\n\t\tif (Utils::config('pretend')) \tUtils::log('{c}[ {y}PRETEND MODE ACTIVE {c}]');\n\t\tif (Utils::config('force')) \tUtils::log('{c}[ {y}FORCING OVERWRITE {c}]');\n\n\t\t// can we, can we?\n\t\tUtils::log('{c}-- Can we build it? --');\n\n\t\t// do all filesystem changes\n\t\t$this->_write_files();\n\t\t$this->_append_files();\n\t\t$this->_copy_dirs();\n\t\t$this->_copy_files();\n\n\t\t// hell yes we can\n\t\tUtils::log('{c}-- Yes we can! --');\n\t}", "public function setOutputFile() {\n $file = $this->getPath().$this->getFilename().SitemapConstants::SEPERATOR;\n if (file_exists($file.SitemapConstants::INDEX_SUFFIX.SitemapConstants::EXT)) {\n $this->setFullpath($file.SitemapConstants::INDEX_SUFFIX.SitemapConstants::EXT);\n } else {\n $this->setFullpath($file.$this->getCurrentSitemap() . SitemapConstants::EXT);\n }\n }", "private function saveFile(): void\n {\n $sourceCode = Helpers::tabsToSpaces((string) $this->entityFile);\n $entityPath = dirname(__DIR__, 7) . '/src/' . $this->entityData['namespace'] . '/';\n\n $handle = fopen($entityPath . $this->entityData['class'] . '.php', 'w');\n fwrite($handle, $sourceCode);\n fclose($handle);\n }", "private function save_file()\n {\n $save_success = false;\n \n if ($this->has_file_to_save())\n {\n $filename = $this->get_filename();\n if (isset($filename))\n {\n /*\n * Delete current file before to create it again if the object is not saved as a new version @TODO: This\n * should not happen when the object is newly created, only for an update\n */\n $as_new_version = $this->get_save_as_new_version();\n if (! $as_new_version && $this->is_identified())\n {\n $current_path = $this->get_path();\n \n if (isset($current_path) && is_file(Path::getInstance()->getRepositoryPath() . $current_path))\n {\n Filesystem::remove(Path::getInstance()->getRepositoryPath() . $current_path);\n }\n }\n \n $filename_hash = md5($filename);\n $relative_folder_path = $this->get_owner_id() . '/' . Text::char_at($filename_hash, 0);\n $full_folder_path = Path::getInstance()->getRepositoryPath() . $relative_folder_path;\n \n Filesystem::create_dir($full_folder_path);\n $unique_hash = Filesystem::create_unique_name($full_folder_path, $filename_hash);\n \n $relative_path = $relative_folder_path . '/' . $unique_hash;\n $path_to_save = $full_folder_path . '/' . $unique_hash;\n \n $save_success = false;\n if (StringUtilities::getInstance()->hasValue($this->temporary_file_path))\n {\n if (Filesystem::move_file($this->temporary_file_path, $path_to_save, ! $as_new_version))\n {\n $save_success = true;\n }\n else\n {\n if (Filesystem::copy_file($this->temporary_file_path, $path_to_save, ! $as_new_version))\n {\n if (Filesystem::remove($this->temporary_file_path))\n {\n $save_success = true;\n }\n }\n }\n }\n elseif (StringUtilities::getInstance()->hasValue($this->in_memory_file) && Filesystem::write_to_file(\n $path_to_save, \n $this->in_memory_file))\n {\n $save_success = true;\n }\n \n if ($save_success)\n {\n Filesystem::chmod(\n $path_to_save, \n Configuration::getInstance()->get_setting(array('Chamilo\\Core\\Admin', 'permissions_new_files')));\n \n $file_bytes = Filesystem::get_disk_space($path_to_save);\n \n $this->set_filesize($file_bytes);\n $this->set_storage_path(Path::getInstance()->getRepositoryPath());\n $this->set_path($relative_path);\n $this->set_hash($unique_hash);\n $this->set_content_hash(md5_file($path_to_save));\n }\n else\n {\n $this->add_error(Translation::get('FileStoreError'));\n }\n }\n else\n {\n $this->add_error(Translation::get('FileFilenameNotSet'));\n }\n }\n \n return $save_success;\n }", "function putFile($filename, $data) {\n putenv(\"CCE_REQUESTUSER=$this->loginName\");\n $fh = $this->popen(\"/usr/sausalito/sbin/writeFile.pl $filename\", \"w\");\n fwrite($fh, $data);\n pclose($fh);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the user destination
public function setDestination(User $user);
[ "public function setDestination($destination) {\n $this->dataHandler->set('login_destination', $destination);\n }", "function setDestination($dest)\n\t{\n\t\t$this->_destination = $dest;\n\t}", "public function setDestination($destination)\n {\n }", "private function setDestination($destination) {\n \tRoute::validatePath($destination);\n\n $this->destination = $destination;\n }", "public function setToUser($toUser) {\n $this->toUser = $toUser;\n }", "public function setDestination($destination)\n {\n $this->destination = $destination;\n }", "function setLoginDestination($url)\n{\n setUserSession('DEST_URL', $url);\n}", "public function setDestination($path)\n {\n $this->_dest = $path;\n }", "function set_destination_url($url, $target=\"_self\") {\n\t\t$this->d_url = $url;\n\t\t$this->d_target = $target;\n\t}", "public function setSource(User $user);", "public function manageDestinationMission() {\n if (!isset($_GET['dest'])){\n header(\"Location: http://\" . $this->currentAddress . \"?dest=\" . $this->baseDirection);\n }\n }", "public function setDestination($value)\n {\n return $this->set('Destination', $value);\n }", "public function setDestination($destination, $reassign = false);", "function user_destination($account) {\n return Messaging_Destination::build_user($this->address_type(), $account);\n }", "public function setRemoteUser($user)\n {\n $this->remoteUser = $user;\n }", "public function setFrom(Model_User $user)\n\t{\n\t\t$this->_fromUser = $user;\n\t}", "public function setDestinationName($value);", "public function setFromUser($fromUser) {\r\n\t$this->fromUser = $fromUser;\r\n }", "function set_user($user)\r\n {\r\n $this->set_default_property(self :: PROPERTY_USER, $user);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get email stats count grouped by date. In most cases it's better to use `get_email_stats_count_by( 'date' )` instead. Doesn't cache the result.
public function get_email_stats_count_by_date_sql( $date_start = null, $date_end = null ) { if ( ! current_user_can( 'manage_options' ) || ! wp_mail_smtp()->pro->get_logs()->is_enabled() ) { return []; } global $wpdb; $table_name = Logs::get_table_name(); $format = 'Y-m-d H:i:s'; $placeholders = []; $sql = "SELECT CAST(date_sent AS DATE) as day, status, COUNT(status) as count FROM {$table_name} WHERE 1=1"; if ( ! empty( $date_start ) ) { $sql .= ' AND date_sent >= %s'; $placeholders[] = $date_start->format( $format ); } if ( ! empty( $date_end ) ) { $sql .= ' AND date_sent <= %s'; $placeholders[] = $date_end->format( $format ); } $sql .= ' GROUP BY day, status;'; if ( ! empty( $placeholders ) ) { $sql = $wpdb->prepare( $sql, $placeholders ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } $results = $wpdb->get_results( $sql, ARRAY_A ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared if ( empty( $results ) ) { return []; } $results = $this->process_row_data_email_stats_count_by_date( $results ); $results = $this->fill_chart_empty_days( $results, $date_start, $date_end ); return (array) $results; }
[ "public function get_daily_email_count()\n {\n return response()->json(['email_count' => Marketerz::dailyEmails()], 200);\n }", "private function getEmailsSentTodayCount()\n {\n $currentDate = new \\DateTime(\"now\");\n $result = $this->getDoctrine()->getManager()->createQuery(\n 'SELECT e.channel, COUNT(e.id) AS channel_count\n FROM HarbourMailerBundle:Email e\n WHERE e.account = :account_id\n AND e.created_at >= :created_at_start\n AND e.created_at <= :created_at_stop\n GROUP BY e.channel'\n )\n ->setParameter('account_id', $this->getAccount()->getId())\n ->setParameter('created_at_start', $currentDate->format('Y-m-d') . \" 00:00\")\n ->setParameter('created_at_stop', $currentDate->format('Y-m-d') . \" 23:59\")\n ->getResult(\\Doctrine\\ORM\\AbstractQuery::HYDRATE_ARRAY);\n\n $channels = array();\n foreach($result as $row)\n {\n $channels[$row['channel']] = $row['channel_count'];\n }\n return $channels;\n }", "public function get_counts() {\n\n\t\t$this->counts = [];\n\n\t\t// Base params with applied filters.\n\t\t$base_params = $this->get_filters_query_params();\n\n\t\t$total_params = $base_params;\n\t\tunset( $total_params['status'] );\n\t\t$this->counts['total'] = ( new EmailsCollection( $total_params ) )->get_count();\n\n\t\tforeach ( $this->get_statuses() as $status => $name ) {\n\t\t\t$collection = new EmailsCollection( array_merge( $base_params, [ 'status' => $status ] ) );\n\n\t\t\t$this->counts[ 'status_' . $status ] = $collection->get_count();\n\t\t}\n\n\t\t/**\n\t\t * Filters items counts by various statuses of email log.\n\t\t *\n\t\t * @since 2.7.0\n\t\t *\n\t\t * @param array $counts {\n\t\t * Items counts by statuses.\n\t\t *\n\t\t * @type integer $total Total items count.\n\t\t * @type integer $status_{$status_key} Items count by status.\n\t\t * }\n\t\t */\n\t\t$this->counts = apply_filters( 'wp_mail_smtp_pro_emails_logs_admin_table_get_counts', $this->counts );\n\t}", "public static function get_email_row_statistics() {\n\t\tglobal $inbound_settings;\n\n\t\t$stats = get_transient( 'inbound-email-stats-cache');\n\n\t\tif (!is_array($stats)) {\n\t\t\t$stats = array();\n\t\t}\n\n\t\tif (isset($stats[$_REQUEST['email_id']])) {\n\t\t\techo json_encode($stats[$_REQUEST['email_id']]);\n\t\t\theader('HTTP/1.1 200 OK');\n\t\t\texit;\n\t\t}\n\n\t\tswitch ($inbound_settings['inbound-mailer']['mail-service']) {\n\t\t\tcase \"mandrill\":\n\t\t\t\t$stats[$_REQUEST['email_id']] = Inbound_Mandrill_Stats::get_email_timeseries_stats( $_REQUEST['email_id'] );\n\n\t\t\t\tbreak;\n\t\t\tcase \"sparkpost\":\n\t\t\t\t$stats[$_REQUEST['email_id']] = Inbound_SparkPost_Stats::get_sparkpost_inbound_events( $_REQUEST['email_id'] );\n\t\t\t\t//$stats[$_REQUEST['email_id']] = Inbound_SparkPost_Stats::get_email_timeseries_stats( $_REQUEST['email_id'] );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tset_transient('inbound-email-stats-cache' , $stats , 60* 5);\n\n\t\techo json_encode($stats[$_REQUEST['email_id']]);\n\t\theader('HTTP/1.1 200 OK');\n\t\texit;\n\t}", "function countResultByEmail($email)\r\n\t{\r\n\t\t$query = $this->_db->prepare(\"SELECT count(id) as total FROM results where email = :email\");\r\n\t\t$query->bindValue(':email',$email);\r\n\t\t$query->execute();\r\n\r\n\t\t$result = $query->fetch(PDO::FETCH_ASSOC);\r\n\t\treturn $result['total'];\r\n\t}", "public function count_cases_by_email( $email ) {\n $args = array(\n 'post_type' => 'case',\n 'post_status' => 'any',\n 'meta_query' => array(\n array(\n 'key' => 'email',\n 'value' => $email,\n ),\n ),\n );\n $cases_by_email = get_posts( $args );\n\n if ( is_wp_error($cases_by_email) ) return 0;\n\n return empty($cases_by_email) ? 0 : count($cases_by_email);\n }", "public function get_newsletter_subscriber_stats( $start_date = '', $end_date = '' ) {\n $mc = MailChimp::get_instance();\n $since_send_time = new \\DateTime( $start_date );\n $campaign_args = [\n 'since_send_time' => $since_send_time->format( 'c' ),\n 'sort_field' => 'send_time',\n 'sort_dir' => 'DESC',\n 'count' => 100,\n ];\n $group_name = 'Daily Newsletter';\n $group_category = 'Newsletters';\n $raw_campaigns = $mc->get_campaigns_by_group(\n $group_name,\n $group_category,\n $campaign_args\n );\n $campaigns = [];\n foreach ( $raw_campaigns as $campaign ) {\n $report_url = $mc->get_admin_url( '/reports/summary?id=' . $campaign->web_id );\n\n $campaigns[] = (object) [\n 'report_url' => $report_url,\n 'send_time' => $campaign->send_time,\n 'sent_to' => $campaign->emails_sent,\n 'recipient_count' => $campaign->recipients->recipient_count,\n 'subject' => $campaign->settings->subject_line,\n 'opens' => $campaign->report_summary->opens,\n 'unique_opens' => $campaign->report_summary->unique_opens,\n 'clicks' => $campaign->report_summary->clicks,\n 'subscriber_clicks' => $campaign->report_summary->subscriber_clicks,\n 'click_rate' => $campaign->report_summary->click_rate,\n ];\n }\n if ( empty( $campaigns[0] ) ) {\n return (object) [\n 'total' => 0,\n 'trend' => 'down',\n 'diff' => 0,\n 'campaigns' => [],\n ];\n }\n $campaigns_reversed = array_reverse( $campaigns );\n $latest_campaign = $campaigns[0];\n $last_campaign = $campaigns_reversed[0];\n\n $total_subscribers = intval( $latest_campaign->sent_to );\n $diff = $total_subscribers - intval( $last_campaign->sent_to );\n $trend = 'up';\n\n if ( $diff < 0 ) {\n $trend = 'down';\n $diff = abs( $diff );\n }\n\n return (object) [\n 'total' => $total_subscribers,\n 'trend' => $trend,\n 'diff' => $diff,\n 'campaigns' => $campaigns,\n ];\n }", "public static function getCountByEmail($email){\n $sql = 'SELECT count(email) AS cnt FROM posts where email= ?';\n $query = App::get()->db->prepare($sql);\n $query->bindParam(1,$email,\\PDO::PARAM_STR);\n $query->execute();\n $res = $query->fetch(\\PDO::FETCH_ASSOC);\n return $res['cnt'];\n }", "public function CountEmails() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\treturn 0;\n\n\t\t\treturn Email::CountByPersonId($this->intId);\n\t\t}", "public function get_tracked_email_counts( $tag = '', $from_date = '', $to_date = '' ) {\n\t\t\t$request = '/stats/outbound/tracked?' . http_build_query( array_filter( array(\n\t\t\t\t'tag' => $tag,\n\t\t\t\t'fromdate' => $from_date,\n\t\t\t\t'todate' => $to_date,\n\t\t\t)));\n\n\t\t\treturn $this->build_request()->fetch( $request );\n\t\t}", "public function countMails()\n\t{\n\t\treturn $this->count;\n\t}", "public function getMailingStatistics()\n {\n $query = $this->em->createQuery('\n SELECT\n m.id AS messageId, COUNT(u.viewed) AS views, COUNT(u.status) AS total,\n m.subject, m.sent, m.bounceCount AS bounceCount, (COUNT(u.viewed) / COUNT(u.status) * 100) AS rate\n FROM\n IdeupPhplistBundle:PhplistUserMessage u\n JOIN\n u.message m\n GROUP BY u.newsletterId\n ORDER BY m.sent DESC\n ');\n return $query->getResult();\n }", "function get_failed_email_count()\n\t{\n\t\t$start_date=date(\"U\")-(60*60*48);//48 hours\n\t\t$this->db->select('count(*) as total');\n\t\t$this->db->where('logtype','email-failed');\n\t\t$this->db->where('logtime >=',$start_date);\n\t\t$query=$this->db->get('sitelogs')->row_array();\n\t\t\n\t\treturn $query['total'];\t\t\n\t}", "private static function countHits($date, $type, AppsEntityRestriction $app) {\n /** @var AppsEntityRestrictionsReportsCacheManagerHits $cache_manager */\n $cache_manager = AppsEntityRestrictionsReports::cacheManager($app)->getHitsManager();\n\n if ($count = $cache_manager->getDateHits($date, $type)) {\n return $count;\n }\n\n // Handle cache per day for each application.\n $query = new EntityFieldQuery();\n\n $query\n ->entityCondition('entity_type', 'entity_view_count')\n ->propertyCondition('entity_type', 'apps_entity_restrictions')\n ->propertyCondition('type', 'apps_usage')\n ->propertyCondition('entity_id', $app->identifier())\n ->fieldCondition('field_request_date', 'value', $date);\n\n if ($type != 'total') {\n $query->fieldCondition('field_request_status', 'value', $type);\n }\n\n $count = $query->count()->execute();\n $cache_manager->cacheDateHits($date, $count, $type);\n return $count;\n }", "public function actionStatisticsCustomerEmail(){\r\n\t\t$dbqueue2Conn = \\yii::$app->db_queue2;\r\n\t\t$allcount = $dbqueue2Conn->createCommand('SELECT count(1) count FROM customer_email')->queryAll();\r\n\t\techo \"\\n allCount: \".$allcount[0]['count'].\"\\n\";\r\n\t\t\r\n\t\t$platform_arr = $dbqueue2Conn->createCommand('SELECT platform_source, count(1) count FROM customer_email group by platform_source')->queryAll();\r\n\t\tif(!empty($platform_arr)){\r\n\t\t\techo \"\\n platform group statistics\";\r\n\t\t\tforeach($platform_arr as $val){\r\n\t\t\t\techo \"\\n \".$val['platform_source'].\": \".$val['count'];\r\n\t\t\t}\r\n\t\t\techo \"\\n \";\r\n\t\t}\r\n\t}", "public function getEventCount($date)\r\n {\n \t$date = $this->toDateStamp($date);\n if (array_key_exists($date, $this->events))\n {\n return $this->events[$this->toDateStamp($date)];\n }\n return 0;\r\n /*$events = $this->getEvents($this->toDateStamp($date));\r\n return count($events);*/\r\n }", "private function getNotificationCounters(): stdClass\n {\n return DB::table('system_alerts')\n ->selectRaw('count(*) as total')\n ->selectRaw(\"count(case when created_at like '%\".date('Y-m-d').\"%' then 1 end) as total_today\")\n ->first();\n }", "public function countByDate()\n {\n\n $query = $this->getEntityManager()->createQuery(\"\n SELECT SUBSTRING(a.dateParticipation, 1, 10) as dateParticipation, COUNT(a) as count FROM App\\Entity\\Participation \n a GROUP BY dateParticipation\n \");\n return $query->getResult();\n }", "public function getDailyDataCount()\n {\n return $this->count(self::DAILY_DATA);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the field to use for the ToggleCompositeField's heading/title
public function getTitleField() { return $this->titleField; }
[ "public function TitleField() {\n\t\treturn $this->getTextField('Title', 'Field title');\n\t}", "public function getFieldTitle ()\n {\n return $this->_fieldTitle;\n }", "public function getEditableField()\n {\n return $this->Parent()->Parent()->Fields()->filter([\n 'Name' => $this->Name\n ])->First();\n }", "function get_title() {\n return t('Field');\n }", "public function getFieldTitle() {\n return $this->_fieldTitle;\n }", "public function getToggleName()\n {\n return $this->toggleName;\n }", "public function getDescriptionField() {\n $title_field = Tracker_Semantic_Description::load($this)->getField();\n if ($title_field) {\n return $title_field;\n } else {\n return null;\n }\n }", "public function get_field_name();", "protected function makeField() {\n\t\tswitch ($this->config()->get('show_as')) {\n\t\tcase self::ShowAsDropdown:\n\t\t\t$field = new \\DropdownField(\n\t\t\t\tstatic::single_field_name(),\n\t\t\t\t'',\n\t\t\t\tstatic::options()\n\t\t\t);\n\t\t\tif ($emptyString = static::config()->get('empty_string')) {\n\t\t\t\t$field->setEmptyString($emptyString);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase self::ShowAsRadio:\n\t\t\t$field = new \\OptionsetField(\n\t\t\t\tstatic::single_field_name(),\n\t\t\t\t'',\n\t\t\t\tstatic::options()\n\t\t\t);\n\t\t\t// if it is null then nothing will be set which is fine anyway\n\t\t\tif (!is_null($defaultValue = static::default_value())) {\n\t\t\t\t// TODO do we need this to set if no value, what happens if there is?\n//\t\t\t\t$field->setValue($defaultValue);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$field = null;\n\t\t}\n\t\treturn $field;\n\t}", "function field_widget_field($element, $form_state) {\n $field_state = field_form_get_state($element['#field_parents'], $element['#field_name'], $element['#language'], $form_state);\n return $field_state['field'];\n}", "function _formTitle()\n {\n if (is_null($this->_formTitle)) {\n $this->_formTitle = $this->_db->fetch_first_value('SELECT `title` '\n . ' FROM `module_form2` WHERE `id` = ?', $this->_form_id);\n }\n\n return $this->_formTitle;\n }", "function bbp_get_form_topic_title()\n{\n}", "public function getField()\n\t{\n\t\treturn $this->field_constant;\n\t}", "function getDocFieldDisplay($oDocField) {\n global $default;\n if (!isset($oDocField)) {\n $oPatternListBox = & new PatternListBox($default->document_fields_table, \"name\", \"id\", \"fDocFieldID\");\n $oPatternListBox->setPostBackOnChange(true);\n return $oPatternListBox->render();\n } else {\n $sToRender .= \"<input type=\\\"hidden\\\" name=\\\"fDocFieldID\\\" value=\\\"\" . $oDocField->iId . \"\\\">\\n\";\n if ($oDocField->getName() == \"Category\") {\n \t$sToRender .= \"<input type=\\\"hidden\\\" name=\\\"fDocFieldName\\\" value=\\\"\" . $oDocField->getName() . \"\\\">\\n\";\n \t$sToRender .= $oDocField->getName();\n } else {\n \t$sToRender .= \"<input size=\\\"40\\\" type=\\\"text\\\" name=\\\"fDocFieldName\\\" value=\\\"\" . $oDocField->getName() . \"\\\">\";\n }\n\t\treturn $sToRender;\n }\n}", "public function showAsField() {\n return $this->configuration['show_as_field'];\n }", "public function getFieldTypeRelationshipTitle()\n {\n return $this->getTitleColumnValue();\n }", "public function getField()\n\t{\n\t\treturn craft()->fields->getFieldById($this->fieldId);\n\t}", "public function get_breadcrumb_field()\n {\n return $this->get_table() . '__title';\n }", "public function getParentFieldDescription();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
todo:getDatesBetweenTwoDatesInARange($beginDate, $endDate) todo:getMonthStartAndEndDatesBetweenTwoDatesInARange($beginDate, $endDate) todo:test year spanning range for days, weeks and months todo:test timzeon stuff on these??
public function testGetDatesBetweenTwoDatesInARange() { $monthsData = DateTimeUtil::getDatesBetweenTwoDatesInARange('2013-01-20', '2013-01-24'); $compareData = array('2013-01-20', '2013-01-21', '2013-01-22', '2013-01-23', '2013-01-24'); $this->assertEquals($compareData, $monthsData); $monthsData = DateTimeUtil::getDatesBetweenTwoDatesInARange('2013-06-29', '2013-07-01'); $compareData = array('2013-06-29', '2013-06-30', '2013-07-01'); $this->assertEquals($compareData, $monthsData); $monthsData = DateTimeUtil::getDatesBetweenTwoDatesInARange('2012-12-28', '2013-01-03'); $compareData = array('2012-12-28', '2012-12-29', '2012-12-30', '2012-12-31', '2013-01-01', '2013-01-02', '2013-01-03'); $this->assertEquals($compareData, $monthsData); }
[ "function spanByMonths($date1, $date2) {\n\n// include pear date and set the date format constant to database Y-m-d\ndefine('DATE_CALC_FORMAT', '%Y-%m-%d');\ninclude_once(PEAR_PATH . \"Date.php\");\n\n$dc = new Date_Calc; // make our object\n\n\n// get the array of them ar = array('day' => x, 'month' => x, 'year' => x);\n$date1Arr = db2Arr($date1); \n$date2Arr = db2Arr($date2);\n\n// if the dates are in the same month and year, we know exactly what are the periods. the rest of logic is for date1 in a month and date2 in other month\nif ($date1Arr[\"year\"] == $date2Arr[\"year\"] and $date1Arr[\"month\"] == $date2Arr[\"month\"]) {\n $periods[0][\"start\"] = $date1;\n $periods[0][\"end\"] = $date2;\n } else {\n\n$res = 0;\n$i = 0;\n\n// now that's the thing: it computes periods having the begin date begin of some month and end date the end of some month...\n// ... starting with the beginning of next month (so the date1 end of date1 month) must be added separately\n// ...and when the period end date is greater then date2 (date to) it stops. not including that period. (so it must be added separately also)\n// lunile pline ce mai\n\n$periods[0][\"start\"] = $date1;\n $periods[0][\"end\"] = $dc->endOfMonthBySpan(0, $date1Arr[\"month\"], $date1Arr[\"year\"]);\n\nwhile (1 == 1) { // when endDate is later then date2 \n\n $i++;\n $startDate = $dc->beginOfMonthBySpan($i, $date1Arr[\"month\"], $date1Arr[\"year\"]);\n $endDate = $dc->endOfMonthBySpan($i, $date1Arr[\"month\"], $date1Arr[\"year\"]);\n\n\n $endDateArr = db2Arr($endDate);\n\n $res = $dc->compareDates($endDateArr[\"day\"], $endDateArr[\"month\"], $endDateArr[\"year\"], $date2Arr[\"day\"], $date2Arr[\"month\"], $date2Arr[\"year\"]); // compare endDate with date2. will stop only if endDate of the period becomes greater then date2.\n\n if ($res == 1 or $res == 0) break;\n\n $periods[$i][\"start\"] = $startDate;\n $periods[$i][\"end\"] = $endDate;\n\n }\n\n $periods[$i][\"start\"] = $dc->beginOfMonthBySpan(0, $date2Arr[\"month\"], $date2Arr[\"year\"]);\n $periods[$i][\"end\"] = $date2;\n\n\n } // else if in different months computes in someotherway the periods\n\n\n return $periods;\n\n}", "function dateRange($range, $beg, $end=null) {\n $r = '';\n if (is_null($end)) $end = $beg;\n $a = explode('|',$range);\n if (count($a) > 2) return $r;\n $after = strtotime($a[0]);\n if ($after) {\n $r = \" AND $beg >= \".date(\"'Y-m-d'\",$after);\n }\n $before = strtotime($a[1]);\n if ($before) {\n $r .= \" AND $end <= \".date(\"'Y-m-d'\",$before);\n }\n return $r;\n}", "function parse_date_range($date_range = null) {\n //validate.\n if ($date_range == null) return null;\n\n //split the range.\n $splitted = explode(' ~ ', $date_range);\n\n //if not start ~ end.\n if (count($splitted) != 2) return null;\n\n //parse it.\n $a = DateTime::createFromFormat('d/m/Y', $splitted[0]);\n $b = DateTime::createFromFormat('d/m/Y', $splitted[1]);\n\n //if failed to parse.\n if ($a === FALSE || $b === FALSE) return null;\n\n //revalidate and re-format.\n $return['start'] = validate_date_input($a->format('d/m/Y'));\n $return['end'] = validate_date_input($b->format('d/m/Y'));\n\n return $return;\n}", "function days_in_range($start_day,$start_month,$start_year,$end_day,$end_month,$end_year)\n{\n\t$start_date=mktime(0,0,0,$start_month,$start_day,$start_year);\n\t$end_date=mktime(0,0,0,$end_month,$end_day,$end_year);\n\n\t$days=array();\n\t$days[]=array(intval(date('d',$start_date)),intval(date('m',$start_date)),intval(date('Y',$start_date)));\n\n\t$current_date=$start_date;\n\twhile($current_date<$end_date)\n\t{\n\t\t$current_date=strtotime('+1 day',$current_date);\n\t\t$days[]=array(intval(date('d',$current_date)),intval(date('m',$current_date)),intval(date('Y',$current_date)));\n\t}\n\n\treturn $days;\n}", "function dateRangeIntersect($range1, $range2) {\n\t$res = $range1;\n\n\tif(dateBefore($res['start'], $range2['start'])) {\n\t\t$res['start'] = $range2['start'];\n\t}\n\n\tif(dateAfter($res['end'], $range2['end'])) {\n\t\t$res['end'] = $range2['end'];\n\t}\n\n\tif(dateAfter($res['start'], $res['end'])) {\n\t\treturn NULL;\n\t}\n\n\treturn $res;\n}", "public function get_date_ranges()\n\t{\n\t\t$the_year = $this->input->post('the_year', false);\n\t\t$type = $this->input->post('type', 'start');\n\t\t$item = $this->input->post('item', 'year');\n\t\t$date_ranges = reports::get_date_ranges();\n\n\t\tif (empty($date_ranges)) return false;\n\n\t\t$start_date \t= $date_ranges[0]; \t// first date in db\n\t\t$end_date \t\t= $date_ranges[1];\t// last date in db\n\t\t$type \t\t\t= trim($type);\n\t\t$item \t\t\t= trim($item);\n\t\t$the_year \t\t= (int)$the_year;\n\t\t$start_year \t= date('Y', $start_date);\n\t\t$current_year\t= date('Y');\n\t\t$current_month\t= date('m');\n\t\t$end_year \t\t= date('Y', $end_date);\n\t\t$start_month \t= date('m', $start_date);\n\t\t$end_month \t\t= date('m', $end_date);\n\n\t\t$arr_end = false;\n\t\t$arr_start = false;\n\t\t$type_item = false;\n\t\t$end_num = 0;\n\t\t$start_num = 0;\n\t\tif (empty($type)) {\n\t\t\t// Print all years\n\t\t\tfor ($i=$start_year;$i<=$end_year;$i++) {\n\t\t\t\t$arr_start[] = $i;\n\t\t\t\t$arr_end[] = $i;\n\t\t\t}\n\t\t} else {\n\t\t\t// empty month list\n\t\t\tif (!empty($the_year)) {\n\t\t\t\t// end month should always be 12 unless we only\n\t\t\t\t// have data for a single year\n\t\t\t\tif ($start_year == $end_year) {\n\t\t\t\t\t$end_num = ($end_month == 1) ? 11 : $end_month-1;\n\t\t\t\t\t$start_num = $start_month;\n\t\t\t\t} else {\n\t\t\t\t\t$end_num = $the_year == $current_year ? $current_month: 12;\n\t\t\t\t\t$start_num = $the_year == $start_year ? $start_month : 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor ($i=$start_num;$i<=$end_num;$i++) {\n\t\t\t\t$arr_start = $type == 'start' ? $the_year : false;\n\t\t\t\t$arr_end = $type == 'end' ? $the_year : false;\n\t\t\t\t$type_item[] = array($type.\"_\".$item, str_pad($i, 2, '0', STR_PAD_LEFT), $i);\n\t\t\t}\n\t\t}\n\n\t\t$return = array('start_year' => $arr_start, 'end_year' => $arr_end, 'type_item' => $type_item);\n\t\techo json::encode($return);\n\t\treturn true;\n\t}", "public function getMonthlyDateRange($start_month,$start_year,$end_month,$end_year){\n $year_diff = $end_year-$start_year;\n $starts_years = array();\n $ends_years = array();\n if($year_diff==0){\n $month_limit = $end_month;\n for($i=$start_month;$i<=$month_limit;$i++){\n $i = $this->check_length_add_one($i);\n $start_date = $end_year.\"-\".$i.\"-01\";\n $end_date = $end_year.\"-\".$i.\"-31\";\n array_push($starts_years,$start_date);\n array_push($ends_years,$end_date);\n \n }\n \n }else{\n for($r=$start_year;$r<=$end_year;$r++){\n if($r==$start_year){\n $month_start = $start_month;\n \n }else{\n $month_start = \"01\";\n }\n \n if($r==$end_year){\n $month_limit = $end_month;\n }\n else{\n $month_limit = \"12\";\n }\n \n for($i=$month_start;$i<=$month_limit;$i++){\n $i = $this->check_length_add_one($i);\n $start_date = $r.\"-\".$i.\"-01\";\n $end_date = $r.\"-\".$i.\"-31\";\n array_push($starts_years,$start_date);\n array_push($ends_years,$end_date);\n }\n \n }\n \n \n }\n return array($starts_years,$ends_years);\n \n }", "private function createDateRangeArray($start, $end) {\n// Modified by JJ Geewax \n\n$range = array();\n\nif (is_string($start) === true) $start = strtotime($start);\nif (is_string($end) === true ) $end = strtotime($end);\n\nif ($start > $end) return $this->createDateRangeArray($end, $start);\n\ndo {\n$range[] = date('Y-m-d', $start);\n$start = strtotime(\"+ 1 day\", $start);\n}\nwhile($start <= $end);\n\nreturn $range;\n}", "function calc_date_range_years($start, $end)\n{\n\t$years = array();\n\t\n\t$start_prts = explode('-', $start);\n\t$end_prts = explode('-', $end);\n\t\n\t$years[] = $start_prts[0];\n\t\n\tfor ($i=$start_prts[0]; $i<$end_prts[0]; $i++)\n\t{\n\t\t$years[] = $i + 1;\n\t}\n\t\n\treturn $years;\n}", "public function getAllDatesBetweenTwoDates($strDateFrom,$strDateTo)\r\n{\r\n $aryRange=array();\r\n\r\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\r\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\r\n\r\n if ($iDateTo>=$iDateFrom)\r\n {\r\n array_push($aryRange,date('Y-m-d',$iDateFrom)); // first entry\r\n while ($iDateFrom<$iDateTo)\r\n {\r\n $iDateFrom+=86400; // add 24 hours\r\n array_push($aryRange,date('Y-m-d',$iDateFrom));\r\n }\r\n }\r\n return $aryRange;\r\n}", "function year_range($y_from, $y_to)\n{ \n\t$y_from = refine_input($y_from);\n\t$y_to = refine_input($y_to);\n\n\tif ($y_to < $y_from) \n\t{\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n\t\n}", "public function leadsInDates($start, $end, $data = []);", "function inDateRange(&$request){\n global $dateFields;\n foreach ($dateFields as $dateField){\n $fromYearField = \"{$dateField}FromYear\";\n $toYearField = \"{$dateField}ToYear\";\n if (!($_REQUEST[$fromYearField] || $_REQUEST[$toYearField]))\n continue;\n else{\n $fromYear = \"0000\"; // YYYY as string\n $fromMonth = \"00\"; // MM as string\n $fromDay = \"00\"; // DD as string\n if ($_REQUEST[$fromYearField]){\n $fromYear = str_pad((int) $_REQUEST[$fromYearField],4,\"0\",STR_PAD_LEFT);\n if ($_REQUEST[\"{$dateField}FromMonth\"])\n $fromMonth = str_pad((int) $_REQUEST[\"{$dateField}FromMonth\"],2,\"0\",STR_PAD_LEFT);\n if ($_REQUEST[\"{$dateField}FromDay\"])\n $fromDay = str_pad((int) $_REQUEST[\"{$dateField}FromDay\"],2,\"0\",STR_PAD_LEFT);\n }\n $toYear = \"9999\"; // YYYY as string\n $toMonth = \"99\"; // MM as string\n $toDay = \"99\"; // DD as string\n if ($_REQUEST[$toYearField]){\n $toYear = str_pad(((int) $_REQUEST[$toYearField]?$_REQUEST[$toYearField]:\"9999\"),4,\"0\",STR_PAD_LEFT);\n if ($_REQUEST[\"{$dateField}ToMonth\"])\n $toMonth = str_pad(((int) $_REQUEST[\"{$dateField}ToMonth\"]?$_REQUEST[\"{$dateField}ToMonth\"]:\"99\"),\n 2,\n \"0\",\n STR_PAD_LEFT);\n if ($_REQUEST[\"{$dateField}ToDay\"])\n $toDay = str_pad(((int) $_REQUEST[\"{$dateField}ToDay\"]?$_REQUEST[\"{$dateField}ToDay\"]:\"99\"),\n 2,\n \"0\",\n STR_PAD_LEFT);\n }\n $xmlField = str_replace('_','-',$dateField);\n if (!((string) $request->$xmlField >= \"$fromYear.$fromMonth.$fromDay\" &&\n (string) $request->$xmlField <= \"$toYear.$toMonth.$toDay\"))\n return false;\n }\n }\n return true;\n}", "function dateRange($startDate, $endDate){\n\t# displays either \"Sept. 25th - 28th, 2006\", \"Sept. 30th - Oct. 5th, 2006\" or simply \"Sept. 25th, 2006\"\n\tif($startDate != '0000-00-00'){\n\t\t$html = formatdate($startDate,'M. jS');\n\t\t$m1 = explode('-',$startDate);\n\t\tif($endDate != '0000-00-00'){\n\t\t\t$m2 = explode('-',$endDate);\n\t\t\tif($m1[1] == $m2[1]) $html .= ' - '.formatdate($endDate,'jS');\n\t\t\telse $html .= ' - '.formatdate($endDate,'M. jS');\n\t\t\t$html .= ', '.$m2[0];\n\t\t\t\n\t\t} else {\n\t\t\t$html .= ', '.$m1[0];\n\t\t}\n\t\t\n\t\treturn $html;\n\t}\n}", "public static function find_books_by_date_range($start, $end)\n {\n $books = new Books();\n $BooksbyDate = array();\n try {\n $stmt = $books->range($start, $end, 'StartDate');\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n\n $p = (object) array(\n \"BookID\" => (int) $BookID,\n \"StartDate\" => $StartDate,\n \"StartAt\" => (int) $StartAt,\n \"CustomerID\" => (int) $CustomerID,\n \"ServiceID\" => (int) $ServiceID,\n \"Durtion\" => (int) $Durtion,\n \"ServiceTypeID\" => (int) $ServiceTypeID,\n \"Notes\" => $Notes,\n );\n\n array_push($BooksbyDate, $p);\n }\n if (count($BooksbyDate) == 0)\n throw new Exception(\"Book not found\", 404);\n $hii = range($start, $end);\n BookingService::array_sort_by_column($BooksbyDate, 'StartDate');\n return $BooksbyDate;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public static function forDates($start, $end) {\n $range= new GoogleDateRange();\n $range->setStart($start);\n $range->setEnd($end);\n return $range;\n }", "function erp_hr_get_financial_year_from_date_range( $start_date, $end_date ) {\n global $wpdb;\n\n if ( ! is_numeric( $start_date ) ) {\n $start_date = erp_current_datetime()->modify( $start_date )->getTimestamp();\n }\n\n if ( ! is_numeric( $end_date ) ) {\n $end_date = erp_current_datetime()->modify( $end_date )->getTimestamp();\n }\n\n /**\n * select wp_erp_hr_leave_requests.id, st.approval_status_id from wp_erp_hr_leave_requests\n * left join wp_erp_hr_leave_approval_status as st on st.leave_request_id = wp_erp_hr_leave_requests.id\n * where (start_date <= 1578441600 and end_date >= 1578441600 and user_id = 23)\n * or (start_date <= 1579046399 and end_date >= 1579046399 and user_id = 23)\n * or (start_date >= 1578441600 and start_date <= 1579046399 and user_id = 23)\n * or (end_date >= 1578441600 and end_date <= 1579046399 and user_id = 23)\n */\n\n return $wpdb->get_col(\n $wpdb->prepare(\n \"SELECT id FROM {$wpdb->prefix}erp_hr_financial_years\n WHERE (start_date <= %d AND end_date >= %d)\n OR (start_date <= %d AND end_date >= %d)\n OR (start_date >= %d and start_date <= %d)\n OR (end_date >= %d and end_date <= %d)\n \",\n array(\n $start_date, $start_date,\n $end_date, $end_date,\n $start_date, $end_date,\n $start_date, $end_date\n )\n )\n );\n}", "function convertDateToRangeSub($findDate, $from_date, $end_date, $step = '+1 day', $format = 'Y-m-d' ) {\n $dates = array();\n $current = strtotime($from_date);\n $last = strtotime($end_date);\n while( $current <= $last ) {\n $dates[] = date($format, $current);\n $current = strtotime($step, $current);\n }\n $std = in_array($findDate[0], $dates, true);\n $ed = in_array($findDate[1], $dates, true);\n if($std OR $ed){\n return true;\n }\n return false;\n }", "function getDatesFromRange($start, $end){\n\n\t\t\t$dates = array();\n\t\t\t\n\t\t\t$cur = $start;\n\t\t\twhile($cur <= $end){\n\t\t\t\t$dates[] = date('M-d', strtotime($cur));\n\t\t\t\t$cur = date('Y-m-d', strtotime($cur . '+1 days'));\n\t\t\t}\n\t\t\treturn $dates;\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the [text_bg] column value.
public function gettextBg() { return $this->text_bg; }
[ "public function getColorText()\n {\n return $this->colorText;\n }", "function GetTextColour(){}", "public function getTextColor() {\n\t\treturn $this->text_color;\n\t}", "public function getAppearanceTextColor() {}", "public function getTextColor()\n {\n return $this->_helperData->getWhatToShowConfig('text_color');\n }", "public function getTextUnderColor () {}", "public function getTextColor() {\n\n // return the current desired text color\n return $this->desiredState->getTextColor();\n }", "function GetBackgroundColour(){}", "public function getForegroundColor() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"foregroundColor\");\n\t}", "public function getBg() {\n return $this->get(self::BG);\n }", "public function getTextColor()\n {\n return $this->textColor;\n }", "public function getBackgroundColor() {}", "public function getBackgroundColor()\n {\n return $this->getProperty('bg-color');\n }", "public function get_bgcolor()\r\n\t{\r\n\t\treturn $this->get_attr('bgcolor');\r\n\t}", "function GetDefaultCellTextColour(){}", "public function getCurrentTextColor() {\n return $currentTextColor;\n }", "public function getFooterTextColor();", "public function getThemeTextColor() {\n\t\treturn $this->getClaim(self::CAIM_THEME_TEXT_COLOR);\n\t}", "public function getDataFontColor(): ?string {\n\t\treturn $this->dataFontColor;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns schedule end hour.
public function getEndHour() { return $this->endHour; }
[ "public function getEndHour() {return substr($this->endTime, 0, 2);}", "public function getEndHour(): int;", "public function getHourEnd() {\n return $this->hour_end;\n }", "public function getHourEnd()\n {\n return $this->hourEnd;\n }", "public function getEndHour()\n\t{\n\t $is_24 = ( get_option( 'timetable_24_hour_mode' ) == 'yes' ) ? TRUE : FALSE;\n\n\t if ( $is_24 ) {\n\t $hour = date( 'G:i', strtotime( $this->end_hour, 0 ) );\n\t }\n\t else {\n\t $hour = date( 'g:i a', strtotime( $this->end_hour, 0 ) );\n\t }\n\n\t return $hour;\n\t}", "public function endH()\n\t{\n\t\treturn (int) date('H', $this->end);\n\t}", "private function formatEndTime () {\r\n if($this->carbonEnd != $this->carbonEnd->copy()->startOfHour()) {\r\n return $this->carbonEnd->copy()->startofHour();\r\n }\r\n return $this->carbonEnd;\r\n }", "public function endOfDay()\n {\n return $this->setTime(23, 59, 59, 999999);\n }", "private function get_end_date_scheduled_time()\n {\n $now = new \\DateTime('now', new DateTimeZone('UTC'));\n // remove just 1 hour so normal transactions can still be processed\n $tosub = new \\DateInterval('PT'. 1 . 'H');\n return strtotime($now->sub($tosub)->format('Y-m-d H:i:s'));\n }", "public function getShiftEnd() {\n return $this->shiftEnd->format('H:i');\n }", "public function getStopHour()\n {\n return $this->stopHour;\n }", "public function getShiftEnd() {\n return $this->schedule->getShiftEndTime();\n }", "public function getScheduledEnd();", "public function subHour()\n {\n return $this->addHours(-1);\n }", "public function getDayEnd()\n {\n return self::mkTime(\n 23,\n 59,\n 59,\n $this->format('m'),\n $this->format('d'),\n $this->format('Y')\n );\n }", "function hour()\n {\n return gmdate (\"H:i\", time() + (3600 * $this->desfase));\n }", "function get_hour()\n {\n return floor($this->time);\n }", "public function getUntilHour()\n {\n return $this->until;\n }", "public static final function HOUR()\r\n {\r\n if(null === self::$HOUR)\r\n self::$HOUR = new Inx_Api_TriggerMailing_Descriptor_TimeTriggerUnit( 5, 1, 23 );\r\n \r\n return self::$HOUR;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function should return a bool based on whether the checked item "appears" to be complete.
public function isComplete() { //there's nothing to check in the software on this one, so return whatever isChecked is set to, so that the nag messages don't show up return (bool)$this->isChecked; }
[ "public function is_done()\n {\n $completedStatusList = array(\n 'completed',\n 'passed',\n 'succeeded',\n 'failed'\n );\n\n if ($this->status_is($completedStatusList)) {\n if (self::debug > 2) {\n error_log(\n 'learnpath::is_done() - Item ' . $this->get_id(\n ) . ' is complete',\n 0\n );\n }\n\n return true;\n } else {\n if (self::debug > 2) {\n error_log(\n 'learnpath::is_done() - Item ' . $this->get_id(\n ) . ' is not complete',\n 0\n );\n }\n\n return false;\n }\n }", "protected function isAllItemsCompleted()\n {\n $complete = true;\n /** @var \\Magento\\Support\\Model\\Backup\\AbstractItem $item*/\n foreach ($this->getItems() as $item) {\n if ($item->getStatus() != \\Magento\\Support\\Model\\Backup\\AbstractItem::STATUS_COMPLETE) {\n $complete = false;\n break;\n }\n }\n\n return $complete;\n }", "public function isCompleted()\n {\n return $this->status == 'Complete'\n && $this->amount > 0.1\n && !empty($this->product_list);\n }", "public function haveItems()\n {\n return $this->current + 1 < $this->total();\n }", "function hasItem() {\n foreach($this->item_list as $list) {\n if($list->count() > 0)\n return true;\n }\n\n return false;\n }", "public function hasItems() : bool\n {\n return count($this->getRejecteds()) > 0;\n }", "protected function hasCompleted() {\n return !(bool)$this->expectedStep();\n }", "function isComplete()\n\t{\n\t\tif (($this->getTitle()) and (count($this->questions)))\n\t\t{\n\t\t\treturn 1;\n\t\t} \n\t\t\telse \n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}", "public function valid()\n {\n return isset($this->_items[$this->_position]);\n }", "public function isComplete(): bool {\n return isset($this->title) && isset($this->color) && isset($this->force);\n }", "public function isComplete()\n {\n return $this->state == self::STATE_COMPLETE;\n }", "function isComplete() {\n return (bool) $this->fulfillment['complete'];\n }", "public function containingOneItem(): bool\n {\n return $this->counting(1);\n }", "public function hasItems(): bool\n {\n return count($this->items) > 0;\n }", "public function has_item(){\n $args = func_get_args();\n $counter = $this->get_counter('item_disabled');\n $item = empty($counter) ? $this->get_info('robot_item') : '';\n if (!empty($args[0])){ return $item == $args[0] ? true : false; }\n else { return !empty($item) ? true : false; }\n }", "public function completed()\n {\n $completed = true;\n // if ($this->groups()->count() == 0) $completed = false;\n if ($this->groups_count == 0) $completed = false;\n if ($this->form_type_id < 1) $completed = false;\n return $completed;\n }", "public function isComplete()\n\t{\n\t\t// Please add here your own check for question completeness\n\t\t// The parent function will always return false\n\t\tif(($this->title) and ($this->author) and ($this->question) and ($this->getMaximumPoints() > 0))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function isComplete() {\n\t\t$questions = $this->getQuestions();\n\t\t\n\t\tforeach((array) $questions as $question) {\n\t\t\tif(!$question->hasAnswer($this->_answers)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function Event_Proceedings_Has($item=array())\n {\n $res=FALSE;\n if ($this->Event(\"Contents\")==2)\n {\n $res=TRUE;\n }\n\n return $res;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$theDateTime = date("Ymd g:i a",strtotime($v));// 20141031 8:00 pm
function dateTimeFormat($v) { // $theDateTime = date("m-d-Y g:i a",strtotime($v)); // 10-31-2014 8:00 pm $theDateTime = date("F d, Y at g:i a",strtotime($v)); // October 31, 2014 8:00 pm return $theDateTime; }
[ "function tohrdatetime($date) {\n return date(\"F j, Y g:i a\",strtotime($date));\n}", "function makeDateTime($date,$time)\n{\n return \\Carbon\\Carbon::createFromFormat('Y-m-d g:i A', $date.' '.$time);\n}", "function fecha_ts($fecha_datetime)\n\t{\n\t$fecha = split(\"/\",$fecha_datetime);\n\t$dia=$fecha[0];\n\t$mes=$fecha[1];\n\t$anio=$fecha[2];\n\t$fecha_convertida= mktime(0,0,0,$mes,$dia,$anio);\n\treturn($fecha_convertida);\n\t}", "static function formatedDate_TimeIndian($date) {//YYYY-MM-DD hh:mm:ss\n return date('h:i:s A - D, d-M-Y', strtotime($date)); // 12:30 AM - Tue, 06-Nov-2012\n }", "public function Timeshow(){\nreturn date(\"l ,d F Y H:i\");\n}", "function getDateTimeConvoc()\r\n {\r\n $str = '';\r\n if ($this->_hours != 0 || $this->_minutes != 0 || \r\n\t $this->_seconds != 0 || $this->_month != 0 || \r\n\t $this->_day != 0 || $this->_year != 0)\r\n\t{\r\n\t $date = mktime($this->_hours, $this->_minutes, $this->_seconds,\r\n\t\t\t $this->_month,$this->_day, $this->_year, -1 );\r\n\t\t$str = strftime(\"%d/%m/%Y %Hh%M\", $date);\r\n\t}\r\n return $str;\r\n }", "function getTimeString($DateTime){\n return $DateTime->format(\"Y-m-d H:i:s\"); \n}", "function makeDate()\n{\n return strftime(\"%Y-%m-%d %H:%M:%S\", time());\n}", "function getDateTime($time = 0, $form = \"dtLong\") {\n\tSwitch($form) {\n\t\tcase \"dtVLong\":\n\t\t$strform = \"D, jS F, Y g:i:s a (\\G\\M\\T O)\";\n\t\tbreak;\n\t\tcase \"dtLong\":\n\t\t$strform = \"D, jS F, Y g:i a\";\n\t\tbreak;\n\t\tcase \"dtShort\":\n\t\t$strform = \"jS M, Y g:i a\";\n\t\tbreak;\n\t\tcase \"dtMin\":\n\t\t$strform = \"j-n-y G:i\";\n\t\tbreak;\n\t\tcase \"dLong\":\n\t\t$strform = \"D, jS F Y\";\n\t\tbreak;\t\n\t\tcase \"dShort\":\n\t\t$strform = \"j-M-Y\";\n\t\tbreak;\n\t\tcase \"dMin\":\n\t\t$strform = \"j-n-y\";\n\t\tbreak;\n\t\tcase \"tLong\":\n\t\t$strform = \"G:i:s (\\G\\M\\T O)\";\n\t\tbreak;\n\t\tcase \"tShort\":\n\t\t$strform = \"G:i\";\n\t\tbreak;\n\t\tcase \"mySQL\":\n\t\t$strform = \"Y-m-d H:i:s\";\n\t\tbreak;\n\t\tdefault:\n\t\t$strform = \"j-M-Y g:i:a\";\t\n\t}\n\tif ($time === 0 ){\t\n\t$formated_time = date($strform);\n\t} else {\n\t$time = strtotime($time);\t\n\t$formated_time = date($strform, $time);\n\t}\n\treturn $formated_time;\n}", "function make_date(){\n return strftime(\"%y-%m-%d %H:%M:%S\", time());\n}", "public function Timeshow(){\r\nreturn date(\"l ,d F Y H:i\");\r\n}", "public static function getShortPrintableDatetime(): string\n {\n return (new DateTime())->format(\"mdHisv\");\n }", "function convert_timestamp( $ugly ){\n $date = new DateTime( $ugly );\n echo $date->format('l, jS, F, o');\n}", "static function setTimeToStrDateTime($v, &$pDataHora) {\n\n $pNovo = DataHora::getDateFromStrDateTime($pDataHora) . ' ' . $v;\n $pDataHora = $pNovo;\n }", "function dateFormat($v) {\n\t\t// $theDate = date(\"m-d-Y\",strtotime($v));\t\t\t\t// 10-31-2014\n\t\t$theDate = date(\"F d, Y\",strtotime($v));\t\t\t\t// October 31, 2014\n\t\treturn $theDate;\n\t}", "function datetimebdd($madate)\r\n{\r\n\treturn substr($madate,6,4).\"-\".substr($madate,3,2).\"-\".substr($madate,0,2).\" \".substr($madate,11,5).\":00\";\r\n}", "function datetime_format1($dateTime)\n{\n $dateTimeArr =array();\n $dateTime =trim($dateTime);\n $arr = explode(\" \",$dateTime);\n $date =$arr['0'];\n if($date){\n $dateArr =explode(\"-\",$date);\n $dateTimestamp = mktime(0,0,0,$dateArr[1],$dateArr[2],$dateArr[\"0\"]);\n $date = date(\"d/ m/ Y\",$dateTimestamp);\n }\n $time =$arr['1'];\n if($time){\n $timeArr =explode(\":\",$time);\n $Timestamp = mktime($timeArr[0],$timeArr[1],0);\n $time = date(\"g.i A\",$Timestamp);\n }\n \n $dateTimeArr = array(\"$date\",\"$time\");\n return $dateTimeArr;\n}", "function make_db_date_time($date)\n\t{\n\t\treturn date(\"Y-m-d H:i:s\",(strtotime($date)));\n\t}", "function fechatiempo_h_desde_mysql_datetime($tiempo){\n if (!$tiempo)\n {\n return \"\";\n }\n return date( 'd-m-Y h:i:sa',strtotime($tiempo) );\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that the index page cannot be viewed by an anonymous user
public function testIndexFailNotLoggedIn() { $this->get($this->indexUrl); $this->assertRedirectContains(Router::url([ 'prefix' => false, 'controller' => 'Users', 'action' => 'login' ])); }
[ "public function testIndexUnauthenticated()\n {\n //$this->withoutExceptionHandling();\n $response = $this->get(route('loans.index'));\n\n $response->assertForbidden();\n }", "private function mustNotBeLoggedIn() {\n if(Session::exists(\"user\")) {\n // if logged in, redirect to index page\n Redirect::to(\"user/index\");\n }\n }", "public function testIndexFailNotAdmin()\n {\n $this->setUserSession();\n $this->get($this->indexUrl);\n $this->assertRedirect('/');\n }", "public function testHomePageForUnauthenticatedUsers()\n {\n $this->visit( '/home' )\n ->seePageIs( '/login' );\n }", "public function testViewUnknowUserAction()\n {\n $client = $this->getAdminLoggedClient();\n\n $client->request('GET', '/admin/users/0/view');\n $this->assertSame(404, $client->getResponse()->getStatusCode());\n }", "public function testHomePageForUnauthenticatedUsers()\n {\n $this->visit('/admin')\n ->seePageIs('/register');\n }", "public function testAdminPageIsInaccessibleForAnonymous() {\n $this->url('user/logout');\n $this->waitForPageToLoad(30000, SELENIUM_EXPECT_ERROR);\n\n $this->url('admin');\n $text = mock($this->byCssSelector('body'))->text();\n $this->assertTrue($text && strpos($text, 'Access denied') !== FALSE);\n }", "function xbmc_DenyAccessToSectionIfNoValidUser() {\n\tglobal $mybb;\n\tif (!$mybb->user || $mybb->user['uid'] <= 0) {\n\t\theader('HTTP/1.1 403 Forbidden');\n\t\terror('Sorry, only logged in users are allowed to access this page.');\n\t\texit;\n\t}\n}", "protected function access_denied() {\n\t\t\tshow_error('Access denied! You don\\'t have access to this page. Try ' . anchor('login', 'logging in') . '...');\t\n\t}", "public function test_anonymous_option_off_guest_user()\n {\n setting()->set('anonymous_urls', 0);\n\n $data = [\n 'url' => 'https://google.com',\n 'customUrl' => '',\n ];\n\n $this->post('/url', $data)\n ->assertStatus(403);\n }", "function unauthorizedUsersOnly(){\n global $authenticatedUser;\n if(!empty($authenticatedUser)){\n header(\"HTTP/1.1 403 Forbidden\");\n header('Location: https://eso.vse.cz/~frim00/marvelous-movies/');\n exit();\n }\n }", "public function testHomePageForUnauthenticatedUsers()\n {\n dump('testHomePageForUnauthenticatedUsers');\n $this->browse(function (Browser $browser) {\n $user = factory(\\App\\User::class)->create();\n view()->share('user', $user);\n $browser->visit('/home')\n ->pause(2000)\n ->assertPathIs('/login');\n });\n }", "public function testNonPrivilagedPages()\n {\n //action\n $return = $this->getJson('api/user/status')->error;\n\n //assert\n $this->assertEquals('Invalid Credentials', $return->message);\n $this->assertResponseStatus(401);\n }", "public function test_unauthenticated_user_cannot_hit_the_show_endpoint()\n {\n // First we create a test user\n $user = $this->createUser();\n\n // Then we hit the show endpoint\n $this->show($user->id)\n // Then we assert status is 401, since we are not authenticated\n ->assertStatus(401)\n // Then we assert the text Unauthenticated is present on response body\n ->assertSeeText('Unauthenticated');\n }", "public function testCannotAccessListWhenNotLoggedIn()\n {\n $user = User::factory()->create();\n $response = $this->get(route('users.items.index', [$user]));\n\n $response->assertRedirect('/login');\n }", "public function test_myTasks_index_authenticated_admin_403(){\n $this->signInAdmin();\n $response = $this->get(route('myTasks.index'));\n $response->assertStatus(403);\n }", "public function testUserCanNotViewTheCategoryIndex()\n {\n $this->_setupCategories();\n\n $response = $this->actingAs($this->user)->get(route('categories.index'));\n\n $response->assertStatus(403);\n }", "public function testBookListingDeniedForAnonymousUser()\n {\n // Arrange\n\n // Act\n $response = $this->get(\"/api/books/1/broken\");\n\n // Assert\n $response->assertStatus(302);\n }", "public function test_myTasks_index_authenticated_leader_returns_403(){\n $this->signInLeader();\n $response = $this->get(route('myTasks.index'));\n $response->assertStatus(403);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If GHIN provided, find all with that number. Ignore the name.
function GetChitsResultsByNameOrGhin($connection, $name, $ghin, $badkey1, $badkey2) { if($ghin !== 0){ $sqlCmd = "SELECT * FROM `Chits` WHERE `GHIN` = ? ORDER BY `Date` ASC"; $query = $connection->prepare ( $sqlCmd ); if (! $query) { die ( $sqlCmd . " prepare failed: " . $connection->error ); } if (! $query->bind_param ( 'i', $ghin)) { die ( $sqlCmd . " bind_param failed: " . $connection->error ); } } else { // If GHIN is not provided, find all with that name and with GHIN 0 $sqlCmd = "SELECT * FROM `Chits` WHERE `Name` = ? and `GHIN` = 0 ORDER BY `Date` ASC"; $query = $connection->prepare ( $sqlCmd ); if (! $query) { die ( $sqlCmd . " prepare failed: " . $connection->error ); } if (! $query->bind_param ( 's', $name)) { die ( $sqlCmd . " bind_param failed: " . $connection->error ); } } if (! $query->execute ()) { die ( $sqlCmd . " execute failed: " . $connection->error ); } $query->bind_result ( $key, $name, $GHIN, $score, $winnings, $flight, $place, $teamNumber, $date, $flightName); $chitsArray = Array(); while ( $query->fetch () ) { // Skip over tournaments with bad data if(($key != $badkey1) && ($key != $badkey2)){ $chits = new Chits(); $chits->TournamentKey = $key; $chits->Name = $name; $chits->GHIN = $GHIN; $chits->Score = $score; $chits->Winnings = $winnings; $chits->Flight = $flight; $chits->Place = $place; $chits->TeamNumber = $teamNumber; $chits->Date = $date; $chits->FlightName = $flightName; $chitsArray[] = $chits; } } $query->close(); return $chitsArray; }
[ "public function numberSeach($number) {\n /*$number = $number . '%';*/\n $query = $this->link->prepare(\"SELECT *\n FROM anime\n WHERE number = ?\");\n $query->bindValue(1, $number);\n\n try {\n $query->execute();\n return $this->returnAnime($query->fetchAll(), SORT_ASC, 'name');\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function searchNumbers( Request $request )\n {\n //return $request->all();\n\n $capabilities = $this->setSearchCapabilities( $request );\n\n // search by area codes and get available numbers for area code csv\n return $this->searchNumbersForCSV( $request->file( 'area_codes_file' ), 'area_code_csv', $request->number_type, $capabilities );\n }", "public function searchByDunsNumber($number)\n {\n\n $sql = 'SELECT * from `ccs_suppliers` \nWHERE duns_number = \\'' . $number . '\\' \nAND on_live_frameworks = TRUE ';\n\n return $this->findSingleRow($sql);\n }", "public function search_award_notice_number($search){\n\t\tglobal $conn;\n\t\t$query = $conn->query(\"SELECT * FROM phil_geps WHERE award_notice_number LIKE '$search' \");\n\t\treturn $query->fetchAll();\n\t}", "public function search_person_by_hn($hn)\r\n {\r\n $this->mongo_db->add_index('person', array('hn' => -1));\r\n $rs = $this->mongo_db\r\n ->where(array('hn' => (string) $hn))\r\n ->get('person');\r\n\r\n return $rs;\r\n }", "public function findGroupNumber()\n {\n $matches = static::$config;\n\n for ($len = 3; $len < 13; $len++) {\n $searchKey = substr($this->isbn, 0, $len);\n\n $matches = array_filter($matches, function($key) use ($searchKey) {\n return (false !== strstr($key, $searchKey));\n }, ARRAY_FILTER_USE_KEY);\n\n $count = count($matches);\n\n if ($count == 0) {\n return null;\n }\n\n if ($count == 1) {\n return substr($searchKey, 3);\n }\n }\n\n return null;\n }", "public function SearchIndividualNumberManager()\n {\n // Test user login\n $user = $this->testAccounts[\"org-manager\"];\n $this->browse(function ($browser) use ($user) {\n $browser->visit(new loginPage)\n ->loginUser($user['email'], $user['password'])\n ->pause(3000)\n ->assertSee('Welcome');\n\n // Skeletal elements search set up\n $browser->visit(new specimenPage)\n ->pause(5000)\n ->clear('@cora-search-options')\n ->type('@cora-search-options','Individual Number')\n ->pause(1000)\n ->keys('@cora-search-options', ['{ARROW_DOWN}'])\n ->keys('@cora-search-options', ['{ENTER}'])\n ->keys('@cora-search-options-individual-number','CIL 2003-116-I-136',['{ENTER}'])\n ->pause(1000)\n ->keys('@cora-search-options-individual-number',['{tab}'])\n ->press('@search-btn')\n ->pause(50000)\n // Search Result Assertions\n ->assertSee('Specimen search by Individual Number: CIL 2003-116-I-136')\n ->waitForLink('CIL 2003-116:G-01:X-234A:202')\n ->assertSeeLink('CIL 2003-116:G-01:X-234A:202')\n ->assertSee('Key')\n ->assertSee('Bone Group')\n ->assertSee('Bone')\n ->assertSee('Side')\n ->assertSee('DNA Sample Number')\n\n // Specimen Assertions\n ->clickLink('CIL 2003-116:G-01:X-234A:202')\n ->pause(1000)\n ->driver->switchTo()->window(collect($browser->driver->getWindowHandles())->last());\n\n $browser\n ->pause(1000)\n ->assertSee('CIL 2003-116:G-01:X-234A:202')\n ->assertVue('form.accession_number','CIL 2003-116', '@specimen')\n ->assertVue('form.provenance1','G-01', '@specimen')\n ->assertVue('form.provenance2','X-234A', '@specimen')\n ->assertInputValue('@designator', '202')\n ->assertVue('form.sb_id','37','@specimen')\n ->assertVue('form.side', 'Right', '@specimen')\n ->assertVue('form.completeness', 'Complete', '@specimen')\n ->assertVue('form.measured', true, '@specimen')\n ->assertVue('form.dna_sampled', true , '@specimen' )\n ->assertVue('form.isotope_sampled', null, '@specimen')\n ->assertVue('form.inventoried', true, '@specimen')\n ->assertVue('form.inventoried_at', null, '@specimen')\n ->assertVue('form.ct_scanned', true, '@specimen')\n ->assertVue('form.xray_scanned', null, '@specimen')\n ->assertVue('form.individual_number', 'CIL 2003-116-I-136', '@specimen')\n ->assertVue('form.tags', null, '@specimen')\n\n ->logoutUser();\n\n });\n }", "function get_number_by_name($name)\n\t{\n\t\treturn $this->call(\"InputFile.GetNumberByName?name=\".urlencode($name));\t\n\t}", "function get_name_by_number($number)\n\t{\n\t\treturn $this->call(\"SelectElement.GetNameByNumber?number=\".urlencode($number));\n\t}", "function hasNumber($tree, $number)\n{\n $result = search($tree, $number);\n return $result !== null;\n}", "function getIN($name)\n{\n global $in;\n\n foreach ($in as $item) {\n if (strpos($item, $name.'.in')){\n return $item;\n }\n }\n\n return null;\n}", "public function getPinByNumber($number);", "public function searchPhoneNumber($phonenumber){\r\n\t\t\r\n\t\t//See if the phonenumber is an array or a single phonenumber\r\n\t\tif(is_array($phonenumber)){\r\n\t\t\t$this->phonenumberarray = $phonenumber;\r\n\t\t} else{\r\n\t\t\t//Means the phone number is just 1 so we need to make it into an array;\r\n\t\t\t$this->phonenumberarray[0] = $phonenumber;\r\n\t\t}\r\n\t\tforeach($this->phonenumberarray as $phonenum){\r\n\t\t\t$cleanedupnumber = $this->cleanUpNumber($phonenum);\r\n\t\t\t$url = $this->constructURL($cleanedupnumber);\r\n\t\t\t$tempreturnarray = $this->sendCurl($url);\r\n\t\t\t$this->rawphoneapireturn = $tempreturnarray;\r\n\t\t\t\r\n\t\t\tif(!isset($tempreturnarray)) throw new Exception(\"There was an error in the curl process\");\r\n\t\t\tif($tempreturnarray['error'] != false) throw new Exception(\"There was an error in getting the phone number.-\" . $tempreturnarray['error_text']);\t\t\t\r\n\t\t\tif(count($tempreturnarray['results']) == 0) return false; //No matters were found.\r\n\t\t\t\r\n\t\t\tforeach($tempreturnarray['results'] as $case){\r\n\t\t\t\t//Saves the results to the numericarray.\r\n\t\t\t\t\r\n\t\t\t\t$exists = false;\r\n\t\t\t\tfor($x=0;$x<count($this->numericarray);$x++){\r\n\t\t\t\t\t//Checks to see if this case is already part of the raw return array.\r\n\t\t\t\t\tif($this->numericarray[$x]['id'] == $case['id']){\r\n\t\t\t\t\t\t$exists = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif($exists == false) $this->numericarray[] = $case;\r\n\t\t\t\t$this->matterarray[$case['id']['text_value']] = $case;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->numericarray;\r\n\t}", "public static function find_by_number($number) {\r\n return Doctrine::getTable ( 'PurchaseInvoices' )\r\n ->findOneBy ( 'number', $number );\r\n }", "public function testNumberSearching() {\n for ($i = 0; $i < count($this->numbers); $i++) {\n $node = $this->nodes[$i];\n\n // Verify that the node title does not appear on the search page\n // with a dummy search.\n $this->drupalGet('search/node');\n $this->submitForm(['keys' => 'foo'], 'Search');\n $this->assertSession()->pageTextNotContains($node->label());\n\n // Now verify that we can find node i by searching for any of the\n // numbers.\n for ($j = 0; $j < count($this->numbers); $j++) {\n $number = $this->numbers[$j];\n // If the number is negative, remove the - sign, because - indicates\n // \"not keyword\" when searching.\n $number = ltrim($number, '-');\n\n $this->drupalGet('search/node');\n $this->submitForm(['keys' => $number], 'Search');\n $this->assertSession()->pageTextContains($node->label());\n }\n }\n\n }", "function search_pack($ptrn)\n\t{\n\t\tif($ptrn[0]=='#')\n\t\t{\n\t\t\t$ptrn = substr($pname,1,strlen($ptrn)-1);\n\t\t\t$result = Array();\n\t\t\tforeach ($this->_PACKAGES as $pname => $p)\n\t\t\t{\n\t\t\t\tif($pname==$ptrn)\n\t\t\t\t\t$result[]=$p;\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = Array();\n\t\t\tforeach ($this->_PACKAGES as $pname => $p)\n\t\t\t{\n\t\t\t\tif(substr($pname,0,strlen($ptrn))==$ptrn)\n\t\t\t\t\t$result[]=$p;\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t}", "function z_get_number_by_name($name)\n\t{\n\t\treturn $this->call(\"$this->prefix.GetNumberByName?name=\".urlencode($name));\n\t}", "public function getGamesIn($in){\n\n $data = $this ->select()\n ->from($this->_name, array('id', 'title'))\n ->where('id IN (?)', $in)\n ->order('id DESC')\n ;\n\n return $data->query()->fetchAll();\n\n }", "function detect_number($number) {\n $number = str_replace(array('-', '.', ' '), '', $number);\n\n // $number is not a phone number\n if (!preg_match('/^(01[2689]|09)[0-9]{8}$/', $number)) {\n return false;\n }\n\n // Store all start number in an array to search\n $start_numbers = array_keys($this->carriers_number);\n\n foreach ($start_numbers as $start_number) {\n // if $start number found in $number then return value of $carriers_number array as carrier name\n if ($this->start_with($start_number, $number)) {\n return $this->carriers_number[$start_number];\n }\n }\n\n // if not found, return false\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the helper set.
public function getHelperSet();
[ "public function getHelperSet()\n {\n return $this->helperSet;\n }", "protected function getHelperSet()\n {\n $console = $this->getConsole();\n\n if (!$helperSet = $console->getHelperSet()) {\n $helperSet = new HelperSet();\n }\n\n return $helperSet;\n }", "protected function getDefaultHelperSet()\n {\n return new HelperSet($this->getDefaultHelpers());\n }", "protected function getDefaultHelperSet()\n {\n return new HelperSet();\n }", "protected function getDefaultHelperSet()\n {\n $helperSet = parent::getDefaultHelperSet();\n\n $helperSet->set(new DialogHelper());\n $helperSet->set(new SymfttpdHelper($this->getServerNames(), $this->getGatewayNames()));\n\n return $helperSet;\n }", "protected function getConsoleHelperSet()\n {\n /* @var DocumentManager $documentManager */\n $documentManager = $this->getManager();\n\n return new HelperSet([\n 'dm' => new CouchDBHelper($documentManager->getCouchDBClient(), $documentManager),\n ]);\n }", "public function getHelpers(): array\n {\n return $this->_helpers;\n }", "public function helpers()\n {\n return $this->helpers;\n }", "public function getHelpers()\n {\n return [\n ];\n }", "public function helpers()\n {\n if ($this->_helpers === null) {\n $this->_helpers = new HelperRegistry($this);\n }\n\n return $this->_helpers;\n }", "public static function createHelperSet(): HelperSet\n {\n $slimApp = SlimApp::createApplication();\n $slimAppContainer = $slimApp->getContainer();\n $slimAppCoreApp = $slimApp->getCoreApplication();\n\n return new HelperSet(\n [\n 'slimApp' => new SlimAppConsoleApplicationHelper($slimApp),\n 'slimAppContainer' => new SlimAppConsoleContainerHelper($slimAppContainer),\n 'slimAppCoreApp' => new SlimAppConsoleCoreApplicationHelper($slimAppCoreApp),\n ]\n );\n }", "public function helperRegistry(): HelperRegistry\n {\n return $this->helperRegistry;\n }", "protected function getFieldsetHelper()\n {\n if ( $this->fieldsetHelper )\n {\n return $this->fieldsetHelper;\n }\n\n if ( method_exists( $this->view, 'plugin' ) )\n {\n $this->fieldsetHelper = $this->view->plugin(\n $this->getDefaultFieldsetHelper()\n );\n }\n\n if ( ! $this->fieldsetHelper instanceof BaseAbstractHelper )\n {\n // @todo Ideally the helper should implement an interface.\n throw new RuntimeException(\n 'Invalid element helper set in FormCollection. ' .\n 'The helper must be an instance of AbstractHelper.'\n );\n }\n\n return $this->fieldsetHelper;\n }", "public function getHelper()\n {\n return $this->helper;\n }", "protected function getFieldsetHelper()\n {\n if ($this->fieldsetHelper !== null) {\n return $this->fieldsetHelper;\n }\n\n if (method_exists($this->view, 'plugin')) {\n $this->fieldsetHelper = $this->view->plugin('form_collection');\n }\n\n if (! $this->fieldsetHelper instanceof FormCollectionHelper) {\n $this->fieldsetHelper = new FormCollectionHelper();\n }\n\n return $this->fieldsetHelper;\n }", "protected function getFieldsetHelper()\n {\n if ($this->fieldsetHelper) {\n return $this->fieldsetHelper;\n }\n\n if (method_exists($this->view, 'plugin')) {\n $this->fieldsetHelper = $this->view->plugin($this->defaultFieldsetHelper);\n }\n\n if (!$this->fieldsetHelper instanceof AbstractHelper) {\n // @todo Ideally the helper should implement an interface.\n \t throw InvalidHelperException::invalidHelperInstance($this->fieldsetHelper);\n }\n\n return $this->fieldsetHelper;\n }", "public function get_sets( ) {\n\t\treturn $this->_sets;\n\t}", "protected function getHelper()\n {\n return $this->get('netmafia_holycrud.helper');\n }", "protected function helpersList()\n {\n return array(\n 'l10n' => array($this, 'localizationHelper'),\n 'extends' => array($this, 'extendsHelper'),\n 'block' => array($this, 'blockHelper'),\n 'override' => array($this, 'overrideHelper'),\n 'ifOverridden' => array($this, 'ifOverriddenHelper'),\n 'unlessOverridden' => array($this, 'unlessOverriddenHelper'),\n 'ifEqual' => array($this, 'ifEqualHelper'),\n 'ifAny' => array($this, 'ifAnyHelper'),\n 'ifEven' => array($this, 'ifEvenHelper'),\n 'ifOdd' => array($this, 'ifOddHelper'),\n 'generatePagination' => array($this, 'generatePaginationHelper'),\n 'jsString' => array($this, 'jsStringHelper'),\n 'repeat' => array($this, 'repeatHelper'),\n 'replace' => array($this, 'replaceHelper'),\n 'formatDate' => array($this, 'formatDateHelper'),\n 'formatDateDiff' => array($this, 'formatDateDiffHelper'),\n 'cutString' => array($this, 'cutStringHelper'),\n 'csrfTokenInput' => array($this, 'csrfTokenInputHelper'),\n 'csrfTokenInUrl' => array($this, 'csrfTokenInUrlHelper'),\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Defining a abstract function to calculate agents profit because it depends according to the type of property and this function is clearly defined in the subclasses according to the commision rates
abstract public function calculate_agents_Profit();
[ "public function calculateProfit() {\n $this->profit = static::profit_initial;\n $this->addAttachmentsProfit();\n $this->calculatePlusProfit();\n return $this->profit;\n }", "abstract protected function calculatePrice();", "abstract public function calculateCost();", "abstract public function calculate();", "abstract protected function getProductAmountNew(): float;", "public function profit()\n {\n return ($this->value * $this->revenue) / 100;\n }", "abstract protected function getDeductableIncome();", "public function profit() : void {\n\t\techo ($this->price - $this->cost);\n\t}", "function default_inspection_price_estimate($propertyType){\n require_once(__DIR__ . '/include/repository/supplier-repository.php');\n $supplierResult = mysqli_fetch_array(get_default_supplier_by_type('INSPECTION'));\n return calculate_inspection_price_estimate($propertyType, $supplierResult);\n }", "public function calculatePlusProfit() {\n usort($this->plusProfit, array(\"BaseMarket\", \"sortPlusProfit\"));\n foreach ($this->plusProfit as $key => $object) {\n $newProfit = $object->calculateProfit($this->getProfit());\n $this->profit = $newProfit;\n }\n }", "public function calculateGrossIncome($param){\n //Get Basic Salary\n $basicSalary= $param['basic_salary'];\n // set jkm\n $jkmReguler=$param['basic_salary']*$param['list_company_regulation']->jkm/100;\n // set JKK base on company jkk_type and always have\n $jkkReguler=$param['basic_salary']*$param['jkk']/100;\n // set bpjsKcompany\n $valueBpjsk=$param['basic_salary'];\n\n if($param['basic_salary']>$param['list_company_regulation']->max_salary_bpjsk){\n $valueBpjsk=$param['list_company_regulation']->max_salary_bpjsk;\n }\n $bpjskCompanyReguler=$valueBpjsk*$param['list_company_regulation']->bpjsk_company/100;\n $bpjskEmployeeReguler=$valueBpjsk*$param['list_company_regulation']->bpjsk_employee/100;\n // $allowanceReguler belum ada sedia tempat dulu;\n\n $session=session()->get('payroll_component.'.$param['employee_id']);\n $allowanceAtSession = $deductionAtSession = $length = 0; //for taxable\n $allowanceAtSessionNT = $deductionAtSessionNT = 0; //for nontaxable\n if(sizeof($session)){\n $length=sizeof($session['payroll_name']);\n }\n\n //taxable\n for($i=0;$i<$length;$i++){\n //\n if($session['payroll_type'][$i] == 'allowance_t') $allowanceAtSession .= $session['payroll_amount'][$i];\n else if($session['payroll_type'][$i] == 'allowance_nt') $allowanceAtSessionNT.= $session['payroll_amount'][$i];\n else if($session['payroll_type'][$i] == 'deduction_t') $deductionAtSession .= $session['payroll_amount'][$i];\n else if($session['payroll_type'][$i] == 'deduction_nt') $deductionAtSessionNT .= $session['payroll_amount'][$i];\n }\n $allowanceReguler=PayrollComponentEmployee::getAllowanceEmployee($param['employee_id'], null, Constant::COMP_TYPE_TAXABLE) + $allowanceAtSession;\n $deductionReguler=PayrollComponentEmployee::getDeductionEmployee($param['employee_id'], null, Constant::COMP_TYPE_TAXABLE) + $deductionAtSession;\n\n $allowanceNT = PayrollComponentEmployee::getAllowanceEmployee($param['employee_id'], null, Constant::COMP_TYPE_NONTAXABLE) + $allowanceAtSessionNT;\n $deductionNT = PayrollComponentEmployee::getDeductionEmployee($param['employee_id'], null, Constant::COMP_TYPE_NONTAXABLE) + $deductionAtSessionNT;\n\n // grossMonthlyReguler\n $grossMonthlyReguler = ($basicSalary + $jkkReguler + $jkmReguler + $bpjskCompanyReguler + $allowanceReguler) - ($deductionReguler);\n\n\n return ['grossMonthlyReguler'=>$grossMonthlyReguler\n ,'jkmReguler'=>$jkmReguler\n ,'jkkReguler'=>$jkkReguler\n ,'bpjskCompanyReguler'=>$bpjskCompanyReguler\n ,'bpjskEmployeeReguler'=>$bpjskEmployeeReguler\n ,'allowanceReguler'=>$allowanceReguler\n ,'deductionReguler'=>$deductionReguler\n ,'allowanceNT'=>$allowanceNT\n ,'deductionNT'=>$deductionNT];\n }", "public function getProfit()\n {\n return $this->profit;\n }", "protected function calculatePrices()\n {\n }", "public function calcularCosto()\n {\n return parent::calcularCosto() * 0.12;\n }", "public function getGrossTotal(): float;", "public function profit_calculation(\n $exch_achat_btc,\n $exch_vente_btc,\n $selling_btc_price, //Low price : we should buy\n $buying_btc_price, //High price : we should sell\n $max_quantity_btc,\n $hors_frais_fixe\n ){\n //Get the required information\n $f_sell = $this->get_exchanges()[$exch_achat_btc]->get_f_sell();\n $f_buy = $this->get_exchanges()[$exch_vente_btc]->get_f_buy();\n $btc_transfert_cost = $this->get_exchanges()[$exch_achat_btc]->get_btc_transfert_cost();\n $usdt_transfert_cost = $this->get_exchanges()[$exch_vente_btc]->get_usdt_transfert_cost();\n \n //Formula detailed in white paper\n if($hors_frais_fixe==0){\n return (1-$f_buy)*$buying_btc_price*$max_quantity_btc - (1-$f_sell)*$selling_btc_price*$max_quantity_btc - $selling_btc_price*$btc_transfert_cost - $usdt_transfert_cost;\n }\n else{\n return (1-$f_buy)*$buying_btc_price*$max_quantity_btc - (1-$f_sell)*$selling_btc_price*$max_quantity_btc;\n }\n }", "abstract function calculate_final_grade();", "abstract protected function calculate($value, $discountValue);", "public function calculateProfitability()\n {\n if (!$this->criminalInfo) {\n return 0.0;\n }\n\n $reward = $this->criminalInfo->getReward();\n $dangerPoints = $this->criminalInfo->getDangerPoints();\n\n return floatval($reward) / floatval($dangerPoints);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of codpermission.
public function setCodpermission($codpermission) { $this->codpermission = $codpermission; }
[ "public function setPermission($permission);", "public function setPermission($value);", "function setPermission( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get();\n $this->Permission = $value;\n }", "public function setPermission($permission): void\n {\n $this->permission = $permission;\n }", "public function permission( $permission );", "public function setManageOrderApprovalPermission($permission);", "public function setPermissionId(?string $value): void {\n $this->getBackingStore()->set('permissionId', $value);\n }", "public function setPermissionGranted();", "function setReadPermission( $value )\r\n {\r\n switch ( $value )\r\n {\r\n case \"User\":\r\n {\r\n $value = 1;\r\n }\r\n break;\r\n\r\n case \"Group\":\r\n {\r\n $value = 2;\r\n }\r\n break;\r\n\r\n case \"All\":\r\n {\r\n $value = 3;\r\n }\r\n break;\r\n\r\n default:\r\n $value = 1;\r\n }\r\n\r\n $this->ReadPermission = $value;\r\n }", "public function setPermissionDenied();", "public function change_permission()\r\n {\r\n // TODO: Can we not move this into the constructor??\r\n $this->block_none_ajax();\r\n \r\n // Get all submitted data\r\n $group_id = $this->input->post('group_id');\r\n $resource_id = $this->input->post('resource_id');\r\n $action_id = $this->input->post('action_id');\r\n $permission = $this->input->post('permission');\r\n\r\n $action_msg = $action_id === false ? '' : ' and action ' . $action_id;\r\n log_message('debug',sprintf('Changing the permission for group `%s` to access resource `%s`%s to `%s`', $group_id, $resource_id, $action_msg, $permission));\r\n\r\n // Validate the values\r\n if($group_id === false || !is_numeric($group_id))\r\n {\r\n $this->ajax_error(lang('access_invalid_group_id'));\r\n }\r\n else if($resource_id === false || !is_numeric($resource_id))\r\n {\r\n $this->ajax_error(lang('access_invalid_resource_id'));\r\n }\r\n else if ( ! in_array($permission, $this->allowed_permissions))\r\n {\r\n $this->ajax_error(lang('access_invalid_permission'));\r\n }\r\n\r\n $this->load->model('access_model');\r\n\r\n try\r\n {\r\n // Grant/Revoke the user depending on the permission value\r\n switch($permission)\r\n {\r\n case 'allow':\r\n $this->access_model->grant_access($group_id, $resource_id, $action_id);\r\n break;\r\n\r\n case 'deny':\r\n $this->access_model->revoke_access($group_id, $resource_id, $action_id);\r\n break;\r\n }\r\n }\r\n catch (Exception $ex)\r\n {\r\n $this->ajax_error(lang('access_unable_to_change_permission'));\r\n }\r\n }", "function updatePermission($permission, $value){\n\t\tif($this->type() != self::$SYSTEM){\n\t\t\tthrow new Exception(\"cannot change a permission of a non SYSTEM group\");\n\t\t}\n\t\t$argGroupId = $this->getId();\n\t\t// if the loggedinuser is allowed to change permissions\n\t\tif($this->avalanche->hasPermissionHuh($this->avalanche->loggedInHuh(), \"change_permissions\")){\n\t\t\t$sql = \"UPDATE \" . $this->avalanche->PREFIX() . \"usergroups SET $permission = \\\"$value\\\" WHERE id = \\\"$argGroupId\\\"\";\n\t\t\t$result = $this->avalanche->mysql_query($sql);\n\t\t\tif(!mysql_error()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function edit(Permission $permission) {\r\n\t\t$stmt = $this->db->prepare(\"UPDATE permiso set id_controlador=?, id_accion=? where id_permiso=?\");\r\n\t\t$stmt->execute(\r\n\t\t\tarray(\r\n\t\t\t\t\t$permission->getController()->getCodcontroller(), \r\n\t\t\t\t\t$permission->getAction()->getCodaction(), \r\n\t\t\t\t\t$permission->getCodpermission()\r\n\t\t\t\t)\r\n\t\t);\r\n\t}", "public function setAccountAddressBookModificationPermission($permission);", "public function setCheckoutOrderApprovalPermission($permission);", "function permission(){\r\n\t\t$role_id=decodeId($this->uri->segment(4,null));\r\n\t\tif($role_id==null){\t\t\t\t\t\t\t\t\t// if Id is empty\r\n\t\t\tredirect(\"admincms/roles/\");\t\t\r\n\t\t}\r\n\t\t$data['site_title'] = \"Set Permission\";\r\n\t\t$data['role_id']=$role_id;\r\n\t\t$this->load->view(\"admincms/role/permission\",$data);\r\n\t}", "function setPermissionFileId($fileId) {\n\t\t$this->setData('permissionFileId', $fileId);\n\t}", "public function updateFolderPermission($path, $permission) {\n $ret = chmod($path,$permission);\n\n if ($ret === true) {\n $oct = decoct($permission);\n $this->_log->log(LogLevel::info, \"Permissions set to {$oct} for: {$path}\\n\");\n } else {\n $this->_log->log(LogLevel::info, \"Permissions could not be set for: {$path}\\n\");\n }\n }", "public function setPermissions()\n\t{\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates FMeasure as ((1 + Beta^2) P R) / (Beta^2 P + R)
public function fMeasure($p, $r, $beta = 1) { if ($beta == 1) { return (2 * $p * $r) / ($p + $r); } else { return ((1 + pow($beta, 2)) * $p * $r) / (pow($beta, 2) * $p + $r); } }
[ "public function getF()\n {\n if (isset($this->f)) {\n return $this->f;\n }\n\n if (isset($this->b)) {\n // f = (a-b)/a\n return ($this->a - $this->b) / $this->a;\n }\n\n if (isset($this->rf)) {\n // r = 1/rf\n return 1 / $this->rf;\n }\n }", "function getFcalc($X, $Y) { \n $variancex=$this->sd($X)*$this->sd($X); \n $variancey=$this->sd($Y)*$this->sd($Y); \n $maxim=max($variancex,$variancey); \n $minim=min($variancex,$variancey); \n $fcalc=$maxim/$minim; \n return $fcalc; \n }", "public function getRF()\n {\n if (isset($this->rf)) {\n return $this->rf;\n }\n\n if (isset($this->b)) {\n // rf = a/(a-b)\n return $this->a / ($this->a - $this->b);\n }\n\n if (isset($this->f)) {\n // rf = 1/f\n return 1 / $this->f;\n }\n }", "public function getMeasure();", "public function Fuzzification($P=0.0) {\r\n\t\r\n if (($P<$this->FA) OR ($P>$this->FB)) return 0; //P is out this segment...\r\n\r\n\tif ($P==$this->FMiddle) return 1;\r\n\r\n\t if ($this->FType==LINFINITY) {\r\n\t if ($P<=$this->FMiddle) return 1;\r\n\t\tif (($P>$this->FMiddle) AND ($P<$this->FB)) return ($this->FB-$P)/($this->FB-$this->FMiddle);\r\n\t }\r\n\t\r\n\t if ($this->FType==RINFINITY) {\r\n\t if ($P>=$this->FMiddle) return 1;\r\n\t\tif (($P<$this->FMiddle) AND ($P>$this->FA)) return ($P-$this->FA)/($this->FMiddle-$this->FA);\r\n\t }\r\n\r\n\tif ($this->FType==TRIANGLE) {\r\n\t if(($P<$this->FMiddle) AND ($P>$this->FA)) return ($P-$this->FA)/($this->FMiddle-$this->FA);\r\n\t if(($P>$this->FMiddle) AND ($P<$this->FB)) return ($this->FB-$P)/($this->FB-$this->FMiddle);\r\n\t }\r\n\r\n\t if ($this->FType==TRAPEZOID) {\r\n\t if(($P<$this->FMiddle[0]) AND ($P>$this->FA)) return ($P-$this->FA)/($this->FMiddle[0]-$this->FA);\r\n\t if(($P>$this->FMiddle[1]) AND ($P<$this->FB)) return ($this->FB-$P)/($this->FB-$this->FMiddle[1]);\r\n\t if (($P>=$this->FMiddle) and ($P<=$this->FMiddle)) return 1;\r\n\t }\r\n\treturn 0;\r\n}", "protected function getFeeByDimension(): float\n {\n return $this->product->width *\n $this->product->height *\n $this->product->depth *\n $this->coefficients['dimension'];\n }", "public function getMortalityRate() : float\n {\n return ($this->raw_data['died'] / $this->raw_data['lived']) * 100;\n }", "function FVIF($rate, $nper) {\n\t\treturn (pow(1 + $rate, $nper));\n\t}", "public function getPerformance(){\n \n if ($this->targetValue == 0 || $this->endtermValue == 0) {\n return 0;\n } else {\n return (($this->endtermValue-$this->targetValue)/$this->targetValue);\n }\n }", "private function calculateRf()\n\t{\n\t\t//rapid fire\n\t\t$tmpshots = round($this->getShotsFromOneAttackerShipOfType($this->attackerShipType) * $this->attackerShipType->getCount());\n\n\t\t\\log_var('$tmpshots',$tmpshots);\n\n\t\t$this->power += $tmpshots * $this->attackerShipType->getPower();\n\t\t$this->shots += $tmpshots;\n\t}", "private function calculateRf()\n {\n //rapid fire\n $tmpshots = round($this->getShotsFromOneAttackerShipOfType($this->attackerShipType) * $this->attackerShipType->getCount());\n log_var('$tmpshots',$tmpshots);\n $this->power += $tmpshots * $this->attackerShipType->getPower();\n $this->shots += $tmpshots;\n\n /* old way\n $tmpshots = round($this->getShotsFromOneAttackerShipOfType($this->attackerShipType) * $this->attackerShipType->getCount());\n if (self::SPEEDSIM && $tmpshots == 0)\n {\n $tmpshots = $this->attackerShipType->getCount();\n }\n $this->power += $tmpshots * $this->attackerShipType->getPower();\n $this->shots += $tmpshots;\n */\n }", "public function getFpr()\n {\n return $this->fpr;\n }", "public function getMedianFitness(): float;", "public function getMeasure()\n {\n return $this->measure;\n }", "public function gamma(): float {\n\t\t\t\n\t\t\t//return phi($this->d1())/($this->S*$this->s*sqrt($this->t));\n\t\t\t\n\t\t\treturn ($this->vega() / $this->S) * (1 - $this->d1()/($this->s * sqrt($this->t)));\n\t\t}", "public function Fuzzification( $P = 0.0 )\n {\n\n if( ($P < $this->FA) OR ( $P > $this->FB) ) return 0; //P is out this segment...\n\n if( $P == $this->FMiddle ) return 1;\n\n if( $this->FType == LINFINITY )\n {\n if( $P <= $this->FMiddle ) return 1;\n if( ($P > $this->FMiddle) AND ( $P < $this->FB) ) return ($this->FB - $P) / ($this->FB - $this->FMiddle);\n }\n\n if( $this->FType == RINFINITY )\n {\n if( $P >= $this->FMiddle ) return 1;\n if( ($P < $this->FMiddle) AND ( $P > $this->FA) ) return ($P - $this->FA) / ($this->FMiddle - $this->FA);\n }\n\n if( $this->FType == TRIANGLE )\n {\n if( ($P < $this->FMiddle) AND ( $P > $this->FA) ) return ($P - $this->FA) / ($this->FMiddle - $this->FA);\n if( ($P > $this->FMiddle) AND ( $P < $this->FB) ) return ($this->FB - $P) / ($this->FB - $this->FMiddle);\n }\n\n if( $this->FType == TRAPEZOID )\n {\n if( ($P < $this->FMiddle[0]) AND ( $P > $this->FA) ) return ($P - $this->FA) / ($this->FMiddle[0] - $this->FA);\n if( ($P > $this->FMiddle[1]) AND ( $P < $this->FB) ) return ($this->FB - $P) / ($this->FB - $this->FMiddle[1]);\n if( ($P >= $this->FMiddle[0]) AND ( $P <= $this->FMiddle[1]) ) return 1;\n }\n return 0;\n }", "public function percentageOps(): Float\n {\n return $this->countOps / $this->countStudent * 100;\n }", "public function getFillingPercentage();", "public function calcularFrecuencia($tiempo, $num_carros, $patio, $max_espera){\n $frecuencia=($tiempo/$num_carros)+$patio;\n $frecuencia=intval($frecuencia);\n return$frecuencia;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parcing the initialization vector key
public function set_init_vector_key($iv) { $this->init_vector_key = $iv; }
[ "public function getConstructorParam($key);", "protected function initialiseKeyVars() {\n\t}", "public function getInitKey()\n {\n return $this->initKey;\n }", "public function setupKey()\n\t{\n\t\tif(func_num_args() == 0)\n\t\t\tthrow new StashError('No key sent to the cache constructor.');\n\n\t\t$key = func_get_args();\n\t\tif(count($key) == 1 && is_array($key[0]))\n\t\t\t$key = $key[0];\n\n\t\t$this->key = array_map('strtolower', $key);\n\t\t$this->keyString = implode(':::', $this->key);\n\t}", "private function initializeKey() : void\n {\n $this->namespace = Uuid::uuid5($this->instanceKey, $this->key);\n $this->crypto = new AES256GCM($this->key->toString());\n }", "public function __construct($keyNumber = null) { }", "public function __construct($key)\n {\n $this->key = $key;\n }", "function __construct($iv, $key = null) {\n if (is_string($key)) {\n $this->key = $key;\n }\n $this->iv = $iv;\n }", "private function _initialize() {\n $params = $this->getParameters();\n if ( $params !== null ) {\n for($i = 0, $_i=count($params) ; $i < $_i ; $i++) {\n if ( self::PREFIX_KEY == $params[$i]->getName() ) {\n $this->_prefix = (string) $params[$i]->getValue();\n break;\n }\n }\n }\n }", "function __construct($iv, $key = null) {\n\n if (is_string($key)) {\n $this->key = $key;\n }\n\n $this->iv = $iv;\n }", "private function validateFirstArgsKeyValue()\n {\n self::ensureArgument(\n $this->firstArg === $this->config->getScriptName(),\n 'invalid input arguments'\n );\n }", "function __construct($iv = null, $key = null,\n $hash_iv=true, $hash_key=true) {\n\n $this->input_key = $key;\n\n if (!empty($key)) {\n $this->key = $key;\n }\n\n if ($hash_key) {\n $this->key = substr(hash('sha256', $this->key), 0, 32);\n }\n\n $this->input_iv = $iv;\n\n if (!empty($iv)) {\n $this->iv = $iv;\n } else {\n $this->iv = openssl_random_pseudo_bytes(16);\n }\n\n if ($hash_iv) {\n $this->iv = substr(hash('sha256', $this->iv), 0, 16);\n }\n }", "private function getInitializationVector()\n {\n $ivSize = openssl_cipher_iv_length($this->getCipherMethod());\n return openssl_random_pseudo_bytes($ivSize);\n }", "abstract function mapParamToKeys();", "public function getInitVector(): ?string\n {\n return $this->initVector;\n }", "public function getParameterKeys(): array;", "public function __construct($key) \n {\n $this->key = (string) $key;\n parent::__construct();\n }", "function _setupKey()\n {\n if (isset($this->kl['key']) && $this->key === $this->kl['key']) {\n // already expanded\n return;\n }\n $this->kl = array('key' => $this->key);\n\n /* Key expanding and generating the key-depended s-boxes */\n $le_longs = unpack('V*', $this->key);\n $key = unpack('C*', $this->key);\n $m0 = $this->m0;\n $m1 = $this->m1;\n $m2 = $this->m2;\n $m3 = $this->m3;\n $q0 = $this->q0;\n $q1 = $this->q1;\n\n $K = $S0 = $S1 = $S2 = $S3 = array();\n\n switch (strlen($this->key)) {\n case 16:\n list($s7, $s6, $s5, $s4) = $this->_mdsrem($le_longs[1], $le_longs[2]);\n list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[3], $le_longs[4]);\n for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {\n $A = $m0[$q0[$q0[$i] ^ $key[ 9]] ^ $key[1]] ^\n $m1[$q0[$q1[$i] ^ $key[10]] ^ $key[2]] ^\n $m2[$q1[$q0[$i] ^ $key[11]] ^ $key[3]] ^\n $m3[$q1[$q1[$i] ^ $key[12]] ^ $key[4]];\n $B = $m0[$q0[$q0[$j] ^ $key[13]] ^ $key[5]] ^\n $m1[$q0[$q1[$j] ^ $key[14]] ^ $key[6]] ^\n $m2[$q1[$q0[$j] ^ $key[15]] ^ $key[7]] ^\n $m3[$q1[$q1[$j] ^ $key[16]] ^ $key[8]];\n $B = ($B << 8) | ($B >> 24 & 0xff);\n $K[] = $A+= $B;\n $K[] = (($A+= $B) << 9 | $A >> 23 & 0x1ff);\n }\n for ($i = 0; $i < 256; ++$i) {\n $S0[$i] = $m0[$q0[$q0[$i] ^ $s4] ^ $s0];\n $S1[$i] = $m1[$q0[$q1[$i] ^ $s5] ^ $s1];\n $S2[$i] = $m2[$q1[$q0[$i] ^ $s6] ^ $s2];\n $S3[$i] = $m3[$q1[$q1[$i] ^ $s7] ^ $s3];\n }\n break;\n case 24:\n list($sb, $sa, $s9, $s8) = $this->_mdsrem($le_longs[1], $le_longs[2]);\n list($s7, $s6, $s5, $s4) = $this->_mdsrem($le_longs[3], $le_longs[4]);\n list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[5], $le_longs[6]);\n for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {\n $A = $m0[$q0[$q0[$q1[$i] ^ $key[17]] ^ $key[ 9]] ^ $key[1]] ^\n $m1[$q0[$q1[$q1[$i] ^ $key[18]] ^ $key[10]] ^ $key[2]] ^\n $m2[$q1[$q0[$q0[$i] ^ $key[19]] ^ $key[11]] ^ $key[3]] ^\n $m3[$q1[$q1[$q0[$i] ^ $key[20]] ^ $key[12]] ^ $key[4]];\n $B = $m0[$q0[$q0[$q1[$j] ^ $key[21]] ^ $key[13]] ^ $key[5]] ^\n $m1[$q0[$q1[$q1[$j] ^ $key[22]] ^ $key[14]] ^ $key[6]] ^\n $m2[$q1[$q0[$q0[$j] ^ $key[23]] ^ $key[15]] ^ $key[7]] ^\n $m3[$q1[$q1[$q0[$j] ^ $key[24]] ^ $key[16]] ^ $key[8]];\n $B = ($B << 8) | ($B >> 24 & 0xff);\n $K[] = $A+= $B;\n $K[] = (($A+= $B) << 9 | $A >> 23 & 0x1ff);\n }\n for ($i = 0; $i < 256; ++$i) {\n $S0[$i] = $m0[$q0[$q0[$q1[$i] ^ $s8] ^ $s4] ^ $s0];\n $S1[$i] = $m1[$q0[$q1[$q1[$i] ^ $s9] ^ $s5] ^ $s1];\n $S2[$i] = $m2[$q1[$q0[$q0[$i] ^ $sa] ^ $s6] ^ $s2];\n $S3[$i] = $m3[$q1[$q1[$q0[$i] ^ $sb] ^ $s7] ^ $s3];\n }\n break;\n default: // 32\n list($sf, $se, $sd, $sc) = $this->_mdsrem($le_longs[1], $le_longs[2]);\n list($sb, $sa, $s9, $s8) = $this->_mdsrem($le_longs[3], $le_longs[4]);\n list($s7, $s6, $s5, $s4) = $this->_mdsrem($le_longs[5], $le_longs[6]);\n list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[7], $le_longs[8]);\n for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {\n $A = $m0[$q0[$q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]] ^ $key[ 9]] ^ $key[1]] ^\n $m1[$q0[$q1[$q1[$q0[$i] ^ $key[26]] ^ $key[18]] ^ $key[10]] ^ $key[2]] ^\n $m2[$q1[$q0[$q0[$q0[$i] ^ $key[27]] ^ $key[19]] ^ $key[11]] ^ $key[3]] ^\n $m3[$q1[$q1[$q0[$q1[$i] ^ $key[28]] ^ $key[20]] ^ $key[12]] ^ $key[4]];\n $B = $m0[$q0[$q0[$q1[$q1[$j] ^ $key[29]] ^ $key[21]] ^ $key[13]] ^ $key[5]] ^\n $m1[$q0[$q1[$q1[$q0[$j] ^ $key[30]] ^ $key[22]] ^ $key[14]] ^ $key[6]] ^\n $m2[$q1[$q0[$q0[$q0[$j] ^ $key[31]] ^ $key[23]] ^ $key[15]] ^ $key[7]] ^\n $m3[$q1[$q1[$q0[$q1[$j] ^ $key[32]] ^ $key[24]] ^ $key[16]] ^ $key[8]];\n $B = ($B << 8) | ($B >> 24 & 0xff);\n $K[] = $A+= $B;\n $K[] = (($A+= $B) << 9 | $A >> 23 & 0x1ff);\n }\n for ($i = 0; $i < 256; ++$i) {\n $S0[$i] = $m0[$q0[$q0[$q1[$q1[$i] ^ $sc] ^ $s8] ^ $s4] ^ $s0];\n $S1[$i] = $m1[$q0[$q1[$q1[$q0[$i] ^ $sd] ^ $s9] ^ $s5] ^ $s1];\n $S2[$i] = $m2[$q1[$q0[$q0[$q0[$i] ^ $se] ^ $sa] ^ $s6] ^ $s2];\n $S3[$i] = $m3[$q1[$q1[$q0[$q1[$i] ^ $sf] ^ $sb] ^ $s7] ^ $s3];\n }\n }\n\n $this->K = $K;\n $this->S0 = $S0;\n $this->S1 = $S1;\n $this->S2 = $S2;\n $this->S3 = $S3;\n }", "abstract protected function getInitialParameters();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo che ritorna l'operatore OR
function getOp() { return "OR"; }
[ "public function _or() {\n \treturn $this->_binOp('or');\n }", "public function or()\n\t{\n\t}", "public function opOR() {\n\t\treturn 'OR';\n\t}", "public function _or()\n {\n return $this->addOperator(OperadorLogico::o);\n }", "abstract protected function perform_or($first, $second);", "public function getType() { return 'or'; }", "protected static function logicalOR(){\n\t\t$values = func_get_args();\n\t\tif(is_array($values[0])){\n\t\t\t$values = $values[0];\n\t\t}\n\t\treturn self::junction('OR', $values);\n\t}", "public function orWhere();", "public function getOr()\n {\n return $this->Or;\n }", "public function metaQueryRelation_OR(){\n return $this->metaQueryRelation('OR');\n }", "protected function _or()\n\t{\n\t\t$targetRegister = $this->_getTargetRegister();\n\t\t$value1 = $this->_getNextInstruction();\n\t\t$value2 = $this->_getNextInstruction();\n\n\t\t$result = $value1 | $value2;\n\t\t$this->_setRegister($targetRegister, $result);\n\t}", "function _OR_($args) {\n\t$q = false;\n\t$args = func_get_args(); \n\n\tif (is_array($args[0]) && sizeof($args)) {\n\t\t// trying to pass as array of args\n\t\t$args = $args[0];\n\t\tif (!sizeof($args))\n\t\t\tthrow new Exception(\"Cannot create _OR_ expression without arguments.\");\n\t}\n\n\tforeach($args as $arg)\n\t\tif (!$q)\n\t\t\t$q = new Q($arg);\n\t\telse\n\t\t\t$q = $q->add(new Q($arg), \"|\");\n\n\treturn $q;\n}", "public function isOr()\n {\n return ($this->keyword === 'OR' ? true : false);\n }", "function and_or()\n {\n $posWhere = strpos(strtolower($this->comando), \"where\");\n if (FALSE === $posWhere)\n {\n $this->comando .= \" where \";\n $this->comando_sum .= \" and \";\n }\n if ($this->comando_ini == \"ini\")\n {\n if (FALSE !== $posWhere)\n {\n $this->comando .= \" and ( \";\n $this->comando_sum .= \" and ( \";\n $this->comando_fim = \" ) \";\n }\n $this->comando_ini = \"\";\n }\n elseif (\"or\" == $this->NM_operador)\n {\n $this->comando .= \" or \";\n $this->comando_sum .= \" or \";\n $this->comando_filtro .= \" or \";\n }\n else\n {\n $this->comando .= \" and \";\n $this->comando_sum .= \" and \";\n $this->comando_filtro .= \" and \";\n }\n }", "function db_or() {\n return new DatabaseCondition('OR');\n}", "public function orConditionGroup();", "private function logicalOR($leftOperand, $rightOperand) {\n return $leftOperand OR $rightOperand;\n }", "public function orOperatorAction() {\n\t\t$this->_conjunctions [] = $this->_currentConjunction;\n\t\t$this->_currentConjunction = array ();\n\t}", "public function whereOR()\n {\n $this->where_clause .= \" OR \";\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes an Event Subscriber.
public function unsubscribe(Subscriber $subscriber);
[ "public function removeEventSubscriber(IEventSubscriber $subscriber);", "public function removeEventSubscriber(EventSubscriber $subscriber)\n {\n $this->removeEventListener($subscriber->getSubscribedEvents(), $subscriber);\n }", "public function removeEventSubscriber($subscriber)\n {\n if (is_object($subscriber)) {\n $this->getInst()->removeEventSubscriber($subscriber);\n unset($this->_eventSubscriberInstances['hash-' . spl_object_hash($subscriberInst)]);\n } else {\n $this->getInst()->removeEventSubscriber($this->_eventSubscriberInstances[$subscriber]);\n unset($this->_eventSubscriberInstances[$subscriber]);\n }\n }", "function removeSubscriber(Subscriber $subscriber): void {}", "public function removeSubscriber(EventSubscriberInterface $subscriber)\n {\n // TODO: Implement removeSubscriber() method.\n }", "public function removeSubscriber(EventSubscriberInterface $subscriber): EventDispatcherInterface;", "public function removeEventListener(EventListener $eventListener);", "public function unsubscribe(SubscriberContract $subscriber);", "public function removeListener($eventName, $listener);", "public function removeListener($event, $listener);", "public function removeListener( $eventName, IListener $listener );", "public function removeEvent($eventName);", "public function unSubscribe(string $type, SubscriberInterface $subscriber): void;", "public function unsubscribe($event, $callback);", "public function removeAllListeners($event);", "public function removeAllListeners($event = null);", "public function removeAllListeners(string $event): EventDispatcherInterface;", "function removeAllListeners($event = null);", "public function removeListener()\n\t{\n\t\tlog::add(__CLASS__, 'debug', ' Suppression des Ecouteurs de ' . $this->getHumanName());\n\t\t$listener = $this->getListener();\n\t\tif (is_object($listener)) {\n\t\t\t$listener->remove();\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
similar with supervisor but this is for second marker
function __construct($mid) { $this->markerid = $mid; $supervisor = array(); $secondmarker = array(); }
[ "function debug_marker()\n {\n \\O2System\\Gear\\Debugger::marker();\n }", "public function getMarker(){\n\t\treturn 'marker'.(++$this->marker);\n\t}", "private function additionalMarker() {\r\n\t\t$this->outerMarkerArray['###POWERMAILFE_PAGEBROWSER###'] = $this->pagebrowser->main($this->conf, $this->piVars, $this->cObj, array('numberOfMails' => $this->numberOfMails, 'numberOfMails_cur' => $this->num, 'pointer' => ($this->piVars['pointer'] > 0 ? $this->piVars['pointer'] : 0), 'perPage' => $this->conf[$this->mode . '.']['perPage'])); // Show pagebrowser\r\n\t\tif ($this->del) { // if something was deleted and only then\r\n\t\t\t$this->outerMarkerArray['###POWERMAILFE_DELETEMSG###'] = $this->cObj->cObjGetSingle($this->conf['edit.']['deletemsg'], $this->conf['edit.']['deletemsg.']); // show delete message\r\n\t\t}\r\n\t}", "private function notification(){\n\t\n\t}", "public function getMarker($marker){\n\t\t$this->marker = $marker;\n\t}", "function getMarker() {\n\t\treturn $this->marker;\n\t}", "function lockdown_maintainance_timer_setmarker() {\r\n\tif( is_user_logged_in() ) {\r\n\t\tupdate_usermeta( get_current_user_id(), 'lockdown_maintainance_timer_marker', time() );\r\n\t}\r\n}", "public function markExecution() {}", "function shmop_pos_init() {\n\n\t}", "private function markerAction()\n {\n $clearAnyway = 0;\n $altPageId = 0;\n // #61594, 140915, dwildt, 1-\n //$action = $this->pObj->pi_linkTP_keepPIvars_url( $this->pObj->piVars, $this->pObj->boolCache, $clearAnyway, $altPageId );\n // #61594, 140915, dwildt, 2+\n $cache = 0;\n $action = $this->pObj->pi_linkTP_keepPIvars_url( $this->pObj->piVars, $cache, $clearAnyway, $altPageId );\n return $action;\n }", "public static function markStart()\n {\n self::$start = self::$useHrtime ? \\hrtime(true) : (\\microtime(true) * 1e+6);\n }", "function setTracking($bol)\n{\n}", "public function runStarted() {\n }", "abstract protected function getStartModifier();", "function spMarker($subpartMarker) {\n\n\t\t$sPBody = substr($subpartMarker, 3, -3);\n\t\t$altSPM = '';\n\t\tif (isset($this->conf['altMainMarkers.'])) {\n\t\t\t$altSPM = trim($this->cObj->stdWrap($this->conf['altMainMarkers.'][$sPBody], $this->conf['altMainMarkers.'][$sPBody . '.']));\n\t\t\t$GLOBALS['TT']->setTSlogMessage('Using alternative subpart marker for \\'' . $subpartMarker . '\\': ' . $altSPM, 1);\n\t\t}\n\n\n\t\treturn $altSPM?$altSPM:$subpartMarker;\n\t}", "public function getResumeMarker()\n {\n return $this->resume_marker;\n }", "public function substituteMarkerDataProvider() {}", "function MarkerNext($lineStart, $markerMask){}", "abstract protected function onCommandStart($name);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation getSystemBackupConfig Get system backup config
public function getSystemBackupConfig() { list($response) = $this->getSystemBackupConfigWithHttpInfo(); return $response; }
[ "public function getSystemBackupConfigAsync()\n {\n return $this->getSystemBackupConfigAsyncWithHttpInfo()->then(function (\n $response\n ) {\n return $response[0];\n });\n }", "public function getSystemConfig()\n {\n return $this->_systemConfig;\n }", "public function getSystemConfig()\n {\n return $this->systemConfig;\n }", "public function retrieveSystemConfiguration()\n {\n return $this->start()->uri(\"/api/system-configuration\")\n ->get()\n ->go();\n }", "public function getSystemConfiguration()\n {\n return $this->getInitialContext()->getSystemConfiguration();\n }", "public function getSystemConfiguration()\n {\n return $this->getAttribute(ContextKeys::SYSTEM_CONFIGURATION);\n }", "protected function getConfig()\n\t{\n\t\treturn OLPBlackbox_Config::getInstance();\n\t}", "public static function GetConfigSystemPath ();", "public function getBackupStatus () {\r\n\t$this->ensureLoggedIn();\r\n\r\n\treturn $this->request(array('req' => 'getbackupstatus'));\r\n\t}", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }", "public function getContinuousBackupConfig()\n {\n return $this->continuous_backup_config;\n }", "public function getVolumeBackup()\n {\n return $this->volume_backup;\n }", "public static function GetSystemConfigPath () {\n\t\t/** @var $this \\MvcCore\\Config */\n\t\treturn static::$systemConfigPath;\n\t}", "protected function _getConfig() {\n\t\treturn Mage::getSingleton('catalog/config');\n\t}", "public function getConfig()\n {\n return $this->bkmConfig;\n }", "public function getGlobalConfig();", "static public function getConfig(){\n\t\treturn self::$cfgBasket;\n\t}", "public function getBackupInfo()\n {\n return $this->readOneof(2);\n }", "protected function _getConfig()\n {\n return Mage::getSingleton('catalog/config');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a Connection object from data in settings.
protected function createConnection($settings) { $connection = new Connection(); if (isset($settings['server_host'])) { $connection->setServerHostname($settings['server_host']); } if (isset($settings['server_port'])) { $connection->setServerPort($settings['server_port']); } if (isset($settings['nickname'])) { $connection->setNickname($settings['nickname']); } if (isset($settings['realname'])) { $connection->setRealname($settings['realname']);; } if (isset($settings['username'])) { $connection->setUsername($settings['username']); } if (isset($settings['password'])) { $connection->setPassword($settings['password']); } return $connection; }
[ "private static function createConnection()\r\n {\r\n $config = Config::get('DBConfig');\r\n foreach ($config[\"connections\"] as $key => $entry) {\r\n $conn = new Connection($entry);\r\n self::$connections[$key] = $conn;\r\n }\r\n }", "public static function Create(){\n return new ConnectionData();\n }", "public function getConnectionSettings();", "private function makeConnection(){\n\n\t\t$conn = new connection;\n\t\t\n\t\treturn $conn->connection();\n\t\t\n\t}", "protected static function connection()\n {\n if (!static::$connection) {\n static::$connection = new Connection();\n if (static::$client_id) {\n static::$connection->authenticateOauth(static::$client_id, static::$auth_token);\n } else {\n static::$connection->authenticateBasic(static::$username, static::$api_key);\n }\n }\n \n return static::$connection;\n }", "public function connect()\n {\n if($this->credentials instanceof AppCredentials)\n {\n //set application specific connection\n $this->connection = new AppConnection($this->credentials);\n\n return $this->connection;\n }\n else\n {\n //set User specific connection\n $this->connection = new UserConnection($this->credentials);\n\n return $this->connection;\n }\n }", "abstract protected function createConnection();", "private function createTrafficDbConnection()\n {\n $connection = Config::get('traffic.database_default');\n\n if ($connection == 'app-default') {\n $connection = Config::get('database.default');\n $trafficConnection = Config::get('database.connections.'.$connection);\n } else {\n $trafficConnection = Config::get('traffic.database_connections.'.$connection);\n }\n\n Config::set('database.connections.traffic', $trafficConnection);\n }", "public function create($config) {\n\n\t\tif (!isset($config['host'])) {\n\t\t\tthrow new ConnectionFactoryException('Host is not defined in configuration \"host\" key');\n\t\t}\n\t\t\n\t\tif (!isset($config['username'])) {\n\t\t\tthrow new ConnectionFactoryException('Username is not defined in configuration \"username\" key');\n\t\t}\n\t\t\n\t\t// setup credentials for connection\n\t\tif (isset($config['ssh_key'])) {\n\t\t\t\n\t\t\t$credentials = new \\Crypt_RSA();\t\t\n\n\t\t\tif (is_file($config['ssh_key'])) {\n\t\t\t\t$credentials->loadKey(file_get_contents($config['ssh_key']));\n\t\t\t} else {\n\t\t\t\t$credentials->loadKey($config['ssh_key']);\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($config['ssh_key_passphrase'])) {\n\t\t\t\t$credentials->setPassword($config['ssh_key_passphrase']);\n\t\t\t}\n\t\t\t\n\t\t} elseif (isset($config['password'])) {\n\t\t\t$credentials = $config['password'];\n\t\t} else {\n\t\t\t$credentials = new \\System_SSH_Agent();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// create connection\n\t\tif (isset($config['port'])) {\n\t\t\t$connection = new Connection($config['host'], $config['port']);\n\t\t} else {\n\t\t\t$connection = new Connection($config['host']);\n\t\t}\n\t\t\n\t\t$connection->setUsername($config['username']);\n\t\t$connection->setCredentials($credentials);\n\t\t\n\t\treturn $connection;\n\t}", "public static function buildFromConfiguration()\n {\n $config = Configuration::getDatabaseConfiguration();\n $dsn = $config['dsn'] ?? \"mysql:dbname={$config['database']};\n host={$config['host']};charset={$config['charset']}\";\n $username = $config['username'] ?? \"\";\n $password = $config['password'] ?? \"\";\n return new self($dsn, $username, $password);\n }", "private static function createConnection(){\n $dsn = sprintf('%s:host=%s;dbname=%s',\n self::$config['driver'],\n self::$config['host'],\n self::$config['dbname']);\n \n self::$connection = new \\PDO($dsn, self::$config['dbuser'], self::$config['dbpass']); \n }", "protected function getConnection()\n {\n\n if ($this->url === null) {\n throw new BuildException(\"Url attribute must be set!\", $this->location);\n }\n\n try {\n\n $this->log(\"Connecting to \" . $this->getUrl(), Project::MSG_VERBOSE);\n $info = new Properties();\n\n $dsn = Creole::parseDSN($this->url);\n\n if (!isset($dsn[\"username\"]) && $this->userId === null) {\n throw new BuildException(\"Username must be in URL or userid attribute must be set.\", $this->location);\n }\n\n if ($this->userId) {\n $dsn[\"username\"] = $this->getUserId();\n }\n\n if ($this->password) {\n $dsn[\"password\"] = $this->getPassword();\n }\n\n if ($this->driver) {\n Creole::registerDriver($dsn['phptype'], $this->driver);\n }\n\n $conn = Creole::getConnection($dsn);\n $conn->setAutoCommit($this->autocommit);\n\n return $conn;\n\n } catch (SQLException $e) {\n throw new BuildException($e->getMessage(), $this->location);\n }\n\n }", "public function getConnection()\n {\n if ( NULL === $this->_connection\n || ! $this->_connection \n || ! $this->_connection->isConnected() )\n {\n // See if we have a connection string...\n $parts = $this->getConnectionValues();\n\n // Create host and configure. Use standard parse_url return labels\n $this->_connection = new \\AMQPConnection( array(\n // AMQP => URL Parser\n 'host' => $parts[ 'host' ],\n 'port' => $parts[ 'port' ],\n 'login' => $parts[ 'user' ],\n 'password' => $parts[ 'pass' ],\n 'vhost' => $parts[ 'path' ],\n ) );\n $this->_connection->connect();\n }\n return $this->_connection;\n }", "function __construct()\n\t{\n\t\t$this->settings = con::getConfig();\n\t\t$this->mysqlConn();\n\t}", "public static function newConn(array $args = null)\n{\n // Get database parameters\n $dsn = array('phptype' => $args['databaseType'],\n 'hostspec' => $args['databaseHost'],\n 'port' => $args['databasePort'],\n 'username' => $args['userName'],\n 'password' => $args['password'],\n 'database' => $args['databaseName'],\n 'encoding' => $args['databaseCharset']);\n // Set flags\n $flags = 0;\n $persistent = !empty($args['persistent']) ? true : false;\n if($persistent) $flags |= self::PERSISTENT;\n // if code uses assoc fetching and makes a mess of column names, correct\n // this by forcing returns to be lowercase\n // <mrb> : this is not for nothing a COMPAT flag. the problem still lies\n // in creating the database schema case sensitive in the first\n // place. Unfortunately, that is just not portable.\n $flags |= self::COMPAT_ASSOC_LOWER;\n\n try {\n $conn = self::getConnection($dsn,$flags); // cached on dsn hash, so no worries\n } catch (Exception $e) {\n throw $e;\n }\n xarLog::message(\"New connection created, now serving \" . self::$count . \" connections\", xarLog::LEVEL_NOTICE);\n return $conn;\n}", "function __construct(array $settings) {\n\t\tif (!isset($settings['uri'])) {\n\t\t\tthrow new Exception('URI must be provided');\n\t\t}\n\n\t\t$this->connection['uri'] = $settings['uri'];\n\t\tif (substr($this->connection['uri'], -1) != '/')\n\t\t\t$this->connection['uri'] .= '/';\n\n\t\tif (isset($settings['path']))\n\t\t\t$this->connection['path'] = $settings['path'];\n\n\t\tif (isset($settings['proxy']))\n\t\t\t$this->connection['proxy'] = $settings['proxy'];\n\n\t\tif (isset($settings['user'])) {\n\t\t\t$this->connection['user'] = $settings['user'];\n\t\t\t$this->connection['password'] = isset($settings['password'])? $settings['password'] : '';\n\n\t\t\t$this->connection['auth'] = (isset($settings['auth']))?\n\t\t\t\t$settings['auth'] : 'basic';\n\t\t}\n\n\t\tif (isset($settings['ssl']))\n\t\t\t$this->connection['ssl'] = $settings['ssl'];\n\n\t\t// By default server must support\n\t\t$this->dav_allow = array();\n\t\t$this->dav_allow['OPTIONS'] = true;\n\t\t$this->dav_allow['MKCOL'] = true;\n\t}", "public function newConnection( Array $options ){\r\n\r\n\t\t global $registry;\r\n\r\n\t\t $driver = isset($options['driver']) ?? 'mysql';\r\n\t\t $host = isset($options['host']) ?? $registry->get('config')->get('dbHost');\r\n\t\t $user = isset($options['user']) ?? $registry->get('config')->get('dbUser');\r\n\t\t $pwd = isset($options['password']) ?? $registry->get('config')->get('dbPwd');\r\n\t\t $dbName = isset($options['dbName']) ?? $registry->get('config')->get('dbName');\r\n\t\t $active = isset($options['active']) ?? true;\r\n\r\n\t\t# set Db name\r\n\t\t$this->_name = $dbName;\r\n\r\n\r\n\t\t //make Sure DbName is set\r\n\t\t if(!$dbName){\r\n\t\t\tAppError::throwException('Database name not Set');\r\n\t\t }\r\n\r\n $dsn = $driver . \":host=\" . $host . \";dbname=\" . $dbName . \";charset=utf8\";\r\n\r\n\t\t try{\r\n\t\t\t$this->_connections[$dbName] = new PDO($dsn, $user, $pwd );\r\n\t\t\t$this->_connections[$dbName]->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t //$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\r\n\t\t $this->_connections[$dbName]->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY , true);\r\n\r\n\t\t }catch(PDOException $e){\r\n\t\t\tAppError::throwException('Database Error : ' . $e->getMessage(), '500');\r\n\t\t }\r\n\r\n\t\t# if active is true..set this connection as the active connection\r\n\t\tif($active){\r\n\t\t\t$this->setActiveConnection($dbName);\r\n\t\t}\r\n\r\n\t\t# return DBObject to allow method chaining\r\n\t\treturn $this;\r\n }", "function __construct()\n {\n $this->link = mysql_connect($cfg['database_host'], $cfg['database_user'], $cfg['database_password']);\n if (!$this->link) \n {\n echo 'Settings class error: ' . mysql_error();\n return;\n }\n \n $sel_db = mysql_select_db($cfg['database_name']);\n \n if (!$sel_db) \n {\n echo 'Settings class error: ' . mysql_error();\n return;\n }\n \n $result = mysql_query(\"SELECT * FROM settings\");\n \n if(mysql_num_rows($result) > 0)\n {\n while($row = mysql_fetch_array($result))\n {\n $this->values[$row['key']] = $row['value'];\n }\n }\n }", "function getConnection()\n\t{\n\t\treturn new AMQPConnection(\n $this->connection_details['host'],\n\t\t\t$this->connection_details['port'],\n\t\t\t$this->connection_details['login'],\n\t\t\t$this->connection_details['password'],\n\t\t\t$this->connection_details['vhost']\n\t\t);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ function to delete boton_slide
function delete_boton_slide($botonslide_id) { return $this->db->delete('boton_slide',array('botonslide_id'=>$botonslide_id)); }
[ "public function deleteSlide(){\n\t\t\t$this->validateInited();\n\t\t\t\n\t\t\t$this->db->delete(GlobalsRevSlider::$table_slides,\"id='\".$this->id.\"'\");\n\t\t}", "function deleteSlides(){\n\t\tglobal $connection;\n\t\tif(isset($_GET['delete_slide_id'])){\n\t\t\t$queryFindImage = query(\"SELECT slide_image FROM slides WHERE slide_id = \".escape_string($_GET['delete_slide_id']).\" LIMIT 1 \");\n\t\t\tconfirmQuery($queryFindImage);\n\t\t\t$row = fetchArray($queryFindImage);\n\t\t\t$targePath = UPLOAD_DIR . DS . $row['slide_image'];\n\t\t\tunlink($targePath);\n\t\t\t$query = query(\"DELETE FROM slides WHERE slide_id = \".escape_string($_GET['delete_slide_id']).\"\");\n\t\t\tconfirmQuery($query);\n\t\t\t$targePath = \"../../resources/uploads/\";\n\t\t\tsetMessage(\"Slide Deleted\");\n\t\t\tredirect(\"index.php?slides\");\n\t\t}else{\n\t\t\tredirect(\"index.php?slides\");\n\t\t}\n\t}", "public function deleteSlide($id){\n\t\t$this->db->where(\"id\", $id);\n\t\treturn $this->db->delete(\"productslides\");\n\t}", "public function removeslideAction() {\r\n\t\t$this->layout ( 'layout/_ajax_layout' );\r\n\t\t$id = $this->params ()->fromQuery ( 'Id' );\r\n\t\t$sm = $this->serviceLocator->get ( 'Admin\\Model\\GlobalModel' );\r\n\t\t\r\n\t\t$exist = $sm->checkSlide ( $id );\r\n\t\t// remove image in folder\r\n\t\t$dir = 'public/img/slide/' . $exist [0] ['slid_image'];\r\n\t\tunlink ( $dir );\r\n\t\t// delete in database table\r\n\t\t$sm->removeSlide ( $id );\r\n\t\treturn false;\r\n\t}", "public function deleteSlide(){\n if($this->session->userid==false)\n {\n redirect('admin/login');\n }\n $id = $this->uri->segment(3);\n $img = $this->uri->segment(4);\n $path ='assets/images/training/'.$img;\n $this->TrainingModel->deleteSlide($id);\n unlink($path);\n redirect(base_url('training/slidelist'));\n }", "function MsPowerpoint_SlideDelete() {\n\n\t\tif ( (count($this->OtbsSheetSlidesDelete)==0) && (count($this->OtbsSheetSlidesVisible)==0) ) return;\n\n\t\t$this->MsPowerpoint_InitSlideLst();\n\n\t\t// Edit both XML and REL of file 'presentation.xml'\n\n\t\t$xml_file = 'ppt/presentation.xml';\n\t\t$xml_idx = $this->FileGetIdx($xml_file);\n\t\t$rel_idx = $this->FileGetIdx($this->OpenXML_Rels_GetPath($xml_file));\n\n\t\t$xml_txt = $this->TbsStoreGet($xml_idx, 'Slide Delete and Display / XML');\n\t\t$rel_txt = $this->TbsStoreGet($rel_idx, 'Slide Delete and Display / REL');\n\n\t\t$del_lst = array();\n\t\t$del_lst2 = array();\n\t\t$first_kept = false; // Name of the first slide, to be kept \n\t\tforeach ($this->OpenXmlSlideLst as $i=>$s) {\n\t\t\t$ref = 'i:'.($i+1);\n\t\t\tif (isset($this->OtbsSheetSlidesDelete[$ref]) && $this->OtbsSheetSlidesDelete[$ref] ) {\n\n\t\t\t\t// the rid may be used several time in the fiel. i.e.: in <p:sldIdLst><p:sldIdLst>, but also in <p:custShow><p:sldLst>\n\t\t\t\twhile ( ($x = clsTbsXmlLoc::FindElementHavingAtt($xml_txt, 'r:id=\"'.$s['rid'].'\"', 0))!==false ) {\n\t\t\t\t\t$x->ReplaceSrc(''); // delete the element\n\t\t\t\t}\n\n\t\t\t\t$x = clsTbsXmlLoc::FindElementHavingAtt($rel_txt, 'Id=\"'.$s['rid'].'\"', 0);\n\t\t\t\tif ($x!==false) $x->ReplaceSrc(''); // delete the element\n\n\t\t\t\t$del_lst[] = $s['file'];\n\t\t\t\t$del_lst[] = $this->OpenXML_Rels_GetPath($s['file']);\n\t\t\t\t$del_lst2[] = basename($s['file']);\n\n\t\t\t} else {\n\t\t\t\t$first_kept = basename($s['file']);\n\t\t\t}\n\t\t}\n\n\t\t$this->TbsStorePut($xml_idx, $xml_txt);\n\t\t$this->TbsStorePut($rel_idx, $rel_txt);\n\t\tunset($xml_txt, $rel_txt);\n\n\t\t// Delete references in '[Content_Types].xml'\n\t\tforeach ($del_lst as $f) {\n\t\t\t$this->OpenXML_CTypesDeletePart('/'.$f);\n\t\t}\n\n\t\t// Change references in 'viewProps.xml.rels'\n\t\t$idx = $this->FileGetIdx('ppt/_rels/viewProps.xml.rels');\n\t\t$txt = $this->TbsStoreGet($idx, 'Slide Delete and Display / viewProps');\n\t\t$ok = false;\n\t\tforeach ($del_lst2 as $f) {\n\t\t\t$z = 'Target=\"slides/'.$f.'\"';\n\t\t\tif (strpos($txt, $z)) {\n\t\t\t\tif ($first_kept===false) return $this->RaiseError(\"(Slide Delete and Display) : no slide left to replace the default slide in 'viewProps.xml.rels'.\");\n\t\t\t\t$ok = true;\n\t\t\t\t$txt = str_replace($z, 'Target=\"slides/'.$first_kept.'\"' , $txt);\n\t\t\t}\n\t\t}\n\t\tif ($ok) $this->TbsStorePut($idx, $txt);\n\n\t\t// Actually delete the slide files\n\t\tforeach ($del_lst as $f) {\n\t\t\t$idx = $this->FileGetIdx($f);\n\t\t\tunset($this->TbsStoreLst[$idx]); // delete the slide from the merging if any\n\t\t\t$this->FileReplace($idx, false);\n\t\t}\n\n\t}", "function deleteSlider($slider_id)\n\t{\n\t\t$this->db->where('slider_id', $slider_id);\n\t\t$this->db->delete('slider');\n\t}", "function delete_slider_items() {\n\t\tglobal $db, $r, $table_prefix;\n\t\t$slider_id = $r->get_value(\"slider_id\");\n\t\tif (intval($slider_id) > 0) {\n\t\t\t$sql = \"DELETE FROM \".$table_prefix.\"sliders_items \";\n\t\t\t$sql .= \"WHERE slider_id = \".$db->tosql($slider_id, INTEGER);\n\t\t\t\n\t\t\t$db->query($sql);\n\t\t}\n\t}", "public function deleteSlideFromData($data){\n\t\t\t\n\t\t\t$sliderID = UniteFunctionsRev::getVal($data, \"sliderID\");\n\t\t\t$slider = new RevSlider();\n\t\t\t$slider->initByID($sliderID); \t\t\t\n\n\t\t\t$isPost = $slider->isSlidesFromPosts();\n\t\t\t\n\t\t\tif($isPost == true){\t//delete post\t\n\t\t\t\t\n\t\t\t\t$postID = UniteFunctionsRev::getVal($data, \"slideID\");\n\t\t\t\tUniteFunctionsWPRev::deletePost($postID);\n\t\t\t\t\n\t\t\t}else{\t\t//delete slide\n\t\t\t\t\n\t\t\t\t$slideID = UniteFunctionsRev::getVal($data, \"slideID\");\n\t\t\t\t$this->initByID($slideID);\n\t\t\t\t$this->deleteChildren();\n\t\t\t\t$this->deleteSlide();\n\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//RevOperations::updateDynamicCaptions();\n\t\t\t\n\t\t}", "public function delImgforSlider()\r\n\t\t{\r\n\t\t\tglobal $CFG,$objSmarty;\r\n //for delete iamges from folder before publish\r\n if($_POST['domain_id'] != '' && $_POST['slider_id'] != '')\r\n {\r\n $tempAlreadyImage = $this->getValue(\"slider_images\",$CFG['table']['temp_slider_images'],\"domain_id ='\".$this->filterInput($_POST['domain_id']).\"' AND slider_id ='\".$this->filterInput($_POST['slider_id']).\"'\");\r\n \t\t\t\t\r\n $imagesFolderImage = $this->getValue(\"slider_images\",$CFG['table']['slider_images'],\"domain_id ='\".$this->filterInput($_POST['domain_id']).\"' AND slider_id ='\".$this->filterInput($_POST['slider_id']).\"'\");\r\n if($tempAlreadyImage && $imagesFolderImage == '')\r\n //@unlink($CFG['site']['photo_domain_image_path'].'/'.$tempAlreadyImage);\r\n \t\t\t$UpQuery = \"DELETE FROM \".$CFG['table']['temp_slider_images'].\" WHERE slider_id ='\".$this->filterInput($_POST['slider_id']).\"'\";\r\n \t\t\t$UpResult = mysql_query($UpQuery) or die($this->mysql_error($UpQuery));\r\n } \r\n\t\t\t//@unlink($CFG['site']['photo_domain_image_path'].'/'.$_POST['image_name']);\r\n\t\t}", "static function delete_slide_by_id($id)\n {\n global $db;\n \n // see if the environment exists\n if ($slide = slides::get_slide_by_id($id)) {\n // remove the file\n $file = dirname(__FILE__).'/../../../img/slides/'.$slide['img'];\n if (file_exists($file)) {\n unlink($file);\n }\n \n // delete it\n $str = \"DELETE FROM `slides` WHERE `slideid`='%d'\";\n $sql = sprintf($str, api::cleanse($id));\n mysqli_query($db, $sql);\n // no error\n return null;\n } else {\n return 'ERROR: Slide ID '.$id.' does not exist';\n }\n }", "public function afterDelete()\n {\n if ($this->image) $this->image->delete();\n if ($this->reindex) Slide::reindex();\n }", "public function delete_backup_full_slider($id) {\n\n global $wpdb;\n\n Db::getInstance()->execute(Db::getInstance()->prepare(\"DELETE FROM \" . _DB_PREFIX_ . \"revslider_backup_slides WHERE slider_id = %s\", [$id]));\n\n }", "function ajax_delete_slider()\n {\n $id = $this->uri(3);\n $id = explode('-',$id);\n $img_id = $id[0];\n $name = $id[1];\n unlink('assets/images/slider_image/'.$name);\n $this->dashboard_model->delete_imgTable_info($img_id);\n $this->jsonMsgReturn(true,'Delete Success');\n }", "public function Delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// TODO: if a soft delete is prefered, change this to update the deleted flag instead of hard-deleting\n\n\t\t\t$pk = $this->GetRouter()->GetUrlParam('idSlider');\n\t\t\t$slider = $this->Phreezer->Get('Slider',$pk);\n\n\t\t\t$slider->Delete();\n\n\t\t\t$output = new stdClass();\n\n\t\t\t$this->RenderJSON($output, $this->JSONPCallback());\n\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->RenderExceptionJSON($ex);\n\t\t}\n\t}", "public function delete_slide_photo($index){\n\t\t$index = trim($index);\n\t\tif(strpos($this->user_photo_slide_path[$index],\"../../image/default_photo/\")===FALSE){\n\t\t\t@unlink(\"../../\".USERS_PATH.$this->username.\"/user_photo/\".$this->user_photo_slide_path[$index]);\n\t\t\t\n\t\t\t\n\t\t\t$name = trim(substr($this->user_photo_slide_path[$index],4));\n\t\t\t$ctrl=0;\n\t\t\tfor($i=0;$i<(count($this->user_photo_slide_big_path));$i++){\n\t\t\t\tif(($name==$this->user_photo_slide_big_path[$i])&&($i!=$index)){\n\t\t\t\t\t$ctrl=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($name==$this->photo1_path){\n\t\t\t\t$ctrl=1;\t\n\t\t\t}\n\t\t\tif($ctrl==0){\n\t\t\t\t@unlink(\"../../\".USERS_PATH.$this->username.\"/download_area/public/photo/\".$name);\n\t\t\t\t@unlink(\"../../\".USERS_PATH.$this->username.\"/filebox/photo/FOTO_PROFILO/\".$name);\n\t\t\t\t@unlink(\"../../\".USERS_PATH.$this->username.\"/filebox/photo/FOTO_PROFILO/big_thumb/big_thumb_\".$name);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$this->sx_shift_array($this->user_photo_slide_path,count($this->user_photo_slide_path),$index);\n\t\t$this->sx_shift_array($this->user_photo_slide_big_path,count($this->user_photo_slide_big_path),$index);\n\t\t$this->mysql_database->Recreate_photo_slide($this->user_id , $this->user_photo_slide_path,$this->user_photo_slide_big_path);\n\t}", "public function deleteAction()\n\t{\n\n // check if we know what should be deleted\n if ($id = $this->getRequest()->getParam('id')) {\n try {\n // init model and delete\n $model = Mage::getModel('responsiveslider/responsiveslider_item');\n $model->load($id);\n $model->delete();\n\n //delete link to slider\n $this->_resetItemToSlidersLink();\n\n // display success message\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('responsiveslider')->__('The slide has been deleted.')\n );\n // go to grid\n $this->_redirect('*/*/');\n\n return;\n\n } catch (Exception $e) {\n // display error message\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n // go back to edit form\n $this->_redirect('*/*/edit', array('id' => $id));\n\n return;\n }\n }\n // display error message\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('responsiveslider')->__('Unable to find a slide to delete.')\n );\n // go to grid\n $this->_redirect('*/*/');\n\t}", "function clearDuplicateSlides($image_id) {\n\t\t\t$s_id = $this->get(\"id\");\n\t\t\tif(isset($image_id,$s_id) && is_numeric($s_id) && is_numeric($image_id)) {\n\t\t\t\t$query = \"DELETE FROM slide WHERE slideshow_id = $s_id AND image_id = $image_id\";\n\t\t\t\t$rows = $this->db->submit($query);\n\t\t\t\t//echo $query;\n\t\t\t}\n\t\t}", "public function del_sliderImage()\n {\n if ($this->isLoggedIn()) {\n $id = $this->input->post('id');\n $this->Admin_model->delete('slider', $id);\n } else {\n redirect(base_url());\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests if ConnectionAdapterInterface::isFile returns false when the file does not exist.
public function testIsFileReturnsFalseWhenFileNotExists() { $this->connectionAdapter->connect(); $this->assertFalse($this->connectionAdapter->isFile($this->workspaceUtility->getWorkspacePath().'test.txt')); }
[ "public function exist($file);", "public function isFile(){}", "public function doesFileExist(): bool\n {\n return $this->storage()\n ->disk($this->disk)\n ->exists($this->relative_path);\n }", "public function fileExists();", "public function isFile () {}", "public function testIsVendorFileReturnsFalseIfFileIsNotLocatedInVendorDirectory()\n {\n $this->assertFalse(VendorResources::isVendorFile(__FILE__));\n }", "public function testIsDirectoryReturnsFalseWhenDirectoryIsFile()\n {\n $this->workspaceUtility->createFile('/test.txt');\n\n $this->connectionAdapter->connect();\n\n $this->assertFalse($this->connectionAdapter->isDirectory($this->workspaceUtility->getWorkspacePath().'/test.txt'));\n }", "public function hasAFile()\n {\n $fs = $this->getFilesInBaseDir();\n return !empty($fs);\n }", "protected function isFile() {}", "public function isFileExistsRemotely();", "public function checkIsFile($path);", "public function file_exists(): bool;", "public function hasFilePath() : bool;", "function fileExists() {\n if (file_exists($this->path) && is_readable($this->path)) {\n return true;\n }\n return false;\n }", "public function hasFiles();", "private function pathExists()\r\n {\r\n return is_file($this->fullPath());\r\n }", "public function isFile(){\n//\t\treturn is_file($this->path);\n\t\treturn is_a($this, \"\\GO\\Base\\Fs\\File\"); //works with non existing files\n\t}", "public function isFileExistsRemotely()\n {\n // Try to get the HTTP headers of the file at the specified URL\n try {\n $this->guzzle->head($this->fileUrl);\n\n // If the file exists, return true\n return true;\n } catch (ClientException $client_exception) {\n // If the file does not exist, return false\n return false;\n }\n }", "public function testInvalidFileIsFile()\n {\n $this->assertFalse($this->fileSystem->isFile(__DIR__));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse comment and add annotations to analysis.
private function analyseComment(Analysis $analysis, DocBlockParser $docBlockParser, string $comment, Context $context): void { $analysis->addAnnotations($docBlockParser->fromComment($comment, $context), $context); }
[ "private function analyzeComment() {\r\n\t\tif ($this->docComment == null) {\r\n\t\t\t$this->docComment = new MoufPhpDocComment($this->getDocComment());\r\n\t\t}\r\n\t}", "private function parseComment(){\r\n\t\t$comment = $this->getDocComment();\r\n\t\t$this->comment = $comment;\r\n\t\tnew commentParser($comment,$this);\r\n\t}", "private function splitComment(): void\n {\n $lines = explode(\"\\n\", $this->comment);\n\n /** remove spaces and wildcard */\n $lines = array_map([$this, 'cleanUpLine'], $lines);\n\n /** remove blank lines */\n $lines = array_filter($lines);\n\n /** reindex array */\n $this->lines = array_values($lines);\n\n $this->annotations = array_map([$this, 'destructuration'], $lines);\n }", "protected function handleComments()\n {\n $parser = new CommentParser();\n $parser->register();\n }", "public static function parse($docComment) {\n $matches = [];\n preg_match('/\\@[A-Z_a-z]*/', $docComment, $matches);\n if (empty($matches)) {\n return new Annotation();\n }\n $map = [];\n $contents = [];\n preg_match('/\\\\' . $matches[0] . '\\(([^\\|]+)\\)/', $docComment, $contents);\n if (!empty($contents)) {\n $content = $contents[0];\n foreach (AnnotationParser::buildArray($content) as $value) {\n $map += $value;\n }\n }\n preg_match_all(\"/\\@[A-Z_a-z]*[\\s\\r\\n\\t]/\", $docComment, $matches);\n foreach ($matches[0] as $value) {\n $name = trim(str_replace([\"\\n\", \"\\t\"], '', $value));\n $map[$name] = true;\n }\n return new Annotation($map);\n }", "static function parse($docComment) {\n $text = self::uncomment($docComment);\n $annotations = self::retrieveAnnotations($text);\n $map = [];\n forEach ($annotations as $annotation) {\n $parameters = [];\n $hasParameters = preg_match('/(?<=' . $annotation . '[\\(])[\\w\\W]*?(?=[\\)])/', $text, $parameters);\n if ($hasParameters) {\n $quotedJson = preg_replace(\"/([{,])(\\s*)([A-Za-z0-9_\\-]+?)\\s*:/\", \"$1\\\"$3\\\":\", $parameters[0]);\n $map[$annotation] = json_decode($quotedJson);\n } else {\n $map[$annotation] = null;\n }\n }\n return new Annotation($map);\n }", "public static function parseComments($texts, $tokenId, $tokenName) {\n\t\t\tif ( !is_array($texts) ) $texts = array($texts);\n\n\t\t\t$annotations = array();\n\t\t\tforeach ( $texts as $text ) {\n\t\t\t\t//print \"Parsing \\\"\".$text.\"\\\"\".LF;\n\t\t\t\t\n\t\t\t\tif ( preg_match(\"/^\\/\\/(.+)$/\", $text, $m) ) {\n\t\t\t\t\t// 1\n\t\t\t\t\t//print \"Annotation type 1: \".$m[1].LF;\n\t\t\t\t}\n\t\t\t\telse if ( preg_match(\"/\\/\\*(.+)\\*\\//s\", $text, $m) ) {\n\t\t\t\t\t// 2\n\t\t\t\t\t//print \"Annotation type 2: \".$m[1].LF;\n\t\t\t\t}\n\t\t\t\telse if ( false && preg_match(\"/\\/\\*\\*(.+)\\*\\//s\", $text, $m) ) {\n\t\t\t\t\t// 3\n\t\t\t\t\t//print \"Annotation type 3: \".$m[1].LF;\n\t\t\t\t}\n\t\t\t\telse return array();\t// nothing\n\n\t\t\t\t$text = $m[1];\n\t\t\t\tpreg_match(\"/^\\@([A-Z][^\\(]+)(\\(.+\\))?/\", trim($text), $m);\n\n\t\t\t\t//print \"Annotation: \".$m[1].LF;\n\t\t\t\t$class = self::$_registeredClasses[$m[1]];\n\t\t\t\tif ( !$class ) $class = \"Annotation\";\n\n\t\t\t\t//print \"Annotation class: \".$class.LF;\n\n\t\t\t\teval(\"\\$a = new \".$class.\"();\");\n\t\t\t\t$a->name = $m[1];\n\t\t\t\t// TODO: limited to a sinlge param as string param may have comma inside.\n\t\t\t\t//$args = t(explode(\",\", substr($m[2], 1, -1)));\n\t\t\t\t$args = t(array(substr($m[2], 1, -1)));\n\t\t\t\t// remove quotes:\n\t\t\t\tforeach ( $args as $i => $arg ) {\n\t\t\t\t\t$args[$i] = preg_replace(\"/^[\\\"\\'](.+)[\\\"\\']$/\", \"$1\", $arg);\n\t\t\t\t}\n\t\t\t\t$a->args = $args;\n\t\t\t\t$a->tokenId = $tokenId;\n\t\t\t\t$a->tokenName = $tokenName;\n\n\t\t\t\t$annotations[] = $a;\n\t\t\t}\n\t\t\treturn $annotations;\n\t\t}", "private function getAnnotations($comment) {\r\n $annotations = array();\r\n $tag = \"\"; // Currently match text for the annotation tag\r\n $lines = explode(\"\\n\", $comment);\r\n foreach ($lines as $num => $line) {\r\n if (strlen($line) == 0 || $line[0] == '@') {\r\n // blank lines and new annotation tags end the previous tag\r\n if ($tag != \"\") {\r\n $annotations[] = $tag;\r\n $tag = \"\";\r\n }\r\n }\r\n if (isset($line[0]) && $line[0] == '@') {\r\n $tag = $line;\r\n } elseif ($tag != \"\") {\r\n $tag .= ' ' . $line;\r\n }\r\n }\r\n return $annotations;\r\n }", "private function getAnnotations($comment) {\n $annotations = array();\n $tag = \"\"; // Currently match text for the annotation tag\n $lines = explode(\"\\n\", $comment);\n foreach ($lines as $num => $line) {\n if (strlen($line) == 0 || $line[0] == '@') {\n // blank lines and new annotation tags end the previous tag\n if ($tag != \"\") {\n $annotations[] = $tag;\n $tag = \"\";\n }\n }\n if ($line[0] == '@') {\n $tag = $line;\n } elseif ($tag != \"\") {\n $tag .= ' ' . $line;\n }\n }\n return $annotations;\n }", "protected function getDocCommentParser() {}", "private function parse_comments_file(){\n\t\t$xml\t\t=\tsimplexml_load_file($this->commentsfile);\n\t\t\n\t\tforeach( $xml as $comm ){\n\t\t\t$this->comments[]=new Comment((string)$comm->login,(string)$comm->content,(string)$comm->date,$this->file);\n\t\t}\n\t}", "public function parseRawDocComment();", "public function getParsedDocComment();", "public function parseTextAnnotations();", "protected function parse_annotations() {\n\t\t$class = new \\ReflectionClass( static::class );\n\t\t$properties = $class->getProperties( \\ReflectionProperty::IS_PUBLIC );\n\t\tforeach ( $properties as $property ) {\n\t\t\t$doc_block = $property->getDocComment();\n\t\t\tif ( ! stristr( $doc_block, '@property' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$this->annotations[ $property->getName() ] = array(\n\t\t\t\t'type' => $this->parse_annotations_var( $doc_block ),\n\t\t\t\t'sanitize' => $this->parse_annotation_sanitize( $doc_block ),\n\t\t\t\t'rule' => $this->parse_annotation_rule( $doc_block ),\n\t\t\t);\n\t\t}\n\t}", "private function parseComment($comment)\n {\n $parsed = array(\n 'desc' => null,\n 'summary' => null,\n );\n $elementName = $this->reflector ? $this->reflector->getName() : null;\n $matches = array();\n if (\\preg_match('/^@/m', $comment, $matches, PREG_OFFSET_CAPTURE)) {\n // we have tags\n $pos = $matches[0][1];\n $strTags = \\substr($comment, $pos);\n $parsed = \\array_merge($parsed, $this->parseTags($strTags, $elementName));\n // remove tags from comment\n $comment = $pos > 0\n ? \\substr($comment, 0, $pos - 1)\n : '';\n }\n /*\n Do some string replacement\n */\n $comment = \\preg_replace('/^\\\\\\@/m', '@', $comment);\n $comment = \\str_replace('{@*}', '*/', $comment);\n /*\n split into summary & description\n summary ends with empty whiteline or \".\" followed by \\n\n */\n $split = \\preg_split('/(\\.[\\r\\n]+|[\\r\\n]{2})/', $comment, 2, PREG_SPLIT_DELIM_CAPTURE);\n $split = \\array_replace(array('', '', ''), $split);\n // assume that summary and desc won't be \"0\".. remove empty value and merge\n $parsed = \\array_merge($parsed, \\array_filter(array(\n 'desc' => $this->trimDesc(\\trim($split[2])),\n 'summary' => \\trim($split[0] . $split[1]), // split[1] is the \".\\n\"\n )));\n \\ksort($parsed);\n return $parsed;\n }", "private function comments(): void\n {\n if ($this->operation->getSummary() == null && !empty($this->doc->getSummary())) {\n $this->operation->setSummary($this->doc->getSummary());\n }\n if ($this->operation->getDescription() == null && !empty($this->doc->getDescription()->render())) {\n $this->operation->setDescription($this->doc->getDescription()->render());\n }\n\n if ($this->doc->hasTag('deprecated')) {\n $this->operation->setDeprecated(true);\n }\n\n $this->addExternalDocumentation();\n }", "function addComment($comment) {\n $comment = ltrim($comment,\"#,;\");\n array_push($this->comment,$comment);\n }", "protected function scanComment()\n {\n $matches = array();\n\n if (preg_match('/^ *\\/\\/(-)?([^\\n]+)?/', $this->input, $matches)) {\n $this->consumeInput(mb_strlen($matches[0]));\n $token = $this->takeToken('comment', isset($matches[2]) ? $matches[2] : '');\n $token->buffer = !isset($matches[1]) || '-' !== $matches[1];\n\n return $token;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepare our configuration modules
public function prepareModules() { $modules = $this->getAllConfigurationModules(); foreach ($modules as $module) { $class_name = $this->getClassName($module); $config_path = $this->getConfigPath($module); $data = $this->getConfigData($config_path); if (false !== $data) { if (Cls::isImplements($class_name, __NAMESPACE__ . NS . 'IModule')) { $this->prepared_modules[$class_name::getPriority()][] = array( 'priority' => $class_name::getPriority(), 'class_name' => $class_name, 'config_path' => $config_path, 'data' => $data, ); } } } ksort($this->prepared_modules); return $this; }
[ "protected function initModules()\n {\n foreach ($this->getModules() as $module => $config) {\n if (is_numeric($module)) {\n $name = $config;\n $className = '\\\\Modules\\\\' . ucfirst($name) . '\\\\' . ucfirst($name) . 'Module';\n } else {\n $className = $config['class'];\n }\n call_user_func([$className, 'preConfigure']);\n }\n\n // Collect params\n $this->collectParams([Alias::get('Modules')]);\n }", "public static function prepare()\n\t{\n\t\t// we only prepare the admin modules if we are on \n\t\t// the admin route namespace and we are logged in as super user.\n\t\t$prefix = Earth::$config->get( 'admin.uri' );\n\t\t\n\t\tif ( substr( \\CCIn::uri(), 0, strlen( $prefix ) ) === $prefix && Earth::$user->is_admin() )\n\t\t{\n\t\t\tforeach( static::$modules as $uri => $callback )\n\t\t\t{\n\t\t\t\t// skip if already a module\n\t\t\t\tif ( $callback instanceof Module )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$module = new Module;\n\t\t\t\tcall_user_func_array( $callback, array( &$module ) );\n\t\t\t\t\n\t\t\t\t$module->uri = $uri;\n\t\t\t\t\n\t\t\t\t// register the route\n\t\t\t\t\\CCRouter::on( $prefix.'/'.$uri, array( 'alias' => 'admin.'.$uri ), $module->controller );\n\t\t\t\t\n\t\t\t\t// check if the module is active\n\t\t\t\tif ( \\CCUrl::active( $module->link() ) )\n\t\t\t\t{\n\t\t\t\t\t$module->active = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// submodules\n\t\t\t\tforeach( $module->modules as $suburi => $subcallback )\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$submodule = new Module;\n\t\t\t\t\tcall_user_func_array( $subcallback, array( &$submodule ) );\n\t\t\t\t\t\n\t\t\t\t\t$submodule->uri = $uri.'.'.$suburi;\n\t\t\t\t\t\n\t\t\t\t\t// register the route for the submodule\n\t\t\t\t\t\\CCRouter::on( $prefix.'/'.$uri.'/'.$suburi, array( \n\t\t\t\t\t\t'alias' => 'admin.'.$uri.'.'.$suburi )\n\t\t\t\t\t, $submodule->controller );\n\t\t\t\t\t\n\t\t\t\t\t// check if the module is active\n\t\t\t\t\tif ( \\CCUrl::active( $submodule->link() ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$submodule->active = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$module->modules[$suburi] = $submodule;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstatic::$modules[$uri] = $module;\n\t\t\t}\n\t\t}\n\t}", "public function prepare()\n {\n // nothing to prepare for this module\n }", "private static function setupModules()\n {\n $aModuleLocations = [];\n\n // Discover Nails modules\n $aModules = Components::modules();\n\n /**\n * Note: Key is full path, value is relative path from the application controllers\n * directory to where the modules are.\n */\n $aAbsolutePaths = [\n [rtrim(APPPATH, DIRECTORY_SEPARATOR), 'modules'],\n [rtrim(FCPATH, DIRECTORY_SEPARATOR), 'vendor', 'nails', 'common'],\n ];\n\n $aRelativePaths = [\n ['..', 'modules'],\n ['..', '..', 'vendor', 'nails', 'common'],\n ];\n\n array_walk(\n $aAbsolutePaths,\n function (&$aItem) {\n $aItem = implode(DIRECTORY_SEPARATOR, $aItem) . DIRECTORY_SEPARATOR;\n }\n );\n\n array_walk(\n $aRelativePaths,\n function (&$aItem) {\n $aItem = implode(DIRECTORY_SEPARATOR, $aItem) . DIRECTORY_SEPARATOR;\n }\n );\n\n $aModuleLocations = array_merge(\n $aModuleLocations,\n array_combine($aAbsolutePaths, $aRelativePaths)\n );\n\n // Discovered Nails modules\n foreach ($aModules as $oModule) {\n $aModuleLocations[$oModule->path] = implode(\n DIRECTORY_SEPARATOR,\n ['..', '..', 'vendor', $oModule->name, '']\n );\n }\n\n // --------------------------------------------------------------------------\n\n /**\n * This hook happens before the config class loads (but the config file has\n * already been loaded). CI provides an interface to pass items to the config\n * file via the index.php file; we're going to leverage that here to set\n * the module locations.\n */\n\n // Underscore casing is important\n global $assign_to_config;\n $key = 'modules_locations';\n\n if (empty($assign_to_config)) {\n $assign_to_config = [];\n }\n\n if (isset($assign_to_config[$key]) && is_array($assign_to_config[$key])) {\n\n // Already set, merge the arrays\n $assign_to_config[$key] = array_merge($assign_to_config[$key], $aModuleLocations);\n\n } else {\n\n // Not set (or is set but not \"proper\", overwrite it as it's probably wrong anyway)\n $assign_to_config[$key] = $aModuleLocations;\n }\n }", "public static function setup() {\n\t\tself::$container['config']->parseExtraConfig();\n\t}", "protected function _initModules()\n {\n\n }", "public function setupModules(){\n\t\t// Update the Yii::app()->modules configuration\n\t\t$this->configureModules();\n\t\t\n\t\t$this->initialiseModules();\n\t\t\n\t\t\n\t\t// setup each module \n\t\tforeach($this->getModules() as $name => $config){\n\t\t\tif(!$this->isNiiModule($name)) continue;\n\t\t\tYii::app()->getModule($name)->setup();\n\t\t}\n\t\t\n\t\t// raise the onAfterModulesSetup event.\n\t\t$this->onAfterModulesSetup(new CEvent($this));\n\t\t\n\t}", "public function initModules() {\n\t\t\n\t\t/* first load all files to prevent missing requirements */\n\t\tforeach ($this->modules as $name => &$module) {\n\t\t\tif (!class_exists($name)) {\n\t\t\t\trequire_once($this->configDir.$name.'.php');\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* init objects */\n\t\tforeach ($this->modules as $name => &$module) {\n\t\t\t/* initialize module */\n\t\t\t$module = new $name($this);\n\t\t\t/* fetch settings from module */\n\t\t\t$this->set($module->settings());\n\t\t\t/* switch designs */\n\t\t\tif ($module instanceof LonelyDesign) {\n\t\t\t\t$this->design = $module;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->modulesInitialized = true;\n\t\t\n\t}", "protected static function addModuleConfigurationsToDb()\n {\n static::_addMainConfigurationEntries();\n static::_addCredentialsConfigurationEntries();\n static::_addTransactionsConfigurationEntries();\n static::_addWpfConfigurationEntries();\n static::_addOrderConfigurationEntries();\n static::_addThreedsOptions();\n static::_addScaExemptionOptions();\n }", "protected function _initConfiguration()\n {\n \t$front = Zend_Controller_Front::getInstance();\n \t$front->registerPlugin(\n \t\tnew Core_Controller_Plugin_Authentication()\n \t);\n \t\n \t$options = $this->getApplication()->getOptions();\n \tZend_Registry::set ( 'config', $options );\n \t\n \tset_include_path(implode(PATH_SEPARATOR, array(\n\t\t realpath(APPLICATION_PATH . '/modules/' . $this->_moduleName . '/model'),\n\t\t realpath(APPLICATION_PATH . '/modules/' . $this->_moduleName . '/service'),\n\t\t realpath(APPLICATION_PATH . '/modules/' . $this->_moduleName . '/mapper'),\n\t\t get_include_path(),\n\t\t)));\n\t\t\n defined('APPLICATION_PUB')\n || define('APPLICATION_PUB', BASE_PATH . '/../../application/backend' . '/modules/' . $this->_moduleName);\n \t}", "protected function _initConfiguration()\n {\n $options = $this->getApplication()->getOptions();\n Zend_Registry::set('config', $options);\n defined('APPLICATION_PUB')\n || define('APPLICATION_PUB', BASE_PATH . '/../application' . '/modules/' . $this->_moduleName);\n }", "private function _setupConfiguration()\n {\n $configuration = array();\n\n //@todo: Update configuration parameters\n if (!empty($GLOBALS['conf']['kolab']['ldap'])) {\n $configuration = $GLOBALS['conf']['kolab']['ldap'];\n }\n if (!empty($GLOBALS['conf']['kolab']['server'])) {\n $configuration = $GLOBALS['conf']['kolab']['server'];\n }\n\n if (isset($configuration['server'])) {\n $configuration['hostspec'] = $configuration['server'];\n unset($configuration['server']);\n }\n\n if (isset($configuration['phpdn'])) {\n $configuration['binddn'] = $configuration['phpdn'];\n unset($configuration['phpdn']);\n }\n\n if (isset($configuration['phppw'])) {\n $configuration['bindpw'] = $configuration['phppw'];\n unset($configuration['phppw']);\n }\n\n $this->_injector->setInstance(\n 'Horde_Kolab_Server_Configuration', $configuration\n );\n }", "static private function init_modules() {\n\n\t\t\t/* Admin */\n\t\t\tRed_Security_Package_Admin::init();\n\n\t\t\t/* Plugin History */\n\t\t\tPlugin_History::init();\n\t\t\tPlugin_History_Rest::init();\n\t\t}", "public static function init(){\n $envModules = config('env.'.getEnv('ENVIRONMENT').'.modules',[]);\n\n foreach($envModules as $envModule){\n $requiredFile = path(getEnv('MODULES_DIR').\"/{$envModule}/Module.php\");\n $moduleCls = \"Modules\\\\{$envModule}\\\\Module\";\n\n if(is_file($requiredFile)){\n require_once $requiredFile;\n\n if(class_exists($moduleCls)){\n self::$modules[$envModule] = new $moduleCls();\n }\n }\n }\n }", "protected function initializeModules()\n {\n $modules = array(\n 'accounts'\n );\n $modules = array_merge($modules, $this->config['modules']);\n foreach ($modules as $module) {\n $this->initializeProvider($module);\n $this->initializeTwigModule($module);\n }\n\n $this->initializeTwigModule('general');\n }", "public function prepSettings() {\n\t\tglobal $mbp_config;\n\t}", "abstract protected function prepareAndGetGridConfig();", "public final function prep(){\n\n //disable apache from append session ids to requests\n ini_set('session.use_trans_sid',0);\n //only allow sessions to be used with cookies\n ini_set('session.use_only_cookies',1);\n\n //base directory of application\n //$this->path = dirname($_SERVER['DOCUMENT_ROOT']);\n $this->path = dirname(dirname(dirname(dirname(dirname(__DIR__)))));\n \n //load the appropriate application production configuration \n //and override with any dev config.\n if(is_file($this->path.'/.config.php')){\n $this->config = require($this->path.'/.config.php');\n if($this->config['APP_MODE']!='PROD' && is_file($this->path.'/.dev.config.php')){\n $this->config = array_merge($this->config,require($this->path.'/.dev.config.php'));\n }//if\n }//if\n \n //if the COMPOSER PATH isn't set then resort to the default installer path \"vendor/\"\n if(!isset($this->config['COMPOSER_PATH'])){\n $this->config['COMPOSER_PATH'] = 'vendor';\n }//if\n\n }", "protected function modulePrepare()\n {\n $m = array();\n $m['plugged'] = $m['news'] = $m['system'] = array();\n\n $sys = Config::get('app.module.system');\n\n $m['news'] = Module::findNews();\n\n $all = Module::getAll();\n\n $manager = $this->get('site_manager');\n\n // Remove site_manager if cms is single site\n if (!$manager->isMulti()) {\n unset($all['site_manager']);\n }\n\n foreach ($all as $k => $mod) {\n\n if (in_array($k, $sys)) {\n $mod->module_class = 'is-core-block';\n $m['system'][$k] = $mod;\n } else {\n $mod->module_class = 'is-plugged-block';\n $m['plugged'][$k] = $mod;\n }\n }\n\n return $m;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
REST API for retrieving software caching data for software widget
public function caching_software_widget() { $obj = new View(); if (! $this->authorized()) { $obj->view('json', array('msg' => 'Not authorized')); return; } $queryobj = new Caching_model(); $sql = "SELECT sum(appletvsoftware) AS appletv, sum(macsoftware) AS mac, sum(iossoftware) AS ios FROM caching LEFT JOIN reportdata USING (serial_number) ".get_machine_group_filter(); $caching_array = $queryobj->query($sql); $obj->view('json', array('msg' => current(array('msg' => $caching_array[0])))); }
[ "public function caching_widget()\n {\n $obj = new View();\n if (! $this->authorized()) {\n $obj->view('json', array('msg' => 'Not authorized'));\n return;\n }\n\n $queryobj = new Caching_model();\n\n $sql = \"SELECT sum(bytesfromcachetoclients) AS fromcache,\n sum(bytespurgedtotal) AS purgedbytes,\n sum(bytesfromorigintoclients) AS fromorigin\n FROM caching\n LEFT JOIN reportdata USING (serial_number)\n \".get_machine_group_filter();\n\n $caching_array = $queryobj->query($sql);\n\n $obj->view('json', array('msg' => current(array('msg' => $caching_array[0]))));\n }", "public function getCacheApis()\n {\n Yii::$app->cache->get(static::APIS_CACHE_KEY);\n }", "public function get_data_to_cache();", "protected function getApiFromCache()\n {\n //@todo: implement the cache mechanism\n return json_encode($this->createApi());\n }", "public function getCache();", "function getCachedWidgetData();", "public function getCacheComponent();", "public function getCacheInfo();", "public function getCachedData();", "public static function getCacheControl () {}", "public function getDataForCache();", "public function cacheBin() {\n return 'cache_forsrights_webservice';\n }", "public function get() {\n\n if(!$this->isAvailable() || $this->isIgnored()) return false;\n\n return $this->data = \\Kirby\\Toolkit\\Cache::get($this->id); \n \n }", "public function getCacheServices();", "public function cacheBin() {\n return 'cache_agency_webservice';\n }", "public function configureCacheFrontEnd();", "function get_cache_data()\n{\n $cache_file = realpath('cache') .DIRECTORY_SEPARATOR. '_datacache.php';\n // Figure if cache has expired\n // 1 hour = 3,600 seconds\n // 3 hours = 10,800 seconds\n // 1 day = 86,400 seconds\n if(!file_exists($cache_file) || (time() - filemtime($cache_file)) >= 3600) {\n $data = make_info_json();\n }\n else\n {\n if(!is_readable($cache_file)) die('Cache file could not be read!');\n $data = json_decode(file_get_contents($cache_file), true);\n }\n return $data;\n}", "public function appData()\n {\n return Cache::remember('ej:sdk:app-data', 120, function () {\n return $this->http->get('/');\n });\n }", "public function getCacheParams(): array;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the delimiter between mailboxes: INBOX/Test, or INBOX.Test
function sqimap_get_delimiter ($imap_stream = false) { global $sqimap_delimiter, $optional_delimiter; /* Use configured delimiter if set */ if((!empty($optional_delimiter)) && $optional_delimiter != 'detect') { return $optional_delimiter; } /* Delimiter is stored in the session from redirect. Try fetching from there first */ if (empty($sqimap_delimiter)) { sqgetGlobalVar('delimiter',$sqimap_delimiter,SQ_SESSION); } /* Do some caching here */ if (!$sqimap_delimiter) { if (sqimap_capability($imap_stream, 'NAMESPACE') /* * According to something that I can't find, this is supposed to work on all systems * OS: This won't work in Courier IMAP. * OS: According to rfc2342 response from NAMESPACE command is: * OS: * NAMESPACE (PERSONAL NAMESPACES) (OTHER_USERS NAMESPACE) (SHARED NAMESPACES) * OS: We want to lookup all personal NAMESPACES... * * TODO: remove this in favour of the information from sqimap_get_namespace() */ && ($read = sqimap_run_command($imap_stream, 'NAMESPACE', true, $a, $b)) && preg_match('/\* NAMESPACE +(\( *\(.+\) *\)|NIL) +(\( *\(.+\) *\)|NIL) +(\( *\(.+\) *\)|NIL)/i', $read[0], $data) && preg_match('/^\( *\((.*)\) *\)/', $data[1], $data2)) { $pn = $data2[1]; $pna = explode(')(', $pn); $delnew = array(); while (list($k, $v) = each($pna)) { $lst = explode('"', $v); if (isset($lst[3])) { $delnew[$lst[1]] = $lst[3]; } else { $delnew[$lst[1]] = ''; } } $sqimap_delimiter = array_shift($delnew); } else { fputs ($imap_stream, ". LIST \"INBOX\" \"\"\r\n"); $read = sqimap_read_data($imap_stream, '.', true, $a, $b); $read = $read['.'][0]; //sqimap_read_data() now returns a tag array of response array $quote_position = strpos ($read[0], '"'); $sqimap_delimiter = substr ($read[0], $quote_position+1, 1); } } return $sqimap_delimiter; }
[ "protected function getServerDelimiter() {\n $this->InitializePermanentStorage();\n if (isset($this->permanentStorage->serverdelimiter)) {\n return $this->permanentStorage->serverdelimiter;\n }\n\n $list = @imap_getmailboxes($this->mbox, $this->server, \"*\");\n if (is_array($list) && count($list) > 0) {\n // get the delimiter from the first folder\n $delimiter = $list[0]->delimiter;\n $this->permanentStorage->serverdelimiter = $delimiter;\n } else {\n // default\n $delimiter = \".\";\n }\n return $delimiter;\n }", "public function testPathDelimiterHasADefault(): void\n {\n $this->assertNotEmpty($this->getMailbox()->getPathDelimiter());\n }", "protected function _getServerDelimiter() {\n\t\tif (!$this->_server_delimiter) {\n\t\t\t$imap = $this->_imapLogon();\t\t\t\n\t\t\tif(!$imap)\n\t\t\t\tthrow new StatusException(\"Could not logon to IMAP server\");\n\t\t\t\n\t\t\t$this->_server_delimiter = $imap->get_mailbox_delimiter();\n\t\t}\n\t\treturn $this->_server_delimiter;\n\t}", "public function getDelimiter()\n\t{\n\t\treturn $this->oImapFolder->Delimiter();\n\t}", "public function getSeparatorOfNesting(){\n return('.');\n }", "function AutoCompGetSeparator(){}", "public function getFieldsSeparator();", "public function getSeparator();", "protected function getEventMsgSeparatorChar()\n {\n return '!|||!';\n }", "function sent_subfolders_special_mailbox($mb) {\n global $data_dir, $username, $sent_folder;\n\n sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);\n/*\n if( $imap_server_type == 'uw' ) {\n $cnd_delimiter = '';\n } else {\n $cnd_delimiter = $delimiter;\n }\n*/ \n $cnd_delimiter = $delimiter;\n\n $use_sent_subfolders = getPref\n ($data_dir, $username, 'use_sent_subfolders', SMPREF_OFF);\n $sent_subfolders_base = getPref($data_dir, $username, 'sent_subfolders_base', $sent_folder);\n\n if ($use_sent_subfolders == SMPREF_ON && \n ($mb == $sent_subfolders_base || stristr($mb,$sent_subfolders_base. $cnd_delimiter) ) ) {\n\treturn 1;\n }\n return 0;\n}", "public function get_hierarchy_delimiter()\n {\n return $this->delimiter;\n }", "public function delimiters() { return ['.', '?', ',', ';', '!']; }", "function get_contact_group($message) {\n\tpreg_match(\"/^\\[(.*?)\\]/\",$message,$temp);\n\t$ttemp = explode(';',$temp[1]);\n\treturn $ttemp[0];\n}", "public function getdefault_text_separator() {\n\t\treturn \\go\\modules\\core\\users\\model\\Settings::get()->defaultTextSeparator;\n\t}", "public function getDefaultSeparator()\r\n\t{\r\n\t\treturn $this->_defaultSeparator;\r\n\t}", "public function getdefault_list_separator() {\n\t\treturn \\go\\modules\\core\\users\\model\\Settings::get()->defaultListSeparator;\n\t}", "public function getSeparator()\n {\n return $this->contentSeparator;\n }", "public function getSeparator(): string\n {\n return ListSeparator::UNDECIDED;\n }", "public static function getDelimiterDefault(): string\n {\n return static::$delimiterDefault;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the VedjustAffairs model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = VedjustAffairs::findOne($id)) !== null) { return $model; } throw new NotFoundHttpException('The requested page does not exist.'); }
[ "protected function findModel($id)\n {\n if (($model = Certificate::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Menu::findOne([ 'id' => $id ])) !== null)\n {\n return $model;\n }\n else\n {\n throw new HttpException(404, Yii::t('backend', 'The requested page does not exist.'));\n }\n }", "public static function find( $primaryKey )\n\t{\n\t\tself::init();\n\t\t\n\t\t// Select one item by primary key in Database\n\t\t$result = Database::selectOne(\"SELECT * FROM `\" . static::$table . \"` WHERE `\" . static::$primaryKey . \"` = ?\", $primaryKey);\t\t\n\t\tif( $result == null )\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Create & return new object of Model\n\t\treturn self::newItem($result);\n\t}", "protected function findModel($idPesquisador)\n {\n if (($model = Pesquisador::findOne($idPesquisador)) !== null)\n {\n return $model;\n } else\n {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }", "protected function findModel($id)\n\t{\n\t\tif (($model = Budget::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "protected function findModel($id_riwayat)\n {\n if (($model = Riwayat::findOne($id_riwayat)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }", "public function actionLookup() {\n $attrs = $_POST;\n unset($attrs['user']);\n unset($attrs['userKey']);\n $tempModel = new $this->modelClass('search');\n\n // Use only attributes that the model has\n $attrs = array_intersect_key($attrs, $tempModel->attributes);\n $model = X2Model::model($this->modelClass)->findByAttributes($attrs);\n\n // Did we find the requested model? If not, raise an error\n if (is_null($model)) {\n $this->_sendResponse(404, 'No Item found with specified attributes.');\n } else {\n $this->_sendResponse(200, $model->attributes, true);\n }\n }", "protected function findModel($id)\n {\n if (($model = Aulasemestral::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = InvtRepair::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('ไม่พบหน้าที่ต้องการ.');\n }\n }", "protected function findModel($id)\n {\n $modelClass = $this->getModel();\n if (($model = $modelClass->findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, Yii::t('app', 'The requested page does not exist.'));\n }\n }", "protected function findModel($id) {\r\n\t\t$model = RefundSheetApply::find ()->alias ( \"refundApply\" )->joinWith ( \"vip vip\" )->joinWith ( \"order order\" )->joinWith ( \"status0 stat\" )->where ( [ \r\n\t\t\t\t'refundApply.id' => $id \r\n\t\t] )->one ();\r\n\t\t\r\n\t\tif ($model) {\r\n\t\t\t// if (($model = RefundSheetApply::findOne($id)) !== null) {\r\n\t\t\treturn $model;\r\n\t\t} else {\r\n\t\t\tthrow new NotFoundHttpException ( Yii::t ( 'app', 'The requested page does not exist.' ) );\r\n\t\t}\r\n\t}", "protected function findModel($id)\n {\n if (($model = AeExtArticle::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n \tif (($model = AuthItem::findOne($id)) !== null) {\n \t\treturn $model;\n \t} else {\n \t\tthrow new NotFoundHttpException('The requested page does not exist.');\n \t}\n }", "protected function findOrFail($key)\n {\n return $this->model->where($this->model->getRouteKeyName(), $key)->firstOrFail();\n }", "protected function findModel($id)\n {\n if (($model = ArsAccommodation::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Assortment::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n $user_id = Yii::$app->user->identity->id;\n // $model = $this->findModel($id);\n $modelApplicant = Applicant::find()->where(\"user_id = {$user_id}\")->one();\n if (($model = Application::findOne(['application_id'=>$id,'applicant_id'=>$modelApplicant->applicant_id])) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Advert::findOne($id)) !== null) {\n return $model;\n }\n\n throw new HttpException(200,Yii::t('base',40001));\n }", "protected function findModel($id)\n {\n \t$model = SoSheetDetail::find()->alias('soDetail')\n \t->joinWith('order order')\n \t->joinWith('package package')\n \t->joinWith('product product')\n \t->where(['soDetail.id' => $id])->one();\n \t \n \tif($model !==null){\n// if (($model = SoSheetDetail::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ManyToOne (inverse side) Get fkImobiliarioTrecho
public function getFkImobiliarioTrecho() { return $this->fkImobiliarioTrecho; }
[ "public function getFkImobiliarioTrechos()\n {\n return $this->fkImobiliarioTrechos;\n }", "public function getFkImobiliarioImobiliaria()\n {\n return $this->fkImobiliarioImobiliaria;\n }", "public function getFkImobiliarioConfrontacaoTrecho()\n {\n return $this->fkImobiliarioConfrontacaoTrecho;\n }", "public function getFkImobiliarioCondominio()\n {\n return $this->fkImobiliarioCondominio;\n }", "public function getFkImobiliarioCorretagem()\n {\n return $this->fkImobiliarioCorretagem;\n }", "public function getFkImobiliarioImovelImobiliaria()\n {\n return $this->fkImobiliarioImovelImobiliaria;\n }", "public function getFkImobiliarioNaturezaTransferencia()\n {\n return $this->fkImobiliarioNaturezaTransferencia;\n }", "public function getFkImobiliarioImovel()\n {\n return $this->fkImobiliarioImovel;\n }", "public function getFkFrotaMotorista()\n {\n return $this->fkFrotaMotorista;\n }", "public function getFkImobiliarioConfrontacao()\n {\n return $this->fkImobiliarioConfrontacao;\n }", "public function getFkImobiliarioVigencia()\n {\n return $this->fkImobiliarioVigencia;\n }", "public function getFkImobiliarioLoteamento()\n {\n return $this->fkImobiliarioLoteamento;\n }", "public function getFkImobiliarioTransferenciaEfetivacao()\n {\n return $this->fkImobiliarioTransferenciaEfetivacao;\n }", "public function getFkMonetarioAcrescimo()\n {\n return $this->fkMonetarioAcrescimo;\n }", "public function getFkImobiliarioLocalizacao()\n {\n return $this->fkImobiliarioLocalizacao;\n }", "public function getFkImobiliarioConfrontacaoTrechos()\n {\n return $this->fkImobiliarioConfrontacaoTrechos;\n }", "public function getFkImobiliarioTransferenciaDocumentos()\n {\n return $this->fkImobiliarioTransferenciaDocumentos;\n }", "public function getFkImobiliarioTransferenciaCorretagem()\n {\n return $this->fkImobiliarioTransferenciaCorretagem;\n }", "public function getFkPatrimonioNatureza()\n {\n return $this->fkPatrimonioNatureza;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of Modifiable.
public function getModifiable() { return $this->modifiable; }
[ "public function getPersistableValue();", "public function getEditableValue();", "public function getModificado()\n {\n return $this->modificado;\n }", "public function __invoke()\n {\n return $this->getValue();\n }", "function get_value_edit()\n\t{\n\t\treturn $this->value;\n\t}", "function get_value() {\n if (isset($this->value))\n return $this->value;\n \n $Tainacan_Item_Metadata = \\Tainacan\\Repositories\\Item_Metadata::get_instance();\n return $Tainacan_Item_Metadata->get_value($this);\n }", "public function getValue(): mixed;", "public function isModifiable(): bool;", "function generate_read_only() {\n\t\tif ($this->value) {\n\t\t\treturn $this->value;\n\t\t} else {\n\t\t\treturn $this->empty_value;\n\t\t}\n\t}", "public function getMod()\n {\n return $this->mod;\n }", "function getModerated() {\n\t\treturn $this->_Moderated;\n\t}", "function readCanModify() { return $this->_canmodify; }", "public function getModifyuser()\n {\n return $this->modifyuser;\n }", "public function getModification()\n {\n return $this->modification;\n }", "public function getModifier()\n {\n return isset($this->Modifier) ? $this->Modifier : null;\n }", "public function get_value() {\n return $this->value;\n }", "public function getProtectedCustomFieldValue()\n {\n return $this->protected_custom_field_value;\n }", "public function _getValue() {\n\t\tif($this->encrypted) { \n\t\t\treturn baseModel::decrypt($this->value); \n\t\t}\n\t\telse {\n\t\t\treturn $this->value;\n\t\t}\n\t}", "public function getModifier()\n {\n return $this->modifier;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flags pinned events for pin key that need to be retried with PENDING status.
public function flagPinKeyRetryEventsAsPending( $channel, $pinKey, $maxQueueId = null ) { $validStatuses = [ EventQueue::STATUS_EXCEPTION_OCCURRED, EventQueue::STATUS_SKIPPED, EventQueue::STATUS_PENDING, EventQueue::STATUS_NOT_DISPATCHED ]; $queryBuilder = $this ->createQueryBuilder('q') ->update() ->set('q.status', ':pendingStatus') ->set('q.workerId', 'NULL') ->set('q.modifiedOn', ':now') ->where( 'q.channel = :channel', 'q.pinKey = :pinKey', 'q.status IN (:validStatuses)' ) ->setParameters([ 'pendingStatus' => EventQueue::STATUS_PENDING, 'now' => time(), 'channel' => $channel, 'pinKey' => $pinKey, 'validStatuses' => $validStatuses ]); if ($maxQueueId) { $queryBuilder ->andWhere('q.queueId <= :maxQueueId') ->setParameter('maxQueueId', $maxQueueId); } return $queryBuilder->getQuery()->execute(); }
[ "protected function prependPinnedEvent($event, $pinKey)\n {\n // Adding a pinned event is more complicated than adding standard events.\n // To notify the workers that there is a pinned event, we still need to\n // add something into the channel's main queue. But instead of adding\n // the event itself, we add a pointer to the pin key. The event itself\n // is added to the pin key's dedicated queue. When a worker receives the\n // pointer from the main queue, it knows to process events from the\n // pinned queue. This scheme gurantees that:\n //\n // 1. Pinnned events are processed in a first come, first serve\n // order just like standard events\n // 2. Events for the same pin key are processed in series\n\n $script = \"\n -- Ensure the channel is not stopped or in the process of stopping.\n\n local channelStatus = redis.call('HGET', KEYS[1], '\" . self::STATE_STATUS . \"')\n\n if channelStatus == '\" . self::STATUS_STOPPING . \"' or\n channelStatus == '\" . self::STATUS_STOPPED . \"' then\n return -1\n end\n\n -- Add pin key pointer to the beginning of the channel's main queue\n -- and the pinned event to the beginning of the pin key's queue.\n -- Also increment the pending event count.\n\n redis.call('LPUSH', KEYS[2], ARGV[1])\n redis.call('LPUSH', KEYS[3], ARGV[2])\n redis.call('HINCRBY', KEYS[1], '\" . self::STATE_PENDING_EVENT_COUNT . \"', 1)\n return 1\";\n\n $keys = [\n $this->getStateKey(),\n $this->getEventsKey(),\n $this->getPinnedEventsKey($pinKey)\n ];\n\n $args = [\n $this->getPinKeyPointer($pinKey),\n $event\n ];\n\n $result = $this->redis->runScript($script, $keys, $args);\n\n if ($result == -1) {\n throw new \\RuntimeException(\"'{$this->channelId}' channel does not have appropriate status for pre-pending pinned event\");\n }\n }", "public static function pendingStatusMap() {\n return array(\n 'address' => PAYPAL_PAYMENT_STATUS_ADDRESS,\n 'authorization' => PAYPAL_PAYMENT_STATUS_WAITING_FOR_CAPTURE,\n 'echeck' => PAYPAL_PAYMENT_STATUS_WAITING_FOR_CLEARANCE,\n 'intl' => PAYPAL_PAYMENT_STATUS_INTL,\n 'multi-currency' => PAYPAL_PAYMENT_STATUS_MULTI_CURRENCY,\n 'order' => PAYPAL_PAYMENT_STATUS_WAITING_FOR_CAPTURE,\n 'paymentreview' => PAYPAL_PAYMENT_STATUS_REVIEW,\n 'unilateral' => PAYPAL_PAYMENT_STATUS_UNILATERAL,\n 'upgrade' => PAYPAL_PAYMENT_STATUS_UPGRADE,\n 'verify' => PAYPAL_PAYMENT_STATUS_VERIFY,\n 'other' => PAYMENT_STATUS_PENDING,\n );\n }", "public function isPending();", "protected function _statusPending()\n {\n $this->_logger->info('Not doing anything in _statusPending: ' . $this->_ipnMessage->getPaymentId() . '::' . $this->_dataIpn['pending_reason']);\n }", "private function updatePinStatus($pinned = false)\n\t{\n\t\t$pinnedStaus = 0;\n\t\tif ($pinned) {\n\t\t\t$pinnedStaus = 1;\n\t\t}\n\t\t\\App\\Db::getInstance()->createCommand()->update(self::$itemsTable, ['pinned' => $pinnedStaus], [self::$itemId => $this->getId()])->execute();\n\t}", "public function isPendingState();", "protected function _statusPending()\n {\n $this->_writeLog('Not doing anything in _statusPending: ' . $this->_postData['pending_reason']);\n }", "public function markAsPending() {\n $this->status = parent::STATUS_PENDING;\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n\n return $this->save(false);\n }", "public function isPending(): bool\n {\n return $this->status === static::STATUS_PENDING;\n }", "public function set_in_progress_flag();", "function snax_get_item_pending_status() {\n\treturn apply_filters( 'snax_item_pending_status', 'pending' );\n}", "protected function isPending(){\n return parent::isStatusOf(STATUS_TYPE_SSS_QUESTION_PENDING);\n }", "protected function processPinnedEvents($pinKey, &$deactivatedReason = null)\n {\n // Track whether this pin key has a blocking event. Not only\n // must pinned events be processed in order, but the #2\n // pinned event must be skipped if the #1 event failed or\n // was never processed. Setting to null indicates that it's\n // unknown whether a blockage exists so the worker will\n // query the database queue to find out.\n $this->currentPinKeyHasBlock = null;\n\n // Retrieve the next queued event for this pin key.\n while ($event = $this->getNextPinnedEvent($pinKey, $deactivatedReason)) {\n $result = $this->processEvent($event);\n $this->logEventProcessingResult($event, $result);\n $this->clearEntityManagers();\n\n if (!$result->isSuccessful()) {\n $this->currentPinKeyHasBlock = true;\n }\n }\n }", "function add_awaiting_shipment_to_order_statuses( $order_statuses ) {\n \n $new_order_statuses = array();\n \n // add new order status after processing\n foreach ( $order_statuses as $key => $status ) {\n \n $new_order_statuses[ $key ] = $status;\n \n if ( 'wc-processing' === $key ) {\n $new_order_statuses['wc-awaiting-shipment'] = 'Awaiting shipment';\n }\n }\n \n return $new_order_statuses;\n}", "public function markInProgress()\n {\n $this->update(['status' => config('constants.hr.status.in-progress.label')]);\n }", "public function hasPendingActions()\r\n {\r\n }", "public function withPending()\n {\n\n }", "public function isPending()\n\t{\n\t\tif($this->test_status_id == Test::PENDING)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "public function isPending()\n {\n return $this->{$this->getStatusColumn()} == Status::PENDING;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resolves a path used in the CSS so that the user can use paths like normal css rather than PHP
public static function resolve_path($path) { if($path[0] == "/") { $path = DOCROOT.$path; } else { # Join the CSS directory with the requested directory $path = join_path(CSSPATH,CSScaffold::config('core.request.relative_dir'),$path); # Get the full server path to the file $path = realpath($path); } return $path; }
[ "public function getCssPath()\n {\n return $this->_path . self::PATH_CSS;\n }", "function css_path()\n{\n return Assets::assets_url('css');\n}", "protected function getCSSPath(){\n return $this->cssPath;\n }", "public function css()\n\t{\n\t\t// grab requested css file while stripping extension\n\t\t$css = $this->strip_extension(url::current(), 'css');\n\t\t// if file is present then display\n\t\tif( $this->find_file( $css, 'css' ) ){\n\t\t\t$this->display_file( $css, 'css' );\n\t\t}\n\t}", "function ADMIN_CSS_URL()\n\t{\n\t\treturn url('admin/css').\"/\";\n\t}", "function css_url($filename){\n return base_url('public/v2/css/'.$filename);\n }", "abstract protected function get_css_file_name();", "function includeCss($path) {\n echo '<link rel=\"stylesheet\" href=\"' . $this->getUrl($path) . '\">';\n }", "function _stylesheet_path() {\n\t\t$CI =& get_instance();\n\t\treturn $CI->config->item('OCU_stylesheet_path');\n\t}", "public static function css_url() {\n\t\tif ( self::$css_url ) {\n\t\t\treturn self::$css_url;\n\t\t}\n\n\t\treturn self::$css_url = self::assets_url().'css/';\n\t}", "static public function css_url()\n\t{\n\t\treturn self::url('css/' . DIRINDEX_CSS);\n\t}", "function getCssPath() {\n\t\treturn '/' . parent::getPluginPath() . '/css/';\n\t}", "function getPlaceHolderStylePath()\n\t{\n\t\treturn \"./Services/COPage/css/placeholder.css\";\n\t}", "function _drupal_build_css_path($matches, $base = NULL) {\n $_base = &drupal_static(__FUNCTION__);\n // Store base path for preg_replace_callback.\n if (isset($base)) {\n $_base = $base;\n }\n\n // Prefix with base and remove '../' segments where possible.\n $path = $_base . $matches[1];\n $last = '';\n while ($path != $last) {\n $last = $path;\n $path = preg_replace('`(^|/)(?!\\.\\./)([^/]+)/\\.\\./`', '$1', $path);\n }\n return 'url(' . $path . ')';\n}", "function get_static_css_path($file = NULL)\n {\n return get_static_asset($file, 'css/'); \n }", "Protected function css_fixPaths ( $css = '', $scriptPath = '' ){\n\t\t\tif ( empty( $scriptPath ) || empty($css) ) return $css;\t\t\t\t\t\t\n\t\t\t// remove file name\n\t\t\tif (stripos($scriptPath,$_SERVER['DOCUMENT_ROOT']) !== FALSE) \n\t\t\t\t$scriptPath = substr($scriptPath,strlen($_SERVER['DOCUMENT_ROOT']));\n\t\t\t$s_path = @explode( '/',$scriptPath );\n\t\t\t@array_pop ( $s_path );\t\n\t\t\t//find css urls \t\n\t\t\tif ( preg_match_all( '#url\\((.+)\\)#smUi',$css,$urls ) >0 ){\n\t\t\t\t$urls = array_unique($urls[1]);\t\n\t\t\t\t// Found some - discard duplicates\n\t\t\t\tforeach( $urls as $url ){\t\t\t\t\t\t\t\t\t\t\t// Process each url\n\t\t\t\t\tif (stripos($url,\"http\") !== FALSE) continue;\n\t\t\t\t\t$spath = implode( '/',$s_path ).\"/\";\n\t\t\t\t\t$url_cleaned = $this->clean($url);\n\t\t\t\t\t$num = preg_match_all( '#\\.\\./#',$url,$backup );\t\t\t\t// Detect relative parent paths\n\t\t\t\t\t// If none found then it is a sub directry.\n\t\t\t\t\t// If found then we need to back up the tree\n\t\t\t\t\tif ( $num>0 ) {\t\n\t\t\t\t\t\t$path =\t$s_path;\t\t\t\t\t\t\t\t\t\t\t//a ). it's off of a parent directory.\n\t\t\t\t\t\tfor ( $i = 0; $i < $num; $i++ ) @array_pop ( $path );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$new_url =array( str_replace( '../','', $url_cleaned ) );\t\t//Remove the ../ ( we know how many there are )\n\t\t\t\t\t\t$full_url = @implode( '/',array_merge( $path, $new_url ) );\t\t//Create the full url from the scripts path and the relative path\n\t\t\t\t\t\t$full_url = '\"'. $this->clean( $full_url) . '\"';\n\t\t\t\t\t\t$css = str_replace( $url, $full_url, $css ); \t\t\t\t//replace all occurancies\n\t\t\t\t\t}\n\t\t\t\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//b ). it's a subdirectory.\n\t\t\t\t\t\tif (stripos($url,'index.php') === FALSE){\n\t\t\t\t\t\t\tif (!@file_exists( $_SERVER['DOCUMENT_ROOT'].$url_cleaned))\n\t\t\t\t\t\t\t$css = str_replace( $url, '\"' .$this->clean( $spath.$url_cleaned) . '\"', $css );\t\t\t\t//just append and replace\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\treturn $css;\n\t\t}", "private static function _getPageCSSPath()\n {\n Channels::includeSystem('GUI');\n $cssPath = '/__web/'.GUI::getSystemWebPath('Help').'/Templates/Help/Help.css';\n return $cssPath;\n\n }", "function dirindex_css_url()\n{\n\tglobal $dirindex_fugue_mobi;\n\n\techo $dirindex_fugue_mobi->css_url();\n}", "public function GetDocutilsCssPath () {\n\t\t$s_cmd = $this->GetPathRst2Html()\n\t\t\t. '--help |grep -A7 stylesheet-path=';\n\t\texec($s_cmd, $ar_out);\n\t\t$s_out = implode('', $ar_out);\n\t\t$s_out = str_replace(' ', '', $s_out);\n\n\t\t// Find the css path\n\t\tif (0 < preg_match('/Default: \\\"(\\S+?)\\\"/i', $s_out, $ar)) {\n\t\t\t$s_out = $ar[1];\n\t\t\t$this->Log(\"Got docutils css path: $s_out\", 1);\n\t\t}\n\t\telse {\n\t\t\t$s_out = '';\n\t\t\t$this->Log('Can\\'t find docutils css path.', 4);\n\t\t}\n\n\t\treturn $s_out;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return capture information for a specific pokemon.
public function show($id) { // Get url with safeURL helper function. $url = $this->safeURL(); // Attempt to retrieve a capture with the matching pokemon id (of the desired pokemon) from the database. $capture = auth()->user()->captures()->where('pokemon_id', $id)->first(); // Retrieve the pokemon with the provided id from the database. $pokemon = Pokemon::select('id', 'name')->where('id', $id)->first(); // Attach a self link to the pokemon. $pokemon['links'] = [ 'self' => "{$url}/api/pokemon/{$pokemon['id']}" ]; // If no capture existed with a pokemon_id that matched the provided id, fail. if (!$capture) { // Return json response. 400 - Bad Request return response()->json([ 'success' => false, 'message' => auth()->user()->name." has not marked {$pokemon->name} as captured. No captured on file.", ], 400); } // Else, return json response. 200 - OK return response()->json([ 'success' => true, 'message' => "Capture for {$pokemon->name} was successfully retrieved for trainer ".auth()->user()->name.".", 'data' => [ 'capture' => $capture, 'pokemon' => $pokemon ] ], 200); }
[ "public function getPokemonData()\n {\n return $this->pokemon_data;\n }", "public function getPokemon()\n {\n return $this->pokemon;\n }", "public function getCatchablePokemon()\n {\n\n\n }", "public function getCurrentPokemonInfo():array {\n if (!$this->player) return [\"name\"=>\"\",\"type\"=>\"\",\"stamina\"=>0,\"attack\"=>0,\"defense\"=>0];\n \n $pokemon = $this->player->getPokemon();\n if (!$pokemon) return [\"name\"=>\"\",\"type\"=>\"\",\"stamina\"=>0,\"attack\"=>0,\"defense\"=>0];\n \n $level = $this->player->getLevel();\n return $this->getPokemonInfo($pokemon, (int)$level);\n }", "public function isCaptured($pokemonid)\n {\n return Auth::user()->pokemon->find($pokemonid);\n }", "public function isCaptured($pokemonid);", "public function getPokemonDisplay()\n {\n return $this->pokemon_display;\n }", "public function getBuddyPokemon()\n {\n return $this->buddy_pokemon;\n }", "public function getAgainstPokemon()\n {\n return $this->againstPokemon;\n }", "public function getIdPokemon()\n {\n return $this->id_pokemon;\n }", "public function getPokemonId()\n {\n return $this->pokemon_id;\n }", "function get_pokemon_info($pokemon_id_form)\n{\n // Split pokedex_id and form\n $dex_id_form = explode('-',$pokemon_id_form);\n $pokedex_id = $dex_id_form[0];\n $pokemon_form = $dex_id_form[1];\n\n /** Example:\n * Raid boss: Mewtwo (#ID)\n * Weather: Icons\n * CP: CP values (Boosted CP values)\n */\n $info = '';\n $info .= getTranslation('raid_boss') . ': <b>' . get_local_pokemon_name($pokemon_id_form) . ' (#' . $pokedex_id . ')</b>' . CR . CR;\n $poke_raid_level = get_raid_level($pokemon_id_form);\n $poke_cp = get_formatted_pokemon_cp($pokemon_id_form);\n $poke_weather = get_pokemon_weather($pokemon_id_form);\n $info .= getTranslation('pokedex_raid_level') . ': ' . getTranslation($poke_raid_level . 'stars') . CR;\n $info .= (empty($poke_cp)) ? (getTranslation('pokedex_cp') . CR) : $poke_cp . CR;\n $info .= getTranslation('pokedex_weather') . ': ' . get_weather_icons($poke_weather) . CR . CR;\n\n return $info;\n}", "public function get_pokemon_data_by_name ($name) {\n $url = 'https://graphql-pokemon.now.sh/';\n $ret = wp_remote_post( $url, array(\n 'timeout' => 5,\n 'redirection' => 5,\n 'httpversion' => '1.0',\n 'blocking' => true,\n 'headers' => array(),\n 'body' => array('query' =>\n '{\n pokemon(name:\"' . $name . '\") {\n image\n maxHP\n maxCP\n fleeRate\n name\n }\n }'\n ) ,\n 'cookies' => array()\n ) );\n $ret = json_decode($ret['body']);\n $single_pokemon_data = $ret->data->pokemon;\n return $single_pokemon_data;\n }", "public function readReturnsGoodPokemon()\n {\n $user = User::find(1);\n $response = $this->actingAs($user, 'api')->get('/api/pokemon/1');\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'name' => 'Bulbasaur',\n 'number' => 1,\n 'type_1' => 'Grass',\n 'type_2' => 'Poison',\n 'total_points' => 318,\n 'health_points' => 45,\n 'attack_points' => 49,\n 'defense_points' => 49,\n 'special_attack_points' => 65,\n 'special_defense_points' => 65,\n 'speed_points' => 45,\n 'generation' => 1,\n 'legendary' => false\n ]);\n }", "public function pokemon(IRCMessage $msg) {\n $parameters = $msg->getCommandParameters();\n if (!$parameters)\n throw new PokemonModuleException(\"No Pokemon given.\");\n\n $result = $this->getObject($msg->getCommandParameterString());\n $info = new PokemonInfoFormat($result->current());\n\n $format = null;\n //\tTry to replace default format with user-defined format, if possible\n switch ($msg->getCommand()) {\n\n case \"pinfo\":\n try {\n $format = $this->getSetting($msg->getNick(), $this->getSettingObject(\"pinfo\"));\n }\n catch (\\Exception $e) {\n $format = PokemonInfoFormat::getDefaultFormat();\n }\n break;\n\n case \"sinfo\":\n $format = PokemonInfoFormat::getSemanticFormat();\n break;\n\n case \"names\":\n $format = PokemonInfoFormat::getNamesFormat();\n break;\n\n case \"dexes\":\n $format = PokemonInfoFormat::getDexesFormat();\n break;\n\n default:\n throw new PokemonModuleException(\"Unsupported command '{$msg->getCommand()}'.\");\n break;\n\n }\n\n // Use user-saved units if available\n try {\n $units = $this->getSetting($msg->getNick(), $this->getSettingObject(\"units\"));\n\n switch ($units) {\n\n case \"imperial\":\n $info->setUnits(PokemonInfoFormat::UNITS_IMPERIAL);\n break;\n\n case \"metric\":\n $info->setUnits(PokemonInfoFormat::UNITS_METRIC);\n break;\n\n case \"both\":\n $info->setUnits(PokemonInfoFormat::UNITS_BOTH);\n break;\n\n }\n\n }\n // Default to imperial\n catch (\\Exception $e) {\n $info->setUnits(PokemonInfoFormat::UNITS_IMPERIAL);\n }\n\n //\tPass format into info function for results\n $this->respond($msg, $info->parseFormat($format));\n\n // Output spell check suggestions if they are available\n if ($suggestions = $result->formatSuggestions())\n $this->respond($msg, $suggestions);\n }", "public function getPokemon()\n {\n $xary = array();\n foreach ($this->pokemon as $info) {\n $xary[] = new Pokemon($info->resource_id);\n }\n return $xary;\n }", "public function getEvolvedPokemonData()\n {\n return $this->evolved_pokemon_data;\n }", "public function get($pokemonId)\n {\n return $this->pokedexItems[$pokemonId];\n }", "private function getPlayerinfo()\r\n\t{\r\n\t\t$data = $this->cmd(\"\\xFF\\xFF\\xFF\\xFF\\x55\" . pack(\"H*\", $this->challengeNumber));\r\n\t\t\r\n\t\t$rtn[\"type\"]\t= $this->getPacketData($data, \"byte\");\r\n\t\t$rtn[\"player\"]\t= $this->getPacketData($data, \"byte\", true);\r\n\t\t\r\n\t\tfor($i = 0; $i < $rtn[\"player\"]; $i++)\r\n\t\t{\r\n\t\t\t$rtn[\"players\"][$i][\"index\"]\t= $this->getPacketData($data, \"byte\", true);\r\n\t\t\t$rtn[\"players\"][$i][\"name\"]\t= $this->getPacketString($data);\r\n\t\t\t$rtn[\"players\"][$i][\"kills\"]\t= $this->getPacketData($data, \"long\", true);\r\n\t\t\t$rtn[\"players\"][$i][\"connected\"]= $this->hex2float(hexdec($this->getPacketData($data, \"float\")));\r\n\t\t}\r\n\t\t\r\n\t\t$this->playerinfo = $rtn;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a relation declared on a remote class, generate a substitute component for the opposite side of the relation. Notes on behaviour: This can still be used on components that are defined on both sides, but do not need to be. All has_ones on remote class will be treated as local has_many, even if they are belongs_to Polymorphic relationships do not have two natural endpoints (only on one side) and thus attempting to infer them will return nothing. Cannot be used on unsaved objects.
public function inferReciprocalComponent($remoteClass, $remoteRelation) { $remote = DataObject::singleton($remoteClass); $class = $remote->getRelationClass($remoteRelation); $schema = static::getSchema(); // Validate arguments if (!$this->isInDB()) { throw new BadMethodCallException(__METHOD__ . " cannot be called on unsaved objects"); } if (empty($class)) { throw new InvalidArgumentException(sprintf( "%s invoked with invalid relation %s.%s", __METHOD__, $remoteClass, $remoteRelation )); } // If relation is polymorphic, do not infer recriprocal relationship if ($class === self::class) { return null; } if (!is_a($this, $class ?? '', true)) { throw new InvalidArgumentException(sprintf( "Relation %s on %s does not refer to objects of type %s", $remoteRelation, $remoteClass, static::class )); } // Check the relation type to mock $relationType = $remote->getRelationType($remoteRelation); switch ($relationType) { case 'has_one': { // Mock has_many $joinField = "{$remoteRelation}ID"; $componentClass = $schema->classForField($remoteClass, $joinField); $result = HasManyList::create($componentClass, $joinField); return $result ->setDataQueryParam($this->getInheritableQueryParams()) ->forForeignID($this->ID); } case 'belongs_to': case 'has_many': { // These relations must have a has_one on the other end, so find it $joinField = $schema->getRemoteJoinField( $remoteClass, $remoteRelation, $relationType, $polymorphic ); // If relation is polymorphic, do not infer recriprocal relationship automatically if ($polymorphic) { return null; } $joinID = $this->getField($joinField); if (empty($joinID)) { return null; } // Get object by joined ID return DataObject::get($remoteClass) ->filter('ID', $joinID) ->setDataQueryParam($this->getInheritableQueryParams()) ->first(); } case 'many_many': case 'belongs_many_many': { // Get components and extra fields from parent $manyMany = $remote->getSchema()->manyManyComponent($remoteClass, $remoteRelation); $extraFields = $schema->manyManyExtraFieldsForComponent($remoteClass, $remoteRelation) ?: []; // Reverse parent and component fields and create an inverse ManyManyList /** @var RelationList $result */ $result = Injector::inst()->create( $manyMany['relationClass'], $manyMany['parentClass'], // Substitute parent class for dataClass $manyMany['join'], $manyMany['parentField'], // Reversed parent / child field $manyMany['childField'], // Reversed parent / child field $extraFields, $manyMany['childClass'], // substitute child class for parentClass $remoteClass // In case ManyManyThroughList needs to use PolymorphicHasManyList internally ); $this->extend('updateManyManyComponents', $result); // If this is called on a singleton, then we return an 'orphaned relation' that can have the // foreignID set elsewhere. return $result ->setDataQueryParam($this->getInheritableQueryParams()) ->forForeignID($this->ID); } default: { return null; } } }
[ "abstract public function getReverseRelatedName();", "public function getInverseRelation(Relation $relation)\n\t{\n\t\treturn $this->graph->getInverse($relation);\n\t}", "protected function replaceRelation($stub, $relation)\n {\n return str_replace('RELATIONSHIP', $relation, $stub);\n }", "protected static function initInvertedRelationships(){\n\t\t// Flag to control if inverse relationships have already been activated\n\t\tif(isset(static::$INVERSE_RELATIONSHIPS_ACTIVATED[static::CLASS_NAME])){\n\t\t\treturn false;\n\t\t}\n\t\t// Every model can be related to itself\n\t\t$relatedModels = array_merge(static::$RELATED_MODELS, [static::CLASS_NAME]);\n\t\t//print \"Relaciones de \".static::CLASS_NAME.\"<br>\";\n\t\t// For each related model\n\t\tforeach($relatedModels as $model){\n\t\t\t// For each relationship, a new inverse relationship is created\n\t\t\t$relationships = $model::$RELATIONSHIPS;\n\t\t\tforeach($relationships as $name=>$properties){\n\t\t\t\t// Test if 'model' attribute exists\n\t\t\t\tif(!isset($properties[\"model\"])){\n\t\t\t\t\tthrow new \\InvalidArgumentException(\"There is no 'model' attribute for relationship {$name}\");\n\t\t\t\t}\n\t\t\t\t// Remote model\n\t\t\t\t$rModel = $properties[\"model\"];\n\t\t\t\t// Addition of inverse relationships\n\t\t\t\tif($rModel == static::CLASS_NAME){\n\t\t\t\t\tstatic::addInverseRelationship($model, $name, $properties);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Flag this class to don't repeat inverse relationship creation\n\t\tstatic::$INVERSE_RELATIONSHIPS_ACTIVATED[static::CLASS_NAME] = true;\n\t\treturn true;\n\t}", "protected function resolve_related(): Model\n\t{\n\t\t$related = $this->related;\n\n\t\tif ($related instanceof Model)\n\t\t{\n\t\t\treturn $related;\n\t\t}\n\n\t\t/* @var $related string */\n\n\t\treturn $this->related = $this->parent->models[$related];\n\t}", "public function inverseRelations()\n {\n return $this\n ->belongsToMany('App\\Models\\Entity', 'relations', 'called_id', 'caller_id')\n ->using('Cuatromedios\\Kusikusi\\Models\\Relation')\n ->as('inverseRelations')\n ->where('kind', '!=', 'ancestor')\n ->withPivot('kind', 'position', 'depth', 'tags')\n ->withTimestamps();\n }", "public function getSymmetricalRelation()\n {\n $localMapping = [$this->getLeftFields(), $this->getRightFields()];\n foreach ($this->getRightEntity()->getRelations() as $relation) {\n $relationMapping = [$relation->getRightFields(), $relation->getLeftFields()];\n if ($localMapping == $relationMapping) {\n return $relation;\n }\n }\n }", "protected function _addRelationFieldInLocalModel() {\n if (!$this->isSingular()) {\n return;\n }\n\n //$column = Garp_Spawn_Relation_Set::getRelationColumn($this->name);\n $column = $this->column;\n $fieldParams = array(\n 'model' => $this->model,\n 'type' => 'numeric',\n 'editable' => true,\n 'visible' => true,\n 'primary' => $this->primary,\n 'required' => $this->required,\n 'relationAlias' => $this->name,\n 'relationType' => $this->type\n );\n if ($this->multilingual && $this->_localModel->isMultilingual()) {\n // The relation is added to the i18n model by Garp_Spawn_Config_Model_I18n\n return;\n }\n $this->_localModel->fields->add('relation', $column, $fieldParams);\n }", "public function isReplaceRelationship();", "public function applyOppositeConfig(array &$config, array $options): void\n {\n $oppositeTables = $this->context->getRealTableNameList($this->oppositeTables);\n if (count($oppositeTables) > 1) {\n throw new TcaBuilderException(\n 'mmOpposite does not work if your relation does not resolve to EXACTLY ONE foreign table.' .\n ' Your field: ' . $this->context->getField()->getId() . ' applies to multiple: ' . implode(', ', $oppositeTables));\n }\n \n $localField = $this->context->getField()->getId();\n $targetField = $this->forcedOppositeField ?? $options['mmOpposite'];\n $localTable = $this->context->getTcaTable()->getTableName();\n $targetTable = (string)$oppositeTables[0];\n \n $config['MM_opposite_field'] = $targetField;\n $config['MM_match_fields']['tablenames'] = $localTable;\n \n TcaPostProcessor::registerAdditionalProcessor(\n $targetTable,\n static function (array &$config) use ($localTable, $localField, $targetField) {\n // Ignore if the local field was removed later\n if (! isset($GLOBALS['TCA'][$localTable]['columns'][$localField])) {\n return;\n }\n \n // Define usage of \"foreign_table\" in the target table\n $opposite = $config['columns'][$targetField]['config']['MM_oppositeUsage'] ?? null;\n $hasOpposite = ! empty($opposite) && is_array($opposite);\n $canHaveForeignTable = ! $hasOpposite || (count($opposite ?? []) === 1 && key($opposite) === $localTable);\n \n // If the target table can have a foreign_table and has none, we set it to our local table\n if ($canHaveForeignTable && ! isset($config['columns'][$targetField]['config']['foreign_table'])) {\n $config['t3ba']['foreign_table'] = $localTable;\n $config['columns'][$targetField]['config']['foreign_table'] = $localTable;\n }\n \n // If we can't determine a single foreign table, and currently one was set by this script\n // we drop the foreign_table definition from the config...\n if (! $canHaveForeignTable\n && ($config['t3ba']['foreign_table'] ?? null)\n === ($config['columns'][$targetField]['config']['foreign_table'] ?? null)) {\n unset($config['columns'][$targetField]['config']['foreign_table']);\n }\n \n $usage = $config['columns'][$targetField]['config']['MM_oppositeUsage'][$localTable] ?? [];\n \n $config['columns'][$targetField]['config']['MM_oppositeUsage'][$localTable]\n = array_unique(array_merge($usage, [$localField]));\n }\n );\n }", "public function otherSide()\n {\n if ($this->sideType() === 'from')\n $table = $this->relation()->toTable();\n else\n $table = $this->relation()->fromTable();\n\n return new RelationSide($this->relation(), $table);\n }", "public function testReverseRelationship($expected) {\n $this->webform = $this->createWebform($this->webform_elements);\n $this->createWebformSubmissions($this->webform_submissions_data, $this->webform);\n\n $this->view = $this->initView($this->webform, [], 'webform_views_reverse_entity_reference_test');\n\n $rendered_cells = $this->renderView($this->view, [], []);\n\n $this->assertSame($expected, $rendered_cells, 'Reverse relationship works.');\n }", "public function getSymmetricalRelation()\n {\n $localMapping = array($this->getLeftFields(), $this->getRightFields());\n foreach ($this->getRightEntity()->getRelations() as $relation) {\n if ($localMapping == array($relation->getRightFields(), $relation->getLeftFields())) {\n return $relation;\n }\n }\n }", "function getMirrorProperty() {\n $res = null;\n foreach ($this->_other->listProperties() as $name) {\n $prop = $this->_other->getProperty($name);\n if (is_a($prop, 'Ac_Cg_Property_Object')) {\n if ($this->_otherRel) {\n if ($prop->_otherRel && ($prop->isIncoming == !$this->isOtherIncoming) && ($prop->isOtherIncoming == !$this->isIncoming) \n && Ac_Util::sameObject($this->_rel, $prop->_otherRel) && Ac_Util::sameObject($this->_otherRel, $prop->_rel)) \n {\n $res = $prop;\n break;\n }\n } else {\n if (($prop->isIncoming == !$this->isIncoming) && Ac_Util::sameObject($this->_rel, $prop->_rel)) {\n $res = $prop;\n break;\n }\n }\n }\n }\n return $res;\n }", "abstract protected function equivalentResource($left, $right);", "abstract protected function relationName(): string;", "public function getReverseRelatedObjects();", "public function relatingRelation(RelationInterface $relation, $baseObject, array $otherObjects)\n\t{\n\t\t$relation->setBase(\n\t\t\tnew Node(\n\t\t\t\t$this->getObjectName($baseObject),\n\t\t\t\t$baseObject\n\t\t\t)\n\t\t);\n\t\t\n\t\tforeach($otherObjects as $otherObject)\n\t\t{\n\t\t\t$relation->addOther(\n\t\t\t\tnew Node(\n\t\t\t\t\t$this->getObjectName($otherObject),\n\t\t\t\t\t$otherObject\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $relation;\n\t}", "public function unrelate() {\n $this->getRelation = false;\n return $this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return parent::dropPrimaryKey($a_table); // TODO: Change the autogenerated stub
function dropPrimaryKey($a_table) { }
[ "abstract public function dropPrimaryKey($table);", "function dropPrimaryKey(Schema\\PrimaryKey $primaryKey, $table);", "function dropAndCreatePrimaryKey(Schema\\PrimaryKey $primaryKey, $table);", "public function testDbDropPrimaryKey() {\n $this->assertTrue(db_drop_primary_key('test_people'));\n }", "public function dropPrimaryKey($_tableName)\n {\n $statement = \"ALTER TABLE \" . $this->_db->quoteIdentifier(SQL_TABLE_PREFIX . $_tableName) . \" DROP PRIMARY KEY \" ;\n $this->execQueryVoid($statement);\n }", "public function testRemovePrimaryKey()\n {\n $this->getDBManager()\n ->setTableName(self::$childTable)\n ->removeConstraint('id', 'PRIMARY')\n ->execute();\n\n $columns = $this->getColumns(self::$childTable);\n\n $this->assertFalse($columns['id']->primaryKey);\n }", "public function dropPrimaryKey($name,$table)\n\t{\n\t\treturn 'ALTER TABLE ' . $this->quoteTableName($table) . ' DROP CONSTRAINT '\n\t\t\t. $this->quoteColumnName($name);\n\t}", "function db_drop_unique_key(&$ret, $table, $name) {\n $ret[] = update_sql('ALTER TABLE {'. $table .'} DROP KEY '. $name);\n}", "abstract public function dropUniqueKey(&$ret, $table, $name);", "function db_drop_unique_key(&$ret, $table, $name) {\n $ret[] = update_sql('ALTER TABLE {'. $table .'} DROP KEY '. $name);\n}", "function views_pgsql_drop_unique_key(&$ret, $table, $name) {\n $name = '{'. $table .'}_'. $name .'_key';\n $ret[] = update_sql('ALTER TABLE {'. $table .'} DROP CONSTRAINT '. $name);\n}", "public function removeTablePrimaryKey($table)\n {\n if ($this->dbtype === 'PDO_MYSQL') {\n $this->db->query('ALTER TABLE '.$table.' DROP PRIMARY KEY;');\n } elseif ($this->dbtype === 'PDO_PGSQL') {\n $this->db->query('ALTER TABLE \"'.$table.'\" DROP CONSTRAINT \"value_pkey\";');\n $this->db->query('ALTER TABLE \"'.$table.'\" DROP CONSTRAINT \"'.$table.'_pkey\";');\n } else {\n throw new Zend_Exception('Database does not support removing table primary keys');\n }\n }", "public function remove_primary_key() {\n // DROP PRIMARY KEY\n array_push($this->columns, $this->alter_table_sql() . \"DROP PRIMARY KEY\");\n }", "public function dropAndCreatePrimaryKey(PrimaryKey $primaryKey, $table);", "public function dropCurrentPrimaryKeyConstraints($runner)\n {\n $currentPrimaryColumns = $runner->getDb()->fetchColumnAll(\"\nSELECT COLUMN_NAME AS column_name\nFROM `information_schema`.`KEY_COLUMN_USAGE`\nWHERE `TABLE_SCHEMA` = '{$runner->getDbSchemaName()}' AND `TABLE_NAME` = '{$this->getTableName()}' AND `CONSTRAINT_NAME` = 'PRIMARY'\n\");\n\n //drop all mapping relations for found pk columns\n foreach ($currentPrimaryColumns as $columnName)\n {\n $column = $this->getTable()->getColumn($columnName);\n $column->dropConstraints($runner);\n }\n }", "public function dropPrimaryKey()\n {\n if (!$this->hasPrimaryKey()) {\n throw SchemaException::tablePrimaryKeyDoesNotExist($this->getName());\n }\n\n foreach ($this->getIndexes() as $index) {\n if ($index->hasSameColumnNames($this->getPrimaryKey()->getColumnNames())) {\n $this->dropIndex($index->getName());\n }\n }\n\n $this->primaryKey = null;\n }", "public function getOldPrimaryKey()\n {\n return $this->primaryKey;\n }", "public function deleteTable() {\n\t}", "function getPrimaryKey()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function ItemForm_Update, Parameter list: Handle inscription.
function ItemForm_Update() { if (!empty($this->Args[ "Item" ])) { $this->Args[ "Item" ]=$this->MyMod_Item_Update_CGI ( $this->Args[ "Item" ], $this->ItemForm_SGroupsDatas(1,TRUE) ); $this->ItemsForm_FromUpdated=$this->FormWasUpdated; } }
[ "function FormExpress_adminapi_item_update($args)\n{\n // Get arguments from argument array - all arguments to\n $itemObj = $args['itemObj'];\n $form_item_id = $itemObj['form_item_id'];\n\n // See if we have permission to add an item\n // avoid potential security holes or just too much wasted processing\n if (!SecurityUtil::checkPermission ('FormExpress::Item', \"$item_name::\", ACCESS_ADD)) {\n return LogUtil::registerPermissionError();\n }\n\n\n if( empty($itemObj[active])) { $itemObj[active] = 0; }\n\n // The user API function is called. This takes the item ID which\n // we obtained from the input and gets us the information on the\n // appropriate item. If the item does not exist we post an appropriate\n // message and return\n $item = pnModAPIFunc('FormExpress', 'admin', 'item_get',\n array('form_item_id' => $form_item_id));\n\n if ($item == false) {\n pnSessionSetVar('errormsg', _FORMEXPRESSNOSUCHITEM .'('.$form_item_id.')');\n return false;\n }\n\n // Security check - important to do this as early on as possible to \n if (!pnSecAuthAction(0, 'FormExpress::Item', \"$item[item_name]::$form_id\", ACCESS_EDIT)) {\n pnSessionSetVar('errormsg', _FORMEXPRESSNOAUTH);\n return false;\n }\n if (!pnSecAuthAction(0, 'FormExpress::Item', \"$item_name::$form_id\", ACCESS_EDIT)) {\n pnSessionSetVar('errormsg', _FORMEXPRESSNOAUTH);\n return false;\n }\n\n $stat = DBUtil::updateObject($itemObj, 'FormExpressItem', '', 'form_item_id');\n return $stat;\n\n}", "public function updateListItem()\n\t{\n\t\t// sets inputted data to variable $data\n\t\t$data = $this->getPostData();\n\n\t\t// if the $data is set\n\t\tif(isset($data))\n\t\t{\n\t\t\t// sends $data['id'] and $data['value'] to the updateListItem function in Dashboard_model (model)\n\t\t\t$this->dashboard->updateListItem($data['id'], $data['value']);\n\t\t}\n\t}", "public function updated(Itemlist $itemlist)\n {\n //\n }", "public function processUpdate() \r\n { \r\n $this->buildChangedArray(); // TODO : may already been done in processControl\r\n\r\n foreach ($this->postedrows as $irow => $posted) { \r\n if (!$this->rowIsChanged($irow)) {\r\n continue;\r\n }\r\n \r\n $rowexists = false;\r\n $this->resetNextUpdateVar(); \r\n for ($ifield = 0; true ; $ifield ++) {\r\n \r\n $nextvar = $this->searchNextUpdateVar();\r\n if ($nextvar == false)\r\n break;\r\n \r\n $postkey0 = str_replace('value%', $irow, $nextvar);\r\n $postkey = str_replace('%', '', $postkey0);\r\n // Ef_Log::htmlEcho($postkey,'postkey');\r\n \r\n $fieldname = Ef_Field::getNameFromEditname($postkey);\r\n // Ef_Log::htmlEcho ($fieldname, 'fieldname');\r\n $field = Ef_Field::findByName($fieldname);\r\n \r\n if (array_key_exists($postkey, $_POST)) {\r\n $rowexists = true;\r\n \r\n $value = $field->postHtmlToMem($_POST[$postkey]);\r\n\r\n // directly update the listed session array \r\n $_SESSION['listed'][$this->code][$postkey] = $value;\r\n } \r\n }\r\n\r\n if ($rowexists == false)\r\n break; \r\n }\r\n \r\n $this->resetChangedArray(); \r\n }", "function updateItem() {\n\t\tglobal $id;\n\n\t\tif($this->validator->validateAll()) {\n\t\t\t$query = new Query();\n\t\t\t$html = $this->vars['html'];\n\t\t\tif($html == strip_tags($html)) {\n\t\t\t\t$html = \"<p>$html</p>\";\n\t\t\t}\n\n\t\t\t$name = stringOr($this->vars['name'], cutString($html, 50));\n\n\t\t\t// update sindex value\n\t\t\t//$this->sIndex($id, $name);\n\n\t\t\t$vars = \"name='$name'\";\n\t\t\t$vars .= \", html='$html'\";\n\t\t\t$vars .= \", timestamp='\".mTimestamp($this->vars[\"timestamp\"]).\"'\";\n\t\t\t$vars .= \", language_id='\".$this->vars[\"language_id\"].\"'\";\n\t\t\t\n\t\t\tif($query->sql(\"UPDATE \".$this->db.\" SET $vars WHERE item_id = $id\")) {\n\t\t\t\tmessageHandler()->addStatusMessage($this->translate(\"###$name### updated\"));\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmessageHandler()->addErrorMessage($query->dbError());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tmessageHandler()->addErrorMessage($this->translate(\"Please complete missing information\"));\n\t\t\treturn false;\n\t\t}\n\t}", "function OnEditItem(){\n if (! $this->error) {\n if ($this->disabled_edit) {\n }\n if ($this->item_id != 0) {\n\n $this->_data = $this->Storage->{$this->GetItemMethod}(array(\n $this->key_field => $this->item_id));\n $form_data = $this->Request->Form;\n $this->_data = array_merge($this->_data, $this->Request->Form);\n if ($this->multilevel) {\n $this->parent_id = $this->_data[$this->parent_field];\n }\n }\n $this->OnBeforeCreateEditControl();\n $this->InitItemsEditControl();\n } //!error\n }", "public function testUpdateFormFields()\n {\n }", "static function item_edit_form($item, $form) {\n $record = ORM::factory(\"exif_coordinate\")->where(\"item_id\", \"=\", $item->id)->find();\n if ($record->loaded()) {\n $form->edit_item->input(\"latitude\")->label(t(\"Latitude\"))\n ->value($record->latitude);\n $form->edit_item->input(\"longitude\")->label(t(\"Longitude\"))\n ->value($record->longitude);\n } else {\n $form->edit_item->input(\"latitude\")->label(t(\"Latitude\"));\n $form->edit_item->input(\"longitude\")->label(t(\"Longitude\"));\n }\n }", "static function item_edit_form($item, $form) {\n $record = ORM::factory(\"exif_coordinate\")->where(\"item_id\", \"=\", $item->id)->find();\n $gpsdata = $form->edit_item->group(\"gps_data\")->label(\"GPS Data\");\n if ($record->loaded()) {\n $gpsdata->input(\"latitude\")->label(t(\"Latitude\"))\n ->value($record->latitude);\n $gpsdata->input(\"longitude\")->label(t(\"Longitude\"))\n ->value($record->longitude);\n } else {\n $gpsdata->input(\"latitude\")->label(t(\"Latitude\"));\n $gpsdata->input(\"longitude\")->label(t(\"Longitude\"));\n }\n }", "function OnDoEditItem(){\n if (! $this->error) {\n $this->_data = $this->GetFieldsData();\n $this->_data[$this->key_field] = $this->item_id;\n\n $this->ValidateBeforeAdd();\n\n $item = $this->Storage->{$this->GetItemMethod}(array(\n $this->key_field => $this->item_id));\n //set system fields\n $this->setItemSystemFields($this->_data, $item);\n\n //check for unique fields\n if ($this->listSettings->HasItem(\"MAIN\", \"UNIQUE_FIELDS\")) {\n $this->checkForDuplicateUnique();\n }\n\n if ($this->disabled_edit) {\n if (strlen($this->host_library_ID)) {\n $this->library_ID = $this->host_library_ID;\n }\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&MESSAGE[]=LIBRARY_DISABLED_EDIT\" . \"&\" . $this->restore);\n }\n if (empty($this->validator->formerr_arr) && ! $this->child_error) {\n if (strlen($this->host_library_ID)) {\n $this->library_ID = $this->host_library_ID;\n $this->parent_id = $this->Request->ToNumber(\"custom_val\", 0);\n }\n //before edit event handler call\n $this->OnBeforeEdit();\n $this->UpdateRadioFields();\n $_result = $this->Storage->Update($this->_data);\n if ($_result){\n $this->InsertNotOrdinaryFields($this->_data);\n //after edit event handler call\n $this->OnAfterEdit();\n if ($this->is_context_frame)\n \t$url = \"?package=context&page=contextframe&event=refresh&MESSAGE[]=EDIT_ITEM_SAVED\";\n else\n \t$url = \"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&MESSAGE[]=EDIT_ITEM_SAVED\" . \"&\" . $this->restore;\n\n $this->AfterSubmitRedirect($url);\n }\n }\n else {\n $this->event = \"EditItem\";\n }\n $this->OnBeforeCreateEditControl();\n $this->InitItemsEditControl();\n }\n }", "function ItemsForm_ItemDetailsUpdate(&$item)\n {\n $groups=array();\n foreach ($this->ItemsForm_DetailsSGroupsMatrix(1,$item) as $group => $rgroups)\n {\n $groups=array_merge($groups,array_keys($rgroups));\n }\n\n $updatedatas=$this->MyMod_Item_Groups_CGI2Item\n (\n $groups,\n $item\n );\n\n if (count($updatedatas)>0)\n {\n $this->Sql_Update_Item_Values_Set($updatedatas,$item);\n $item=$this->MyMod_Item_PostProcess($item);\n }\n\n return count($updatedatas);\n }", "function form_update (&$app)\n{\n $keyset = $app->arg ('keyset', ARG_OPTIONAL);\n $ignored = $app->arg ('ignored_elements', ARG_OPTIONAL);\n\n $ui =& $app->ui;\n\n if (!isset ($app->elements))\n die_traced ('No form posted.');\n\n # Update form element by element.\n foreach ($app->elements as $token => $e) {\n $v = $e->val;\n $cursor = $e->cursor;\n $source = $cursor->source ();\n $type = $cursor->type ();\n $field = $cursor->field ();\n\n # Continue if field name is in the list of ignored fields.\n if ($ignored && is_int (array_search ($field, $ignored)))\n continue;\n\n # If there's no key in the cursor, use the one in the keyset.\n if (!$cursor->key ()) {\n # Die if there's no key.\n if (!$keyset || !isset ($keyset[$type][$src]))\n die_traced (\"No key for field '{${$cursor->field ()}}' in source '$source' of type '$type'.\");\n\n $cursor->set_key ($keyset[$type][$source]);\n }\n\n $quote = false;\n\n # Also update name and type of file.\n if ($e->is_file) {\n _form_update_fileinfo ($app, $cursor, $e);\n $quote = true;\n }\n\n # Add slashes if not already done.\n if ($quote || !get_magic_quotes_gpc () && !get_magic_quotes_runtime ())\n\t $v = addslashes ($v);\n\n # Update field in database.\n $cursor->set_value ($field, $v);\n }\n}", "function PostProcess($item)\n {\n $module=$this->GetGET(\"ModuleName\");\n if ($module!=\"Lots\")\n {\n return $item;\n }\n\n if (!isset($item[ \"ID\" ]) || $item[ \"ID\" ]==0) { return $item; }\n\n $updatedatas=array();\n\n if (count($updatedatas)>0)\n {\n $this->Sql_Update_Item_Values_Set($updatedatas,$item);\n }\n \n return $item;\n }", "function adminEditForm($itemName) {\n\n require_once(\"DB.class.php\");\n\n $db = new DB();\n\n $item = '';\n\n if ($db->getItemDetails($itemName)) {\n $item = $db->getItemDetails($itemName);\n }\n else {\n return;\n }\n $id = $db->getCatalogID($itemName);\n\n echo '<form>';\n echo '<input type=\"hidden\" id=\"itemID\" value=\"'.$id[0].'\" />';\n echo '<div class=\"form-group\">';\n echo '<label for=\"Name\">Name:</label>';\n echo '<input type=\"text\" class=\"form-control\" id=\"Name\" value=\"'.$item[0]['Name'].'\">';\n echo '</div>';\n echo '<div class=\"form-group\">';\n echo '<label for=\"Description\">Description:</label>';\n echo '<input type=\"text\" class=\"form-control\" id=\"Description\" value=\"'.$item[0]['Description'].'\">';\n echo '</div>';\n echo '<div class=\"form-group\">';\n echo '<label for=\"Price\">Price:</label>';\n echo '<div class=\"input-group\">';\n echo '<span class=\"input-group-addon\">$</span>';\n echo '<input type=\"text\" class=\"form-control\" id=\"Price\" value=\"'.$item[0]['Price'].'\">';\n echo '</div>';\n echo '</div>';\n echo '<div class=\"form-group\">';\n echo '<label for=\"salePrice\">Sale Price:</label>';\n echo '<div class=\"input-group\">';\n echo '<span class=\"input-group-addon\">$</span>';\n echo '<input type=\"text\" class=\"form-control\" id=\"salePrice\"value=\"'.$item[0]['SalePrice'].'\">';\n echo '</div>';\n echo '<small id=\"salePriceText\" class=\"form-text text-muted\">Enter \"0\" if item is not on sale</small>';\n echo '</div>';\n echo '<div class=\"form-group\">';\n echo '<label for=\"Quantity\">Quantity:</label>';\n echo '<input type=\"text\" class=\"form-control\" id=\"Quantity\" value=\"'.$item[0]['Quantity'].'\">';\n echo '</div>';\n echo '<div class=\"form-group\">';\n echo '<label>Image Name:</label>';\n echo '<div class=\"input-group\">';\n echo '<input type=\"text\" class=\"form-control\" id=\"Image\" value=\"'.$item[0]['Image'].'\">';\n echo '<span class=\"input-group-addon\">.jpg</span>';\n echo '</div>';\n echo '</div>';\n echo '<div class=\"form-group\">';\n echo '<label for=\"Password\">Password:</label>';\n echo '<input type=\"password\" class=\"form-control\" id=\"Password\" placeholder=\"Enter password\">';\n echo '</div>';\n echo '</form>';\n echo '<input class=\"btn btn-info mt-3 mb-2\" style=\"margin-left: 46%;margin-right: 46%;\" type=\"submit\" value=\"Edit Item\" onclick=\"callEditItem(document.forms[0].Name.value, document.forms[0].Description.value, document.forms[0].Price.value, document.forms[0].salePrice.value, document.forms[0].Quantity.value, document.forms[0].Image.value, document.forms[0].Password.value, document.forms[0].itemID.value)\"/>';\n echo '<hr />';\n }", "public function prepareEditList()\n {\n //Get the Module's Id from the route\n $formId = (int) $this->params()->fromRoute('itemId');\n\n //Retrieve the module, so we can get the title of the module\n $formService = $this->getServiceLocator()->get('phoenix-flexibleforms');\n $form = $formService->getItem($formId);\n $this->formTitle = $form->getName();\n \n }", "public function testUpdateItemSerial()\n {\n }", "function modItem ( $nomListe, $idItem ) {\n global $errs ;\n global $options ;\n $req = new clResultQuery ;\n // Récupération des anciennes informations de l'item à modifier.\n $param['cw'] = \"WHERE iditem='\".$idItem.\"'\" ;\n $res1 = $req -> Execute ( \"Fichier\", \"getListesItems\", $param, \"ResultQuery\" ) ;\n // Récupération de tous les autres items.\n $param['cw'] = \"WHERE nomliste='\".addslashes($nomListe).\"'\" ;\n $res2 = $req -> Execute ( \"Fichier\", \"getListesItems\", $param, \"ResultQuery\" ) ;\n // Vérification de la présence d'un item portant le nouveau nom.\n $param['cw'] = \"WHERE nomliste='\".addslashes($nomListe).\"' and nomitem='\".addslashes(stripslashes($_POST['nomItemF'])).\"' and iditem!='$idItem'\" ;\n $res3 = $req -> Execute ( \"Fichier\", \"getListesItems\", $param, \"ResultQuery\" ) ;\n // Vérification que l'item existe.\n if ( $res1['INDIC_SVC'] > 0 ) {\n // Vérification d'un changement de nom.\n if ( $res1['nomitem'][0] != $_POST['nomItemF'] ) {\n\t// Nouveau nom libre ou pas.\n\tif ( $res3['INDIC_SVC'][2] == 0 ) {\n\t // Nouveau nom correct.\n\t if ( eregi ( \"[0-9a-zA-Z]\", $_POST['nomItemF'] ) ) {\n\t // Mise à jour du nom de l'item dans la base.\n\t $data['nomitem'] = $_POST['nomItemF'] ;\n\t $requete = new clRequete ( BASEXHAM, \"listes\", $data ) ;\n\t eko ( $requete->updRecord ( \"iditem='\".$idItem.\"'\" ) ) ;\n\t // Message d'information.\n\t $this->infos .= \"L'item \\\"\".$res1['nomitem'][0].\"\\\" de la liste \\\"\".stripslashes($nomListe).\"\\\" a changé de nom : \\\"\".stripslashes($_POST['nomItemF']).\"\\\".<br />\" ;\n\t } else {\n\t // Message d'erreur.\n\t $this->erreurs .= \"Le nom choisi ne doit pas être vide.\" ;\n\t }\n\t} else {\n\t // Message d'erreur.\n\t $this->erreurs .= \"Le nom choisi pour l'item \\\"\".$res1['nomitem'][0].\"\\\" de la liste \\\"\".stripslashes($nomListe).\"\\\" est déjà utilisé. \n La modification est annulée.<br />\" ;\n\t}\n }\n // On vérifie si le type de la destination attendue a changé.\n if ( $res1['localisation'][0] != (isset($_POST['typeF'])?$_POST['typeF']:'') ) {\n\t$data2['localisation'] = (isset($_POST['typeF'])?$_POST['typeF']:'') ;\n\t$requete = new clRequete ( BASEXHAM, \"listes\", $data2 ) ;\n\t$requete->updRecord ( \"iditem='\".$res1['iditem'][0].\"'\" ) ;\n\t// Message d'information.\n\t$this->infos .= \"L'item \\\"\".$res1['nomitem'][0].\"\\\" de la liste \\\"\".stripslashes($nomListe).\"\\\" a changé de type.<br />\" ;\n }\n \tif ( $nomListe == 'Destinations attendues' ) {\n \t\t$data2['libre'] = $_POST['destpmsi'].$_POST['ori'] ;\n \t\t$requete = new clRequete ( BASEXHAM, \"listes\", $data2 ) ;\n \t\t$requete->updRecord ( \"iditem='\".$res1['iditem'][0].\"'\" ) ;\n \t} else {\n\t // On vérifie si le champs libre a été changé.\n\t if ( strcmp ( $res1['libre'][0] , (isset($_POST['libreF'])?$_POST['libreF']:'') ) ) {\n\t\t\t$data2['libre'] = $_POST['libreF'] ;\n\t\t\t$requete = new clRequete ( BASEXHAM, \"listes\", $data2 ) ;\n\t\t\tif ( $options -> getOption ( $nomListe.\" Id\" ) OR $nomListe == \"Médecins\" OR $nomListe == \"I.D.E.\" ) {\n\t\t\t if ( eregi ( \"[0-9a-zA-Z]\", $_POST['libreF'] ) ) {\n\t\t\t $requete->updRecord ( \"iditem='\".$res1['iditem'][0].\"'\" ) ;\n\t\t\t // Message d'information.\n\t\t\t $this->infos .= \"L'item \\\"\".$res1['nomitem'][0].\"\\\" de la liste \\\"\".stripslashes($nomListe).\"\\\" a changé d'identifiant.<br />\" ;\n\t\t\t } else {\n\t\t\t $this->erreurs .= \"L'identifiant ne peut pas être vide. Ce champs ne sera pas modifié.<br />\" ;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t }\n // On vérifie si l'item a changé de position ou non.\n if ( $res1['iditem'][0] != $_POST['placerF'] ) {\n\t// Suppression du rang actuel et décalage du rang des autres items.\t\n\t$rang = $res1['rang'][0] ;\n\t$param['cw'] = \"WHERE rang>'$rang' and nomliste='\".addslashes(stripslashes($nomListe)).\"'\" ;\n\t$res4 = $req -> Execute ( \"Fichier\", \"getListesItems\", $param, \"ResultQuery\" ) ;\n\tfor ( $i = 0 ; isset ( $res4['iditem'][$i] ) ; $i++ ) {\n\t $data3['rang'] = $res4['rang'][$i] - 1 ;\n\t $requete = new clRequete ( BASEXHAM, \"listes\", $data3 ) ;\n\t $requete->updRecord ( \"iditem='\".$res4['iditem'][$i].\"'\" ) ;\n\t}\n\t// Calcul du rang suivant.\n\tif ( $_POST['placerF'] ) {\n\t $param['cw'] = \"WHERE iditem='\".$_POST['placerF'].\"' and nomliste='\".addslashes(stripslashes($nomListe)).\"'\" ;\n\t $res6 = $req -> Execute ( \"Fichier\", \"getListesItems\", $param, \"ResultQuery\" ) ;\t\n\t $rang = $res6['rang'][0] + 1 ;\n\t} else $rang = 1 ;\n\t// Décalage de tous les items d'un rang.\n\t$param['cw'] = \"WHERE rang>='$rang' and nomliste='\".addslashes(stripslashes($nomListe)).\"'\" ;\n\t$res5 = $req -> Execute ( \"Fichier\", \"getListesItems\", $param, \"ResultQuery\" ) ;\n\tfor ( $i = 0 ; isset ( $res5['iditem'][$i] ) ; $i++ ) {\n\t $data4['rang'] = $res5['rang'][$i] + 1 ;\n\t $requete = new clRequete ( BASEXHAM, \"listes\", $data4 ) ;\n\t $requete->updRecord ( \"iditem='\".$res5['iditem'][$i].\"'\" ) ;\n\t}\n\t// Mise à jour du rang de l'item.\n\tif ( $_POST['placerF'] ) $data5['rang'] = $res6['rang'][0] + 1 ;\n\telse $data5['rang'] = 1 ;\n\t$requete = new clRequete ( BASEXHAM, \"listes\", $data5 ) ;\n\t$requete->updRecord ( \"iditem='\".$res1['iditem'][0].\"'\" ) ;\n\t// Message d'information.\n\t$this->infos .= \"L'item \\\"\".$res1['nomitem'][0].\"\\\" de la liste \\\"\".stripslashes($nomListe).\"\\\" a changé de position.<br />\" ;\n }\n } else {\n // Signalement d'une erreur si l'item à modifier n'existe pas.\n $this->erreurs .= \"L'item ne peut pas être modifié (id=\\\"$idItem\\\") car il n'existe pas.\" ;\n $errs->addErreur ( \"clListesGenerales : L'item ne peut pas être modifié (id=\\\"$idIditem\\\") car il n'existe pas.\" ) ;\n }\n }", "public function updateProductListAction()\n\t{\t\n\t\t//Remove form attributes that were not set.\n\t\t$formRawData = $this->getRequest()->getPost();\n\t\t$formData = array();\n\t\tforeach ($formRawData as $key => $value) {\n\t\t\tif ($value != '') {\n\t\t\t\t$formData[$key] = $value;\n\t\t\t}\n\t\t}\n\t\t$form = $this->getModel()->getForm('add');\n\t\t\n\t\t$this->view->element = $form->updateHwProductIdElement($formData);\n\t}", "public function getUpdateForm();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks for at least one upper case letter in the contact person telephone
function checkUpperTel($tel){ return preg_match('~[A-Z]~', $tel) ? TRUE : FALSE; }
[ "function isUppercase()\n{\n\n}", "function ctype_upper ($text) {}", "function is_valid_first_or_last_name($name)\n {\n if ($name === null) {\n return false;\n }\n return (preg_match('/^[A-Z]+$/', $name) == true);\n }", "private function hasUppercase(): bool\n {\n if (1 == preg_match('/\\p{Lu}/', $this->password)) {\n return true;\n }\n array_push($this->errorMessages, \"Uppercase letter missing.\");\n return false;\n }", "function check_validName_first($first_name)\n{\n\n\tif(strlen($first_name)==0)\n\t{\n\t\techo\"No name given.\\n\";\n\t\treturn false;\n\t}\n\telseif(strlen($first_name)>25)\n\t{\n\t\techo\"Name is longer then 25 characters.\\n\";\n\t\treturn false;\n\t}\n\telseif(ctype_alpha($first_name) == false)\n\t{\n\t\techo\"Name does not contain only alphabet characters.\\n\";\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n\n}", "function validPhone($phone)\r\n {\r\n $validPhone = preg_replace('/[^0-9]/', '', $phone);\r\n if(strlen($validPhone) === 10){\r\n return ctype_alnum($validPhone);\r\n } else {\r\n return false;\r\n }\r\n \r\n }", "function validLastName($lastname)\n {\n return !empty($lastname) && ctype_alpha($lastname);\n }", "function phoneIsValid($str){\n return isNumeric($str) && hasLength($str, PHONE_LENGTH, PHONE_LENGTH);\n}", "function isThereAnyUppercase($string){\n\t\t$returnVal = false;\n\t\tif(preg_match('/[A-Z]/', $string))\n\t\t{ \n\t\t // There is one upper \n\t\t $returnVal = true;\n\t\t}\n\n\t\treturn $returnVal;\n\t}", "function not_ctype_upper($text) {\n return ! ctype_upper($text);\n }", "function isUpperCamelCase(string $s): bool{\n return preg_match('/^([A-Z][a-z]+)*$/', $s);\n}", "protected function company_nameIsValid()\n {\n return preg_match(\"/^[A-Za-zÀ-ÿ0-9 .-]{1,}$/\", $this->company_name);\n }", "function validate_mother_name($uname){\r\n\t$msg=\"==> שם האם \";\r\n\tif(isHTML($uname, $msg)){return FALSE;};\r\n\tif(isRestrictedChars($uname, $msg)){return FALSE;};\r\n\treturn TRUE;\r\n}", "private function checklname() {\r\n\t\t$variable = \"lname\";\r\n\t\tif(!preg_match(\"/[a-z]/i\", $this->$variable)) {\r\n\t\t\t$this->setAddResultRecord(\"Lastname at least contain 1 letter.<br>\");\r\n\t\t\t$this->validated = 0;\r\n\t\t}\r\n\t\tif(!$this->checkname($this->$variable)) {\r\n\t\t\t$this->setAddResultRecord(\"Lastname should be alphabetic and not more than 20 letters.<br>\");\r\n\t\t\t$this->validated = 0;\r\n\t\t}\r\n\t}", "function validPhone($phone){\n\n return is_numeric($phone) && (strlen($phone)>=0 && strlen($phone) <= 11);\n }", "public function hasUpperCaseCharacter()\n {\n if (preg_match(\"([A-Z])\", $this->password)) {\n return true;\n } else {\n return false;\n }\n }", "public function checkContactType() {\n if ($this->cust_phone != \"\"){\n //First use phone number\n $this->usePhone = true;\n //I'm not validating the phone number due to time constraints.\n //That should probably be done \n } else if($this->cust_email != \"\" && filter_var($this->cust_email, FILTER_VALIDATE_EMAIL)){\n //Then use email if valid\n $this->useEmail = true;\n } else if($this->cust_email != \"\" && !filter_var($this->cust_email, FILTER_VALIDATE_EMAIL)) {\n $this->recommend = false;\n $this->message = 'email is invalid';\n } else {\n $this->recommend = false;\n $this->message = 'no email or phone number';\n }\n }", "function first_letter_check($name){\n\t\t\t\tfor($i=0;$i<strlen($name);$i++){\n\t\t\t\tif(ord($name[0]) <= 57 || (ord($name[0])>=97 && ord($name[0])<=122)){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t}", "public function validateFirstName()\n\t{\t\n\t\tinclude_once('constantVariables.php');\n\t\t\n\t\tif( $this->firstName === \"\"){\n\t\t\t$this->error = FIRSTNAME_ERROR1; \n\t\t\treturn true;\n\t\t}elseif(!preg_match(\"/^[a-zA-Z ]*$/\",$this->firstName)){\n\t\t\t$this->error = FIRSTNAME_ERROR2; \n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test retrieving bulletin headers, tag and cat filters, repo size > default limit
public function testGetBulletinsWithTagCatFiltersUpToDefaultLimit() { $this->helperFillRepo(7); $headers = $this->repo->withFilters(['tags' => 'foo', 'categories' => 'Foo']); // Should retrieve 5 of the 7 bulletins $this->assertCount(5, $headers); // Should be coming in reverse order (newest first) $this->assertEquals('Post Title 7', $headers[0]->title()); $this->assertEquals('Post Title 3', $headers[4]->title()); }
[ "public function testGetBulletinsWithSingleHitTagFiltersUpToDefaultLimit() {\n \t\n \t$this->helperFillRepo(7, [\n \t\t\t\t\t\t\t3 => ['tags' => ['foo','test'] ],\n \t\t\t\t\t\t] );\n \n \t$headers = $this->repo->withFilters(['tags' => 'other,test']);\n \n \t// Should retrieve the limit of 5 of the 7 bulletins\n \t$this->assertCount(1, $headers);\n \t$this->assertEquals('Post Title 3', $headers[0]->title());\n }", "function isCountOfProductsMoreThen(Curl $curl, $categoryQuery, $limit = 10)\n{\n // send get request\n $curl->get(\"https://modnakasta.ua/api/v2/product-list$categoryQuery\");\n\n $productList = json_decode($curl->response, true);\n\n if ((int)count($productList['product-ids']) > $limit) {\n return 1;\n }\n\n return 0;\n}", "public function testCompoundLimitPage()\n {\n $this->todo('stub');\n }", "public function testResultListPageLength()\n {\n for ($i = 1; $i <= 100; ++$i) {\n $resultList = $this->getResultsFor('New Zealand', $i);\n $this->assertEquals($i, $resultList->count());\n }\n }", "public function pagesize() { return 15; }", "public function companyListPaginatedTenItems()\n {\n factory(\\App\\Company::class)->create();\n $response = $this->call('GET', '/company');\n // dd($response->decodeResponseJson());\n $response->assertStatus(200);\n $this->assertEquals(10, $response->decodeResponseJson()[\"per_page\"]);\n }", "public function testPagination()\n {\n // First page\n $data = $this->makeRequestCheckStatusAndReturnData('/api/urls/page/1/3');\n $this->assertEquals(3, count($data), 'Wrong page size for first page');\n\n // Second page (5 urls in fixtures, 2 items in second page)\n $data = $this->makeRequestCheckStatusAndReturnData('/api/urls/page/2/3');\n $this->assertEquals(2, count($data), 'Wrong page size for second page');\n\n // Third page (5 urls in fixtures, 0 items in third page)\n $data = $this->makeRequestCheckStatusAndReturnData('/api/urls/page/3/3');\n $this->assertEquals(0, count($data), 'Wrong page size for third page');\n\n // A different page size\n $data = $this->makeRequestCheckStatusAndReturnData('/api/urls/page/1/5');\n $this->assertEquals(5, count($data), 'The page should contain 5 items');\n\n // Big pagesize, no errors\n $data = $this->makeRequestCheckStatusAndReturnData('/api/urls/page/1/100');\n $this->assertEquals(5, count($data), 'The page should contain 5 items');\n }", "public function count()\n\t{\n\t\t/**\n\t\t * - If nothing has been loaded, page_count will be NULL\n\t\t * - If some pages have been loaded, there will be some items in the \n\t\t * collection, but not the full number of pages worth\n\t\t * e.g. With 1 page of 30 items, min count is 1\n\t\t *\t\tWith 10 pages of 30 items, min count is 271\n\t\t */\n\t\t$expect_min_count = (($this->_page_count - 1) * $this->_page_size) + 1;\n\t\tif (($this->_page_count === NULL)\n\t\t\tOR count($this->_items) < $expect_min_count)\n\t\t{\n\t\t\t// Get the number of items with a HEAD request\n\t\t\t$this->_github->api(\n\t\t\t\t\t$this->_build_page_url(1,1),\n\t\t\t\t\tRequest::HEAD);\n\t\t\t$count = $this->_parse_api_link_header();\n\t\t\t\n\t\t\t// Store the number of pages and prepare the items array\n\t\t\t$this->_page_count = ceil($count / $this->_page_size);\n\t\t\t\n\t\t\tfor ($i = count($this->_items); $i < $count; $i++)\n\t\t\t{\n\t\t\t\t$this->_items[$i] = NULL;\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t}\t\t\n\t\treturn count($this->_items);\n\t}", "function printImageGallery($searchQuery, $max) {\n $count = 0;\n $i = 1;\n while (true) {\n $i += 5;\n if ($count > $max-1) break;\n $json = get_url_contents(\"http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q={$searchQuery}&start={$i}&imgsz=medium\");\n $data = json_decode($json);\n foreach ($data->responseData->results as $result) {\n if (@getimagesize($result->url) != false) {\n $count++;\n echo '<img style=\"margin:5px; background:#eeeeee;\" height=\"200\" src=\"'. $result->url . '\">&nbsp';\n }\n if ($count > $max-1) break;\n }\n }\n}", "public function testGetWithLimit()\n {\n $limit = 2;\n $search = 'a';\n\n $result = $this->instance->limit($limit)->get($search);\n\n $this->assertInternalType('array', $result);\n $this->assertEquals($limit, $result['result_count']);\n $this->assertEquals($limit, count($result));\n }", "public function testGetPaginatedCallList()\n {\n }", "public function test_huge_public_id_list()\n {\n $ids = array();\n for ($i = 1; $i < 200; $i++) {\n $ids[] = \"foobarfoobarfoobarfoobarfoobar\";\n }\n Uploader::add_tag(\"huge_list\", $ids);\n assertParam($this, \"public_ids[0]\", $ids[0]);\n }", "function file_tools_get_list_length() {\n\tstatic $result;\n\t\n\tif (!isset($result)) {\n\t\t$result = 50;\n\t\t\n\t\t$setting = (int) elgg_get_plugin_setting('list_length', 'file_tools');\n\t\tif ($setting < 0) {\n\t\t\t$result = false;\n\t\t} elseif ($setting > 0) {\n\t\t\t$result = $setting;\n\t\t}\n\t}\n\t\n\treturn $result;\n}", "public function testGetProductsSizeInKb()\n {\n $products = $this->pl->getProducts(true, false);\n\n $this->assertEquals(\n $products,\n array(\n array(\n \"title\" => \"First\",\n \"description\" => \"First Product\",\n \"unit_price\" => 2.50,\n \"size\" => \"1.00kb\"\n ),\n array(\n \"title\" => \"Second\",\n \"description\" => \"Second Product\",\n \"unit_price\" => 0.50,\n \"size\" => \"2.00kb\"\n ),\n array(\n \"title\" => \"Third\",\n \"description\" => \"Third Product\",\n \"unit_price\" => 10.00,\n \"size\" => \"3.55kb\"\n )\n )\n );\n }", "public function getSize(){\n\t\t//echo \"GET SIZE\\n\";\n\t\t//print_r($this->tags);\n\t\treturn count($this->tags);\n\t}", "public function paginateWithEggAndServerCount(): LengthAwarePaginator;", "public function testProductSizesCountGet()\n {\n\n }", "function test_get_feed_posts_filter() {\n global $uc_dailydigest_widget;\n\n $original = $uc_dailydigest_widget->get_feed_posts($this->test_feed);\n $pre_filter_length = sizeof($original);\n\n $filtered1 = $uc_dailydigest_widget->get_feed_posts($this->test_feed, \"UConn Today\");\n $one_filter_length = sizeof($filtered1);\n\n $this->assertGreaterThan( $one_filter_length, $pre_filter_length );\n\n $filtered2 = $uc_dailydigest_widget->get_feed_posts($this->test_feed, \"UConn Today; Research, Funding, and Awards\");\n\n $two_filter_length = sizeof($filtered2);\n\n $this->assertGreaterThan( $two_filter_length, $one_filter_length );\n }", "public function testBigImg()\n {\n $gallery = new \\Ylva\\Gallery\\CGallery('test');\n\n $imageArr = $gallery->getImages();\n $size = sizeOf($imageArr);\n $expWidth = \"600\";\n\n for ($i=0; $i<$size; $i++) {\n $bigImg = $gallery->getBigVersion($i);\n $this->assertContains($expWidth, $bigImg);\n }\n\n $this->assertnotEmpty($bigImg);\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Implement jump() method.
public function jump() { return $this->name . ' can ' . __FUNCTION__; }
[ "public function jump(){\r\n if ($this->getRate() >= 1)\r\n $this->rate -=1;\r\n }", "public function jumpAction()\n {\n $this->view()->setTemplate('jump')->setLayout('layout-simple');\n //$params = Pi::service('session')->jump->params;\n $params = array();\n if (isset($_SESSION['PI_JUMP'])) {\n $params = $_SESSION['PI_JUMP'];\n unset($_SESSION['PI_JUMP']);\n }\n if (empty($params['time'])) {\n $params['time'] = 3;\n }\n if (empty($params['url'])) {\n $params['url'] = Pi::url('www');\n }\n //vd($params);\n $this->view()->assign($params);\n }", "public function jumpAction()\n {\n $this->view()->setTemplate('jump')->setLayout('layout-simple');\n //$params = Pi::service('session')->jump->params;\n $params = array();\n if (isset($_SESSION['PI_JUMP'])) {\n $params = $_SESSION['PI_JUMP'];\n unset($_SESSION['PI_JUMP']);\n }\n if (empty($params['time'])) {\n $params['time'] = 3;\n }\n if (empty($params['url'])) {\n $params['url'] = Pi::url('www');\n }\n $this->view()->assign($params);\n\n /*\n $response = $this->response;\n\n // It is weird the reponse will be failed in IE with successive redirect with 302\n //$response->setStatusCode(302);\n $headerRefresh = sprintf('%d; url=%s', intval($params['time']), $params['url']);\n $response->getHeaders()->addHeaderLine('Refresh', $headerRefresh);\n */\n }", "function jump($loc) {\n\t\t\t$this->location = $loc;\n\t\t}", "function jump() {\n switch ($this->request->data['action']) {\n case 'newsfeed':\n $url = $this->jumpNewsfeed();\n break;\n case 'gallery':\n $url = $this->jumpGallery();\n break;\n default:\n break;\n }\n $this->redirect($url);\n }", "public function getJump():int\n {\n\t\treturn $this->jump;\n\t}", "function site_jump () {\n\t\t$new_action = $new_id = '';\n\t\tif (!empty($_POST['fast_nav'])) {\n\t\t\t// Check posted data\n\t\t\tif (is_numeric($_POST['fast_nav'])) {\n\t\t\t\t$new_action = 'view_forum';\n\t\t\t\t$new_id\t\t= intval($_POST['fast_nav']);\n\t\t\t} elseif (false !== strpos($_POST['fast_nav'], 'cat_')) {\n\t\t\t\t$new_action = 'show';\n\t\t\t\t$new_id\t\t= substr($_POST['fast_nav'], 4);\n\t\t\t} elseif ($_POST['fast_nav'] == 'sj_home') {\n\t\t\t\t$new_action = 'show';\n\t\t\t} elseif ($_POST['fast_nav'] == 'sj_search') {\n\t\t\t\t$new_action = 'search';\n\t\t\t} elseif ($_POST['fast_nav'] == 'sj_help') {\n\t\t\t\t$new_action = 'help';\n\t\t\t}\n\t\t}\n\t\tif (!empty($new_action)) {\n\t\t\treturn js_redirect('./?object='.'forum'.($new_action != 'home' ? '&action='.$new_action : '').(!empty($new_id) ? '&id='.$new_id : ''));\n\t\t}\n\t\t// Default redirect back\n\t\treturn js_redirect($_SERVER['HTTP_REFERER'], false);\n\t}", "public function getNextJumpNode()\n\t{\n\t\treturn $this->_getData('next_jump');\n\t}", "public function getName()\n {\n return 'JumpStart';\n }", "public function visitJumpInsn($opcode, $label)\n {\n if ($this->mv != null) {\n $this->mv->visitJumpInsn($opcode, $label);\n }\n }", "public function getNextJumpNode()\n {\n return $this->_getData('next_jump');\n }", "public function jumpBack($key = null)\n {\n $args = array('DB' => $this->_db, 'CUR' => $this->_cursor);\n if (!is_null($key)) {\n $args['key'] = $key;\n }\n $response = $this->_client->call('cur_jump_back', $args);\n\n if ($response['code'] === 200) {\n return true;\n } else if ($response['code'] === 450) {\n return false;\n }\n\n return $this->_errmsg($response['code']);\n }", "function translateJump( $jump ) {\n global $JUMPARR;\n if ( isset( $jump ) ) { \n $bits = $JUMPARR[ $jump ];\n return $bits; \n }\n return '000';\n}", "public function visitGoto(Node $node);", "private function tokenWordGoto()\n {\n $label = $this->next;\n if ($label->content == 'EXIT') {\n $label->content = 'EXIT_LABEL';\n }\n }", "public function getCanJump()\n {\n return $this->get(self::_CAN_JUMP);\n }", "public function initializeTables(){\n\t\t\t//set default values of Jump Tables\n\t\t\t//cast int type to get ASCII value of character (0-255). Store appropriate method at\n\t\t\t//that index in the appropriate array\n\t\t\t$this->jumpInstruction[self::MOVE] = \"moveFoward\";\n\t\t\t$this->jumpInstruction[self::LEFT] = \"turnLeft\";\n\t\t\t$this->jumpInstruction[self::RIGHT] = \"turnRight\";\n\t\t\t$this->jumpInstruction[strtolower(self::MOVE)] = \"moveFoward\";\n\t\t\t$this->jumpInstruction[strtolower(self::LEFT)] = \"turnLeft\";\n\t\t\t$this->jumpInstruction[strtolower(self::RIGHT)] = \"turnRight\";\n\t\t\t$this->jumpMoveForward[self::NORTH] = \"forwardNorth\";\n\t\t\t$this->jumpMoveForward[self::SOUTH] = \"forwardSouthth\";\n\t\t\t$this->jumpMoveForward[self::WEST] = \"forwardWest\";\n\t\t\t$this->jumpMoveForward[self::EAST] = \"forwardEast\";\n\t\t\t$this->jumpMoveForward[strtolower(self::NORTH)] = \"forwardNorth\";\n\t\t\t$this->jumpMoveForward[strtolower(self::SOUTH)] = \"forwardSouthth\";\n\t\t\t$this->jumpMoveForward[strtolower(self::WEST)] = \"forwardWest\";\n\t\t\t$this->jumpMoveForward[strtolower(self::EAST)] = \"forwardEast\";\n\t\t\t$this->jumpLeftTurn[self::NORTH] = \"leftNorth\";\n\t\t\t$this->jumpLeftTurn[self::SOUTH] = \"leftSouth\";\n\t\t\t$this->jumpLeftTurn[self::WEST] = \"leftWest\";\n\t\t\t$this->jumpLeftTurn[self::EAST] = \"leftEast\";\n\t\t\t$this->jumpLeftTurn[strtolower(self::NORTH)] = \"leftNorth\";\n\t\t\t$this->jumpLeftTurn[strtolower(self::SOUTH)] = \"leftSouth\";\n\t\t\t$this->jumpLeftTurn[strtolower(self::WEST)] = \"leftWest\";\n\t\t\t$this->jumpLeftTurn[strtolower(self::EAST)] = \"leftEast\";\n\t\t\t$this->jumpRightTurn[self::NORTH] = \"rightNorth\";\n\t\t\t$this->jumpRightTurn[self::SOUTH] = \"rightSouth\";\n\t\t\t$this->jumpRightTurn[self::WEST] = \"rightWest\";\n\t\t\t$this->jumpRightTurn[self::EAST] = \"rightEast\";\n\t\t\t$this->jumpRightTurn[strtolower(self::NORTH)] = \"rightNorth\";\n\t\t\t$this->jumpRightTurn[strtolower(self::SOUTH)] = \"rightSouth\";\n\t\t\t$this->jumpRightTurn[strtolower(self::WEST)] = \"rightWest\";\n\t\t\t$this->jumpRightTurn[strtolower(self::EAST)] = \"rightEast\";\n\t\t\treturn;\n\t\t}", "public function setCanJump($value)\n {\n return $this->set(self::_CAN_JUMP, $value);\n }", "public function getGuildJump()\n {\n return $this->get(self::_GUILD_JUMP);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test admin users page
public function testAdminUsersPage() : void { $response = $this->actingAs(static::$user, 'web') ->get('/admin/users'); $response->assertStatus(200) ->assertSee('Χρήστες'); }
[ "public function testAdminAdmin()\n {\n $this->actingAs($this->admin)\n ->visit('/admin')\n ->dontSee('Register')\n ->dontSee('Login')\n ->see($this->admin->name)\n ->see('logged in as admin')\n ->see('Brackets') //navigation\n ->see('Home') //navigation\n ->see('Admin');\n }", "public function testAdminCanViewTheUserIndex()\n {\n $this->setupUsers();\n\n $response = $this\n ->actingAs($this->admin)\n ->get('/admin/users');\n \n $response->assertStatus(200);\n $response->assertSee('User1');\n $response->assertSee('User1');\n }", "public function testEditUsersPageAccessForSuperAdmin()\n {\n $response = $this->get('/edit-users');\n $response->assertStatus(Response::HTTP_OK);\n }", "public function test_show_urls_list_page_admin()\n {\n $admin = User::find(1);\n $this->actingAs($admin)\n ->get('/url/list')\n ->assertStatus(200);\n }", "public function testListAsAdmin()\n {\n $crawler = $this->client->request('GET', '/login');\n $buttonCrawlerForm = $crawler->selectButton('Se connecter');\n $form = $buttonCrawlerForm->form();\n $this->client->submit($form, [\n '_username' => 'Mirko Venturi',\n '_password' => 'Mirko87'\n ]);\n $this->client->request('GET', '/users');\n static::assertEquals(200, $this->client->getResponse()->getStatusCode());\n }", "public function administradorTest()\n {\n\t\t// $this->markTestIncomplete();\n $this->defaultUsers();\n $type_id = Tuser::where('name', 'Administrador')->first()->id;\n $user_id = Tuser_user::where('tuser_id', $type_id)->first()->user_id;\n $user = User::findOrFail($user_id);\n $this->actingAs($user);\n\n $response = $this->get('admin/tests');\n $response->assertStatus(200);\n $response->assertViewIs('tests');\n // An administrador don't access sys/tests\n $response = $this->get('sys/tests');\n $response->assertStatus(302); \t\n }", "public function testAdminUserCreatePage() : void\n {\n $response = $this->actingAs(static::$user, 'web')\n ->get('/admin/users/create');\n\n $response->assertStatus(200)\n ->assertSee('Εισαγωγή χρήστη');\n }", "public function testAdminHome()\n {\n $this->actingAs($this->admin)\n ->visit('/')\n ->click('Admin')\n ->seePageIs('/admin')\n ->see('Teams')\n ->see('Bracket')\n ->see('Users')\n ->click('Teams')\n ->seePageIs('/admin/teams')\n ->click('Back')\n ->seePageIs('/admin');\n $this->actingAs($this->admin)\n ->visit('/')\n ->click('Admin')\n ->seePageIs('/admin')\n ->see('Teams')\n ->see('Bracket')\n ->see('Users')\n ->click('Users')\n ->seePageIs('/admin/users')\n ->click('Back')\n ->seePageIs('/admin');\n $this->actingAs($this->admin)\n ->visit('/admin/brackets')\n ->click('Back')\n ->seePageIs('/admin');\n }", "public function testCanShowAllUsersWhenAdminUser(){\n $this->actingAs(User::findOrFail(1))->get(USERS_ROUTE)\n ->seeStatusCode(self::HTTP_OK)\n ->seeJsonStructure([\n 'data' => [\n '*' => [\n 'email',\n 'id'\n ]\n ]\n ]);\n }", "function testAdminLogin() {\n\t\techo(\"Testing admin login... <br/>\");\n\t\t$this->assertField('username', '');\n $this->setField('username', 'test');\n\t\t$this->setField('password', 'test');\n $this->click(\"Log in\");\n\t\t$this->assertText('test user');\n\t\t$this->assertLink(\"Users\");\n }", "public function testGuestAdmin()\n {\n $this->visit('/admin')\n ->seePageIs('/login')\n ->see('Register')\n ->see('Login')\n ->dontSee('Brackets')\n ->dontSee('Amdin')\n ->dontSee('Home');\n }", "public function testUserLoginRoutePageAdmin()\n { \n $this->makeData();\n $this->browse(function (Browser $browser) {\n $browser->logout();\n $browser->visit('/')\n ->clickLink('Login')\n ->assertSee('Login')\n ->assertPathIs('/login')\n ->type('username', 'user1')\n ->type('password', 'user1')\n ->press('LOGIN')\n ->assertSee('Outstanding Places')\n ->assertSee('user1')\n ->assertPathIs('/');\n $browser->visit('/admin/reservation')\n ->assertSee('Outstanding Places')\n ->assertSee('user1')\n ->assertPathIs('/');\n });\n }", "public function testHomePageAccessForAdmin()\n {\n $response = $this->get('/');\n $response->assertStatus(Response::HTTP_OK);\n }", "public function testHomepageAdminRender() {\n // Create Client\n $client = $this->createRoleAdminClient();\n $crawler = $client->request('GET', '/');\n\n // Execute userBaseLayout\n $this->checkAdminBaseLayout($crawler);\n\n // Execute homepageBaseLayout\n $this->checkHomepageBaseLayout($crawler);\n\n // As Admin user, attempt list_users link\n $this->checkLink(\n 'Liste des utilisateurs',\n '/users',\n 1,\n $crawler\n );\n }", "public function testRequestPageWithAdminUser()\n\t{\n\t\tprintf('%s%c','(3)Test request page with admin login',10);\n\n\t\t//Login with general user\n\t\tAddMaindomainTest::loginAdminUser();\n\n\t\tprintf('%s%c','### Request admin domain page ###',10);\n\n\t\t$client = static::createClient();\n\t\t\n\t\t//Request admin domain page\n\t\t$crawler = $this->client->request('GET', '/admin/domain');\n\t\tprintf('%s%c','>Request(\"GET\", \"/admin/domain\")',10);\n\n\t\t// Assert a specific 200 status code (site manage page OK)\n\t\t$this->assertTrue($this->client->getResponse()->isOk());\n\n\t\tprintf('%s%c','Page = '.$crawler->filter('title')->first()->text().' (Test OK)',10);\n\n\t\tprintf('%s%c','----------------------------------------',10);\n\t}", "public function testIndexActionWithAdminCredentials(): void {\n $crawler = $this->logInAdmin();\n $client = $this->getClient();\n\n // Click on nav-admin button\n $crawler = $client->click($crawler->selectLink(\"Mes CV\")->link());\n $this->assertEquals(200, $client->getResponse()->getStatusCode(), \"2. The status code expected is not ok.\");\n $this->assertEquals(\"/restricted/resume/\", $client->getRequest()->getRequestUri(), \"3. The request uri expected is not ok.\");\n $this->assertContains(\"Il n'y a aucune donnée pour le moment !\",\n $crawler->filter(\"#resume-container\")->text(), \"4. The page has to contain no element.\");\n }", "public function testTheWritingsPageLoadsSuccessfullyForAdmins()\n {\n $admin = factory(\\App\\User::class)->states('admin')->create();\n $this->actingAs($admin);\n\n $response = $this->get('writings');\n $response->assertStatus(200);\n }", "public function testAdministratorAccessAllPages()\n\t{\n\t\t$this->login($this->users['sample1']['varName'], $this->passwordAdmin);\n\n\t\t$this->open('accounting');\n\t\t$this->assertTextNotPresent('You don\\'t have access to this section.');\n\t\t$this->assertTextNotPresent('Unable to resolve the request');\n\n\t\t$this->open('user');\n\t\t$this->assertTextNotPresent('You don\\'t have access to this section.');\n\t\t$this->assertTextNotPresent('Unable to resolve the request');\n\n\t\t$this->open('setting');\n\t\t$this->assertTextNotPresent('You don\\'t have access to this section.');\n\t\t$this->assertTextNotPresent('Unable to resolve the request');\n\n\t\t// edit himself information\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('You don\\'t have access to this section.');\n\t\t$this->assertTextNotPresent('Unable to resolve the request');\n\t\t$this->assertTextPresent('Edit user');\n\n\t\t// edit manager information\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('You don\\'t have access to this section.');\n\t\t$this->assertTextNotPresent('Unable to resolve the request');\n\t\t$this->assertTextPresent('Edit user');\n\t}", "public function testAdminPromotePageAccess()\n {\n $user = factory(\\App\\User::class)->create([\n 'email' => 'admintest@localhost.com',\n 'password' => bcrypt('testpass'),\n 'permission' => 2 //admin permission\n ]);\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->type('email', 'admintest@localhost.com')\n ->type('password', 'testpass')\n ->press('Login')\n ->visit('/admin/promote/1')\n ->assertSee('Sorry, you\\'re not the Super Administrator');\n });\n $user->delete();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/////////////////////////////////////////////////////////////////////////// prepare_hidden_var_form ====================== / This function prepare the hidden var for the form \param $aParam parameter array \return html
function prepare_hidden_var_form($aParam) { $hv = ""; if(isset($aParam['hidden_vars'])) { foreach ( $aParam['hidden_vars'] as $fld => $fld_value ) { $hv.= ('<input type="hidden" name="' . $fld . '" value="' . $fld_value.'" />'); } } return $hv; }
[ "function prepare_hidden_var($aParam)\n{\n\t$hv = \"\";\n\tif(isset($aParam['hidden_vars']))\n\t\t{\n\t\t\tforeach ( $aParam['hidden_vars'] as $fld => $fld_value )\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$hv.= ('&amp;' . $fld . '=' . $fld_value);\n\t\t\t\t}\n\t\t}\n\treturn $hv;\n}", "private function prepareHiddenInput(){\r\n\t echo (isset($this->settings['before_field']))? $this->settings['before_field']:null; //Aded by WCD\r\n\t\techo '<input type=\"hidden\" ';\r\n\t\techo 'name = \"'.$this->name.'\" ';\r\n\t\techo (isset($this->settings['id']))? 'id = \"'.$this->settings['id'].'\" ':null;\r\n\t\techo (isset($this->settings['value']))? 'value = \"'.$this->settings['value'].'\" ':null;\r\n echo (isset($this->settings['style']))? $this->settings['style']:null; //Aded by WCD\r\n\t\techo ' />';\r\n\t\techo (isset($this->settings['after_field']))? $this->settings['after_field']:null; //Aded by WCD\t\r\n\t}", "function layout_form_hidden( $fld, $value )\n{\n\n\t\n\n\t//print_r($value);\n\t$html = \"<input type='hidden' name='$fld' id='dbmng_$fld' value='\".$value.\"' />\\n\";\n\n\treturn $html;\n}", "function hiddenFields($name,$value){\n\tif(is_array($value)){\n\t\tforeach($value as $k=>$v){\n\t\t\thiddenFields($name.'['.$k.']',$v);\n\t\t}//foreach\n\t}else{\n\t\t?>\n<input type=\"hidden\" name=\"<?=$name?>\"\n\tvalue=\"<?=htmlspecialchars($value)?>\">\n\t\t<?php\n\t}\n}", "function dsf_form_hidden($name, $value = '', $parameters = '') {\n $field = '<input type=\"hidden\" name=\"' . dsf_output_string($name) . '\" id=\"' . dsf_output_string($name) . '\"';\n\t\n if (dsf_not_null($value)) {\n $field .= ' value=\"' . dsf_output_string($value) . '\"';\n }\n\n if (dsf_not_null($parameters)) $field .= ' ' . $parameters;\n\n $field .= ' />';\n\n return $field;\n }", "private function hidden_variables()\r\n\t{\r\n\t\t$str = \"\";\r\n\t\t// in\r\n\t\tforeach ($this->filter_db_variables($this->vars_in) as $field => $value)\r\n\t\t\t$str .= \"<input type='hidden' name='\".$field.\"_in' value='\".$value.\"' />\";\r\n\t\t// out\r\n\t\tforeach ($this->filter_db_variables($this->vars_out) as $field => $value)\r\n\t\t\t$str .= \"<input type='hidden' name='\".$field.\"_out' value='\".$value.\"' />\";\r\n\t\t// projects\r\n\t\tif (count($this->projects) > 0)\r\n\t\t{\r\n\t\t\t$str .= \"<input type='hidden' name='projects' value='\".implode(',',array_keys($this->projects)).\"' />\";\r\n\t\t\tforeach ($this->projects as $id_in => $id_out)\r\n\t\t\t\t$str .= \"<input type='hidden' name='project_\".$id_in.\"' value='\".$id_out.\"' />\";\r\n\t\t}\r\n\t\t// categories\r\n\t\tif (count($this->categories) > 0)\r\n\t\t{\r\n\t\t\t$str .= \"<input type='hidden' name='categories' value='\".implode(',',array_keys($this->categories)).\"' />\";\r\n\t\t\tforeach ($this->categories as $id_in => $id_out)\r\n\t\t\t\t$str .= \"<input type='hidden' name='category_\".$id_in.\"' value='\".$id_out.\"' />\";\r\n\t\t}\r\n\t\t// severities\r\n\t\tif (count($this->severities) > 0)\r\n\t\t{\r\n\t\t\t$str .= \"<input type='hidden' name='severities' value='\".implode(',',array_keys($this->severities)).\"' />\";\r\n\t\t\tforeach ($this->severities as $id_in => $id_out)\r\n\t\t\t\t$str .= \"<input type='hidden' name='severity_\".$id_in.\"' value='\".$id_out.\"' />\";\r\n\t\t}\r\n\t\t// custom fields\r\n\t\tif (count($this->custom_fields) > 0)\r\n\t\t{\r\n\t\t\t$str .= \"<input type='hidden' name='custom_fields' value='\".implode(',',array_keys($this->custom_fields)).\"' />\";\r\n\t\t\tforeach ($this->custom_fields as $id_in => $id_out)\r\n\t\t\t\t$str .= \"<input type='hidden' name='custom_field_\".$id_in.\"' value='\".$id_out.\"' />\";\r\n\t\t}\r\n\t\t// options\r\n\t\tif (count($this->options) > 0)\r\n\t\t{\r\n\t\t\t$str .= \"<input type='hidden' name='options' value='\".implode(',',array_keys($this->options)).\"' />\";\r\n\t\t\tforeach ($this->options as $name => $value)\r\n\t\t\t\t$str .= \"<input type='hidden' name='option_\".$name.\"' value='\".$value.\"' />\";\r\n\t\t}\r\n\t\treturn $str;\r\n\t}", "protected function generateHiddenFields()\n {\n global $objPage;\n $strTagEnding = ($objPage->outputFormat == 'html5') ? '>' : ' />';\n $strBuffer = '';\n\n foreach ($this->arrHiddenFields as $k=>$v)\n {\n $strBuffer .= sprintf('<input type=\"hidden\" name=\"%s\" value=\"%s\"%s', $k, $v, $strTagEnding) . \"\\n\";\n }\n\n return $strBuffer;\n }", "function create_HiddenInputs() {\n $this->hiddenInputs = '';\n $donotHide = array('searchfor','o','sortorder','start','act','sl_tags','sl_id','delete');\n foreach($_REQUEST as $key=>$val) {\n if (!in_array($key,$donotHide,true)) {\n $this->hiddenInputs.=\"<input type='hidden' value='$val' name='$key'>\\n\";\n }\n }\n }", "function get_hidden_fields()\n{\n\tglobal $HTTP_POST_VARS;\n\t$keys_array = array_keys($HTTP_POST_VARS);\n\t$values_array = array_values($HTTP_POST_VARS);\n\t$count = count($keys_array);\n\tif($count)\n\t{\n\t\t$hidden_fields = '<input type=\"hidden\" name=\"' . $keys_array[0] . '\" value=\"' . $values_array[0] . '\" />';\n\t\tfor ($i = 1; $i < $count; $i++)\n\t\t{\n\t\t\t$hidden_fields .= '<input type=\"hidden\" name=\"' . $keys_array[$i] . '\" value=\"' . $values_array[$i] . '\" />';\n\t\t}\n\t\treturn $hidden_fields;\n\t}\n\telse return '';\n}", "static function hidden_input($name,$value){\n\t\treturn \"<input type='hidden' name='$name' value='$value'/>\";\n\t}", "function array_to_form_hidden($data, $array = false) {\n\n\tif (!$data OR !is_array($data)) {\n\t\treturn '';\n\t}\n\n\t$str = '';\n\n\tforeach ($data as $k => $v) {\n\t\t$name = htmlspecialchars($k, ENT_QUOTES);\n\n\t\tif ($array) {\n\t\t\t$name = \"{$array}[$name]\";\n\t\t}\n\n\t\tif (is_array($v)) {\n\t\t\t$str .= array_to_form_hidden($v, $name);\n\t\t} else {\n\t\t\t$value = htmlspecialchars($v);\n\t\t\t$str .= \"<input type='hidden' name='$name' value='$value' />\\n\";\n\t\t}\n\t}\n\n\treturn $str;\n}", "function _getHiddenField( $name, $value, $id )\r\n\t{\r\n\t\treturn \"<input class='fabrikinput inputbox' type='hidden' name='$name' value='$value' id='$id' />\\n\";\r\n\t}", "function HtmlInputHidden($id, $name, $value, $extra=\"\") {\n echo \"<input type='hidden'\";\n if ( $id ) echo \" id='$id'\";\n if ( $name ) echo \" name='$name'\";\n echo \" value=\\\"$value\\\"\";\n if ( $extra ) echo \" $extra\";\n echo \">\\n\";\n }", "function buildHiddenFromRequest() {\r\n if (count($_REQUEST) > 0) {\r\n foreach($_REQUEST as $nomeCampo=>$valor) {\r\n\t$wHidden = new WHidden($nomeCampo,$valor);\r\n }\r\n }\r\n }", "protected function _GetHiddenField()\n {\n return sprintf('<input type=\"hidden\" name=\"%1$s\" id=\"%1$s\" value=\"%2$s\" />'.\"\\n\",\n TGlobal::OutHTML($this->name),\n TGlobal::OutHTML($this->data)\n );\n }", "public function generate_hidden_inputs() {\n $input_names = $this->hidden_input_form;\n $hidden_inputs = '';\n foreach ($input_names as $input_name) {\n $value_input = (isset($this->{$input_name}) && $this->{$input_name}) ? $this->{$input_name} : '';\n $hidden_inputs .= \"<input type='hidden' name={$input_name} value={$value_input}>\";\n }\n return $hidden_inputs;\n }", "function form_view_hidden_fields($wcode, $page, $maxp, $poll)\n{\n echo elgg_view_field([\n '#type' => 'hidden',\n 'name' => 'wcode',\n 'value' => $wcode\n ]);\n echo elgg_view_field([\n '#type' => 'hidden',\n 'name' => 'page',\n 'value' => $page\n ]);\n echo elgg_view_field([\n '#type' => 'hidden',\n 'name' => 'maxp',\n 'value' => $maxp\n ]);\n echo elgg_view_field([\n '#type' => 'hidden',\n 'name' => 'poll',\n 'value' => $poll\n ]);\n}", "public function render_hidden_input()\n {\n }", "public function load_hidden()\n {\n echo \"<input type='hidden' name='$this->name' id='$this->id'\"\n .(($this->class) ? \" class='$this->class'\" : \"\")\n .(($this->placeholder) ? \" placeholder='$this->placeholder'\" : \"\")\n .\" value='$this->value'/>\";\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get custom subscriber ID
public function getCustomSubscriberId(): string { if (!$this->matchingMode->equals(MatchingMode::CUSTOMER_SUBSCRIBER_ID())) { throw new InvalidUseOfClassException( sprintf( 'Can\'t use getCustomSubscriberId method, because Matching mode is "%s", if you want use ' . 'custom subscriber id as identifier create object with static method createCustomSubscriberId', $this->matchingMode->getValue() ) ); } if ($this->customSubscriberId === null) { throw InvalidUseOfClassException::createPropertyOfClassCanNotBeNull($this, 'customSubscriberId'); } return $this->customSubscriberId; }
[ "public function getSubscriberID()\n {\n return $this->subscriberID;\n }", "public function getSubscriberId()\n {\n return $this->getParam('subscriber_id');\n }", "public function getSubscriberId()\n {\n return $this->subscriberId;\n }", "public function getSubscriptionId();", "public function getSubscriberId(){\n return $this->s_id;\n }", "public function getCustomId(): string\n {\n return $this->custom_id;\n }", "function getSubscriptionId() {\n\t\treturn $this->getData('subscriptionId');\n\t}", "public function getSubscriptionId()\n {\n return $this->get(self::SUBSCRIPTION_ID);\n }", "public function getRecipientCustomsId()\n {\n return $this->RecipientCustomsId;\n }", "public function getSubscriberCode()\n {\n return $this->subscriberCode;\n }", "abstract protected function get_local_subscription_id();", "public function getCustomId()\n {\n return $this->custom_id;\n }", "public function getCustomId()\n {\n return $this->customId;\n }", "public function getCustomDocumentId()\n {\n $value = $this->get(self::CUSTOMDOCUMENTID);\n return $value === null ? (string)$value : $value;\n }", "function slb_get_subscriber_id( $email ) {\n\t\n\t$subscriber_id = 0;\n\t\n\ttry {\n\t\n\t\t// check if subscriber already exists\n\t\t$subscriber_query = new WP_Query( \n\t\t\tarray(\n\t\t\t\t'post_type'\t\t=>\t'slb_subscriber',\n\t\t\t\t'posts_per_page' => 1,\n\t\t\t\t'meta_key' => 'slb_email',\n\t\t\t\t'meta_query' => array(\n\t\t\t\t array(\n\t\t\t\t 'key' => 'slb_email',\n\t\t\t\t 'value' => $email, // or whatever it is you're using here\n\t\t\t\t 'compare' => '=',\n\t\t\t\t ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t\n\t\t// IF the subscriber exists...\n\t\tif( $subscriber_query->have_posts() ):\n\t\t\n\t\t\t// get the subscriber_id\n\t\t\t$subscriber_query->the_post();\n\t\t\t$subscriber_id = get_the_ID();\n\t\t\t\n\t\tendif;\n\t\n\t} catch( Exception $e ) {\n\t\t\n\t\t// a php error occurred\n\t\t\n\t}\n\t\t\n\t// reset the Wordpress post object\n\twp_reset_query();\n\t\n\treturn (int)$subscriber_id;\n\t\n}", "public function getSubscriptionID()\n\t{\n\t\treturn $this->subscription_id;\n\t}", "public function getSubscriptionId(){\n \t\n \t$id = $this->getUserId();\n \t$subscription = $this->Subscription->findByUserId($id);\n \treturn $subscription['Subscription']['id'];\n\n }", "public function get_subscriber();", "public function getSubscriptionId()\n {\n return $this->getParameter('subscription_id');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation cancelVerify Cancel Verify Request
public function cancelVerify($id) { list($response) = $this->cancelVerifyWithHttpInfo($id); return $response; }
[ "public function cancel(){}", "public function cancel() {}", "public function cancel() {\n\t\treturn PaymentResult::newFailure();\n\t}", "public function requestCancel(){\n\t\t$this->checkWorkflow(self::STATUS_CANCELED, false);\n\t\tif ($this->hasCancelPeriod()) {\n\t\t\t$this->getSubscription()->setCancelRequest(true);\n\t\t\t$this->save();\n\t\t\t$this->sendCancelRequestEmail();\n\t\t\t$this->getLogger()->info('The cancelation of the subscription was requested.');\n\t\t}\n\t\telse {\n\t\t\t$this->cancel();\n\t\t\t$this->sendCancelEmail();\n\t\t}\n\t}", "public function cancelRequest()\n {\n $this->assertFalse($this->request->isCancelled());\n $this->request->cancel();\n $this->assertTrue($this->request->isCancelled());\n }", "public function canceled();", "function cancelAfterBegin($stub)\n{\n $call = $stub->StreamingInputCall();\n $call->cancel();\n list($result, $status) = $call->wait();\n hardAssert($status->code === Grpc\\STATUS_CANCELLED,\n 'Call status was not CANCELLED');\n}", "public function cancel_commitment() {\n $this->form_validation->set_rules('id', 'Opportunity', 'trim|required|callback__verify_cancellation');\n if ($this->form_validation->run()) {\n $this->opportunity_model->unschedule_user($this->input->post('id'), $_SESSION['user']->id);\n }\n else{\n echo $this->form_validation->error_string('<li>', '</li>');\n }\n }", "public function testCancellationWithVoid()\n {\n $msg = new CancelDocument(\n new TicketCancelDocumentOptions([\n 'eTicket' => '1721587458965',\n 'airlineStockProvider' => '6X',\n 'officeId' => 'NCE6X0100',\n 'void' => true,\n ])\n );\n\n $this->assertEquals(CancelDocument\\StatusInformation::INDICATOR_SALES_REPORT_ONLY, $msg->voidOption->statusInformation->indicator);\n\n $this->assertEmpty($msg->sequenceNumberRanges);\n\n $this->assertEquals('1721587458965', $msg->documentNumberDetails->documentDetails->number);\n $this->assertNull($msg->documentNumberDetails->documentDetails->type);\n $this->assertNull($msg->documentNumberDetails->status);\n\n $this->assertEquals('6X', $msg->stockProviderDetails->officeSettingsDetails->stockProviderCode);\n $this->assertNull($msg->stockProviderDetails->officeSettingsDetails->marketIataCode);\n\n $this->assertEquals('NCE6X0100', $msg->targetOfficeDetails->originatorDetails->inHouseIdentification2);\n }", "public function cancelCreditApplicationAction() {\n $this->forbidNotAjax();\n\n $client_initial_data = ClientInitialData::findByToken( $_COOKIE['remembered_client'] );\n $client_id = $client_initial_data->getClientId();\n $shop_id = $client_initial_data->getShopId();\n $order_id = $client_initial_data->getOrderId();\n\n $request = Request::findForClient( $client_id, $shop_id, $order_id );\n\n if ( ! $request->changeStatus( 'cancel', date( 'Y-m-d H:i:s', time() ) ) ) {\n $this->sendJsonResponse( [ 'error' => true, 'message' => $request->getErrors() ] );\n }\n\n setcookie( 'remembered_client', '', time() - 3600, '/' );\n\n $this->redirect( $client_initial_data->getCallbackUrl() );\n }", "public function testCancelCloudUserInvitation()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "protected function cancel_abort() {\n\t\t$this->abort = false;\n\t}", "public function test_cancel_canceled_ticket()\n {\n $ticket_id = $this->model->generateTicketId();\n $ticket_model = Model::getModel('App\\Josel\\Models\\Ticket');\n $ticket_model->getObjects()->setData(array(\n 'ticket_id' => $ticket_id,\n 'state' => $ticket_model::STATE_CANCELED,\n ));\n $ticket_model->save();\n\n $_SERVER[\"REQUEST_URI\"] = self::CANCEL_URL;\n $_GET['ticket_id'] = $ticket_id;\n $this->request = new Request();\n $response = $this->controler->cancel($this->request);\n $this->assertEquals(403, http_response_code());\n $this->assertEquals($response['success'], false);\n $this->assertEquals($response['message'], \"ERROR: ticket $ticket_id not cancelable\");\n }", "function cancelRequest() {\n\t\t$user = User::current();\n\t\t$errors = array();\n\t\t$requestId = Input::get('requestId');\n\t\t$request = FriendRequest::find($requestId);\n\n\t\tif ($request) {\n\t\t\tif ($request->owner_id == $user->id && $request->status == User::STATUS_PENDING) {\n\t\t\t\t$request->delete();\n\t\t\t}\n\t\t} else {\n\t\t\t$errors[] = 'Request not found';\n\t\t}\n\n\t\treturn Response::json(array('errors' => $errors));\n\t}", "public function canceled()\n {\n }", "public function cancel()\n {\n $response = $this->client->put(InvoiceService::INVOICE_PATH . \"/$this->id/cancel\");\n $this->updateFromArray($response['body_assoc']);\n }", "public function testClientCanceledRequest(): void\n {\n $mock = new MockHandler([\n new Response(200, [], '{\"ok\":true,\"result\":{}}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n\n $telegram_client_bot = new TelegramClientBot($handler);\n $telegram_client_bot->clientCanceledRequest(\n 'Петров Пётр Петрович',\n '79097391754',\n 'ИП «Петров П.П.»',\n 3000,\n 1\n );\n\n $this->assertTrue(true);\n }", "public function handle_cancel_request() {\n $cancel = optional_param('cancel', 0, PARAM_BOOL);\n if ($cancel) {\n // Redirect to frontpage, needed for loginhttps\n redirect(new moodle_url('/'));\n }\n }", "public function canceled()\n {\n $request = $this->sl->get('request');\n\n $code = $request->getPost('ResponseCode');\n\n // Canceled request or could not accept money\n if ($code != 1) {\n return true;\n }\n\n // Not failed\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function: install_wp_ebay_relevancead_plugin() install the database for the eBay RelavanceAd Plugin
function wp_ebay_relevancead_install() { global $wpdb; $table_name = $wpdb->prefix."era_content"; if ( $wpdb->get_var("show tables like '{$table_name}'") != $table_name ) { // create the database table $sql = "CREATE TABLE IF NOT EXISTS `{$table_name}` ". " ( ". " `id` int(10) unsigned NOT NULL auto_increment, ". " `name` varchar(100) NOT NULL default '', ". " `description` varchar(255) NOT NULL default '', ". " `options` text NOT NULL, ". " `active` tinyint(3) unsigned NOT NULL default '1', ". " `standard` tinyint(1) default '0', ". " PRIMARY KEY (`id`));"; add_option('ebay_relevance_ad_version',EBAY_RELEVANCE_AD_VERSION); $wpdb->hide_errors(); // Keine Fehler ausgeben $result = $wpdb->query( $sql ); $wpdb->flush(); // Den Cache leeren // Keine Möglichkeit, auf Fehler sauber zu prüfen, also prüfe ob die Datenbank vorhanden ist if ( $wpdb->get_var("show tables like '{$table_name}'") != $table_name ) { print "Konnte die Tabelle nicht anlegen"; die(); } } }
[ "function install_db() {\n\t\tglobal $wpdb;\n\t\t$charset_collate = '';\n\n\t\tif ( $wpdb->supports_collation() ) {\n\t\t\tif ( !empty( $wpdb->charset ) ) {\n\t\t\t\t$charset_collate = \"DEFAULT CHARACTER SET $wpdb->charset\";\n\t\t\t}\n\t\t\tif ( !empty( $wpdb->collate ) ) {\n\t\t\t\t$charset_collate .= \" COLLATE $wpdb->collate\";\n\t\t\t}\n\t\t}\n\n\t\t$query = \"CREATE TABLE \".$wpdb->prefix.\"dc_vote (\n\t\t\t\t\tID bigint(20) unsigned NOT NULL auto_increment,\n\t\t\t\t\tpost_id bigint(20) unsigned NOT NULL,\n\t\t\t\t\tauthor_id bigint(20) unsigned NOT NULL,\n\t\t\t\t\tvote_count bigint(20) NULL,\n\t\t\t\t\tPRIMARY KEY (ID)\n\t\t\t\t);\n\t\t\t\t\tCREATE TABLE \".$wpdb->prefix.\"dc_vote_meta (\n\t\t\t\t\tpost_id bigint(20) unsigned NOT NULL,\n\t\t\t\t\tvoter_id bigint(20) unsigned NOT NULL,\n\t\t\t\t\tvote_type varchar(40) NOT NULL,\n\t\t\t\t\tvote_value bigint(20) unsigned NOT NULL,\n\t\t\t\t\tvote_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',\n\t\t\t\t\tvoter_ip varchar(40) NOT NULL,\n\t\t\t\t\tKEY post_id (post_id)\n\t\t\t\t) $charset_collate;\";\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tdbDelta( $query );\n\n\t\t// Create options\n\t\tadd_option( \"dc-vote-db-version\", $this->db_version );\n\n\t\t// upgrade for WP version below 3.1\n\t\t$installed_ver = get_option( 'dc-vote-db-version' );\n\t\tif ( $installed_ver != $this->db_version ) {\n\t\t\t$query = \"CREATE TABLE \".$wpdb->prefix.\"dc_vote (\n\t\t\t\t\t\t\tID bigint(20) unsigned NOT NULL auto_increment,\n\t\t\t\t\t\t\tpost_id bigint(20) unsigned NOT NULL,\n\t\t\t\t\t\t\tauthor_id bigint(20) unsigned NOT NULL,\n\t\t\t\t\t\t\tvote_count bigint(20) NULL,\n\t\t\t\t\t\t\tPRIMARY KEY (ID)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\tCREATE TABLE \".$wpdb->prefix.\"dc_vote_meta (\n\t\t\t\t\t\t\tpost_id bigint(20) unsigned NOT NULL,\n\t\t\t\t\t\t\tvoter_id bigint(20) unsigned NOT NULL,\n\t\t\t\t\t\t\tvote_type varchar(40) NOT NULL,\n\t\t\t\t\t\t\tvote_value bigint(20) unsigned NOT NULL,\n\t\t\t\t\t\t\tvote_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',\n\t\t\t\t\t\t\tvoter_ip varchar(40) NOT NULL,\n\t\t\t\t\t\t\tKEY post_id (post_id)\n\t\t\t\t\t\t) $charset_collate;\";\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\t\tdbDelta( $query );\n\n\t\t\tupdate_option( 'dc-vote-db-version', $this->db_version );\n\t\t}\n\t}", "function install(){\n global $wpdb;\n\n $RP_tb_name=$wpdb->prefix.\"rplugin\";\n if($wpdb->get_var( \"show tables like '$RP_tb_name'\" ) != $RP_tb_name) \n {\n $RP_query=\"CREATE TABLE $RP_tb_name (\n id int (100) NOT NULL,\n status varchar (100) DEFAULT '',\n cookie varchar (100) DEFAULT '',\n slug varchar (100) DEFAULT '',\n url varchar (100) DEFAULT ''\n )\";\n\n require_once(ABSPATH .\"wp-admin/includes/upgrade.php\");\n dbDelta( $RP_query );\n }\n}", "function xmldb_local_vlacsguardiansurvey_install() {\r\n}", "function installplugins(){\r\n\t\tinclude_once(LOQ_APP_ROOT.'includes/pluginhandler.class.php');\r\n\t\tdefine('T_PLUGINS',$_SESSION['config']['table_prefix'].'plugins');\r\n\t\tdefine('TBL_PREFIX', $_SESSION['config']['table_prefix']);\r\n\t\tdefine('BLOGURL', $_SESSION['config']['blog_url']);\r\n\t\t$ph = new pluginhandler($this->db);\r\n\t\t$ph->scan_for_plugins(LOQ_APP_ROOT.'plugins');\r\n\t}", "function wp_ebay_relevancead_add_pages()\n{\n\tadd_management_page('eBay Relevance Ad', 'eBay Relevance Ad', 8, 'ebayrelevancead', 'wp_ebay_relevancead_plugin');\n}", "function plugin_options_install() {\n\t \tglobal $wpdb;\n \t\t$table_name = $wpdb->prefix . 'book_ticket';\n\t\t// create the ECPT metabox database table\n\t\t$field = '';\n\t\tfor ($i=1; $i < 101; $i++) { \n\t\t\t$field .= '`field_'.$i.'` varchar(50),';\n\t\t}\n\t\t\n\t\tif($wpdb->get_var(\"show tables like '$table_name'\") != $table_name) \n\t\t{\n\t\t\t$sql = \"CREATE TABLE \" . $table_name . \" (\n\t\t\t`id` mediumint(9) NOT NULL AUTO_INCREMENT,\n\t\t\t\".$field.\"\n\t\t\tUNIQUE KEY id (id)\n\t\t\t);\";\n\t\t\trequire_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\t\t\tdbDelta($sql);\n\t\t\tsave_book_data();\n\t\t}\n\n\t \n\t}", "public static function dbInstall()\n {\n include_once ABSPATH . 'wp-admin/includes/upgrade.php';\n $sql = InstaPrint::getTableDDL();\n dbDelta($sql);\n\n $sql = VirtualProduct::getTableDDL();\n dbDelta($sql);\n\n return;\n \n \n $table_name = self::getTableName();\n \n \n\n $sql = \"CREATE TABLE IF NOT EXISTS `$table_name` (\n `choice` enum('myfeed','hashtag') NOT NULL DEFAULT 'myfeed',\n `username` varchar(255) NOT NULL,\n `hashtag` varchar(255) NOT NULL DEFAULT 'statigram',\n `linking` enum('statigram','instagram') NOT NULL DEFAULT 'statigram',\n `show_infos` enum('true','false') NOT NULL DEFAULT 'true',\n `width` int(6) NOT NULL DEFAULT '380',\n `height` int(6) NOT NULL DEFAULT '420',\n `mode` enum('grid','slideshow') NOT NULL DEFAULT 'grid',\n `pace` int(6) NOT NULL DEFAULT '10',\n `layout_x` int(1) NOT NULL DEFAULT '3',\n `layout_y` int(1) NOT NULL DEFAULT '2',\n `padding` int(6) NOT NULL DEFAULT '10',\n `photo_border` enum('true','false') NOT NULL DEFAULT 'true',\n `background` varchar(6) NOT NULL DEFAULT 'FFFFFF',\n `text` varchar(6) NOT NULL DEFAULT '777777',\n `widget_border` enum('true','false') NOT NULL DEFAULT 'true',\n `radius` int(11) NOT NULL DEFAULT '5',\n `borderColor` varchar(6) NOT NULL DEFAULT 'DDDDDD',\n PRIMARY KEY (`choice`)\n );\";\n\n include_once ABSPATH . 'wp-admin/includes/upgrade.php';\n dbDelta($sql);\n\n self::dbInsert('username', 'statigram');\n }", "function analyzer_install(){\n\t\tglobal $wpdb;\n\t\t//ibou's create table code\n\n\t\t//alem's create page code\n\n\n\t\t$the_page_title = 'QuestionPeach Analyzer GUI';\n\t\t$the_page_name = 'QuestionPeach-analyzer';\n\n\t\t// the menu entry...\n\t\tdelete_option(\"my_plugin_page_title\");\n\t\tadd_option(\"my_plugin_page_title\", $the_page_title, '', 'yes');\n\t\t// the slug...\n\t\tdelete_option(\"my_plugin_page_name\");\n\t\tadd_option(\"my_plugin_page_name\", $the_page_name, '', 'yes');\n\t\t// the id...\n\t\tdelete_option(\"my_plugin_page_id\");\n\t\tadd_option(\"my_plugin_page_id\", '0', '', 'yes');\n\n\t\t$the_page = get_page_by_title( $the_page_title );\n\n\t\tif ( ! $the_page ) {\n\n\t\t\t$admin = new Analyzer();\n\t\t\t// Create post object\n\t\t\t$_p = array();\n\t\t\t$_p['post_title'] = $the_page_title;\n\t\t\t$_p['post_content'] = $admin->{'creatUI'}();\n\t\t\t$_p['post_status'] = 'publish';\n\t\t\t$_p['post_type'] = 'page';\n\t\t\t$_p['comment_status'] = 'closed';\n\t\t\t$_p['ping_status'] = 'closed';\n\t\t\t$_p['post_category'] = array(1); // the default 'Uncatrgorised'\n\n\t\t\t// Insert the post into the database\n\t\t\t$the_page_id = wp_insert_post( $_p );\n\n\t\t}\n\t\telse {\n\t\t\t// the plugin may have been previously active and the page may just be trashed...\n\n\t\t\t$the_page_id = $the_page->ID;\n\n\t\t\t//make sure the page is not trashed...\n\t\t\t$the_page->post_status = 'publish';\n\t\t\t$the_page_id = wp_update_post( $the_page );\n\n\t\t}\n\n\t\tdelete_option( 'my_plugin_page_id' );\n\t\tadd_option( 'my_plugin_page_id', $the_page_id );\n\t}", "function trp_bor_run(){\r\n\t\r\n\t/** Initialize update here in the main plugin file. It is a must **/\r\n\t// this is the URL our updater / license checker pings. This should be the URL of the site with EDD installed\r\n\tdefine( 'TRP_BOR_STORE_URL', 'https://translatepress.com' );\r\n\t// the name of your product. This should match the download name in EDD exactly\r\n\tdefine( 'TRP_BOR_ITEM_NAME', 'Browse as other Role' );\r\n\tif( !class_exists( 'TRP_EDD_SL_Plugin_Updater' ) ) {\r\n\t\t// load our custom updater\r\n\t\tinclude( dirname( __FILE__ ) . '/includes/class-edd-sl-plugin-updater.php' );\r\n\t}\r\n\t// retrieve our license key from the DB\r\n\t$license_key = trim( get_option( 'trp_license_key' ) );\r\n\t// setup the updater\r\n\t$edd_updater = new TRP_EDD_SL_Plugin_Updater( TRP_BOR_STORE_URL, __FILE__, array(\r\n\t\t\t\t\t\t'version' \t=> '1.0.2', \t\t// current version number\r\n\t\t\t\t\t\t'license' \t=> $license_key, \t// license key (used get_option above to retrieve from DB)\r\n\t\t\t\t\t\t'item_name' => TRP_BOR_ITEM_NAME, \t// name of this plugin\r\n\t\t\t\t\t\t'item_id' => '832',\r\n\t\t\t\t\t\t'author' \t=> 'Cozmoslabs', // author of this plugin\r\n\t\t\t\t\t\t'beta' \t\t=> false\r\n\t\t\t\t\t\t)\r\n\t\t\t);\r\n\t/** End the update initialization here **/\r\n\t\r\n\t\r\n\t\r\n require_once plugin_dir_path( __FILE__ ) . 'class-browse-as-other-role.php';\r\n if ( class_exists( 'TRP_Translate_Press' ) ) {\r\n new TRP_Browse_as_other_Role();\r\n }\r\n\t\r\n}", "public function install_module() {\n global $wpdb;\n global $cru_db_version;\n\n // TODO Add Query to create database\n $sql = \"TODO\";\n\n dbDelta($sql);\n }", "function pfex_create_database() {\n\t\n\tglobal $wpdb;\n\t\n\t$db_version = \"1.0\";\n\t$table_name = $wpdb->prefix . 'pfex_feed';\n\t$charset_collate = $wpdb->get_charset_collate();\n\t\n\t$installed_db_version = get_option(\"pfex_db_version\");\n\t\n\tif($installed_db_version != $db_version)\n\t{\n\t\n\t\t$sql = \"CREATE TABLE $table_name (\n\t\t\tid mediumint(9) NOT NULL AUTO_INCREMENT,\n\t\t\tlink text NOT NULL,\n\t\t\ttitle text NOT NULL,\n\t\t\tpodcast text NOT NULL,\n\t\t\tepisodetype text NOT NULL,\n\t\t\tepisodenumber text NOT NULL,\n\t\t\tpubdate datetime NOT NULL,\n\t\t\tshortcode text NOT NULL,\n\t\t\tPRIMARY KEY (id)\n\t\t) $charset_collate;\";\n\t\t\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $sql );\n\t\t\n\t\tif($installed_db_version)\n\t\t{\n\t\t\tupdate_option('pfex_db_version', $db_version);\n\t\t} else {\n\t\t\tadd_option('pfex_db_version', $db_version);\n\t\t}\n\t}\n\t\n\t\n}", "function install()\n\t{\n\t\t$this->createOption('quickmenu', 'Show in quick menu', 'yesno', 'yes');\n\t\t$this->createOption('deletetables', 'Delete this plugin\\'s table and data when uninstalling?', 'yesno', 'no');\n\t\tsql_query('CREATE TABLE IF NOT EXISTS ' . sql_table('plugin_randomquotedb') . '( rqdb_id INT(11) NOT NULL AUTO_INCREMENT, rqdb_quote LONGTEXT NOT NULL, rqdb_quoteby LONGTEXT, PRIMARY KEY(rqdb_id))');\n\t}", "function rsvp_database_setup() {\n\tglobal $wpdb;\n\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\trequire_once 'rsvp_db_setup.inc.php';\n}", "function rssfeeder_install()\n{\n global $wpdb;\n $table_name = $wpdb->prefix . \"feeder\";\n $charset_collate = $wpdb->get_charset_collate();\n $sql = \"CREATE TABLE $table_name (\n id int(11) NOT NULL AUTO_INCREMENT,\n title tinytext NOT NULL,\n feed_url varchar(255) DEFAULT '' NOT NULL,\n keywords varchar(255) DEFAULT '' NULL,\n category varchar(255) DEFAULT '' NOT NULL\n PRIMARY KEY (id)\n ) $charset_collate; \";\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\n dbDelta($sql);\n}", "function faq_install () {\n global $wpdb;\n global $faq_db_version;\n\n $table_name = $wpdb->prefix . \"faq\";\n if($wpdb->get_var(\"show tables like '$table_name'\") != $table_name) {\n\n $sql = \"CREATE TABLE \" . $table_name . \" (\n\t`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,\n\t`author_id` INT NOT NULL ,\n\t`question_date` DATE NOT NULL ,\n\t`question` TEXT NOT NULL ,\n\t`answer_date` DATE NOT NULL ,\n\t`answer` TEXT NOT NULL\n\t) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n\n $insert = \"INSERT INTO \" . $table_name .\n \" (author_id, question_date, question, answer_date, answer) \" .\n \"VALUES ('0', '\".date(\"Y-m-d\").\"','Sample question', '\".date(\"Y-m-d\").\"', 'Sample answer')\";\n\n $results = $wpdb->query( $insert );\n\n add_option(\"faq_db_version\", $jal_db_version);\n }\n\n}", "function install() {\n\t\t/** globalising of the needed variables, objects and arrays */\n\t\tglobal $db, $apcms;\n\t\t\n\t\t$selsort = $db->unbuffered_query_first(\"SELECT MAX(`sort`) FROM `\".$apcms['table']['global']['rightsidebar'].\"`\");\n\t\tif (isset($selsort) && intval($selsort[0]) >= 1) {\n\t\t\t$sort = intval($selsort[0]) + 1;\n\t\t} else {\n\t\t\t$sort = 1;\n\t\t}\n\t\t\n\t\t$boxcont = \"[php]\\$apcms['PLUGIN']['apcms_sidebar_poweredby']->ShowBox();[/php]\";\n\t\t\n\t\t$query = \"INSERT INTO `\".$apcms['table']['global']['rightsidebar'].\"` \n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t`title`,\n\t\t\t\t\t\t\t\t\t`content`,\n\t\t\t\t\t\t\t\t\t`sort`,\n\t\t\t\t\t\t\t\t\t`hidden`,\n\t\t\t\t\t\t\t\t\t`plugin`\n\t\t\t\t\t) VALUES \t(\n\t\t\t\t\t\t\t\t\t'\".$apcms['LANGUAGE']['GLOBAL_POWEREDBY'].\"',\n\t\t\t\t\t\t\t\t\t'\".apcms_ESC($boxcont).\"',\n\t\t\t\t\t\t\t\t\t'\".$sort.\"',\n\t\t\t\t\t\t\t\t\t'0',\n\t\t\t\t\t\t\t\t\t'apcms_sidebar_poweredby'\n\t\t\t\t\t\t\t\t);\";\n\t\t$db->unbuffered_query($query);\n\t\t\n\t}", "function gallery_install()\n{\n\tglobal $wpdb;\n\t$galleryplug = $wpdb->prefix . 'gallery';\n\tif($wpdb->get_var(\"SHOW TABLES LIKE $galleryplug\") != $galleryplug){\n\t\t$cr_galleryplug = \"CREATE TABLE IF NOT EXISTS $galleryplug(\n\t\t\t\t\t`id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t`name` varchar(100) NOT NULL,\n\t\t\t\t\t`desc` varchar(200) NOT NULL,\n\t\t\t\t\t`img1` varchar(255) NOT NULL,\n\t\t\t\t\t`img2` varchar(255) NOT NULL,\n\t\t\t\t\t`img3` varchar(255) NOT NULL,\n\t\t\t\t\t`shortcode` varchar(255) NOT NULL,\n\t\t\t\t\tPRIMARY KEY(`id`)\n\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;\";\n\n\t\t$wpdb->query($cr_galleryplug);\n\t}\n\tadd_option('gallery_on_page');\n}", "function dd_spg_install() {\n global $wpdb;\n $table_galleries = $wpdb->prefix . \"dd_spg_galleries\";\n $table_photos = $wpdb->prefix . \"dd_spg_photos\";\n \n \n if ($wpdb->get_var(\"SHOW TABLES LIKE '$table_galleries'\") != $table_galleries) {\n //Creating database galleries table for dd simple photo gallery \n $sql = 'CREATE TABLE '.$table_galleries.' (\n id int(11) NOT NULL auto_increment,\n title varchar(120) NOT NULL,\n description text,\n created datetime default NULL,\n updated datetime default NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;';\n \n $wpdb->query($sql);\n }\n \n \n \n \n if ($wpdb->get_var(\"SHOW TABLES LIKE '$table_photos'\") != $table_photos) {\n //Creating database photos table for dd simple photo gallery\n $sql = 'CREATE TABLE '.$table_photos.' (\n id int(11) NOT NULL auto_increment,\n gallery_id int(11) NOT NULL default 0,\n title varchar(120) NOT NULL,\n photo text NOT NULL,\n description text,\n ordering int(11) NOT NULL default 0,\n created datetime default NULL,\n updated datetime default NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ;';\n $wpdb->query($sql);\n \n }\n}", "function rsvp_database_setup() {\n\t\tglobal $wpdb;\n\t\t//require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\t\trequire_once(\"admin/rsvp_db_setup.inc.php\");\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the code class btp.
public function setCodeClassBtp($codeClassBtp) { $this->codeClassBtp = $codeClassBtp; return $this; }
[ "public function setClass($class);", "public function testSetCodeClassBtp() {\n\n $obj = new EmpDadsuGene();\n\n $obj->setCodeClassBtp(\"codeClassBtp\");\n $this->assertEquals(\"codeClassBtp\", $obj->getCodeClassBtp());\n }", "public function getCodeClassBtp() {\n return $this->codeClassBtp;\n }", "protected function setClass()\n {\n if (!isset($this->rawOptions['class'])) {\n $this->rawOptions['class'] = static::DEFAULT_CLASS;\n }\n\n $this->class = $this->rawOptions['class'];\n unset($this->rawOptions['class']);\n }", "public function setClass($class) {\n\t\t$this->class = $class;\n\t}", "public function generateClass(CodeClass $class);", "public function setCode( $code );", "function setCodeType($codeType) {\n\t\t\t$this->codeType = $codeType;\n\t\t}", "public function setFrameClass($class)\n {\n Basic::$frame['class'] = $class;\n }", "public function getCodeClassBtp(): ?string {\n return $this->codeClassBtp;\n }", "function setDataClass($dataClass);", "public function setClass($class) {\n $this->class = new Attribute('class', $class);\n $this->addAttribute($this->class);\n }", "function setClass($class) {\n\n $this->setAttribute('class',$class);\n return $this;\n\n }", "public function set_code($value)\r\n\t{\r\n\t\treturn $this->set_attr('code', $value);\r\n\t}", "public function setInfoClass ($class_name = null) {}", "function setBaseClass($baseClass);", "public function setFileClass ($class_name = null) {}", "function setLabelClass($class){\n\t\t$this->labelClass=$class;\n\t}", "public function SetToolClass ($toolClass);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a sectionsarray by applying the conditions. It will internally sets the $aConditionedSections array property.
public function getConditionedSections( $aSections=null ) { $aSections = is_null( $aSections ) ? $this->aSections : $aSections; $_aNewSections = array(); foreach( $aSections as $_sSectionID => $_aSection ) { $_aSection = $this->getConditionedSection( $_aSection ); if ( $_aSection ) { $_aNewSections[ $_sSectionID ] = $_aSection; } } $this->aConditionedSections = $_aNewSections; return $_aNewSections; }
[ "public function getSectionsEnabled()\n {\n $criteria = Criteria::create()->where(\n Criteria::expr()->eq('isEnabled', true)\n );\n\n $sections = $this->getSections()->matching($criteria);\n\n return $sections;\n }", "public static function getSections()\n {\n $sections = Section::orderby('order', 'asc')->where('status', 'Active')->get();\n\n return $sections;\n //return Section::orderby('order', 'asc')->where('status', 'Active')->get();\n }", "public function getSections(): array\n {\n return $this->sections;\n }", "public function sections() {\n\n\t\t$sth = $this->dbh->prepare('select SectionID from Section where EventID = ?');\n\t\t$sth->execute([$this->id]);\n\t\t$rows = $sth->fetchAll(PDO::FETCH_NUM);\n\n\t\t$results = array();\n\t\tforeach($rows as $row) {\n\t\t\tarray_push($results, new CafeSection($this->dbh, $row[0]));\n\t\t}\n\t\treturn $results;\n\t}", "private function get_all_sections() {\n\t\treturn (array) apply_filters( 'sugar_calendar_admin_meta_box_sections', $this->sections, $this );\n\t}", "protected function getConditionedSection( array $aSection ) {\n\n // Check the conditions\n if ( ! current_user_can( $aSection['capability'] ) ) return;\n if ( ! $aSection['if'] ) return; \n if ( ! $aSection['page_slug'] ) return; \n if ( 'options.php' != $this->getPageNow() && $this->sCurrentPageSlug != $aSection['page_slug'] ) return; \n if ( ! $this->_isSectionOfCurrentTab( $aSection, $this->sCurrentPageSlug, $this->sCurrentTabSlug ) ) return;\n return $aSection;\n \n }", "public function sections()\n {\n $this->sections_info = array();\n\n // If there are more than one same course in single term, such as 'PHYS 172000',\n // then additional array for each course is wrapped.\n if ($this->countCourses() > 1) {\n for ($i = 0; $i < $this->countCourses(); $i++) {\n foreach ($this->class_info[$i] as $class) {\n array_push($this->sections_info, [\n 'CourseIndex' => $i,\n 'Sections' => $class['Sections']\n ]);\n }\n }\n } else {\n foreach ($this->class_info as $class) {\n array_push($this->sections_info, $class['Sections']);\n }\n }\n\n return $this;\n }", "public function getSections()\n\t{\n\t\t$result = [];\n\n\t\t$sections = craft()->sections->getAllSections();\n\t\t$bindings = $this->getBindingCounts();\n\n\t\tforeach ($sections as $section) {\n\t\t\t$result[] = array(\n\t\t\t\t'bindings' => isset($bindings[$section->id]) ? $bindings[$section->id] : 0,\n\t\t\t\t'craftSection' => $section\n\t\t\t);\n\t\t}\n\n\t\treturn $result;\n\t}", "public function get_propsections()\n {\n if ( ! isset($this->_properties['propsections']))\n {\n $result = array();\n\n foreach ($this->propertysections as $propsection)\n {\n $result[$propsection->section_id]['active'] = (int)$propsection->active;\n $result[$propsection->section_id]['filter'] = (int)$propsection->filter;\n $result[$propsection->section_id]['sort'] = (int)$propsection->sort;\n $result[$propsection->section_id]['section_id'] = (int)$propsection->section_id; \n }\n\n $this->_properties['propsections'] = $result;\n }\n return $this->_properties['propsections'];\n }", "public function Get_Allowed_Sections($agent_id)\n\t{\n\t\t$system_sql = ($this->system_id == NULL) ? \"\" : \"and s.system_id = \" . $this->system_id . \" \";\n\n\t\t$query = \"select\n\t\t\t\t\t\tacl.company_id,\n\t\t\t\t\t\ts.active_status,\n\t\t\t\t\t\ts.name,\n\t\t\t\t\t\ts.description,\n\t\t\t\t\t\ts.system_id,\n\t\t\t\t\t\ts.section_id,\n\t\t\t\t\t\ts.section_parent_id,\n\t\t\t\t\t\ts.default_section_id,\n\t\t\t\t\t\ts.sequence_no,\n\t\t\t\t\t\ts.level\n\t\t\t\t\tfrom\n\t\t\t\t\t \tsection s,\n\t\t\t\t\t\tagent a,\n\t\t\t\t\t\tacl,\n\t\t\t\t\t\tagent_access_group aag\n\t\t\t\t\twhere\n\t\t\t\t\t\ta.agent_id = {$agent_id}\n\t\t\t\t\tand a.active_status = 'Active'\n\t\t\t\t\tand a.agent_id = aag.agent_id\n\t\t\t\t\tand aag.active_status = 'Active'\n\t\t\t\t\tand aag.access_group_id = acl.access_group_id\n\t\t\t\t\tand acl.active_status = 'Active'\n\t\t\t\t\tand acl.section_id = s.section_id\n\t\t\t\t\tand s.active_status = 'Active'\n\t\t\t\t\t{$system_sql}\n\t\t\t\t\torder by s.sequence_no\n\t\t\t\t\t\t\";\n\n\t\t$result = $this->mysqli->Query($query);\n\t\t$sections = array();\n\t\twhile($row = $result->Fetch_Object_Row())\n\t\t{\n\t\t\t$sections[$row->company_id][$row->name] = $row;\n\t\t}\n\t\t\n\n\n\t\treturn $sections;\t\t\t\t\n\t}", "protected function loadSections()\n {\n $this->sections = array();\n\n $res = \\CIBlockSection::GetList(array(), array('IBLOCK_ID' => $this->iblockId, 'ID' => $this->sectionIds));\n while($row = $res->fetch())\n {\n $this->sections[$row['ID']] = array('name' => $row['NAME']);\n $rs = \\CIBlockSection::GetList(\n array('LEFT_MARGIN' => 'ASC'),\n array(\n 'IBLOCK_ID' => $this->iblockId,\n '>LEFT_MARGIN' => $row['LEFT_MARGIN'],\n '<RIGHT_MARGIN' => $row['RIGHT_MARGIN'],\n '!ID' => $row['ID']\n )\n );\n while($innerRow = $rs->fetch())\n $this->sections[$innerRow['ID']] = array('name' => $innerRow['NAME'], 'parentId' => $row['ID']);\n }\n }", "protected function getSections($isAdmin = true)\n {\n for ($i = 0, $return = array(); $i < count($this->sections); $i++) {\n if($this->canRead($this->sections[$i]) && $this->sections[$i]->isAdminSection() == $isAdmin) $return[] = $this->sections[$i];\n }\n return $return;\n }", "public function retriveSections()\n {\n $sections = $this->sections()->where('cv_id',$this->id)->get();\n\n return $sections;\n }", "function get_sections_settings(){\r\n if ( ! empty( $this->section_settings ) ) {\r\n return $this->section_settings;\r\n }\r\n $sections = get_theme_mod( 'sovenco_section_order_styling', '');\r\n if ( is_string( $sections ) ) {\r\n $sections = json_decode( $sections, true );\r\n }\r\n\r\n if ( ! is_array( $sections ) ) {\r\n $sections = array();\r\n }\r\n\r\n if ( empty( $sections ) || ! is_array( $sections ) ) {\r\n $sections = $this->get_default_sections_settings();\r\n }\r\n\r\n $this->section_settings = array();\r\n\r\n foreach( $sections as $k => $v ) {\r\n if ( ! $v['section_id'] ) {\r\n $v['section_id'] = sanitize_title( $v['title'] );\r\n }\r\n\r\n if ( ! $v['section_id'] ) {\r\n $v['section_id'] = uniqid('section-');\r\n }\r\n\r\n if ( $v['section_id'] != '' && ( ! isset( $v['add_buy'] ) || $v['add_buy'] != 'click' ) ) {\r\n $this->section_settings[ $v['section_id'] ] = $v;\r\n } else {\r\n $this->section_settings[ ] = $v;\r\n }\r\n }\r\n\r\n return $this->section_settings ;\r\n }", "private function getEventSections() {\n\t\t$sSQL = \"SELECT cse_ID FROM tbkalender_contentsection\n\t\tINNER JOIN tbkalender ON tbkalender.cal_ID = tbkalender_contentsection.cal_ID\n\t\tWHERE tbkalender.mnu_ID = \".page::menuID();\n\t\t$nRes = $this->Conn->execute($sSQL);\n\t\t$Sections = array();\n\t\twhile ($row = $this->Conn->next($nRes)) {\n\t\t\tarray_push($Sections,$row['cse_ID']);\n\t\t}\n\t\treturn($Sections);\n\t}", "public function parseSections()\t{\r\n\t\t$content = str_replace(\"<nowiki>\", \"\", $this->pArticle->mContent);\r\n\t\t$content = str_replace(\"</nowiki>\", \"\", $content);\r\n\r\n\t\t// We don't need such a long regex. Simply encapsulating everything in header element.\r\n\t\t$re = \"/(=+)([^=]*)(=+)\\n/\";\r\n\t\tif ( preg_match_all( $re, $content, $matches, PREG_SET_ORDER ) ) {\r\n\t\t\tforeach ( $matches as &$match ) {\r\n\t\t\t\t$match[2] = trim(str_replace( \"=\", \"\", $match[2] ) );\r\n\t\t\t}\r\n\t\t\treturn $matches;\r\n\t\t}\r\n\t\treturn array();\r\n\t}", "private function addConditionForSection() {\n $whereSectionUids = array();\n foreach(t3lib_div::trimExplode(',', $this->input['section']) as $section) {\n $whereSectionUids = array_merge($whereSectionUids, $this->getUIDsForSection($section));\n }\n $whereSectionUids = array_unique($whereSectionUids); // Remove duplicate section uids\n\n if (empty($whereSectionUids)) {\n $this->table_references = array('tx_newspaper_article'); // Reset table array\n $this->where = array('false'); // Unknown sections, so no article available for this search query\n return false; // No matching section found, so no article in search result\n }\n\n $this->addTableReference('JOIN tx_newspaper_article_sections_mm ON tx_newspaper_article.uid = tx_newspaper_article_sections_mm.uid_local');\n $this->addWhere('tx_newspaper_article_sections_mm.uid_foreign IN (' . implode(',', $whereSectionUids) . ')');\n\n return true;\n }", "private function _extractSections(): void {\n $sections_pattern = '/@section\\([\\s]*([' . self::VALID_WORD . ']*)(?:' . self::BREAK_LINE . ')?[\\s]*\\)(.*?)@endsection(?:' . self::BREAK_LINE . ')?/s';\n $matches = $this->loader->extract( $sections_pattern );\n\n // Just set the sections on internal array\n foreach( $matches[0] as $i => $found ) {\n $this->setSection($matches[1][$i], $matches[2][$i]);\n $this->loader->replace( $found, '' );\n }\n }", "public function getAllSections() {\n $stmt = $this->conn->prepare(\"SELECT * FROM prefect_section WHERE status = 1 or status = 2\");\n $stmt->execute();\n $sections = $stmt->get_result();\n $stmt->close();\n return $sections;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disable XSS filtering for a message type
public function disableXSSMessageFilter($msg_type) { switch ($msg_type) { case self::SUCCESS_MESSAGE: $this->assign('success_msg_no_xss_filter', true); break; case self::INFO_MESSAGE: $this->assign('info_msg_no_xss_filter', true); break; case self::ERROR_MESSAGE: $this->assign('error_msg_no_xss_filter', true); break; default: error_log("bad message id passed to disableXSSMessageFilter()"); break; } }
[ "function disable_xss_filters()\r\n {\r\n\r\n // set the \"disable_xss_filters\" private attribute of the control\r\n $this->set_attributes(array('disable_xss_filters' => true));\r\n\r\n }", "public static function filterXSS($data)\n\t{\n\t\t//echo $data; exit();\n\t\t// Fix &entity\\n;\n\t\t$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);\n\t\t$data = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $data);\n\t\t$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);\n\t\t$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');\n\t\t\n\t\t// Remove any attribute starting with \"on\" or xmlns\n\t\t$data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);\n\t\t// Remove javascript: and vbscript: protocols\n\t\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`\\'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2nojavascript...', $data);\n\t\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2novbscript...', $data);\n\t\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $data);\n\t\t\t\t\n//\n//\t\t// Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n//\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '', $data);\n//\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '', $data);\n\n\t\t//the next line removed valid stuff from the body\n\t\t//$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu', '$1>', $data);\n\n\t\t// Remove namespaced elements (we do not need them)\n\t\t$data = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $data);\n\n\t\treturn $data;\n\t}", "public function cleanXSS()\n {\n Helper::instance()->cleanXSS($this->getAttributes());\n }", "public function testFilterXSSAdmin() {\n $value = Xss::filterAdmin('<style /><iframe /><frame /><frameset /><meta /><link /><embed /><applet /><param /><layer />');\n $this->assertEquals('', $value, 'Admin HTML filter -- should never allow some tags.');\n }", "function acf_allow_unfiltered_html() { }", "function acf_allow_unfiltered_html()\n{\n}", "function filterXss($text)\n {\n $patterns = array();\n $replacements = array();\n\n $text = str_replace( \"\\x00\", \"\", $text );\n $c = \"[\\x01-\\x1f]*\";\n $patterns[] = \"/\\bj{$c}a{$c}v{$c}a{$c}s{$c}c{$c}r{$c}i{$c}p{$c}t{$c}[\\s]*:/si\";\n $replacements[] = \"(script removed)\";\n $patterns[] = \"/\\ba{$c}b{$c}o{$c}u{$c}t{$c}[\\s]*:/si\";\n $replacements[] = \"about :\";\n $patterns[] = \"/\\bx{$c}s{$c}s{$c}[\\s]*:/si\";\n $replacements[] = \"xss;\";\n\n $text = preg_replace($patterns, $replacements, $text);\n\n return $text;\n }", "public function xssFilter($data)\n {\n if (is_array($data)) {\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\tunset($data[$key]);\n\t\t\t\t$data[$this->xssFilter($key)] = $this->xssFilter($value);\n\t\t\t}\n\t\t} else {\n\t\t\t$data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8');\n\t\t}\n\t\treturn $data;\n }", "function skyre_sanitize_nohtml($input) {\n return wp_filter_nohtml_kses($input);\n}", "function fsl_scrub($string){\n \n $xss = new xss_filter();\n $string = $xss->filter_it($string); \n return $string;\n}", "function sanitization_filters() {\n\t\t\n\t\tgenesis_add_option_filter( 'no_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'application_url',\n\t\t\t\t'company_nmls',\n\t\t\t\t'individual_nmls',\n\t\t\t\t'address',\n\t\t\t\t'phone',\n\t\t\t\t'company_selector',\n\t\t\t\t'website_type',\n\t\t\t\t'include_homepage_blog',\n\t\t\t\t'facebook_url',\n\t\t\t\t'twitter_url',\n\t\t\t\t'linkedin_url',\n\t\t\t\t'googleplus_url',\n\t\t\t\t'phone_checkbox',\n\t\t\t\t'locations_checkbox',\n\t\t\t) );\n\n\t\tgenesis_add_option_filter( 'safe_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'disclaimer',\n\t\t\t\t'locations_page',\n\t\t\t) );\n\t}", "function sanitizeHtml($postText){\r\n // Blocked tags\r\n $tagBlacklist = ['script'];\r\n // Blocked html attributes\r\n $attributeBlacklist = ['onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus',\r\n 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown',\r\n 'onmousemove', 'onmouseout','onmouseup',\r\n 'onreset','onselect', 'onsubmit', 'onunload'];\r\n // blocked tags as visible html\r\n $blockedStart=htmlentities(\"<blocked>\");\r\n $blockedEnd=htmlentities(\"</blocked>\");\r\n // If blocked tag is found, replace it with <blocked> tag. Uses case insensitive string replace function\r\n foreach ($tagBlacklist as $i){\r\n $postText = str_ireplace (\"<\".$i.\">\",$blockedStart, $postText);\r\n $postText = str_ireplace (\"</\".$i.\">\",$blockedEnd, $postText);\r\n }\r\n // If blocked attribute is found IN THIS FORMAT, remove it.\r\n foreach ($attributeBlacklist as $i){\r\n $postText = str_ireplace ($i.\"=\",\"blocked=\", $postText);\r\n }\r\n return $postText;\r\n}", "function xss_clean($data)\n{\n\t// Fix &entity\\n;\n\t$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);\n\t$data = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $data);\n\t$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);\n\t$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');\n\n\t// Remove any attribute starting with \"on\" or xmlns\n\t$data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);\n\n\t// Remove javascript: and vbscript: protocols\n\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`\\'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2nojavascript...', $data);\n\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2novbscript...', $data);\n\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $data);\n\n\t// Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu', '$1>', $data);\n\n\t// Remove namespaced elements (we do not need them)\n\t$data = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $data);\n\n\tdo\n\t{\n\t\t// Remove really unwanted tags\n\t\t$old_data = $data;\n\t\t$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);\n\t}\n\twhile ($old_data !== $data);\n\n\t// we are done...\n\treturn $data;\n}", "function _xss($value){\n\tif(is_object($value)) return $value;\n\t$pattern = '@<script[^>]*?>.*?</[^>]*?script[^>]*?>@si'; # strip out javacript\n\tif(is_array($value)){\n\t\tforeach($value as $key => $val){\n\t\t\tif(is_array($val)){\n\t\t\t\t$value[$key] = _xss($val);\n\t\t\t}else{\n\t\t\t\t$value[$key] = preg_replace( $pattern, '', trim(stripslashes($val))); \t\t\t\t\n\t\t\t}\n\t\t}\n\t}else{\n\t\t$value = preg_replace( $pattern, '', trim(stripslashes($value))); \n\t}\n\treturn $value; \n}", "public function sanitizer_filters() {\n\n\t\t\tSettingsSanitizer::get_instance()->add_filter(\n\t\t\t\t'no_html',\n\t\t\t\t$this->settings_field,\n\t\t\t\tarray(\n\t\t\t\t\t'headline',\n\t\t\t\t\t'doctitle',\n\t\t\t\t\t'description',\n\t\t\t\t\t'keywords',\n\t\t\t\t\t'body_class',\n\t\t\t\t\t'layout',\n\t\t\t\t)\n\t\t\t);\n\t\t\tSettingsSanitizer::get_instance()->add_filter(\n\t\t\t\t'unfiltered_or_safe_html',\n\t\t\t\t$this->settings_field,\n\t\t\t\tarray(\n\t\t\t\t\t'intro_text',\n\t\t\t\t)\n\t\t\t);\n\t\t\tSettingsSanitizer::get_instance()->add_filter(\n\t\t\t\t'one_zero',\n\t\t\t\t$this->settings_field,\n\t\t\t\tarray(\n\t\t\t\t\t'noindex',\n\t\t\t\t\t'nofollow',\n\t\t\t\t\t'noarchive',\n\t\t\t\t)\n\t\t\t);\n\t\t}", "private function filter(string $message): string {\n return filter_var($message, FILTER_SANITIZE_STRIPPED);\n }", "function sanitization_filters() {\n\t\n\t\tgenesis_add_option_filter( 'no_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t'wsm_home_title',\n\t\t\t'wsm_site_url',\n\t\t\t'wsm_site_url_target',\n\t\t));\n\t\t\t\t\t\n\t\tgenesis_add_option_filter( 'safe_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'wsm_site_title',\n\t\t\t\t'wsm_copyright',\n\t\t\t\t'wsm_credit',\n\t\t\t) );\n\t}", "function get_skip_sanitize_settings() {\n\t\treturn array();\n\t}", "function community_spam_content_filter($event, $type, $object) {\n\tif (!community_spam_is_new_user()) {\n\t\treturn;\n\t}\n\n\t$blacklist = elgg_get_plugin_setting('profile_blacklist', 'community_spam_tools');\n\t$blacklist = explode(\",\", $blacklist);\n\t$blacklist = array_map('trim', $blacklist);\n\n\t$terms = array();\n\tforeach ($blacklist as $term) {\n\t\tif (stripos($object->description, $term) !== false) {\n\t\t\t$terms[] = $term;\n\t\t}\n\t}\n\n\tif (count($terms) < 2) {\n\t\t// Allow the content to be created\n\t\treturn;\n\t}\n\n\t$spammer = elgg_get_logged_in_user_entity();\n\t$spammer->annotate('banned', 1); // this integrates with ban plugin\n\n\t$terms = implode(', ', $terms);\n\t$spammer->ban(\"Used the following blacklisted terms: $terms\");\n\n\treturn false;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Implement setViewName() method.
public function setViewName(string $name) { }
[ "public function setViewName($name)\n {\n $this->viewName = $name;\n }", "public function getViewName();", "public function setViewName($viewName)\n\t{\n\t\t$this->viewName = $viewName;\n\t}", "abstract function assignViewName() : string;", "public function setViewName($viewName)\n {\n $this->viewName = $viewName;\n }", "public function getViewName(){\n return $this->_view_name;\n }", "public function set_name($view_name) {\n parent::set_name($view_name);\n $this->resource_name = $view_name . '.tpl.php';\n }", "public function getName()\n {\n return $this->view;\n }", "public function getViewName() {\n\t\treturn $this->viewName;\n\t}", "protected function resolveViewObjectName() {}", "public static function setViewName($viewName){\n\t\t\\Illuminate\\Pagination\\Environment::setViewName($viewName);\n\t}", "public function getView($viewName);", "public static function name($view, $name) {\n\t\tstatic::$names[$name] = $view;\n\t}", "function loadView($name) {\r\n /* if (file_exists(ROOT . DS . 'views' . DS . strtolower($name) . '.php')) {\r\n $this->view_name = $name;\r\n } */\r\n }", "public function getPageViewByName($name);", "public function getView($name) {\n return $this->preView . $name;\n }", "private function set_view_props() {\n $this->view_form_name = ! empty($_POST) && array_key_exists('view_form_name', $_POST)\n ? $_POST['view_form_name']\n : '';\n\n $this->view_name = $this->view_form_name\n ? substr($this->view_form_name, 0, -5)\n : '';\n }", "public static function getViewName() {\n return static::$VIEW;\n }", "public function setDefaultViewTitle()\n {\n $this->viewTitle = $this->request->action;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the current time and promotion end time to WP Rocket localize script data
public function add_localize_script_data( $data ) { $data = $this->upgrade->add_localize_script_data( $data ); return $this->renewal->add_localize_script_data( $data ); }
[ "public function add_localize_script_data( $data ) {\r\n\t\tif ( ! is_array( $data ) ) {\r\n\t\t\t$data = (array) $data;\r\n\t\t}\r\n\r\n\t\tif ( ! $this->can_use_promo() ) {\r\n\t\t\treturn $data;\r\n\t\t}\r\n\r\n\t\t$data['promo_end'] = $this->pricing->get_promo_end();\r\n\r\n\t\treturn $data;\r\n\t}", "protected function localizeData() {\n\n // Loop through data\n foreach ($this->data as $data) {\n\n // Localize the data\n wp_localize_script(\n $this->handle,\n $data['name'],\n $data['vars']\n );\n\n }\n\n }", "public function localize_data() {\n\t\t$this->add_contact_support_item();\n\t\t$this->enqueue_localized_data( $this->format_data( $this->tabs->get_tabs() ) );\n\t}", "function miglaA_currentTime()\n{\n\t$php_time_zone = date_default_timezone_get();\n $t = \"\"; $d = \"\";\n $default = $_POST['timezone'];\n if( $default == 'Server Time' ){\n $gmt_offset = -get_option( 'gmt_offset' );\n \t if ($gmt_offset > 0){ \n $time_zone = 'Etc/GMT+' . $gmt_offset; \n }else{\t\t\n $time_zone = 'Etc/GMT' . $gmt_offset; \n }\n\t\t date_default_timezone_set( $time_zone );\n\t\t $t = date('H:i:s');\n\t\t $d = date('m').\"/\".date('d').\"/\".date('Y');\n }else{\n\t\t date_default_timezone_set( $default );\n\t\t $t = date('H:i:s');\n\t\t $d = date('m').\"/\".date('d').\"/\".date('Y');\n }\n\t\t\n $now = date(\"F jS, Y\", strtotime($d)).\" \".$t;\n\t\tdate_default_timezone_set( $php_time_zone );\n ///---------------------------------GET CURRENT TIME SETTINGS\n \n echo $now;\n die();\n}", "function cspm_add_js_script_data($new_data){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Localize the script with new data\r\n\t\t\t * 1) We'll get the old data already localized.\r\n\t\t\t * 2) Add this map's new data to the old data array.\r\n\t\t\t * 3) We'll clear the old wp_localize_script(), then, send a new one that contains old & new data. */\r\n\t\t\t\r\n\t\t\tglobal $wp_scripts;\r\n\t\t\t\r\n\t\t\t$localize_script_handle = 'cspm-script';\r\n\t\t\t\r\n\t\t\t$progress_map_vars = $wp_scripts->get_data($localize_script_handle, 'data');\r\n\t\t\t\r\n\t\t\t$current_progress_map_vars = json_decode(str_replace('var progress_map_vars = ', '', substr($progress_map_vars, 0, -1)), true);\r\n\t\t\t\r\n\t\t\t$old_map_script_args = (array) $current_progress_map_vars;\r\n\t\t\t\r\n\t\t\t$new_map_scripts_args = array_merge($old_map_script_args, $new_data);\r\n\t\t\t\r\n\t\t\t$wp_scripts->add_data($localize_script_handle, 'data', '');\r\n\t\t\r\n\t\t\twp_localize_script($localize_script_handle, 'progress_map_vars', $new_map_scripts_args);\r\n\t\t\t\t\r\n\t\t}", "public function add_localize_data( $data ) {\n $data['wholesale'] = [\n 'activeStatusMessage' => __( 'You are succefully converted as a wholesale customer', 'dokan' ),\n 'deactiveStatusMessage' => __( 'Your wholesale customer request send to the admin. Please wait for approval', 'dokan' ),\n ];\n\n return $data;\n }", "function wp_localize_community_events() {}", "function updateTimeZone(): void\n{\n $wp_tz = \\get_option('timezone_string'); // e.g. Europe/Berlin\n $cached_tz = getOption('timezone_string');\n $cached_tzinfo = getOption('timezone_info'); // BEGIN:VTIMEZONE ...\n if ($wp_tz && (($wp_tz !== $cached_tz)) || !$cached_tzinfo) {\n $cached_tzinfo = get_timezone($wp_tz);\n if ($cached_tzinfo) {\n setOption('timezone_string', $wp_tz);\n setOption('timezone_info', $cached_tzinfo);\n }\n }\n}", "public function adminLocalizeScript() {\n $mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';\n \t\n \t$lang = new Lang();\n return apply_filters('RML/Localize', array(\n 'version' => RML_VERSION,\n 'textDomain' => RML_TD,\n 'restUrl' => rest\\Service::getUrl(rest\\Service::SERVICE_NAMESPACE),\n 'restRoot' => get_rest_url(),\n 'restNonce' => ( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' ),\n 'blogId' => get_current_blog_id(),\n 'rootId' => _wp_rml_root(),\n 'listMode' => $mode,\n 'lang' => $lang->getItems($this),\n 'userSettings' => has_filter(\"RML/User/Settings/Content\"),\n 'sortables' => order\\GalleryOrder::getInstance()->getAvailableOrders(true)\n ));\n }", "public function prayer_time_setup() {\n $data['previous_settings'] = $this->vsm->get_previous_settings('settings', 18);\n $this->load->view('admin/header', $data);\n $this->load->view('admin/menu');\n $this->load->view('admin/settings/prayer_time_set');\n $this->load->view('admin/footer');\n }", "function wp_localize_community_events()\n {\n }", "function get_current_time_script() {\n\treturn escape_script_text( file_get_contents( __DIR__ . '/amp-local-storage.js' ) ); // phpcs:ignore\n}", "function rkf_set_default_time_to_wordpress_selection(){\n date_default_timezone_set(get_option('timezone_string'));\n }", "public function localizeScriptsAdmin() {\n \n $js_date_max = wpjb_date(WPJB_MAX_DATE);\n $js_date_format = str_replace(array(\"J\"), array(\"B\"), wpjb_date_format());\n $js_months = array();\n \n for($i=1; $i<=12; $i++) {\n $js_months[$i] = wpjb_date(\"2000-$i\", \"M\");\n }\n \n wp_localize_script(\"wpjb-admin\", \"WpjbAdminLang\", array(\n \"slug_save\" => __(\"save\", \"wpjobboard\"),\n \"slug_cancel\" => __(\"cancel\", \"wpjobboard\"),\n \"slug_change\" => __(\"change\", \"wpjobboard\"),\n \"remove\" => __(\"Do you really want to delete\", \"wpjobboard\"),\n \"selectAction\" => __(\"Select action first\", \"wpjobboard\"),\n \n ));\n \n wp_localize_script(\"wpjb-admin\", \"wpjb_admin_lang\", array(\n \"date_format\" => $js_date_format,\n \"max_date\" => $js_date_max,\n \"confirm_item_delete\" => __(\"Are you sure you want to delete this item?\", \"wpjobboard\")\n ));\n \n wp_localize_script(\"wpjb-admin-import\", \"wpjb_admin_import\", array(\n \"deleted\" => __(\"Deleted\", \"wpjobboard\"),\n \"failed\" => __(\"Failed\", \"wpjobboard\")\n ));\n \n wp_localize_script(\"wpjb-admin-config-email-editor\", \"wpjb_admin_config_email_editor\", array(\n \"yes\" => __(\"Yes\"),\n \"cancel\" => __(\"Cancel\")\n ));\n \n wp_localize_script(\"wpjb-admin-job\", \"wpjb_admin_job_lang\", array(\n \"date_format\" => $js_date_format,\n \"max_date\" => $js_date_max,\n \"free_listing\" => __(\"None (free listing)\", \"wpjobboard\"),\n \"yesterday\" => __(\"yesterday\", \"wpjobboard\"),\n \"immediately\" => __(\"immediately\", \"wpjobboard\"),\n \"tomorrow\" => __(\"tomorrow\", \"wpjobboard\"),\n \"day\" => __(\"%d day\", \"wpjobboard\"),\n \"days\" => __(\"%d days\", \"wpjobboard\")\n ));\n \n wp_localize_script(\"wpjb-admin-resume\", \"wpjb_admin_resume_lang\", array(\n \"date_format\" => $js_date_format,\n \"max_date\" => $js_date_max,\n ));\n }", "protected function ajaxConvertTime(): void\n {\n $this->convertAndDie(\n $GLOBALS['format'] ?? 'H:i',\n (int) strtotime($_GET['time'] ?? 'now')\n );\n }", "protected function setup_date() {\n\t\t\tupdate_option( $this->key, time() );\n\t\t}", "function wp_ajax_time_format()\n{\n}", "function wp_ajax_time_format()\n {\n }", "public static function insertScreenRefreshTimeJs() {\n\t\tzbx_add_post_js('timeControl.useTimeRefresh('.CWebUser::$data['refresh'].');');\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns first matched extension for the mimetype, as mapped from wp_get_mime_types().
function wp_get_default_extension_for_mime_type($mime_type) { }
[ "public function getExtension($mime_type);", "public static function ext_by_mime($type)\r\n {\r\n return current(File::exts_by_mime($type));\r\n }", "public function guessExtensionForMimeType(string $type): string;", "protected static function get_extension( $mime_type = null ) {\n $extensions = explode( '|', array_search( $mime_type, wp_get_mime_types() ) );\n\n if ( empty( $extensions[0] ) )\n return false;\n\n return $extensions[0];\n }", "function system_mime_type_extension($type) {\n # extension listed to be canonical).\n #\n # $type - the MIME type\n static $exts;\n if (!isset($exts))\n $exts = system_mime_type_extensions();\n return isset($exts[$type]) ? $exts[$type] : null;\n}", "public static function ext_by_mime($type)\n\t{\n\t\treturn current(File::exts_by_mime($type));\n\t}", "function system_mime_type_extension($type)\n{\n # extension listed to be canonical).\n #\n # $type - the MIME type\n static $exts;\n if (!isset($exts))\n $exts = system_mime_type_extensions();\n return isset($exts[$type]) ? $exts[$type] : null;\n}", "public static function extensionFromMime(string $mimetype): ?string\n {\n return static::MIMETYPES[$mimetype];\n }", "public function getMimeTypeByExtension() {\n if ($this->getIsFile()) {\n $this->addLog('Trying to get MIME type for \"' . $this->_realpath . '\" from extension \"' . $this->_extension . '\"', 'trace');\n static $exts;\n\n if ($exts===null) {\n $exts = require($this->getPathOfAlias('system.utils.mimeTypes') . '.php');\n }\n\n $ext = strtolower($this->_extension);\n if (!empty($ext) && isset($exts[$ext])) {\n return $exts[$ext];\n }\n return False;\n } else {\n $this->addLog('getMimeTypeByExtension() is available only for files', 'warning');\n return False;\n }\n }", "function lookup_mimetype ($extension)\n {\n $map = config('media.map');\n if (!array_key_exists($extension,$map)) {\n return null;\n }\n return $map[$extension];\n }", "public function guessExtension()\n {\n $_ext = $this->getExtension();\n if (empty($_ext) && $this->getRealPath()) {\n $finfo = new \\finfo();\n $mime = $finfo->file( $this->getRealPath(), FILEINFO_MIME_TYPE );\n $_ext = str_replace('image/', '', $mime);\n }\n return $_ext;\n }", "private function getFileExtension()\n\t{\n\t\t$clientMediaType = $this->getClientMediaType();\n\t\t$extensions = array_flip(Extension::$extensions);\n\n\t\tif (array_key_exists($clientMediaType, $extensions)) {\n\t\t\treturn $extensions[$clientMediaType];\n\t\t}\n\t\t\n\t\treturn pathinfo($this->getClientFilename(), PATHINFO_EXTENSION);\n\t}", "function lookupMimeType( $pExtension ) {\n\n\t\t$this->loadMimeTypes();\n\t\tif( preg_match( \"#\\.[0-9a-z]+$#i\", $pExtension )) {\n\t\t\t$pExtension = substr( $pExtension, ( strrpos( $pExtension, '.' ) + 1 ));\n\t\t}\n\t\t// rfc1341 - mime types are case insensitive.\n\t\t$pExtension = strtolower( $pExtension );\n\n\t\treturn( !empty( $this->mMimeTypes[$pExtension] ) ? $this->mMimeTypes[$pExtension] : 'application/binary' );\n\t}", "public function getFileType()\n {\n if (!$this->mime || $this->mime === 'directory' || $this->mime === 'dir') {\n return 'dir';\n }\n\n foreach ($this->mimes as $mime => $mime_values) {\n $key = collect($mime_values)->search(function ($mime_value) {\n return preg_match($mime_value, $this->mime);\n });\n\n if ($key !== false) {\n return $mime;\n }\n }\n\n return 'file';\n }", "protected function resolveExtensionFromMimeType($type)\n {\n switch ($type) {\n case 'audio/mp3':\n case 'audio/mpeg':\n return 'mp3';\n\n case 'audio/ogg':\n return 'ogg';\n\n case 'audio/webm':\n return 'webm';\n\n case 'audio/wav':\n case 'audio/wave':\n case 'audio/x-wav':\n case 'audio/x-pn-wav':\n return 'wav';\n }\n\n return null;\n }", "public function getExtensionType()\n {\n $extension = pathinfo($this->original_filename, PATHINFO_EXTENSION);\n $extensionType = 'file';\n switch ($extension) {\n case 'xls':\n case 'xlsx':\n $extensionType = 'file-excel';\n break;\n\n case 'doc':\n case 'docx':\n case 'odt':\n $extensionType = 'file-word';\n break;\n\n case 'jpg':\n case 'jpeg':\n case 'png':\n case 'bmp':\n case 'gif':\n $extensionType = 'file-image';\n break;\n\n case 'pdf':\n $extensionType = 'file-pdf';\n break;\n\n case 'mp4':\n case 'avi':\n case 'ogg':\n case 'webm':\n case 'flv':\n case 'wmb':\n case 'wmv':\n $extensionType = 'file-video';\n break;\n\n case 'mp3':\n case 'wav':\n $extensionType = 'file-audio';\n break;\n\n }\n\n return $extensionType;\n }", "function get_file_type_from_mimetype($mimetype)\n{\n return explode('/', $mimetype)[1];\n}", "function mime_to_ext($mime)\n{\n $mime = strtolower($mime);\n $magic = mime_get_magic();\n if ($ext = array_search($mime, $magic)) {\n return $ext; \n }\n $ext = preg_replace('#.*/#', '', $mime);\n $ext = str_replace(['+', '-'], ['.', '.'], $ext);\n return $ext;\n}", "protected function extractExtension() {\n\t\t$matches = $this->getExtensionMatches();\n\n\t\treturn ! empty( $matches ) ? substr( $matches[0], - 3 ) : 'mp4';\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ GridField_ColumnProvider Add bulk select column.
public function augmentColumns($gridField, &$columns) { if (!in_array('BulkSelect', $columns)) { $columns[] = 'BulkSelect'; } }
[ "public function addColumn() {\n\t\t\tif ($this->strQueryType == self::SELECT_QUERY) {\n\t\t\t\t$strColumnMethod = 'addSelectColumn';\n\t\t\t} else {\n\t\t\t\t$strColumnMethod = 'addAlterColumn';\n\t\t\t}\n\t\t\t\n\t\t\t$arrFunctionArgs = func_get_args();\n\t\t\tcall_user_func_array(array($this, $strColumnMethod), $arrFunctionArgs);\n\t\t}", "public function addSelect($column);", "function show_suppliers_custom_columns( $column, $post_id){\r\n\t\trequire('include/suppliers_list_extra_columns.php');\r\n\t}", "protected function selectColumns() {}", "function ip_alter_manage_posts_columns($columns)\n{\n $columns['my-new-column'] = 'My New Column';\n return $columns;\n}", "public function getMultiselectColumn()\n {\n return $this->multiselectColumn;\n }", "private function _generateColumns()\n\t\t{\n\t\t\tif( $this->dataSource )\n\t\t\t{\n\t\t\t\t$this->columns = new GridViewColumnCollection($this);\n\n\t\t\t\tforeach( $this->dataSource->fieldMeta as $field )\n\t\t\t\t{\n\t\t\t\t\tif( !$field->primaryKey )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( $field->boolean )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->addColumn( new GridViewColumn( $field->name, ucwords( str_replace( '_', ' ', $field->name )), \"%{$field->name}%?'Yes':'No'\" ));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif( $field->blob )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->addColumn( new GridViewColumn( $field->name, ucwords( str_replace( '_', ' ', $field->name ))));\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}", "protected function getBundleSelectionPriceSelectAdditionalColumns()\n {\n return array(\n 'currency' => 'i.currency', \n 'store_id' => 'i.store_id', \n );\n }", "abstract public function addFieldToGridCollection(\n $columnIndex,\n array $params,\n Mage_Adminhtml_Block_Widget_Grid $gridBlock,\n Varien_Data_Collection_Db $collection\n );", "function esb_pto_add_drag_column() {\n \n //Get all post types\n $post_types = esb_pto_get_post_types();\n foreach ( $post_types as $post_type ) {\n add_action( 'manage_'.$post_type.'_posts_custom_column' , 'esb_pto_custom_columns', 10, 2 );\n add_filter( 'manage_edit-'.$post_type.'_columns' , 'esb_pto_add_custom_columns' );\n }\n}", "function bs_add_user_columns( $columns ) {\n $columns['Country'] = 'Country';\n return $columns;\n}", "protected function initSelectedColumns()\n {\n if (!$this->_columnSelectorEnabled) {\n return;\n }\n $expCols = Yii::$app->request->post($this->exportColsParam, '');\n $this->selectedColumns = empty($expCols) ? array_keys($this->columnSelector) : Json::decode($expCols);\n }", "abstract protected function addColumns();", "public static function addSelect($column)\n { \n return \\Illuminate\\Database\\Query\\Builder::addSelect($column);\n }", "function set_custom_columns() {\n\treturn array(\n\t\t'cb' => '<input type=\"checkbox\"/>',\n\t\t'title' => 'Name of Venue',\n\t\t'event_id' => 'Event ID',\n\t\t'performance_date' => 'Performance Date',\n\t\t'menu_order' => 'Order Number',\n\t);\n}", "protected function _prepareColumns()\n {\n $this->addColumn(\n 'in_pages',\n [\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'name' => 'in_pages',\n 'inline_css' => 'checkbox entities',\n 'field_name' => 'in_pages',\n 'values' => $this->getSelectedPages(),\n 'align' => 'center',\n 'index' => 'page_id',\n 'use_index' => true\n ]\n );\n\n $this->addColumn(\n 'page_id',\n [\n 'header' => __('ID'),\n 'sortable' => true,\n 'index' => 'page_id',\n 'header_css_class' => 'col-id',\n 'column_css_class' => 'col-id'\n ]\n );\n\n $this->addColumn(\n 'chooser_identifier',\n [\n 'header' => __('Identifier'),\n 'name' => 'chooser_identifier',\n 'index' => 'identifier',\n 'header_css_class' => 'col-identifier',\n 'column_css_class' => 'col-identifier'\n ]\n );\n\n $this->addColumn(\n 'chooser_title',\n [\n 'header' => __('Title'),\n 'name' => 'chooser_title',\n 'index' => 'title',\n 'header_css_class' => 'col-title',\n 'column_css_class' => 'col-title'\n ]\n );\n\n return parent::_prepareColumns();\n }", "public static function addColumns();", "function custom_post_type_columns( $columns ){\n\treturn array(\n\t\t'cb'\t\t\t\t\t=> '<input type=\"checkbox\" />',\n\t\t'collection-featured'\t=> 'Collection Image',\n\t\t'collection-color'\t\t=> 'Collection Color',\n\t\t'title'\t\t\t\t\t=> 'Title',\n\t\t'collection-type'\t\t=> 'Collection Type',\n\t\t'product-category'\t\t=> 'Product Category Mapped to',\n\t);\n}", "public function customColumns($book_id);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns container field cache key format to use Can be overriden either by setting the property 'containerFieldsCacheKeyFormat' or by overriding the method itself, whereof the latter would allow using ContainerField instance specific key to set. By default the following strings will be replaced: :field field/attribute key :filename insert contained filename :url server provided container resource url :recordId server provided record id :modificationId server provided modification id
public function getContainerFieldsCacheKeyFormat(ContainerField $cf) { // if override key format set use it if (property_exists($this, 'containerFieldsCacheKeyFormat')) { return $this->containerFieldsCacheKeyFormat; } // otherwise use the default format return ':url'; }
[ "public function getFormatKey (): string;", "public function get_key_field_name ()\n\t{\n\t\tif (isset($this->config['key_field']))\n\t\t\treturn $this->config['key_field'];\n\t\telse\n\t\t\treturn 'key';\n\t}", "public function getCacheKey()\n {\n return sprintf(\"%s/%s\",\n get_class($this),\n $this->getKey()\n ) . (isset($this->attributes['updated_at']) ? '-' . $this->updated_at->timestamp : '');\n }", "public function getCacheKey()\n {\n return sprintf( \"%s/%s-%s\",\n get_class( $this ),\n $this->getKey(),\n $this->updated_at->timestamp\n );\n }", "final protected function _buildKeyListField($fieldName) {\n return \"{$this->cacheKeyPrefix}:\" . self::META . \":{$fieldName}\";\n }", "public function getFieldsKey() {\n\t\treturn $this->_fieldsKey;\n\t}", "public function setFormatKey($key){\n $this->formatKey = $key;\n }", "public function formatKey(string $key): string;", "public function fieldName()\n {\n if ($formatted = $this->formatFieldName($this->key)) {\n return $formatted;\n }\n\n if (strpos($this->key, '_id')) {\n return str_replace('_id', '', $this->key);\n }\n\n return $this->key;\n }", "public function getItemCacheKey() {\n\t\t$template = XMLSitemapsConfig::CACHE_KEY_TEMPLATE_ITEMS;\n\n\t\treturn strtr( $template, [ '{type}' => $this->type, '{handle}' => $this->handle ] );\n\t}", "public function getCacheKey() {\r\n\t\tif ($this->_cacheKey === null) {\r\n\t\t\t$this->_cacheKey = \"ACurl:cachedRequest:\".sha1(serialize($this->getOptions()->toArray()));\r\n\t\t}\r\n\t\treturn $this->_cacheKey;\r\n\t}", "protected function generateCacheKey(): string\n {\n return sprintf(\n '%s:%s:%s',\n $this->command,\n $this->collection->getNamespace(),\n md5(serialize($this->params))\n );\n }", "protected function format_key($key)\n {\n }", "public static function formatCacheKey(string $prefix, array $arguments, ?string $value = null): string\n {\n if ($value !== null) {\n if ($matches = self::parseCacheKey($value)) {\n foreach ($matches as $search) {\n $k = str_replace(['#{', '}'], '', $search);\n $value = StringHelper::replaceFirst($search, (string) self::dataGet($arguments, $k), $value);\n }\n }\n } else {\n $value = implode(':', $arguments);\n }\n return $prefix . ':' . $value;\n }", "abstract public function fieldFormatters();", "public static function buildCacheKey()\n {\n $args = func_get_args();\n\n $key = '';\n\n foreach ($args as $arg) {\n\n if (is_int($arg)) {\n $key .= self::ID_SEPARATOR . $arg;\n }\n elseif (is_string($arg)) {\n if (ctype_alnum($arg)) {\n $key .= self::ID_SEPARATOR . $arg;\n }\n else {\n $key .= self::ID_SEPARATOR . str_replace('=', '', md5($arg));\n }\n }\n elseif (is_array($arg)) {\n asort($arg);\n foreach ($arg as $item=>$value) {\n $key .= self::buildCacheKey($item, $value);\n }\n }\n elseif (is_bool($arg)) {\n $key .= self::ID_SEPARATOR . (int)$arg;\n }\n elseif ($arg === null) {\n $key .= self::ID_SEPARATOR . '0';\n }\n else {\n throw new \\RuntimeException('Can`t create cache id by passed var');\n }\n }\n\n return ltrim($key, ':');\n }", "public function get_field_key() {\n\t\treturn $this->get_field_attr( 'field_key' );\n\t}", "private function _cacheName() {\n $file = APPLICATION_PATH . '/application/settings/restapi_caching_url.php';\n if (file_exists($file)) {\n $enableCacheUrl = include $file;\n } else {\n return '';\n }\n $viewer = Engine_Api::_()->user()->getViewer();\n $front = Zend_Controller_Front::getInstance();\n $request = $front->getRequest();\n $params = array();\n $params['module'] = $request->getModuleName();\n $params['controller'] = $request->getControllerName();\n $params['action'] = $request->getActionName();\n $parameters = $request->getParams();\n $language = $parameters['language'];\n $cacheName = implode(\"_\", $params);\n $key_val = '';\n $cacheName = str_replace('-', '_', $cacheName);\n if (!isset($enableCacheUrl[$cacheName]) || empty($enableCacheUrl[$cacheName]))\n return;\n $getRequestUri = htmlspecialchars($_SERVER['REQUEST_URI']);\n $urlarray = explode(\"?\", $getRequestUri);\n $trimData = trim($urlarray[0], \"/\");\n $cachName = str_replace(\"/\", \"_\", $trimData);\n $viewerId = 0;\n $keys = array_keys($parameters);\n $matched = preg_grep('/_id|_type$/', $keys);\n $matched = array_flip($matched);\n $matched = array_intersect_key($parameters, $matched);\n $key_val = implode('_', $matched);\n\n if ($enableCacheUrl[$cacheName] == 'member_level') {\n $viewerId = $viewer && $viewer->getIdentity() ? $viewer->level_id : 0;\n } elseif ($enableCacheUrl[$cacheName] == 'user_level') {\n $viewerId = $viewer && $viewer->getIdentity() ? $viewer->getIdentity() : 0;\n }\n\n $cachName = $cachName . '_' . $language . '_' . $key_val . '_' . $viewerId;\n $cachName = str_replace('-', '_', $cachName);\n $cachName = str_replace('.', '_', $cachName);\n return $cachName;\n }", "public function createFieldKey()\n {\n ?>\n <input type=\"text\" id=\"input_c24api_key\" name=\"c24[key]\" value=\"<?php echo $this->settings->getSetting('key', '');\n ?>\" size=\"32\" />\n <?php\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get DiscountList value An additional test has been added (isset) before returning the property value as this property may have been unset before, due to the fact that this property is removable from the request (nillable=true+minOccurs=0)
public function getDiscountList(): ?\SengentoBV\CdiscountMarketplaceSdk\Arrays\CdiscountArrayOfDiscountComponent { return isset($this->DiscountList) ? $this->DiscountList : null; }
[ "public function getDiscountList()\n {\n return $this->discount_list;\n }", "public function getDiscountValue()\n {\n return $this->discountValue;\n }", "public function getDiscountValue()\n {\n return isset($this->discount_value) ? $this->discount_value : 0.0;\n }", "public function getDiscountRefunded();", "function getEntityDiscounts() {\n if (is_array($this->entity_discounts)) {\n return $this->entity_discounts;\n }\n $this->setEntityDiscounts();\n return $this->entity_discounts;\n }", "function getDiscounts() {\n if (!empty($this->code)) {\n $this->filterDiscountByCode();\n }\n $this->filterDiscountByEntity();\n if (!$this->is_display_field_mode) {\n $this->filterDiscountsByContact();\n }\n return $this->entity_discounts;\n }", "public function GetActingDiscountList()\n {\n return $this->oActingShopDiscountList;\n }", "public function getDiscount()\n {\n return $this->discount;\n }", "public function coupon_discount()\n {\n return isset($this->_cart_contents['coupon_discount']) ? $this->_cart_contents['coupon_discount'] : null;\n }", "public function get_discount()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n return $this->item[$this->id]['discount'];\n }", "public function getCartDiscounts()\n {\n if (is_null($this->cartDiscounts)) {\n /** @psalm-var ?list<stdClass> $data */\n $data = $this->raw(self::FIELD_CART_DISCOUNTS);\n if (is_null($data)) {\n return null;\n }\n $this->cartDiscounts = CartDiscountReferenceCollection::fromArray($data);\n }\n\n return $this->cartDiscounts;\n }", "public function discountValue()\n {\n return floatval(data_get($this->discount, 'value'));\n }", "public function getSelectedPromotionDiscount()\n {\n return isset($this->SelectedPromotionDiscount) ? $this->SelectedPromotionDiscount : null;\n }", "public function product_has_discount( ){\n\t\tif( $this->list_price == \"0.000\" )\t\t\t\t\t\treturn false;\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\treturn true;\t\n\t}", "public function getPromotionDiscount()\n {\n return $this->_fields['PromotionDiscount']['FieldValue'];\n }", "public function getDiscountDl() {\n return $this->get(self::DISCOUNT_DL);\n }", "function listDiscountreferral()\n {\n $apiUrl=$this->source.'/api/web/referral/listdatas/discount';\n $curl = new curl\\Curl();\n $list = $curl->get($apiUrl);\n\n //$data = ArrayHelper::map(json_decode($list), 'discount_id', 'type');\n \n return $list;\n }", "public function propertyList(){\n $value = null;\n\n $propertyListNotEmpty27 = null;\n\n\n $v=null;\n try {\n // Sparql10.g:218:5: ( ( propertyListNotEmpty )? ) \n // Sparql10.g:218:7: ( propertyListNotEmpty )? \n {\n // Sparql10.g:218:7: ( propertyListNotEmpty )? \n $alt44=2;\n $alt44 = $this->dfa44->predict($this->input);\n switch ($alt44) {\n case 1 :\n // Sparql10.g:218:8: propertyListNotEmpty \n {\n $this->pushFollow(self::$FOLLOW_propertyListNotEmpty_in_propertyList1336);\n $propertyListNotEmpty27=$this->propertyListNotEmpty();\n\n $this->state->_fsp--;\n\n $v = $propertyListNotEmpty27;\n\n }\n break;\n\n }\n\n\n }\n\n $value=$v?$v:new Erfurt_Sparql_Query2_PropertyList();\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return $value;\n }", "public function getDiscountPricing()\n {\n return $this->discountPricing;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function qui teste si un mot est valide
function MotValide($mot) { for ($i=0; $i <longChaine($mot) ; $i++) { if($mot[$i] != Caractere($mot[$i])){ return 0; } } return 1; }
[ "function estVide($champ) {\r\n if ($champ == \"\")\r\n return true;\r\n else\r\n return false;\r\n}", "function verificateur_mot_avec_m($mot, $m, $M){\r\n for ($i=0; $i <=str_compteur($mot) ; $i++) {\r\n if (isset($mot[$i])) {\r\n if ($mot[$i]==$M||$mot[$i]==$m) {\r\n return true;\r\n } \r\n } \r\n }\r\n return false;\r\n}", "function verif($mot, $m, $M){\r\n\tfor ($i=0; $i <=taille_chaine($mot) ; $i++) {\r\n\t\tif (isset($mot[$i])) {\r\n\t\t\tif ($mot[$i]==$M||$mot[$i]==$m) {\r\n\t\t\t\treturn true;\r\n\t\t\t} \r\n\t\t} \r\n\t}\r\nreturn false;\r\n}", "function testmdp($mdp)\t{\n $longueur=strlen($mdp);\n if ($longueur >=6){\n if (preg_match(\"~[\\W]~\", $mdp) ) {\n $GLOBALS['msg']=\"le mot de passe doit uniquement contenir des lettres ou des chiffres !\";\n return false;\n }\n if(!preg_match(\"/[a-z][0-9]|[a-z][0-9]/\",$mdp)){\n $GLOBALS['msg']=\"le mot de passe doit comporter au moins une lettre et un chiffre\";\n return false;\n }\n if(!preg_match(\"~[A-Z]~\",$mdp)){\n $GLOBALS['msg']=\"le mot de passe doit comporter au moins une lettre majuscule\";\n return false;\n }\n return true;\n\n }else{\n $GLOBALS['msg']='votre mot de passe doit contenir au moins 6 caratères';\n return false;\n }\n\n}", "function contientSpace($mot){\n $c=false;\n for($i=0;$i<nombreCaracteres($mot);$i++){\n if($mot[$i]===\" \"){\n $c=true;\n break;\n }else{\n $c=false;\n }\n }\n return $c;\n }", "function validMDP($mdp){\n\tif(strlen($mdp) < 6 || strlen($mdp) > 20){\n\t return false; \n\t} \n\t//On vérifie la présence de chiffres et de lettres\n\telse if(!preg_match(\"/[a-zA-Z][0-9]|[a-zA-Z][0-9]/\",$mdp)){ \n\t\treturn false; \n\t}\n\telse{\n\t\treturn true;\n\t}\n}", "function parametriRecensioneRicevuti(){\n\t\tif(!isset($_POST['punteggio'])){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private function validar_texto($texto){\n if (!$this-> variable_iniciada($texto)) {\n //mostramos un mensaje\n return \"Haz dejado el campo texto vacio\";\n } else {\n //iniciamos el valor con lo proporcionado por el usuario\n $this-> texto = $texto;\n }\n }", "private function choixEffectuer()\n {\n $valider = false;//on mets le forrmulaire a faux\n $valeur = $this->recupValeur($this->position['valeur']);//on recupêre la valeur a comparer\n\n if($this->position['egal'])\n {\n \n if($this->choix == $valeur)\n {\n $valider = true;\n }\n }\n else if($this->position['different'])\n {\n \n if($this->choix != $valeur)\n {\n $valider = true;\n }\n }\n else\n {\n Erreur::declarer_dev(27);\n }\n\n return $valider;\n\n }", "function verificateur_longueur_phrase(string $texte){\r\n if (strlen($texte)<=200) {\r\n return true;\r\n }else {\r\n return false;\r\n }\r\n \r\n}", "function validaPuntos($poin){\r\n\t// Debe tener como maximo 4 caracteres\r\n\tif(strlen($poin) > 4)\r\n\t\treturn false;\r\n\t// Solamente debe tener numeros\r\n\telse if(!preg_match(\"/^[0-9]+$/\", $poin))\r\n\t\treturn false;\r\n\t// Si todo esta bien devuelve true\r\n\telse\r\n\t\treturn true;\r\n}", "public function checkGpon($val);", "function EvaluaTextoABoolPHP($ValorTexto, $ValorVerdadero = \"\") {\n\n return strtoupper ( $ValorTexto ) == strtoupper ($ValorVerdadero) ? true : false;\n\n}", "public function testSetTexteM() {\n\n $obj = new CriteresLibres();\n\n $obj->setTexteM(\"texteM\");\n $this->assertEquals(\"texteM\", $obj->getTexteM());\n }", "function validarNombreCliente($valor) {\r\n $valor = limpiar($valor);\r\n if (strlen($valor)>0 && strlen($valor)<=50){\r\n return TRUE;\r\n } else {\r\n return FALSE;\r\n }\r\n}", "public function estTechnicien()\n\t{\n\t\tif(!empty($this->matricule))\n\t\t\tif(!($this->respAchat))\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}", "function verificarTexto($valor, $tamanho)\n{\n return (strlen($valor) > $tamanho);\n}", "function check_monster($monster) {\n\n}", "public function getMot_passe()\n {\n return $this->mot_passe;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the workProfilePasswordMinNumericCharacters property value. Minimum of numeric characters required in work profile password. Valid values 1 to 10
public function setWorkProfilePasswordMinNumericCharacters(?int $value): void { $this->getBackingStore()->set('workProfilePasswordMinNumericCharacters', $value); }
[ "public function getWorkProfilePasswordMinNumericCharacters()\n {\n if (array_key_exists(\"workProfilePasswordMinNumericCharacters\", $this->_propDict)) {\n return $this->_propDict[\"workProfilePasswordMinNumericCharacters\"];\n } else {\n return null;\n }\n }", "public function setWorkProfilePasswordMinNonLetterCharacters(?int $value): void {\n $this->getBackingStore()->set('workProfilePasswordMinNonLetterCharacters', $value);\n }", "public function setPasswordMinimumNumericCharacters(?int $value): void {\n $this->getBackingStore()->set('passwordMinimumNumericCharacters', $value);\n }", "public function setWorkProfilePasswordMinimumSymbolCharacters(?int $value): void {\n $this->getBackingStore()->set('workProfilePasswordMinimumSymbolCharacters', $value);\n }", "public function setPasswordMinimumSymbolCharacters($val)\n {\n $this->_propDict[\"passwordMinimumSymbolCharacters\"] = intval($val);\n return $this;\n }", "public function setWorkProfilePasswordMinimumLength(?int $value): void {\n $this->getBackingStore()->set('workProfilePasswordMinimumLength', $value);\n }", "public function setPasswordMinimumLetterCharacters($val)\n {\n $this->_propDict[\"passwordMinimumLetterCharacters\"] = intval($val);\n return $this;\n }", "public function getWorkProfilePasswordMinimumLowerCaseCharacters()\n {\n if (array_key_exists(\"workProfilePasswordMinimumLowerCaseCharacters\", $this->_propDict)) {\n return $this->_propDict[\"workProfilePasswordMinimumLowerCaseCharacters\"];\n } else {\n return null;\n }\n }", "public function getPasswordMinimumLetterCharacters()\n {\n if (array_key_exists(\"passwordMinimumLetterCharacters\", $this->_propDict)) {\n return $this->_propDict[\"passwordMinimumLetterCharacters\"];\n } else {\n return null;\n }\n }", "public function getWorkProfilePasswordMinimumLength()\n {\n if (array_key_exists(\"workProfilePasswordMinimumLength\", $this->_propDict)) {\n return $this->_propDict[\"workProfilePasswordMinimumLength\"];\n } else {\n return null;\n }\n }", "public function getPasswordMinimumSymbolCharacters()\n {\n if (array_key_exists(\"passwordMinimumSymbolCharacters\", $this->_propDict)) {\n return $this->_propDict[\"passwordMinimumSymbolCharacters\"];\n } else {\n return null;\n }\n }", "public function setPasswordMinimumLowerCaseCharacters($val)\n {\n $this->_propDict[\"passwordMinimumLowerCaseCharacters\"] = intval($val);\n return $this;\n }", "public function setPasswordMinimumLowerCaseCharacters(?int $value): void {\n $this->getBackingStore()->set('passwordMinimumLowerCaseCharacters', $value);\n }", "public function getPasswordMinimumLowerCaseCharacters()\n {\n if (array_key_exists(\"passwordMinimumLowerCaseCharacters\", $this->_propDict)) {\n return $this->_propDict[\"passwordMinimumLowerCaseCharacters\"];\n } else {\n return null;\n }\n }", "public function setPasscodeMinimumLength($val)\n {\n $this->_propDict[\"passcodeMinimumLength\"] = intval($val);\n return $this;\n }", "function setMinPasswordLength($minPasswordLength) {\n\t\treturn $this->setData('minPasswordLength', $minPasswordLength);\n\t}", "public function setPasswordMinimumCharacterSetCount($val)\n {\n $this->_propDict[\"passwordMinimumCharacterSetCount\"] = intval($val);\n return $this;\n }", "public function setWorkProfilePasswordMinUpperCaseCharacters($val)\n {\n $this->_propDict[\"workProfilePasswordMinUpperCaseCharacters\"] = intval($val);\n return $this;\n }", "public function setPasscodeMinimumCharacterSetCount($val)\n {\n $this->_propDict[\"passcodeMinimumCharacterSetCount\"] = intval($val);\n return $this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation listPoolServersAsyncWithHttpInfo List servers in a pool Note: the input parameter is an associative array with the keys listed as the parameter name below This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. URL:
public function listPoolServersAsyncWithHttpInfo($options) { $returnType = '\Fastly\Model\ServerResponse[]'; $request = $this->listPoolServersRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; }, function ($exception) { $response = $exception->getResponse(); $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri() ), $statusCode, $response->getHeaders(), (string) $response->getBody() ); } ); }
[ "public function listServerPoolsAsyncWithHttpInfo($options)\n {\n $returnType = '\\Fastly\\Model\\PoolResponse[]';\n $request = $this->listServerPoolsRequest($options);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function listServerPoolsAsync($options)\n {\n return $this->listServerPoolsAsyncWithHttpInfo($options)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function listServersAsync(): PromiseInterface\n {\n return $this->listServersAsyncWithHttpInfo()->then(function ($response) {\n return $response[0];\n });\n }", "public function getPoolServerAsyncWithHttpInfo($options)\n {\n $returnType = '\\Fastly\\Model\\ServerResponse';\n $request = $this->getPoolServerRequest($options);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function indexCloudBucketsByPoolAsyncWithHttpInfo($pool_id, $limit = null, $offset = null, $sort_by = null, $id = null, $cloud_connector_id = null, $name = null, $location = null, $price = null)\n {\n $returnType = '\\NodeumSDK\\Client\\Model\\CloudBucketCollection';\n $request = $this->indexCloudBucketsByPoolRequest($pool_id, $limit, $offset, $sort_by, $id, $cloud_connector_id, $name, $location, $price);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function listIpsAsyncWithHttpInfo(): PromiseInterface\n {\n $request = new Request('GET', 'ip_address');\n return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) {\n return $response->toArray(IpAddressListResponse::class);\n });\n }", "public function createPoolServerAsyncWithHttpInfo($options)\n {\n $returnType = '\\Fastly\\Model\\ServerResponse';\n $request = $this->createPoolServerRequest($options);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function getTelephonyProvidersEdgesExtensionpoolsAsyncWithHttpInfo($pageSize = '25', $pageNumber = '1', $sortBy = 'startNumber', $number = null)\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\ExtensionPoolEntityListing';\n $request = $this->getTelephonyProvidersEdgesExtensionpoolsRequest($pageSize, $pageNumber, $sortBy, $number);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function fetchAddOnsAsyncWithHttpInfo()\n {\n $returnType = 'mixed[]';\n $request = $this->fetchAddOnsRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function updatePoolServerAsyncWithHttpInfo($options)\n {\n $returnType = '\\Fastly\\Model\\ServerResponse';\n $request = $this->updatePoolServerRequest($options);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function indexFilesByPoolAsyncWithHttpInfo($pool_id, $limit = null, $offset = null, $file_id = null, $name = null, $type = null, $permission = null, $size = null, $change_date = null, $modification_date = null, $access_date = null, $gid = null, $uid = null)\n {\n $returnType = '\\NodeumSDK\\Client\\Model\\NodeumFileCollection';\n $request = $this->indexFilesByPoolRequest($pool_id, $limit, $offset, $file_id, $name, $type, $permission, $size, $change_date, $modification_date, $access_date, $gid, $uid);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function listMacaroonIDsAsyncWithHttpInfo()\n {\n $returnType = '\\Lnd\\Rest\\Model\\LnrpcListMacaroonIDsResponse';\n $request = $this->listMacaroonIDsRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function listIpsAsync()\n {\n return $this->listIpsAsyncWithHttpInfo()->then(function ($response) {\n return $response[0];\n });\n }", "public function listServiceVersionsAsyncWithHttpInfo($options)\n {\n $returnType = '\\Fastly\\Model\\VersionResponse[]';\n $request = $this->listServiceVersionsRequest($options);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function indexTapesByPoolAsyncWithHttpInfo($pool_id, $limit = null, $offset = null, $sort_by = null, $id = null, $tape_library_id = null, $barcode = null, $location = null, $type = null, $locked = null, $scratch = null, $cleaning = null, $write_protect = null, $mounted = null, $ejected = null, $known = null, $mount_count = null, $date_in = null, $date_move = null, $free = null, $max = null, $last_size_update = null, $last_maintenance = null, $last_repack = null, $repack_status = null, $hash = null, $force_import_type = null, $need_to_check = null)\n {\n $returnType = '\\NodeumSDK\\Client\\Model\\TapeCollection';\n $request = $this->indexTapesByPoolRequest($pool_id, $limit, $offset, $sort_by, $id, $tape_library_id, $barcode, $location, $type, $locked, $scratch, $cleaning, $write_protect, $mounted, $ejected, $known, $mount_count, $date_in, $date_move, $free, $max, $last_size_update, $last_maintenance, $last_repack, $repack_status, $hash, $force_import_type, $need_to_check);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function indexTapesByFileByPoolAsyncWithHttpInfo($pool_id, $file_id)\n {\n $returnType = '\\NodeumSDK\\Client\\Model\\TapeCollection';\n $request = $this->indexTapesByFileByPoolRequest($pool_id, $file_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function updateServerPoolAsync($options)\n {\n return $this->updateServerPoolAsyncWithHttpInfo($options)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function indexCloudBucketsByPoolAsync($pool_id, $limit = null, $offset = null, $sort_by = null, $id = null, $cloud_connector_id = null, $name = null, $location = null, $price = null)\n {\n return $this->indexCloudBucketsByPoolAsyncWithHttpInfo($pool_id, $limit, $offset, $sort_by, $id, $cloud_connector_id, $name, $location, $price)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function deleteServerPoolAsyncWithHttpInfo($options)\n {\n $returnType = '\\Fastly\\Model\\InlineResponse200';\n $request = $this->deleteServerPoolRequest($options);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case for applicationsDelete .
public function testApplicationsDelete() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
[ "public function testDeleteAnApplication()\n {\n $config = Configuration::getDefaultConfiguration()\n ->setHost('http://127.0.0.1:4010')\n ->setUsername('YOUR_ACCOUNT_ID')\n ->setPassword('YOUR_API_KEY');\n\n\n $apiInstance = new DefaultApi(\n new Client(),\n $config\n );\n\n //$account_id = $account_id_test_value;\n //$application_id = $application_id_test_value;\n \n $response = $apiInstance->deleteAnApplication($this->application_id_deleteAnApplication_test_value());\n \n $this->assertNull($response);\n }", "public function testDeleteApp()\n {\n $testApp = new \\stdClass;\n $testApp->id = 'tablet';\n $testApp->name = 'Tablet';\n $testApp->showInMenu = true;\n $testApp->order = 1;\n\n $client = static::createRestClient();\n $client->request('DELETE', '/core/app/tablet');\n\n $response = $client->getResponse();\n\n $this->assertEquals(204, $response->getStatusCode());\n $this->assertEmpty($response->getContent());\n\n $client->request('GET', '/core/app/tablet');\n $this->assertEquals(404, $client->getResponse()->getStatusCode());\n }", "public function testDeleteAppPackage()\n {\n\n }", "public function testDeleteAppStoreConfig()\n {\n }", "public function testDeletePromotionCampaignApplicationUsingDELETE()\n {\n }", "public function testDelete(){\n $app = $this->certification_applications('0'); // from fixture, which is database since it resets it on load\n $app_id = $app->app_id;\n $this->assertTrue(is_numeric($app_id), \" primary key is not numeric\");\n\n // grab information from apps so we can query for it later to confirm delete\n $req_certs = $app->requested_certifications;\n\n $request_id = $req_certs[0]->request_id;\n $product_id = $app->product_id;\n $this->assertTrue(is_numeric($request_id), \" primary key is not numeric\");\n $this->assertTrue(is_numeric($product_id), \" product_id is not numeric\");\n\n $rc = RequestedCertifications::model()->findByPk($request_id); // from database\n $this->assertTrue($rc instanceof RequestedCertifications, \"requested certification should exist\");\n\n $tr = TestResults::model()->findByPk($request_id); // from database\n $this->assertTrue($tr instanceof TestResults, \"requested certification should exist\");\n\n $prod = Products::model()->findByPk($product_id); // from database\n $this->assertTrue($prod instanceof Products, \"product should exist\");\n\n $prod_certs = ProductCertifications::model()->findAll(\"cid='\".Products::productId2Cid($product_id).\"'\");\n //print_r($prod_certs);\n $this->assertTrue($prod_certs[0] instanceof ProductCertifications, \"product certification should exist\");\n\n //$prod_certs = $prod->product_certifications;\n\n // delete the application\n $rv = $app->delete();\n $this->assertTrue($rv, \"product was not deleted\");\n\n\n // confirm that we did NOT delete from product_certifications\n // NOTE: this may change in future as logic gets more complete to detect when\n // deleting from product_certifications is safe\n\n //print \"product_id = $product_id,\";\n //print \"cid = \".Products::productId2Cid($product_id).\"\\n\";\n $prod_certs = ProductCertifications::model()->findAll(\"cid='\".Products::productId2Cid($product_id).\"'\");\n //print_r($prod_certs);\n $this->assertTrue($prod_certs[0] instanceof ProductCertifications, \"product certification should exist\");\n\n\n // confirm app does not exist after delete\n $prod2 = CertificationApplications::model()->findByPk($app_id); // from database\n $this->assertFalse($prod2 instanceof CertificationApplications, \"app should not exist\");\n\n // confirm that related information does not exist either\n $rc = RequestedCertifications::model()->findByPk($request_id); // from database\n $this->assertFalse($rc instanceof RequestedCertifications, \"requested certification should not exist\");\n\n // confirm that related information does not exist either\n $tr = TestResults::model()->findByPk($request_id); // from database\n $this->assertFalse($tr instanceof TestResults, \"test result should not exist\");\n\n\n }", "public function testDeleteOAuthApp()\n {\n }", "public function testDeleteAppPackageHistory()\n {\n\n }", "public function testDelete()\n {\n foreach ($this->users as $user) {\n $androidApp = factory(AndroidApp::class)->create();\n\n $res = $this->actingAs($user, 'api')\n ->json('DELETE', \"/api/v1/android_apps/{$androidApp->id}\");\n\n switch ($user->role_id) {\n case $this->roles['admin']->id:\n $res->assertStatus(204);\n $this->assertNull(AndroidApp::find($androidApp->id));\n break;\n case $this->roles['vendor']->id:\n case $this->roles['user']->id:\n default:\n $res->assertForbidden();\n $androidApp->delete();\n break;\n }\n }\n }", "public function deleteAction()\n {\n $applicationId = $this->getParam('applicationId');\n if (!$applicationId) {\n throw new Zend_Exception('Must pass applicationId parameter');\n }\n $application = $this->Packages_Application->load($applicationId);\n $community = $application->getProject()->getCommunity();\n if (!$this->Community->policyCheck($community, $this->userSession->Dao, MIDAS_POLICY_ADMIN)\n ) {\n throw new Zend_Exception('Must be project community administrator to delete applications');\n }\n $this->disableLayout();\n $this->disableView();\n $this->Packages_Application->delete($application);\n $this->redirect('/community/'.$community->getKey().'#Packages');\n }", "public function testDeleteSystem()\n {\n }", "public function testDeleteOauthClientApp()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testDeleteProgramVersion()\n {\n }", "public function testDeleteSDPFileAppConfig()\n {\n\n }", "public function deleteApp()\n {\n try\n {\n if (FactoryCommandHelper::composer()->check())\n {\n FactoryCommandHelper::composer()->execute($this->composerPackage, 'down');\n }\n\n } catch (yii\\base\\Exception $e)\n {\n throw $e;\n }\n }", "public function testDeleteApplicationConfigurationSetting()\n {\n }", "public function testDeleteDeviceTemplate()\n {\n }", "public function test_deleteAsn() {\n\n }", "public function testDeleteEntitlementItem()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return the lisst of current custom active hostings
public function getActiveHostings() { $result = array(); foreach ($this->customHostings as $cHost) { if ($cHost->isHosting()) { $result[] = $cHost->getIdentifier(); } } return $result; }
[ "public function get_hosts() {\n\t\t$hosts = array();\n\t\tforeach ( $this->model->get_languages_list() as $lang ) {\n\t\t\t$hosts[ $lang->slug ] = wp_parse_url( $this->home_url( $lang ), PHP_URL_HOST );\n\t\t}\n\t\treturn $hosts;\n\t}", "public function addr_name()\n\t{\n\t\t$hosts = self::authorized_hosts();\n\t\t$hostlist = false;\n\t\t$db = Database::instance();\n\t\t$sql = \"SELECT host_name, address FROM host WHERE id IN (\".implode(',', $hosts).\")\";\n\t\t$data = self::query($db,$sql);\n\t\tif (count($data)>0) {\n\t\t\tforeach ($data as $row) {\n\t\t\t\t$hostlist[$row->address] = $row->host_name;\n\t\t\t}\n\t\t}\n\t\treturn $hostlist;\n\t}", "protected function _getHostList ()\n {\n $hosts = array_values($this->_hosts);\n if ($this->_params['randomize']) {\n shuffle($hosts);\n }\n return $hosts;\n }", "public function getActiveListings()\n {\n return $this->make(\n 'listings/active?includes=Images',\n 'get'\n );\n }", "public static function getHosts();", "public function listHostedServices();", "function getAllActiveServers() {\r\n\t global $dbh, $schema;\r\n\t try {\r\n\t $stmt = $dbh->prepare(\"SELECT name, ip, port \r\n\t \t\t\t\t\t\tFROM $schema.server\r\n\t \t\t\t\t\t\tWHERE lastUpdated > CURRENT_TIMESTAMP - time '03:00'\");\r\n\t $stmt->execute();\r\n\t $result = $stmt->fetchall(PDO::FETCH_ASSOC);\r\n\t return $result;\r\n\t }\r\n\t catch(PDOException $e) {\r\n\t\t\techo json_encode(Array(\"error\" => \"Database critical error.\"));\r\n\t\t\tdie;\r\n\t }\r\n \t}", "public static function list_active()\n\t{\n\t\treturn Jelly::select('country')->order_by('name', 'ASC')->execute();\n\t}", "public function hosts(): array{\n return array_unique($this->exposed_hosts);\n }", "function get_active_list()\n {\n //returns a list of all fetaures in teh sysetm.\n $db_obj = new DB();\n\t//$category_list_query=\"SELECT * FROM category where catclass = 't' or catclass='l' or catclass = 'i' order by order_num desc\";\n\t$category_list_query = \"select * from category where catclass != 'm' and catclass != 'h' order by order_num desc \";\n $result = $db_obj->query($category_list_query);\n return $result;\n }", "public function getHomeComs()\n {\n return $this->where(['is_active' => 1])\n ->orderBy('updated_at', 'desc')\n ->take(16)\n ->get();\n }", "private function _getActiveElements()\n {\n $elements = array();\n $segments = craft()->request->getSegments();\n\n // Add homepage\n $element = craft()->elements->getElementByUri('__home__');\n if ($element) {\n $elements[] = $element;\n }\n\n // Find other elements\n if (count($segments)) {\n $count = 0; // Start at second\n $segmentString = $segments[0]; // Add first\n while ($count < count($segments)) {\n // Get element\n $element = craft()->elements->getElementByUri($segmentString);\n\n // Add element to active elements\n if ($element) {\n $elements[] = $element;\n }\n\n // Search for next possible element\n $count ++;\n if (isset($segments[$count])) {\n $segmentString .= '/' . $segments[$count];\n }\n }\n }\n return $elements;\n }", "public function getHostSettings()\n {\n return [\n [\n \"url\" => \"https://my.sevdesk.de/api/v1\",\n \"description\" => \"Our main application instance which most of our customers work with\",\n ],\n [\n \"url\" => \"https://my.pebesmart.ch/api/v1\",\n \"description\" => \"Our swiss application instance, hosted and maintained by smart seven AG\",\n ],\n [\n \"url\" => \"http://sevdesk.local/api/v1\",\n \"description\" => \"sevDesk internal local instance\",\n ]\n ];\n }", "function get_host_array() {\n\tif (read_config_option(\"auth_method\") != 0) {\n\t\t$current_user = db_fetch_row(\"select policy_hosts from user_auth where id=\" . $_SESSION[\"sess_user_id\"]);\n\n\t\tif ($current_user[\"policy_hosts\"] == \"1\") {\n\t\t\t$sql_where = \"where user_auth_perms.user_id is null\";\n\t\t}elseif ($current_user[\"policy_hosts\"] == \"2\") {\n\t\t\t$sql_where = \"where user_auth_perms.user_id is not null\";\n\t\t}\n\n\t\t$host_list = db_fetch_assoc(\"select\n\t\t\thost.id,\n\t\t\tCONCAT_WS('',host.description,' (',host.hostname,')') as name,\n\t\t\tuser_auth_perms.user_id\n\t\t\tfrom host\n\t\t\tleft join user_auth_perms on (host.id=user_auth_perms.item_id and user_auth_perms.type=3 and user_auth_perms.user_id=\" . $_SESSION[\"sess_user_id\"] . \")\n\t\t\t$sql_where\n\t\t\torder by host.description,host.hostname\");\n\t}else{\n\t\t$host_list = db_fetch_assoc(\"select id,CONCAT_WS('',description,' (',hostname,')') as name from host order by description,hostname\");\n\t}\n\n\treturn $host_list;\n}", "public function getAllActiveWebsites()\n {\n return cache()->tags('repository', 'website')\n ->rememberForever('all-active-websites', function () {\n return $this->model->get();\n });\n }", "function get_host_list() {\n global $config;\n\n $hosts = array();\n\n foreach($config[\"racktables\"][\"list_query\"] as $indexQuery => $listQuery) {\n $result = do_curl_call($listQuery[\"host\"] . $listQuery[\"list_api\"], $listQuery[\"userpwd\"]);\n\n $dom = new DOMDocument();\n \n @$dom->loadHTML($result);\n\n $host_list = array();\n\n foreach($dom->getElementsByTagName('a') as $link) {\n $href = $link->getAttribute('href');\n $strong = $link->getElementsByTagName('strong');\n \n if(strpos($href, \"object_id\") !== false && $strong->length > 0) {\n $s = str_replace(\"index.php?page=object&object_id=\", \"\", $href);\n $host_list[$s] = $strong[0]->childNodes[0]->nodeValue; \n } \n }\n\n $hosts[$indexQuery] = array();\n foreach($listQuery[\"host_filters\"] as $hostFilterName => $hostFilter) {\n \n if(array_key_exists(\"filter\", $hostFilter) && is_array($hostFilter[\"filter\"]) && count($hostFilter[\"filter\"]) > 0) {\n $hosts[$indexQuery][$hostFilterName] = array();\n \n foreach($hostFilter[\"filter\"] as $filter) {\n $hosts[$indexQuery][$hostFilterName] = $hosts[$indexQuery][$hostFilterName] + preg_grep($filter, $host_list);\n }\n } else {\n $hosts[$indexQuery][$hostFilterName] = $host_list;\n }\n }\n }\n\n return $hosts;\n}", "function GetAverallHosts()\n\t{\n\t\t$SQL = sprintf(\"\n\t\t\tSELECT\n\t\t\t\tCOUNT(DISTINCT(remote_host)) AS hosts\n\t\t\tFROM %s\n\t\t\t\", $this->getTable(\"StatTable\"));\n $_tmp = $this->Connection->ExecuteScalar($SQL);\n return $_tmp[\"hosts\"];\n\t}", "public function getTbrHosts() {\n\treturn $this->GTB_SERVER['host']; \n }", "protected function _getActiveBanners()\n {\n $collection = Mage::getModel('space48timer/banner')->getCollection();\n $collection->getSelect()->where('main_table.active = ? ', 1);\n\n return $collection;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the determination Specifies the result of the investigation, whether the alert represents a true attack and if so, the nature of the attack. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue.
public function setDetermination($val) { $this->_propDict["determination"] = $val; return $this; }
[ "public function setDetermination(?AlertDetermination $value): void {\n $this->getBackingStore()->set('determination', $value);\n }", "function set_decision($decision)\n {\n $this->set_default_property(self::PROPERTY_DECISION, $decision);\n }", "protected function _setFraudDetected()\n {\n\n if (!is_null($fraudSreening = $this->_transaction->getFraudScreening())) {\n if ($fraudSreening->getResult()) {\n $payment = $this->_order->getPayment();\n $payment->setIsFraudDetected(true);\n\n $payment->setAdditionalInformation('fraud_type', $fraudSreening->getResult());\n $payment->setAdditionalInformation('fraud_score', $fraudSreening->getScoring());\n $payment->setAdditionalInformation('fraud_review', $fraudSreening->getReview());\n\n $isDeny = ($fraudSreening->getResult() != 'challenged' || $this->_transaction->getState() == TransactionState::DECLINED);\n\n if (!$isDeny) {\n $this->fraudReviewSender->send($this->_order);\n } else {\n $this->fraudDenySender->send($this->_order);\n }\n\n }\n }\n }", "protected function _setFraudDetected()\n {\n if (($fraudSreening = $this->_transaction->getFraudScreening()) !== null) {\n if ($fraudSreening->getResult()) {\n $payment = $this->_order->getPayment();\n $payment->setIsFraudDetected(true);\n\n $payment->setAdditionalInformation('fraud_type', $fraudSreening->getResult());\n $payment->setAdditionalInformation('fraud_score', $fraudSreening->getScoring());\n $payment->setAdditionalInformation('fraud_review', $fraudSreening->getReview());\n\n $isDeny = ($fraudSreening->getResult() != 'challenged'\n || $this->_transaction->getState() == TransactionState::DECLINED);\n\n if (!$isDeny) {\n $this->fraudReviewSender->send($this->_order);\n } else {\n $this->fraudDenySender->send($this->_order);\n }\n }\n }\n }", "public function setExtractionResult($extractionResult){\r\n \t$this->extractionResult=$extractionResult;\t\r\n }", "function get_decision()\n {\n return $this->get_default_property(self::PROPERTY_DECISION);\n }", "public function setExpertise($expertise) {\n $this->expertise = $expertise;\n }", "function set_decision_motivation($decision_motivation)\n {\n $this->set_default_property(self::PROPERTY_DECISION_MOTIVATION, $decision_motivation);\n }", "public function decision($data)\n {\n list($response) = $this->decisionWithHttpInfo($data);\n return $response;\n }", "public function setOverrideDecision($overrideDecision)\n {\n $this->overrideDecision = $overrideDecision;\n }", "public function set_decision_motivation($decision_motivation)\n {\n $this->set_default_property(self::PROPERTY_DECISION_MOTIVATION, $decision_motivation);\n }", "public function setEscalation($escalation)\n {\n $this->escalation = $escalation;\n return $this;\n }", "public function defense(){\n return $this->defense;\n }", "public function setDecision($val)\n {\n $this->_propDict[\"decision\"] = $val;\n return $this;\n }", "public function setInfectiousAgent($value)\n {\n $this->infectiousAgent = $value;\n }", "public function setDecision(?string $value): void {\n $this->getBackingStore()->set('decision', $value);\n }", "function getDecision() {\n\t\treturn $this->_decision;\n\t}", "public function get_risk_decision() {\n\n\t\treturn ! empty( $this->response->transaction->riskData->decision ) ? $this->response->transaction->riskData->decision : null;\n\t}", "public function testSetIntervention()\n {\n $expected = 'intervention';\n\n self::assertEquals($this->criticity, $this->criticity->setIntervention($expected));\n self::assertEquals($expected, $this->criticity->getIntervention());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }