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
Sets a collection of OperationScenarii objects related by a onetomany relationship to the current object. It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection.
public function setOperationScenariis(PropelCollection $operationScenariis, PropelPDO $con = null) { $operationScenariisToDelete = $this->getOperationScenariis(new Criteria(), $con)->diff($operationScenariis); $this->operationScenariisScheduledForDeletion = $operationScenariisToDelete; foreach ($operationScenariisToDelete as $operationScenariiRemoved) { $operationScenariiRemoved->setOperationPrimes(null); } $this->collOperationScenariis = null; foreach ($operationScenariis as $operationScenarii) { $this->addOperationScenarii($operationScenarii); } $this->collOperationScenariis = $operationScenariis; $this->collOperationScenariisPartial = false; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRelations(Collection $relations);", "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collOperationPrestationss) {\n forea...
[ "0.53279346", "0.5052725", "0.5033467", "0.49696007", "0.49487805", "0.48957825", "0.4892381", "0.48710623", "0.48691344", "0.48363343", "0.48270226", "0.4759509", "0.4759509", "0.47541085", "0.47431684", "0.47396654", "0.47341594", "0.47037262", "0.46990106", "0.46961734", "...
0.637494
0
Returns the number of related OperationScenarii objects.
public function countOperationScenariis(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) { $partial = $this->collOperationScenariisPartial && !$this->isNew(); if (null === $this->collOperationScenariis || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collOperationScenariis) { return 0; } if ($partial && !$criteria) { return count($this->getOperationScenariis()); } $query = OperationScenariiQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterByOperationPrimes($this) ->count($con); } return count($this->collOperationScenariis); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n\t{\n\t\treturn $this->getParentObject()->count();\n\t}", "public function count() {\r\n return count($this->objects);\r\n }", "public function getOperationsCount()\n {\n return $this->count(self::_OPERATIONS);\n }", "public abstract function countObjects();", ...
[ "0.6947352", "0.680512", "0.68034995", "0.6686433", "0.6616811", "0.6561766", "0.65490717", "0.64963293", "0.64408505", "0.6409165", "0.6406243", "0.6406243", "0.6405025", "0.6398125", "0.6393465", "0.63911647", "0.6379137", "0.6364741", "0.6352321", "0.6348454", "0.6335802",...
0.63881683
16
Method called to associate a OperationScenarii object to this object through the OperationScenarii foreign key attribute.
public function addOperationScenarii(OperationScenarii $l) { if ($this->collOperationScenariis === null) { $this->initOperationScenariis(); $this->collOperationScenariisPartial = true; } if (!in_array($l, $this->collOperationScenariis->getArrayCopy(), true)) { // only add it if the **same** object is not already associated $this->doAddOperationScenarii($l); if ($this->operationScenariisScheduledForDeletion and $this->operationScenariisScheduledForDeletion->contains($l)) { $this->operationScenariisScheduledForDeletion->remove($this->operationScenariisScheduledForDeletion->search($l)); } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initOperationScenariis($overrideExisting = true)\n {\n if (null !== $this->collOperationScenariis && !$overrideExisting) {\n return;\n }\n $this->collOperationScenariis = new PropelObjectCollection();\n $this->collOperationScenariis->setModel('OperationScen...
[ "0.5536275", "0.5436308", "0.5380035", "0.51070744", "0.51019716", "0.48792845", "0.4863726", "0.48174158", "0.4816235", "0.47655308", "0.4710799", "0.46752945", "0.46390477", "0.46059033", "0.45966685", "0.459367", "0.45864248", "0.45555443", "0.45517206", "0.45369753", "0.4...
0.68358207
0
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this OperationPrimes is new, it will return an empty collection; or if this OperationPrimes has previously been saved, it will retrieve related OperationScenariis from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in OperationPrimes.
public function getOperationScenariisJoinOperations($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $query = OperationScenariiQuery::create(null, $criteria); $query->joinWith('Operations', $join_behavior); return $this->getOperationScenariis($query, $con); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationScenariis($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collOperationScenariisPartial && !$this->isNew();\n if (null === $this->collOperationScenariis || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperati...
[ "0.6432534", "0.616455", "0.60676116", "0.5967978", "0.57871777", "0.5603849", "0.5412624", "0.5361123", "0.5311536", "0.52497274", "0.5249158", "0.5202309", "0.51907885", "0.5177287", "0.51725477", "0.5124477", "0.512439", "0.51073444", "0.51018786", "0.50871056", "0.5074374...
0.0
-1
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this OperationPrimes is new, it will return an empty collection; or if this OperationPrimes has previously been saved, it will retrieve related OperationScenariis from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in OperationPrimes.
public function getOperationScenariisJoinRScenarios($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $query = OperationScenariiQuery::create(null, $criteria); $query->joinWith('RScenarios', $join_behavior); return $this->getOperationScenariis($query, $con); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationScenariis($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collOperationScenariisPartial && !$this->isNew();\n if (null === $this->collOperationScenariis || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperati...
[ "0.6431651", "0.6165256", "0.6068618", "0.59680986", "0.57871217", "0.56028926", "0.5411398", "0.536176", "0.53107464", "0.5249257", "0.52484024", "0.5200242", "0.5189108", "0.5175743", "0.51708066", "0.5123161", "0.51227987", "0.51070935", "0.51009303", "0.5085772", "0.50729...
0.0
-1
Clears out the collLnkOperationPrimeRCountriess collection This does not modify the database; however, it will remove any associated objects, causing them to be refetched by subsequent calls to accessor method.
public function clearLnkOperationPrimeRCountriess() { $this->collLnkOperationPrimeRCountriess = null; // important to set this to null since that means it is uninitialized $this->collLnkOperationPrimeRCountriessPartial = null; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear()\n {\n $this->op_prime_id = null;\n $this->op_id = null;\n $this->op_prime_libelle = null;\n $this->op_prime_numero = null;\n $this->gdl_art_id = null;\n $this->operation_prime_currency_id = null;\n $this->operation_prime_r_reward_type_id =...
[ "0.64430946", "0.6380274", "0.59960514", "0.5976945", "0.5924551", "0.58635014", "0.5850904", "0.5838168", "0.5825917", "0.56791365", "0.5651359", "0.56427115", "0.5636238", "0.5629349", "0.5627899", "0.56266546", "0.56032336", "0.56003785", "0.5572963", "0.55691105", "0.5540...
0.8122684
0
reset is the collLnkOperationPrimeRCountriess collection loaded partially
public function resetPartialLnkOperationPrimeRCountriess($v = true) { $this->collLnkOperationPrimeRCountriessPartial = $v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearLnkOperationPrimeRCountriess()\n {\n $this->collLnkOperationPrimeRCountriess = null; // important to set this to null since that means it is uninitialized\n $this->collLnkOperationPrimeRCountriessPartial = null;\n\n return $this;\n }", "public function resetLookupC...
[ "0.7394799", "0.6394161", "0.6371969", "0.6296", "0.62572", "0.62346", "0.6208907", "0.6204121", "0.620173", "0.618232", "0.6151997", "0.6108509", "0.6082319", "0.6077061", "0.6076555", "0.607531", "0.60681075", "0.6067455", "0.6061299", "0.6022697", "0.60200256", "0.601359...
0.64632845
1
Initializes the collLnkOperationPrimeRCountriess collection. By default this just sets the collLnkOperationPrimeRCountriess collection to an empty array (like clearcollLnkOperationPrimeRCountriess()); however, you may wish to override this method in your stub class to provide setting appropriate to your application for example, setting the initial array to the values stored in database.
public function initLnkOperationPrimeRCountriess($overrideExisting = true) { if (null !== $this->collLnkOperationPrimeRCountriess && !$overrideExisting) { return; } $this->collLnkOperationPrimeRCountriess = new PropelObjectCollection(); $this->collLnkOperationPrimeRCountriess->setModel('LnkOperationPrimeRCountries'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null)\n {\n $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess);\n\n\n $this->lnkOperationPrimeRCou...
[ "0.71638006", "0.70091325", "0.6869609", "0.62956905", "0.5360133", "0.52857304", "0.51841426", "0.51489633", "0.4538413", "0.4529241", "0.44997868", "0.4471349", "0.4462172", "0.43436876", "0.4245498", "0.42426777", "0.42295885", "0.4212909", "0.41634142", "0.41592157", "0.4...
0.7232321
0
Gets an array of LnkOperationPrimeRCountries objects which contain a foreign key that references this object. If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, the cached collection is returned. If this OperationPrimes is new, it will return an empty collection or the current collection; the criteria is ignored on a new object.
public function getLnkOperationPrimeRCountriess($criteria = null, PropelPDO $con = null) { $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew(); if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) { // return empty collection $this->initLnkOperationPrimeRCountriess(); } else { $collLnkOperationPrimeRCountriess = LnkOperationPrimeRCountriesQuery::create(null, $criteria) ->filterByOperationPrimes($this) ->find($con); if (null !== $criteria) { if (false !== $this->collLnkOperationPrimeRCountriessPartial && count($collLnkOperationPrimeRCountriess)) { $this->initLnkOperationPrimeRCountriess(false); foreach ($collLnkOperationPrimeRCountriess as $obj) { if (false == $this->collLnkOperationPrimeRCountriess->contains($obj)) { $this->collLnkOperationPrimeRCountriess->append($obj); } } $this->collLnkOperationPrimeRCountriessPartial = true; } $collLnkOperationPrimeRCountriess->getInternalIterator()->rewind(); return $collLnkOperationPrimeRCountriess; } if ($partial && $this->collLnkOperationPrimeRCountriess) { foreach ($this->collLnkOperationPrimeRCountriess as $obj) { if ($obj->isNew()) { $collLnkOperationPrimeRCountriess[] = $obj; } } } $this->collLnkOperationPrimeRCountriess = $collLnkOperationPrimeRCountriess; $this->collLnkOperationPrimeRCountriessPartial = false; } } return $this->collLnkOperationPrimeRCountriess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(OperationPrimesPeer::DATABASE_NAME);\n $criteria->add(OperationPrimesPeer::OP_PRIME_ID, $this->op_prime_id);\n\n return $criteria;\n }", "public function getOperationScenariis($criteria = null, PropelPDO $con = null)\n ...
[ "0.65903765", "0.6560057", "0.628412", "0.61360604", "0.56110454", "0.5591172", "0.5567438", "0.5505992", "0.5469546", "0.54690737", "0.5392265", "0.53495556", "0.5338507", "0.5283804", "0.5222667", "0.52197963", "0.5208035", "0.52051127", "0.51970255", "0.51662004", "0.51526...
0.77509034
0
Sets a collection of LnkOperationPrimeRCountries objects related by a onetomany relationship to the current object. It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection.
public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null) { $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess); $this->lnkOperationPrimeRCountriessScheduledForDeletion = $lnkOperationPrimeRCountriessToDelete; foreach ($lnkOperationPrimeRCountriessToDelete as $lnkOperationPrimeRCountriesRemoved) { $lnkOperationPrimeRCountriesRemoved->setOperationPrimes(null); } $this->collLnkOperationPrimeRCountriess = null; foreach ($lnkOperationPrimeRCountriess as $lnkOperationPrimeRCountries) { $this->addLnkOperationPrimeRCountries($lnkOperationPrimeRCountries); } $this->collLnkOperationPrimeRCountriess = $lnkOperationPrimeRCountriess; $this->collLnkOperationPrimeRCountriessPartial = false; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initLnkOperationPrimeRCountriess($overrideExisting = true)\n {\n if (null !== $this->collLnkOperationPrimeRCountriess && !$overrideExisting) {\n return;\n }\n $this->collLnkOperationPrimeRCountriess = new PropelObjectCollection();\n $this->collLnkOperationP...
[ "0.53294456", "0.5276085", "0.5172079", "0.5024019", "0.49761328", "0.49010965", "0.49010965", "0.4842405", "0.4815598", "0.47761714", "0.47132882", "0.46900707", "0.46638405", "0.46614772", "0.46549684", "0.46372625", "0.46216393", "0.4613934", "0.46029884", "0.46000704", "0...
0.6124001
0
Returns the number of related LnkOperationPrimeRCountries objects.
public function countLnkOperationPrimeRCountriess(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) { $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew(); if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) { return 0; } if ($partial && !$criteria) { return count($this->getLnkOperationPrimeRCountriess()); } $query = LnkOperationPrimeRCountriesQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterByOperationPrimes($this) ->count($con); } return count($this->collLnkOperationPrimeRCountriess); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n return count($this->_mappersByPriority);\n }", "function getAllNumNodes(){\n\t\t$clase=$this->nmclass;\n\t\t$u=$this->cant_nodos;\n\t\treturn $u;\n\t}", "static public function rrcnt( object $pp1, string $tbl, array $other=[] ): int { \n self::$pp1 = $pp1 ;\n if...
[ "0.56959254", "0.56481504", "0.5630712", "0.56275594", "0.5590137", "0.5587153", "0.5585118", "0.5566324", "0.5562667", "0.5561838", "0.55585283", "0.55396694", "0.5515096", "0.5483477", "0.54697376", "0.5464577", "0.5461492", "0.5453932", "0.54340005", "0.54080826", "0.54080...
0.7116602
0
Method called to associate a LnkOperationPrimeRCountries object to this object through the LnkOperationPrimeRCountries foreign key attribute.
public function addLnkOperationPrimeRCountries(LnkOperationPrimeRCountries $l) { if ($this->collLnkOperationPrimeRCountriess === null) { $this->initLnkOperationPrimeRCountriess(); $this->collLnkOperationPrimeRCountriessPartial = true; } if (!in_array($l, $this->collLnkOperationPrimeRCountriess->getArrayCopy(), true)) { // only add it if the **same** object is not already associated $this->doAddLnkOperationPrimeRCountries($l); if ($this->lnkOperationPrimeRCountriessScheduledForDeletion and $this->lnkOperationPrimeRCountriessScheduledForDeletion->contains($l)) { $this->lnkOperationPrimeRCountriessScheduledForDeletion->remove($this->lnkOperationPrimeRCountriessScheduledForDeletion->search($l)); } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initLnkOperationPrimeRCountriess($overrideExisting = true)\n {\n if (null !== $this->collLnkOperationPrimeRCountriess && !$overrideExisting) {\n return;\n }\n $this->collLnkOperationPrimeRCountriess = new PropelObjectCollection();\n $this->collLnkOperationP...
[ "0.64621097", "0.61786366", "0.5385901", "0.529308", "0.4904457", "0.48280057", "0.46794182", "0.46335077", "0.45321354", "0.43928742", "0.43161535", "0.42277503", "0.4221812", "0.42072904", "0.41790408", "0.41401613", "0.411474", "0.41056487", "0.40210992", "0.39886558", "0....
0.7390084
0
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this OperationPrimes is new, it will return an empty collection; or if this OperationPrimes has previously been saved, it will retrieve related LnkOperationPrimeRCountriess from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in OperationPrimes.
public function getLnkOperationPrimeRCountriessJoinRCountries($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $query = LnkOperationPrimeRCountriesQuery::create(null, $criteria); $query->joinWith('RCountries', $join_behavior); return $this->getLnkOperationPrimeRCountriess($query, $con); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLnkOperationPrimeRCountriess($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew();\n if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) {\n if ($this->isNew() ...
[ "0.70344776", "0.6491407", "0.6484084", "0.6329467", "0.6279917", "0.5879446", "0.57158923", "0.5522799", "0.5406059", "0.5226954", "0.4964488", "0.49532357", "0.48859155", "0.4834041", "0.47766906", "0.46790275", "0.46589643", "0.4619326", "0.4609589", "0.45965058", "0.45824...
0.0
-1
Clears the current object and sets all attributes to their default values
public function clear() { $this->op_prime_id = null; $this->op_id = null; $this->op_prime_libelle = null; $this->op_prime_numero = null; $this->gdl_art_id = null; $this->operation_prime_currency_id = null; $this->operation_prime_r_reward_type_id = null; $this->operation_prime_r_reward_expedition_mode_id = null; $this->operation_prime_r_reward_transporter_id = null; $this->operation_prime_fixed_amount = null; $this->operation_prime_product_price_pourcentage = null; $this->operation_prime_maximum_amount = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->alreadyInClearAllReferencesDeep = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n {\n $this->id = null;\n $this->attributes = array();\n }", "public function clear() {\n\t\t$vars = get_object_vars($this);\n\t\tforeach ($vars as $key => $val) {\n\t\t\t$this->$key = null;\n\t\t}\n\t}", "public function reset() {\n\t\t// Get the default values for ...
[ "0.7934973", "0.7742796", "0.7719033", "0.7560898", "0.7540498", "0.7524002", "0.7497178", "0.7460875", "0.74505615", "0.7401953", "0.73845804", "0.7372289", "0.7372289", "0.7359527", "0.7358744", "0.73455524", "0.7341694", "0.7333127", "0.73080325", "0.730508", "0.7272196", ...
0.0
-1
Resets all references to other model objects or collections of model objects. This method is a userspace workaround for PHP's inability to garbage collect objects with circular references (even in PHP 5.3). This is currently necessary when using Propel in certain daemon or largevolume/highmemory operations.
public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->collOperationPrestationss) { foreach ($this->collOperationPrestationss as $o) { $o->clearAllReferences($deep); } } if ($this->collOperationScenariis) { foreach ($this->collOperationScenariis as $o) { $o->clearAllReferences($deep); } } if ($this->collLnkOperationPrimeRCountriess) { foreach ($this->collLnkOperationPrimeRCountriess as $o) { $o->clearAllReferences($deep); } } if ($this->aOperations instanceof Persistent) { $this->aOperations->clearAllReferences($deep); } if ($this->aRCurrencies instanceof Persistent) { $this->aRCurrencies->clearAllReferences($deep); } if ($this->aRRewardTypes instanceof Persistent) { $this->aRRewardTypes->clearAllReferences($deep); } if ($this->aRRewardExpeditionModes instanceof Persistent) { $this->aRRewardExpeditionModes->clearAllReferences($deep); } if ($this->aRRewardTransporters instanceof Persistent) { $this->aRRewardTransporters->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) if ($this->collOperationPrestationss instanceof PropelCollection) { $this->collOperationPrestationss->clearIterator(); } $this->collOperationPrestationss = null; if ($this->collOperationScenariis instanceof PropelCollection) { $this->collOperationScenariis->clearIterator(); } $this->collOperationScenariis = null; if ($this->collLnkOperationPrimeRCountriess instanceof PropelCollection) { $this->collLnkOperationPrimeRCountriess->clearIterator(); } $this->collLnkOperationPrimeRCountriess = null; $this->aOperations = null; $this->aRCurrencies = null; $this->aRRewardTypes = null; $this->aRRewardExpeditionModes = null; $this->aRRewardTransporters = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetRelations()\n\t{\n\t\t$this->relations = array();\n\t}", "public function reset() {\n $this->cache = array();\n $this->parent()->reset();\n }", "public function reset(): void\n {\n $this->_add = new SplObjectStorage();\n $this->_delete = new SplObjectStorage();\n ...
[ "0.73751575", "0.7075585", "0.7070103", "0.69268966", "0.69253993", "0.69054973", "0.6833247", "0.68202984", "0.6730608", "0.6672259", "0.6616799", "0.6609049", "0.65902245", "0.6580803", "0.6573979", "0.6570683", "0.6544556", "0.65250957", "0.6510706", "0.6475944", "0.647425...
0.6851384
6
return the string representation of this object
public function __toString() { return (string) $this->exportTo(OperationPrimesPeer::DEFAULT_STRING_FORMAT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function to_string() { return $this->__toString(); }", "public function toString()\n {\n return $this->__toString();\n }", "public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}", "public function __toString() {\n \n return $this->toString();\n }", "pub...
[ "0.881343", "0.8804064", "0.87396216", "0.8638188", "0.8627505", "0.8627505", "0.86221105", "0.8610754", "0.86016625", "0.85770637", "0.8571491", "0.8571491", "0.85487986", "0.8547729", "0.8547249", "0.8547249", "0.8547249", "0.8547249", "0.8547249", "0.8547249", "0.8547249",...
0.0
-1
return true is the object is in saving state
public function isAlreadyInSave() { return $this->alreadyInSave; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canSave()\n {\n return $this->save;\n }", "protected abstract function canSave();", "public function is_saved()\n\t\t{\n\t\t\treturn $this->hash && file_exists($this->get_path_hashed()) || $this->saved;\n\t\t}", "public function isPersisted() {}", "public function isPersisted()...
[ "0.78017664", "0.77273244", "0.757228", "0.75603664", "0.7529165", "0.7529165", "0.7529165", "0.74971557", "0.7495214", "0.74183434", "0.7392338", "0.73065156", "0.7267914", "0.7264964", "0.7218154", "0.72104543", "0.72013205", "0.7164965", "0.7164965", "0.7162645", "0.710782...
0.7470844
18
utils behavior Return connection object
public function getConnection(){ return BaseOperationPrimesPeer::getConnection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public func...
[ "0.8191341", "0.8191341", "0.8191341", "0.8191341", "0.8191341", "0.8191341", "0.8191341", "0.8191341", "0.8191341", "0.8191341", "0.8191341", "0.8191341", "0.80470276", "0.7972273", "0.7970527", "0.78297186", "0.7822589", "0.7821015", "0.7794633", "0.7770798", "0.7767891", ...
0.0
-1
nasetovani zakladnich hodnot prvku
public function pregenerate($data_orm) { $this->image=isset($this->settings["image"])?$this->settings["image"]:"folder_explore.png"; $this->image_empty=isset($this->settings["image_empty"])?$this->settings["image_empty"]:$this->image; $this->alt=isset($this->settings["alt"])?$this->settings["alt"]:"detail"; $this->alt_empty=isset($this->settings["alt_empty"])?$this->settings["alt_empty"]:$this->alt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AggiornaPrezzi(){\n\t}", "public function podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\n }", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "function UsunZKolejnosci($Nazwa){\n \n //unset( $this->Kolejnosc[$K...
[ "0.6733688", "0.64914346", "0.64735955", "0.62519425", "0.6245372", "0.6242535", "0.6223761", "0.6186216", "0.6156538", "0.6152927", "0.6135826", "0.6095063", "0.6093924", "0.60710526", "0.606729", "0.606476", "0.6008934", "0.6008933", "0.5987528", "0.59645104", "0.59596837",...
0.0
-1
Sets the name for the cookie
public function setCookieName($cookieName) { $this->cookieName = $cookieName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setSessionName(): void\n {\n $cookie = new Cookie($this->expiringTime - 1);\n if ($cookie->exists('sessionName')) {\n return;\n }\n\n // unset all session name cookies\n foreach ($_COOKIE as $key => $value) {\n if (strlen($key) === strlen...
[ "0.81614584", "0.7774264", "0.74384934", "0.7096783", "0.70904666", "0.7057508", "0.6908071", "0.68967825", "0.68618286", "0.6839496", "0.6806299", "0.6785796", "0.6774309", "0.6750137", "0.67457235", "0.67387664", "0.6729219", "0.6706944", "0.6680654", "0.66744584", "0.66714...
0.76500076
2
Gets the name for the cookie
public function getCookieName() { return $this->cookieName ? $this->cookieName : '_locale'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCookieName() {}", "public static function getCookieName() {}", "public function getCookieName()\n {\n return $this->settings['cookie_name'];\n }", "private function getSessionName(): string\n {\n $cookie = new Cookie();\n\n return $cookie->get('sessionN...
[ "0.92554116", "0.9254728", "0.8819042", "0.7998214", "0.7960031", "0.74162877", "0.7229235", "0.7213849", "0.7166113", "0.71486783", "0.69835204", "0.69835204", "0.69835204", "0.69835204", "0.6960257", "0.6960257", "0.6902071", "0.6898865", "0.6864579", "0.6853057", "0.684421...
0.8459908
3
Determines which locale to use, based on a cookie
public function getLocale(LocaleManager $manager) { $request = $this->getRequest(); if (!$request) { if ($this->log) { $this->log->logDebug('Can\'t determine locale from cookie because there is no request', null, self::LOG_SOURCE); } return null; } elseif ($request->getBasePath() != '/') { if ($this->log) { $this->log->logDebug('Can\'t determine locale from cookie because we are not on the site root', null, self::LOG_SOURCE); } return null; } $locale = $request->getCookie($this->getCookieName()); if (!$locale) { if ($this->log) { $this->log->logDebug('Can\'t determine locale from cookie because there is none', null, self::LOG_SOURCE); } return null; } if ($manager->hasLocale($locale)) { if ($this->log) { $this->log->logDebug('Loaded locale from cookie', $locale, self::LOG_SOURCE); } return $manager->getLocale($locale); } if ($this->log) { $this->log->logDebug('No available locale in cookie', $locale, self::LOG_SOURCE); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCookieLocale()\n {\n return $this->request->cookie('locale');\n }", "function determine_locale()\n {\n }", "public static function locale() : string\n {\n // Compute the locale just one time\n if (self::$locale) {\n return self::$locale;\n ...
[ "0.7601724", "0.7315246", "0.7267676", "0.72163224", "0.71592724", "0.71592724", "0.7078723", "0.7017058", "0.69955224", "0.69869787", "0.68518895", "0.68371874", "0.68371874", "0.68371874", "0.67961866", "0.6768134", "0.67644763", "0.67201126", "0.6673277", "0.66559327", "0....
0.60334396
83
Get the value of status
public function getStatus() { return $this->status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatus()\n {\n return $this->data['status'];\n }", "function getStatus() {\n\t\treturn $this->getData('status');\n\t}", "function get_status() {\n return $this->status;\n }", "public function get_status(){\n return $this->status;\n ...
[ "0.8364771", "0.8352938", "0.83477443", "0.82749325", "0.82595927", "0.8194055", "0.81829715", "0.8165453", "0.81583846", "0.81570524", "0.81570524", "0.8132857", "0.81237364", "0.81237364", "0.811998", "0.811998", "0.811998", "0.811998", "0.8118182", "0.80684453", "0.8063031...
0.8070775
81
Get the value of refNo
public function getRefNo() { return $this->refNo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRefNo()\n {\n return $this->ref_no;\n }", "public function getRefNumber()\n\t{\n\t\treturn $this->get('RefNumber');\n\t}", "public function getReferenceNum()\n {\n return $this->referenceNum;\n }", "public function getReferenceNumber()\n {\n return $this...
[ "0.86265594", "0.7839131", "0.739985", "0.7221408", "0.7165935", "0.6869757", "0.6812943", "0.6571384", "0.6518078", "0.65086895", "0.6489569", "0.63803464", "0.6363901", "0.63471174", "0.62540424", "0.61784714", "0.61778224", "0.6172686", "0.61697745", "0.6165419", "0.615493...
0.8580971
2
Get the value of returnCode
public function getReturnCode() { return $this->returnCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatusCode()\n {\n return (int) $this->getReturnVal();\n }", "public function getErrorCode(){\n return $this->_section->return_error_code;\n }", "public function getCode()\n\t{\n\t\treturn (int)$this->statusCode;\n\t}", "public function getResultCode()\n {\n ...
[ "0.7830994", "0.7816789", "0.78109187", "0.77993613", "0.77729124", "0.7733918", "0.7669106", "0.7607188", "0.75310373", "0.75150716", "0.75150716", "0.75150716", "0.74240613", "0.74011517", "0.73512083", "0.73499054", "0.7331378", "0.7331378", "0.73269075", "0.73109674", "0....
0.86434954
1
Get the value of messgae
public function getMessgae() { return $this->messgae; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMessage(){\n\t\t\treturn $this->message;\n\t\t}", "public function getMessage(){\n\t\treturn $this->message;\n\t}", "private function getMsg()\n {\n return $this->msg;\n }", "public function message()\n {\n return $this->msg;\n }", "public function message()\n {\n ...
[ "0.7179744", "0.7070213", "0.69565773", "0.689962", "0.689962", "0.689962", "0.6893641", "0.68695295", "0.68695295", "0.6853898", "0.6784508", "0.6763357", "0.67558485", "0.6730124", "0.6729388", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.6728502...
0.76615155
0
Get the value of authCode
public function getAuthCode() { return $this->authCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCode()\n {\n return $this->isSuccessful() ? $this->data[\"AuthCode\"] : parent::getCode();\n }", "public function get_auth_code( $code ) {\n\t\t$tokens = new Token_User( '_indieauth_code_' );\n\t\treturn $tokens->get( $code );\n\t}", "protected function getAuthorizationCode()...
[ "0.8285153", "0.78844696", "0.75953406", "0.7413289", "0.7323032", "0.721884", "0.7215816", "0.71820104", "0.71820104", "0.7178934", "0.70966244", "0.7067525", "0.70480776", "0.7043728", "0.7043728", "0.6993433", "0.6930652", "0.6914984", "0.68855304", "0.6883161", "0.6875588...
0.86717224
0
Get the value of token
public function getToken() { return $this->token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValue() : string {\n\t\treturn $this->token;\n\t}", "public function getToken()\n {\n $value = $this->getParameter('token');\n $value = $value ?: $this->httpRequest->query->get('token');\n return $value;\n }", "public function get_token() {\n\t\treturn $this->token...
[ "0.85188824", "0.79895604", "0.7788034", "0.76427764", "0.7629508", "0.7550924", "0.75138354", "0.7510516", "0.7498699", "0.7491944", "0.74798244", "0.74798244", "0.74587715", "0.7453149", "0.7453149", "0.7453149", "0.743896", "0.7430249", "0.7398155", "0.73764855", "0.736871...
0.7354141
31
Get the value of accountNo
public function getAccountNo() { return $this->accountNo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccountNo()\n {\n return $this->account_no;\n }", "public function getAccountNumber()\n {\n return $this->account_number;\n }", "public function getAccountNumber()\n {\n return $this->account_number;\n }", "public function getAccountNumber()\n {\n ...
[ "0.86152816", "0.77893347", "0.77893347", "0.75219923", "0.7485823", "0.72222084", "0.7056576", "0.7037025", "0.6862045", "0.67442596", "0.67246765", "0.67246765", "0.66747445", "0.66747445", "0.6643635", "0.6618681", "0.65814227", "0.657316", "0.6361484", "0.6355416", "0.634...
0.85641295
1
Get the value of ccType
public function getCcType() { return $this->ccType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCcTypeName()\n {\n $types = $this->_paymentConfig->getCcTypes();\n $ccType = $this->getInfo()->getCcType();\n if (isset($types[$ccType])) {\n return $types[$ccType];\n }\n return empty($ccType) ? __('N/A') : $ccType;\n }", "public function ge...
[ "0.7198807", "0.6995694", "0.69588137", "0.67550725", "0.65317273", "0.6506843", "0.6504484", "0.65002066", "0.64600253", "0.6416335", "0.63788116", "0.63777524", "0.6349416", "0.6346157", "0.6345668", "0.63322115", "0.6297825", "0.62841064", "0.62839335", "0.62708914", "0.62...
0.7642755
0
Bootstrap any application services.
public function boot() { //转换时间格式 Carbon::setLocale('zh'); //字段限制长度 Schema::defaultStringLength(191); //监听sql $log_config = env('LOG_SAVE'); if ($log_config) { //监听sql语句并写入日志 DB::listen(function ($sql) { // var_dump($sql->bindings); //Log::info($sql->sql); foreach ($sql->bindings as $i => $binding) { if ($binding instanceof \DateTime) { $sql->bindings[$i] = $binding->format('\'Y-m-d H:i:s\''); } else { if (is_string($binding)) { $sql->bindings[$i] = "'$binding'"; } } } // Insert bindings into query $query = str_replace(array('%', '?'), array('%%', '%s'), $sql->sql); $query = vsprintf($query, $sql->bindings); // Save the query to file // Log::info("SQL:", array($query)); // Save the query to file //创建文件,并修改权限,查询sql运行写入到当天的日志中 $logFile = fopen( storage_path('logs' . DIRECTORY_SEPARATOR . date('Y-m-d') . '_query.log'), 'a+' ); $file_info = fread($logFile, "10"); \Log::info('logs文件里面获取的:' . $file_info . '_query.log'); if (empty($file_info)) { \Log::info('chmod 777 ' . storage_path('logs' . DIRECTORY_SEPARATOR . date('Y-m-d') . '_query.log')); exec('chmod 777 ' . storage_path('logs' . DIRECTORY_SEPARATOR . date('Y-m-d') . '_query.log')); } fwrite($logFile, date('Y-m-d H:i:s') . ': ' . $query . PHP_EOL); fclose($logFile); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public func...
[ "0.7342354", "0.72115344", "0.72045606", "0.71229565", "0.7110962", "0.7082294", "0.7077916", "0.70714337", "0.7052025", "0.70234996", "0.70118046", "0.7005517", "0.69550276", "0.6931787", "0.69304705", "0.6927122", "0.6910007", "0.69058853", "0.6900327", "0.689661", "0.68954...
0.0
-1
Register any application services.
public function register() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n ...
[ "0.78798115", "0.7601541", "0.7493926", "0.73860854", "0.7369017", "0.73060066", "0.72911495", "0.72905713", "0.7279868", "0.72693264", "0.72689337", "0.72660935", "0.7248237", "0.7217507", "0.72099274", "0.71999437", "0.71971434", "0.719557", "0.7177418", "0.7176995", "0.716...
0.0
-1
return the subscribed events, their methods and priorities
public static function getSubscribedEvents() { return array( KernelEvents::CONTROLLER => 'openDataFile' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getSubscribedEvents()\n {\n return [NotificationEvent::NAME => ['handleNotificationEvent', self::getPriority()]];\n }", "public static function getSubscribedEvents();", "public static function getSubscribedEvents();", "public function getSubscribedEvents();", "public sta...
[ "0.7402781", "0.7365954", "0.7365954", "0.720792", "0.7159295", "0.7059951", "0.70453227", "0.7022645", "0.6955377", "0.69515216", "0.6941954", "0.69407237", "0.69404954", "0.69347644", "0.69347644", "0.6934746", "0.69216", "0.68992424", "0.68857306", "0.68790895", "0.6860921...
0.0
-1
the type for entities is always saml because manage is using saml internally
public function generateForNewEntity(ManageEntity $entity, string $workflowState): array { return [ 'data' => $this->generateDataForNewEntity($entity, $workflowState), 'type' => 'saml20_sp', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getEntityType(): string;", "public function entityFor(): string;", "protected abstract function initializeEntityType(): string;", "public function getEntityType();", "function getEntityType() {\n return $this->entity_type;\n }", "public function getFormattedEntityType();",...
[ "0.6579577", "0.6268739", "0.6078189", "0.59517086", "0.58947", "0.5880128", "0.58716387", "0.58661675", "0.58661675", "0.5841064", "0.5741917", "0.5674106", "0.56405616", "0.56306565", "0.5629068", "0.5612282", "0.5612282", "0.558031", "0.5547178", "0.5532264", "0.5515421", ...
0.0
-1
the type for entities is always saml because manage is using saml internally
public function generateForExistingEntity( ManageEntity $entity, EntityDiff $differences, string $workflowState, string $updatedPart = '' ): array { $data = [ 'pathUpdates' => $this->generateDataForExistingEntity($entity, $differences, $workflowState, $updatedPart), 'type' => 'saml20_sp', 'id' => $entity->getId(), ]; return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getEntityType(): string;", "public function entityFor(): string;", "protected abstract function initializeEntityType(): string;", "public function getEntityType();", "function getEntityType() {\n return $this->entity_type;\n }", "public function getFormattedEntityType();",...
[ "0.6579003", "0.62691635", "0.607803", "0.5950614", "0.58935577", "0.5879823", "0.58702433", "0.58653843", "0.58653843", "0.5840599", "0.5740734", "0.56731504", "0.563944", "0.56302166", "0.56273997", "0.5610996", "0.5610996", "0.55789554", "0.5545633", "0.55309236", "0.55154...
0.0
-1
Strip header and footer from certificate data.
private function stripCertificateEnvelope($certData) { $certData = str_replace('-----BEGIN CERTIFICATE-----', '', $certData); $certData = str_replace('-----END CERTIFICATE-----', '', $certData); return trim($certData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function strip_armor($data, $marker = 'MESSAGE') {\n // remove the noise from the encrypted data\n $data = str_replace(self::header($marker) . \"\\n\", '' , $data);\n $data = str_replace(self::footer($marker) . \"\\n\", '' , $data);\n $data = trim($data, \"\\n\");\n return...
[ "0.62055284", "0.571185", "0.5545251", "0.5447561", "0.5297353", "0.5191676", "0.51282823", "0.5070846", "0.5027272", "0.4937397", "0.48847398", "0.48798928", "0.48625243", "0.48300108", "0.47870573", "0.4774893", "0.4773257", "0.4770072", "0.4749041", "0.47380862", "0.472383...
0.65779585
0
Arp is to be sent in its entirety as it does not support the MERGE WRITE feature
private function generateArp(array $metadata, ManageEntity $entity): array { // but we use the diffed arp to check if any changes where made to the ARP (if not, we do // not send the arp if (!empty($metadata['arp'])) { unset($metadata['arp']); $metadata['arp'] = $this->arpMetadataGenerator->build($entity); } return $metadata; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _write() {}", "abstract protected function _write();", "protected function _writeFileBody() {}", "function merge($p_archive_to_add)\n {\n }", "public function merge() {}", "abstract protected function write();", "function privMerge(&$p_archive_to_add)\n {\n ...
[ "0.5620318", "0.554926", "0.5451503", "0.5397429", "0.53046316", "0.52640635", "0.5099033", "0.5067416", "0.49729124", "0.4969246", "0.49512914", "0.4937767", "0.4937767", "0.488023", "0.48016888", "0.474803", "0.47167236", "0.4697574", "0.46221805", "0.46029785", "0.4587764"...
0.4281185
61
Validates the given entity definition data which was parsed from the crud.yml.
public function validate(array $data);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function validate()\n {\n// echo static::class;\n if (!isset($this->getProperty('raw_data')['_'])) {\n throw new InvalidEntity('Invalid entity data given: ' . json_encode($this->getRawData(), JSON_PRETTY_PRINT));\n }\n }", "public function valid...
[ "0.7264961", "0.6535296", "0.64051425", "0.6376262", "0.58790743", "0.5775145", "0.56982195", "0.5652786", "0.54827654", "0.5477822", "0.5468089", "0.5467215", "0.54437006", "0.5436658", "0.5425517", "0.54020154", "0.53972447", "0.53820986", "0.53806335", "0.5374592", "0.5369...
0.0
-1
Translates a fieldname to another type
public static function translateFieldName($name, $fromType, $toType) { $toNames = CastleTypePeer::getFieldNames($toType); $key = isset(CastleTypePeer::$fieldKeys[$fromType][$name]) ? CastleTypePeer::$fieldKeys[$fromType][$name] : null; if ($key === null) { throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(CastleTypePeer::$fieldKeys[$fromType], true)); } return $toNames[$key]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function convertField($field);", "public function getFieldType($fieldname);", "function getTypeOfField($fieldName);", "function translate_field($field)\n {\n }", "function translate_field($field)\n {\n }", "function translate_field($field)\n {\n }", "function translate...
[ "0.7173377", "0.65669996", "0.62690645", "0.60597956", "0.60597956", "0.60597956", "0.60597956", "0.60597956", "0.60597956", "0.60532916", "0.60428226", "0.5963186", "0.59185976", "0.5849304", "0.58295465", "0.58238125", "0.579899", "0.57356906", "0.57333744", "0.57310134", "...
0.5367799
52
Returns an array of field names.
public static function getFieldNames($type = BasePeer::TYPE_PHPNAME) { if (!array_key_exists($type, CastleTypePeer::$fieldNames)) { throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); } return CastleTypePeer::$fieldNames[$type]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFieldNames() {\n $fields = array();\n foreach ($this->getFields() as $field) {\n $fields[] = $this->getFieldName($field);\n }\n return $fields;\n }", "public function get_field_names(): array {\n\t\treturn array_keys( $this->data );\n\t}", "public fu...
[ "0.8793394", "0.86980706", "0.86644137", "0.8579475", "0.84528255", "0.8416153", "0.8345989", "0.8345989", "0.8345989", "0.8331933", "0.8316055", "0.8315624", "0.8273083", "0.8169623", "0.8002455", "0.7992786", "0.79775965", "0.7960041", "0.7934392", "0.79341775", "0.7924927"...
0.0
-1
Convenience method which changes table.column to alias.column. Using this method you can maintain SQL abstraction while using column aliases. $c>addAlias("alias1", TablePeer::TABLE_NAME); $c>addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
public static function alias($alias, $column) { return str_replace(CastleTypePeer::TABLE_NAME.'.', $alias.'.', $column); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prefixColumnsForJoin()\n {\n if (!$columns = $this->query->columns) {\n return $this->select($this->model->getTable().'.*');\n }\n\n foreach ($columns as $key => $column) {\n if ($this->model->hasColumn($column)) {\n $columns[$key] = $thi...
[ "0.66060513", "0.6595331", "0.6355234", "0.633762", "0.6310247", "0.630587", "0.6303183", "0.6278325", "0.62193006", "0.6163846", "0.6160412", "0.611915", "0.6078692", "0.6072368", "0.600528", "0.59347546", "0.5932669", "0.5931049", "0.59169686", "0.58962625", "0.5871634", ...
0.6651856
0
Add all the columns needed to create a new object. Note: any columns that were marked with lazyLoad="true" in the XML schema will not be added to the select list and only loaded on demand.
public static function addSelectColumns(Criteria $criteria, $alias = null) { if (null === $alias) { $criteria->addSelectColumn(CastleTypePeer::ID); $criteria->addSelectColumn(CastleTypePeer::USER_ID); $criteria->addSelectColumn(CastleTypePeer::TYPE); $criteria->addSelectColumn(CastleTypePeer::NAME); $criteria->addSelectColumn(CastleTypePeer::TOTAL_ST); $criteria->addSelectColumn(CastleTypePeer::TOTAL_SK); $criteria->addSelectColumn(CastleTypePeer::TOTAL_BS); $criteria->addSelectColumn(CastleTypePeer::TOTAL_AS); $criteria->addSelectColumn(CastleTypePeer::TOTAL_PR); $criteria->addSelectColumn(CastleTypePeer::TOTAL_LR); $criteria->addSelectColumn(CastleTypePeer::TOTAL_HK); $criteria->addSelectColumn(CastleTypePeer::TOTAL_OK); $criteria->addSelectColumn(CastleTypePeer::MISSION_ST); $criteria->addSelectColumn(CastleTypePeer::MISSION_SK); $criteria->addSelectColumn(CastleTypePeer::MISSION_BS); $criteria->addSelectColumn(CastleTypePeer::MISSION_AS); $criteria->addSelectColumn(CastleTypePeer::MISSION_PR); $criteria->addSelectColumn(CastleTypePeer::MISSION_LR); $criteria->addSelectColumn(CastleTypePeer::BERGFRIED); $criteria->addSelectColumn(CastleTypePeer::ZEUGHAUS); $criteria->addSelectColumn(CastleTypePeer::TAVERNE); $criteria->addSelectColumn(CastleTypePeer::BIBLIOTHEK); $criteria->addSelectColumn(CastleTypePeer::WEHRANLAGE); $criteria->addSelectColumn(CastleTypePeer::MARKT); $criteria->addSelectColumn(CastleTypePeer::BAUERNHOF); $criteria->addSelectColumn(CastleTypePeer::HOLZFAELLER); $criteria->addSelectColumn(CastleTypePeer::HOLZLAGER); $criteria->addSelectColumn(CastleTypePeer::STEINBRUCH); $criteria->addSelectColumn(CastleTypePeer::STEINLAGER); $criteria->addSelectColumn(CastleTypePeer::ERZMINE); $criteria->addSelectColumn(CastleTypePeer::ERZLAGER); $criteria->addSelectColumn(CastleTypePeer::LANGBOGEN); $criteria->addSelectColumn(CastleTypePeer::DREIFELDERWIRTSCHAFT); $criteria->addSelectColumn(CastleTypePeer::KUMMET); $criteria->addSelectColumn(CastleTypePeer::VORRATSKELLER); $criteria->addSelectColumn(CastleTypePeer::STEIGBUEGEL); $criteria->addSelectColumn(CastleTypePeer::WAFFENSCHMIED); $criteria->addSelectColumn(CastleTypePeer::RUESTUNGSSCHMIED); $criteria->addSelectColumn(CastleTypePeer::BIERPRUEFER); $criteria->addSelectColumn(CastleTypePeer::SCHWERTSCHMIED); $criteria->addSelectColumn(CastleTypePeer::EISENHAERTUNG); $criteria->addSelectColumn(CastleTypePeer::ARMBRUST); $criteria->addSelectColumn(CastleTypePeer::GIFTPFEILE); $criteria->addSelectColumn(CastleTypePeer::PFERDEZUCHT); $criteria->addSelectColumn(CastleTypePeer::WAFFENHERSTELLUNG); $criteria->addSelectColumn(CastleTypePeer::PFERDEPANZERUNG); $criteria->addSelectColumn(CastleTypePeer::SCHUBKARREN); $criteria->addSelectColumn(CastleTypePeer::BRANDPFEILE); $criteria->addSelectColumn(CastleTypePeer::HUFSCHMIED); $criteria->addSelectColumn(CastleTypePeer::UMGEBUNGSKARTE); $criteria->addSelectColumn(CastleTypePeer::ZISTERNE); $criteria->addSelectColumn(CastleTypePeer::MAX_POPULATION); $criteria->addSelectColumn(CastleTypePeer::FREE_POPULATION); $criteria->addSelectColumn(CastleTypePeer::CREATED_AT); $criteria->addSelectColumn(CastleTypePeer::UPDATED_AT); } else { $criteria->addSelectColumn($alias . '.id'); $criteria->addSelectColumn($alias . '.user_id'); $criteria->addSelectColumn($alias . '.type'); $criteria->addSelectColumn($alias . '.name'); $criteria->addSelectColumn($alias . '.total_st'); $criteria->addSelectColumn($alias . '.total_sk'); $criteria->addSelectColumn($alias . '.total_bs'); $criteria->addSelectColumn($alias . '.total_as'); $criteria->addSelectColumn($alias . '.total_pr'); $criteria->addSelectColumn($alias . '.total_lr'); $criteria->addSelectColumn($alias . '.total_hk'); $criteria->addSelectColumn($alias . '.total_ok'); $criteria->addSelectColumn($alias . '.mission_st'); $criteria->addSelectColumn($alias . '.mission_sk'); $criteria->addSelectColumn($alias . '.mission_bs'); $criteria->addSelectColumn($alias . '.mission_as'); $criteria->addSelectColumn($alias . '.mission_pr'); $criteria->addSelectColumn($alias . '.mission_lr'); $criteria->addSelectColumn($alias . '.bergfried'); $criteria->addSelectColumn($alias . '.zeughaus'); $criteria->addSelectColumn($alias . '.taverne'); $criteria->addSelectColumn($alias . '.bibliothek'); $criteria->addSelectColumn($alias . '.wehranlage'); $criteria->addSelectColumn($alias . '.markt'); $criteria->addSelectColumn($alias . '.bauernhof'); $criteria->addSelectColumn($alias . '.holzfaeller'); $criteria->addSelectColumn($alias . '.holzlager'); $criteria->addSelectColumn($alias . '.steinbruch'); $criteria->addSelectColumn($alias . '.steinlager'); $criteria->addSelectColumn($alias . '.erzmine'); $criteria->addSelectColumn($alias . '.erzlager'); $criteria->addSelectColumn($alias . '.langbogen'); $criteria->addSelectColumn($alias . '.dreifelderwirtschaft'); $criteria->addSelectColumn($alias . '.kummet'); $criteria->addSelectColumn($alias . '.vorratskeller'); $criteria->addSelectColumn($alias . '.steigbuegel'); $criteria->addSelectColumn($alias . '.waffenschmied'); $criteria->addSelectColumn($alias . '.ruestungsschmied'); $criteria->addSelectColumn($alias . '.bierpruefer'); $criteria->addSelectColumn($alias . '.schwertschmied'); $criteria->addSelectColumn($alias . '.eisenhaertung'); $criteria->addSelectColumn($alias . '.armbrust'); $criteria->addSelectColumn($alias . '.giftpfeile'); $criteria->addSelectColumn($alias . '.pferdezucht'); $criteria->addSelectColumn($alias . '.waffenherstellung'); $criteria->addSelectColumn($alias . '.pferdepanzerung'); $criteria->addSelectColumn($alias . '.schubkarren'); $criteria->addSelectColumn($alias . '.brandpfeile'); $criteria->addSelectColumn($alias . '.hufschmied'); $criteria->addSelectColumn($alias . '.umgebungskarte'); $criteria->addSelectColumn($alias . '.zisterne'); $criteria->addSelectColumn($alias . '.max_population'); $criteria->addSelectColumn($alias . '.free_population'); $criteria->addSelectColumn($alias . '.created_at'); $criteria->addSelectColumn($alias . '.updated_at'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _setColumns()\n {\n $this->columns = new Pike_Grid_DataSource_Columns();\n\n foreach ($this->_query->getFields() as $field) {\n $this->columns->add($field, null, $field);\n }\n }", "private function load_columns_information() {\n $query = \"SELECT ord...
[ "0.6556401", "0.62286067", "0.61727834", "0.6072637", "0.6064973", "0.6050672", "0.6040348", "0.5969455", "0.59326607", "0.5920098", "0.59177065", "0.5807557", "0.5775123", "0.5671909", "0.56617016", "0.5597815", "0.55917406", "0.5585443", "0.55843353", "0.5539637", "0.553004...
0.0
-1
Returns the number of rows matching criteria.
public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) { // we may modify criteria, so copy it first $criteria = clone $criteria; // We need to set the primary table name, since in the case that there are no WHERE columns // it will be impossible for the BasePeer::createSelectSql() method to determine which // tables go into the FROM clause. $criteria->setPrimaryTableName(CastleTypePeer::TABLE_NAME); if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->setDistinct(); } if (!$criteria->hasSelectClause()) { CastleTypePeer::addSelectColumns($criteria); } $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count $criteria->setDbName(CastleTypePeer::DATABASE_NAME); // Set the correct dbName if ($con === null) { $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_READ); } // BasePeer returns a PDOStatement $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { $count = (int) $row[0]; } else { $count = 0; // no rows returned; we infer that means 0 matches. } $stmt->closeCursor(); return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function row_count();", "public function countRows()\n {\n return count($this->rows);\n }", "public function count_rows()\n {\n $m_num_rows = $this->c_obj_stmt->rowCount();\n return $m_num_rows;\n }", "public function countRows(): int\n {\n $result =...
[ "0.7814829", "0.76461774", "0.76306206", "0.76248515", "0.7610322", "0.7601381", "0.7569516", "0.75337154", "0.75239164", "0.75204575", "0.7497446", "0.7475283", "0.7471234", "0.7456455", "0.74432975", "0.7425854", "0.7408996", "0.7392882", "0.7389839", "0.73875904", "0.73762...
0.0
-1
Selects one object from the DB.
public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) { $critcopy = clone $criteria; $critcopy->setLimit(1); $objects = CastleTypePeer::doSelect($critcopy, $con); if ($objects) { return $objects[0]; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function selectSingle() {\n $suffix = $this->formQuerySuffix();\n $arr = $this->table->selectSingle($suffix);\n $class = $this->className;\n $result = null;\n\n DBRecord::$fromPostData = false;\n if ($arr) $result = new $class($arr);\n DBRecord::$fromPostData = true;\n\n return $resu...
[ "0.73373353", "0.73347527", "0.73248285", "0.72701573", "0.72666776", "0.7239744", "0.72131133", "0.7209748", "0.71983886", "0.71252334", "0.70911306", "0.7057644", "0.70491564", "0.70462257", "0.70269436", "0.6976685", "0.69732434", "0.6968088", "0.69540846", "0.6942822", "0...
0.0
-1
Selects several row from the DB.
public static function doSelect(Criteria $criteria, PropelPDO $con = null) { return CastleTypePeer::populateObjects(CastleTypePeer::doSelectStmt($criteria, $con)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function select();", "public function select();", "public function select();", "private function _selMultipleRowCustom($sql)\n\t{\n\t\tglobal $con;\n $query=mysqli_query($con,$sql);\n\t\t\n\t\t$result=array();\n\t\twhile($res=mysqli_fetch_object($query))\n\t\t{\n\t\t\t$result[]=$res;\n }...
[ "0.659016", "0.659016", "0.659016", "0.6564762", "0.65396285", "0.64876956", "0.63859034", "0.6288914", "0.62882006", "0.6231486", "0.62199694", "0.62159276", "0.62096107", "0.6179504", "0.6164087", "0.6125296", "0.61129975", "0.6088336", "0.60871804", "0.6058274", "0.6049722...
0.0
-1
Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. Use this method directly if you want to work with an executed statement directly (for example to perform your own object hydration).
public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_READ); } if (!$criteria->hasSelectClause()) { $criteria = clone $criteria; CastleTypePeer::addSelectColumns($criteria); } // Set the correct dbName $criteria->setDbName(CastleTypePeer::DATABASE_NAME); // BasePeer returns a PDOStatement return BasePeer::doSelect($criteria, $con); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepareSelectStatement() {}", "public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)\n\t{\n\t\tif ($con === null) {\n\t\t\t$con = Propel::getConnection(AsignacionScPeer::DATABASE_NAME, Propel::CONNECTION_READ);\n\t\t}\n\n\t\tif (!$criteria->hasSelectClause()) {\n\t\t\t...
[ "0.69063497", "0.6700506", "0.66852635", "0.6515803", "0.6507905", "0.64959544", "0.64364994", "0.6393098", "0.6390393", "0.6330055", "0.61734337", "0.595632", "0.5931575", "0.5903895", "0.58597666", "0.5770534", "0.567535", "0.5659574", "0.56227124", "0.56227124", "0.5617776...
0.6510698
4
Adds an object to the instance pool. Propel keeps cached copies of objects in an instance pool when they are retrieved from the database. In some cases especially when you override doSelect() methods in your stub classes you may need to explicitly add objects to the cache in order to ensure that the same objects are always returned by doSelect() and retrieveByPK() calls.
public static function addInstanceToPool($obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = (string) $obj->getId(); } // if key === null CastleTypePeer::$instances[$key] = $obj; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function addInstanceToPool($obj, $key = null)\n {\n if (Propel::isInstancePoolingEnabled()) {\n if ($key === null) {\n $key = (string) $obj->getGeneriekeproductcode();\n } // if key === null\n GsGeneriekeProductenPeer::$instances[$key] = $obj;...
[ "0.5762509", "0.5721631", "0.5667468", "0.559863", "0.55765325", "0.55045956", "0.547133", "0.5468822", "0.5449773", "0.5449681", "0.5448071", "0.5440235", "0.5410676", "0.5374523", "0.5338368", "0.53204876", "0.5245372", "0.52235866", "0.5198615", "0.51939356", "0.51845485",...
0.55740684
5
Removes an object from the instance pool. Propel keeps cached copies of objects in an instance pool when they are retrieved from the database. In some cases especially when you override doDelete methods in your stub classes you may need to explicitly remove objects from the cache in order to prevent returning objects that no longer exist.
public static function removeInstanceFromPool($value) { if (Propel::isInstancePoolingEnabled() && $value !== null) { if (is_object($value) && $value instanceof CastleType) { $key = (string) $value->getId(); } elseif (is_scalar($value)) { // assume we've been passed a primary key $key = (string) $value; } else { $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CastleType object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); throw $e; } unset(CastleTypePeer::$instances[$key]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove($object);", "public function remove($object);", "public function deleteObject(){\n $qry = new DeleteEntityQuery($this);\n $this->getContext()->addQuery($qry);\n //$this->removeFromParentCollection();\n }", "protected function removeInstance() {}", "public func...
[ "0.6329556", "0.6329556", "0.624261", "0.6240583", "0.60868263", "0.608277", "0.6075955", "0.6043572", "0.60361296", "0.59740263", "0.5900129", "0.58921576", "0.5873221", "0.5857909", "0.5844167", "0.58420444", "0.5834691", "0.5806754", "0.5803742", "0.5796559", "0.579554", ...
0.57889897
21
removeInstanceFromPool() Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. For tables with a singlecolumn primary key, that simple pkey value will be returned. For tables with a multicolumn primary key, a serialize()d version of the primary key will be returned.
public static function getInstanceFromPool($key) { if (Propel::isInstancePoolingEnabled()) { if (isset(CastleTypePeer::$instances[$key])) { return CastleTypePeer::$instances[$key]; } } return null; // just to be explicit }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function removeInstanceFromPool($value)\n {\n if (Propel::isInstancePoolingEnabled() && $value !== null) {\n if (is_object($value) && $value instanceof SertifikasiPd) {\n $key = (string) $value->getIdSertPd();\n } elseif (is_scalar($value)) {\n ...
[ "0.59381914", "0.5931325", "0.5813825", "0.5756741", "0.5742803", "0.5726756", "0.57168186", "0.57064676", "0.5678229", "0.56456375", "0.56192636", "0.56042445", "0.5597152", "0.5597152", "0.5597152", "0.55932724", "0.5577148", "0.55755895", "0.5575556", "0.5565924", "0.55346...
0.0
-1
Clear the instance pool.
public static function clearInstancePool($and_clear_all_references = false) { if ($and_clear_all_references) { foreach (CastleTypePeer::$instances as $instance) { $instance->clearAllReferences(true); } } CastleTypePeer::$instances = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()...
[ "0.8837235", "0.8837235", "0.8837235", "0.8837235", "0.8837235", "0.87216514", "0.87216514", "0.87216514", "0.87216514", "0.87216514", "0.87216514", "0.87216514", "0.86158293", "0.86158293", "0.7671361", "0.74862856", "0.7373576", "0.7373576", "0.7254292", "0.70665246", "0.69...
0.6461653
32
Method to invalidate the instance pool of all tables related to castle_type by a foreign key with ON DELETE CASCADE
public static function clearRelatedInstancePool() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in \".$this->getClassNameFromBuilder($joinedTableTableMapBuilder).\" instance pool,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n EmailManagerHistoryEmailTableMap::clea...
[ "0.6172919", "0.6119161", "0.6020513", "0.60139537", "0.5857925", "0.58096457", "0.5730649", "0.5694749", "0.5694749", "0.568592", "0.5682936", "0.56383985", "0.5621306", "0.5590635", "0.5581591", "0.5546354", "0.5528151", "0.5506521", "0.5496047", "0.5394498", "0.5378957", ...
0.5865865
10
Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. For tables with a singlecolumn primary key, that simple pkey value will be returned. For tables with a multicolumn primary key, a serialize()d version of the primary key will be returned.
public static function getPrimaryKeyHashFromRow($row, $startcol = 0) { // If the PK cannot be derived from the row, return null. if ($row[$startcol] === null) { return null; } return (string) $row[$startcol]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_primary_row(){\r\n $result = $this->db->query(\"SHOW KEYS FROM \". $this->db->formatTableName($this->table). \"\r\n WHERE Key_name = %s\"\r\n , \"PRIMARY\");\r\n $pk = \"\";\r\n foreach ($result as $res){\r\n $pk = $res[\"Column_name\"];\r\n ...
[ "0.7702078", "0.75904965", "0.7400296", "0.7318031", "0.731435", "0.72315407", "0.7153344", "0.71426606", "0.71401006", "0.71100867", "0.70964324", "0.7081956", "0.7081044", "0.7075653", "0.7075653", "0.7065646", "0.7037616", "0.7037616", "0.7037616", "0.70263886", "0.6995914...
0.0
-1
Retrieves the primary key from the DB resultset row For tables with a singlecolumn primary key, that simple pkey value will be returned. For tables with a multicolumn primary key, an array of the primary key columns will be returned.
public static function getPrimaryKeyFromRow($row, $startcol = 0) { return (int) $row[$startcol]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_primary_row(){\r\n $result = $this->db->query(\"SHOW KEYS FROM \". $this->db->formatTableName($this->table). \"\r\n WHERE Key_name = %s\"\r\n , \"PRIMARY\");\r\n $pk = \"\";\r\n foreach ($result as $res){\r\n $pk = $res[\"Column_name\"];\r\n ...
[ "0.80954134", "0.7558588", "0.74424666", "0.7409092", "0.7407588", "0.72926205", "0.71618485", "0.7130738", "0.7120029", "0.7094727", "0.7094657", "0.70852435", "0.70513844", "0.70145226", "0.6997955", "0.696772", "0.6964484", "0.6956702", "0.6938738", "0.693316", "0.6921311"...
0.0
-1
The returned array will contain objects of the default type or objects that inherit from the default.
public static function populateObjects(PDOStatement $stmt) { $results = array(); // set the class once to avoid overhead in the loop $cls = CastleTypePeer::getOMClass(); // populate the object(s) while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key = CastleTypePeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj = CastleTypePeer::getInstanceFromPool($key))) { // We no longer rehydrate the object, since this can cause data loss. // See http://www.propelorm.org/ticket/509 // $obj->hydrate($row, 0, true); // rehydrate $results[] = $obj; } else { $obj = new $cls(); $obj->hydrate($row); $results[] = $obj; CastleTypePeer::addInstanceToPool($obj, $key); } // if key exists } $stmt->closeCursor(); return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getDefaultTypes(): array\n {\n if ($this->hasFieldsets()) {\n return $this->getFieldsets()->toArray();\n }\n\n return [\n $this->handle,\n ];\n }", "protected function getDefaultComponents()\n {\n return [\n new THead,\...
[ "0.6613024", "0.6190649", "0.6073416", "0.60565436", "0.6008772", "0.59606016", "0.59247184", "0.58962023", "0.5890789", "0.585801", "0.58451295", "0.581715", "0.5813083", "0.57828707", "0.5763412", "0.57154924", "0.5698909", "0.5683115", "0.5681036", "0.5659683", "0.56371564...
0.0
-1
Populates an object of the default type or an object that inherit from the default.
public static function populateObject($row, $startcol = 0) { $key = CastleTypePeer::getPrimaryKeyHashFromRow($row, $startcol); if (null !== ($obj = CastleTypePeer::getInstanceFromPool($key))) { // We no longer rehydrate the object, since this can cause data loss. // See http://www.propelorm.org/ticket/509 // $obj->hydrate($row, $startcol, true); // rehydrate $col = $startcol + CastleTypePeer::NUM_HYDRATE_COLUMNS; } else { $cls = CastleTypePeer::OM_CLASS; $obj = new $cls(); $col = $obj->hydrate($row, $startcol); CastleTypePeer::addInstanceToPool($obj, $key); } return array($obj, $col); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultType();", "public function initialize($object, $defaultPropertyValue);", "public function setDefaultTypeData(){\n if(\n is_object($this->source) &&\n is_object($this->target)\n ){\n if(\n $this->source->isAbyss() ||\n ...
[ "0.59270644", "0.5822597", "0.5699518", "0.5554423", "0.55190855", "0.5493805", "0.54765004", "0.5433351", "0.53954035", "0.5382271", "0.5327865", "0.5207133", "0.51811445", "0.51322377", "0.5131358", "0.5114984", "0.51068914", "0.50865686", "0.5067863", "0.50669926", "0.5064...
0.0
-1
Returns the number of rows matching criteria, joining the related User table
public static function doCountJoinUser(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; // We need to set the primary table name, since in the case that there are no WHERE columns // it will be impossible for the BasePeer::createSelectSql() method to determine which // tables go into the FROM clause. $criteria->setPrimaryTableName(CastleTypePeer::TABLE_NAME); if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->setDistinct(); } if (!$criteria->hasSelectClause()) { CastleTypePeer::addSelectColumns($criteria); } $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count // Set the correct dbName $criteria->setDbName(CastleTypePeer::DATABASE_NAME); if ($con === null) { $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_READ); } $criteria->addJoin(CastleTypePeer::USER_ID, UserPeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { $count = (int) $row[0]; } else { $count = 0; // no rows returned; we infer that means 0 matches. } $stmt->closeCursor(); return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUsersCount() {\n $company_id = $this->getId(); \n \treturn Users::count(\"company_id LIKE $company_id\");\n }", "public function getAllJoinLvUserCount()\n {\n $sql = \"SELECT COUNT(1) FROM casino_user_point \";\n return $this->_rdb->fetchOne($sql);\n }", "public fu...
[ "0.6988758", "0.67236876", "0.66500664", "0.6597737", "0.6589502", "0.6526262", "0.6493038", "0.6466317", "0.64394855", "0.64151835", "0.6401028", "0.6385135", "0.6367345", "0.6362937", "0.6355236", "0.6350399", "0.63494813", "0.6348773", "0.6336602", "0.63216144", "0.6313089...
0.59269387
69
Selects a collection of CastleType objects prefilled with their User objects.
public static function doSelectJoinUser(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $criteria = clone $criteria; // Set the correct dbName if it has not been overridden if ($criteria->getDbName() == Propel::getDefaultDB()) { $criteria->setDbName(CastleTypePeer::DATABASE_NAME); } CastleTypePeer::addSelectColumns($criteria); $startcol = CastleTypePeer::NUM_HYDRATE_COLUMNS; UserPeer::addSelectColumns($criteria); $criteria->addJoin(CastleTypePeer::USER_ID, UserPeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key1 = CastleTypePeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj1 = CastleTypePeer::getInstanceFromPool($key1))) { // We no longer rehydrate the object, since this can cause data loss. // See http://www.propelorm.org/ticket/509 // $obj1->hydrate($row, 0, true); // rehydrate } else { $cls = CastleTypePeer::getOMClass(); $obj1 = new $cls(); $obj1->hydrate($row); CastleTypePeer::addInstanceToPool($obj1, $key1); } // if $obj1 already loaded $key2 = UserPeer::getPrimaryKeyHashFromRow($row, $startcol); if ($key2 !== null) { $obj2 = UserPeer::getInstanceFromPool($key2); if (!$obj2) { $cls = UserPeer::getOMClass(); $obj2 = new $cls(); $obj2->hydrate($row, $startcol); UserPeer::addInstanceToPool($obj2, $key2); } // if obj2 already loaded // Add the $obj1 (CastleType) to $obj2 (User) $obj2->addCastleType($obj1); } // if joined row was not null $results[] = $obj1; } $stmt->closeCursor(); return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadUserTypes(){\n\t\t\t$stmt = $this->db->executequery('select id_type_user, type_user, date_modification_type_user, description_type_user from type_user order by type_user asc');\n\t\t\tif (!$userTypes = $stmt->fetchall()) return array(); \n\t\t\tfor ($i = 0; $i < count($userTypes); $i++) {\n\t\...
[ "0.6562324", "0.65445954", "0.64394987", "0.59377176", "0.5741594", "0.5738194", "0.56653464", "0.5606529", "0.5576637", "0.5563105", "0.55230254", "0.552203", "0.5495222", "0.5478386", "0.5475885", "0.5466172", "0.5459835", "0.54080915", "0.53897244", "0.53824615", "0.538242...
0.5482469
13
Returns the number of rows matching criteria, joining all related tables
public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; // We need to set the primary table name, since in the case that there are no WHERE columns // it will be impossible for the BasePeer::createSelectSql() method to determine which // tables go into the FROM clause. $criteria->setPrimaryTableName(CastleTypePeer::TABLE_NAME); if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->setDistinct(); } if (!$criteria->hasSelectClause()) { CastleTypePeer::addSelectColumns($criteria); } $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count // Set the correct dbName $criteria->setDbName(CastleTypePeer::DATABASE_NAME); if ($con === null) { $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_READ); } $criteria->addJoin(CastleTypePeer::USER_ID, UserPeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { $count = (int) $row[0]; } else { $count = 0; // no rows returned; we infer that means 0 matches. } $stmt->closeCursor(); return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n return count($this->_joins);\n }", "function getCount() {\n\t\t$where = (sizeof($this->wheres) > 0) ? ' WHERE '.implode(\" \\n AND \\n\\t\", $this->wheres) : '';\n\t\t$group = (sizeof($this->groups) > 0) ? ' GROUP BY '.implode(\", \", $this->groups) : '' ;\n\t\t$query =...
[ "0.7333117", "0.69980973", "0.67554796", "0.67525935", "0.66455156", "0.6571224", "0.6564929", "0.6521017", "0.6515358", "0.64639044", "0.6454166", "0.6452891", "0.64451045", "0.6428454", "0.6417924", "0.6407907", "0.63133633", "0.63087684", "0.6308332", "0.6302672", "0.62994...
0.0
-1
Selects a collection of CastleType objects prefilled with all related objects.
public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $criteria = clone $criteria; // Set the correct dbName if it has not been overridden if ($criteria->getDbName() == Propel::getDefaultDB()) { $criteria->setDbName(CastleTypePeer::DATABASE_NAME); } CastleTypePeer::addSelectColumns($criteria); $startcol2 = CastleTypePeer::NUM_HYDRATE_COLUMNS; UserPeer::addSelectColumns($criteria); $startcol3 = $startcol2 + UserPeer::NUM_HYDRATE_COLUMNS; $criteria->addJoin(CastleTypePeer::USER_ID, UserPeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key1 = CastleTypePeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj1 = CastleTypePeer::getInstanceFromPool($key1))) { // We no longer rehydrate the object, since this can cause data loss. // See http://www.propelorm.org/ticket/509 // $obj1->hydrate($row, 0, true); // rehydrate } else { $cls = CastleTypePeer::getOMClass(); $obj1 = new $cls(); $obj1->hydrate($row); CastleTypePeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded // Add objects for joined User rows $key2 = UserPeer::getPrimaryKeyHashFromRow($row, $startcol2); if ($key2 !== null) { $obj2 = UserPeer::getInstanceFromPool($key2); if (!$obj2) { $cls = UserPeer::getOMClass(); $obj2 = new $cls(); $obj2->hydrate($row, $startcol2); UserPeer::addInstanceToPool($obj2, $key2); } // if obj2 loaded // Add the $obj1 (CastleType) to the collection in $obj2 (User) $obj2->addCastleType($obj1); } // if joined row not null $results[] = $obj1; } $stmt->closeCursor(); return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllTypes(){\n return $this->find()->asArray()->orderBy('typeDesc ASC')->all();\n }", "function grabTypes(){\n\t\t$d=$this->find('all',array('order'=>array('id ASC')));\n\t\treturn $d;\n\t}", "public function fetchAll()\n {\n $templateTypeTable = new Api_Model_DbTable_Temp...
[ "0.6131027", "0.5965004", "0.5882621", "0.5745791", "0.5629154", "0.56290025", "0.5610413", "0.5594425", "0.5591162", "0.55855167", "0.55284137", "0.5450818", "0.54425365", "0.544043", "0.543725", "0.54011315", "0.5401095", "0.5397428", "0.53682977", "0.5337205", "0.52826416"...
0.51024747
43
Returns the TableMap related to this peer. This method is not needed for general use but a specific application could have a need.
public static function getTableMap() { return Propel::getDatabaseMap(CastleTypePeer::DATABASE_NAME)->getTable(CastleTypePeer::TABLE_NAME); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTableMap()\n {\n return $this->aTables;\n }", "public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(MetaTableMap::DATABASE_NAME)->getTable(MetaTableMap::TABLE_NAME);\n }", "public static function getTableMap()\n {\n ...
[ "0.7261864", "0.72116536", "0.717127", "0.7096744", "0.7096744", "0.7096744", "0.7096744", "0.7096744", "0.7074619", "0.7070026", "0.7058538", "0.7039197", "0.69997746", "0.6999405", "0.69546235", "0.689678", "0.67655534", "0.6731235", "0.66777545", "0.6672004", "0.66231066",...
0.67339754
17
Add a TableMap instance to the database for this peer class.
public static function buildTableMap() { $dbMap = Propel::getDatabaseMap(BaseCastleTypePeer::DATABASE_NAME); if (!$dbMap->hasTable(BaseCastleTypePeer::TABLE_NAME)) { $dbMap->addTableObject(new \CastleTypeTableMap()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function buildTableMap()\n {\n $dbMap = Propel::getServiceContainer()->getDatabaseMap(VideoTableMap::DATABASE_NAME);\n if (!$dbMap->hasTable(VideoTableMap::TABLE_NAME)) {\n $dbMap->addTableObject(new VideoTableMap());\n }\n }", "public static function buildTabl...
[ "0.69108903", "0.6824918", "0.6728637", "0.6699367", "0.66535974", "0.6652279", "0.6604993", "0.6602178", "0.6558998", "0.65468985", "0.6516381", "0.65129244", "0.64826274", "0.64619875", "0.645197", "0.6400046", "0.6323089", "0.6317991", "0.623918", "0.61948353", "0.59977216...
0.65307564
10
The class that the Peer will make instances of.
public static function getOMClass($row = 0, $colnum = 0) { return CastleTypePeer::OM_CLASS; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_class(){\n return self::class;}", "public function get_class()\n {\n return $this->class;\n }", "public function getFamilyClass() {}", "public function getClass() {}", "public function getClass() {}", "public function getClass() {}", "function getType()\n ...
[ "0.6341992", "0.6255986", "0.60088027", "0.5990001", "0.59899485", "0.59899485", "0.598509", "0.5970912", "0.59064627", "0.58968186", "0.58876216", "0.58876216", "0.58876216", "0.58876216", "0.58876216", "0.58876216", "0.58876216", "0.58876216", "0.58876216", "0.58876216", "0...
0.0
-1
Performs an INSERT on the database, given a CastleType or Criteria object.
public static function doInsert($values, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity } else { $criteria = $values->buildCriteria(); // build Criteria from CastleType object } if ($criteria->containsKey(CastleTypePeer::ID) && $criteria->keyContainsValue(CastleTypePeer::ID) ) { throw new PropelException('Cannot insert a value for auto-increment primary key ('.CastleTypePeer::ID.')'); } // Set the correct dbName $criteria->setDbName(CastleTypePeer::DATABASE_NAME); try { // use transaction because $criteria could contain info // for more than one table (I guess, conceivably) $con->beginTransaction(); $pk = BasePeer::doInsert($criteria, $con); $con->commit(); } catch (Exception $e) { $con->rollBack(); throw $e; } return $pk; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function doInsert($subject, Statement $insertStatement);", "public function insert(DataObject $insertObject, Database_Config $databaseConfig = NULL);", "public function insert(stubObject $entity);", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "public fu...
[ "0.6728488", "0.66889215", "0.65220326", "0.6367947", "0.62812436", "0.6267724", "0.6258614", "0.6146561", "0.6107739", "0.607231", "0.6060545", "0.6000775", "0.5997079", "0.5975363", "0.59644806", "0.59403837", "0.5927122", "0.59014034", "0.58890134", "0.585548", "0.584822",...
0.640713
3
Performs an UPDATE on the database, given a CastleType or Criteria object.
public static function doUpdate($values, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $selectCriteria = new Criteria(CastleTypePeer::DATABASE_NAME); if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity $comparison = $criteria->getComparison(CastleTypePeer::ID); $value = $criteria->remove(CastleTypePeer::ID); if ($value) { $selectCriteria->add(CastleTypePeer::ID, $value, $comparison); } else { $selectCriteria->setPrimaryTableName(CastleTypePeer::TABLE_NAME); } } else { // $values is CastleType object $criteria = $values->buildCriteria(); // gets full criteria $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) } // set the correct dbName $criteria->setDbName(CastleTypePeer::DATABASE_NAME); return BasePeer::doUpdate($selectCriteria, $criteria, $con); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function update (\\Database\\Query\\Query $query);", "private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',...
[ "0.6530865", "0.63997346", "0.6393035", "0.63816196", "0.63217145", "0.626907", "0.62530017", "0.620886", "0.6183809", "0.6174507", "0.61533076", "0.61521614", "0.6147019", "0.6140654", "0.61103815", "0.6096868", "0.60962546", "0.6090113", "0.60681206", "0.6049748", "0.604654...
0.6081812
18
Deletes all rows from the castle_type table.
public static function doDeleteAll(PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $affectedRows = 0; // initialize var to track total num of affected rows try { // use transaction because $criteria could contain info // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); $affectedRows += BasePeer::doDeleteAll(CastleTypePeer::TABLE_NAME, $con, CastleTypePeer::DATABASE_NAME); // Because this db requires some delete cascade/set null emulation, we have to // clear the cached instance *after* the emulation has happened (since // instances get re-added by the select statement contained therein). CastleTypePeer::clearInstancePool(); CastleTypePeer::clearRelatedInstancePool(); $con->commit(); return $affectedRows; } catch (Exception $e) { $con->rollBack(); throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear() {\n\n switch ($this->type) {\n case 'sqlite':\n case 'mysql':\n $query[0] = 'DROP TABLE `enrolled`;';\n\n $query[1] = 'DROP TABLE `paid`;';\n\n $query[2] = 'DROP TABLE `admin`;';\n\n $query[3] = 'DROP TABLE `l...
[ "0.6491475", "0.63497335", "0.61928195", "0.6133089", "0.6133089", "0.60953563", "0.60759395", "0.59900624", "0.5988884", "0.59792113", "0.5974758", "0.5925061", "0.58245164", "0.5823327", "0.5815067", "0.58147556", "0.58058035", "0.5785412", "0.5765372", "0.57217145", "0.571...
0.53874904
53
Performs a DELETE on the database, given a CastleType or Criteria object OR a primary key value.
public static function doDelete($values, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } if ($values instanceof Criteria) { // invalidate the cache for all objects of this type, since we have no // way of knowing (without running a query) what objects should be invalidated // from the cache based on this Criteria. CastleTypePeer::clearInstancePool(); // rename for clarity $criteria = clone $values; } elseif ($values instanceof CastleType) { // it's a model object // invalidate the cache for this single object CastleTypePeer::removeInstanceFromPool($values); // create criteria based on pk values $criteria = $values->buildPkeyCriteria(); } else { // it's a primary key, or an array of pks $criteria = new Criteria(CastleTypePeer::DATABASE_NAME); $criteria->add(CastleTypePeer::ID, (array) $values, Criteria::IN); // invalidate the cache for this object(s) foreach ((array) $values as $singleval) { CastleTypePeer::removeInstanceFromPool($singleval); } } // Set the correct dbName $criteria->setDbName(CastleTypePeer::DATABASE_NAME); $affectedRows = 0; // initialize var to track total num of affected rows try { // use transaction because $criteria could contain info // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); $affectedRows += BasePeer::doDelete($criteria, $con); CastleTypePeer::clearRelatedInstancePool(); $con->commit(); return $affectedRows; } catch (Exception $e) { $con->rollBack(); throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n {\n $class = strtolower(get_called_class());\n $table = self::$_table_name != null ? self::$_table_name : $class . 's';\n\n $pdo = PDOS::getInstance();\n\n $whereClause = '';\n foreach (static::$_primary_keys as $pk)\n $whereClause .= $pk . ' = :' . $pk . ' AND ';\n ...
[ "0.68341583", "0.6608787", "0.6560278", "0.65151256", "0.6485194", "0.6481085", "0.6448722", "0.6434292", "0.6398659", "0.6395862", "0.6393299", "0.63735336", "0.6356264", "0.6353667", "0.63534623", "0.63390326", "0.6334386", "0.63103616", "0.62810326", "0.62734145", "0.62733...
0.6367154
12
Validates all modified columns of given CastleType object. If parameter $columns is either a single column name or an array of column names than only those columns are validated. NOTICE: This does not apply to primary or foreign keys for now.
public static function doValidate($obj, $cols = null) { $columns = array(); if ($cols) { $dbMap = Propel::getDatabaseMap(CastleTypePeer::DATABASE_NAME); $tableMap = $dbMap->getTable(CastleTypePeer::TABLE_NAME); if (! is_array($cols)) { $cols = array($cols); } foreach ($cols as $colName) { if ($tableMap->hasColumn($colName)) { $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); $columns[$colName] = $obj->$get(); } } } else { } return BasePeer::doValidate(CastleTypePeer::DATABASE_NAME, CastleTypePeer::TABLE_NAME, $columns); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidColumns(array $columns);", "private function validateColumns($columns) {\n\t\tif(is_object($columns)) {\n\t\t\tforeach($columns as $key => $val) {\n\t\t\t\tif(!is_string($val)) {\n\t\t\t\t\t$display = is_object($val) ? \"Object\" : \"$val\";\n\t\t\t\t\t$this->error(\"Expected a string des...
[ "0.6780082", "0.6415807", "0.636581", "0.6234922", "0.6124479", "0.6096371", "0.6078615", "0.60098153", "0.5973185", "0.5922245", "0.5819985", "0.5798123", "0.5797835", "0.57818246", "0.57704145", "0.573968", "0.5718231", "0.5704828", "0.56957954", "0.5682755", "0.5682755", ...
0.5114727
72
Retrieve a single object by pkey.
public static function retrieveByPK($pk, PropelPDO $con = null) { if (null !== ($obj = CastleTypePeer::getInstanceFromPool((string) $pk))) { return $obj; } if ($con === null) { $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_READ); } $criteria = new Criteria(CastleTypePeer::DATABASE_NAME); $criteria->add(CastleTypePeer::ID, $pk); $v = CastleTypePeer::doSelect($criteria, $con); return !empty($v) > 0 ? $v[0] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function getObject($objKey);", "public function getObject($key) {\n\t\treturn $this->objects[$key];\n\t}", "public function getObject($key)\n\t{\n\t\treturn $this->objects[$key];\n\t}", "public function get($primaryKeyValue)\n\t{\n\t\t// Get only one record using the primary key\n\t\treturn $...
[ "0.68439263", "0.6835994", "0.68319094", "0.6721147", "0.6659628", "0.65827423", "0.6582093", "0.6554073", "0.64854956", "0.6440809", "0.6420919", "0.6361671", "0.6356136", "0.63537216", "0.6350474", "0.6330541", "0.6325395", "0.63175493", "0.6307702", "0.62956744", "0.628969...
0.5991566
70
Retrieve multiple objects by pkey.
public static function retrieveByPKs($pks, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(CastleTypePeer::DATABASE_NAME, Propel::CONNECTION_READ); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(CastleTypePeer::DATABASE_NAME); $criteria->add(CastleTypePeer::ID, $pks, Criteria::IN); $objs = CastleTypePeer::doSelect($criteria, $con); } return $objs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveByPKsTableProxy($pPks) {\n $q = $lInvoker->getQuery()->where('id IN ?', $pPks);\n\n return $q->fetch();\n }", "public static function retrieveByPKs($pks, PropelPDO $con = null)\n\t{\n\t\tif ($con === null) {\n\t\t\t$con = Propel::getConnection(MissionPhotoPeer::DATABASE_NAME, Prope...
[ "0.68747616", "0.67442334", "0.6710901", "0.66203785", "0.64334416", "0.6383386", "0.63442695", "0.62873673", "0.6251598", "0.6176803", "0.6059888", "0.6007207", "0.58621407", "0.5809914", "0.5779223", "0.5773636", "0.5767458", "0.5686989", "0.56526375", "0.5648855", "0.56488...
0.58334446
13
Return the Element attributes
public function getAttributes(): array { return $this->attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function attributes()\r\n\t{\r\n\t\treturn $this->attribs;\r\n\t}", "public function attributes()\n\t{\n\t\treturn $this->attribs;\n\t}", "public function getAttributes()\r\n\t{\r\n\t\treturn $this->attr;\r\n\t}", "public function getAttributes() {}", "public function getAttributes();", "public fu...
[ "0.8239562", "0.82319975", "0.80255115", "0.77410644", "0.7740926", "0.7740926", "0.7740926", "0.7740926", "0.7740926", "0.7740926", "0.7740926", "0.7740926", "0.7740926", "0.77401537", "0.76959574", "0.7628231", "0.76194006", "0.7611993", "0.7568354", "0.7568354", "0.7568354...
0.7244388
73
Serialize the Input Element
public function __toString(): string { $html = '<input'; foreach ($this->attributes as $name => $value) { $html .= ' '.htmlspecialchars($name).'="'.htmlspecialchars($value).'"'; } $html .= '/>'; try { if ($this->renderer !== null) { return strval(call_user_func($this->renderer, $this, $html)); } } catch (\Exception $e) { return $e->getMessage(); } return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "protected function _toStrin...
[ "0.63983375", "0.63983375", "0.6396979", "0.6396979", "0.6396979", "0.6396979", "0.6396979", "0.6396979", "0.6385711", "0.6358972", "0.62807244", "0.62807244", "0.62807244", "0.621166", "0.621166", "0.60567355", "0.60351044", "0.5960204", "0.5947147", "0.5947147", "0.594002",...
0.604988
16
Return all serializable properties The renderer closure must be omitted in order to make the input element serializable
public function __sleep() { return ['attributes']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function jsonSerialize() {\r\n\t\treturn $this->props;\r\n\t}", "public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}", "public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}", "public ...
[ "0.6247459", "0.6108671", "0.6108671", "0.61009914", "0.61009717", "0.6100584", "0.6093064", "0.6093064", "0.6093064", "0.6079996", "0.6079996", "0.60757184", "0.60757184", "0.60757184", "0.60757184", "0.60757184", "0.60757184", "0.6051206", "0.60474133", "0.60474133", "0.603...
0.0
-1
Display a listing of the resource.
public function index() { /*$trucks = Truck::with(['type', 'brand', 'service', 'owner'])->get();*/ /*echo json_encode($trucks);*/ return view('maintenance.trucks.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { DB::beginTransaction(); $truck = (new Truck)->fill($request->all()); $truck->status_mileage = $truck->statusMileage(); $truck->save(); /*$user->roles()->attach($request->roles);*/ if($truck){ DB::commit(); return back()->with('success', 'El tractor se ha registrado correctamente.'); }else{ DB::rollBack(); return back()->with('error', 'Ocurrió un problema al registrar el tractor.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72855324", "0.71447515", "0.7132799", "0.6641042", "0.66208744", "0.6566955", "0.65249777", "0.6509032", "0.6447701", "0.63756555", "0.6373163", "0.63650846", "0.63650846", "0.63650846", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.63416...
0.0
-1
Display the specified resource.
public function show($id) { $truck = Truck::findOrFail($id); return view('maintenance.trucks.show')->with(compact('truck')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { DB::beginTransaction(); $truck = Truck::findOrFail($id); $truck->update($request->all()); $truck->status_mileage = $truck->statusMileage(); $truck->save(); $truck->updateSubparts(); if($truck){ DB::commit(); return back()->with('success', 'La información del tractor se ha guardado correctamente.'); }else{ DB::rollBack(); return back()->with('error', 'Ocurrió un problema al guardar la información del tractor.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6671365", "0.6660839", "0.66361386", "0.6632988", "0.6624729", "0.6542195", "0.6541645", "0.6466739", "0.6288393", "0.61767083", "0.6129533", "0.608954", "0.6054169", "0.60443425", "0.60073143", "0.59338665", "0.59317696", "0.592145", "0.5920155", "0.59065086", "0.5897853"...
0.0
-1
Sets the [[$editable]] property.
public function editable(bool $value = true) { $this->editable = $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEditable(bool $editable=true): self;", "public function setEditable($editable = true, $setDefaultValue = true) {}", "public function editable($editable)\n {\n $this->editable = $editable;\n\n return $this;\n }", "public static function setEditable($bool) {\n\t\tself::$e...
[ "0.8299192", "0.80036676", "0.79648817", "0.7821985", "0.76616275", "0.7437074", "0.73750985", "0.7317165", "0.707417", "0.68474936", "0.68474936", "0.6820435", "0.6466342", "0.64517975", "0.63963103", "0.62618643", "0.6154804", "0.6147055", "0.6062777", "0.6032498", "0.60224...
0.6845789
11
Applies the 'ref' param to the query being prepared.
private function _applyRefParam() { if (!$this->ref) { return; } $this->subQuery->andWhere(Db::parseParam('globalsets.handle', $this->ref)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDBRef($ref)\n {\n return $this->__call(__FUNCTION__, func_get_args());\n }", "public function setRef($ref);", "public function byReferenceMatch($ref)\n {\n $this->qb->andWhere('(so.id like :ref ' .\n 'or so.customerReference like :ref ' .\n 'or so...
[ "0.57047206", "0.5651822", "0.5453584", "0.5220829", "0.51574314", "0.5092207", "0.50805503", "0.5037387", "0.5024351", "0.5024351", "0.4988168", "0.4947402", "0.49436864", "0.49435544", "0.49257338", "0.49152496", "0.4907309", "0.4907309", "0.4907309", "0.4907309", "0.488439...
0.77686644
0
Applies the 'editable' param to the query being prepared.
private function _applyEditableParam() { if ($this->editable) { // Limit the query to only the global sets the user has permission to edit $editableSetIds = Craft::$app->getGlobals()->getEditableSetIds(); $this->subQuery->andWhere(['elements.id' => $editableSetIds]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEditable(bool $editable=true): self;", "public function setEditableInColumn(bool $editableInColumn=true): self;", "public function editable($editable)\n {\n $this->editable = $editable;\n\n return $this;\n }", "function _set_editable_fields()\n\t{\n\t\tif (empty($this->...
[ "0.64965355", "0.61671996", "0.61587083", "0.6102476", "0.6025041", "0.5967622", "0.58838236", "0.57766664", "0.5710694", "0.5706289", "0.5664719", "0.5577722", "0.5577722", "0.55641896", "0.55317223", "0.5508274", "0.54628587", "0.52885413", "0.52797174", "0.5232665", "0.521...
0.782693
1
Check if there is a personalized product on car, since it can only have 1 per order
public function addCustomization($id, Request $request) { if ($request->session()->get("customization")) { return redirect()->route('home.index'); } $request->session()->put("customization", $id); $request->session()->increment("amount"); return redirect()->route('cart.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getAlreadyPurchasedProduct()\n {\n // If is Guest then hide the review form\n if (!$this->getCustomerId()) {\n return false;\n }\n try {\n $product = $this->getProductInfo();\n $orders = $this->getCustomerOrders();\n foreac...
[ "0.69714266", "0.69387", "0.69387", "0.69387", "0.69387", "0.69387", "0.6938074", "0.6590187", "0.65435916", "0.6538099", "0.65281963", "0.6456699", "0.62764966", "0.6267356", "0.62625325", "0.6250324", "0.62079585", "0.62074333", "0.6199409", "0.61472803", "0.61160976", "0...
0.0
-1
constructor de la clase
public function __construct() { $db = Db::conectar(); $select = $db->query("SET NAMES 'utf8'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private fun...
[ "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8488931", "0.8399995", "0.8239138", "0.82375413", "0.82375413", ...
0.0
-1
echo("console.log('Dato recibido en el crud: ".$id."');");
public function mostrarlistapoProvincia($id) { $db = Db::conectar(); $listacanton = NULL; $select = $db->prepare("SELECT * FROM `canton` WHERE cantonprovincia=:id"); $select->bindValue('id', $id); $select->execute(); foreach ($select->fetchAll() as $canton1) { $mycanton = new Cantones(); $mycanton->setCantonId($canton1['cantonId']); $mycanton->setCanton($canton1['canton']); $mycanton->setCantoncodigo($canton1['cantoncodigo']); $mycanton->setCantonprovincia($canton1['cantonprovincia']); $mycanton->setCantonAccion($canton1['cantonAccion']); $mycanton->setCantonOculto($canton1['cantonOculto']); $mycanton->setCantonfecha($canton1['cantonfecha']); $mycanton->setCantonuser($canton1['cantonuser']); $listacanton[] = $mycanton; } return $listacanton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mostrar($id)\n {\n //\n }", "public function mostrar($id)\n {\n //\n }", "public function mostrar($id)\n {\n //\n }", "public function mostrar($id)\n {\n //\n }", "public function create($id)\n {\n //\n return \"这里是create:...
[ "0.6631633", "0.6631633", "0.6631633", "0.6631633", "0.6559731", "0.6319244", "0.6294704", "0.62723756", "0.62620556", "0.6233243", "0.62038094", "0.61904967", "0.6169692", "0.6164799", "0.61336243", "0.6120743", "0.60939527", "0.6087867", "0.60790205", "0.6077868", "0.607381...
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('DROP TABLE organisation_client'); $this->addSql('ALTER TABLE client ADD organisation_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C74404559E6B1585 FOREIGN KEY (organisation_id) REFERENCES organisation (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('CREATE INDEX IDX_C74404559E6B1585 ON client (organisation_id)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNE...
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.73290...
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('CREATE TABLE organisation_client (organisation_id INT NOT NULL, client_id INT NOT NULL, PRIMARY KEY(organisation_id, client_id))'); $this->addSql('CREATE INDEX idx_455fde4819eb6921 ON organisation_client (client_id)'); $this->addSql('CREATE INDEX idx_455fde489e6b1585 ON organisation_client (organisation_id)'); $this->addSql('ALTER TABLE organisation_client ADD CONSTRAINT fk_455fde489e6b1585 FOREIGN KEY (organisation_id) REFERENCES organisation (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE organisation_client ADD CONSTRAINT fk_455fde4819eb6921 FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE client DROP CONSTRAINT FK_C74404559E6B1585'); $this->addSql('DROP INDEX IDX_C74404559E6B1585'); $this->addSql('ALTER TABLE client DROP organisation_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo'...
[ "0.79502094", "0.7863702", "0.7606416", "0.7492738", "0.73199725", "0.7245919", "0.7187675", "0.7153845", "0.71537775", "0.71420383", "0.71353674", "0.71216005", "0.7115856", "0.7105365", "0.70985687", "0.7080349", "0.70783705", "0.7072629", "0.7068311", "0.7065529", "0.70536...
0.0
-1
/$feedback = array( 'error_string' => '', 'import_error_string' => '', 'import_message' => '' );
private function addOrders($orders, $totoitems) { $processed_invoices = array(); $wms_orders_created = 0; $oc = 1; foreach($orders as $o) { //check for errors first $this->return_array['debug'] .= "<p>Doing order Number $oc</p>"; $item_error = false; $error_string = ""; $ic = 1; foreach($totoitems[$o['invoice_UIDs'][0]] as $item) { $this->return_array['debug'] .= "<p>Checking item $ic in order Number $oc</p>"; if($item['item_error']) { $item_error = true; $error_string .= $item['item_error_string']; $this->return_array['debug'] .= "<p>Found error for item $ic in order Number $oc</p>"; } ++$ic; } if($item_error) { /**/ $message = "<p>There has been a problem with some items in invoice number(s) {$o['client_order_id']} for {$o['ship_to']}</p>"; $message .= $error_string; $message .= "<p>This has meant all invoices for {$o['ship_to']} have not been imported into the WMS</p>"; ++$this->return_array['error_count']; $this->return_array['error_string'] .= $message; //Send an email regarding the error Email::sendFreedomMYOBError($message); $this->return_array['debug'] .= $message; $this->return_array['debug'] .= "<p>Will continue from item_error in addOrders</p>"; ++$oc; continue; } if($o['import_error']) { $this->return_array['import_error_string'] .= $o['import_error_string']; Email::sendFreedomMYOBError($o['import_error_string']); $this->return_array['debug'] .= $message; $this->return_array['debug'] .= "<p>Will continue from import_error in addOrders</p>"; ++$oc; continue; } //insert the order $vals = array( 'client_order_id' => $o['client_order_id'], 'client_id' => 7, 'deliver_to' => $o['ship_to'], 'date_ordered' => $o['date_ordered'], 'tracking_email' => $o['tracking_email'], 'weight' => $o['weight'], 'delivery_instructions' => $o['instructions'], 'errors' => $o['errors'], 'error_string' => $o['error_string'], 'address' => $o['address'], 'state' => $o['state'], 'suburb' => $o['suburb'], 'postcode' => $o['postcode'], 'country' => $o['country'] ); //save the invoices $pdfs = array(); foreach($o['invoices'] as $base64_pdf) { $tmp_name = "/tmp/".Utility::generateRandString(5).".pdf"; $this_pdf = fopen ($tmp_name,'w'); fwrite ($this_pdf,base64_decode($base64_pdf)); fclose ($this_pdf); //array_push($pdfs,'../tmp/test'.$rowp['id'].'.pdf'); $pdfs[] = array( 'file' => $tmp_name, 'orientation' => 'P' ); } $upcount = 1; $filename = "invoice"; $name = "invoice.pdf"; $upload_dir = "/client_uploads/7/"; if ( ! is_dir(DOC_ROOT.$upload_dir)) mkdir(DOC_ROOT.$upload_dir); while(file_exists(DOC_ROOT.$upload_dir.$name)) { $name = $filename."_".$upcount.".pdf"; ++$upcount; } $pdf = new Mympdf(); $pdf->mergePDFFilesToServer($pdfs, $name, DOC_ROOT.$upload_dir); $uploaded_file = $name; $vals['uploaded_file'] = $uploaded_file; //create the order $itp = array($totoitems[$o['invoice_UIDs'][0]]); //echo "<pre>",print_r($itp),"</pre>"; $order_number = $this->controller->order->addOrder($vals, $itp); ++$wms_orders_created; ++$this->return_array['orders_created']; $this->return_array['import_message'] .="<p>$order_number created</p>"; //send back to MYOB foreach($o['invoice_UIDs'] as $key => $invoice_UID) { if(SITE_LIVE) $this->callTask('markInvoiceSent',array('invoiceUID' => $invoice_UID, 'companyId' => $o['company_file_ids'][$key])); $this->return_array['debug'] .= "<p>will call markInvoiceSent with $invoice_UID and ".$o['company_file_ids'][$key]."</p>"; ++$this->return_array['invoices_processed']; } $processed_invoices[] = $o['client_order_id']; ++$oc; } //die(); //Send email about what happened $s = (count($processed_invoices) > 1)? "s have" : " has"; $wmsos = ($wms_orders_created == 1)? " has": "s have"; $pi_string = implode("<br/>", $processed_invoices); $summary = " <p>The following invoice{$s} been imported into the WMS and {$this->return_array['orders_created']} order{$wmsos} been created</p> <p>$pi_string</p> <p>They have all been marked as 'Sent' in MYOB</p> "; $this->return_array['debug'] .= $summary; //echo "<pre>",print_r($this->return_array),"</pre>"; $this->output .= print_r($this->return_array, true) .PHP_EOL; Email::sendFreedomMYOBSummary($summary); return $this->return_array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_create_feedback() {\n\n $testarray = $this->csv_load($this->oktext);\n $testobject = new phpunit_gradeimport_csv_load_data();\n\n // Try to insert some feedback for an assessment.\n $feedback = $testobject->test_create_feedback($this->courseid, 1, $testarray[0][7]);...
[ "0.6011609", "0.56758916", "0.56024283", "0.5568711", "0.5565254", "0.5564773", "0.5528523", "0.5522762", "0.55080163", "0.54678404", "0.5425131", "0.54142237", "0.5407703", "0.5336138", "0.53295547", "0.5312894", "0.52978855", "0.5262979", "0.52549815", "0.52546734", "0.5253...
0.0
-1
Display a listing of the resource.
public function index() { $surat = Surat::all(); // menampilkan data return view('index')->with('surats', $surat); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { return view('create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'nomor' => 'required', 'kategori' => 'required', 'judul' => 'required', 'file_path' => 'required|file|mimes:csv,txt,xlx,xls,pdf|max:2048', ]); $input = $request->all(); if ($file = $request->file('file_path ')) { $nama_file = $file->getClientOriginalName(); $extension = $file->getClientOriginalExtension(); $ukuran_file = $file->getSize(); $destinationPath = 'pdf/ '; $profileFile = date('YmdHis') . "." . $file->getClientOriginalExtension(); $file->move($destinationPath, $profileFile); $input['file_path '] = "$profileFile "; } Surat::create($input); return redirect()->route('surats.index') ->with('success', 'Surat created successfully.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72855324", "0.71447515", "0.7132799", "0.6641042", "0.66208744", "0.6566955", "0.65249777", "0.6509032", "0.6447701", "0.63756555", "0.6373163", "0.63650846", "0.63650846", "0.63650846", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.63416...
0.0
-1
Display the specified resource.
public function show(Surat $surat) { return view('show', compact('surat')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047...
0.0
-1
Show the form for editing the specified resource.
public function edit(Surat $surat) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Surat $surat) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy(Surat $surat) { $surat->delete(); return redirect()->route('surats.index') ->with('success', 'Surat deleted successfully'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6671365", "0.6660839", "0.66361386", "0.6632988", "0.6624729", "0.6542195", "0.6541645", "0.6466739", "0.6288393", "0.61767083", "0.6129533", "0.608954", "0.6054169", "0.60443425", "0.60073143", "0.59338665", "0.59317696", "0.592145", "0.5920155", "0.59065086", "0.5897853"...
0.0
-1
The XFlickr Constructor. This method is used to create a new XFlickr object.
function __construct(modX &$modx,array $config = array()) { $this->modx =& $modx; $core = $this->modx->getOption('core_path').'components/xflickr/'; $assets_url = $this->modx->getOption('assets_url').'components/xflickr/'; $assets_path = $this->modx->getOption('assets_path').'components/xflickr/'; $this->api_key = $this->modx->getOption('xflickr.api_key'); $this->api_secret = $this->modx->getOption('xflickr.api_secret'); $this->token = $this->modx->getOption('xflickr.token'); $this->config = array_merge(array( 'core_path' => $core, 'model_path' => $core.'model/', 'processors_path' => $core.'processors/', 'controllers_path' => $core.'controllers/', 'chunks_path' => $core.'chunks/', 'base_url' => $assets_url, 'css_url' => $assets_url.'css/', 'js_url' => $assets_url.'js/', 'connector_url' => $assets_url.'connector.php', ),$config); $this->modx->addPackage('xflickr',$this->config['model_path']); if ($this->modx->lexicon) { $this->modx->lexicon->load('xflickr:default'); } /* load debugging settings */ if ($this->modx->getOption('debug',$this->config,false)) { error_reporting(E_ALL); ini_set('display_errors',true); $this->modx->setLogTarget('HTML'); $this->modx->setLogLevel(MODX_LOG_LEVEL_ERROR); $debugUser = $this->config['debugUser'] == '' ? $this->modx->user->get('username') : 'anonymous'; $user = $this->modx->getObject('modUser',array('username' => $debugUser)); if ($user == null) { $this->modx->user->set('id',$this->modx->getOption('debugUserId',$this->config,1)); $this->modx->user->set('username',$debugUser); } else { $this->modx->user = $user; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n parent::__construct();\n $this->flickrApi = new PhpFlickr(env('FLICKR_KEY'));\n }", "function __construct() {\n parent::__construct();\n $params = array('api_key' => FLICKR_API_KEY, 'secret' => FLICKR_API_SECRET, 'die_on_error' => FALSE);\n ...
[ "0.71806526", "0.6607335", "0.65383977", "0.63083553", "0.61423564", "0.59835494", "0.5948731", "0.5912711", "0.5886852", "0.5837859", "0.5786096", "0.5778074", "0.5747876", "0.5714575", "0.5665428", "0.5655477", "0.56364685", "0.56341755", "0.56280804", "0.5624372", "0.55472...
0.6642562
1
Initializes XFlickr based on a specific context.
public function initialize($ctx = 'mgr', $mode = NULL) { $output = ''; switch ($ctx) { case 'mgr': if (!$this->modx->loadClass('xflickr.request.XFlickrControllerRequest',$this->config['model_path'],true,true)) { return 'Could not load controller request handler.'; } $this->request = new XFlickrControllerRequest($this); $output = $this->request->handleRequest(); break; default: if ($mode == 'gallery') { if (!$this->modx->loadClass('xflickr.request.XFlickrGalleryRequest',$this->config['model_path'],true,true)) { return 'Could not load gallery request handler.'; } $this->request = new XFlickrGalleryRequest($this); $output = $this->request->handle(); } elseif ($mode == 'photo') { if (!$this->modx->loadClass('xflickr.request.XFlickrPhotoRequest',$this->config['model_path'],true,true)) { return 'Could not load photo request handler.'; } $this->request = new XFlickrPhotoRequest($this); $output = $this->request->handle(); } break; } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init(&$context){}", "public function init(){\n if( !isset($this->access_token) && !StileroFlickrFrob::hasFrobInGetRequest() ){\n $Url = new StileroFlickrUrl($this->Api);\n $Url->redirectToUrl($this->perms);\n }else if( StileroFlickrFrob::hasFrobInGetRequest() ){\n ...
[ "0.70779985", "0.66616976", "0.6583089", "0.64863724", "0.63623714", "0.6323823", "0.61805415", "0.6180371", "0.61304164", "0.6074767", "0.60057557", "0.59212685", "0.584857", "0.5836375", "0.5836082", "0.58287656", "0.57978916", "0.57814884", "0.5759632", "0.57563806", "0.57...
0.59428114
11
Return a flickr API key
public function getKey() { if (!empty($this->api_key)) { return $this->api_key; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function key(){\n\t\t$api_key = '42b85431eba6a84d17266021e817d2a6';\n\t\treturn $api_key;\n\t}", "public function apiKey(): string;", "function auth_apikey($key){\n\t\n}", "public function getApiKey();", "public function getApiKey(): string;", "public function getAuthKey()\n {\n return $this->a...
[ "0.7157288", "0.68194026", "0.67024386", "0.66979676", "0.6663468", "0.6628972", "0.6603128", "0.6539387", "0.65088016", "0.65013236", "0.64814174", "0.6473108", "0.6407471", "0.6398454", "0.6385424", "0.6373185", "0.63520604", "0.63328654", "0.63153696", "0.629497", "0.62946...
0.62144476
28
Set a flickr API key
public function setKey($key) { if (!empty($key)) { $this->api_key = $key; return TRUE; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAPIKey($key){\r\n\t\t$this->apiKey = $key;\r\n\t}", "public function setApikey()\n {\n $this->apiKey = Config::get('leanpub.API_KEY');\n }", "function update_flickr_api ($old_key, $new_key) {\n\t$rsp_obj = call_flickr_api_method(array(\n\t\t'api_key'\t=> $new_key,\n\t\t'method'\...
[ "0.68618506", "0.6772253", "0.6711389", "0.66141117", "0.65912133", "0.6342721", "0.6261626", "0.6247305", "0.62391657", "0.62362385", "0.62163323", "0.6140565", "0.61288416", "0.6105529", "0.6091902", "0.6091902", "0.60725665", "0.6005807", "0.597735", "0.59685093", "0.59390...
0.0
-1
Return a flickr API shared secret
public function getSecret() { if (!empty($this->api_secret)) { return $this->api_secret; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSharedSecret(): string;", "public function getSecret();", "public function getSecret();", "public function getSecret();", "public function getSecret();", "public function getSecret();", "public function getSecret(): string;", "public function getAppSecret(): string;", "public fun...
[ "0.78256476", "0.7628049", "0.7628049", "0.7628049", "0.7628049", "0.7628049", "0.7483445", "0.7331967", "0.7280122", "0.7280122", "0.7237774", "0.72218317", "0.7036234", "0.6925005", "0.69088495", "0.6892411", "0.6881109", "0.6861281", "0.67965543", "0.67825866", "0.67769206...
0.6621045
37