query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Get a Subscription by order_id and product_id
public function get_order_product_subscription( $order_id, $product_id ) { $subscription_key = WC_Subscriptions_Manager::get_subscription_key( $order_id, $product_id ); $subscription = WC_Subscriptions_Manager::get_subscription( $subscription_key ); return $subscription; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wcs_get_subscriptions_for_product( $product_ids, $fields = 'ids' ) {\n\tglobal $wpdb;\n\n\t// If we have an array of IDs, convert them to a comma separated list and sanatise them to make sure they're all integers\n\tif ( is_array( $product_ids ) ) {\n\t\t$ids_for_query = implode( \"', '\", array_map( 'abs...
[ "0.6971286", "0.6262788", "0.6170137", "0.6138212", "0.61123526", "0.60727227", "0.5949016", "0.59223175", "0.58436775", "0.58203864", "0.5770421", "0.5740939", "0.5735021", "0.57200074", "0.5719754", "0.5700169", "0.56704336", "0.56655544", "0.5649731", "0.56309545", "0.5626...
0.6532087
1
Get a Subscription from a User Membership
public function get_subscription_from_membership( $user_membership ) { $user_membership_id = is_object( $user_membership ) ? $user_membership->id : $user_membership; $subscription_key = $this->get_user_membership_subscription_key( (int) $user_membership_id ); if ( ! $subscription_key ) { return null; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveSubscription() {\n // Adrian: Get user subscription details from the database\n /**$subscription = Subscription::where('user_id', $this->model->id)\n ->where('plan_id', $this->plan)\n ->first();**/\n\n ...
[ "0.7232933", "0.6808315", "0.6746692", "0.66606724", "0.6619575", "0.6616385", "0.66081494", "0.65625155", "0.6535004", "0.63948035", "0.63909614", "0.633904", "0.63147914", "0.6301561", "0.6296257", "0.6286196", "0.6265362", "0.61987484", "0.6194313", "0.6155398", "0.6103570...
0.6763251
2
Get user memberships by subscription key
public function get_memberships_from_subscription( $subscription_key ) { $user_memberships = array(); $user_membership_ids = new WP_Query( array( 'post_type' => 'wc_user_membership', 'post_status' => array_keys( wc_memberships_get_user_membership_statuses() ), 'fields' => 'ids', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getSubscription()\n {\n $members = [];\n $page = 1;\n while(count($members) > 0 || $page === 1) {\n $members = $this->mangopay->listUsers($page);\n foreach ($members as $member) {\n if ($member->Email === 'user-vip@prono-bet.com') {\n ...
[ "0.6504515", "0.62734777", "0.6230953", "0.6120904", "0.59495854", "0.59205645", "0.5730152", "0.567319", "0.5672288", "0.5550507", "0.55431294", "0.55325675", "0.55160296", "0.5474513", "0.54615414", "0.54485065", "0.54293877", "0.54163957", "0.54128474", "0.5389833", "0.533...
0.7590308
0
Check if order contains a Subscription
protected function order_contains_subscription( $order ) { return WC_Subscriptions_Order::order_contains_subscription( $order ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_subscription( $order_id ) {\n\t\treturn ( function_exists( 'wcs_order_contains_subscription' ) && ( wcs_order_contains_subscription( $order_id ) || wcs_is_subscription( $order_id ) || wcs_order_contains_renewal( $order_id ) ) );\n\t}", "protected function order_contains_subscription( $order_id...
[ "0.71747226", "0.71717185", "0.6739315", "0.67205507", "0.65633047", "0.6429702", "0.6339807", "0.6261275", "0.61559397", "0.6135418", "0.611952", "0.6118669", "0.60814667", "0.6044969", "0.6043291", "0.60286", "0.6028257", "0.6006084", "0.59678966", "0.59616643", "0.5951888"...
0.7819213
0
Get a Subscription renewal url for a Subscriptiontied Membership
public function get_subscription_renewal_url( $user_membership ) { $subscription_key = $this->get_user_membership_subscription_key( $user_membership->get_id() ); $url = WC_Subscriptions_Renewal_Order::get_users_renewal_link( $subscription_key ); return $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_renewal_url() {\n\t\t$renewal_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'renew',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $renewal_url;\n\t}", "public function new_subscription_url($...
[ "0.7509436", "0.6820527", "0.63464165", "0.61982125", "0.60496145", "0.604195", "0.6018879", "0.598256", "0.5924393", "0.5900339", "0.58577156", "0.58441734", "0.58365834", "0.58042365", "0.5786703", "0.5777251", "0.57770866", "0.5769336", "0.5738676", "0.5706045", "0.569512"...
0.7367929
1
Check if a Subscription associated to a Membership is renewable
public function is_subscription_linked_to_membership_renewable( $subscription, $user_Membership ) { return WC_Subscriptions_Renewal_Order::can_subscription_be_renewed( $this->get_user_membership_subscription_key( $user_Membership->get_id() ), $user_Membership->get_user_id() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_renewable() {\n\t\treturn isset( $this->data['subscriptions_renewable'] ) && $this->data['subscriptions_renewable'];\n\t}", "function canRenewMembership($renewOptionId, $fromSubscriptionId) {\r\n\t\treturn true ;\r\n\t}", "protected function renewal(): bool\n {\n // If we're not in...
[ "0.75324917", "0.733845", "0.71383333", "0.69350123", "0.6794024", "0.6766444", "0.67146343", "0.66176957", "0.66039103", "0.6461522", "0.6394426", "0.63808405", "0.6369964", "0.6360644", "0.63239557", "0.6235323", "0.62125516", "0.6202377", "0.61967516", "0.61682165", "0.616...
0.6852856
4
Get a Subscription event date or time
protected function get_subscription_event( $subscription, $event, $format = 'mysql' ) { $date = ''; // sanity check if ( ! is_array( $subscription ) || empty( $subscription ) ) { return $date; } switch ( $event ) { case 'end' : case 'end_date' : case 'expiry_date' : $date = isset( $subscri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventTimestamp();", "public function getEventTime()\n {\n return $this->event_time;\n }", "public function getEventTime()\n {\n return $this->event_time;\n }", "public function getSubscribeDate()\n {\n return $this->subscribeDate;\n }", "public func...
[ "0.65830815", "0.6512927", "0.6512927", "0.6419624", "0.6197726", "0.6095644", "0.5823512", "0.57241666", "0.55804104", "0.5556832", "0.54295284", "0.54208565", "0.5419405", "0.5419405", "0.5419405", "0.54192126", "0.5415985", "0.5409596", "0.5400543", "0.53901464", "0.539014...
0.668442
0
What is this relationship's cardinality?
public function isPoly() { return $this->polyRelationship; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function subpropertyJoinSameTableCountTest() {}", "protected function getTotalRelevantRelationshipCount()\n {\n return count($this->getCombinedRelationships())\n + count( $this->data['relationships']['image'] )\n + count( $this->data['relationships']['file'] )\n ...
[ "0.6208943", "0.6102675", "0.59260505", "0.59096724", "0.5859425", "0.57703155", "0.5716724", "0.56861246", "0.5649465", "0.5418494", "0.5372346", "0.53556395", "0.5317869", "0.53014493", "0.5283449", "0.5267935", "0.5246251", "0.52366835", "0.5174098", "0.516543", "0.516543"...
0.0
-1
Eagerly loads relationships for $models. This method takes an array of models, collects PK or FK (whichever is needed for relationship), then queries the related table by PK/FK and attaches the array of returned relationships to the appropriately named relationship on $models.
protected function queryAndAttachRelatedModelsEagerly(Table $table, $models, $attributes, $includes=array(), $queryKeys=array(), $modelValuesKeys=array()) { $values = array(); $options = $this->options; $inflector = Inflector::instance(); $queryKey = $queryKeys[0]; $modelValuesKey = $modelValuesKeys[0]; f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function eagerLoadRelations(array $models) {\n foreach ($this->eagerLoad as $name => $constraints) {\n // For nested eager loads we'll skip loading them here and they will be set as an\n // eager load on the query to retrieve the relation so that they will be eager\n ...
[ "0.75232476", "0.74894863", "0.7384571", "0.7327285", "0.7297339", "0.7284859", "0.72734815", "0.72084826", "0.72039855", "0.71796435", "0.70843273", "0.6917009", "0.668996", "0.6516232", "0.63871926", "0.62303543", "0.6213358", "0.61783874", "0.6052519", "0.5976807", "0.5970...
0.5866062
22
Infers the $this>className based on $this>attributeName. Will try to guess the appropriate class by singularizing and uppercasing $this>attributeName.
protected function setInferredClassName() { $singularize = ($this instanceOf HasMany ? true : false); $this->setClassName(\ChickenTools\Str::classify($this->attributeName, $singularize)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function reworkClassName() {\n $className = $this->className;\n\n if ( (is_array($className) && (count($className) == 0)) || (is_string($className) && (strlen($className) == 0)) ) {\n $this->className = array();\n return;\n }\n\n $arr = self::goodSplit($className, '::');\n...
[ "0.61572564", "0.6152336", "0.5693837", "0.55937994", "0.53605855", "0.5350472", "0.533853", "0.53346974", "0.5283421", "0.521665", "0.5216016", "0.51824164", "0.51801217", "0.5172149", "0.51718843", "0.5143842", "0.514227", "0.51409215", "0.5131353", "0.5124402", "0.5109615"...
0.6888032
0
Creates INNER JOIN SQL for associations.
public function constructInnerJoinSql(Table $fromTable, $usingThrough=false, $alias=null) { if ($usingThrough) { $joinTable = $fromTable; $joinTableName = $fromTable->getFullyQualifiedTableName(); $fromTableName = Table::load($this->className)->getFullyQualifiedTableName(); } else { $joinTable =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function sqlJoining() : string {\n $relations = self::getsRelationsHasOne();\n\n $baseTable = static::tableName();\n $baseProperties = self::getProperties();\n foreach ($baseProperties as &$property) {\n $property = $baseTable . '.' . $property;\n }\n $colsFromBaseTabel = impl...
[ "0.7014482", "0.67189854", "0.664452", "0.64704597", "0.63887227", "0.63218415", "0.6204715", "0.61845237", "0.61598295", "0.6150158", "0.6105926", "0.6039087", "0.60271454", "0.60065204", "0.5915286", "0.5901905", "0.58522385", "0.5836333", "0.5835859", "0.5793641", "0.57779...
0.5757271
21
This will load the related model data.
abstract function load(Model $model);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadRelated()\n {\n return;\n }", "function load ()\n {\n $this->relationships = parent::_load ( $this->basepath ) ;\n }", "private function metaLoad()\n {\n $this->meta ??= $this?->relations['meta'] ?? $this->meta()->get();\n }", "public function loadMo...
[ "0.81130826", "0.7457343", "0.7010556", "0.6965736", "0.6887524", "0.684385", "0.68017256", "0.6767528", "0.66193515", "0.65783155", "0.6555463", "0.6531166", "0.6519117", "0.65181863", "0.6464512", "0.63984394", "0.63549066", "0.6267341", "0.6236558", "0.62264436", "0.622365...
0.6383496
16
Get an array containing the key and value of the foreign key for the association
private function getForeignKeyForNewAssociation(Model $model) { $this->setKeys($model); $primaryKey = Inflector::instance()->variablize($this->foreignKey[0]); return array( $primaryKey => $model->id, ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getForeignKeys()\n {\n if ($this->foreign_keys_cache === null) {\n $query = $this->db_instance->query('SELECT table_name, column_name, referenced_table_name, referenced_column_name from information_schema.key_column_usage where referenced_table_name is not null');\n ...
[ "0.65673536", "0.65510887", "0.6480101", "0.63432956", "0.6341047", "0.6311684", "0.63016236", "0.6212021", "0.61953413", "0.61373574", "0.61232495", "0.61218035", "0.6117957", "0.6112464", "0.60784924", "0.60415894", "0.6035947", "0.5945154", "0.5937441", "0.5877868", "0.587...
0.6145137
9
injects the API configuration This injection method also sets the username, password and baseUrl for the API.
public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) { $configuration = $configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManager::CONFIGURATION_TYPE_SETTINGS); $apiConfiguration = $configuration['api']; $this->userna...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n $dotenv = new Dotenv();\n $dotenv->load(dirname(__DIR__).'/.env');\n\n $this->api = new Api($_ENV['CLODUI_API']);\n\n $client_id = $_ENV['CLODUI_CLIENT_ID'];\n $user_pool_id = $_ENV['CLODUI_USER_POOL_ID'];\n $identity_pool_id = $_ENV['CLOD...
[ "0.6504976", "0.6481723", "0.6399881", "0.6364724", "0.6335331", "0.6289158", "0.6206001", "0.61973065", "0.61705023", "0.61604416", "0.6153451", "0.61224014", "0.6060661", "0.60532725", "0.6050033", "0.604965", "0.60434884", "0.601867", "0.6004347", "0.6003547", "0.60026115"...
0.6126822
11
sets the debug flag
public function setDebug($state = TRUE) { $this->debug = $state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setdebug($d = true){\n\t\t$this->debug = $d;\n\t}", "function setDebug($debug = true)\n {\n $this->_debug = $debug;\n }", "function set_debug($debug)\n\t{\n\t\t$this->debug = $debug;\n\t}", "public function setDebug(bool $debug);", "function setDebug($debug_mode=true)\n {\n ...
[ "0.855661", "0.8401014", "0.8389107", "0.83871984", "0.8373796", "0.8272425", "0.8155399", "0.80374587", "0.7990239", "0.79883343", "0.79821414", "0.79192", "0.791335", "0.79080373", "0.7900672", "0.7801722", "0.7786787", "0.7776636", "0.77192795", "0.7658485", "0.76349807", ...
0.80430114
7
fetches the data from the API endpoint
public function loadData($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $this->baseUrl . $url); curl_setopt($ch, CURLOPT_USERPWD, $this->username . ':' . $this->password); @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HTTPAUTH,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchData()\n {\n // TODO Build URI and add PARAMS, METHODS, API TOKEN etc...\n // TODO Handle POST, GET requests using curl\n // TODO Authentication\n $path = $this->endpoint;\n return json_decode(file_get_contents($path, true));\n }", "public function ge...
[ "0.7797532", "0.728505", "0.67601794", "0.6755052", "0.67540455", "0.67309076", "0.67309076", "0.66648084", "0.6647892", "0.6549433", "0.64197814", "0.6382438", "0.6378382", "0.6319769", "0.63093436", "0.6299207", "0.62731326", "0.62642336", "0.62640995", "0.6175659", "0.6156...
0.0
-1
returns the API response as a SimpleXMLElement
public function getData($url) { return simplexml_load_string($this->loadData($url)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getXMLResponse() {\n return \\Lib\\Format::forge($this->_response)->to_xml();\n }", "private function getAPIResponse() {\n $query = self::$BASE_URL . $this->city . \",\" . $this->country . self::$KEY . self::$MODE . self::$UNITS;\n $file_content = file_get_contents($query)...
[ "0.77478886", "0.7627048", "0.74298906", "0.73872524", "0.70658976", "0.68162", "0.6789199", "0.66722625", "0.6571372", "0.65704113", "0.6308135", "0.6195296", "0.6194465", "0.6164092", "0.6055205", "0.605195", "0.60026884", "0.5999238", "0.5999238", "0.5998738", "0.5991593",...
0.0
-1
fetches a list of realty objects
public function getList($params = array(), $filter = array(), $orderby = NULL, $ordertype = 'asc', $offset = 0, $limit = 0) { if (is_array($filter)) { foreach ($filter as $key => $value) { if (is_array($value)) { foreach ($value as $key1 => $value1) { $params[] = 'filter[' . $key . '][]=' . $value1;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchList();", "public abstract function fetchAllObjects();", "public abstract function getObjects();", "function listObjects();", "protected abstract function fetchLists();", "abstract public function getList();", "function sthFetchObjects($sth) {\r\n\t$out = array();\r\n\twhile($o = $...
[ "0.75632066", "0.73207515", "0.72998846", "0.7109362", "0.66514575", "0.66176665", "0.6550379", "0.6437033", "0.6379983", "0.6361483", "0.6357069", "0.6357069", "0.6355353", "0.6355353", "0.6347576", "0.63387114", "0.6323703", "0.6303698", "0.6275342", "0.62586457", "0.624943...
0.0
-1
fetchs realty object detail info
public function getDetail($id) { return $this->getData('/objekt/detail/objekt_id/' . $id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDetail();", "abstract public function getDetails();", "public abstract function FetchObject();", "public abstract function fetchObject();", "public function fetchObject();", "public function fetchObject();", "public function fetch()\n {\n return $this->info;\n }", "fun...
[ "0.74613553", "0.7282049", "0.71012104", "0.7033522", "0.6963956", "0.6963956", "0.683296", "0.67904836", "0.6529969", "0.6412335", "0.64095986", "0.6399234", "0.6398683", "0.6398683", "0.6398683", "0.63811225", "0.6344925", "0.6335585", "0.6334248", "0.6322935", "0.6322935",...
0.63196975
21
fetches the team list info
public function getTeamList() { return $this->getData('/team/list'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function team_list()\n {\n }", "public function team_info() {\n\n $method=\"team.info\";\n $payload = array();\n $team_details = $this->apicall($method, $payload);\n $this->debug(\"team-details.log\", json_encode($team_details));\n return $team_details;\n\n }", "public function ge...
[ "0.7134685", "0.6676885", "0.6662068", "0.65972847", "0.65259886", "0.6419824", "0.6387947", "0.6385662", "0.63537157", "0.6350115", "0.6341144", "0.62110436", "0.62058854", "0.6135939", "0.61335206", "0.6123362", "0.61066926", "0.6099865", "0.6001227", "0.59856087", "0.59597...
0.67592037
1
loads the expose PDF stream for a given realty object id
public function getExpose($id) { return $this->loadData('/objekt/expose?objekt_id=' . $id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show($id)\n {\n $url = Storage::get('po/'.$id);\n dd($url);\n $headers = array(\n 'Content-Type: application/pdf',\n );\n $download = Storage::download($url, $id, $headers);\n \n }", "public function show($id){\n try{\n ...
[ "0.6643904", "0.6290223", "0.62154746", "0.6104439", "0.6035732", "0.59884286", "0.5983619", "0.59631574", "0.5956142", "0.5936295", "0.59291714", "0.591532", "0.5897738", "0.5871889", "0.5829794", "0.5814274", "0.5813957", "0.5790253", "0.5779586", "0.5766296", "0.5726997", ...
0.5186611
97
returns a list of countries from the API only countries where active objects exists are returned
public function getCountries() { return $this->getData('/objekt/laender'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountryList()\n {\n return $this->call('country.list');\n }", "public function get_all_countries_list()\n\t {\n\t \t$query=$this->ApiModel->get_all_countries();\n\t \techo json_encode($query);\n\t }", "function getAllCountries() {\n $myModel = new My_Model();\...
[ "0.74347043", "0.74129736", "0.7363566", "0.72715765", "0.726688", "0.7260263", "0.721749", "0.71706855", "0.71462035", "0.7131006", "0.70065475", "0.70037305", "0.6988385", "0.69774765", "0.69510233", "0.6941439", "0.69327605", "0.6913418", "0.6895535", "0.68724614", "0.6871...
0.67409545
34
convenience method for self::getSubdivisions
public function getStates($countryIdent = NULL) { return $this->getSubDivisions($countryIdent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function divisions(): array { return $this->divisions; }", "public function getSubdivisionList();", "public function subdivision()\n {\n $city = $this->city;\n\n $this->subdivision = $city ? $city->subdivision : null;\n }", "public function getDivision()\n {\n return $this->divi...
[ "0.73897374", "0.7162535", "0.62324107", "0.59804314", "0.5962689", "0.5841205", "0.5816145", "0.57918316", "0.56583506", "0.56470126", "0.5508616", "0.5484569", "0.54537404", "0.5405672", "0.53856593", "0.5354913", "0.53397465", "0.52791154", "0.5244185", "0.52121353", "0.51...
0.0
-1
fetches a list of regions for a given country OR subdivision $subdivision has a higher priority than country, if it is set, countryIdent is ignored.
public function getRegions($countryIdent = NULL, $subdivisionIdent = NULL) { $params = ''; if (NULL !== $countryIdent) { $params = '?land=' . $countryIdent; } if (NULL !== $subdivisionIdent) { $params = '?bundesland=' . $subdivisionIdent; } return $this->getData('/objekt/regionen' . $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadCountriesFromRegion($region,$companyID) {\n\tif($region) {\n\t\tglobal $trailSessionUser;\n\t\n\t\t$theUserID=0;\n\t\t//ensure $trailSessionUser is not a visitor\n\t\tif(substr($trailSessionUser,0,7)!=\"visitor\") {\n\t\t\t$theUserID=getUserID($trailSessionUser);\n\t\t}\n\t\n\t\t//get the towns first\...
[ "0.591614", "0.588374", "0.572429", "0.5716984", "0.56642544", "0.56364155", "0.5634883", "0.5538464", "0.5441478", "0.54394996", "0.54124194", "0.53636754", "0.5238547", "0.5189449", "0.5092153", "0.5081505", "0.5063675", "0.5063472", "0.5034281", "0.50044245", "0.498959", ...
0.6667048
0
returned on insert and edit
public function _callback_field_citizen($value, $primary_key){ $module_path = $this->cms_module_path(); $this->config->load('grocery_crud'); $date_format = $this->config->item('grocery_crud_date_format'); if(!isset($primary_key)) $primary_key = -1; $query = $this->db->select('De...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "function dbInsert($edit)\r\n\t{\r\n\r\n\t}", "public function getEdit()\n\t{\n\t}", "public function save(){\r\n\t\tif ($this->new){\r\n\t\t\treturn $this->insert();\r\n\t\t} else {\r\n\t\t\treturn $this->update();\r\n\t\t}\r\n\t}", "public function sa...
[ "0.70557076", "0.6800617", "0.6754231", "0.6729945", "0.6541951", "0.6531574", "0.6528749", "0.6527722", "0.650526", "0.6487748", "0.64423954", "0.6418852", "0.6390175", "0.6373371", "0.63712245", "0.6342614", "0.632036", "0.632036", "0.6308311", "0.6307087", "0.6288791", "...
0.0
-1
change dPeriodEndDate format to dMY
public function _Date1_call($value, $row) { //return $value." - scale: <b>".$row->date."</b>"; $Date1 = date('d-M-Y', strtotime($row->TglActive1)); return $Date1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormattedEndDate() {\n\t\t$format_1 = 'Y-m-d';\n\t\t$format_2 = 'Y-m-d H:i';//format coming from web page\n\t\t$format_3 = 'Y-m-d H:i:s';//format coming from mysql\n\t\t$date = null;\n\t\t$formatted_date = \"\";\n\t\t\n\t\tif (!isset($this -> end_time) ) \n\t\t\treturn \"\";\n\t\t$date = DateTi...
[ "0.5906998", "0.5815273", "0.5797222", "0.5707938", "0.5572766", "0.5504607", "0.54426825", "0.5406424", "0.53707916", "0.53574276", "0.5349055", "0.5337913", "0.52257496", "0.5222003", "0.520685", "0.5204343", "0.5188877", "0.51437086", "0.51326275", "0.5123626", "0.5120643"...
0.0
-1
change dPeriodEndDate format to dMY
public function _Date2_call($value, $row) { //$session_id = $this->cms_user_name(); //return $value." - scale: <b>".$row->date."</b>"; $Date2 = date('d-M-Y', strtotime($row->TglActive2)); return $Date2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormattedEndDate() {\n\t\t$format_1 = 'Y-m-d';\n\t\t$format_2 = 'Y-m-d H:i';//format coming from web page\n\t\t$format_3 = 'Y-m-d H:i:s';//format coming from mysql\n\t\t$date = null;\n\t\t$formatted_date = \"\";\n\t\t\n\t\tif (!isset($this -> end_time) ) \n\t\t\treturn \"\";\n\t\t$date = DateTi...
[ "0.59033847", "0.58115864", "0.57940847", "0.5708879", "0.55722374", "0.5505724", "0.5443558", "0.5406822", "0.53719544", "0.5357661", "0.5346917", "0.5339205", "0.5223847", "0.522263", "0.5207538", "0.52046776", "0.5187526", "0.51433307", "0.51322323", "0.5121725", "0.512089...
0.0
-1
Add Default Tagging Asset
public function _callback_add_field_FormCutiNIK() { //$stateID = $this->uri->segment(5); $NIK = $this->cms_user_id(); $query = $this->db->select('*') ->from($this->cms_complete_table_name('profile')) ->where('NIK', $NIK) ->get(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTag()\n {\n return 'assets';\n }", "public static function tagit() {\r\n $document = JFactory::getDocument();\r\n $document->addStyleSheet(JURI::root().'administrator/components/com_jresearch/scripts/tag-it/css/jquery.tagit.css');\r\n $document->addStyleSheet(...
[ "0.6767079", "0.63187766", "0.60554534", "0.6048157", "0.6048157", "0.602392", "0.5958825", "0.5841171", "0.5744926", "0.5707165", "0.56977105", "0.56849974", "0.56737214", "0.56690353", "0.56613845", "0.56613195", "0.5595326", "0.55868274", "0.5576817", "0.55597466", "0.5542...
0.0
-1
Entiendo que cuando dice que NO puedan heredar las clases hijas, se refiere a que NO la pueda modificar... (PREGUNTAR a Conchi). Eso o si lo que quiere es que lo pongamos PRIVATE y casque el programa...
public final function asigNombre($nombre){ $this->nombre=$nombre; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function guardarReclamo()\n\t\t{\n\t\t}", "public function Modificar(): bool\n {\n $retorno = false;\n $objetoAccesoDato = AccesoDatos::RetornarObjetoAcceso();\n\n\n $consulta =$objetoAccesoDato->RetornarConsulta(\"UPDATE usuarios SET nombre = :nombre, correo = :correo, cl...
[ "0.61036503", "0.5941243", "0.578904", "0.57739884", "0.5718966", "0.56419575", "0.5616466", "0.5569387", "0.5550532", "0.5548562", "0.55224234", "0.5512492", "0.54801077", "0.5467915", "0.54603106", "0.54596364", "0.54573405", "0.5454974", "0.54436475", "0.54434925", "0.5438...
0.0
-1
end bh products category mod query
function bh_products_category_loop(){ //post sorting ?> <?php //display content ?> <div class="inner"> <div class="sidebar grid col-220 product-categories"> <?php //get_sidebar(); //should only be child category, so display parent. if (is_category()) { $this_category = get_category( get_query_var( 'cat' ) ); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function action_cat()\n {\n $cat = $this->request->param('cat');\n $cat = mysql_real_escape_string ($cat);\n \n // Получаем список продукций\n // $category = ORM::factory('category')->where('cat_id', '=', $cat)->find();\n $category = ORM::factory('category')->...
[ "0.7170336", "0.6707931", "0.64022624", "0.6401307", "0.6354842", "0.63363266", "0.63232625", "0.6307129", "0.6306867", "0.6305609", "0.6293592", "0.62883866", "0.6254771", "0.62331843", "0.6231656", "0.62043464", "0.6187993", "0.61683255", "0.61442244", "0.6136844", "0.61225...
0.0
-1
end bh products category loop add sorting scripts to footer add_action('genesis_after_footer','bh_ajax_sort_posts');
function bh_ajax_sort_posts(){ ?> <script> //add drop-downs to js pages $jq('.select-post-sorting').html( '<form action="#">Sort by:<select name="posts_sort" class="posts_sort"><option value="newest">Release Date, Newest First</option><option value="oldest">Release Date, OIdest First</option><opti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jigoshop_categories_scripts () {\n\t\n\tif( !isset($_GET['taxonomy']) || $_GET['taxonomy'] !== 'product_cat') return;\n\t\n\twp_register_script('jigoshop-categories-ordering', jigoshop::plugin_url() . '/assets/js/categories-ordering.js', array('jquery-ui-sortable'));\n\twp_print_scripts('jigoshop-categori...
[ "0.7241142", "0.6526731", "0.6444402", "0.6413683", "0.6400463", "0.63700396", "0.6369376", "0.6338886", "0.630546", "0.6296617", "0.6249045", "0.6207119", "0.61928964", "0.61739033", "0.61543816", "0.61080056", "0.6093143", "0.6033762", "0.6032027", "0.6030236", "0.60086805"...
0.71792096
1
handle plugin lifecycle events
function abl_droploader_lifecycle($event, $step) { global $prefs; $msg = ''; $msg1 = ''; switch ($step) { case 'enabled': // setup plugin: prefs, textpacks, load order if (!function_exists('soo_plugin_pref')) { $msg1 = 'Please install <em>soo_plugin_pref</em> to edit preferences (Default prefer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initializePlugin();", "protected function init_lifecycle_handler() {\n\n\t\trequire_once( $this->get_plugin_path() . '/includes/Lifecycle.php' );\n\n\t\t$this->lifecycle_handler = new \\SkyVerge\\WooCommerce\\Elavon_Converge\\Lifecycle( $this );\n\t}", "public function onPluginsInitialized()\n ...
[ "0.7031586", "0.7015926", "0.69344616", "0.6934219", "0.66588676", "0.6656148", "0.65598875", "0.6369212", "0.6366392", "0.63332224", "0.63289505", "0.6320001", "0.63069284", "0.6293605", "0.62911415", "0.6285604", "0.6242794", "0.623756", "0.62302303", "0.62060505", "0.61691...
0.0
-1
add plugin prefs to database
function abl_droploader_prefs($event, $step) { if (function_exists('soo_plugin_pref')) { soo_plugin_pref($event, $step, abl_droploader_defaults()); return true; } else { $msg = 'Please install <em>soo_plugin_pref</em> to edit preferences (Default preferences apply).'; pagetop(gTxt('edit_preferences') . ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save_addon_prefs(){\n\t\tglobal $sql,$pref;\n// $query = \"SELECT * FROM #plugin WHERE plugin_installflag = 1 AND plugin_addons !='' ORDER BY plugin_path ASC\";\n $query = \"SELECT * FROM #plugin WHERE plugin_addons !='' ORDER BY plugin_path ASC\";\n\n\t\t// clear all addon prefs before re-c...
[ "0.72845775", "0.67024946", "0.659262", "0.639898", "0.61956304", "0.6193791", "0.6148208", "0.61172044", "0.5957165", "0.5910638", "0.5880873", "0.5863317", "0.58583117", "0.5824722", "0.5796143", "0.5710946", "0.5681415", "0.56679344", "0.56034184", "0.55983526", "0.5591214...
0.51811284
66
get plugin prefs default values
function abl_droploader_defaults($values_only = false) { $defaults = array( 'imageMaxUploadCount' => array( 'val' => '10', 'html' => 'text_input', 'text' => gTxt('abl_droploader_prefs_image_max_upload_count'), ), 'reloadImagesTab' => array( 'val' => '0', 'html' => 'yesnoradio', 'text...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaults();", "public function GetDefaults ();", "public function getDefaultSettings();", "private function get_defaults() {\n\t\treturn array(\n\t\t\t'phpbb_path' \t\t\t\t=> '',\n\t\t\t'integrateLogin' \t\t\t=> 0, \n\t\t\t'showHdrFtr' \t\t\t\t=> 'NONE',\n\t\t\t'wpSimpleHdr' \t\t\t\t=> 1,\...
[ "0.7566856", "0.73202425", "0.7093371", "0.7051502", "0.7035544", "0.70052576", "0.69235927", "0.68482", "0.6846756", "0.68136275", "0.6806049", "0.6773219", "0.6759119", "0.6732954", "0.67160577", "0.66929895", "0.6690776", "0.6677039", "0.6669455", "0.66548175", "0.657256",...
0.0
-1
install plugin resources (css, js)
function abl_droploader_install($event, $step, $resources=null, $path='') { global $prefs; $state = 0; if ($resources === null) { $path = $prefs['path_to_site']; $resources = array(); $resources['/res/css/abl.droploader-app.css'] = 'Ym9keSB7CglvdmVyZmxvdy14OiBoaWRkZW47CglvdmVyZmxvdy15OiBzY3JvbGw7Cn0KLy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_assets() {\n $js_folder = SD_PLUGIN_PATH . '/src/assets/js/';\n $css_folder = SD_PLUGIN_PATH . '/src/assets/css/';\n $scripts = scandir($js_folder);\n //var_dump($scripts);\n $styles = scandir($css_folder);\n foreach ($styles as $style) {\n if( !is_dir($style) ) {\n ...
[ "0.7129204", "0.7021796", "0.69685644", "0.6954948", "0.69465375", "0.69411665", "0.6929059", "0.6929059", "0.68026865", "0.6799345", "0.67820996", "0.6755606", "0.6746891", "0.6736872", "0.672963", "0.6720726", "0.6688862", "0.66869", "0.6658118", "0.6638562", "0.6635246", ...
0.0
-1
uninstall plugin resources (css, js)
function abl_droploader_uninstall($event, $step) { global $prefs; $state = 0; // uninstall prefs if (!safe_delete('txp_prefs', "name LIKE 'abl_droploader.%'")) { if ($state == 0) $state = E_WARNING; error_log('abl_droploader: WARNING: Removal of plugin preferences failed.'); } // remove textpack ent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_plugin_assets() {\n wp_dequeue_style('roots-share-buttons'); // roots-share-buttons/assets/styles/share-buttons.css\n wp_dequeue_script('roots-share-buttons'); //roots-share-buttons/assets/scripts/share-buttons.js\n wp_dequeue_style('wp-biographia-bio'); //wp-biographia/css/wp-biographia-min.css...
[ "0.7359264", "0.71813154", "0.713725", "0.6989342", "0.68762815", "0.68538064", "0.6853646", "0.6670943", "0.6644396", "0.6627345", "0.6602687", "0.6550454", "0.65490544", "0.6534477", "0.6534477", "0.6508509", "0.64985716", "0.64970005", "0.6459887", "0.6459345", "0.64584404...
0.0
-1
inject css & js in htmlheader
function abl_droploader_head_end($evt, $stp) { global $event, $step, $prefs, $abl_droploader_prefs; if (($event == 'image' && (in_array($step, array('list', 'image_list', 'image_multi_edit', 'image_change_pageby', 'image_save', '')))) || ($event == 'article' && (in_array($step, array('create', 'edit'))))) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hookHeader()\n {\n // $this->context->controller->addJS('http://code.jquery.com/jquery-2.1.4.min.js');\n // $this->context->controller->addJS($this->_path.'views/js/bootstrap.min.js');\n $this->context->controller->addJS($this->_path.'views/js/front.js');\n $this->con...
[ "0.7204028", "0.71988887", "0.71988887", "0.71988887", "0.71454835", "0.71312165", "0.6978219", "0.683634", "0.6797206", "0.67849", "0.67273986", "0.67120475", "0.67091846", "0.6702548", "0.6668796", "0.6648915", "0.6547907", "0.6537479", "0.6530247", "0.65203923", "0.6495011...
0.0
-1
Insert DropLoader link in column 1 on the writetab
function abl_droploader_article_ui($event, $step, $data) { $content = ' <ul class="abl_droploader plain-list"> <li><a id="abl-droploader-open" class="abl-droploader-open" href="#" title="' . gTxt('abl_droploader_open_title') . '">' . gTxt('abl_droploader_open') . '</a></li> </ul>'; if (is_callable('wrapRegion')) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showDelete($path)\n\t{\n\t\t$this->table->deleteColumn = true;\n\t\t$this->table->deletelink = $path;\n\t}", "protected function linkAdd() { return \"\"; }", "function addlinks(){\n Vtiger_Link::addLink(0, 'HEADERSCRIPT', 'LSWYSIWYG', 'modules/LSWYSIWYG/resources/WYSIWYG.js','','','');\n\...
[ "0.5417458", "0.53255993", "0.5296434", "0.52941865", "0.525635", "0.5218379", "0.5213051", "0.5123752", "0.5116982", "0.5107883", "0.5098769", "0.50818604", "0.5044262", "0.5017949", "0.5007683", "0.4983361", "0.49684572", "0.49657658", "0.49651095", "0.49639255", "0.4962915...
0.5256284
5
Insert DropLoader link above the imagelist on the imagetab
function abl_droploader_image_ui($event, $step) { $content = '<div class="abl-droploader-file-uploader"> <a id="abl-droploader-open" class="abl-droploader-open txp-button" href="#" title="' . gTxt('abl_droploader_open_title') . '">' . gTxt('abl_droploader_open') . '</a> </div>'; return $content.n;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function abl_droploader_article_ui($event, $step, $data) {\n\t\t$content = '\n<ul class=\"abl_droploader plain-list\">\n<li><a id=\"abl-droploader-open\" class=\"abl-droploader-open\" href=\"#\" title=\"' . gTxt('abl_droploader_open_title') . '\">' . gTxt('abl_droploader_open') . '</a></li>\n</ul>';\n\t\tif (is_ca...
[ "0.5821236", "0.5731083", "0.5348935", "0.52925766", "0.5190834", "0.5184053", "0.5172822", "0.5155723", "0.50927645", "0.50896585", "0.5076415", "0.50673866", "0.5060036", "0.5054299", "0.50460917", "0.5045767", "0.5042095", "0.5017115", "0.50115144", "0.5004158", "0.4980735...
0.61316556
0
get image categoryselector form element
function abl_droploader_get_image_cat_select() { $image_categories = getTree('root', 'image'); //$image_categories_select = str_ireplace("\n", '', tag('<label for="image-category">' . gTxt('image_category') . '</label>' . br . // treeSelectInput('category', $image_categories, '', 'image-category'), 'div', ' id="a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptionCategoryImage()\n {\n return $this->optionCategoryImage;\n }", "function add_category_image ( $taxonomy ) { ?>\n <div class=\"form-field term-group\">\n <label for=\"category-image-id\"><?php _e('Image', 'hero-theme'); ?></label>\n <input type=\"hidden\" id=\"ca...
[ "0.62970215", "0.62586004", "0.6227012", "0.57733345", "0.56803226", "0.56673837", "0.5647469", "0.5637749", "0.5631106", "0.56053597", "0.55868727", "0.55862486", "0.55563235", "0.55137765", "0.5445103", "0.54429305", "0.5440785", "0.5428641", "0.54227984", "0.53898305", "0....
0.7250795
0
get localised items from textpack
function abl_droploader_get_localisation() { $l10n = array( 'open' => '', 'open_title' => '', 'close' => '', 'close_title' => '', 'error_method' => '', 'info_text' => '', 'err_invalid_filetype' => '', 'err_browser_not_supported' => '', 'err_too_many_files' => '', 'err_file_too_large' => ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetLocalizedTexts()\n\t{\n\t\t$result = $this->sendRequest(\"GetLocalizedTexts\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "private function extractGettextStrings()\n {\n $translation = null;\n $translationObjects = array();\n $lookupDirectories = arr...
[ "0.67095846", "0.65490705", "0.6363548", "0.6273364", "0.62680763", "0.6217451", "0.60456026", "0.60317934", "0.6016801", "0.5959253", "0.5863866", "0.5849095", "0.5803303", "0.57861483", "0.57666916", "0.57316357", "0.5703721", "0.5693391", "0.5686186", "0.5685548", "0.56775...
0.61017615
6
image_uploaded callback (txp_image.php) return JSON (imageid) and exit
function abl_droploader_image_uploaded($event, $step, $id) { if (ps('abl_droploader') == '') return; $response = array( 'status' => 1, 'image_id' => $id, ); echo json_encode($response); exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _imgUpload(){\r\n\r\n\r\n\r\n // It will always be called via ajax so we will respond as such\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($this->hasLogin()){\r\n\r\n /*\r\n \t*\r\n \t*\r\n \t*\tCheck the method used is POST\r\n \t*\r...
[ "0.6914485", "0.65540594", "0.64273363", "0.633404", "0.62768304", "0.62700474", "0.6246787", "0.6237996", "0.6179238", "0.6125587", "0.61215407", "0.60871947", "0.6084634", "0.6075415", "0.60514855", "0.6032719", "0.6007915", "0.6007191", "0.5999424", "0.5979448", "0.5961162...
0.67073905
1
============================= All magic functions starts =============================
public function __construct($objs) { if($objs !== null){ //store the `config` class from $objs variable $this->config=$objs["config"]; //store the `functions` class from $objs variable $this->functions=$objs["functions"]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function init()\n\t{\n\t\treturn;\n\t}", "protected function init()\n\t{\n\t\t\n\t}", "public function helper()\n\t{\n\t\n\t}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "pr...
[ "0.6815809", "0.67971253", "0.67480445", "0.6714164", "0.6714164", "0.6714164", "0.6714164", "0.67141354", "0.67141354", "0.67141354", "0.67141354", "0.67141354", "0.67141354", "0.67132974", "0.67132974", "0.6704632", "0.6675079", "0.6666745", "0.65934384", "0.6540716", "0.64...
0.0
-1
============================= All private functions starts ============================= =========================== All private functions ends =========================== =========================== All Public functions starts ===========================
public function ab(){ echo "I am ab from from ajax_users notifications"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __() {\n }", "private function init()\n\t{\n\t\treturn;\n\t}", "final private function __construct(){\r\r\n\t}", "private function __construct()\t{}", "private function _i() {\n }", "private function __construct() {\r\n\t\t\r\n\t}", "protected function _init()\r\n\t{\r\n\t}...
[ "0.69753575", "0.6578391", "0.65743583", "0.65480506", "0.6542085", "0.6519029", "0.65185887", "0.6492093", "0.6474334", "0.645033", "0.64163107", "0.64163107", "0.64163107", "0.64163107", "0.64163107", "0.64163107", "0.6415487", "0.6415487", "0.6415487", "0.6415487", "0.6415...
0.0
-1
Filter the HTML script tag of `fontawesome` script to add `defer` attribute.
function add_defer_attribute( $tag, $handle ) { if ( 'font-awesome' === $handle ) { $tag = str_replace( ' src', ' defer src', $tag ); } return $tag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter_script_loader_tag( $tag, $handle ) {\n foreach ( [ 'async', 'defer' ] as $attr ) {\n if ( ! wp_scripts()->get_data( $handle, $attr ) ) {\n continue;\n }\n // Prevent adding attribute when already added in #12009.\n if ( ! preg_match( \":\\s$attr(=|>|\\s):\"...
[ "0.7237725", "0.6505373", "0.6418179", "0.6246111", "0.59877104", "0.59083897", "0.5795956", "0.5675229", "0.5587274", "0.54035765", "0.53767705", "0.53493905", "0.5349385", "0.5293278", "0.52620023", "0.52599305", "0.5229869", "0.5225538", "0.52089006", "0.5190596", "0.51886...
0.7009983
1
Adds a custom read more link to all excerpts, manually or automatically generated
function understrap_all_excerpts_get_more_link( $post_excerpt ) { return $post_excerpt . '<br><a class="badge badge-primary" href="' . esc_url( get_permalink( get_the_ID() )) . '">' . __( 'Read More', 'understrap' ) . ' <i class="fas fa-angle-double-right"></i></a>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dh_modify_read_more_link() {\r\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">Click to Read!</a>';\r\n}", "function modify_read_more_link() {\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">View list..</a>';\n}", "function understrap_all_excerpts_get_more_link( ...
[ "0.7775938", "0.77386016", "0.7637902", "0.7552475", "0.75478446", "0.7543824", "0.7513742", "0.74987465", "0.7492041", "0.7488624", "0.7485699", "0.74832326", "0.7482271", "0.74725074", "0.74569213", "0.7447996", "0.74461734", "0.7435722", "0.74356663", "0.74342775", "0.7428...
0.748525
11
Define Allowed Files to be included.
function tewwie_filter_features( ) { $files_to_load = array( 'tewwie-news-section', 'tewwie-announcement-section', 'wp-bootstrap-comments', ); return $files_to_load; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getAllowedFileTypes()\n {\n return str_replace('.', '', config('media.allowed', ''));\n }", "public function getAllowedFiles(){\n return self::$allowed_files;\n }", "public function allowedIncludes()\n {\n return [];\n }", "public function getFileTypeRestr...
[ "0.68944967", "0.67760015", "0.652013", "0.63537073", "0.6293571", "0.6067082", "0.58914614", "0.5886769", "0.58844286", "0.5853039", "0.5838147", "0.5801125", "0.57944393", "0.57497317", "0.5747599", "0.5746619", "0.5742816", "0.57275254", "0.57245994", "0.5718556", "0.56630...
0.0
-1
Add support for custom color palettes in Gutenberg.
function tewwie_gutenberg_color_palette() { add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'Primary', '@@textdomain' ), 'slug' => 'primary', 'color' => 'rgb(94, 114, 228)', ), array( 'name' => esc_html__( 'Secondary', '@@textdomain' ), 'slug' => 'seconda...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hotel_lux_gutenberg_support() {\r\n\t$colors = cmsmasters_color_picker_palettes();\r\n\t\r\n\t$color_palette = array();\r\n\t\r\n\t\r\n\tforeach ($colors as $color) {\r\n\t\t$color_palette[] = array(\r\n\t\t\t'color' => $color,\r\n\t\t);\r\n\t}\r\n\t\r\n\t\r\n\tadd_theme_support('editor-color-palette', $c...
[ "0.72150284", "0.69665104", "0.6926205", "0.64307857", "0.614706", "0.6119006", "0.61009115", "0.60835445", "0.60757315", "0.60445267", "0.60401005", "0.6023986", "0.60196173", "0.5969022", "0.5923433", "0.586679", "0.5779214", "0.5763321", "0.57502395", "0.5736252", "0.57309...
0.7064425
1
Remove page templates inherited from the parent theme.
function child_theme_remove_page_template( $page_templates ) { unset( $page_templates['page-templates/blank.php'],$page_templates['page-templates/empty.php'], $page_templates['page-templates/fullwidthpage.php'], $page_templates['page-templates/left-sidebarpage.php'], $page_templates['page-templates/both-sidebarspage.p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function be_remove_genesis_page_templates( $page_templates ) {\n\tunset( $page_templates['page_archive.php'] );\n\tunset( $page_templates['page_blog.php'] );\n\treturn $page_templates;\n}", "function wmf_undo_redirect_template_changes_in_admin() {\n\tremove_filter( 'page_link', 'wmf_skip_redirect_template_in_pag...
[ "0.702426", "0.65037644", "0.64131457", "0.6406326", "0.6262876", "0.62376744", "0.61424834", "0.6110962", "0.61082923", "0.6108143", "0.6036941", "0.60307467", "0.602198", "0.5971363", "0.59237164", "0.58937496", "0.5886289", "0.5847543", "0.58383566", "0.5826905", "0.580675...
0.7632337
0
Template Parts with Display Posts Shortcode
function be_dps_template_part( $output, $original_atts ) { // Return early if our "layout" attribute is not specified if( empty( $original_atts['layout'] ) ) return $output; ob_start(); get_template_part( 'partials/dps', $original_atts['layout'] ); $new_output = ob_get_clean(); if( !empty( $new_output ) ) $ou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accouk_display_post_content() {\n\n $post_formats = get_the_terms(get_the_id(), 'post-format');\n\n switch($post_formats[0]->slug) {\n\n case 'post-with-hero':\n include_once('templates/post-with-hero.php');\n break;\n\n case 'portfolio':\n include_once('templates/post-portfolio.php...
[ "0.69495827", "0.68045604", "0.6665211", "0.665168", "0.66338897", "0.6533469", "0.6522628", "0.6516861", "0.651139", "0.6507036", "0.6497266", "0.6439877", "0.6439621", "0.6423347", "0.63677406", "0.6331029", "0.6309264", "0.6308797", "0.6287056", "0.6278254", "0.62667036", ...
0.0
-1
Display only sticky posts
function be_display_only_sticky_posts( $args, $atts ) { $sticky_variations = array( 'sticky_posts', 'sticky-posts', 'sticky posts' ); if( !empty( $atts['id'] ) && in_array( $atts['id'], $sticky_variations ) ) { $sticky_posts = get_option( 'sticky_posts' ); $args['post__in'] = $sticky_posts; } if( !empty( $atts[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onlyStickyPosts()\r\n{\r\n\t$sticky = get_option('sticky_posts');\r\n\t// check if there are any\r\n\tif (!empty($sticky)) {\r\n\t\t// optional: sort the newest IDs first\r\n\t\trsort($sticky);\r\n\t\t// override the query\r\n\t\t$args = array(\r\n\t\t\t'post__in' => $sticky\r\n\t\t);\r\n\t\tquery_posts($...
[ "0.7932049", "0.7375507", "0.7180215", "0.7099434", "0.683806", "0.67774963", "0.6630844", "0.65019584", "0.6468794", "0.6466884", "0.640469", "0.6374649", "0.6162739", "0.6154045", "0.6144017", "0.60648507", "0.6064456", "0.60457355", "0.5959761", "0.59366274", "0.5935665", ...
0.76922
1
/ Test create consignee with incorrect parameters
public function testCreateConsigneeWithIncorrectParameters() { $this->expectException( WebException::class); // Give wrong/missing parameters to provoke an error response $builder = new ConsigneeBuilder(); $consignee = $builder->build(); $this->api->createConsignee( $consignee ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testQuarantineCreate()\n {\n\n }", "public function testCannotBeCreatedFromInvalidEmailAddress()\n {\n\n }", "function testCreate() {\n # fails due to not verified...\n $this->aRequest['email'] = 'unverified@example.com';\n $this->assertFalse($this->oObject->create());\n\n #...
[ "0.6802849", "0.6537524", "0.64769465", "0.64532065", "0.6296269", "0.61695564", "0.6125048", "0.6089019", "0.60516536", "0.602815", "0.6021496", "0.5986568", "0.59795356", "0.5977144", "0.5974034", "0.5964491", "0.5945142", "0.5940745", "0.59194815", "0.5912024", "0.5876557"...
0.7950649
0
return collection filled by query
public function reload() { return new static($this->ensureData(null), ['query'=>$this->query]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}", "public function getCollection() {\n return $this->gateway->find(\n $this->g...
[ "0.77946985", "0.71978587", "0.7181632", "0.70548844", "0.6956379", "0.6956379", "0.6956379", "0.6956379", "0.6894177", "0.6851158", "0.6834142", "0.68207747", "0.6783044", "0.6718015", "0.6669781", "0.66068554", "0.65497637", "0.6536523", "0.6529247", "0.64960474", "0.645830...
0.0
-1
TODO relational operations like link() and unlink() sync() TODO addToRelation() by checking if query is a relation
public function findWith($with) { if (!$this->query) { throw new InvalidCallException('This collection was not created from a query, so findWith() is not possible.'); } $this->ensureAllInstanceOf(BaseActiveRecord::class); $models = $this->getData(); $this->query->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function _relations() {\n\n\t}", "abstract function relations();", "abstract public static function create(Relation $query): Collection;", "public function clearRelationCache();", "function query() {\n dpm($this);\n $this->ensure_my_table();\n\n // First, relate our current table ...
[ "0.6499432", "0.6242411", "0.605474", "0.60528326", "0.58611745", "0.5826134", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5776493", "0.5773435", "0.57543164", "0.57439363", "0.5739356", "0.5737649", "0.57365423",...
0.0
-1
AR specific stuff TODO add transaction support
public function deleteAll($useTransaction = false, $db = 'db') { $this->ensureAllInstanceOf(BaseActiveRecord::class); if($useTransaction === true){ return $this->runTransaction($db, 'deleteAll'); } foreach($this->getModels() as $model) { $model->delete(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function determineTransaction();", "public function transaction();", "public function transaction();", "abstract protected function _start_transaction();", "abstract public function InTransaction();", "abstract protected function doTransload();", "abstract public function startTransacti...
[ "0.64128536", "0.6009279", "0.6009279", "0.5870317", "0.5721116", "0.5681329", "0.5670584", "0.56173563", "0.56173563", "0.5604873", "0.55604297", "0.55549586", "0.55044866", "0.5483697", "0.54754734", "0.54464006", "0.54387593", "0.54387593", "0.54387593", "0.54120475", "0.5...
0.0
-1
Fill all models with common attributes
public function fillAll($attributes, $safeOnly = true, $scenario = null) { $this->ensureAllInstanceOf(BaseActiveRecord::class); if(!empty($attributes)){ foreach($this->getModels() as $model) { if($scenario){ $model->scenario = $scenario; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function populateModels()\n {\n }", "public function _set_model_fields(){\n // set fields only when they have not been set for this object\n if($this->_fields_loaded===FALSE){\n\n foreach ($this->_meta() as $meta) {\n\n $this->{$meta->name} = '';\n ...
[ "0.6589959", "0.63192636", "0.6293153", "0.6268316", "0.6259478", "0.61891127", "0.6115323", "0.60772526", "0.6034286", "0.5942314", "0.58796734", "0.58476424", "0.5836441", "0.58320445", "0.5803977", "0.5797133", "0.5763414", "0.57618904", "0.57439065", "0.5728828", "0.57079...
0.5819359
14
Encodes the collected models into a JSON string.
public function toJson($options = 320) { return Json::encode($this->toArray()->getModels(), $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function jsonize()\n {\n return json_encode($this->toArray());\n }", "public function toJson($options = 320)\n {\n return Json::encode($this->toArray()->_models, $options);\n }", "public function json(){ return json_encode( $this->objectify() ); }", "public function toJson() ...
[ "0.6597288", "0.6450716", "0.6405772", "0.63457286", "0.6283658", "0.6264811", "0.6263853", "0.6173094", "0.6173094", "0.6135969", "0.6121925", "0.6113843", "0.61096567", "0.6083419", "0.6083419", "0.6083419", "0.6083419", "0.6083419", "0.6083419", "0.6083419", "0.6083419", ...
0.61128986
12
Processing line by line where each line is a variable that must be expanded if does not exist.
public static function ev_encode(Array &$curr_pos, Array $keys, Array $values){ if(!sizeof($keys)) throw new \Exception('Empty keys', 400); if(!sizeof($values)) throw new \Exception('Empty values', 400); if(!strcmp(current($keys),'*')) throw new \Exception('First elt cannot be a *', 400); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function parseEnvVar($_line) {\n // Only process the line if it is not empty/null.\n if( $_line !== PHP_EOL && $_line !== null && $_line != '' ) {\n\n // If the line is a comment, ignore it as well.\n if( $_line[0] === '#' ){\n return;\n ...
[ "0.60124177", "0.56907666", "0.5282981", "0.52580804", "0.52520865", "0.51870656", "0.51722807", "0.5136417", "0.5132015", "0.4980319", "0.49390534", "0.48422295", "0.48050427", "0.47341156", "0.4714324", "0.46481574", "0.46415797", "0.46329415", "0.46173722", "0.46025094", "...
0.0
-1
Process a variable and if does not exist: expand as 'object', 'array' or 'leaf' at a position, otherwise move to the next position.
private static function &ev_next(Array &$curr_pos, mixed $next, String $current, Array $values): Array{ if(!strcmp($current,'*') && !strcmp($next,'*')) throw new \Exception('Two or more * cannot follows each other', 400); if($next === false){ if(!strcmp($current,'*')) throw new \Exception('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mawk_process_var (&$expr) {\n \n switch ($expr[0]) {\n \n case OP_RUN_VAR :\n \n $val = @$GLOBALS['mawk_vars'][$expr[1]];\n $start = 2;\n break;\n \n case OP_FIELD_VAR :\n \n $val = @$GLOBALS['mawk_data'][$expr[1]][$expr[2]];\n $start = 3;\n break;\n ...
[ "0.5543662", "0.55142194", "0.54707307", "0.51146024", "0.50153124", "0.50124216", "0.48821846", "0.47776705", "0.46889842", "0.4598568", "0.45862615", "0.45827296", "0.45504698", "0.45296976", "0.45193368", "0.45140865", "0.45030513", "0.44803602", "0.447461", "0.4459099", "...
0.0
-1
Set value if key is not exists
public function setex($key, $value) { return $this->memcache->add($key, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function set($key, $value){\n \n if (!array_key_exists($key, self::$dades)) //array_key_exists comprueba si existe\n { \n self::$dades[$key] = $value; \n return true; //si existe le pasamos true\n \n }else\n { \n return false;...
[ "0.67549324", "0.65523386", "0.64790684", "0.64790684", "0.64785045", "0.6433335", "0.63761485", "0.6366116", "0.63640505", "0.63016593", "0.62433386", "0.62433386", "0.62302697", "0.62285125", "0.62285125", "0.6226789", "0.6224177", "0.6224177", "0.619162", "0.6184403", "0.6...
0.0
-1
Get a new identifier
public function newIdentifier(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNewId();", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public fu...
[ "0.80312693", "0.8014722", "0.8014218", "0.8014218", "0.8014218", "0.8014218", "0.8014218", "0.80135", "0.80135", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7962092", "0.7954783", "0.7890156", "0.7...
0.84006816
0
Check if version is up
public function has(string $version): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateIsAvailable()\n {\n return self::INSTALLED_VERSION != $this->version;\n }", "function checkForUpdate() {\n $cache_data = Terminus::getCache()->getData(\n 'latest_release',\n array('decode_array' => true)\n );\n if (!$cache_data\n || ((int)$cache_data['check_date'] <...
[ "0.7343413", "0.7320498", "0.72607446", "0.723381", "0.7180005", "0.7164551", "0.71060365", "0.7105198", "0.7084488", "0.70839447", "0.7081866", "0.7081547", "0.70758194", "0.7033066", "0.7007108", "0.70015234", "0.69582623", "0.6943205", "0.6926823", "0.68903023", "0.6856554...
0.6222619
87
Get the current version
public function current(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrentVersion();", "public function get_version();", "function get_version() {\n\n\t\treturn $this->version;\n\n\t}", "public function getVersion()\n {\n return $this->get(self::_VERSION);\n }", "public static function get_version() {\n return self::$version;\n }"...
[ "0.90437883", "0.8404134", "0.83468676", "0.82837486", "0.82742316", "0.8271975", "0.82634044", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82211024", "0.82078373", "0.8197135", "0.8197135", ...
0.0
-1
Add a version Mark this version as upgrade
public function add(string $version);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_version() {\n $installed = get_option( 'wd_academy_installed' );\n if ( $installed ) {\n update_option( 'wd_academy_installed', time() );\n }\n update_option( 'wd_academy_version', WD_ACADEMY_VERSION );\n }", "public function upgrade () {\r\n }", ...
[ "0.6990274", "0.6209433", "0.6165426", "0.6125037", "0.6125037", "0.60869944", "0.6077672", "0.60432667", "0.60432667", "0.60432667", "0.60432667", "0.60432667", "0.5943941", "0.5942448", "0.592736", "0.5889506", "0.5815514", "0.5784992", "0.5761434", "0.57479626", "0.5715671...
0.7515287
0
Remove a version Mark this version as downgrade
public function remove(string $version);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uninstall()\n {\n\n $this->markUninstalled();\n //or call parent::uninstall(); \n }", "function bft_remove_version() {\n\treturn '';\n}", "function pramble_remove_version(){\n\t\t\t\treturn '';\n\t\t\t}", "public function uninstall();", "public function uninstall();", ...
[ "0.65213996", "0.6320239", "0.6307188", "0.62853426", "0.62853426", "0.61895514", "0.6139495", "0.613305", "0.60173833", "0.60069394", "0.6003697", "0.598573", "0.5975026", "0.59682363", "0.59232265", "0.5914587", "0.59127164", "0.59127164", "0.591234", "0.58904654", "0.58347...
0.710458
0
var_dump($info); // 3 time 2 conten 1 link
function trim_tags($info) { $i=0; while(!empty($info[$i])) { $info[$i]=strip_tags($info[$i]); $i++; } return $info; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _info($info){\r\n return array('title'=>$info->full, 'block'=>false);\r\n }", "private function _cookData($info) {\n\t\tif(!$info['name']) $this->output(-1, '名称不能为空.'); \n\t\tif(!$info['link']) $this->output(-1, '链接地址不能为空.');\n\t\tif (strpos($info['link'], 'http://') === false || !strpo...
[ "0.6464066", "0.63086647", "0.6006124", "0.59366935", "0.59366935", "0.5900763", "0.5898716", "0.5882892", "0.5796309", "0.57669276", "0.57669276", "0.56352776", "0.56352776", "0.5626746", "0.5611039", "0.5594135", "0.5594135", "0.55764484", "0.5569591", "0.5564778", "0.55632...
0.0
-1
checks if already login
final protected function is_con() { if (isset($this->con)) { if ($this->is_user($this->con)) return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_l...
[ "0.78095543", "0.77635115", "0.77577263", "0.7744806", "0.7705954", "0.7689055", "0.76341856", "0.7613597", "0.7595479", "0.7594596", "0.7571729", "0.75381124", "0.7531579", "0.7519837", "0.7514515", "0.750842", "0.7504872", "0.7501331", "0.7491394", "0.74634683", "0.7451499"...
0.0
-1
check if db exists
final protected function is_db($user, $db) { if (is_dir("{$this->dir}$user/$db")) return TRUE; return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function dbExists($dbName);", "function check_db(){\n if( ! $this->database_exists() ){\n $this->create_table();\n }\n }", "public function checkDatabaseExists(): bool\n {\n $query = QueryBuilder::new($this->poolName, null, null);\n\n return $query->fr...
[ "0.8071124", "0.8057389", "0.80493265", "0.7945374", "0.78990406", "0.7841673", "0.77765775", "0.76341677", "0.7480693", "0.7471454", "0.7464454", "0.7442493", "0.74001086", "0.72118217", "0.7202218", "0.71967053", "0.70845675", "0.7070614", "0.7022478", "0.7017249", "0.70151...
0.60979885
71
login to db account
final public function con($user, $pass) { if ($this->is_user($user)) { $psk = $this->user('pass', $user); if ($this->pass($pass) == $psk) { $this->con = $user; return TRUE; } } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function login();", "public function login();", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssal...
[ "0.7537801", "0.7537801", "0.7462503", "0.7401626", "0.73946124", "0.73694056", "0.73537606", "0.73208535", "0.7241316", "0.7185673", "0.71598434", "0.71381915", "0.7136423", "0.7135368", "0.7083118", "0.7066597", "0.70348495", "0.70026225", "0.6999759", "0.69744194", "0.6956...
0.0
-1
Set db & tb
final public function db($db) { //select db $this->db = $db; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_db(){\r\n\t\t$this->db=$this->db;\r\n\t}", "public function SetFromDB($db){\r\n\t\t$this->db=$db;\r\n\t}", "protected function setDatabaseObj($db)\r\n {\r\n $this->db = $db;\r\n }", "function set_db($db) {\n $this->db = $db;\n }", "public function setDb($db)\n {\n $this->d...
[ "0.7567747", "0.75304693", "0.74770844", "0.74740404", "0.7282767", "0.7239168", "0.71514726", "0.691253", "0.6906605", "0.6788068", "0.6696597", "0.6696597", "0.6696597", "0.6696597", "0.6696597", "0.66729283", "0.6529897", "0.6520907", "0.6519529", "0.6464887", "0.6447872",...
0.74820095
2
select db and tb
final public function select($db, $tb) { $this->db = $db; $this->tb = $tb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function select_db($dbname);", "public function pick_db($db)\n\t\t{\t$this->db = $db\n\t\t}", "public function selectDb($dbName) {}", "public function select($db, $dbh = \\null)\n {\n }", "public function sql_select_db() {}", "public function sql_select_db() {}", "publi...
[ "0.6528299", "0.6523396", "0.6441326", "0.6288948", "0.62825274", "0.6281867", "0.62785035", "0.6225119", "0.61457175", "0.61379474", "0.6058814", "0.60488206", "0.6018403", "0.6014407", "0.59870315", "0.5964312", "0.5956833", "0.59456414", "0.5869428", "0.58607244", "0.57583...
0.7610733
0
debug rows fetch time
final public function fetch_time() { $r = ''; $t = self::ms(); foreach ($this->users('list') as $user) { if (is_dir($this->dir . $user)) { $p = "{$this->dir}$user/"; $dbs = self::_scandir($p); foreach ($dbs as $db) { $tbs = self::_scandir($db); foreach ($tbs as $file) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function query_info()\r\n\t\t{\r\n\t\t\techo \"<u>Your Previous Query Consisted of:</u><br>\";\r\n\t\t\techo \"SQL = '\".$this->last_query[\"sql\"].\"'<br>\";\r\n\t\t\t$temp = ($this->last_query[\"end_time\"] - $this->last_query[\"start_time\"]);\r\n\t\t\t$temp *= 1000;\r\n\t\t\t$temp = number_format($temp, 3);\r\...
[ "0.62679994", "0.62127143", "0.6131634", "0.5958104", "0.58897465", "0.5880127", "0.58050627", "0.57809615", "0.57614666", "0.56341356", "0.546342", "0.5461449", "0.5458789", "0.54526335", "0.5442443", "0.54390275", "0.5380271", "0.5348849", "0.5335372", "0.5319384", "0.53098...
0.53150696
20
Return an instance of DOMDocument constructed with the property of results
protected function getDom() { if (! isset($this->dom)) { $dom = new DOMDocument(); if (is_null($this->getResults())) { throw new \RuntimeException('There doesnt appear to be any results to load'); } // suppress warning but throw Exception ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function createDomDocument()\n {\n $document = new DOMDocument('1.0', 'utf-8');\n $document->preserveWhiteSpace = false;\n $document->formatOutput = true;\n\n return $document;\n }", "private static function createDomDocument()\n {\n $document = new DOMD...
[ "0.6937923", "0.6937923", "0.68195045", "0.67717385", "0.66584253", "0.659529", "0.65547985", "0.6502658", "0.64987546", "0.6346673", "0.6260541", "0.61434364", "0.6108336", "0.6086359", "0.6032171", "0.6025498", "0.59359473", "0.58533907", "0.5848541", "0.58449787", "0.58419...
0.7134096
0
Return the DOMNodeList containing the result class instances
protected function getDomList() { if (! isset($this->domList)) { $this->domList = $this->getXPath($this->getDom())->query($this->getDomListQuery()); } return $this->domList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNodeList($query,$doc)\n {\n $finder= new \\DomXPath($doc);\n $links = $finder->query($query);\n\n\n return $links;\n }", "public function getIterator()\n {\n $elements = new NodeList();\n if ($this->node->hasChildNodes()) {\n foreach ($thi...
[ "0.66843086", "0.6507952", "0.65048516", "0.6271274", "0.6243193", "0.6241497", "0.6188414", "0.61618453", "0.6158531", "0.6113553", "0.60674095", "0.6043164", "0.59769255", "0.5928247", "0.592632", "0.59245837", "0.5914295", "0.5862952", "0.5844102", "0.5840606", "0.58309174...
0.59058565
17
Return the XPath query string used to retrieved result class DOMNodes Template method. Calls for domListQuery which should be defined in subclasses from the DOMDocument
protected function getDomListQuery() { return $this->domListQuery; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createQuery() {\n return new XML\\DOM();\n }", "private function generateXpathQuery() {\n $parentElementClass = trim(Settings::get(\"main_class\"), \".\");\n $excludeProcessingClass = trim(Settings::get(\"exclude_class\"), \".\");\n\n $xQuery = \"\";\n ...
[ "0.6341028", "0.6320869", "0.58280796", "0.56859773", "0.56746715", "0.565675", "0.55895334", "0.54552805", "0.54449564", "0.5404445", "0.5340602", "0.5239214", "0.521587", "0.5182041", "0.517856", "0.5127131", "0.5105987", "0.5102869", "0.5070465", "0.5064086", "0.50508446",...
0.66692346
0
Return an instance of DOMXPath used to query the DOMDocument for artists
protected function getXPath(DOMDocument $dom) { if (! isset($this->domXPath)) { $this->domXPath = new DOMXPath($dom); $namespaceURI = $dom->lookupNamespaceUri($dom->namespaceURI); $this->domXPath->registerNamespace('ns', $namespaceURI); } return $this->dom...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFeaturedArtists($dom) {\n $feat = $dom->find('div.featured_artists',0);\n $artists = array();\n if ($feat != NULL && sizeof($feat) > 0) {\n foreach($feat->find('a') as $artist) {\n $artists[] = $artist->plaintext;\n }\n }\n return $artists;\n}", "function getFeaturedArtists($dom) {\n ...
[ "0.6101178", "0.6101178", "0.5781148", "0.55694723", "0.55139494", "0.54378265", "0.5398617", "0.53082967", "0.5256358", "0.5223148", "0.5125037", "0.51056504", "0.5068042", "0.5053697", "0.49494913", "0.49415228", "0.4939657", "0.49089053", "0.4896367", "0.48772585", "0.4874...
0.43600884
57
Iterator interface Lazy load an instance of result class using data from the DOMDocument
public function current() { if (! $this->getStorage()->offsetExists($this->position)) { $adapter = $this->getFactory()->getResultAdapter($this->resultAdapter, $this->getDomList()->item($this->position)); $resultClass = $this->getResultClass(); $result = new $resultClass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIterator() {}", "public function getIterator() {}", "abstract public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public functio...
[ "0.65932065", "0.65932065", "0.6559098", "0.64023924", "0.64023924", "0.64023924", "0.64023924", "0.64023924", "0.64023924", "0.6208165", "0.61536837", "0.61131763", "0.6083572", "0.598146", "0.598146", "0.59315294", "0.5921017", "0.584694", "0.5814333", "0.5810584", "0.57652...
0.0
-1
SplFixedArray instance lazy loaded used to store result class instances
protected function getStorage() { if (! isset($this->storage)) { $this->storage = new SplFixedArray($this->getDomList()->length); } return $this->storage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __constructor() {\n $arr = array();\n }", "protected function initializeResultArray() {}", "public abstract function FetchArray();", "public function getInternalArray() {}", "#[Pure]\nfunction spl_classes(): array {}", "public function __invoke() : array;", "public function __invoke() : ar...
[ "0.6181477", "0.5976668", "0.58095276", "0.5759732", "0.56752026", "0.5482036", "0.5482036", "0.5426325", "0.5426325", "0.5395693", "0.5376134", "0.5332684", "0.533219", "0.53218246", "0.5308685", "0.5301731", "0.52830416", "0.5245325", "0.5212397", "0.520137", "0.517126", ...
0.5035046
36
Return the total number of records that can be retrieved from the web service
public function getCount() { if (! isset($this->count)) { $this->count = (int)$this->getXPath($this->getDom())->query($this->getCountQuery())->item(0)->value; } return $this->count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumberOfRecords() {}", "public function getTotalNumberOfResults();", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function count(){\n\t\t$this->initRecordSet();\n\t\treturn $this->recordSetSize;\n\t}", "public fun...
[ "0.79170746", "0.7713301", "0.7666421", "0.7666421", "0.7666421", "0.7606588", "0.75759774", "0.7509158", "0.74404985", "0.74404985", "0.7437769", "0.7436009", "0.73814195", "0.73646903", "0.73494375", "0.7339666", "0.73304313", "0.73103654", "0.72928804", "0.7265972", "0.725...
0.0
-1
Return a DateTime instance containing the created attribute of the DOMDocument as returned from the web service
public function getCreated() { if (! isset($this->created)) { $this->created = new DateTime($this->getXPath($this->getDom())->query($this->getCreatedQuery())->item(0)->value); } return $this->created; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDate()\n {\n $yearconst = $this->getValue(self::XPATH_YEAR);\n $monthconst = $this->getValue(self::XPATH_MONTH);\n $dayconst = $this->getValue(self::XPATH_DAY);\n\n return $this->formateDate($yearconst, $monthconst, $dayconst);\n }", "public function getDateCr...
[ "0.67757446", "0.6628347", "0.6293689", "0.6265451", "0.6250675", "0.6211613", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6135572", "0.61332995", "0.610985", "0.61069834", "0.60814273", "0.60775733", "0.6069899",...
0.747618
0
Return the current offset of the ResultSet
public function getOffset() { if (! isset($this->offset)) { $this->offset = (int)$this->getXPath($this->getDom())->query($this->getOffsetQuery())->item(0)->value; } return $this->offset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOffset() {\n return ($this->getCurrentPage() - 1) * $this->getItemCountPerPage();\n }", "public function getOffset()\r\n {\r\n return ( $this->_pageno - 1 ) * $this->_size;\r\n }", "public function getOffset(): int\n {\n return $this->pageIndex * $this->p...
[ "0.69773555", "0.6975567", "0.69649476", "0.6918436", "0.691747", "0.691747", "0.691747", "0.691747", "0.691747", "0.691747", "0.691747", "0.69173574", "0.69108844", "0.6892964", "0.68809545", "0.6861695", "0.6857015", "0.684248", "0.6799939", "0.6772319", "0.6760056", "0.6...
0.63970184
38
Return the DOMXPath query string used to retrieve the count property Template method makes a call for countQuery which should be defined in child classes
protected function getCountQuery() { return $this->countQuery; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQueryCount();", "public function getCount()\n {\n if (! isset($this->count)) {\n $this->count = (int)$this->getXPath($this->getDom())->query($this->getCountQuery())->item(0)->value;\n }\n return $this->count;\n }", "protected function getCountQuery() {\n...
[ "0.70860034", "0.7040847", "0.68870026", "0.66634125", "0.66634125", "0.6563482", "0.65615094", "0.65447056", "0.6509023", "0.6440495", "0.64239275", "0.63964486", "0.6371591", "0.63208205", "0.626881", "0.62432486", "0.6219097", "0.6209044", "0.62007105", "0.61886984", "0.61...
0.66230947
5
Return the created query string
protected function getCreatedQuery() { return $this->createdQuery; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildQueryString();", "private function getQueryString() : string\n {\n return http_build_query($this->parameters);\n }", "private function buildQueryString(){\n if(count($this->querystrings) == 0){\n return \"\";\n }\n else{\n $querystring = \"?\";\n\n fore...
[ "0.8486032", "0.83059835", "0.82622045", "0.8206356", "0.7896433", "0.78858966", "0.7879279", "0.7803028", "0.76436317", "0.7561787", "0.7487146", "0.7427527", "0.7347393", "0.732192", "0.7280378", "0.72541714", "0.7209148", "0.72008973", "0.7198477", "0.71890926", "0.7183162...
0.0
-1
Return the DOMXPath query string use to retrieve the ResultSet offset property
protected function getOffsetQuery() { return $this->offsetQuery; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function offsetGet($offset) \n\t{\n if($this->doc && $this->doc[$offset]->length > 0) return $this->doc[$offset];\n\t\telse return phpQuery::newDocument();\n }", "public function getOffset()\n {\n if (! isset($this->offset)) {\n $this->offset = (int)$this->getXPath($this->ge...
[ "0.5891331", "0.5858565", "0.57634467", "0.5634551", "0.5543583", "0.54944134", "0.54081166", "0.53653616", "0.53576374", "0.529386", "0.52843153", "0.518309", "0.5145246", "0.5143747", "0.5102981", "0.507216", "0.5064272", "0.500201", "0.4991872", "0.49641213", "0.4947015", ...
0.62557465
0
Iterator interface Return the key of the current element
public function key() { return $this->position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function key()\n {\n return $this->keys[$this->iterator];\n }", "public function key() {\n return $this->iteratorKeys[$this->iteratorPosition];\n }", "public function key() {\n return $this->iterator->key();\n }", "public function key()\n {\n return $this->it...
[ "0.8365543", "0.81145465", "0.80971843", "0.80922234", "0.8071163", "0.7988697", "0.7977895", "0.77580243", "0.768261", "0.76709634", "0.7659252", "0.76162475", "0.7552971", "0.7539943", "0.7538684", "0.75156915", "0.73989046", "0.7397635", "0.73962885", "0.7386537", "0.73701...
0.0
-1
Iterator interface Move the pointer on
public function next() { ++$this->position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pulled(): Iterator;", "public function next()\n {\n next($this->iterator_data);\n }", "private function next()\n {\n $clone = clone $this;\n $clone->offset++;\n return $clone;\n }", "function MoveNext() {}", "public function next()\n\t{\n\t\t$this->po...
[ "0.66875094", "0.6566059", "0.647737", "0.64481926", "0.63881975", "0.63865906", "0.635427", "0.635427", "0.6288552", "0.6270714", "0.62105584", "0.6196965", "0.61843807", "0.61820096", "0.6171038", "0.6149793", "0.6147565", "0.61339134", "0.61315835", "0.6118429", "0.6098873...
0.0
-1
Iterator interface Rewind the Iterator to the first element
public function rewind() { $this->position = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rewind()\n {\n $this->iteratorIndex = 0;\n reset($this->elements);\n }", "public function rewind(){\n return reset($this->items);\n }", "public function rewind(){\n return reset($this->items);\n }", "public function rewind() {\n if ($this->started) {...
[ "0.7286333", "0.7134709", "0.7134709", "0.71255046", "0.70932555", "0.70534813", "0.7049705", "0.69625443", "0.6948683", "0.692338", "0.69060445", "0.6892027", "0.68879294", "0.685925", "0.685925", "0.6815761", "0.68082315", "0.68032897", "0.6797543", "0.6785506", "0.67839754...
0.0
-1
Iterator interface Check if the current position is valid
public function valid() { return ($this->position < $this->getDomList()->length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function valid()\n {\n return $this->iteratorIndex < $this->iteratorCount;\n }", "function valid() \n {\n return $this->offsetExists($this->position);\n }", "function valid()\n\t{\n\t\treturn $this->iterator->valid();\n\t}", "function valid() {\n return ($this->pos < $...
[ "0.80615187", "0.7653177", "0.7596732", "0.746921", "0.74253756", "0.7402071", "0.73911244", "0.7390287", "0.73853076", "0.73671395", "0.73500544", "0.73321885", "0.7323872", "0.7323307", "0.7304442", "0.72895783", "0.72806317", "0.7246018", "0.7227232", "0.7221271", "0.72117...
0.682307
48
Return an instance of XmlFactory
protected function getFactory() { if (! isset($this->factory)) { $this->factory = new \MphpMusicBrainz\Adapter\Xml\XmlFactory(); } return $this->factory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFactory()\n {\n return new Factory();\n }", "public function getFactory() {}", "public function getFactory(): Factory;", "public static function factory()\n {\n return new self;\n }", "public static function factory()\r\n {\r\n return parent::factory(...
[ "0.68133634", "0.6687715", "0.6544517", "0.65268314", "0.65139043", "0.650521", "0.64808017", "0.6466598", "0.64327395", "0.6400517", "0.63851243", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6298765", "0.6278735"...
0.84304833
0
get my gift count
public function getMyGiftCount($uid) { require_once 'Mdal/Kitchen/Gift.php'; $mdalGift = Mdal_Kitchen_Gift::getDefaultInstance(); $giftCount = $mdalGift->getMyGiftCount($uid); return $giftCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVipGiftsDrawCount()\n {\n return $this->count(self::_VIP_GIFTS_DRAW);\n }", "public function countGame() {\r\n\t\t$sql = new Sql();\r\n\t\t$result = $sql->Select(\"SELECT COUNT(*) as count FROM jogo\");\r\n\t\tif(count($result) > 0) {\r\n\t\t\t\r\n\t\t\t$count = ($result[0]['count...
[ "0.69484437", "0.66004586", "0.6551436", "0.6441765", "0.64232093", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", ...
0.6474207
3
get my gift count
public function getSendGift($id) { require_once 'Mdal/Kitchen/Gift.php'; $mdalGift = Mdal_Kitchen_Gift::getDefaultInstance(); $gift = $mdalGift->getSendGiftById($id); return $gift; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVipGiftsDrawCount()\n {\n return $this->count(self::_VIP_GIFTS_DRAW);\n }", "public function countGame() {\r\n\t\t$sql = new Sql();\r\n\t\t$result = $sql->Select(\"SELECT COUNT(*) as count FROM jogo\");\r\n\t\tif(count($result) > 0) {\r\n\t\t\t\r\n\t\t\t$count = ($result[0]['count...
[ "0.69484437", "0.66004586", "0.6551436", "0.6474207", "0.6441765", "0.64232093", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", "0.63893074", ...
0.0
-1
For internal only. DO NOT USE IT.
public function deserialize($param) { if ($param === null) { return; } if (array_key_exists("SourceRegistryId",$param) and $param["SourceRegistryId"] !== null) { $this->SourceRegistryId = $param["SourceRegistryId"]; } if (array_key_exists("Destination...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "private function __() {\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}...
[ "0.62662613", "0.6151871", "0.5989886", "0.5989886", "0.5989886", "0.5989886", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5988404", "0.5988404", "0.5949015", "0.5939596", "0.59168774", "0.59168774", "0.58703923", "0.58665824", "0.5855589"...
0.0
-1
stop if there was nothing passed
public function saveCost($cost) { if($cost == NULL) { return; } // bootstrap to doctrine require(__DIR__ . '/../../amfdoctrine/bootstrapper.php'); // map the incoming relations to their corresponding database entities $cost->event = $entityManager->merge($cost->event); // branch between creati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stop()\n {\n // nop\n }", "abstract public function stop();", "public function stop(): bool {}", "public function halt();", "function stop();", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "public function stop();", "public function stop()...
[ "0.6393736", "0.6221301", "0.6219287", "0.6200875", "0.6189588", "0.5996705", "0.5989398", "0.5989398", "0.5989398", "0.5989398", "0.5989398", "0.5989398", "0.5989398", "0.5989398", "0.59593725", "0.59484863", "0.58364403", "0.58364403", "0.58364403", "0.58364403", "0.5836440...
0.0
-1
stop if there was nothing passed
public function deleteCost($cost) { if($cost == null) { return; } // bootstrap to doctrine require(__DIR__ . '/../../amfdoctrine/bootstrapper.php'); // merge and then remove the entity $cost = $entityManager->merge($cost); $entityManager->remove($cost); $entityManager->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stop()\n {\n // nop\n }", "abstract public function stop();", "public function stop(): bool {}", "public function halt();", "function stop();", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "public function stop();", "public function stop()...
[ "0.6392024", "0.6219894", "0.621896", "0.619858", "0.61880434", "0.5994668", "0.59877455", "0.59877455", "0.59877455", "0.59877455", "0.59877455", "0.59877455", "0.59877455", "0.59877455", "0.5959243", "0.5946911", "0.5835344", "0.5835344", "0.5835344", "0.5835344", "0.583534...
0.0
-1
stop if there was nothing passed
public function deleteCostById($costId) { if($costId == null) { return; } // bootstrap to doctrine require(__DIR__ . '/../../amfdoctrine/bootstrapper.php'); // find the cost with that id $dql = "SELECT u FROM org\\fos\Cost u WHERE u.id=$costId"; $query = $entityManager->createQuery($dql); $cost...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stop()\n {\n // nop\n }", "abstract public function stop();", "public function stop(): bool {}", "public function halt();", "function stop();", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "public function stop();", "public function stop()...
[ "0.63966", "0.622462", "0.6223098", "0.62023556", "0.6193066", "0.60003823", "0.59932137", "0.59932137", "0.59932137", "0.59932137", "0.59932137", "0.59932137", "0.59932137", "0.59932137", "0.5961026", "0.595231", "0.58396536", "0.58396536", "0.58396536", "0.58396536", "0.583...
0.0
-1
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "pu...
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315...
0.0
-1
Execute the console command.
public function handle() { return (new ImportUpdateHelper())->run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() meth...
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.614841...
0.0
-1
Reads configuration from file.
public function load(string $file, ?bool $merge = true): array { if (!\is_file($file) || !\is_readable($file)) { throw new Nette\FileNotFoundException("File '$file' is missing or is not readable."); } if (isset($this->loadedFiles[$file])) { throw new Nette\InvalidSta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }", "public static function read_config_file($file)\n\t{\n\t\tif (!file_exists($file) || !is_readable($file))\n\t\t{\n\t\t\tdie('<p>The ...
[ "0.7693695", "0.7522126", "0.71778387", "0.7023153", "0.696039", "0.69184107", "0.6907205", "0.6898652", "0.68557715", "0.6849819", "0.6744687", "0.67169845", "0.6680865", "0.6662169", "0.6651001", "0.6625341", "0.65681505", "0.6479766", "0.64769423", "0.64733887", "0.641629"...
0.0
-1
Save configuration to file.
public function save(array $data, string $file): void { if (\file_put_contents($file, $this->getAdapter($file)->dump($data)) === false) { throw new Nette\IOException("Cannot write file '$file'."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n\t{\n\t\t$json = json_encode($this->config, JSON_PRETTY_PRINT);\n\n\t\tif (!$h = fopen(self::$configPath, 'w'))\n\t\t{\n\t\t\tdie('Could not open file ' . self::$configPath);\n\t\t}\n\n\t\tif (!fwrite($h, $json))\n\t\t{\n\t\t\tdie('Could not write file ' . self::$configPath);\n\t\t}\n\n\t\t...
[ "0.84284216", "0.805467", "0.7937384", "0.76394635", "0.72180074", "0.70263517", "0.6897748", "0.6877988", "0.6744627", "0.6714165", "0.665837", "0.6606072", "0.6584561", "0.6582454", "0.65759933", "0.6570675", "0.65232486", "0.64757586", "0.64744574", "0.64665115", "0.645463...
0.0
-1
Registers adapter for given file extension.
public function addAdapter(string $extension, $adapter) { $this->adapters[\strtolower($extension)] = $adapter; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addExtension(string $extension);", "protected function registerExtensions()\n {\n $this->app['extensions'] = $this->app->share(function ($app) {\n return new ExtensionBag($app['files'], $app['extensions.finder'], $app, [], $app['cache']);\n });\n\n $this->app->a...
[ "0.71013117", "0.6699939", "0.66026807", "0.63193", "0.6304821", "0.6266484", "0.62548923", "0.6127416", "0.6012452", "0.59246576", "0.58412623", "0.57505", "0.5748222", "0.5728959", "0.57103086", "0.5690304", "0.5651437", "0.5650781", "0.5650781", "0.5637284", "0.561386", ...
0.64624745
3