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; } $user_membership = wc_memberships_get_user_membership( $user_membership_id ); // It seems that the order has been deleted if ( false === get_post_status( $user_membership->get_order_id() ) ) { return null; } // It seems the subscription product has been removed from the order if ( ! WC_Subscriptions_Order::get_item_id_by_subscription_key( $subscription_key ) ) { return null; } return WC_Subscriptions_Manager::get_subscription( $subscription_key ); }
{ "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', 'nopaging' => true, 'suppress_filters' => 1, 'meta_query' => array( array( 'key' => '_subscription_key', 'value' => $subscription_key, ), ), ) ); if ( ! empty( $user_membership_ids->posts ) ) { $user_memberships = array(); foreach ( $user_membership_ids->posts as $user_membership_id ) { $user_memberships[] = wc_memberships_get_user_membership( $user_membership_id ); } } return $user_memberships; }
{ "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( $subscription['expiry_date'] ) ? $subscription['expiry_date'] : ''; break; case 'trial_end' : case 'trial_end_date' : case 'trial_expiry_date' : $date = isset( $subscription['trial_expiry_date'] ) ? $subscription['trial_expiry_date'] : ''; break; } return 'timestamp' === $format && ! empty( $date ) ? strtotime( $date ) : $date; }
{ "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]; foreach ($attributes as $column => $value) $values[] = $value[$inflector->variablize($modelValuesKey)]; $values = array($values); $conditions = SQLBuilder::createConditionsFromCameledString($table->conn, $queryKey, $values); if (isset($options['conditions']) && strlen($options['conditions'][0]) > 1) Utils::addCondition($options['conditions'], $conditions); else $options['conditions'] = $conditions; if (!empty($includes)) $options['include'] = $includes; if (!empty($options['through'])) { // save old keys as we will be reseting them below for inner join convenience $pk = $this->primaryKey; $fk = $this->foreignKey; $this->setKeys($this->getTable()->class->getName(), true); if (!isset($options['className'])) { $class = classify($options['through'], true); if (isset($this->options['namespace']) && !class_exists($class)) $class = $this->options['namespace'].'\\'.$class; $throughTable = $class::table(); } else { $class = $options['className']; $relation = $class::table()->getRelationship($options['through']); $throughTable = $relation->getTable(); } $options['joins'] = $this->constructInnerJoinSql($throughTable, true); $queryKey = $this->primaryKey[0]; // reset keys $this->primaryKey = $pk; $this->foreignKey = $fk; } $options = $this->unsetNonFinderOptions($options); $class = $this->className; $relatedModels = $class::find('all', $options); $usedModels = array(); $modelValuesKey = $inflector->variablize($modelValuesKey); $queryKey = $inflector->variablize($queryKey); foreach ($models as $model) { $matches = 0; $keyToMatch = $model->$modelValuesKey; foreach ($relatedModels as $related) { if ($related->$queryKey == $keyToMatch) { $hash = spl_object_hash($related); if (in_array($hash, $usedModels)) $model->setRelationshipFromEagerLoad(clone($related), $this->attributeName); else $model->setRelationshipFromEagerLoad($related, $this->attributeName); $usedModels[] = $hash; $matches++; } } if (0 === $matches) $model->setRelationshipFromEagerLoad(null, $this->attributeName); } }
{ "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 = Table::load($this->className); $joinTableName = $joinTable->getFullyQualifiedTableName(); $fromTableName = $fromTable->getFullyQualifiedTableName(); } // need to flip the logic when the key is on the other table if ($this instanceof HasMany || $this instanceof HasOne) { $this->setKeys($fromTable->class->getName()); if ($usingThrough) { $foreignKey = $this->primaryKey[0]; $joinPrimaryKey = $this->foreignKey[0]; } else { $joinPrimaryKey = $this->foreignKey[0]; $foreignKey = $this->primaryKey[0]; } } else { $foreignKey = $this->foreignKey[0]; $joinPrimaryKey = $this->primaryKey[0]; } if (!is_null($alias)) { $aliasedJoinTableName = $alias = $this->getTable()->conn->quoteName($alias); $alias .= ' '; } else $aliasedJoinTableName = $joinTableName; return "INNER JOIN $joinTableName {$alias}ON($fromTableName.$foreignKey = $aliasedJoinTableName.$joinPrimaryKey)"; }
{ "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->username = $apiConfiguration['username']; $this->password = $apiConfiguration['password']; if ('' !== trim($apiConfiguration['baseUrl'])) { $this->baseUrl = $apiConfiguration['baseUrl']; } }
{ "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, CURLAUTH_ANY); if ($this->debug) { echo "Fetch: " . $url; } $result = curl_exec($ch); curl_close($ch); if ($this->debug) { echo "Fetch-Result: " . $result; } return $result; }
{ "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; } } else { $params[] = 'filter[' . $key . ']=' . $value; } } } if ($orderby) { $params[] = 'orderby=' . $orderby; } $params[] = 'ordertype=' . $ordertype; if ($offset) { $params[] = 'offset=' . $offset; } if ($limit) { $params[] = 'limit=' . $limit; } try { return new SimpleXMLElement($this->loadData('/objekt/list?' . implode('&', $params))); } catch (Exception $e) { $msg = sprintf('%s. Please check the filter query parameters. Additionally, you should check the filter defaults in your TypoScript setup! Current filter string: %s', $e->getMessage(), implode('&', $params) ); throw new Tx_Extbase_Exception($msg, $e->getCode()); } }
{ "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('DetailCutiId,CutiId,TglCuti,IsAllocate,Keterangan') ->from($this->cms_complete_table_name('formcutidetail')) ->where('CutiId', $primary_key) ->get(); $result = $query->result_array(); // add "hobby" to $result // get options $options = array(); $options['CutiId'] = array(); // get options $options = array(); $options['IsAllocate'] = array(); $query = $this->db->select('IsAllocate,active_name') ->from($this->cms_complete_table_name('active')) ->get(); foreach($query->result() as $row){ $options['IsAllocate'][] = array('value' => $row->IsAllocate, 'caption' => $row->active_name); } $data = array( 'result' => $result, 'options' => $options, 'date_format' => $date_format, ); return $this->load->view($this->cms_module_path().'/field_cuti_detail',$data, TRUE); }
{ "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(); foreach ($query->result() as $rown){ return $rown->Nama."<input type='hidden' maxlength='50' value='".$rown->NIK."' name='FormCutiNIK'>"; } }
{ "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' ) ); } //if child category if($this_category->category_parent) { $parent_cat = get_category($this_category->category_parent); //check for third-level cat if($parent_cat->category_parent){ $parent_parent = get_category($parent_cat->category_parent); echo '<h2><a href="'. get_category_link($parent_parent->cat_ID) .'">'. $parent_parent->name .'</a></h2>'; echo '<ul>'; $categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$parent_cat->category_parent."&orderby=slug&hide_empty=0&exclude=1649"); echo '</ul>'; if ($parent_parent->name == "Apps"){ echo '<p>&nbsp;</p>'; echo '<h2>Platforms</h2>'; echo '<ul>'; $platforms = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649'); echo '</ul>'; } }else{ echo '<h2><a href="'. get_category_link($parent_cat->cat_ID) .'">'. $parent_cat->name .'</a></h2>'; echo '<ul>'; $categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$this_category->category_parent."&orderby=slug&hide_empty=0&exclude=1649"); echo '</ul>'; if ($parent_cat->name == "Apps"){ echo '<p>&nbsp;</p>'; echo '<h2>Platforms</h2>'; echo '<ul>'; $platforms = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649'); echo '</ul>'; } } }else{ //if top-level category echo '<h2>'. $this_category->name .'</h2>'; echo '<ul>'; $categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$this_category->cat_ID."&orderby=slug&hide_empty=0&exclude=1649"); echo '</ul>'; if ($this_category->name == "Apps"){ echo '<p>&nbsp;</p>'; echo '<h2>Platforms</h2>'; echo '<ul>'; $platforms = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649'); echo '</ul>'; } } echo '<p>&nbsp;</p>'; ?> </div> <div id="content" class="grid col-700 fit"> <!-- <div class="select-post-sorting"></div> --> <?php $cat = get_query_var('cat'); $category_info = get_category($cat); //echo 'Is first level? = '. $category_info->parent; $parent_info = get_category($category_info->parent); //echo 'Is second level? = '. $parent_info->parent; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; //pagination //$ext_query = '&meta_key=wpcf-pubdate&orderby=meta_value_num&posts_per_page=25&paged='.$paged.''; $sort_meta_key = 0; //init //get sort information from query vars or defaults $sort_orderby = (get_query_var('orderby')) ? get_query_var('orderby') : 'pubdate'; $sort_order = (get_query_var('order')) ? get_query_var('order') : 'DESC'; $sort_posts_per_page = (get_query_var('ppp')) ? get_query_var('ppp') : '25'; if($sort_orderby =='pubdate'){ $sort_orderby = 'meta_value_num'; $sort_meta_key = 'wpcf-pubdate'; } $ext_query = array( 'post_type'=>'products', 'category_name'=>$category_info->slug, 'meta_key'=>'wpcf-pubdate', 'orderby'=>'meta_value_num', 'order'=>'DESC', 'posts_per_page'=>'25', 'tag'=>'listed', 'paged'=>$paged ); if($sort_meta_key){ $ext_query['meta_key'] = $sort_meta_key; } $title_qual = ""; //query_posts($query_string . $ext_query ); global $wp_query; //show only main product of groups, if product-group-parent field is populated, hide the post //edit: needs refinement - only for Bibles, and needs to compare non-existent OR blank // modified 3/18/14 to use custom SQL searching indexed taxonomy instead of custom field $newQuery = $ext_query; //$newQuery = array_replace($wp_query->query_vars, $ext_query);// + $p_groups; //changed for WP 4.0 something in WP_Query changed, found 0 posts //var_dump($newQuery); $books_in_cat = new WP_Query($newQuery); //echo '<br/>#posts: '.$books_in_cat->found_posts; //troubleshooting if ($books_in_cat->have_posts()) : ?> <div> <div class="product-category product-list"> <h2><?php echo $title_qual; ?><?php single_cat_title(); ?> </h2> <ul> <?php while ($books_in_cat->have_posts()) : $books_in_cat->the_post(); ?> <li id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php bh_thumbnail(get_the_ID(),'medium',true); $product_title = get_the_title(); //init $pg_names = array(); //init if (has_term('listed','post_tag')){ $pg_names = wp_get_post_terms(get_the_ID(),'product-group',array('fields'=>'names')); if (!empty($pg_names)){ $product_title = reset($pg_names);//change to product group title } $pg_names = array(); //re-initalize array } $short_title = wp_trim_words($product_title,8); ?> <a href="<?php the_permalink(); ?>"><?php echo $short_title; ?></a> <?php $pubdate = get_post_meta(get_the_ID(),'wpcf-pubdate',true); //turn pubdate into Month Year //modify product list display //if title is too long, don't show subtitle/authors if(strlen(get_the_title())<32){ //get current category or parent category //get category if($parent_info){ //if child category $current_cat = $parent_info->slug; }else{ $current_cat = $category_info->slug; } //ge t subtitle $p_subtitle = types_render_field('subtitle', array("raw"=>"true")); //if Bibles or Reference, show subtitle //echo $current_cat; if($current_cat =='bibles' || $current_cat == 'reference' || $category_info->slug == 'commentaries' ): ?> <span class="author-names"><?php echo $p_subtitle ?></span> <?php else: //else show author(s) //get author name(s) $a_list=false; $a_terms = wp_get_post_terms(get_the_ID(), 'a', array("fields" => "names")); if($a_terms){ $a_list = implode(', ', $a_terms); } if($a_list){ ?> <span class="author-names"><?php echo $a_list; ?></span> <?php }elseif ($p_subtitle){ //no authors (?) - show subtitle if exists ?> <span class="author-names"><?php echo $p_subtitle; ?></span> <?php } endif; }else{ //title too long, no room for other text } ?> </li><!-- end of #post-<?php the_ID(); ?> --> <?php endwhile; if(!$hide_navi){ if(function_exists('wp_pagenavi')) { wp_pagenavi( array( 'query' =>$books_in_cat ) ); } } ?> </ul> </div> <?php else : ?> <!-- <h1 class="title-404"><?php _e('404 &#8212; Fancy meeting you here!', 'minimum'); ?></h1> --> <p><?php _e('No products found in '. $parent_info->name.' > '. single_cat_title('',false) .'.', 'minimum'); ?></p> <!-- <h6><?php printf( __('You can return %s or search for the page you were looking for.', 'minimum'), sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', esc_url( get_home_url() ), esc_attr__('Home', 'minimum'), esc_attr__('&larr; Home', 'minimum') )); ?></h6> <?php get_search_form(); ?> --> <?php endif; ?> </div><!-- end of #content --> </div> </div> <?php }
{ "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><option value="az">Product Title, A-Z</option><option value="za">Product Title, Z-A</option></select> Quantity: <select name="posts_number" class="posts_number"><option value="10">10</option><option value="15">15</option><option value="20">20</option><option value="25" selected>25</option><option value="50">50</option></select></form>' ); //collect dropdown data $jq('.select-post-sorting select').on('change',function(){ //get value from each box $sortby = $jq('.posts_sort').val(); $number = $jq('.posts_number').val(); var loc = String(window.location); $link = loc.substring(0,(loc.lastIndexOf('/')+1)); switch($sortby){ case 'oldest': o = '?orderby=pubdate&order=ASC'; break; case 'az': o = '?orderby=title&order=ASC'; break; case 'za': o = '?orderby=title&order=DESC'; break; default: //newest o = '?orderby=pubdate&order=DESC'; } if($number){ n='&ppp='+$number; }else{ n='&ppp=25'; //default 25 } $link = $link + o + n; //v1 - load new page in div $plist = $jq('.product-category.product-list'); $plist.fadeOut(300,function(){ $jq(this).load($link + ' .product-category.product-list',function(){ $plist.fadeIn(500); // update page url/hash if($link!=window.location){ //window.history.pushState({path:$link},'',$link); } // if new url doesn't match current location }); //end load }); //end fade }); //end jq </script> <?php //v2 - use admin-ajax }
{ "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 preferences apply).'; } $rc = abl_droploader_enable($event, $step); break; case 'installed': // install resources: css, js $rc = abl_droploader_install($event, $step); break; case 'disabled': return ''; break; case 'deleted': // remove prefs, textpacks and other resources $rc = abl_droploader_uninstall($event, $step); break; } if ($rc == E_ERROR) { $msg = '<strong>An error occurred. Please check the servers error-log.</strong>'; } elseif ($rc == E_WARNING || $rc == E_NOTICE) { $msg = '<em>abl_droploader</em> successfully ' . $step . '. Please check the servers error-log.'; } else { $msg = '<em>abl_droploader</em> successfully ' . $step . '.'; } $msg .= ($msg1 != '') ? ' ' . $msg1 : ''; return $msg; }
{ "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') . " &#8250; abl_droploader", $msg); $default_prefs = abl_droploader_defaults(); $html = '<table id="list" align="center" border="0" cellpadding="3" cellspacing="0"> <thead> <tr> <th colspan="2"><h1>DropLoader default preferences</h1></th> </tr> <tr> <th>Option</th> <th>Value</th> </tr> </thead> <tbody> '; foreach ($default_prefs as $key => $pref) { $html .= '<tr> <td>' . htmlspecialchars($pref['text']) . '</td> <td>' . htmlspecialchars($pref['val']) . '</td> </tr> '; } $html .= '</tbody> </table> '; echo $html; return false; } }
{ "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' => gTxt('abl_droploader_prefs_reload_image_tab'), ), 'useDefaultStylesheet' => array( 'val' => '1', 'html' => 'yesnoradio', 'text' => gTxt('abl_droploader_prefs_use_default_stylesheet'), ), 'customStylesheet' => array( 'val' => '', 'html' => 'text_input', 'text' => gTxt('abl_droploader_prefs_custom_stylesheet'), ), 'articleImageFields' => array( 'val' => '#article-image', 'html' => 'text_input', 'text' => gTxt('abl_droploader_prefs_article_image_fields'), ), //'fileMaxUploadCount' => array( // 'val' => '10', // 'html' => 'text_input', // 'text' => gTxt('abl_droploader_prefs_file_max_upload_count'), //), ); if ($values_only) foreach ($defaults as $name => $arr) $defaults[$name] = $arr['val']; return $defaults; }
{ "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'] = 'Ym9keSB7CglvdmVyZmxvdy14OiBoaWRkZW47CglvdmVyZmxvdy15OiBzY3JvbGw7Cn0KLyogaW1h Z2UgbGlzdCAqLwovKiNpbWFnZV9jb250cm9sIC5hYmwtZHJvcGxvYWRlci1vcGVuIHsKCWZsb2F0 OiByaWdodDsKCW1hcmdpbi1yaWdodDogMWVtOwoJZm9udDogMWVtIFZlcmRhbmEsIEFyaWFsLCBz YW5zLXNlcmlmOwoJZm9udC13ZWlnaHQ6IGJvbGQ7Cn0qLwoKI2FibC1kcm9wbG9hZGVyLWNsb3Nl IHsKCWRpc3BsYXk6IGJsb2NrOwoJcG9zaXRp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ocCkse83qc0dFuvHk6OklDxDYfTt4KA/csOQkalHjPLJkuk3EEH/9Q8np33TZlUiHam0ZoRE UFj4Gn94qeuPQWTGSaT+wQgGzhTH3szLintKNunJ3sYBqsrMe65aMiNZRYZZ9wazlyO4cibV SZWCqGd9HvmZS7WBMR27r3n231QDMy/QowK/QPPllplw0J4bk1cQiDAP2af8RjZnIVl+/XFX xzoTv+4nM5qFE/SWZzEORtu2LStcEmNRxAuJx7Itek8HS4eXvOt+eu3R3SuivErX3QWm8m++ NTcFZn7RgbZQckLdloVumog7r+JyZcvwi279MEAByaoc7MD6fbed99marVlZ/dl83jaV5ddz VCJQLecgGiVbd+fyhfXx7yyPnW/5rRUNCXzK3NCg3U6ttxmfVRy1qyMnVEJo9Td1vZc/VPOq dVMta2pcr36YJTJBn1SljCdzOr/RaxSOGx3vYH6p4TVInzMGqZuvxDRdyEqj2TKlcWJzmP2f e8EzRVH7pc7kd/124L/6mbFtvds+u9bpdpxfh2jj8Arq1ummWtffgc3rvYsOUcqZsLOYtV+U fPTN1DwR1/i6b6NX9T/qMv1Gb5+kHQHeYvt+9Vj/GQQ4rPagIYuMH6uJgs2ZTlId1+lfJbjL PsFL44KPPzTbnzH8cYL0lfbpy/88JX7y6qb+1q5T8wA3SWwVEJ2SxiT2aDIx6tNhq37Qpx9u 0XEiw6ZtiiPNVoaekrD7oV/l+QWRP3a61wG/6KE6r/4NQR0sVpL/RAkmuLFcGZHdhNGCied5 zPdkgA35Q5jczGbuoUL/KkvEVPqqFwGPhiUrwgiLFnvpqL5m6GbVVfKEmdrqbZLJJ/pZgTBq GP3WQ7/1IsjwoprNjP5JrH4RgsK8HQY6yyPA/wBgnJmDIy0AAA=='; } foreach($resources as $file => $resource) { $newfile = $path . $file; if (is_array($resource)) { abl_droploader_install($event, $step, $resource, $newfile . '/'); } else { $ok = is_dir(dirname($newfile)); if (!$ok) { $ok = mkdir(dirname($newfile), 0755, true); } if ($ok) { $temp = base64_decode($resource); if (strncmp($temp, "\x1F\x8B", 2) === 0) { $temp = gzinflate(substr($temp, 10)); } if (file_exists($newfile)) unlink($newfile); $handle = fopen($newfile, 'w'); if ($handle !== false) { fwrite($handle, $temp); chmod($newfile, 0644); fclose($handle); } else { $state = E_ERROR; error_log('abl_droploader: ERROR: Creating file \'' . $newfile . '\' failed.'); } } else { $state = E_ERROR; error_log('abl_droploader: ERROR: Creating directory \'' . dirname($newfile) . '\' failed.'); } } } return $state; }
{ "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 entries if (!safe_delete('txp_lang', "name LIKE 'abl_droploader%'")) { if ($state == 0) $state = E_WARNING; error_log('abl_droploader: WARNING: Removal of obsolete textpack entries failed.'); } // remove css, javascript, etc. $path = $prefs['path_to_site']; $resources = array( '/res/css/abl.droploader-app.css', '/res/js/abl.droploader-app.js', '/res/js/jquery.droploader.js', '/res/js/jquery.filedrop.js', '/res/css/', '/res/js/', '/res/', ); foreach ($resources as $res) { $f = $path . $res; if (is_dir($f)) { if (!rmdir($f)) { if ($state == 0 or $state == E_NOTICE) $state = E_WARNING; error_log('abl_droploader: WARNING: Cannot remove directory \'' . $f . '\'.'); } } elseif (is_file($f)) { if (!unlink($f)) { if ($state == 0 or $state == E_NOTICE) $state = E_WARNING; error_log('abl_droploader: WARNING: Cannot remove file \'' . $f . '\'.'); } } } return $state; }
{ "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'))))) { $abl_droploader_prefs = abl_droploader_load_prefs(); $css = ''; if (intval($abl_droploader_prefs['useDefaultStylesheet']) != 0) { $css .= '<link rel="stylesheet" href="../res/css/abl.droploader-app.css" type="text/css" media="screen,projection" />' . n; } if ($abl_droploader_prefs['customStylesheet'] != '') { $css .= '<link rel="stylesheet" href="' . $abl_droploader_prefs['customStylesheet'] . '" type="text/css" media="screen,projection" />' . n; } if ($css == '') { $css = '<link rel="stylesheet" href="../res/css/abl.droploader-app.css" type="text/css" media="screen,projection" />' . n; } $article_image_field_ids = '"' . implode('", "', explode(',', $abl_droploader_prefs['articleImageFields'])) . '"'; $script = '<script type="text/javascript"> var file_max_upload_size = ' . sprintf('%F', (intval($prefs['file_max_upload_size']) / 1048576)) . '; var file_max_files = 5; var image_max_upload_size = 1; var image_max_files = ' . intval($abl_droploader_prefs['imageMaxUploadCount']) . '; var reload_image_tab = ' . intval($abl_droploader_prefs['reloadImagesTab']) . '; var article_image_field_ids = new Array(' . $article_image_field_ids . '); var article_image_field = null; </script> <script src="../res/js/jquery.filedrop.js" type="text/javascript"></script> <script src="../res/js/jquery.droploader.js" type="text/javascript"></script> <script src="../res/js/abl.droploader-app.js" type="text/javascript"></script>' . n; echo $css . $script; } }
{ "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')) { // new in txp 4.6 return $data.wrapRegion('abl_droploader_group', $content, 'abl_droploader_link', 'upload', 'article_abl_droploader'); } else { return $data.' <div id="abl_droploader_group"><h3 class="plain lever"><a href="#abl_droploader-link">' . gTxt('upload') . '</a></h3> <div id="abl_droploader-link" class="toggle" style="display:none">' . $content . ' </div> </div> '; } }
{ "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="abl-droploader-image-cat-sel" class="category"')); //$alt_caption = tag('<label for="alt-text">'.gTxt('alt_text').'</label>'.br. // fInput('text', 'alt', '', 'edit', '', '', 50, '', 'alt-text'), 'div', ' class="alt text"'). // tag('<label for="caption">'.gTxt('caption').'</label>'.br. // '<textarea id="caption" name="caption"></textarea>' // , 'div', ' class="caption description text"'); $image_categories_select = str_ireplace("\n", '', tag(tag('<label for="image-category">'.gTxt('image_category').'</label>'.br. treeSelectInput('category', $image_categories, '', 'image-category'), 'div', ' class="category"'), 'div', ' id="abl-droploader-image-cat-sel"')); return $image_categories_select; }
{ "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' => '', 'all_files_uploaded' => '', 'no_files_uploaded' => '', 'some_files_uploaded' => '', ); foreach ($l10n as $k => $v) { $l10n[$k] = gTxt('abl_droploader_' . $k); } return $l10n; }
{ "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"]; //store the `model_objs` class from $objs variable $this->model_objs=$objs["model_objs"]; //store the `mail class from $thie variable $this->mail=$objs["mail"]; //store the `mail class from $thie variable $this->user_info = $this->logged_user_info($_SESSION["user_id"]); } }
{ "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' => 'secondary', 'color' => 'rgb(245, 54, 92)', ), array( 'name' => esc_html__( 'Green', '@@textdomain' ), 'slug' => 'green', 'color' => 'rgb(67, 170, 139)', ), array( 'name' => esc_html__( 'Dark Grey', '@@textdomain' ), 'slug' => 'dark-grey', 'color' => 'rgb(68,68,68)', ) ) ); }
{ "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.php'] ); return $page_templates; }
{ "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 ) ) $output = $new_output; return $output; }
{ "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['exclude'] ) && in_array( $atts['exclude'], $sticky_variations ) ) { $sticky_posts = get_option( 'sticky_posts' ); $args['post__not_in'] = $sticky_posts; } return $args; }
{ "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->findWith($with, $models); return $this; }
{ "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(); } // return $this ? }
{ "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; } $model->setAttributes($attributes, $safeOnly); } } return $this; }
{ "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); if(!strcmp(current($keys),'')) throw new \Exception('Keys cannot be empty', 400); if(!strcmp(current($values),'')) throw new \Exception('Keys cannot be empty', 400); do{ $current = current($keys); $next = next($keys); $curr_pos =& self::ev_next($curr_pos, $next, $current, $values); }while($next !== false); }
{ "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('Last elt cannot be a *', 400); $curr_pos[$current] = $expandValidator[$current] = ExpandValidatorLeaf::build(ExpandValidatorLeaf::KEY, $values); return $curr_pos; } if(!strcmp($current,'*')) return $curr_pos; $is_in = array_key_exists($current,$curr_pos); if(!strcmp($next,'*')){ if(!$is_in) $curr_pos[$current] = ExpandValidatorArray::build(); return $curr_pos[$current][ExpandValidatorArray::FIELD][ExpandValidatorObject::FIELD]; } //Overwrites the variable if the type is not an object where an object is expected. if(!$is_in || !array_key_exists(ExpandValidatorObject::FIELD, $curr_pos[$current])) $curr_pos[$current] = ExpandValidatorObject::build(); return $curr_pos[$current][ExpandValidatorObject::FIELD]; }
{ "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) { if (file_exists($file)) { $data = self::data($file); $rows = $data['row']; foreach ($rows as $pk => $row) { $r .= self::ra2str($row); } } } } } } $t = self::ms() - $t; return ($t / 1000) . ' sec'; }
{ "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 if (! @$dom->loadXML($this->getResults())) { throw new \RuntimeException('Could not load results into DOMDocument'); } $this->dom = $dom; } return $this->dom; }
{ "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->domXPath; }
{ "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($adapter); $this->getStorage()->offsetSet($this->position, $result); } return $this->getStorage()->offsetGet($this->position); }
{ "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("DestinationRegistryId",$param) and $param["DestinationRegistryId"] !== null) { $this->DestinationRegistryId = $param["DestinationRegistryId"]; } if (array_key_exists("Rule",$param) and $param["Rule"] !== null) { $this->Rule = new ReplicationRule(); $this->Rule->deserialize($param["Rule"]); } if (array_key_exists("Description",$param) and $param["Description"] !== null) { $this->Description = $param["Description"]; } if (array_key_exists("DestinationRegionId",$param) and $param["DestinationRegionId"] !== null) { $this->DestinationRegionId = $param["DestinationRegionId"]; } if (array_key_exists("PeerReplicationOption",$param) and $param["PeerReplicationOption"] !== null) { $this->PeerReplicationOption = new PeerReplicationOption(); $this->PeerReplicationOption->deserialize($param["PeerReplicationOption"]); } }
{ "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 creating a new cost and updating an existing one if($cost->id == 0) { // start managing this new cost $entityManager->persist($cost); } else { // merge this cost so it is managed again and we can save $entityManager->merge($cost); } // carry out the awaiting operations $entityManager->flush(); // return the saved cost, if the client happens to want it $cost = $entityManager->merge($cost); return $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.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); $costs = $query->getResult(); // delete that cost $cost = $entityManager->merge($costs[0]); $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.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\InvalidStateException("Recursive included file '$file'"); } $this->loadedFiles[$file] = true; $this->dependencies[] = $file; $data = $this->getAdapter($file)->load($file); $res = []; if (isset($data[self::INCLUDES_KEY])) { Validators::assert($data[self::INCLUDES_KEY], 'list', "section 'includes' in file '$file'"); $includes = Nette\DI\Helpers::expand($data[self::INCLUDES_KEY], $this->parameters); foreach ($includes as $include) { $include = $this->expandIncludedFile($include, $file); $res = Nette\Schema\Helpers::merge($this->load($include, $merge), $res); } } unset($data[self::INCLUDES_KEY], $this->loadedFiles[$file]); if ($merge === false) { $res[] = $data; } else { $res = Nette\Schema\Helpers::merge($data, $res); } return $res; }
{ "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