query
stringlengths 9
43.3k
| document
stringlengths 17
1.17M
| metadata
dict | negatives
sequencelengths 0
30
| negative_scores
sequencelengths 0
30
| document_score
stringlengths 5
10
| document_rank
stringclasses 2
values |
---|---|---|---|---|---|---|
Gets as carParkIdentity The identity of one or a group of car parks. | public function getCarParkIdentity()
{
return $this->carParkIdentity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCarParkIdentity($carParkIdentity)\n {\n $this->carParkIdentity = $carParkIdentity;\n return $this;\n }",
"public function getCarParkOccupancy()\n {\n return $this->carParkOccupancy;\n }",
"public function getCarParkConfiguration()\n {\n return $this->carParkConfiguration;\n }",
"public function getCarParkStatus()\n {\n return $this->carParkStatus;\n }",
"public function getIdentityCard()\n {\n return $this->identity_card;\n }",
"public function getCar()\n {\n return $this->car;\n }",
"public function getIdentity();",
"public function getIdentity();",
"public function getIdentity();",
"public function getIdentity();",
"public function getIdentity()\n {\n return $this->identity;\n }",
"public function getIdentity()\n {\n return $this->identity;\n }",
"public function getIdentity()\n {\n return $this->identity;\n }",
"public function getIdentity() {\n return variable_get('salesforce_identity', FALSE);\n }",
"function getIdNombreParkings() {\n $sql = \"SELECT id,nombre FROM parkings\";\n\n //Preparo la consulta que ejecutaremos en el servidor\n $consulta_parkings = $this->conexionBBDD->prepare($sql,array());\n\n //Ejecuto la consulta\n $consulta_parkings->execute(array());\n\n //Devuelvo el resultado\n return $consulta_parkings->fetchAll(PDO::FETCH_OBJ);\n }",
"public function getCurrentParallelId()\n {\n return $this->current_parallel_id;\n }",
"public function getPilotId()\n {\n return $this->pilot_id;\n }",
"public function getProviderId();",
"public function selectCar() {\n return $this->obj->selectCar() .'====';\n }",
"public function getIdentityResult() {\n return $this->identityResult;\n }",
"public function setCarParkOccupancy($carParkOccupancy)\n {\n $this->carParkOccupancy = $carParkOccupancy;\n return $this;\n }",
"public function getRegionId();",
"public function getIdentityOne() {\n return $this->identityOne;\n }",
"public function getPrimaryGroup();",
"public function getParcelId() {\n return $this->_parcelId;\n }",
"public function getIdCarrito(){\n return $this->idCarrito;\n }",
"public function showAction(Carpark $carpark)\n {\n $editForm = $this->createEditForm($carpark);\n $deleteForm = $this->createDeleteForm($carpark);\n\n return $this->render('carpark/show.html.twig', array(\n 'carpark' => $carpark,\n 'editForm' => $editForm->createView(),\n 'deleteForm' => $deleteForm->createView(),\n ));\n }",
"public function getIdentityCardContrary()\n {\n return $this->identity_card_contrary;\n }",
"public function getIdParte()\r\n {\r\n return $this->idParte;\r\n }",
"public function getContractorId()\n {\n return $this->contractor_id;\n }"
] | [
"0.62097424",
"0.58870816",
"0.55859745",
"0.5416925",
"0.5103615",
"0.50991106",
"0.49477717",
"0.49477717",
"0.49477717",
"0.49477717",
"0.48948237",
"0.48948237",
"0.48948237",
"0.48478752",
"0.48123413",
"0.4797706",
"0.47807908",
"0.47717166",
"0.47691438",
"0.47560498",
"0.4755114",
"0.4678903",
"0.4678556",
"0.46652332",
"0.46498948",
"0.46421248",
"0.46376386",
"0.46184325",
"0.46005183",
"0.45938414"
] | 0.84400886 | 0 |
Sets a new carParkIdentity The identity of one or a group of car parks. | public function setCarParkIdentity($carParkIdentity)
{
$this->carParkIdentity = $carParkIdentity;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCarParkIdentity()\n {\n return $this->carParkIdentity;\n }",
"public function setCarParkConfiguration($carParkConfiguration)\n {\n $this->carParkConfiguration = $carParkConfiguration;\n return $this;\n }",
"protected function setIdentity(Identity $identity)\n {\n $this->identity = true;\n }",
"public function setCarParkOccupancy($carParkOccupancy)\n {\n $this->carParkOccupancy = $carParkOccupancy;\n return $this;\n }",
"public function setParking(?Parking $parking): self\n {\n if ($parking === null && $this->parking !== null) {\n $this->parking->setSalle(null);\n }\n\n // set the owning side of the relation if necessary\n if ($parking !== null && $parking->getSalle() !== $this) {\n $parking->setSalle($this);\n }\n\n $this->parking = $parking;\n\n return $this;\n }",
"public function setCurrentParallelId($var)\n {\n GPBUtil::checkInt32($var);\n $this->current_parallel_id = $var;\n $this->has_current_parallel_id = true;\n\n return $this;\n }",
"function setIdentity(?IIdentity $identity);",
"public function setIdentity($identity = null)\n {\n $this->_identity = $identity;\n }",
"public function setIdentity($identity);",
"public function setCarParkStatus($carParkStatus)\n {\n $this->carParkStatus = $carParkStatus;\n return $this;\n }",
"public function setIdentity($data);",
"public function setIdentityProviderId(?string $identityProviderId) : self\n {\n $this->initialized['identityProviderId'] = true;\n $this->identityProviderId = $identityProviderId;\n return $this;\n }",
"public function setCityID($value){\n\t\t$this->city_id = $value;\t\n\t}",
"function setId($value)\n {\n $this->contract_id=$value;\n }",
"public function setPrincipalId($val)\n {\n $this->_propDict[\"principalId\"] = $val;\n return $this;\n }",
"public function setIdentity($identifier)\n {\n $this->souls->identity = $identifier;\n }",
"public function setAttestationIdentityKey($val)\n {\n $this->_propDict[\"attestationIdentityKey\"] = $val;\n return $this;\n }",
"public function setIdentity($value)\n {\n $this->_identity = $value;\n return $this;\n }",
"public function setIdentity($value)\n {\n $this->_identity = $value;\n return $this;\n }",
"public function setIdentity($value)\n {\n $this->_identity = $value;\n return $this;\n }",
"public function setIdentityToken(?string $identityToken) : self\n {\n $this->identityToken = $identityToken;\n return $this;\n }",
"public function setIdentity($identityValue)\n {\n $this->_identityValue = $identityValue;\n return $this;\n }",
"public function setIdentity(?IdentitySet $value): void {\n $this->getBackingStore()->set('identity', $value);\n }",
"public function setIdCarrito($idCarrito){\n $this->idCarrito = $idCarrito;\n }",
"public function setIdentity(IIdentity $identity = null)\n {\n if ($identity !== null) {\n $identity = new FakeIdentity($identity->getId());\n }\n\n return parent::setIdentity($identity);\n }",
"function claimParcel($parcel_id)\n {\n $this->checkAction('claimParcel');\n\n $sql = \"SELECT owner_id FROM tokens WHERE card_type='parcel' AND card_location='city' AND card_location_arg=$parcel_id\";\n $parcels = $this->getUniqueValueFromDB($sql);\n $is_parcel_claimed = !is_null($parcels);\n\n if ($is_parcel_claimed)\n throw new BgaUserException($this->_('Parcel already claimed'));\n\n $player_id = $this->getActivePlayerId();\n\n $sql = \"UPDATE player SET property_tiles=property_tiles-1 WHERE player_id=$player_id\";\n $this->DbQuery($sql);\n\n $sql = \"INSERT INTO tokens (card_type, card_type_arg, card_location, card_location_arg, owner_id) VALUES ('parcel', -1, 'city', $parcel_id, $player_id)\";\n $this->DbQuery($sql);\n\n [$x, $y] = $this->getCitySquareCoordinates($parcel_id);\n\n $this->notifyAllPlayers('parcelClaimed', clienttranslate('${player_name} claims parcel (${x}, ${y})'), [\n 'player_name' => $this->getActivePlayerName(),\n 'x' => $x,\n 'y' => $y,\n 'parcelId' => $parcel_id\n ]);\n\n $this->gamestate->nextState('parcelClaimed');\n }",
"public function setRegionId(?int $regionId): void;",
"public function creating(Parcel $parcel)\n {\n $parcel->user_id = auth()->user()->id;\n }",
"public function testSetYear($car) {\n\t\t$this->assertInternalType( 'int', $car->setYear() );\n }",
"public function setParallel(int $parallel)\n {\n $this->parallel = $parallel;\n return $this;\n }"
] | [
"0.6493491",
"0.53578293",
"0.5282996",
"0.50619376",
"0.50478786",
"0.49943742",
"0.49694338",
"0.49404463",
"0.49260205",
"0.48853785",
"0.48794055",
"0.47372603",
"0.4696871",
"0.4668326",
"0.46669635",
"0.4664255",
"0.46297818",
"0.4602178",
"0.4602178",
"0.4602178",
"0.46012276",
"0.45887923",
"0.457239",
"0.45350188",
"0.45021927",
"0.44907218",
"0.4488987",
"0.44590077",
"0.44399422",
"0.44381443"
] | 0.7514444 | 0 |
Gets as carParkOccupancy The percentage value of car parking spaces occupied. | public function getCarParkOccupancy()
{
return $this->carParkOccupancy;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function calculateOccupancyStatus()\n {\n $fullShelfCount = 0;\n $hasAddedAnyProducts = false;\n\n /**\n * calculate counts of full shelves\n * determine if there is any products in the cabine\n */\n foreach ($this->shelves as $shelf) {\n if ($shelf->isFull()) {\n $fullShelfCount++;\n } else if ($shelf->isPartiallyFull()) {\n $hasAddedAnyProducts = true;\n }\n }\n\n /**\n * determine occupancy status of the cabinet\n */\n if ($fullShelfCount == count($this->shelves)) {\n $this->occupancyStatus = self::OCCUPANCY_STATUS_FULL;\n } else if ($hasAddedAnyProducts) {\n $this->occupancyStatus = self::OCCUPANCY_STATUS_PARTLY_FULL;\n } else {\n $this->occupancyStatus = self::OCCUPANCY_STATUS_EMPTY;\n }\n }",
"public function getCpuUtilizationPercent()\n {\n return $this->cpu_utilization_percent;\n }",
"public function getOccupation(): string\n {\n return $this->occupation;\n }",
"public function getCarParkStatus()\n {\n return $this->carParkStatus;\n }",
"public function setCarParkOccupancy($carParkOccupancy)\n {\n $this->carParkOccupancy = $carParkOccupancy;\n return $this;\n }",
"public function getNumberOfVacantParkingSpaces()\n {\n return $this->numberOfVacantParkingSpaces;\n }",
"public function getFillingPercentage();",
"public function getSurchargePercent();",
"abstract protected function getFillingPercentage();",
"public function getPourcentage()\n {\n return $this->pourcentage;\n }",
"public function getAirFlowPercent()\n {\n return $this->airFlowPercent;\n }",
"public function organicCost() {\n\t\treturn $this->get(Constants::OC);\n\t}",
"public function getFillingPercentage()\n {\n return 0;\n }",
"public function getPercentage() {\n\t\treturn number_format($this->percentage * 100, 0);\n\t}",
"public function getParkingRate()\n {\n $period = $this->getCurrentPeriod();\n\n return ($period ? $period->getParkingRate() : null);\n }",
"public function getPercentageCompletedAttribute()\n {\n // Get Total count of work items.\n $totalWorkItems = $this->workItemsOfProject()->count();\n\n // No work items.\n if ($totalWorkItems == 0) {\n return '0%';\n }\n\n // Get number of work items which are completed.\n $totalCompletedWorkItems = $this->workItemsOfProject()->where('status', '=', 'closed')->count();\n\n return floor(($totalCompletedWorkItems / $totalWorkItems) * 100).'%';\n }",
"public function getProgressPercentage()\n {\n return $this->progress_percentage;\n }",
"public function cost()\n {\n $cin_date = new \\DateTime($this->check_in);\n $cout_date = new \\DateTime($this->check_out);\n $diff = $cin_date->diff($cout_date);\n\n //multiply p/pn by about of days spent. \n return $this->room->price_per_night * (int)$diff->days;\n }",
"public function getPercentaje()\n {\n return $this->percentaje;\n }",
"public function getOnePercentAmount()\n {\n $maxOobSubclass = $this->getMaxOobSubclass();\n $subclass = $maxOobSubclass['subclass'];\n\n return ($subclass->getTotalAmount() / $subclass->getTargetAllocation());\n }",
"public function getProgressPercent()\n {\n return $this->progress_percent;\n }",
"public function getNodeCpuUsagePercent()\n {\n return $this->node_cpu_usage_percent;\n }",
"public function totalReductionPourcentage(FactureInterface $facture): float;",
"public function getPercent()\r\n {\r\n// $denominator = TaskItem::find()->where(['task_id' => $this->id])->count();\r\n $denominator = $this->getItems()->count();\r\n // add STATUS_IN_PROGRESS and STATUS_COMPLETED\r\n $denominator += 2;\r\n // handle special status STATUS_PENDING_REVIEW\r\n if ($this->review) {\r\n $denominator += 1;\r\n }\r\n if ($denominator == 0)\r\n return 0;\r\n\r\n\r\n $counter = $this->getConfirmedCount();\r\n if (self::isInProgress())\r\n $counter += 1;\r\n elseif (self::isCompleted() && !$this->review)\r\n $counter += 2;\r\n elseif (self::isPendingReview() && $this->review)\r\n $counter += 2;\r\n elseif (self::isCompleted() && $this->review)\r\n $counter += 3;\r\n\r\n return $counter / $denominator * 100;\r\n }",
"public function getCpuUtilization()\n {\n return $this->cpu_utilization;\n }",
"public function inPercent() {\n\t\tif ($this->PreferredUnit->isHRreserve() && $this->canShowInHRrest()) {\n\t\t\treturn $this->inHRrest();\n\t\t}\n\n\t\treturn $this->inHRmax();\n\t}",
"public function health_percent(): int\n {\n return min(100, round(($this->health/$this->getMaxHealth())*100));\n }",
"public function getDetectorperc()\n {\n return $this->detectorperc;\n }",
"public function getLoadPercentage()\n {\n return $this->variant->loadPercentage();\n }",
"public function getParcelsCount() {\n\t\treturn $this->_parcelsCount;\n\t}"
] | [
"0.62207985",
"0.6121584",
"0.60409033",
"0.59491265",
"0.5867078",
"0.5846027",
"0.5791646",
"0.5604397",
"0.55503094",
"0.5514217",
"0.54958105",
"0.54914516",
"0.5467252",
"0.545525",
"0.5444927",
"0.5443579",
"0.54280794",
"0.5424725",
"0.5423644",
"0.5403138",
"0.53874904",
"0.53862494",
"0.537119",
"0.5365106",
"0.5316609",
"0.53051156",
"0.52646697",
"0.5256483",
"0.5256162",
"0.5248594"
] | 0.8405847 | 0 |
Sets a new carParkOccupancy The percentage value of car parking spaces occupied. | public function setCarParkOccupancy($carParkOccupancy)
{
$this->carParkOccupancy = $carParkOccupancy;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCarParkOccupancy()\n {\n return $this->carParkOccupancy;\n }",
"public function setPercentage(?string $percentage): void\n {\n $this->percentage['value'] = $percentage;\n }",
"public function setPercentOfOffer($percentOfOffer)\n {\n if (intval($this->percentOfOffer) !== intval($percentOfOffer)) {\n $this->percentOfOffer = intval($percentOfOffer);\n }\n }",
"public function setProgress(int $percent)\n {\n Job::find($this->job_id)->setProgress($percent);\n }",
"public function setCpuUtilizationPercent($var)\n {\n GPBUtil::checkInt32($var);\n $this->cpu_utilization_percent = $var;\n\n return $this;\n }",
"public function setPercent($percent)\n\t{\n\t\t$this->Permille = 10*$percent;\n\n\t\treturn $this;\n\t}",
"public function setPercent($percent) {\r\n\t\t$this->percent = $percent;\r\n\t}",
"public function setCloudPcFailurePercentage(?float $value): void {\n $this->getBackingStore()->set('cloudPcFailurePercentage', $value);\n }",
"public function setCarParkConfiguration($carParkConfiguration)\n {\n $this->carParkConfiguration = $carParkConfiguration;\n return $this;\n }",
"public function setCarParkStatus($carParkStatus)\n {\n $this->carParkStatus = $carParkStatus;\n return $this;\n }",
"public function setCloudProvisioningScore($val)\n {\n $this->_propDict[\"cloudProvisioningScore\"] = floatval($val);\n return $this;\n }",
"protected function calculateOccupancyStatus()\n {\n $fullShelfCount = 0;\n $hasAddedAnyProducts = false;\n\n /**\n * calculate counts of full shelves\n * determine if there is any products in the cabine\n */\n foreach ($this->shelves as $shelf) {\n if ($shelf->isFull()) {\n $fullShelfCount++;\n } else if ($shelf->isPartiallyFull()) {\n $hasAddedAnyProducts = true;\n }\n }\n\n /**\n * determine occupancy status of the cabinet\n */\n if ($fullShelfCount == count($this->shelves)) {\n $this->occupancyStatus = self::OCCUPANCY_STATUS_FULL;\n } else if ($hasAddedAnyProducts) {\n $this->occupancyStatus = self::OCCUPANCY_STATUS_PARTLY_FULL;\n } else {\n $this->occupancyStatus = self::OCCUPANCY_STATUS_EMPTY;\n }\n }",
"public function setCarParkIdentity($carParkIdentity)\n {\n $this->carParkIdentity = $carParkIdentity;\n return $this;\n }",
"protected function _calculatePercentForProgressBar()\n {\n $this->_currentPercentDoneWork = min(100, ceil(($this->_currentIteration / $this->_countIteration) * 100));\n }",
"public function __construct(Occupant $occupant)\n {\n $this->occupant = $occupant;\n }",
"public function setProgressPercentage($var)\n {\n GPBUtil::checkInt32($var);\n $this->progress_percentage = $var;\n }",
"public function getCarParkStatus()\n {\n return $this->carParkStatus;\n }",
"public function setParking(?Parking $parking): self\n {\n if ($parking === null && $this->parking !== null) {\n $this->parking->setSalle(null);\n }\n\n // set the owning side of the relation if necessary\n if ($parking !== null && $parking->getSalle() !== $this) {\n $parking->setSalle($this);\n }\n\n $this->parking = $parking;\n\n return $this;\n }",
"public function setPourcentage($pourcentage)\n {\n $this->pourcentage = $pourcentage;\n\n return $this;\n }",
"public function setRenewalThresholdPercentage(?int $value): void {\n $this->getBackingStore()->set('renewalThresholdPercentage', $value);\n }",
"public function BuildingOccupancy($type)\r\n {\r\n $this->type = $type;\r\n switch ($type)\r\n {\r\n case BuildingOccupancy::AGR1:\r\n $this->meanCost = 75.95;\r\n $this->squareFootage = 30000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 17;\r\n break;\r\n case BuildingOccupancy::COM1:\r\n $this->meanCost = 82.63;\r\n $this->squareFootage = 11000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 1;\r\n break;\r\n case BuildingOccupancy::COM2:\r\n $this->meanCost = 75.95;\r\n $this->squareFootage = 3000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 2;\r\n break;\r\n case BuildingOccupancy::COM3:\r\n $this->meanCost = 102.34;\r\n $this->squareFootage = 10000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 3;\r\n break;\r\n case BuildingOccupancy::COM4:\r\n $this->meanCost = 133.43;\r\n $this->squareFootage = 80000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 4;\r\n break;\r\n case BuildingOccupancy::COM5:\r\n $this->meanCost = 191.53;\r\n $this->squareFootage = 4100;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 5;\r\n break;\r\n case BuildingOccupancy::COM6:\r\n $this->meanCost = 224.29;\r\n $this->squareFootage = 55000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 6;\r\n break;\r\n case BuildingOccupancy::COM7:\r\n $this->meanCost = 164.18;\r\n $this->squareFootage = 7000;\r\n $this->contentsPercentage = 150;\r\n $this->columnIndex = 7;\r\n break;\r\n case BuildingOccupancy::COM8:\r\n $this->meanCost = 170.51;\r\n $this->squareFootage = 5000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 8;\r\n break;\r\n case BuildingOccupancy::COM9:\r\n $this->meanCost = 122.05;\r\n $this->squareFootage = 12000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 9;\r\n break;\r\n case BuildingOccupancy::COM10:\r\n $this->meanCost = 43.72;\r\n $this->squareFootage = 145000;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 10;\r\n break;\r\n case BuildingOccupancy::EDU1:\r\n $this->meanCost = 115.31;\r\n $this->squareFootage = 130000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 20;\r\n break;\r\n case BuildingOccupancy::EDU2:\r\n $this->meanCost = 144.73;\r\n $this->squareFootage = 50000;\r\n $this->contentsPercentage = 150;\r\n $this->columnIndex = 21;\r\n break;\r\n case BuildingOccupancy::GOV1:\r\n $this->meanCost = 107.28;\r\n $this->squareFootage = 11000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 18;\r\n break;\r\n case BuildingOccupancy::GOV2:\r\n $this->meanCost = 166.59;\r\n $this->squareFootage = 11000;\r\n $this->contentsPercentage = 150;\r\n $this->columnIndex = 19;\r\n break;\r\n case BuildingOccupancy::IND1:\r\n $this->meanCost = 88.28;\r\n $this->squareFootage = 30000;\r\n $this->contentsPercentage = 150;\r\n $this->columnIndex = 11;\r\n break;\r\n case BuildingOccupancy::IND2:\r\n $this->meanCost = 75.95;\r\n $this->squareFootage = 30000;\r\n $this->contentsPercentage = 150;\r\n $this->columnIndex = 12;\r\n break;\r\n case BuildingOccupancy::IND3:\r\n $this->meanCost = 145.07;\r\n $this->squareFootage = 45000;\r\n $this->contentsPercentage = 150;\r\n $this->columnIndex = 13;\r\n break;\r\n case BuildingOccupancy::IND4:\r\n $this->meanCost = 145.07;\r\n $this->squareFootage = 45000;\r\n $this->contentsPercentage = 150;\r\n $this->columnIndex = 14;\r\n break;\r\n case BuildingOccupancy::IND5:\r\n $this->meanCost = 145.07;\r\n $this->squareFootage = 45000;\r\n $this->contentsPercentage = 150;\r\n $this->columnIndex = 15;\r\n break;\r\n case BuildingOccupancy::IND6:\r\n $this->meanCost = 75.95;\r\n $this->squareFootage = 30000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 16;\r\n break;\r\n case BuildingOccupancy::REL1:\r\n $this->meanCost = 138.57;\r\n $this->squareFootage = 17000;\r\n $this->contentsPercentage = 100;\r\n $this->columnIndex = 22;\r\n break;\r\n case BuildingOccupancy::RES1:\r\n $this->meanCost = -1;//@TODO Update\r\n $this->squareFootage = 2000;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 23;\r\n break;\r\n case BuildingOccupancy::RES2:\r\n $this->meanCost = 35.75;\r\n $this->squareFootage = 1063;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 24;\r\n break;\r\n case BuildingOccupancy::RES3A:\r\n $this->meanCost = 79.48;\r\n $this->squareFootage = 3000;\r\n $this->contentsPercentage = 150;\r\n $this->columnIndex = 25;\r\n break;\r\n case BuildingOccupancy::RES3B:\r\n $this->meanCost = 86.6;\r\n $this->squareFootage = 3000;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 26;\r\n break;\r\n case BuildingOccupancy::RES3C:\r\n $this->meanCost = 154.31;\r\n $this->squareFootage = 8000;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 27;\r\n break;\r\n case BuildingOccupancy::RES3D:\r\n $this->meanCost = 137.67;\r\n $this->squareFootage = 12000;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 28;\r\n break;\r\n case BuildingOccupancy::RES3E:\r\n $this->meanCost = 135.39;\r\n $this->squareFootage = 40000;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 29;\r\n break;\r\n case BuildingOccupancy::RES3F:\r\n $this->meanCost = 131.93;\r\n $this->squareFootage = 60000;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 30;\r\n break;\r\n case BuildingOccupancy::RES4:\r\n $this->meanCost = 132.52;\r\n $this->squareFootage = 135000;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 31;\r\n break;\r\n case BuildingOccupancy::RES5:\r\n $this->meanCost = 150.96;\r\n $this->squareFootage = 25000;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 32;\r\n break;\r\n case BuildingOccupancy::RES6:\r\n $this->meanCost = 126.95;\r\n $this->squareFootage = 25000;\r\n $this->contentsPercentage = 50;\r\n $this->columnIndex = 33;\r\n break;\r\n }\r\n }",
"public function __construct($penaltyType = null, $departureStatus = null, $percent = null)\n {\n $this\n ->setPenaltyType($penaltyType)\n ->setDepartureStatus($departureStatus)\n ->setPercent($percent);\n }",
"public function getCpuUtilizationPercent()\n {\n return $this->cpu_utilization_percent;\n }",
"public function setOccupationalCategory($value)\n {\n $this->occupationalCategory = $value;\n }",
"public function taxPercentage() {\n return 20;\n }",
"public function setProgressPercent($var)\n {\n GPBUtil::checkFloat($var);\n $this->progress_percent = $var;\n\n return $this;\n }",
"public function setOccupation(string $occupation): self\n {\n $this->occupation = $occupation;\n\n return $this;\n }",
"public function setGroupCachePercent($percent) {}",
"public function setRamCheckFailedPercentage(?float $value): void {\n $this->getBackingStore()->set('ramCheckFailedPercentage', $value);\n }",
"public function percentage(float $roi, int $percentage): float\n {\n return $roi / 100 * $percentage;\n }"
] | [
"0.6865608",
"0.52943754",
"0.5166341",
"0.5163712",
"0.5157758",
"0.50848705",
"0.50583255",
"0.49890983",
"0.4984212",
"0.49113843",
"0.48886952",
"0.48632294",
"0.4805926",
"0.4782155",
"0.47429007",
"0.47184506",
"0.47048262",
"0.46959263",
"0.46863064",
"0.46251354",
"0.46148166",
"0.4548794",
"0.45092237",
"0.44896024",
"0.4439737",
"0.4421951",
"0.44056904",
"0.43889228",
"0.43780622",
"0.4376391"
] | 0.6653236 | 1 |
Gets as carParkStatus Indicates the status of one or more specified car parks. | public function getCarParkStatus()
{
return $this->carParkStatus;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCarParkStatus($carParkStatus)\n {\n $this->carParkStatus = $carParkStatus;\n return $this;\n }",
"public function getCarParkOccupancy()\n {\n return $this->carParkOccupancy;\n }",
"public function getCarParkConfiguration()\n {\n return $this->carParkConfiguration;\n }",
"public function getCarParkIdentity()\n {\n return $this->carParkIdentity;\n }",
"public function setCarParkConfiguration($carParkConfiguration)\n {\n $this->carParkConfiguration = $carParkConfiguration;\n return $this;\n }",
"public function setCarParkIdentity($carParkIdentity)\n {\n $this->carParkIdentity = $carParkIdentity;\n return $this;\n }",
"public function carStatus()\n {\n return $this->belongsTo('App\\Models\\CarStatus', 'car_plat_number', 'car_plat_number');\n }",
"public function getParcelsCount() {\n\t\treturn $this->_parcelsCount;\n\t}",
"function get_carp_if_status() {\n // Local variables\n global $err_lib, $config;\n $carp_if_stats = [];\n $carp_enabled = is_carp_enabled();\n foreach ($config['virtualip']['vip'] as $carp) {\n if ($carp['mode'] == \"carp\") {\n $carp_if_ent = [];\n $carp_if_ent[\"interface\"] = $carp[\"interface\"];\n $carp_if_ent[\"vhid\"] = $carp['vhid'];\n $carp_if_ent[\"subnet\"] = $carp['subnet'];\n $carp_if_ent[\"subnet_bits\"] = $carp['subnet_bits'];\n $status = get_carp_interface_status(\"_vip{$carp['uniqid']}\");\n if ($carp_enabled == false) {\n $carp_if_ent[\"status\"] = \"disabled\";\n } else {\n if ($status == \"MASTER\") {\n $carp_if_ent[\"status\"] = \"master\";\n } else if ($status == \"BACKUP\") {\n $carp_if_ent[\"status\"] = \"backup\";\n } else if ($status == \"INIT\") {\n $carp_if_ent[\"status\"] = \"init\";\n }\n }\n // Add config to our array\n $carp_if_stats[] = $carp_if_ent;\n }\n }\n // Return our status\n return $carp_if_stats;\n}",
"public function getCarrierStatus() {\n if (! Mage::getStoreConfig ( 'carriers/' . $this->_code . '/active' )) {\n return false;\n }\n }",
"protected function getCityStatus()\n {\n if ($this->tax_information->resident_city !== ''\n && $this->tax_information->primary_nonresident_city !== ''\n && $this->tax_information->resident_city === $this->tax_information->primary_nonresident_city\n && $this->tax_information->secondary_nonresident_city === '') {\n $this->resident_city_only_living_and_working_with_tax = true;\n // resident living in a city that levies a tax and works in another city\n } elseif ($this->tax_information->resident_city !== ''\n && $this->tax_information->primary_nonresident_city === ''\n && $this->tax_information->secondary_nonresident_city === '') {\n $this->resident_city_no_work_has_tax_and_works_in_different_city_with_no_tax = true;\n // nonresident working in a city that levies the local tax but does not live in a city that levies a local tax\n } elseif ($this->tax_information->resident_city === ''\n && $this->tax_information->primary_nonresident_city !== ''\n && $this->tax_information->secondary_nonresident_city === '') {\n $this->resident_city_no_tax_primary_city_has_tax = true;\n // resident living in a city that levies a tax and works in another city that levies a tax\n } elseif ($this->tax_information->resident_city !== ''\n && $this->tax_information->primary_nonresident_city !== ''\n && $this->tax_information->resident_city !== $this->tax_information->primary_nonresident_city\n && $this->tax_information->secondary_nonresident_city === '') {\n $this->resident_city_no_work_has_tax_and_works_in_different_city_with_tax = true;\n // lives AND works in a city that levies a tax AND works in another city that levies a tax\n } elseif ($this->tax_information->resident_city !== ''\n && $this->tax_information->resident_city === $this->getCityName()\n && $this->tax_information->primary_nonresident_city !== ''\n && $this->tax_information->resident_city === $this->tax_information->primary_nonresident_city\n && $this->tax_information->secondary_nonresident_city !== '') {\n $this->resident_city_is_primary_work_city_with_tax_works_in_different_city_with_tax = true;\n // Lives in a city that levies a tax AND works in 2 other cities that both levy a tax\n } elseif ($this->tax_information->resident_city !== ''\n && $this->tax_information->primary_nonresident_city !== ''\n && $this->tax_information->secondary_nonresident_city !== ''\n && $this->tax_information->primary_nonresident_city !== $this->tax_information->secondary_nonresident_city) {\n $this->resident_city_no_work_has_tax_works_in_2_other_cities_that_have_tax = true;\n // Lives in a city with no tax AND works in 2 other cities that both levy a tax\n } elseif ($this->tax_information->resident_city === ''\n && $this->tax_information->primary_nonresident_city !== ''\n && $this->tax_information->secondary_nonresident_city !== ''\n && $this->tax_information->primary_nonresident_city !== $this->tax_information->secondary_nonresident_city) {\n $this->resident_city_no_work_no_tax_works_in_2_other_cities_that_have_tax = true;\n }\n }",
"public function setCarParkOccupancy($carParkOccupancy)\n {\n $this->carParkOccupancy = $carParkOccupancy;\n return $this;\n }",
"public function getCompanyStatus()\n {\n return $this->companyStatus;\n }",
"public function getReportedParkingCar($runTime)\n {\n $sql = \"SELECT p.*, 1 As is_reported, IF(r.anonymous,1,0) As anonymous, r.uid As reported_uid\n FROM parking as p , parking_report AS r WHERE r.pid = p.pid AND p.parked_time <($runTime - 3600) AND r.create_time <($runTime - 3600) ORDER BY p.pid\";\n\n return $this->_rdb->fetchAll($sql);\n }",
"public function getRegionStatus()\n {\n return $this->region_status;\n }",
"public static function getStatus() {\n $status = ['In Progress' => 'In Progress', 'Completed' => 'Completed', 'Pending' => 'Pending',\n 'Not Completed' => 'Not Completed', 'Postponed' => 'Postponed'];\n return $status;\n }",
"public function getCarving()\n {\n return $this->carving;\n }",
"public function getAllProjectStatuses() {\n\n $query = Doctrine_Core::getTable('ProjectStatus')\n ->createQuery('c');\n\n return $query->execute();\n }",
"public function get_status_cpv()\n\t{\n\t\t$case_type = $this->input->post('case_type');\n\t\t$client = $this->input->post('client');\n\t\t$user = '';\n\n\t\techo $this->new_case->get_status_cpv($case_type, $client, $user);\n\t}",
"public function getPossibleStatus() {\n return array('Offen', 'Geschlossen');\n }",
"public function getStatus()\n {\n return $this->variant->cpuStatus();\n }",
"public function index()\n {\n $parkingConditionCatalogue = $this->getEnums(QUERY::PARKING_CONDITION_ENUM);\n $parkingConditionCatalogue = $this ->getCollection($parkingConditionCatalogue);\n \n return $this->showAll($parkingConditionCatalogue);\n }",
"public function static_status_for_courses()\n {\n return (object) [\n (object)[\n 'id' => '1',\n 'name' => 'Nuevo'\n ],\n (object)[\n 'id' => '9',\n 'name' => 'Pendiente'\n ],\n (object)[\n 'id' => '2',\n 'name' => 'Aprobado'\n ],\n (object)[\n 'id' => '13',\n 'name' => 'Activo'\n ],\n (object)[\n 'id' => '11',\n 'name' => 'Asignado'\n ],\n (object)[\n 'id' => '16',\n 'name' => 'En Proceso'\n ],\n (object)[\n 'id' => '12',\n 'name' => 'Finalizado'\n ],\n (object)[\n 'id' => '3',\n 'name' => 'Rechazado'\n ]\n ];\n\n }",
"function getCivilStatuses($con)\n\t{\n\t\t$sql_cstatus = \"SELECT cstatusID, cstatusName FROM civilstatuses\";\n\t\t$stmt_cstatus = sqlsrv_query($con, $sql_cstatus);\n\t\treturn $stmt_cstatus;\n\t}",
"public function getStatus()\n\t{\n\t\tif( isset( $this->values['product.status'] ) ) {\n\t\t\treturn (int) $this->values['product.status'];\n\t\t}\n\n\t\treturn 0;\n\t}",
"public function getProviderStatusAllowableValues()\r\n {\r\n return [\r\n self::PROVIDER_STATUS_ACTIVE,\r\n self::PROVIDER_STATUS_DOWN,\r\n ];\r\n }",
"public function getStatus() {\n\t\t$configuration = $this->module->getConfiguration();\n\n\t\treturn isset($configuration['abuse_ticket_status']) ? $configuration['abuse_ticket_status'] : 'Open';\n\t}",
"public function getStockStatus()\n {\n return $this->stockStatus;\n }",
"function get_status(){\n\t\t$status = ($this->booking_status == 0 && !get_option('dbem_bookings_approval') ) ? 1:$this->booking_status;\n\t\treturn apply_filters('em_booking_get_status', $this->status_array[$status], $this);\n\t}",
"abstract public function get_status();"
] | [
"0.6985754",
"0.66382205",
"0.63376963",
"0.6071728",
"0.5455485",
"0.54540646",
"0.5398589",
"0.5211277",
"0.5122855",
"0.5084619",
"0.505475",
"0.50236696",
"0.49649692",
"0.49059016",
"0.47976747",
"0.47678223",
"0.474898",
"0.4747938",
"0.47411725",
"0.4661025",
"0.46336344",
"0.4626749",
"0.45977658",
"0.45923337",
"0.45839506",
"0.4561813",
"0.45596236",
"0.4546442",
"0.45387602",
"0.4528689"
] | 0.8644064 | 0 |
Sets a new carParkStatus Indicates the status of one or more specified car parks. | public function setCarParkStatus($carParkStatus)
{
$this->carParkStatus = $carParkStatus;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCarParkStatus()\n {\n return $this->carParkStatus;\n }",
"public function setCarParkConfiguration($carParkConfiguration)\n {\n $this->carParkConfiguration = $carParkConfiguration;\n return $this;\n }",
"public function setCarParkIdentity($carParkIdentity)\n {\n $this->carParkIdentity = $carParkIdentity;\n return $this;\n }",
"public function setCarParkOccupancy($carParkOccupancy)\n {\n $this->carParkOccupancy = $carParkOccupancy;\n return $this;\n }",
"public function set_status($p_status){\n\t\t$this->v_status = (int) $p_status;\n\t}",
"public function setStatus(?CloudPcStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }",
"public function set_status($p_status) {\n $this->status = $p_status;\n }",
"public function setHasParkBrake($hasParkBrake): self\n {\n $this->hasParkBrake = $hasParkBrake;\n\n return $this;\n }",
"public function setParking(?Parking $parking): self\n {\n if ($parking === null && $this->parking !== null) {\n $this->parking->setSalle(null);\n }\n\n // set the owning side of the relation if necessary\n if ($parking !== null && $parking->getSalle() !== $this) {\n $parking->setSalle($this);\n }\n\n $this->parking = $parking;\n\n return $this;\n }",
"public function setStatus($iStatus) {\n $this->iStatus = $iStatus;\n }",
"public function setPinks($car_id, $user_id, $pinks_status){\n\t\t$query = \"UPDATE cars SET cars_for_pinks = :pinks_status WHERE cars_id = :car_id AND cars_owner = :user_id\";\n\t\t// Prepare Query\n\t\t$stmt = $this->conn->prepare($query);\n\t\t// Bind Parameters\n\t\t$stmt->bindParam(':pinks_status', $pinks_status, PDO::PARAM_INT);\n\t\t$stmt->bindParam(':car_id', $car_id, PDO::PARAM_INT);\n\t\t$stmt->bindParam(':user_id', $user_id, PDO::PARAM_INT);\n\t\t// Execute Query\n\t\tif ($stmt->execute()) return true;\n\t\t// Error\n\t\telse return false;\n\t}",
"public function setSpaceOccupiedState(int $garage_id, int $level, int $spotNmr, $state){\n global $con;\n $statement = $con->prepare(\"UPDATE `parking_spot` SET `occupation` = :state, `reserve_untill` = NULL WHERE `number` = :spotNmr AND `garage` = :garage_id AND `level` = :level\");\n $statement->bindValue(\":state\",$state);\n $statement->bindValue(\":spotNmr\",$spotNmr);\n $statement->bindValue(\":garage_id\",$garage_id);\n $statement->bindValue(\":level\",$level);\n $statement->execute();\n if($statement->rowCount() == 1){\n $ret['succes'] = true;\n }else{\n $ret['succes'] = false;\n }\n return $ret;\n }",
"public function getCarParkOccupancy()\n {\n return $this->carParkOccupancy;\n }",
"public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }",
"public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }",
"public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }",
"public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }",
"public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }",
"public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }",
"public function updateSalesforceVCStatus($pca, $isNew): void\n {\n switch ($pca->status) {\n case \"succeeded\":\n $vcStatus = $isNew ? \"Clubhouse Record Created\" : \"Clubhouse Record Updated\";\n break;\n case \"reset\":\n $vcStatus = \"Released to Upload\";\n break;\n default:\n return;\n }\n\n $pca->vc_status = $vcStatus;\n\n $this->updateSalesforceField(\n $pca->salesforce_ranger_object_id,\n \"VC_Status__c\",\n $vcStatus\n );\n }",
"function setPiLockStatus($_PiID,$lockstat){\n\t\t$this->pquery(\"UPDATE TABLE PI SET PendLock= :ls WHERE PiID=:piid\",array('ls'=>$lockstat,'piid'=>$_PiID));\n\t}",
"public function GcApi_setPaymentStatus($val)\r\n {\r\n $this->m_gcOrder['PaymentStatus']['val'] = $this->GcApi_KeyStrReplace($val);\r\n }",
"public function set_course_limit_status($on = true);",
"public function setSoortVerwarming($parSoortVerwarming) {\n if (strtolower($parSoortVerwarming) == \"vloerverwarming\" || strtolower($parSoortVerwarming) == \"cv\") {\n $this->_soortVerwarming = $parSoortVerwarming;\n } else {\n $this->_soortVerwarming = 'ERROR';\n echo '<strong>Soorten verwarmingen zijn \"CV\" of \"Vloerverwarming\"</strong><br>';\n }\n }",
"public function setNavisionStatus($navisionStatus);",
"public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n }",
"public function setStatus($status){\n $this->status = $status;\n }",
"public function massStatusAction()\n {\n $curriculumIds = $this->getRequest()->getParam('curriculum');\n if (!is_array($curriculumIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traininglist')->__('Please select training curriculum.')\n );\n } else {\n try {\n foreach ($curriculumIds as $curriculumId) {\n $curriculum = Mage::getSingleton('bs_traininglist/curriculum')->load($curriculumId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d training curriculum were successfully updated.', count($curriculumIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traininglist')->__('There was an error updating training curriculum.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"public function set_status($p_cat_id, $p_status)\n {\n $l_sql = 'UPDATE isys_catg_application_list SET isys_catg_application_list__status = ' . $this->convert_sql_id($p_status) . '\n\t\t\tWHERE isys_catg_application_list__id = ' . $this->convert_sql_id($p_cat_id) . ';';\n\n return ($this->update($l_sql) && $this->apply_update());\n }",
"public function getCarParkConfiguration()\n {\n return $this->carParkConfiguration;\n }"
] | [
"0.66651016",
"0.5951621",
"0.58523",
"0.5127764",
"0.51234263",
"0.49998656",
"0.49777934",
"0.48631334",
"0.47375712",
"0.46868545",
"0.46370375",
"0.46175197",
"0.45757422",
"0.45525518",
"0.45525518",
"0.45525518",
"0.45525518",
"0.45525518",
"0.45525518",
"0.45343468",
"0.45274588",
"0.45114365",
"0.44992727",
"0.4498084",
"0.44647318",
"0.44629517",
"0.44537523",
"0.44495004",
"0.44446677",
"0.44445089"
] | 0.7768665 | 0 |
Gets as exitRate The rate at which vehicles are exiting the car park. | public function getExitRate()
{
return $this->exitRate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setExitRate($exitRate)\n {\n $this->exitRate = $exitRate;\n return $this;\n }",
"public function getRentalRate()\n {\n return $this->rentalRate;\n }",
"public function getParkingRate()\n {\n $period = $this->getCurrentPeriod();\n\n return ($period ? $period->getParkingRate() : null);\n }",
"public function getCalculationRate()\n {\n return $this->calculationRate;\n }",
"public function getCurrencyRate()\n {\n return $this->currencyRate;\n }",
"public function getRate(): float\n {\n return $this->rate;\n }",
"public function getMaxRate()\n {\n return 0;\n }",
"public function getCurrentParkingPrice(){\n\t\treturn($this->qrticketsDAO->getCurrentParkingPrice());\n\t}",
"public function getFieldPriceRate()\n {\n return $this->fieldPriceRate;\n }",
"public function cost()\n {\n $cin_date = new \\DateTime($this->check_in);\n $cout_date = new \\DateTime($this->check_out);\n $diff = $cin_date->diff($cout_date);\n\n //multiply p/pn by about of days spent. \n return $this->room->price_per_night * (int)$diff->days;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getInterestRate()\n {\n return $this->interestRate;\n }",
"public function getCeilingPrice()\n {\n return $this->ceilingPrice;\n }",
"public function getHourlyRate(){\r\n return $this->hourlyRate;\r\n }",
"public function getTargetCurrencyBaseRate()\n {\n return $this->targetCurrencyBaseRate;\n }",
"public function getBaseRate()\n { \n\n return $this->_price;\n }",
"public function getRetailerPrice()\n {\n return $this->retailerPrice;\n }",
"public function getVehicleSeatingCapacity() {\n\t\treturn $this->vehicleSeatingCapacity;\n\t}",
"public function vat_rate()\n\t{\n\t\t// If we are using custom VAT codes module then calculate retail cost based upon this...else use default value from config.\n\t\treturn Caffeine::modules('vat_codes') ? $this->product->vat_code->value : Kohana::config('ecommerce.vat_rate');\n\t}",
"protected function getExchangeRate()\r\n\t{\r\n\t\treturn $this->exchangeRate;\r\n\t}",
"private function lookupShippingRate()\n {\n return 8.90;\n }",
"protected function giveCost()\n\t{\n\t\t$solarSavings=2;\n\t\t$this->valueNow=210.54/$solarSavings;\n\t\t\n\t\treturn $this->valueNow;\n\t}",
"public function getCircumference()\n {\n return 2 * pi() * $this->radius;\n }",
"public function getCarParkOccupancy()\n {\n return $this->carParkOccupancy;\n }",
"public function getPercentageRate()\n {\n return 0;\n }",
"public function getFieldPriceRent()\n {\n return $this->fieldPriceRent;\n }",
"public function getWeightRate()\n {\n return 0;\n }",
"public function getAirItinerary()\n {\n return $this->airItinerary;\n }",
"public function getTravelCarCostsAttribute()\n {\n return $this->program->travel_car_costs;\n }"
] | [
"0.6232894",
"0.553881",
"0.54929227",
"0.5372152",
"0.53624153",
"0.5292914",
"0.52725226",
"0.52499527",
"0.52424073",
"0.5238621",
"0.51752084",
"0.50873524",
"0.50755745",
"0.50556266",
"0.50517625",
"0.5028861",
"0.5023047",
"0.4971436",
"0.49692646",
"0.49228948",
"0.49160758",
"0.4910919",
"0.48813018",
"0.48355573",
"0.48171666",
"0.4814197",
"0.48073313",
"0.47981557",
"0.47683588",
"0.47657785"
] | 0.8098677 | 0 |
Sets a new exitRate The rate at which vehicles are exiting the car park. | public function setExitRate($exitRate)
{
$this->exitRate = $exitRate;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getExitRate()\n {\n return $this->exitRate;\n }",
"public function setRates($rates)\n {\n $this->_rates = $rates;\n }",
"public function setRate(float $rate) : void {\n $this->rate = $rate;\n }",
"public function setInterestRate($interestRate)\n {\n $this->interestRate = floatval($interestRate);\n }",
"public function exit(Request $request) {\n $exitCar = Incomecar::where('id', '=', $request->id)->first();\n\n if($request->out_time !== null) {\n $exitCar->out_time = $request->out_time;\n } else {\n $exitCar->out_time = date(\"H:i:s\");\n }\n \n $exitCar->save();\n return redirect()->route('car-index');\n }",
"public function exitWith(int $exitCode): void\n {\n $this->exitCode = $exitCode;\n }",
"public function setRates(array $rates)\n {\n $this->rates = $rates;\n }",
"function setTaxRate($taxRate) {\n\t\t// Ensures that percent values are changed to decimal\n\t\tif ($taxRate > 1)\n\t\t\t$taxRate = $taxRate / 100;\n\n\t\t$this->taxRate = $taxRate;\n\t\t$this->calcTotal();\n\t}",
"function setShipRate($shipRate, $flat = true) {\n\t\t// Ensures that percent values are changed to decimal\n\t\tif (!$flat && $shipRate > 1)\n\t\t\t$shipRate = $shipRate / 100;\n\n\t\t$this->shipRate = $shipRate;\n\t\t$this->calcTotal();\n\t}",
"public function setBreakfastRates($breakfastRates)\n {\n $this->breakfastRates = $breakfastRates;\n }",
"function setTaxRate($rate=0.0){\r\n\t\t$this->taxRate = $rate;\r\n\t}",
"function setRace($race)\r\n {\r\n $this->race = $race;\r\n }",
"public function setFooter($footer) {\n $this->footer = $footer;\n }",
"public function addExit(RoomExit $exit): void\n {\n $this->exits[] = $exit;\n }",
"public function setFieldPriceRate($fieldPriceRate)\n {\n $this->fieldPriceRate = (string) $fieldPriceRate;\n }",
"public function setRate($rate)\n {\n $this->rate = $rate;\n\n return $this;\n }",
"public function setExitCode(int $exitCode) : self\n {\n $this->initialized['exitCode'] = true;\n $this->exitCode = $exitCode;\n return $this;\n }",
"public function setDefaultHourlyRate(?float $defaultHourlyRate) : self\n {\n $this->defaultHourlyRate = $defaultHourlyRate;\n return $this;\n }",
"public function setCurrencyRate($currencyRate)\n {\n $this->currencyRate = $currencyRate;\n\n return $this;\n }",
"public function destroy(SetPartyRate $setPartyRate)\n {\n //\n }",
"public function setRates(array $rates)\n {\n $this->rates = $rates;\n return $this;\n }",
"public function setRateAttribute($value)\n {\n $this->attributes['rate'] = (double) $value;\n }",
"public function setCompromisedRate(?float $value): void {\n $this->getBackingStore()->set('compromisedRate', $value);\n }",
"public function setDefaultVatRate(?string $defaultVatRate) : self\n {\n $this->defaultVatRate = $defaultVatRate;\n return $this;\n }",
"public function setExitCode(?int $exitCode) : self\n {\n $this->exitCode = $exitCode;\n return $this;\n }",
"function setCurrency($Currency) {\r\n\t\t$this->Currency = $Currency;\r\n\t}",
"function setCurrency($Currency)\r\n\t{\r\n\t\t$this->Currency = $Currency;\r\n\t}",
"public function setYCoordinate($yCoordinate)\n {\n $this->yCoordinate = $yCoordinate;\n }",
"public function __construct(Rate $rate)\n {\n $this->rate = $rate;\n }",
"function setAgeCutoffDay($ageCutoffDay)\n {\n $this->__ageCutoffDay = $ageCutoffDay ;\n }"
] | [
"0.61315995",
"0.5035377",
"0.499021",
"0.49256435",
"0.48944813",
"0.4625708",
"0.4584",
"0.44562453",
"0.4392656",
"0.4391128",
"0.43881264",
"0.438327",
"0.43495238",
"0.4305523",
"0.4242477",
"0.42014936",
"0.42014688",
"0.4127169",
"0.41266114",
"0.41144815",
"0.41113824",
"0.40995172",
"0.40859213",
"0.40479675",
"0.40446982",
"0.40395308",
"0.40325403",
"0.40235606",
"0.40224493",
"0.40116316"
] | 0.77779526 | 0 |
Gets as fillRate The rate at which vehicles are entering the car park. | public function getFillRate()
{
return $this->fillRate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFillingPercentage()\n {\n return 0;\n }",
"public function getFillingPercentage();",
"public function getParkingRate()\n {\n $period = $this->getCurrentPeriod();\n\n return ($period ? $period->getParkingRate() : null);\n }",
"public function getFieldPriceRate()\n {\n return $this->fieldPriceRate;\n }",
"public function getReadableFillingRate()\n {\n $result = null;\n $rate = $this->getFillingRate();\n switch ($rate) {\n case FillingRate::RATE_0_25:\n $result = '0-25 %';\n break;\n case FillingRate::RATE_26_50:\n $result = '26-50 %';\n break;\n case FillingRate::RATE_51_100:\n $result = '51-100 %';\n break;\n case FillingRate::NONE:\n $result = null;\n break;\n default:\n $result = $rate . ' %';\n break;\n }\n return $result;\n }",
"public function setFillRate($fillRate)\n {\n $this->fillRate = $fillRate;\n return $this;\n }",
"public function getRate(): float\n {\n return $this->rate;\n }",
"abstract protected function getFillingPercentage();",
"public function setFillRate($fillRate)\n {\n $this->fillRate = $fillRate;\n\n return $this;\n }",
"public function getBaseRate()\n { \n\n return $this->_price;\n }",
"public function getCalculationRate()\n {\n return $this->calculationRate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getPercentageRate()\n {\n return 0;\n }",
"public function getCurrencyRate()\n {\n return $this->currencyRate;\n }",
"public function getRentalRate()\n {\n return $this->rentalRate;\n }",
"public function getCarving()\n {\n return $this->carving;\n }",
"public function getFillingPercentage()\n {\n if (!$this->_extendedBackend) {\n Zend_Cache::throwException(self::BACKEND_NOT_IMPLEMENTS_EXTENDED_IF);\n }\n return $this->_backend->getFillingPercentage();\n }",
"public function getMaxRate()\n {\n return 0;\n }",
"public function getAirFlowPercent()\n {\n return $this->airFlowPercent;\n }",
"public function getCarParkOccupancy()\n {\n return $this->carParkOccupancy;\n }",
"public function getCurrentParkingPrice(){\n\t\treturn($this->qrticketsDAO->getCurrentParkingPrice());\n\t}",
"protected function giveCost()\n\t{\n\t\t$solarSavings=2;\n\t\t$this->valueNow=210.54/$solarSavings;\n\t\t\n\t\treturn $this->valueNow;\n\t}",
"public function vat_rate()\n\t{\n\t\t// If we are using custom VAT codes module then calculate retail cost based upon this...else use default value from config.\n\t\treturn Caffeine::modules('vat_codes') ? $this->product->vat_code->value : Kohana::config('ecommerce.vat_rate');\n\t}",
"public function getFillRule () {}",
"public function getWeightRate()\n {\n return 0;\n }",
"public function getFrpRecette() {\n return $this->frpRecette;\n }",
"public function getCurrentRate()\n {\n return $this->currentRate()->orderBy('id', 'desc')->first();\n }",
"public function getFieldPriceRent()\n {\n return $this->fieldPriceRent;\n }",
"public function getTargetCurrencyBaseRate()\n {\n return $this->targetCurrencyBaseRate;\n }"
] | [
"0.6296261",
"0.62464607",
"0.62353414",
"0.6232557",
"0.61284167",
"0.6092654",
"0.60355544",
"0.5981451",
"0.5963719",
"0.5892255",
"0.58348167",
"0.58287215",
"0.5788549",
"0.5636648",
"0.55513656",
"0.55507284",
"0.5522961",
"0.54494333",
"0.54345673",
"0.5384645",
"0.535102",
"0.5318468",
"0.5299175",
"0.5282542",
"0.5275616",
"0.5275501",
"0.5232724",
"0.5230182",
"0.52220815",
"0.52105284"
] | 0.7893065 | 1 |
Sets a new fillRate The rate at which vehicles are entering the car park. | public function setFillRate($fillRate)
{
$this->fillRate = $fillRate;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setFillRate($fillRate)\n {\n $this->fillRate = $fillRate;\n\n return $this;\n }",
"public function setRate(float $rate) : void {\n $this->rate = $rate;\n }",
"public function getFillRate()\n {\n return $this->fillRate;\n }",
"public function getFillRate()\n {\n return $this->fillRate;\n }",
"function SetFills($f)\r\n{\r\n $this->fills=$f;\r\n}",
"public function setFillRule ($fill_rule) {}",
"public function fillWith(float $fFill) : self {\n foreach ($this->oValues as $i => $fValue) {\n $this->oValues[$i] = $fFill;\n }\n return $this;\n }",
"public function setAutoFill(string $fill): void\n {\n $this->_autoFill = $fill;\n }",
"function setShipRate($shipRate, $flat = true) {\n\t\t// Ensures that percent values are changed to decimal\n\t\tif (!$flat && $shipRate > 1)\n\t\t\t$shipRate = $shipRate / 100;\n\n\t\t$this->shipRate = $shipRate;\n\t\t$this->calcTotal();\n\t}",
"public function fill ($float){\n\t\t$this -> tank += $float;\n\t\treturn $this;\n\t\t}",
"public function setCompromisedRate(?float $value): void {\n $this->getBackingStore()->set('compromisedRate', $value);\n }",
"public function setDefaultVatRate(?string $defaultVatRate) : self\n {\n $this->defaultVatRate = $defaultVatRate;\n return $this;\n }",
"public function setRate(float $rate): self\n {\n $this->rate = $rate;\n\n return $this;\n }",
"public function setRate($rate)\n {\n $this->rate = $rate;\n\n return $this;\n }",
"public function setDefaultHourlyRate(?float $defaultHourlyRate) : self\n {\n $this->defaultHourlyRate = $defaultHourlyRate;\n return $this;\n }",
"public function setFieldPriceRate($fieldPriceRate)\n {\n $this->fieldPriceRate = (string) $fieldPriceRate;\n }",
"public function fillWithGas();",
"public function setRates($rates)\n {\n $this->_rates = $rates;\n }",
"public function setRateAttribute($value)\n {\n $this->attributes['rate'] = (double) $value;\n }",
"public function setBreakfastRates($breakfastRates)\n {\n $this->breakfastRates = $breakfastRates;\n }",
"public function setDefaultHourlyRate(?float $defaultHourlyRate): self\n {\n $this->initialized['defaultHourlyRate'] = true;\n $this->defaultHourlyRate = $defaultHourlyRate;\n\n return $this;\n }",
"function setTaxRate($rate=0.0){\r\n\t\t$this->taxRate = $rate;\r\n\t}",
"function setTaxRate($taxRate) {\n\t\t// Ensures that percent values are changed to decimal\n\t\tif ($taxRate > 1)\n\t\t\t$taxRate = $taxRate / 100;\n\n\t\t$this->taxRate = $taxRate;\n\t\t$this->calcTotal();\n\t}",
"public function setPrice($price): void\n {\n $this->price = $price;\n }",
"public function setRating($rating)\n\t\t{\n\t\t\t$this->rating = $rating;\n\t\t}",
"public function setPrice($price) {\n $this->price = $price;\n }",
"public function __construct(Rate $rate)\n {\n $this->rate = $rate;\n }",
"function setPrice($price){\n $this->price = $price;\n }",
"public function edit(SetPartyRate $setPartyRate)\n {\n //\n }",
"public function setPrice($price)\n {\n $this->_price = $price;\n }"
] | [
"0.69870967",
"0.6062185",
"0.5968341",
"0.5968341",
"0.5814972",
"0.57042617",
"0.5696718",
"0.5657748",
"0.5522681",
"0.5354492",
"0.5349732",
"0.53040874",
"0.52699435",
"0.51441675",
"0.5043954",
"0.50373787",
"0.5037147",
"0.502305",
"0.49968302",
"0.49305043",
"0.48678607",
"0.48559794",
"0.48503223",
"0.48259878",
"0.4812428",
"0.4809342",
"0.47940335",
"0.4793443",
"0.4739776",
"0.47025785"
] | 0.71267843 | 0 |
Gets as numberOfVacantParkingSpaces Indicates the number of vacant parking spaces available in a specified parking area. | public function getNumberOfVacantParkingSpaces()
{
return $this->numberOfVacantParkingSpaces;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setNumberOfVacantParkingSpaces($numberOfVacantParkingSpaces)\n {\n $this->numberOfVacantParkingSpaces = $numberOfVacantParkingSpaces;\n return $this;\n }",
"public function getOccupiedSpaces()\n {\n return $this->occupiedSpaces;\n }",
"public function getParcelsCount() {\n\t\treturn $this->_parcelsCount;\n\t}",
"public function getAvailableSpace();",
"public function getFreeSlots() {\n\n // Count number of free slots.\n $jobs = $this->getRunningJobs();\n $running = count($jobs);\n $num_slots = $this->max_slots - $running;\n if ($num_slots < 0) {\n $num_slots = 0;\n }\n return $num_slots;\n }",
"public function getSpaceCount() :int\n {\n return (int) $this->getTotalCount() - $this->countRegistrationPerson();\n }",
"public function getNumberOfPlaces()\n {\n return $this->numberOfSeats;\n }",
"public function getCarParkOccupancy()\n {\n return $this->carParkOccupancy;\n }",
"public function getFreeSlotsNumber() {\n return self::SLOT_PER_TOWN - $this->buildings->count() - $this->buildingsQueue->count();\n }",
"public function occupiedSlotsCount()\n {\n return $this->model->where('free', 0)->with('vehicle','vehicle.vehicle_type')->get()->sum('vehicle.vehicle_type.slots');\n }",
"public function getNumberOfRooms(){\n\t\treturn $this->numberOfRooms;\n\t}",
"public function getNumberOfRooms() {\n\t\treturn $this->numberOfRooms;\n\t}",
"public function getPositionsCount()\n\t{\n\t\t$total = 0;\n\n\t\tif ($this->positions) {\n\t\t\tforeach ($this->positions as $position) {\n\t\t\t\t$total += ($position->total_positions ? $position->total_positions : 0);\n\t\t\t}\n\t\t}\n\n\t\treturn $total;\n\t}",
"public function getPendingReservationsCount() {\n\t\t$dao = $this->getServiceLocator()->get('dao_booking_booking');\n\t\treturn $dao->getPendingReservationsCount();\n\t}",
"public function count()\n {\n return count($this->areas);\n }",
"public function getRoomsLeftCount()\n {\n return $this->roomsLeftCount;\n }",
"static function cantidad_procesos_totales_finalizados(){\n return $cantidad_procesos = DB::table('proceso_contractuals')\n ->Where('estado','Finalizado')\n ->count();\n }",
"function getSpace() {\n\t$getSpaceApi = array( //TODO replace with API call\n\t\t'totalSpace' => 40,\n\t\t'spaceUsed' => 10\n\t);\n\tif (is_int($getSpaceApi['spaceUsed']) && is_int($getSpaceApi['totalSpace'])) {\n\t\t$percentUsed = ($getSpaceApi['spaceUsed'] / $getSpaceApi['totalSpace']) * 100;\n\t\t$spaceLeft = $getSpaceApi['totalSpace'] - $getSpaceApi['spaceUsed'];\n\t}\n\telse {\n\t\t$percentUsed = 'Error: Space could not be calculated. Please contact an administrator.';\n\t\t$spaceLeft = '~~~';\n\t}\n\n\treturn array('percentUsed' => $percentUsed, 'spaceLeft' => $spaceLeft);\n}",
"public function getTotalAvailableSlots()\n {\n $tot = (\n $this->getTotalSupportedClients()\n - $this->getUsedSlots()\n - $this->getQueuedSlots()\n );\n if ($tot < 1) {\n return 0;\n }\n return $tot;\n }",
"protected function countEachParkCategory($area='') \n {\n $count = array();\n\n foreach ($this->parkCategories as $category) {\n if($area){\n $items = $this->getParkAreaItems();\n } else {\n $items = $this->getParkItems();\n }\n $count[$category] = $this->countByCategory($category, $items);\n }\n\n return $count;\n }",
"public function position_count()\n {\n return count($this->positions);\n }",
"public function getFreeSpacesFromGarage($id){\n global $con;\n $statement = $con->prepare(\"SELECT * FROM `parking_spot` WHERE `occupation` = 0 AND `garage` = :garage_id AND `reserve_untill` IS NULL\");\n $statement->bindValue(\":garage_id\",$id);\n $statement->execute();\n $count = $statement->fetchAll(PDO::FETCH_ASSOC);\n return $count;\n }",
"public function getAreaVentas()\n {\n return $this->areaVentas;\n }",
"public function getTotalnbemplacement(): int\n {\n return $this->totalnbemplacement;\n }",
"public function getVacancies(){\n return 0;\n $service = Yii::$app->params['ServiceName']['JobsList'];\n $filter = [\n 'No_of_Posts' => '>0',\n ];\n $result = Yii::$app->navhelper->getData($service,$filter);\n\n //Yii::$app->recruitment->printrr($result);\n if(is_object($result) || is_string($result)){//RETURNS AN EMPTY object if the filter result to false\n return 0;\n }\n return count($result);\n }",
"public function getAvailableSlots()\n {\n return $this->availableSlots;\n }",
"public function getSpace()\n {\n return $this->readOneof(10);\n }",
"public function getCountBoxes(): int\n {\n return $this->box->count();\n }",
"public function queryCountOccupiedHostsForGame($game){\n if(!SL::Services()->validationService->validateParams([\"Game\" => [$game]],__METHOD__)){\n return null;\n }\n $hostRid = GlobalsService::getInstance()->getGameHostRoleRid();\n $sql = \"SELECT COUNT(*) FROM mafia.seats LEFT JOIN mafia.roles ON seats.role_id = roles.id WHERE seats.player_id IS NOT NULL AND seats.game_id = ? AND roles.rid = ?;\";\n $stmt = SL::Services()->connection->getConnection()->prepare($sql);\n $stmt->bindParam(1, $game->id, PDO::PARAM_INT);\n $stmt->bindParam(2, $hostRid, PDO::PARAM_STR);\n $stmt->execute();\n return (int)$stmt->fetchColumn();\n }",
"public function totalActive() {\n\t\treturn $this->getActiveDepartments()->count();\n\t}"
] | [
"0.673818",
"0.5964877",
"0.5846144",
"0.57048655",
"0.5669777",
"0.5561067",
"0.5514102",
"0.5498545",
"0.5498498",
"0.53665483",
"0.51852137",
"0.51705927",
"0.51467603",
"0.505599",
"0.50406754",
"0.5038095",
"0.5003278",
"0.4981123",
"0.497555",
"0.49557707",
"0.49103612",
"0.49092662",
"0.4886541",
"0.48828396",
"0.48641837",
"0.4845711",
"0.48422736",
"0.48420438",
"0.48338124",
"0.48136005"
] | 0.88179046 | 0 |
Sets a new numberOfVacantParkingSpaces Indicates the number of vacant parking spaces available in a specified parking area. | public function setNumberOfVacantParkingSpaces($numberOfVacantParkingSpaces)
{
$this->numberOfVacantParkingSpaces = $numberOfVacantParkingSpaces;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNumberOfVacantParkingSpaces()\n {\n return $this->numberOfVacantParkingSpaces;\n }",
"public function setNumberOfPlaces($numberOfSeats)\n {\n $this->numberOfSeats = $numberOfSeats;\n\n return $this;\n }",
"public function setNumberOfRooms(Property\\NumberOfRoomsProperty $numberOfRooms) {\n\t\t$this->numberOfRooms = $numberOfRooms;\n\n\t\treturn $this;\n\t}",
"public function setRemainigVacancies($remainigVacancies) {\r\n $this->remainigVacancies = $remainigVacancies;\r\n }",
"public function setFreeVideos($amount) {\n $this->freeAmount[\"videos\"] = $amount;\n }",
"public function getParcelsCount() {\n\t\treturn $this->_parcelsCount;\n\t}",
"public function setNumberOfPermits($var)\n {\n GPBUtil::checkInt64($var);\n $this->number_of_permits = $var;\n\n return $this;\n }",
"public function setNumberOfPermits($var)\n {\n GPBUtil::checkInt64($var);\n $this->number_of_permits = $var;\n\n return $this;\n }",
"public function setMaxRoomCount($maxRoomCount)\n {\n $this->maxRoomCount = $maxRoomCount;\n }",
"public function getFreeSlotsNumber() {\n return self::SLOT_PER_TOWN - $this->buildings->count() - $this->buildingsQueue->count();\n }",
"public function setNumSpaces(int $numSpaces): self\n {\n $this->spaces = \\str_repeat(' ', $numSpaces);\n $this->numSpaces = $numSpaces;\n\n return $this;\n }",
"public function setMaxSlots($slots) {\n $this->max_slots = $slots;\n }",
"public function setNumberOfPages($numberOfPages)\n\t{\n\t\t$this->numberOfPages = $numberOfPages;\n\t}",
"public function setOccupiedSpaces($occupiedSpaces)\n {\n $this->occupiedSpaces = $occupiedSpaces;\n return $this;\n }",
"public function setNumberOfVolumes($numberOfVolumes)\n {\n $this->numberOfVolumes = $numberOfVolumes;\n return $this;\n }",
"public function setSpace($var)\n {\n GPBUtil::checkMessage($var, \\Eolymp\\Universe\\Space::class);\n $this->writeOneof(10, $var);\n\n return $this;\n }",
"public function setNumberOfPlayers(Property\\NumberOfPlayers $numberOfPlayers) {\n\t\t$this->numberOfPlayers = $numberOfPlayers;\n\n\t\treturn $this;\n\t}",
"public function setTasksAssignedCount($count)\n {\n $this->_tasksAssignedCount = (int) $count;\n }",
"public function setTotalnbemplacement(int $totalnbemplacement): self\n {\n $this->totalnbemplacement = $totalnbemplacement;\n\n return $this;\n }",
"public function getFreeSlots() {\n\n // Count number of free slots.\n $jobs = $this->getRunningJobs();\n $running = count($jobs);\n $num_slots = $this->max_slots - $running;\n if ($num_slots < 0) {\n $num_slots = 0;\n }\n return $num_slots;\n }",
"public function setRoomsLeftCount($roomsLeftCount)\n {\n $this->roomsLeftCount = $roomsLeftCount;\n }",
"public function __construct(int $vacancyId, int $areaId)\n {\n $this->areaId = $areaId;\n $this->vacancyId = $vacancyId;\n }",
"public function setPageCount($pageN);",
"public function testSetNbPrelevements() {\n\n $obj = new Banques();\n\n $obj->setNbPrelevements(10);\n $this->assertEquals(10, $obj->getNbPrelevements());\n }",
"public function setNewDigressOutSlots($val) {\n $this->_new_digress_out_slots = $val;\n }",
"public function getOccupiedSpaces()\n {\n return $this->occupiedSpaces;\n }",
"public function getCarParkOccupancy()\n {\n return $this->carParkOccupancy;\n }",
"public function setReserveSpace($reserveSpace) {\n $this->reserveSpace = $reserveSpace;\n return $this;\n }",
"public function setMemberCount($int) {\n\t\t$this->memberCount = $int;\n\t}",
"public function asignarNivelDeficiencia()\n\t{\n\t\tif($this->evaluacion_riesgo_nivel_deficiencia==1)\n\t\t{\n\t\t\t$this->evaluacion_riesgo_nivel_deficiencia=2;\n\t\t}\n\t\telseif($this->evaluacion_riesgo_nivel_deficiencia==2)\n\t\t{\n\t\t\t$this->evaluacion_riesgo_nivel_deficiencia=6;\n\t\t}\n\t\tif($this->evaluacion_riesgo_nivel_deficiencia==3)\n\t\t{\n\t\t\t$this->evaluacion_riesgo_nivel_deficiencia=10;\n\t\t}\n\t}"
] | [
"0.7483599",
"0.47949994",
"0.46233237",
"0.45530012",
"0.43704012",
"0.43403625",
"0.4316459",
"0.4316459",
"0.43091372",
"0.4291131",
"0.42719102",
"0.42643502",
"0.42619967",
"0.42607945",
"0.42450255",
"0.42213088",
"0.41832656",
"0.4173776",
"0.4143387",
"0.41418764",
"0.41292036",
"0.41282648",
"0.4112511",
"0.4106098",
"0.40694904",
"0.40642145",
"0.40525645",
"0.40483057",
"0.40078196",
"0.39952493"
] | 0.78340924 | 0 |
Gets as occupiedSpaces Number of currently occupied spaces. | public function getOccupiedSpaces()
{
return $this->occupiedSpaces;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSpaceCount() :int\n {\n return (int) $this->getTotalCount() - $this->countRegistrationPerson();\n }",
"public function getAvailableSpace();",
"public function getFreeSlotsNumber() {\n return self::SLOT_PER_TOWN - $this->buildings->count() - $this->buildingsQueue->count();\n }",
"public function getFreeSlots() {\n\n // Count number of free slots.\n $jobs = $this->getRunningJobs();\n $running = count($jobs);\n $num_slots = $this->max_slots - $running;\n if ($num_slots < 0) {\n $num_slots = 0;\n }\n return $num_slots;\n }",
"public function count() :int\n {\n return count($this->occupiedWorkers) + count($this->freeWorkers);\n }",
"public function getNumberOfVacantParkingSpaces()\n {\n return $this->numberOfVacantParkingSpaces;\n }",
"public function getNumberOfRooms() {\n\t\treturn $this->numberOfRooms;\n\t}",
"public function getRoomsLeftCount()\n {\n return $this->roomsLeftCount;\n }",
"public function occupiedSlotsCount()\n {\n return $this->model->where('free', 0)->with('vehicle','vehicle.vehicle_type')->get()->sum('vehicle.vehicle_type.slots');\n }",
"public function getSpaceReclaimed() : int\n {\n return $this->spaceReclaimed;\n }",
"public function getNumberOfRooms(){\n\t\treturn $this->numberOfRooms;\n\t}",
"public function getCount()\r\n\t{\r\n\t\treturn count($this->screens);\r\n\t}",
"public function getTotalAllocated()\n\t{\n\t\treturn $this->total_allocated;\n\t}",
"public function getUsedSlots()\n {\n if (isset(self::$_used['tot'])) {\n return (int)self::$_used['tot'];\n }\n return (int)self::$_used['tot'] = self::getClass('TaskManager')\n ->count(\n array(\n 'stateID' => self::getProgressState(),\n 'storagenodeID' => $this->get('enablednodes'),\n 'typeID' => $this->get('usedtasks'),\n )\n );\n }",
"public function getSize()\n {\n return count($this->stones);\n }",
"public function getTotalAvailableSlots()\n {\n $tot = (\n $this->getTotalSupportedClients()\n - $this->getUsedSlots()\n - $this->getQueuedSlots()\n );\n if ($tot < 1) {\n return 0;\n }\n return $tot;\n }",
"public function count()\n {\n return count($this->areas);\n }",
"public function getSpaceInfo()\n {\n $box = $this->_getBox();\n $info = $box->getSpaceUsage();\n $usedSpace = intval($info[\"used\"]);\n $availSpace = intval($info[\"allocation\"][\"allocated\"]);\n\n return [$usedSpace, $availSpace];\n }",
"public function getSpace()\n {\n return $this->readOneof(10);\n }",
"public static function getAvailableMemory()\n {\n return self::getMemoryLimit() - self::getMemoryUsage();\n }",
"public function getUnassignedShards(): int\n {\n return $this->_data['unassigned_shards'];\n }",
"public function position_count()\n {\n return count($this->positions);\n }",
"public function getGrossQtyAllocated()\n {\n return $this->getQtyAllocated() + $this->getQtyDelivered();\n }",
"public function count()\n {\n return sizeOf($this->_legs);\n }",
"public function getFreeWorkers() {\n\t\t$this->collectWorkerResults();\n\t\treturn $this->workerProcesses->getFreeProcessesCount();\n\t}",
"function getSpace() {\n\t$getSpaceApi = array( //TODO replace with API call\n\t\t'totalSpace' => 40,\n\t\t'spaceUsed' => 10\n\t);\n\tif (is_int($getSpaceApi['spaceUsed']) && is_int($getSpaceApi['totalSpace'])) {\n\t\t$percentUsed = ($getSpaceApi['spaceUsed'] / $getSpaceApi['totalSpace']) * 100;\n\t\t$spaceLeft = $getSpaceApi['totalSpace'] - $getSpaceApi['spaceUsed'];\n\t}\n\telse {\n\t\t$percentUsed = 'Error: Space could not be calculated. Please contact an administrator.';\n\t\t$spaceLeft = '~~~';\n\t}\n\n\treturn array('percentUsed' => $percentUsed, 'spaceLeft' => $spaceLeft);\n}",
"public function getTotalSpace()\n {\n $redis = $this->getRedisResource();\n try {\n $info = $redis->info();\n } catch (RedisResourceException $e) {\n throw new Exception\\RuntimeException($redis->getLastError(), $e->getCode(), $e);\n }\n\n return $info['used_memory'];\n }",
"public function numGroups()\n {\n return count($this->groups());\n }",
"public function getNetQtyAllocated()\n {\n return $this->getQtyAllocated();\n }",
"public function getMaxRoomCount()\n {\n return $this->maxRoomCount;\n }"
] | [
"0.71060604",
"0.6774916",
"0.66750884",
"0.66583604",
"0.65545815",
"0.6456421",
"0.63919544",
"0.63906395",
"0.6378291",
"0.6367475",
"0.6247278",
"0.6194235",
"0.6151457",
"0.60681814",
"0.6025291",
"0.60190576",
"0.59886426",
"0.5978646",
"0.59719723",
"0.59270334",
"0.5877661",
"0.58492756",
"0.5818796",
"0.57949114",
"0.5794067",
"0.5790863",
"0.57889545",
"0.578124",
"0.5775535",
"0.5759827"
] | 0.80678743 | 0 |
Sets a new occupiedSpaces Number of currently occupied spaces. | public function setOccupiedSpaces($occupiedSpaces)
{
$this->occupiedSpaces = $occupiedSpaces;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOccupiedSpaces()\n {\n return $this->occupiedSpaces;\n }",
"public function setNumSpaces(int $numSpaces): self\n {\n $this->spaces = \\str_repeat(' ', $numSpaces);\n $this->numSpaces = $numSpaces;\n\n return $this;\n }",
"public function check_free_spaces_are_added_to_created_grid()\n {\n $mines_positions = [\n 1 => [4] ,\n 2 => [1] ,\n 3 => [4],\n 4 => [3],\n 5 => [4]\n ];\n\n $this->get_grid(7, 7, $mines_positions, 'SUPER EASY');\n $this->assertDatabaseHas('grids',[\n 'free_spaces' => 44,\n 'finalized' => null\n ]);\n }",
"public function setNumberOfGridUnits($num = 4) {\n $this->attrs()->set('data-grid-num', $num);\n return $this;\n }",
"public function incrementAvailableSlots()\n {\n $availableSlots = $this->getAvailableSlots() + 1;\n\n if ($availableSlots <= $this->getMaxSlots()) {\n $this->setAvailableSlots($availableSlots);\n }\n\n return $this;\n }",
"public function getAvailableSpace();",
"private function setUpGapsNumber()\n\t{\n\t\t$is_no_gaps_needed = ($this->items_number % $this->columns_number !== 0);\n\t\t\n\t\t$this->gaps_number = ($is_no_gaps_needed) ? $this->columns_number - ($this->items_number % $this->columns_number) : 0;\n\t}",
"public function getSpace()\n {\n return $this->readOneof(10);\n }",
"public function setReserveSpace($reserveSpace) {\n $this->reserveSpace = $reserveSpace;\n return $this;\n }",
"public function getNumberOfVacantParkingSpaces()\n {\n return $this->numberOfVacantParkingSpaces;\n }",
"public function getFreeSlotsNumber() {\n return self::SLOT_PER_TOWN - $this->buildings->count() - $this->buildingsQueue->count();\n }",
"public function adjustAllocationsToMatchQtyRemaining()\n {\n $toAdjust = $this->getQtyUnallocated();\n foreach ( $this->allocations as $alloc ) {\n if ( $toAdjust >= 0 ) {\n return;\n }\n $toAdjust -= $alloc->adjustQuantity($toAdjust);\n }\n assertion($toAdjust >= 0, \"alloc qty left to adjust: $toAdjust\");\n }",
"public function listSpaces($optParams = [])\n {\n $params = [];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListSpacesResponse::class);\n }",
"public function getUnassignedShards(): int\n {\n return $this->_data['unassigned_shards'];\n }",
"public function setSpace($var)\n {\n GPBUtil::checkMessage($var, \\Eolymp\\Universe\\Space::class);\n $this->writeOneof(10, $var);\n\n return $this;\n }",
"public function setCapacity(?int $value): void {\n $this->getBackingStore()->set('capacity', $value);\n }",
"private function initiallize(){\n $this->grid = array();\n\n for($pos_x = 0; $pos_x < $this->grid_size; $pos_x++){\n\n for($pos_y = 0; $pos_y < $this->grid_size; $pos_y++) {\n $this->grid[ $pos_x ][ $pos_y ] = 'W';\n }\n }\n }",
"public function allocateTo($n);",
"public function setNumberOfRooms(Property\\NumberOfRoomsProperty $numberOfRooms) {\n\t\t$this->numberOfRooms = $numberOfRooms;\n\n\t\treturn $this;\n\t}",
"function updateRooms($con, $this_room, $hostel, $data, &$error){\n $no_sharing = $data['no_sharing'];\n $hostel_no = $hostel['hostel_no'];\n \n $no_occupied = $this_room['no_occupied'];//Is incremented\n $room_no = $this_room['room_no'];\n \n /*\n * The math\n */\n $no_occupied -= 1;\n $spaces = $no_sharing - $no_occupied;\n \n $query = 'UPDATE `room_allocation` SET `no_occupied`= ? ,`spaces`= ? '\n . 'WHERE room_no = ? AND hostel_no = ? ';\n $stmt = $con->prepare($query);\n $stmt->bind_param(\"ssss\", $no_occupied, $spaces, $room_no, $hostel_no);\n \n $bool = $stmt->execute();\n\n if($bool == false){\n array_push($error, $con->error);\n }\n \n}",
"public function spaces()\n {\n return $this->hasMany('App\\Space', 'floor_id', 'floor_id');\n }",
"public function getSpaces();",
"public function occupiedSlotsCount()\n {\n return $this->model->where('free', 0)->with('vehicle','vehicle.vehicle_type')->get()->sum('vehicle.vehicle_type.slots');\n }",
"public function setWidths(... $widths) {\n $widths = Arrays::flatten($widths);\n $filtered = preg_grep('/^((small|medium|large|xlarge|xxlarge)-up-([1-9]|(1[0-2])))+$/', $widths);\n foreach ($filtered as $width) {\n $parts = explode('-', $width);\n $this->unsetGrid($parts[0]);\n $this->cssClasses()->add($width);\n }\n return $this;\n }",
"public function resetNumberRanges();",
"public function useAll($Space);",
"public function setAdministrativeUnits(?array $value): void {\n $this->getBackingStore()->set('administrativeUnits', $value);\n }",
"public function getNumberOfRooms() {\n\t\treturn $this->numberOfRooms;\n\t}",
"public function set($columns)\n {\n $this->groups = array_merge($this->groups, $columns);\n }",
"public function getRoomsLeftCount()\n {\n return $this->roomsLeftCount;\n }"
] | [
"0.61883223",
"0.59064853",
"0.5386382",
"0.50400513",
"0.47270158",
"0.46873075",
"0.46494314",
"0.46474546",
"0.4557084",
"0.45520854",
"0.4537628",
"0.45275036",
"0.45126146",
"0.45095277",
"0.45058253",
"0.45047826",
"0.4483292",
"0.44803178",
"0.44328278",
"0.44113475",
"0.44075406",
"0.4397338",
"0.4396708",
"0.43848413",
"0.43716076",
"0.4322849",
"0.43048695",
"0.42800638",
"0.4275702",
"0.42543167"
] | 0.6435823 | 0 |
Gets as queueingTime The current queuing time for entering the car park. | public function getQueueingTime()
{
return $this->queueingTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setQueueingTime(\\DateTime $queueingTime)\n {\n $this->queueingTime = $queueingTime;\n return $this;\n }",
"public function getScheduleTime()\n {\n return $this->scheduleTime;\n }",
"public function getProcessingTime() {\n return $this->processingTime;\n }",
"public function getBakeTime()\n {\n return $this->bakeTime;\n }",
"public function getScheduleTime()\n {\n return $this->schedule_time;\n }",
"public function deliveryTime()\n {\n return $this->deliveryTime;\n }",
"public function calculated_send_time() {\n return time() + $this->time_delay();\n }",
"public function getPreferredTime()\n\t{\n\t\treturn $this->preferredTime;\n\t}",
"public function time(){\n\t\treturn $this->requestTime;\n\t}",
"public function now()\n {\n return $this->hasFrezenTime() ? $this->frozenTime : time();\n }",
"public static function GetWaitTime() {\n return self::$waitTime;\n }",
"public function getQueue()\n {\n return $this->queue;\n }",
"public function getQueue()\n {\n return $this->queue;\n }",
"public function getQueue()\n {\n return $this->queue;\n }",
"public function getStartTime() \n {\n return $this->_startTime; \n }",
"public function getCurrentTime()\n {\n return $this->time;\n }",
"public function getScheduling()\n {\n return $this->scheduling;\n }",
"public function getScheduling()\n {\n return $this->scheduling;\n }",
"public function getCurrentHarvestSynchronization() {\n\t\t$helper = Mage::helper('beezup');\n\t\t\treturn $helper->getConfig('beezup/marketplace/syncro_time');\n\t\t}",
"public function getHoldTime()\n {\n return $this->holdTime;\n }",
"public function getQueue()\n {\n return isset($this->Queue) ? $this->Queue : null;\n }",
"final public function isQueued(): bool\n {\n return $this->getState() === self::STATE_QUEUED;\n }",
"public function getRequestTime()\n {\n return $this->request_time;\n }",
"function queue_sleep_time_to_next_job($force=null) {\n\tstatic $queue_next_job_time = -1;\n\tif ($force===true)\n\t\t$queue_next_job_time = -1;\n\telseif ($force)\n\t\t$queue_next_job_time = $force;\n\n\tif ($queue_next_job_time==-1) {\n\t\tdefine('_JQ_NEXT_JOB_TIME_FILENAME',_DIR_TMP . \"job_queue_next.txt\");\n\t\t// utiliser un cache memoire si dispo\n\t\tif (include_spip('inc/memoization') AND defined('_MEMOIZE_MEMORY') AND _MEMOIZE_MEMORY) {\n\t\t\t$queue_next_job_time = cache_get(_JQ_NEXT_JOB_TIME_FILENAME);\n\t\t}\n\t\telse {\n\t\t\t$queue_next_job_time = null;\n\t\t\tif (lire_fichier(_JQ_NEXT_JOB_TIME_FILENAME, $contenu))\n\t\t\t\t$queue_next_job_time = intval($contenu);\n\t\t}\n\t}\n\n\tif (is_null($queue_next_job_time))\n\t\treturn null;\n\tif (!$_SERVER['REQUEST_TIME'])\n\t\t$_SERVER['REQUEST_TIME'] = time();\n\treturn max(0,$queue_next_job_time-$_SERVER['REQUEST_TIME']);\n}",
"function getStartTime()\n {\n return $this->startTime;\n }",
"public function getQueue() {\n return $this->_queue;\n }",
"public function getTicketTime()\n {\n return $this->ticketTime;\n }",
"function queue() {\n\n\t\t$date = false;\n\t\t$queue = new ES_Workflow_Queue();\n\t\t$queue->set_workflow_id( $this->get_id() );\n\t\t$timing_type = $this->get_timing_type();\n\n\t\tswitch ( $timing_type ) {\n\n\t\t\tcase 'immediately':\n\t\t\t\t$date = new DateTime();\n\t\t\t\t$date->setTimestamp( time() );\n\t\t\t\tbreak;\n\n\t\t\tcase 'delayed':\n\t\t\t\t$date = new DateTime();\n\t\t\t\t$date->setTimestamp( time() + $this->get_timing_delay() );\n\t\t\t\tbreak;\n\n\t\t\tcase 'scheduled':\n\t\t\t\t$date = $this->calculate_scheduled_datetime();\n\t\t\t\tbreak;\n\n\t\t\tcase 'fixed':\n\t\t\t\t$date = $this->get_fixed_time();\n\t\t\t\tbreak;\n\n\t\t\tcase 'datetime':\n\t\t\t\t$date = $this->get_variable_time();\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\t$date = apply_filters( 'ig_es_workflow_queue_date', $date, $this );\n\n\t\tif ( ! $date ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$queue->set_scheduled_at( $date );\n\t\t$queue->save();\n\n\t\t$queue->store_data_layer( $this->data_layer() ); // add meta data after saved\n\n\t\treturn $queue;\n\t}",
"public function getStartTime()\n {\n return $this->startTime;\n }",
"public function getStartTime()\n {\n return $this->startTime;\n }"
] | [
"0.6040972",
"0.5990174",
"0.59337175",
"0.5920078",
"0.58952785",
"0.56478435",
"0.56213045",
"0.5588461",
"0.5587279",
"0.55751634",
"0.5571281",
"0.5560116",
"0.5560116",
"0.5560116",
"0.55517954",
"0.5521347",
"0.5500917",
"0.5500917",
"0.54700965",
"0.5469328",
"0.5466714",
"0.54485136",
"0.5441123",
"0.5437031",
"0.5436132",
"0.5434844",
"0.5420635",
"0.54200053",
"0.54136574",
"0.5408535"
] | 0.8197696 | 0 |
Sets a new queueingTime The current queuing time for entering the car park. | public function setQueueingTime(\DateTime $queueingTime)
{
$this->queueingTime = $queueingTime;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getQueueingTime()\n {\n return $this->queueingTime;\n }",
"public function setCurrentTime($time)\n {\n $this->time = $time;\n }",
"public function markAsQueued()\n {\n $this->status = self::STATUS_QUEUED;\n $this->save();\n }",
"public function setTime($time)\r\n {\r\n $this->_time = $time;\r\n }",
"public function setTime($time)\n {\n $this->time = $time;\n }",
"public function setTime($time)\n {\n $this->time = $time;\n }",
"public function setTimeAllowed($timeAllowed) {}",
"public function setProcessingTime($processingTime) {\n $this->processingTime = $processingTime;\n }",
"function _queueAt($time, $queue, $shell, $function, $params = array(), $jobId = null)\n {\n $this->JobQueue = ClassRegistry::init('JobQueue');\n //ad the shell function to run to the beginning of the params array\n array_unshift($params,$function);\n\n // Create database record\n $job = array(\n 'queue'=>$queue,\n 'type'=>$shell.'Shell',\n 'function'=>$function,\n 'params'=>serialize($params),\n );\n\n if (empty($jobId)) {\n // New Job\n $this->JobQueue->create($job);\n $this->JobQueue->save();\n $jobId = $this->JobQueue->id;\n } else {\n // Reset Job\n $this->JobQueue->id;\n $job['JobQueue']['status'] = 'Reset';\n $job['JobQueue']['description'] = '';\n $job['JobQueue']['finished'] = '';\n $this->JobQueue->save($job['JobQueue']);\n }\n\n array_push($params,$jobId);\n\n // Send job to JobQueue (Resque) server\n $redisJobId = CakeResque::enqueueAt(new DateTime($time), $queue,$shell.'Shell',$params);\n //debug($redisJobId);die;\n }",
"public function setTime()\n {\n $this->send(\"SETT,\".date(\"H,i\"));\n }",
"private function setTime()\n {\n // set create time\n if (isset($this->_autoTime) && !empty($this->_autoTime) && in_array($this->_autoTime, $this->field)) {\n $this->_default[$this->_autoTime] = time();\n }\n // set update time\n if (isset($this->_autoUpdate) && !empty($this->_autoUpdate) && in_array($this->_autoUpdate, $this->field)) {\n $this->_default[$this->_autoUpdate] = time();\n }\n }",
"public static function setTimeNow($timeNow)\n {\n self::$timeNow = $timeNow;\n }",
"public function start_queue() {\n\t\t$queue = $this->get_queue();\n\t\t$queue['started'] = current_time( 'timestamp' );\n\t\t$this->set_queue( $queue );\n\t\t$this->running = true;\n\t}",
"public function setRequestTime(time $requestTime)\n {\n $this->RequestTime = $requestTime;\n return $this;\n }",
"public function GcApi_setRequestTime($val)\r\n {\r\n $this->m_gcOrder['RequestTime']['val'] = $this->GcApi_KeyStrReplace($val);\r\n }",
"public function setStartTime($time)\n {\n CultureFeed_Cdb_Data_Calendar::validateTime($time);\n $this->startTime = $time;\n }",
"public function setStartTime($startTime) \n {\n $this->_startTime = $startTime; \n }",
"public function setCacheTime($time) {\r\n $this->cacheTime = $time;\r\n }",
"public function setAppoinmentTime($appoinmentTime)\n {\n }",
"public function setAppoinmentTime($appoinmentTime)\r\n {\r\n }",
"protected function startTime()\n {\n $this->time = time();\n }",
"private function refreshQueue() : void {\n if (!empty($this->queue)) {\n unset($this->queue);\n }\n $this->queue = $queue = $this->getQueueFactory()->get('govdelivery_bulletins');\n }",
"function queue() {\n\n\t\t$date = false;\n\t\t$queue = new ES_Workflow_Queue();\n\t\t$queue->set_workflow_id( $this->get_id() );\n\t\t$timing_type = $this->get_timing_type();\n\n\t\tswitch ( $timing_type ) {\n\n\t\t\tcase 'immediately':\n\t\t\t\t$date = new DateTime();\n\t\t\t\t$date->setTimestamp( time() );\n\t\t\t\tbreak;\n\n\t\t\tcase 'delayed':\n\t\t\t\t$date = new DateTime();\n\t\t\t\t$date->setTimestamp( time() + $this->get_timing_delay() );\n\t\t\t\tbreak;\n\n\t\t\tcase 'scheduled':\n\t\t\t\t$date = $this->calculate_scheduled_datetime();\n\t\t\t\tbreak;\n\n\t\t\tcase 'fixed':\n\t\t\t\t$date = $this->get_fixed_time();\n\t\t\t\tbreak;\n\n\t\t\tcase 'datetime':\n\t\t\t\t$date = $this->get_variable_time();\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\t$date = apply_filters( 'ig_es_workflow_queue_date', $date, $this );\n\n\t\tif ( ! $date ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$queue->set_scheduled_at( $date );\n\t\t$queue->save();\n\n\t\t$queue->store_data_layer( $this->data_layer() ); // add meta data after saved\n\n\t\treturn $queue;\n\t}",
"public function setStartTime($startTime)\n {\n $this->_startTime = $startTime;\n }",
"public function schedule($time = null)\n {\n if (is_null($time)) {\n $time = time();\n }\n $this->setStatus(Aoe_Scheduler_Model_Schedule::STATUS_PENDING)\n ->setCreatedAt(strftime('%Y-%m-%d %H:%M:%S', time()))\n ->setScheduledAt(strftime('%Y-%m-%d %H:%M:00', $time))\n ->save();\n return $this;\n }",
"private function refreshQueue() {\n if (!empty($this->queue)) {\n unset($this->queue);\n }\n $this->queue = $queue = $this->getQueueFactory()->get('govdelivery_bulletins');\n }",
"function setSchedule()\r\n {\r\n\r\n }",
"function setStartTime($a_val)\n\t{\n\t\t$this->start_time = $a_val;\n\t}",
"public function set_time(string $time) : self {\n\t\t$this->time = $time;\n\t\treturn $this;\n\t}",
"public function setDisplayTime($displayTime)\n {\n $this->displayTime = $displayTime;\n }"
] | [
"0.59361744",
"0.56537294",
"0.5618177",
"0.5492176",
"0.54473454",
"0.54473454",
"0.5391671",
"0.5342493",
"0.5314093",
"0.53073776",
"0.5226513",
"0.5160797",
"0.5158948",
"0.5151471",
"0.50909853",
"0.49790505",
"0.4972155",
"0.4952952",
"0.49429965",
"0.49283844",
"0.49234936",
"0.48686492",
"0.48532176",
"0.48456824",
"0.48430637",
"0.47759178",
"0.47714084",
"0.47675174",
"0.47613308",
"0.47445947"
] | 0.6939575 | 0 |
Gets as totalCapacity Total number of car parking spaces. | public function getTotalCapacity()
{
return $this->totalCapacity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCapacity(): int\n {\n return $this->capacity;\n }",
"public function getCapacity()\n {\n return $this->capacity;\n }",
"public function getCapacity()\n {\n return $this->capacity;\n }",
"public function getCapacity() {\n\t\treturn $this->capacity;\n\t}",
"public function getAvailableSpace();",
"public function getFreeCapacity() {\n\t\treturn $this->capacity - $this->totalWeight;\n\t}",
"public function getCarParkOccupancy()\n {\n return $this->carParkOccupancy;\n }",
"public function getTotalAllocated()\n\t{\n\t\treturn $this->total_allocated;\n\t}",
"public function getNumberOfVacantParkingSpaces()\n {\n return $this->numberOfVacantParkingSpaces;\n }",
"public function getSpaceCount() :int\n {\n return (int) $this->getTotalCount() - $this->countRegistrationPerson();\n }",
"public function getCapacityUnit()\n {\n return $this->get(self::CAPACITY_UNIT);\n }",
"public function getCapacityUnit()\n {\n return $this->get(self::CAPACITY_UNIT);\n }",
"public function getCapacityUnit()\n {\n return $this->get(self::CAPACITY_UNIT);\n }",
"public function getReserveSpace() {\n return $this->reserveSpace;\n }",
"public function getTotalSpace()\n {\n $redis = $this->getRedisResource();\n try {\n $info = $redis->info();\n } catch (RedisResourceException $e) {\n throw new Exception\\RuntimeException($redis->getLastError(), $e->getCode(), $e);\n }\n\n return $info['used_memory'];\n }",
"public function getVehicleSeatingCapacity() {\n\t\treturn $this->vehicleSeatingCapacity;\n\t}",
"public function getGrossQtyAllocated()\n {\n return $this->getQtyAllocated() + $this->getQtyDelivered();\n }",
"public function getCapacity()\n {\n return $this->getSpec('resources.requests.storage', null);\n }",
"public function getTotalConsumedQuantity()\n {\n return $this->totalConsumedQuantity;\n }",
"public function getTotalAvailableSlots()\n {\n $tot = (\n $this->getTotalSupportedClients()\n - $this->getUsedSlots()\n - $this->getQueuedSlots()\n );\n if ($tot < 1) {\n return 0;\n }\n return $tot;\n }",
"public function getTotalBathrooms()\n {\n return $this->get('property.bathrooms');\n }",
"public function getTotalAvailable()\n\t{\n\t\treturn $this->total_available;\n\t}",
"public function getNetQtyAllocated()\n {\n return $this->getQtyAllocated();\n }",
"public function getSpaceReclaimed() : int\n {\n return $this->spaceReclaimed;\n }",
"public function getCapacity(array $options = [])\n {\n $options += [\n 'human' => false,\n ];\n $total = $this->getTotalCapacity();\n $count = $this->getDriveCount();\n $result = $total === 0 ? $total : $total / 2;\n if ($options['human'] === true) {\n return Number::toReadableSize($result);\n }\n\n return $result;\n }",
"public function occupiedSlotsCount()\n {\n return $this->model->where('free', 0)->with('vehicle','vehicle.vehicle_type')->get()->sum('vehicle.vehicle_type.slots');\n }",
"protected function computeTotalReservations()\n {\n return\n $this->totalDomesticShippingReservations +\n $this->totalInternationalShippingReservations +\n $this->totalTruckingReservations +\n $this->totalCustomsBrokerReservations +\n $this->totalWarehouseReservations;\n }",
"function cargoCapacity($cargobay)\r\n{\r\n\treturn $cargobay * CARGOCONST;\r\n}",
"public function size()\n {\n return Operations::size($this->getArcs());\n }",
"public function getCartCount()\n {\n return $this->getCart()->countItems();\n }"
] | [
"0.7537785",
"0.7537714",
"0.7537714",
"0.7482269",
"0.7195398",
"0.7062009",
"0.6923954",
"0.68169725",
"0.6812979",
"0.6646995",
"0.6606013",
"0.6606013",
"0.6606013",
"0.6573157",
"0.65491575",
"0.6515028",
"0.6505299",
"0.6451051",
"0.64476836",
"0.6421562",
"0.6308201",
"0.6293093",
"0.62450546",
"0.6205587",
"0.6197891",
"0.61666757",
"0.6156661",
"0.6139453",
"0.6093069",
"0.60825706"
] | 0.80091786 | 0 |
Sets a new totalCapacity Total number of car parking spaces. | public function setTotalCapacity($totalCapacity)
{
$this->totalCapacity = $totalCapacity;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTotalCapacity()\n {\n return $this->totalCapacity;\n }",
"public function getCapacity()\n {\n return $this->capacity;\n }",
"public function getCapacity()\n {\n return $this->capacity;\n }",
"public function getCapacity(): int\n {\n return $this->capacity;\n }",
"public function setCapacity(?int $value): void {\n $this->getBackingStore()->set('capacity', $value);\n }",
"public function getCapacity() {\n\t\treturn $this->capacity;\n\t}",
"public function setCapacity($capacity)\n {\n $this->capacity = $capacity;\n\n return $this;\n }",
"public function addComCapacity()\n\t{\t\t\n\t\t$truck_id = Request::get('truck_id');\n\t\t$trucks = Truck::findOrFail($truck_id);\n\t\t\n\t\t$totalTruckComCapacity = $this->compartmentTotalCap($truck_id);\n\t\t\n\t\t$capacity = ($totalTruckComCapacity == 0 ) ? $trucks->capacity : $totalTruckComCapacity;\n\t\t$capacity = $trucks->capacity - $totalTruckComCapacity;\n\t\t\t\t\t\n\t\t$capacity_list = $this->capacity();\n\t\t\n\t\t$compartments = Request::get('compartments');\n\t\t\n\t\treturn view(\"truck.addcap\",compact(\"compartments\",\"capacity_list\",\"capacity\",\"truck_id\"));\n\t}",
"public function declareTotalItems(int $totalItems): void\n\t{\n\t\t$this->totalItems = $totalItems;\n\t}",
"public function setCapacityUnit(Ots_CapacityUnit $value)\n {\n return $this->set(self::CAPACITY_UNIT, $value);\n }",
"public function setCapacityUnit(Ots_CapacityUnit $value)\n {\n return $this->set(self::CAPACITY_UNIT, $value);\n }",
"public function setCapacityUnit(Ots_CapacityUnit $value)\n {\n return $this->set(self::CAPACITY_UNIT, $value);\n }",
"public function getFreeCapacity() {\n\t\treturn $this->capacity - $this->totalWeight;\n\t}",
"public function __construct($capacity) {\n\t\t$this->capacity = $capacity;\n\t\t$this->box = Array();\n\t\t$this->box[] = new Box(\"1\", $capacity);\n\t}",
"public function setCapacity($capacity): Truck\n {\n $this->capacity = $capacity;\n\n return $this;\n }",
"public function setConsumedCapacity($setConsumedCapacity)\n {\n $this->returnConsumedCapacity = $setConsumedCapacity;\n return $this;\n }",
"protected function setTotalItems($totalItems) {\n $this->totalItems = $totalItems;\n }",
"public function setAllocatedCapacity($allocatedCapacity)\n {\n $this->allocatedCapacity = $allocatedCapacity;\n return $this;\n }",
"public function getVehicleSeatingCapacity() {\n\t\treturn $this->vehicleSeatingCapacity;\n\t}",
"public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }",
"public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }",
"public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }",
"public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }",
"public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }",
"public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }",
"public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }",
"public function setReserveSpace($reserveSpace) {\n $this->reserveSpace = $reserveSpace;\n return $this;\n }",
"public function getCarParkOccupancy()\n {\n return $this->carParkOccupancy;\n }",
"public function getNumberOfVacantParkingSpaces()\n {\n return $this->numberOfVacantParkingSpaces;\n }",
"public function adjustAllocationsToMatchQtyRemaining()\n {\n $toAdjust = $this->getQtyUnallocated();\n foreach ( $this->allocations as $alloc ) {\n if ( $toAdjust >= 0 ) {\n return;\n }\n $toAdjust -= $alloc->adjustQuantity($toAdjust);\n }\n assertion($toAdjust >= 0, \"alloc qty left to adjust: $toAdjust\");\n }"
] | [
"0.6245951",
"0.5980825",
"0.5980825",
"0.5942494",
"0.5930033",
"0.59179866",
"0.59041",
"0.56826895",
"0.55185986",
"0.54178077",
"0.54178077",
"0.54178077",
"0.5372193",
"0.53125775",
"0.52895916",
"0.52605224",
"0.5252627",
"0.5245943",
"0.52254164",
"0.5188907",
"0.5188907",
"0.5188907",
"0.5188907",
"0.5188907",
"0.5188907",
"0.5188907",
"0.5140559",
"0.5111109",
"0.5100473",
"0.5086791"
] | 0.68668777 | 0 |
Sets a new carParksExtension | public function setCarParksExtension(\Calcinai\Siri\Objects\Datex\ExtensionType $carParksExtension)
{
$this->carParksExtension = $carParksExtension;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setExtensions($val)\n {\n $this->_propDict[\"extensions\"] = $val;\n return $this;\n }",
"public function setExtension($var) {}",
"public function setExtension($var) {}",
"function setExtension($ext);",
"public function extend(callable $compiler)\n {\n $this->extensions[] = $compiler;\n }",
"public function setExtensionAttributes(\\Venice\\Product\\Api\\Data\\WatchSpecExtensionInterface $extensionAttributes);",
"public function addEngine()\n {\n $this->car->setPart('carEngin',new Engine());\n }",
"protected function registerPreset()\n {\n// PresetCommand::macro('login-providers', function ($command) {\n// LoginProviderPreset::install(true);\n// $command->info('Login Providers scaffolding installed successfully.');\n// });\n\n return $this;\n }",
"public function setExtensions($value) {\n if (!is_array($value)) {\n $value = explode('|', $value);\n }\n\n $this->_extensions = $value;\n }",
"public function setExtensions($extensions){\n\t\t$this->extensions = $extensions;\n\t}",
"public function setExtension(array $extension)\n {\n $this->extension = $extension;\n return $this;\n }",
"public function setExtensions($ext)\n {\n switch ( true ) {\n case is_array($ext):\n case is_object($ext):\n $this->extensions = (array) $ext;\n break;\n\n default:\n $this->extensions = array($ext);\n break;\n }\n\n return $this;\n }",
"public function addExtension($extension);",
"public function addExtension($extension);",
"static protected function setup_extensions()\n\t{\n\t\treturn array('anavaro/postlove');\n\t}",
"public function getContainerExtension()\n {\n return new PriceExtension();\n }",
"public function __construct()\n {\n // get global configuration\n $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['maps2']);\n if (is_array($extConf) && count($extConf)) {\n // call setter method foreach configuration entry\n foreach ($extConf as $key => $value) {\n $methodName = 'set' . ucfirst($key);\n if (method_exists($this, $methodName)) {\n $this->$methodName($value);\n }\n }\n }\n }",
"public function set_extension($extension) {\n $oldextension = $this->extension;\n $this->extension = $extension;\n $this->name = str_replace(\".$oldextension\", \".$extension\", $this->name);\n }",
"public function setExtensionAttributes(\n \\Magento\\InventorySourceSelectionApi\\Api\\Data\\SourceSelectionAlgorithmExtensionInterface $extensionAttributes\n ): void;",
"public function __construct()\n {\n if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['maps2'])) {\n // get global configuration\n $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['maps2']);\n if (is_array($extConf) && count($extConf)) {\n // call setter method foreach configuration entry\n foreach ($extConf as $key => $value) {\n $methodName = 'set' . ucfirst($key);\n if (method_exists($this, $methodName)) {\n $this->$methodName($value);\n }\n }\n }\n }\n }",
"public function __construct() {\n\t\t// get global configuration\n\t\t$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['rateeverything']);\n\t\tif (is_array($extConf) && count($extConf)) {\n\t\t\t// call setter method foreach configuration entry\n\t\t\tforeach($extConf as $key => $value) {\n\t\t\t\t$methodName = 'set' . ucfirst($key);\n\t\t\t\tif (method_exists($this, $methodName)) {\n\t\t\t\t\t$this->$methodName($value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function setAllowedExtensions($extensions) {\n\t\t\tif (is_array($extensions)) {\n\t\t\t\t$this->allowedExtensions = $extensions;\n\t\t\t} else {\n\t\t\t\t$this->allowedExtensions[] = $extensions;\n\t\t\t}\n\t\t}",
"public function setExtension($extension) {\n $this->extension = $extension;\n }",
"public function __construct($extension)\n {\n $this->extension = $extension;\n }",
"public function __construct()\n {\n if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['rlmp_tmplselector'])) {\n // get global configuration\n $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['rlmp_tmplselector']);\n if (is_array($extConf) && count($extConf)) {\n // call setter method foreach configuration entry\n foreach ($extConf as $key => $value) {\n $methodName = 'set' . ucfirst($key);\n if (method_exists($this, $methodName)) {\n $this->$methodName($value);\n }\n }\n }\n }\n }",
"public function withExtension($extension);",
"public function set_cpts(){\n\t\t\t\n\t\t\t$cpts = new CPT();\n\t\t\t$cpts->setup();\n\t\t\t\n\t\t}",
"static protected function setup_extensions()\r\n\t{\r\n\t\treturn array('phpbbgallery/core');\r\n\t}",
"public function setExtensions($extensions)\n {\n $this->options['extensions'] = explode(',', $extensions);\n }",
"public function setExtension(string $extension): void\n\t{\n\t\t$this->_extension = $extension;\n\t}"
] | [
"0.53852004",
"0.5213655",
"0.5213655",
"0.5130186",
"0.49715766",
"0.4967744",
"0.49323177",
"0.4928725",
"0.49160418",
"0.48787254",
"0.4829264",
"0.48276857",
"0.47577718",
"0.47577718",
"0.47513655",
"0.4739907",
"0.4710471",
"0.47079933",
"0.46919084",
"0.46781838",
"0.46758038",
"0.4671815",
"0.46652025",
"0.46498188",
"0.4640477",
"0.46390954",
"0.46382296",
"0.46360573",
"0.46295184",
"0.46266744"
] | 0.6797372 | 0 |
Set the table's foreign key constraints. | protected function addForeignKeyConstraints()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function addForeignKeyConstraints()\n {\n $sRuleTypeTableName = $this->tablePrefix .'bm_rule_type';\n \n $this->table->addForeignKeyConstraint($sRuleTypeTableName, ['rule_type_id'], ['rule_type_id'], [], null);\n \n $sRuleTableName = $this->tablePrefix .'bm_rule';\n \n $this->table->addForeignKeyConstraint($sRuleTableName, ['rule_id'], ['rule_id'], [], null);\n \n }",
"protected function addForeignKeyConstraints()\n {\n $sRuleTypeTableName = $this->tablePrefix .'bm_rule_type';\n \n $this->table->addForeignKeyConstraint($sRuleTypeTableName, ['rule_type_id'], ['rule_type_id'], [], null);\n \n $sTimeslotTableName = $this->tablePrefix .'bm_timeslot';\n \n $this->table->addForeignKeyConstraint($sTimeslotTableName, ['timeslot_id'], ['timeslot_id'], [], null);\n \n }",
"protected function enableForeignKeyConstraints(){\n $this->getRawConnection()->query('SET foreign_key_checks = 1');\n }",
"public function enableForeignKeyConstraints($connection) {\n \\DB::connection($connection)->getSchemaBuilder()->enableForeignKeyConstraints();\n }",
"public function addConstraints()\n {\n parent::addConstraints();\n\n if (static::$constraints) {\n if (is_array($this->foreignKeys[0])) {\n $column = $this->throughParent->qualifyColumn($this->foreignKeys[0][0]);\n\n $this->query->where($column, '=', $this->farParent->getMorphClass());\n }\n }\n }",
"function setForeignKeys() {\n mysql_query(\n\"ALTER TABLE `authors`\n ADD CONSTRAINT `authors_ibfk_1` FOREIGN KEY (`id`) REFERENCES `memplex` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION\");\n\n // Constraints for table `children`\n mysql_query(\n\"ALTER TABLE `children`\n ADD CONSTRAINT `children_ibfk_2` FOREIGN KEY (`child`) REFERENCES `memplex` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,\n ADD CONSTRAINT `children_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `memplex` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;\");\n\n // Constraints for table `favorite`\n mysql_query(\n\"ALTER TABLE `favorite`\n ADD CONSTRAINT `favorite_ibfk_1` FOREIGN KEY (`id`) REFERENCES `memplex` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;\");\n\n // Constraints for table `moderation`\n mysql_query(\n\"ALTER TABLE `moderation`\n ADD CONSTRAINT `moderation_ibfk_1` FOREIGN KEY (`id`) REFERENCES `memplex` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;\");\n\n // Constraints for table `texts`\n mysql_query(\n\"ALTER TABLE `texts`\n ADD CONSTRAINT `texts_ibfk_1` FOREIGN KEY (`id`) REFERENCES `memplex` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;\");\n\n // Constraints for table `titles`\n mysql_query(\n\"ALTER TABLE `titles`\n ADD CONSTRAINT `titles_ibfk_1` FOREIGN KEY (`id`) REFERENCES `memplex` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;\");\n}",
"protected function disableForeignKeyConstraints(){\n $this->getRawConnection()->query('SET foreign_key_checks = 0');\n }",
"public function addConstraints()\n {\n if (static::$constraints) {\n if ($this->foreignKey === '_id') {\n $this->query->useKeys(is_array($this->getParentKey()) ? $this->getParentKey() : [$this->getParentKey()]);\n } else {\n $this->query->where($this->foreignKey, '=', $this->getParentKey());\n }\n }\n }",
"public function getForeignKeyConstraints()\n\t{\n\t\treturn $this->fk_constraints;\n\t}",
"public function dropForeignKeys(): void\n {\n $tables = $this->_getAllTableNames();\n\n foreach ($tables as $table) {\n $this->_dropForeignKeyToAndFromTable($table);\n }\n }",
"public function addConstraints(): void\n {\n if (!static::$has_constraints) {\n return;\n }\n\n // For belongs to relationships, which are essentially the inverse of has one\n // or has many relationships, we need to actually query on the primary key\n // of the related models matching on the foreign key that's on a parent.\n $foreign_key_value = $this->parent->getAttribute($this->foreign_key);\n $this->query->where($this->local_key, '=', $foreign_key_value);\n }",
"private function addForeignKey()\n {\n Schema::table('client_inputs', function (Blueprint $table) {\n $table->foreign('client_interaction_id')->references('id')->on('client_inputs');\n });\n }",
"public function addConstraints()\n {\n $this->query->where($this->foreignKey, $this->parentObject);\n }",
"public function addForeignKeys()\n {\n $this->addForeignKey(null, Table::ASSETINDEXDATA, ['volumeId'], Table::VOLUMES, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ASSETS, ['folderId'], Table::VOLUMEFOLDERS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ASSETS, ['id'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ASSETS, ['uploaderId'], Table::USERS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::ASSETS, ['volumeId'], Table::VOLUMES, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::CATEGORIES, ['groupId'], Table::CATEGORYGROUPS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::CATEGORIES, ['id'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::CATEGORIES, ['parentId'], Table::CATEGORIES, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::CATEGORYGROUPS, ['fieldLayoutId'], Table::FIELDLAYOUTS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::CATEGORYGROUPS, ['structureId'], Table::STRUCTURES, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::CATEGORYGROUPS_SITES, ['groupId'], Table::CATEGORYGROUPS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::CATEGORYGROUPS_SITES, ['siteId'], Table::SITES, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CHANGEDATTRIBUTES, ['elementId'], Table::ELEMENTS, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CHANGEDATTRIBUTES, ['siteId'], Table::SITES, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CHANGEDATTRIBUTES, ['userId'], Table::USERS, ['id'], 'SET NULL', 'CASCADE');\n $this->addForeignKey(null, Table::CHANGEDFIELDS, ['elementId'], Table::ELEMENTS, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CHANGEDFIELDS, ['siteId'], Table::SITES, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CHANGEDFIELDS, ['fieldId'], Table::FIELDS, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CHANGEDFIELDS, ['userId'], Table::USERS, ['id'], 'SET NULL', 'CASCADE');\n $this->addForeignKey(null, Table::CONTENT, ['elementId'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::CRAFTIDTOKENS, ['userId'], Table::USERS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::CONTENT, ['siteId'], Table::SITES, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::DRAFTS, ['creatorId'], Table::USERS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::DRAFTS, ['sourceId'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ELEMENTS, ['draftId'], Table::DRAFTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ELEMENTS, ['revisionId'], Table::REVISIONS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ELEMENTS, ['fieldLayoutId'], Table::FIELDLAYOUTS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::ELEMENTS_SITES, ['elementId'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ELEMENTS_SITES, ['siteId'], Table::SITES, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::ENTRIES, ['authorId'], Table::USERS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ENTRIES, ['id'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ENTRIES, ['sectionId'], Table::SECTIONS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ENTRIES, ['parentId'], Table::ENTRIES, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::ENTRIES, ['typeId'], Table::ENTRYTYPES, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::ENTRYTYPES, ['fieldLayoutId'], Table::FIELDLAYOUTS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::ENTRYTYPES, ['sectionId'], Table::SECTIONS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::FIELDLAYOUTFIELDS, ['fieldId'], Table::FIELDS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::FIELDLAYOUTFIELDS, ['layoutId'], Table::FIELDLAYOUTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::FIELDLAYOUTFIELDS, ['tabId'], Table::FIELDLAYOUTTABS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::FIELDLAYOUTTABS, ['layoutId'], Table::FIELDLAYOUTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::FIELDS, ['groupId'], Table::FIELDGROUPS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::GLOBALSETS, ['fieldLayoutId'], Table::FIELDLAYOUTS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::GLOBALSETS, ['id'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::GQLTOKENS, 'schemaId', Table::GQLSCHEMAS, 'id', 'SET NULL', null);\n $this->addForeignKey(null, Table::MATRIXBLOCKS, ['fieldId'], Table::FIELDS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::MATRIXBLOCKS, ['id'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::MATRIXBLOCKS, ['ownerId'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::MATRIXBLOCKS, ['typeId'], Table::MATRIXBLOCKTYPES, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::MATRIXBLOCKTYPES, ['fieldId'], Table::FIELDS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::MATRIXBLOCKTYPES, ['fieldLayoutId'], Table::FIELDLAYOUTS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::MIGRATIONS, ['pluginId'], Table::PLUGINS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::RELATIONS, ['fieldId'], Table::FIELDS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::RELATIONS, ['sourceId'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::RELATIONS, ['sourceSiteId'], Table::SITES, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::RELATIONS, ['targetId'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::REVISIONS, ['creatorId'], Table::USERS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::REVISIONS, ['sourceId'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::SECTIONS, ['structureId'], Table::STRUCTURES, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::SECTIONS_SITES, ['siteId'], Table::SITES, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::SECTIONS_SITES, ['sectionId'], Table::SECTIONS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::SESSIONS, ['userId'], Table::USERS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::SHUNNEDMESSAGES, ['userId'], Table::USERS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::SITES, ['groupId'], Table::SITEGROUPS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::STRUCTUREELEMENTS, ['elementId'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::STRUCTUREELEMENTS, ['structureId'], Table::STRUCTURES, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::TAGGROUPS, ['fieldLayoutId'], Table::FIELDLAYOUTS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::TAGS, ['groupId'], Table::TAGGROUPS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::TAGS, ['id'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::TEMPLATECACHEELEMENTS, ['cacheId'], Table::TEMPLATECACHES, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::TEMPLATECACHEELEMENTS, ['elementId'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::TEMPLATECACHEQUERIES, ['cacheId'], Table::TEMPLATECACHES, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::TEMPLATECACHES, ['siteId'], Table::SITES, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::USERGROUPS_USERS, ['groupId'], Table::USERGROUPS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::USERGROUPS_USERS, ['userId'], Table::USERS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::USERPERMISSIONS_USERGROUPS, ['groupId'], Table::USERGROUPS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::USERPERMISSIONS_USERGROUPS, ['permissionId'], Table::USERPERMISSIONS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::USERPERMISSIONS_USERS, ['permissionId'], Table::USERPERMISSIONS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::USERPERMISSIONS_USERS, ['userId'], Table::USERS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::USERPREFERENCES, ['userId'], Table::USERS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::USERS, ['id'], Table::ELEMENTS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::USERS, ['photoId'], Table::ASSETS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::VOLUMEFOLDERS, ['parentId'], Table::VOLUMEFOLDERS, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::VOLUMEFOLDERS, ['volumeId'], Table::VOLUMES, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::VOLUMES, ['fieldLayoutId'], Table::FIELDLAYOUTS, ['id'], 'SET NULL', null);\n $this->addForeignKey(null, Table::WIDGETS, ['userId'], Table::USERS, ['id'], 'CASCADE', null);\n }",
"public function disableForeignKeyConstraints($connection) {\n \\DB::connection($connection)->getSchemaBuilder()->disableForeignKeyConstraints();\n }",
"protected function tableForeignKeys()\n {\n return [];\n }",
"public function addForeignKeys($tableName, $fks)\r\n {\r\n // TODO: Keys obligatorias: name, type, table, refName.\r\n \r\n // ALTER TABLE `prueba` ADD FOREIGN KEY ( `id` ) REFERENCES `carlitos`.`a` (`id`);\r\n //\r\n //$q_fks = \"\"; // Acumula consultas. ACUMULAR CONSULTAS ME TIRA ERROR, VOY A EJECUTARLAS INDEPENDIENTEMENTE, IGUAL PODRIAN ESTAR RODEADAS DE BEGIN Y COMMIT!\r\n foreach ( $fks as $fk )\r\n {\r\n // FOREIGN KEY ( `id` ) REFERENCES `carlitos`.`a` (`id`)\r\n $q_fks = \"ALTER TABLE $tableName \".\r\n \"ADD FOREIGN KEY (\" . $fk['name'] . \") \".\r\n \"REFERENCES \" . $fk['table'] . \"(\". $fk['refName'] .\");\";\r\n \r\n $this->execute( $q_fks );\r\n }\r\n }",
"private function restoreForeignKeys() : void\n {\n foreach ($this->foreignKeyStore as $tableName => $fks){\n foreach ($fks as $fk){\n $this->schemaManager->createForeignKey($fk, $tableName);\n }\n }\n }",
"public function addForeignKey($_tableName, Setup_Backend_Schema_Index_Abstract $_declaration);",
"public function getForeignKey()\n\t{\n\t\t$rows = $this->getCommand(\"PRAGMA foreign_key_list(\".$this->quoteColumnName($this->tableName).\")\")->queryAll();\n\t\tforeach($rows as $key=>$value)\n\t\t{\n\t\t\t$this->columns[$value['from']]->isForeignKey = true;\n\t\t}\n\t}",
"private function dropForeignKeys() : void\n {\n $this->foreignKeyStore = [];\n $tables = $this->schemaManager->listTables();\n foreach ($tables as $table){\n foreach ($table->getForeignKeys() as $fk){\n $this->foreignKeyStore[$table->getName()][] = $fk;\n $this->schemaManager->dropForeignKey($fk, $table);\n }\n }\n }",
"public function addForeignKeyConstraint(\n Schema $schema,\n QueryBag $queries,\n $tableName,\n $foreignTable,\n array $localColumnNames,\n array $foreignColumnNames,\n array $options = [],\n $constraintName = null\n ) {\n if (!$constraintName) {\n $constraintName = $this->nameGenerator->generateForeignKeyConstraintName(\n $tableName,\n $localColumnNames\n );\n }\n $constraint = new ForeignKeyConstraint(\n $localColumnNames,\n $foreignTable,\n $foreignColumnNames,\n $constraintName,\n $options\n );\n $diff = new TableDiff($tableName);\n $diff->addedForeignKeys = [$constraintName => $constraint];\n\n $renameQuery = new SqlSchemaUpdateMigrationQuery(\n $this->platform->getAlterTableSQL($diff)\n );\n\n $queries->addQuery($renameQuery);\n }",
"public function addConstraints()\n {\n if ( !static::$constraints ) return;\n foreach($this->relationConstraints as $r){\n $this->query->where($r['foreign_key'], $r['operator'], $this->parent->{$r['local_key']});\n }\n }",
"public function setForeignTable(string $foreignTable)\n {\n $this->foreignTable = $foreignTable;\n }",
"public function foreignKey(string|int $id, array $to): void;",
"function getForeignKeys($table);",
"private function createForeignKey($tbl_constraint, $table, &$struct_queries, $constrains)\n {\n $constrainsDB = $foreignRepited = array();\n if(preg_match_all(\"| CONSTRAINT\\s+(.*)\\s+FOREIGN KEY\\s+(.*)\\s+REFERENCES\\s+(.*),?\\n|i\", $tbl_constraint['Create Table'], $default_match)) {\n\n $aKeyName = $default_match[1];\n $aTables = $default_match[2];\n $aRefere = $default_match[3];\n foreach($aTables as $index => $value) {\n $_refere = str_replace('`', '', $aRefere[$index]);\n $_keyName = str_replace('`', '', $aKeyName[$index]);\n $_refere = str_replace(',', '', $_refere);\n $_value = str_replace('`', '', $value);\n if( in_array($_refere, $constrainsDB) ) {\n $foreignRepited[] = $_keyName;\n }\n $constrainsDB[$_value] = $_refere;\n }\n }\n\n $delete_foreign = array();\n if( count($foreignRepited) > 0 ) {\n foreach( $foreignRepited as $_key ) {\n echo \"ALTER TABLE \".$table.\" DROP FOREIGN KEY \".$_key .\"<br>\";\n $struct_queries[] = \"ALTER TABLE \".$table.\" DROP FOREIGN KEY \".$_key;\n }\n }\n\n $keys = array_keys($constrainsDB);\n foreach($constrains as $k => $v ) {\n if( in_array($k, $keys) && $constrainsDB[$k] == $v ) {\n // nothing to do\n } else {\n // alter table\n $index = 'FOREIGN KEY '.$k.' REFERENCES '.$v;\n\n $struct_queries[] = \"ALTER TABLE \".$table.\" ADD \".$index;\n }\n }\n }",
"protected function __foreignKey()\n {\n }",
"public function get_table_constraints() {\r\n\t\treturn $this->delegate->get_table_constraints();\r\n\t}",
"public function addForeignKey($tableName, $schemaName, $reference)\n {\n throw new Exception('Adding a foreign key constraint to an existing table is not supported by SQLite');\n }"
] | [
"0.74922645",
"0.7461765",
"0.724891",
"0.6863729",
"0.64051944",
"0.63901985",
"0.6372025",
"0.637008",
"0.6311773",
"0.6297805",
"0.6220083",
"0.61952496",
"0.6121973",
"0.61076313",
"0.6058869",
"0.6043594",
"0.60383207",
"0.6034316",
"0.59510404",
"0.5911545",
"0.5879947",
"0.5876336",
"0.58614904",
"0.58336276",
"0.58136064",
"0.5809212",
"0.57756776",
"0.57657456",
"0.57498264",
"0.5717802"
] | 0.75169736 | 0 |
Show the form for creating a new Etudiant. | public function create()
{
return view('etudiants.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return view('atendente.add');\n }",
"public function newAction()\n {\n $entity = new DatossEdadvacunas();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FocalAppBundle:DatossEdadvacunas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $classes = Classe::all();\n $etablissements = Etablissement::all();\n return view('etudiant.create',compact('classes','etablissements'));\n }",
"public function create()\n {\n return view(\"fichecontroller.form\");\n }",
"public function create()\n {\n return view(\"tipo_empleados.create\");\n }",
"public function create()\n {\n return view ('empleado.create');\n }",
"public function create()\n {\n return view('admin.jeu.create');\n }",
"public function newAction()\n {\n $entity = new DatosEducacion();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FocalAppBundle:DatosEducacion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('entreprises.formAjout');\n }",
"public function newAction()\n {\n $entity = new Avenant();\n $form = $this->createCreateForm($entity);\n\n return $this->render('PCFicheBundle:Avenant:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n\n return view('etablissement.addetudiant');\n }",
"public function create()\n {\n //\n if ($this->security(14)) {\n return view('administracion.titulos.new');}\n }",
"public function create()\n {\n return view('atendente.create');\n }",
"public function create() {\n return view('web_privada.empleado.create');\n }",
"public function create()\n {\n //Vista del formulario\n return view('pages.tallas.create');\n }",
"public function create()\n {\n return view('empleado.create');\n }",
"public function create()\n\t{\n\t\t// Nutzer kann Jugendämter erstellen\n\t\tif (!Auth::user()->can('edit-jugendamt'))\n\t\t{\n\t\t\treturn abort(403);\n\t\t}\n\t\treturn view('jugendamt.create');\n\t}",
"public function create()\n {\n return view('admin.empresas.create');\n }",
"public function create() {\n\t\treturn view('info_terkini.add');\n\t}",
"public function newAction() {\n $entity = new RutaSugerida();\n $form = $this->createCreateForm($entity);\n\n return $this->render('DataBaseBundle:RutaSugerida:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n //\n return view('admin.diamond.subkemahasiswaan.create');\n }",
"public function create()\n {\n return view('empleados.empleadosForm');\n }",
"public function create()\n {\n \n return view('empleados.create');\n }",
"public function create()\n {\n return view('linguas.form');\n }",
"public function create()\n {\n \n return view('admin.departement.create');\n }",
"public function create()\n {\n return view('detalle.create');\n }",
"public function create()\n {\n return view('departamentos.new');\n }",
"public function create()\n {\n return view('empleados.crear');\n }",
"public function create()\n {\n return view('forms.typesaleCreateForm');\n }",
"public function create()\n {\n return view('empleados.create');\n }"
] | [
"0.74640226",
"0.744727",
"0.7434694",
"0.74208415",
"0.7419356",
"0.73923975",
"0.73872733",
"0.7377283",
"0.73659104",
"0.7339117",
"0.73361117",
"0.73274094",
"0.73156",
"0.7309963",
"0.7302653",
"0.72916275",
"0.72857666",
"0.728511",
"0.72842956",
"0.7280803",
"0.72798955",
"0.7274088",
"0.7270436",
"0.72647095",
"0.7259309",
"0.7258614",
"0.72448933",
"0.72419196",
"0.7235204",
"0.72351354"
] | 0.7570708 | 1 |
Store a newly created Etudiant in storage. | public function store(CreateEtudiantRequest $request)
{
$input = $request->all();
$current = Carbon::now();
dump($input);
DB::table('etudiants')->insert([
'name' => $input['name'],
'adresse' => $input['adresse'],
'cursus' => $input['cursus'],
'universite' => $input['universite'],
'nombre_emprunts' => 5,
'cne' => $input['cne'],
'password' => $input['password'],
'created_at' => $current,
'updated_at' => $current,
'deleted_at' => null
]);
Flash::success('Etudiant saved successfully.');
return redirect(route('etudiants.index'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store(storeEtudiant $request)\n {\n \n try\n {\n Etudiant::create([\n\n \"mat_etudiant\"=>$request['mat_etudiant'],\n \"dateNaissance\"=>$request['dateNaissance'],\n \"email\"=>$request['email'],\n \"nomPere\"=>$request['nomPere'],\n \"nomMere\"=>$request['nomMere'],\n \"casUrgence\"=>$request['casUrgence'],\n \"ecole\"=>$request['ecole'],\n \"scolarite\"=>$request['scolarite'],\n \"nom_etudiant\"=>$request['nom_etudiant'],\n \"lieu\"=>$request['lieu'],\n \"telephone\"=>$request['telephone'],\n \"profPere\"=>$request['profPere'],\n \"profMere\"=>$request['profMere'],\n \"profUrgence\"=>$request['profUrgence'],\n \"prenom_etudiant\"=>$request['prenom_etudiant'],\n \"nationnalite\"=>$request['nationnalite'],\n \"residense\"=>$request['residense'],\n \"telPere\"=>$request['telPere'],\n \"telMere\"=>$request['telMere'],\n \"contact\"=>$request['contact'],\n \"anneOrigine\"=>$request['anneOrigine'],\n \"nature\"=>$request['nature'],\n \"dateInscri\"=>$request['dateInscri'],\n \"classe_id\"=>$request['classe_id'],\n \"etabli_id\"=>$request['etabli_id']\n ]);\n\n return redirect()->back()->with('success','Etudiant inscrit avec succès');\n }\n catch(\\Exception $e)\n {\n return redirect()->back()->with('error','Echec de la création du Etudiant '.$e);\n }\n }",
"public function store()\n {\n $this->validate([\n 'libelle' => 'required',// | unique:sites,libelle',\n 'entreprise_id' => 'required',\n 'direction_id' => 'required',\n 'email' => 'required',\n ]);\n \n Plantation::updateOrCreate(['id' => $this->plantation_id], [\n \n 'libelle' => $this->libelle,\n 'description'=> $this->description,\n 'email'=> $this->email,\n 'localisation'=> $this->localisation,\n 'entreprise_id'=> $this->entreprise_id,\n 'site_id'=> $this->site_id,\n 'direction_id'=> $this->direction_id,\n 'service_id'=> $this->service_id,\n 'ge_id'=>$this->ge_id,\n 'superficie'=>$this->superficie,\n 'exploitant'=>$this->exploitant,\n 'contact'=>$this->contact,\n 'plantation_id'=> $this->plantation_id,\n 'zone_id'=> $this->zone_id,\n 'type'=> $this->type,\n\n ]);\n \n session()->flash('message', $this->plantation_id ? 'La plantation \"'. $this->libelle .'\" a été modifiée avec Succès.' : 'La plantation \"'. $this->libelle .'\"a été Ajoutée avec Succès');\n \n $this->closeModal();\n $this->resetInputFields();\n \n }",
"public function store(CreateEtatRequest $request)\n {\n $input = $request->all();\n\n $etat = $this->etatRepository->create($input);\n\n Flash::success('Etat saved successfully.');\n\n return redirect(route('etats.index'));\n }",
"public function store()\n {\n // store the object itself\n parent::store();\n \n // delete the related EnqueteMorador objects\n $criteria = new TCriteria;\n $criteria->add(new TFilter('enquete_id', '=', $this->id));\n $repository = new TRepository('EnqueteMorador');\n $repository->delete($criteria);\n // store the related EnqueteMorador objects\n if ($this->moradors)\n {\n foreach ($this->moradors as $morador)\n {\n $enquete_morador = new EnqueteMorador;\n $enquete_morador->morador_id = $morador->id;\n $enquete_morador->enquete_id = $this->id;\n $enquete_morador->store();\n }\n }\n }",
"public function store()\n {\n $this->storage->set($this);\n\n }",
"public function store(Request $request)\n {\n $estudiante = new Estudiante(); \n $estudiante->cedula = $request->cedula;\n $estudiante->nombre = $request->nombre;\n $estudiante->apellidos = $request->apellidos;\n $estudiante->fecha_nacimiento = $request->fecha_nacimiento;\n $estudiante->telefono = $request->telefono;\n $estudiante->email = $request->email;\n $estudiante->sede = $request->sede;\n\n $estudiante->nombre_padre1 = $request->nombre_padre1;\n $estudiante->tel_padre1 = $request->tel_padre1;\n $estudiante->nombre_padre2 = $request->nombre_padre2;\n $estudiante->tel_padre2 = $request->tel_padre2;\n $estudiante->email_emergencia = $request->email_emergencia;\n\n $estudiante->id_beca = $request->id_beca;\n\n $estudiante->delete = 0; //el cero significa que no esta borrado, el 1 que si \n \n if($estudiante->save()){\n return back()->with('msj','Excelente! El estudiante ha sido guardado con éxito.');\n }else{\n return back()->with('msj2', \"Opa!, algo pasó. Por favor revisa los datos.\");\n }\n }",
"public function store(Request $request)\n {\n DB::beginTransaction();\n $v_certificado = ($request->certificado == \"on\")?true:false;\n $v_libretaNotas = ($request->libretaNotas == \"on\")?true:false;\n\n try{\n $estudiante = Estudiante::create($request->all());\n $estudiante->certificado = $v_certificado;\n $estudiante->libretaNotas = $v_libretaNotas;\n $estudiante->save();\n if($request->actaNacimiento){\n $partida= new PartidaNacimiento;\n $partida->numero=$request->numero;\n $partida->folio=$request->folio;\n $partida->tomo=$request->tomo;\n $partida->libro=$request->libro;\n $partida->f_estudiante=$estudiante->id;\n $partida->save();\n }\n if($request->grado!=\"Negativo\"){\n $matricula=new Matricula;\n $matricula->f_estudiante=$estudiante->id;\n $matricula->f_grado=$request->grado;\n $matricula->save();\n }\n if($request->nombre_e[0] != null){\n foreach($request->nombre_e as $k => $nombre_e){\n $enfermedad = new EnfermedadEstudiante;\n $enfermedad->nombre = $nombre_e;\n $enfermedad->atencion_medica = $request->atencion_e[$k];\n $enfermedad->medicamentos = $request->medicamentos_e[$k];\n $enfermedad->fecha = $request->fecha_e[$k];\n $enfermedad->resultados = $request->resultados_e[$k];\n $enfermedad->anio_vacuna = $request->anio_vacuna_e[$k];\n $enfermedad->tipo_vacuna = $request->tipo_vacuna_e[$k];\n $enfermedad->refuerzo_vacuna = $request->refuerzo_vacuna_e[$k];\n $enfermedad->f_estudiante = $estudiante->id;\n $enfermedad->save();\n }\n }\n\n for($i = 0; $i <= 5;$i++){\n $e_familia = new EnfermedadFamilia;\n $e_familia->asma = $request->asma[$i];\n $e_familia->drogas = $request->drogas[$i];\n $e_familia->diabetes = $request->diabetes[$i];\n $e_familia->tabaco = $request->tabaquismo[$i];\n $e_familia->presion_alta = $request->presionAlta[$i];\n $e_familia->alcohol = $request->alcoholismo[$i];\n $e_familia->renales = $request->renales[$i];\n $e_familia->otros = $request->otraEnfermedad[$i];\n $e_familia->pariente = $i;\n $e_familia->f_estudiante = $estudiante->id;\n $e_familia->save();\n }\n\n if(isset($request->par_tipo)){\n foreach($request->par_tipo as $k => $tipo){\n $relacion = new EstudiantePariente;\n $relacion->f_pariente = $request->par_id[$k];\n $relacion->f_estudiante = $estudiante->id;\n $relacion->parentesco = $request->par_parentesco[$k];\n $relacion->encargado = $request->par_responsable[$k];\n $relacion->save();\n }\n }\n DB::commit();\n }catch(Exception $e){\n DB::rollback();\n return redirect('/estudiantes')->with('mensaje', '¡Algo salio mal!');\n }\n return redirect('/estudiantes')->with('mensaje', '¡Guardado!');\n }",
"public function store(FormEspeceRequest $request)\n { \n Espece::create([\n 'Caracteristique_distinctifs'=>$request->Caracteristique,\n 'Taille'=>$request->Taille,\n 'Habitat'=>$request->Habitat,\n 'Nutrition'=>$request->Nutrition,\n 'Comportement'=>$request->Comportement,\n 'Notes'=>$request->Note,\n 'Nom'=>$request->Nom,\n 'Picture'=>$request->Picture,\n 'Nom'=>$request->Nom\n ]);\n session()->flash('message', 'Un seul Client doit etre mis par defaut!');\n return redirect(route('Especes.index'));\n }",
"public function store()\n {\n $this->validate([\n 'libelle' => 'required',// | unique:sites,libelle',\n 'entreprise_id' => 'required',\n 'email' => 'required',\n ]);\n \n Direction::updateOrCreate(['id' => $this->direction_id], [\n \n 'libelle' => $this->libelle,\n 'description'=> $this->description,\n 'email'=> $this->email,\n 'entreprise_id'=> $this->entreprise_id,\n 'site_id'=> $this->site_id,\n 'direction_id'=> $this->direction_id\n ]);\n \n session()->flash('message', $this->direction_id ? 'La direction \"'. $this->libelle .'\" Modifiée avec Succès.' : 'La direction \"'. $this->libelle .'\"a été Ajouté avec Succès');\n \n $this->closeModal();\n $this->resetInputFields();\n \n }",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store() {\n \n }",
"public function store() {\n \n }",
"public function persistir(Expediente $expediente);",
"public function store(){}",
"public function store() {\n $panier = Panier::firstOrCreate( // Récupère ou crée un paneir si il existe pas\n ['id' => Auth::user()->id],\n );\n $dishe = Dishes::find(request()->id); // Récupère le plat\n $present = DB::table(\"dishe_paniers\")\n ->select(\"*\")\n ->where(\"panier_id\", \"=\", Auth::user()->id)\n ->where(\"dishes_id\", \"=\", request()->id)\n ->get()\n ->toArray(); // Vérifie si le plat existe déjà dans le panier\n if ($dishe && sizeof($present) === 0) {\n $panier->dishes()->attach($dishe->id);\n }\n // Création de la vue\n return redirect(\"/panier\");\n }",
"public function store(Createestanque_alimentacionRequest $request)\n {\n $input = $request->all();\n $idEstanque=$input['id_estanque'];\n $estanqueAlimentacion = $this->estanqueAlimentacionRepository->create($input);\n\n Flash::success('Alimentacion Guardada Correctamente');\n\n return redirect('estanques');\n }",
"public function store ()\n {\n $this->_update_login ();\n $this->_pre_store ();\n\n if ($this->exists ())\n {\n $this->_update ();\n }\n else\n {\n $this->_create ();\n }\n }",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.7322065",
"0.66380024",
"0.6498306",
"0.6475323",
"0.6353031",
"0.6351087",
"0.6350691",
"0.6317653",
"0.6292563",
"0.6271749",
"0.6270981",
"0.6270981",
"0.62510383",
"0.6241839",
"0.62343925",
"0.61972564",
"0.6174812",
"0.61747175",
"0.61747175",
"0.61747175",
"0.61747175",
"0.61747175",
"0.61747175",
"0.61747175",
"0.61747175",
"0.61747175",
"0.61747175",
"0.61747175",
"0.61747175",
"0.61747175"
] | 0.7362459 | 0 |
An integer N is given, representing the area of some rectangle. The area of a rectangle whose sides are of length A and B is A B, and the perimeter is 2 (A + B). The goal is to find the minimal perimeter of any rectangle whose area equals N. The sides of this rectangle should be only integers. For example, given integer N = 30, rectangles of area 30 are: (1, 30), with a perimeter of 62, (2, 15), with a perimeter of 34, (3, 10), with a perimeter of 26, (5, 6), with a perimeter of 22. Write a function: function solution($N); that, given an integer N, returns the minimal perimeter of any rectangle whose area is exactly equal to N. For example, given an integer N = 30, the function should return 22, as explained above. Assume that: N is an integer within the range [1..1,000,000,000]. Complexity: expected worstcase time complexity is O(sqrt(N)); expected worstcase space complexity is O(1). | function calcPerimeter($width, $height)
{
return 2 * ($width + $height);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function check_size($area) {\n global $min_i;\n global $max_i;\n return ($area <= $max_i && $area >= ($min_i * 2));\n}",
"function Perimeter($side1,$side2,$side3)\n{\n $perimeter = $side1 + $side2 + $side3;\n return $perimeter;\n}",
"function area($c_min, $r_min, $c_max, $r_max) {\n return (($c_max - $c_min + 1) * ($r_max - $r_min + 1));\n}",
"function countgracepoint($n*$n)\r\n{\r\n $count = 0;\r\n for ($y = 1; $y * $y < $n*$n; $y++) {\r\n\r\n $x = (int)sqrt($n*$n - $y * $y);\r\n if ($y * $y + $x * $x == $n*$n) {\r\n\r\n $count++;\r\n\r\n }\r\n\r\n }\r\n $count *= 4;\r\n $y = (int)sqrt($n*$n);\r\n if ($y * $y == $n*$n) $count += 4;\r\n return $count;\r\n\r\n\r\n}",
"function My_Area($Side1, $Side2, $Side3){\n$area = ($Side1 + $Side2 + $Side3)/2;\nreturn sqrt($area * ($area - $Side1) * ($area - $Side2) * ($area - $Side3));}",
"function Area($side1,$side2,$side3)\n{\n $constant = ($side1 + $side2 + $side3)/2;\n \n $area = sqrt($constant * (($constant - $side1)*($constant - $side2)*($constant - $side3)));\n \n return $area;\n}",
"function solution($N) {\n if ($N % 2 == 0) {\n // I only know how to solve odd size magic squares for now.\n // I'll have figure out even magic squares later.\n return false;\n }\n $board = [];\n $numbers = $N * $N;\n for ($i = 1 ; $i <= $numbers; $i++) {\n if ($i == 1) {\n // top middle\n $y = 0;\n $x = ((int)($N / 2)); # would have add +1 but we starting with base 0\n $board[$y][$x] = $i;\n \n } else {\n // check if top right is empty\n $y-=1;\n $x+=1;\n $sy = $y < 0 ? $N - 1 : $y;\n $sx = $x >= $N ? 0 : $x;\n if (! isset($board[$sy][$sx])) {\n // if empty - then assign number\n $board[$sy][$sx] = $i; \n $y = $sy;\n $x = $sx;\n } else {\n // else go down a row. \n $x-=1;\n $y+=2;\n $board[$y][$x] = $i;\n \n } \n }\n }\n // clean up sort the key correctly\n \n for($i = 0; $i < $N; $i++) {\n ksort($board[$i]);\n };\n ksort($board);\n return $board;\n}",
"function area($x, $r)\r\n{\r\n\treturn ($x * loc($x, $r) + $r * $r * asin($x / $r)) / 2;\r\n}",
"public function testMinArea()\n {\n $obj = new MinArea([[1,1],[1,3],[3,1],[3,3],[4,1],[4,3]]);\n $obj->run();\n $obj->print();\n }",
"function solve_large($N, $P, $W, $H) {\n $sum = 0;\n for ($i = 0; $i < $N; $i ++) $sum += 2 * ($W[$i] + $H[$i]);\n dd($N, 'N'); dd($P, 'P'); dd($P - $sum, 'P-sum');\n // range of extra perimeters each cookie can provide\n $low = []; $high = [];\n for ($i = 0; $i < $N; $i ++) {\n $low[$i] = 2 * min($W[$i], $H[$i]);\n $high[$i] = 2 * sqrt($W[$i] * $W[$i] + $H[$i] * $H[$i]);\n }\n // if P is not reachable\n $h = 0;\n for ($i = 0; $i < $N; $i ++) $h += $high[$i];\n if ($sum + $h < $P) return $sum + $h;\n // if P is reachable, find a subset\n $str = ''; $DP = [];\n $r = $sum + nextItem($str, $P - $sum, $low, $high, $DP); dd($DP, 'DP');\n return $r;\n}",
"function My_perimeter($Side1, $Side2, $Side3){\n$perimeter= $Side1 + $Side2 + $Side3;\nreturn ($perimeter);}",
"function solve($N, $P, $W, $H) {\n return solve_large($N, $P, $W, $H);\n}",
"function fitRectangleToWall($areaString, $smallWalls, $wall)\n{\n\t$area = defineCoords($areaString);\n\t\tforeach ($smallWalls as $key => $smallWall) {\n\t\t\t$smallWallCoords = defineCoords($smallWall);\n\t\t\tif ($wall == $key) {\n\t\t\t\tif ($area['x1']<$smallWallCoords['minX'])\n\t\t\t\t\t$area['x1'] = $area['minX'] = $smallWallCoords['minX'];\n\t\t\t\tif ($area['x2']<$smallWallCoords['minX']) \n\t\t\t\t\t$area['x2'] = $area['minX'] = $smallWallCoords['minX'];\t\n\t\t\t\tif ($area['x1']>$smallWallCoords['maxX'])\n\t\t\t\t\t$area['x1'] = $area['maxX'] = $smallWallCoords['maxX'];\n\t\t\t\tif ($area['x2']>$smallWallCoords['maxX'])\n\t\t\t\t\t$area['x2'] = $area['maxX'] = $smallWallCoords['maxX'];\n\t\t\t\tif ($area['y1']<$smallWallCoords['minY'])\n\t\t\t\t\t$area['y1'] = $area['minY'] = $smallWallCoords['minY'];\n\t\t\t\tif ($area['y2']<$smallWallCoords['minY'])\n\t\t\t\t\t$area['y2'] = $area['minY'] = $smallWallCoords['minY'];\n\t\t\t\tif ($area['y1']>$smallWallCoords['maxY'])\n\t\t\t\t\t$area['y1'] = $area['maxY'] = $smallWallCoords['maxY'];\n\t\t\t\tif ($area['y2']>$smallWallCoords['maxY'])\n\t\t\t\t\t$area['y2'] = $area['maxY'] = $smallWallCoords['maxY'];\t\n\t\t\t\treturn $area;\n\t\t\t}\n\t\t}\n}",
"function\n\n /**\n * Get area of a circle\n * Equation = PI*radius to the power of 2\n */\n function getArea(){}",
"function quadtraticFunc(int $n)\n{\n $result = 0;\n for ($i = 0; $i < $n; $i++) {\n for ($j = 0; $j < $n; $j++) {\n $result += 1;\n }\n }\n return $result;\n}",
"final public function perimeter(): float\n {\n return 4 * $this->length;\n }",
"function calculateSquareSideWithRadius($radius, $overlap) {\n\t//if you would use this, you would have no overlap, so we do * overlap to fix this.\n\t$lengthOfOneSideOfASqare = sqrt (( $radius ** 2 ) / 2 ) * 2 * $overlap;\n\treturn $lengthOfOneSideOfASqare;\n}",
"public function getArea() {\n $nrPoints = count($this->points);\n if ($nrPoints < 3) {\n return 0;\n }\n\n $doubleArea = 0;\n\n $j = $nrPoints - 1;\n\n for ($i = 0; $i < $nrPoints; $i ++) {\n $p1 = $this->points[$i];\n $p2 = $this->points[$j];\n\n $doubleArea+= ($p1->x + $p2->x) * ($p2->y - $p1->y);\n $j = $i;\n }\n\n return abs($doubleArea / 2.0) / 10000;\n }",
"function satisfiesGolbachsConjucture($n)\n{\n\tglobal $primes;\n\n\tforeach ($primes as $p) {\n\t\tif ($p > $n) {\n\t\t\tbreak;\n\t\t}\n\t\t$x = sqrt(($n - $p) / 2);\n\t\tif (intval($x) == $x) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}",
"function solution($A) {\n if ( empty($A) ) return;\n \n // Check array count is less than 100000\n $A_count = count($A);\n $max_array_size_allowed = 100000;\n $max_array_value_allowed = $max_array_size_allowed + 1;\n \n if ( $A_count > $max_array_size_allowed ) return;\n \n // Check that all values are integers and under the legal limit\n for ( $i=0; $i<$A_count;$i++ ) {\n if ( !is_int($A[$i]) || ($A[$i] > $max_array_value_allowed) ) {\n return;\n }\n }\n \n // Check for all distinct values\n $values_count = array_count_values($A);\n \n foreach ( $values_count as $num ) {\n if ($num > 1) {\n // Found a duplicate value, return it!\n return;\n }\n }\n \n // Sort the array in ascending order to prepare for counting\n asort($A);\n \n // initialize a tmp array for re-indexing prior to looping\n $tmp_arr = [];\n \n foreach ($A as $v) {\n $tmp_arr[] = $v;\n }\n \n $A = $tmp_arr;\n unset($tmp_arr);\n \n // Find the index that doesn't match (the value + 1)\n for ( $i=0; $i<$A; $i++ ) {\n if ( $A[$i] != ($i + 1) ) {\n return ($i + 1);\n }\n }\n}",
"function calculateArea($num1, $num2) \n {\n return $num1 * $num2;\n }",
"public function getPerimeter():float ;",
"function area($width,$length) {\n $area = $width*$length;\n echo \"The area of a rectangle with width \" .$width. \" and length \" .$length. \" is \" .$area;\n}",
"public function calculateArea();",
"function solution($S, $P, $Q) {\n $SL = strlen($S);\n $A = [];\n $C = [];\n $G = [];\n $T = [];\n\n for ($i = 0; $i < $SL; $i++) {\n $el = $S[$i];\n if ($el == 'A') array_push($A, $i);\n if ($el == 'C') array_push($C, $i);\n if ($el == 'G') array_push($G, $i);\n if ($el == 'T') array_push($T, $i);\n }\n\n $M = count($P);\n $v = [];\n for ($j = 0; $j < $M; $j++) {\n $start = $P[$j];\n $end = $Q[$j];\n\n if (($re = inRange($A, 0, count($A)-1, $start, $end)) > -1) $re = 1;\n else if (($re = inRange($C, 0, count($C)-1, $start, $end)) > -1) $re = 2;\n else if (($re = inRange($G, 0, count($G)-1, $start, $end)) > -1) $re = 3;\n else if (($re = inRange($T, 0, count($T)-1, $start, $end)) > -1) $re = 4;\n\n array_push($v, $re);\n }\n return $v;\n}",
"function determine_in_polygon($no_of_polygons, $polygons_x, $polygons_y, $address_x, $address_y) {\n\t \t$j = $no_of_polygons - 1;\n\t \t$odd_nodes = 0;\n\t \tfor ($i = 0; $i < $no_of_polygons; $i++)\n\t \t{\n\t\t \tif ($polygons_y[$i] < $address_y && $polygons_y[$j] >= $address_y || $polygons_y[$j] < $address_y && $polygons_y[$i] >= $address_y)\n\t\t \t{\n\t\t\t \tif ($polygons_x[$i] + ($address_y - $polygons_y[$i]) / ($polygons_y[$j] - $polygons_y[$i]) * ($polygons_x[$j] - $polygons_x[$i]) < $address_x)\n\t\t\t \t{\n\t\t\t \t\t$odd_nodes = !$odd_nodes;\n\t\t\t \t}\n\t\t \t}\n\t\t \t$j = $i;\n\t \t}\n \t return $odd_nodes;\n \t}",
"function PerfectSquare($a) {\n $b = (int) (sqrt($a));\n return ($b * $b == $a);\n }",
"function search($values) {\n global $SQUARES;\n\n if ($values == false) {\n return false; // something failed\n }\n\n $solved = true;\n $unsolved_min_square = null;\n $unsolved_min_choices = null;\n\n foreach ($SQUARES as $s) {\n $tvc = count(true_value_keys($values[$s]));\n if ($tvc > 1) {\n $solved = false;\n if (($unsolved_min_choices == null) || ($tvc < $unsolved_min_choices)) {\n $unsolved_min_choices = $tvc;\n $unsolved_min_square = $s;\n }\n } else if ($tvc < 1) {\n return false; // something failed\n }\n }\n if ($solved) {\n return $values; // found a solution\n }\n\n // Try filling the unfilled square with fewest possible choices:\n foreach ($values[$unsolved_min_square] as $v => $possible) {\n if ($possible) {\n $values2 = $values; // acts like a \"deep copy\" for simple arrays (no objects)\n if (assign($values2, $unsolved_min_square, $v)) {\n $r = search($values2);\n if ($r != false) {\n return $r; // found a solution\n }\n }\n }\n }\n\n // None of the \"possible\" values for $unsolved_min_square worked:\n return false;\n}",
"function isInside($x, $y, $r)\r\n{\r\n\treturn $x * $x + $y * $y <= $r * $r;\r\n}",
"function rootmeansquare_distance(&$a, &$b, $n)\n{\n $rows = count($a);\n $columns = count($a[0]);\n $diff = 0;\n\n for ($row_index = 0; $row_index < $rows; $row_index++)\n {\n for ($column_index = 0; $column_index < $columns; $column_index++)\n {\n $diff += pow(($a[$row_index][$column_index] - $b[$row_index][$column_index]), 2);\n }\n }\n\n return sqrt($diff / $n);\n}"
] | [
"0.595964",
"0.5670282",
"0.5619596",
"0.5469072",
"0.545061",
"0.5430744",
"0.5298393",
"0.5264633",
"0.52036",
"0.51901776",
"0.5155831",
"0.50499046",
"0.4997381",
"0.49880528",
"0.4975015",
"0.48160586",
"0.47590205",
"0.4747388",
"0.47174484",
"0.47159123",
"0.47021872",
"0.46905848",
"0.4681527",
"0.46601707",
"0.46044716",
"0.46008235",
"0.4557179",
"0.45421588",
"0.45355314",
"0.45099056"
] | 0.62579054 | 0 |
Link a Twitter hashtag with a search results page on Twitter.com | function exile_twitter_hashtag( $matches ) { // $matches has already been through wp_specialchars
return "$matches[1]<a href='" . esc_url( 'http://twitter.com/search?q=%23' . urlencode( $matches[3] ) ) . "'>#$matches[3]</a>";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function make_hashtaggable_cb( $matches ) {\n $link_attributes = array(\n \"href\"\t=> \"http://twitter.com/search?q=\" . urlencode( $matches[2] ),\n \"class\"\t=> \"twitter-hashtag\",\n );\n return \" \" . build_link( $matches[2], $link_attributes );\n }",
"function ts_parse_tweet_hash($m)\n{\n global $ts_open_tweet_links_in_new_tab;\n $target = ($ts_open_tweet_links_in_new_tab == 1) ? '_blank' : '_self';\n $url = 'https://twitter.com/search?q=%23'.$m[2];\n\treturn $m[1].'<a href=\"'.esc_url($url).'\" class=\"hash-link\" target=\"'.esc_attr($target).'\"><span class=\"hash-sym\">#</span><span class=\"hash-text\">'.$m[2].'</span></a>';\n}",
"public function autoLinkHashtags($tweet = null) {\n if (is_null($tweet)) {\n $tweet = $this->tweet;\n }\n $entities = $this->extractor->extractHashtagsWithIndices($tweet);\n return $this->autoLinkEntities($tweet, $entities);\n }",
"function hashtag($link)\n\t{\n\t\t//$link = preg_replace(\"/([\\w]+\\:\\/\\[\\w-?&;#~=\\.\\/\\@]+[\\w\\/])/\", \"<a target=\\\"_blank\\\" href=\\\"$1\\\">$1</a>\", $link);\n\n\t\t//convert hashtags to search\n\t\t$link = preg_replace(\"/#([A-Za-z0-9\\/\\.]*)/\", \"<a target=\\\"_blank\\\" href=\\\"http://google.com/search?q=$1\\\">#$1</a>\", $link);\n\n\t\t//convert attags \n\t\t$link = preg_replace(\"/@([A-Za-z0-9\\/\\.]*)/\", \"<a target=\\\"_blank\\\" href=\\\"http://twitter.com/$1\\\">@$1</a>\", $link);\n\n\t\treturn $link;\n\t}",
"public function addLinksToHashtags() {\n return preg_replace_callback(\n self::REGEX_HASHTAG,\n array($this, '_addLinksToHashtags'),\n $this->tweet);\n }",
"function twitter()\r\n{ \r\n\t \r\n\t $l = selfURL();\r\n\t //example\r\n\t //http://twitter.com/home?status=http://ngeo.ro/index.php?type=forums&mobile=read&forum=auto&fifty-ugliest-cars-of-the-past-50-years&Valter&id=935\r\n\t //real link - your link\r\n\t //http://ngeo.ro/index.php?type=forums&mobile=read&forum=auto&fifty-ugliest-cars-of-the-past-50-years&Valter&id=935\r\n\t //result\r\n\t //http://twitter.com/home?status=http://ngeo.ro/index.php?type=forums&mobile=read&forum=auto&fifty-ugliest-cars-of-the-past-50-years&Valter&id=935\r\n\t $social = \"<a href=\\\"http://twitter.com/home?status=$l\\\"/><img src=\\\"/images/social/twitter.gif\\\" align =\\\"middle\\\" border =\\\"0\\\" width =\\\"20\\\" height =\\\"20\\\" alt =\\\"twitter\\\" /></a>\";\r\n return $social;\r\n}",
"function _twitterify(&$tweets)\n\t{\n\t\tforeach ($tweets as $k=>$tweet)\n\t\t{\n\t\t\t$tweet_html = $tweet->text;\n\t\t\t$tweet_html = preg_replace(\"#(^|[\\n ])([\\w]+?://[\\w]+[^ \\\"\\n\\r\\t< ]*)#\", \"\\\\1<a href=\\\"\\\\2\\\" target=\\\"_blank\\\">\\\\2</a>\", $tweet_html);\n\t\t\t$tweet_html = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[^ \\\"\\t\\n\\r< ]*)#\", \"\\\\1<a href=\\\"http://\\\\2\\\" target=\\\"_blank\\\">\\\\2</a>\", $tweet_html);\n\t\t\t$tweet_html = preg_replace(\"/@(\\w+)/\", \"<a href=\\\"http://www.twitter.com/\\\\1\\\" target=\\\"_blank\\\">@\\\\1</a>\", $tweet_html);\n\t\t\t$tweet_html = preg_replace(\"/#(\\w+)/\", \"<a href=\\\"http://search.twitter.com/search?q=\\\\1\\\" target=\\\"_blank\\\">#\\\\1</a>\", $tweet_html);\n\t\t\t$tweets[$k]->html = $tweet_html;\n\t\t}\n\t}",
"function print_tweet($tweet) {\n $tweeted = $tweet->created_at;\n $time = date('g:ia', strtotime($tweeted));\n $date = date('F d, Y', strtotime($tweeted));\n $text = $tweet->text;\n $name = $tweet->user->name;\n $handle = $tweet->user->screen_name;\n $retweets = $tweet->retweet_count;\n $id = $tweet->id_str;\n if (!empty($tweet->entities->urls)) {\n foreach ($tweet->entities->urls as $url) {\n $find = $url->url;\n $expanded = $url->expanded_url;\n $replace = '<a title=\"' . $expanded . '\" href=\"'.$expanded.'\">'.$expanded.'</a>';\n $text = str_replace($find, $replace, $text);\n }\n }\n if(!empty($tweet->entities->hashtags)) {\n foreach ($tweet->entities->hashtags as $hashtag) {\n $find = '#'.$hashtag->text;\n $replace = '<a title=\"#' . $hashtag->text . '\" href=\"http://twitter.com/#!/search/%23'.$hashtag->text.'\">'.$find.'</a>';\n $text = str_replace($find, $replace, $text);\n }\n }\n if (!empty($tweet->entities->user_mentions)) {\n foreach ($tweet->entities->user_mentions as $user_mention) {\n $sender = $user_mention->screen_name;\n $find = \"@\".$user_mention->screen_name;\n $replace = '<a title=\"@' . $user_mention->screen_name . '\" href=\"http://twitter.com/'.$user_mention->screen_name.'\">'.$find.'</a>';\n $text = str_ireplace($find, $replace, $text);\n }\n }\n if (!empty($tweet->entities->media)) {\n foreach ($tweet->entities->media as $media) {\n $find = $media->url;\n $expanded = $media->expanded_url;\n $replace = '<a title=\"' . $expanded . '\" href=\"'.$expanded.'\">'.$expanded.'</a>';\n $text = str_replace($find, $replace, $text);\n }\n }\n print \"<div class='bubble tweet'>\";\n print $text;\n if ($retweets > 0) {\n print \"<div class='retweets'>\" . $retweets . \" RTs</div>\";\n }\n print \"</div>\";\n if (isset($sender)) {\n print \"<a class='profile' title='\" . $sender . \"' href='http://www.twitter.com/\" . $sender . \"'>@\" . $sender . \"</a>\";\n }\n else {\n print \"<a class='profile' title='\" . $name . \"' href='http://www.twitter.com/\" . $handle . \"'>@\" . $handle . \"</a>\";\n }\n print \" <a class='date' href='/index.php?id=\" . $id . \"'>\" . \" at \" . $time . \" on \" . $date . \"</a>\";\n}",
"function idaho_webmaster_find_twitter_handle() {\n\t\t$re = '/(?:https?:\\\\/\\\\/)?(?:www\\\\.)?twitter\\\\.com\\\\/(?:#!\\\\/)?@?([^\\\\/\\\\?\\\\s]*)/';\n\t\t$url = get_theme_mod( 'idaho_social_twitter', 'https://twitter.com/@idahogov' );\n\n\t\tpreg_match_all( $re, $url, $matches );\n\n\t\tif ( isset( $mathes[1][0] ) ) {\n\t\t\treturn '@' . $matches[1][0];\n\t\t} else {\n\t\t\treturn '@';\n\t\t}\n\t}",
"public function autoLinkHashtags($tweet = null)\n {\n if ($tweet === null) {\n $tweet = $this->tweet;\n }\n $entities = $this->extractor->extractHashtagsWithIndices($tweet);\n return $this->autoLinkEntities($tweet, $entities);\n }",
"function twitter_share_link( $message = '' ) {\n\n\t$args = array(\n\t\t'text' => $message,\n\t\t'url' => 'https://prothemedesign.com' . Flight::request()->url,\n\t\t'related' => 'prothemedesign',\n\t);\n\n\t$link = 'http://twitter.com/intent/tweet?';\n\n\techo $link . http_build_query( $args, '', '&' );\n\n}",
"public function parse_tweet( $a )\r\n\t\t{\r\n\t\t\t$a = preg_replace('|([\\w\\d]*)\\s?(https?://([\\d\\w\\.-]+\\.[\\w\\.]{2,6})[^\\s\\]\\[\\<\\>]*/?)|i', '$1 <a href=\"$2\" target=\"_blank\">$3</a>', $a);\r\n\t\t\t$a = preg_replace( '/#([A-Za-z0-9_]+)/', '<a href=\"https://twitter.com/search?q=%23${1}&src=hash\" class=\"tag\" target=\"_blank\">#${1}</a>', $a );\r\n\t\t\t$a = preg_replace( '/@([A-Za-z0-9_]+)/', '<a href=\"https://twitter.com/${1}\" class=\"account\" target=\"_blank\">@${1}</a>', $a );\r\n\t\t\treturn $a;\r\n\t\t}",
"function formatTweet($tweet_text)\n{\n $reg_exUrl = \"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/\";\n $reg_exHash = \"/#([a-z_0-9]+)/i\";\n $reg_exUser = \"/@([a-z_0-9]+)/i\";\n\n\n // make links link to URL\n // http://css-tricks.com/snippets/php/find-urls-in-text-make-links/\n if (preg_match($reg_exUrl, $tweet_text, $url)) {\n\n // make the urls hyper links\n $tweet_text = preg_replace($reg_exUrl, \"<a href='{$url[0]}'>{$url[0]}</a> \", $tweet_text);\n\n }\n\n if (preg_match($reg_exHash, $tweet_text, $hash)) {\n\n // make the hash tags hyper links https://twitter.com/search?q=%23truth\n $tweet_text = preg_replace($reg_exHash, \"<a href='https://twitter.com/search?q={$hash[0]}'>{$hash[0]}</a> \", $tweet_text);\n\n // swap out the # in the URL to make %23\n $tweet_text = str_replace(\"/search?q=#\", \"/search?q=%23\", $tweet_text);\n\n }\n\n if (preg_match($reg_exUser, $tweet_text, $user)) {\n\n $tweet_text = preg_replace(\"/@([a-z_0-9]+)/i\", \"<a href='http://twitter.com/$1'>$0</a>\", $tweet_text);\n\n }\n\n return $tweet_text;\n}",
"function twitterify($ret) {\n\t\t $ret = preg_replace(\"#(^|[\\n ])([\\w]+?://[\\w]+[^ \\\"\\n\\r\\t< ]*)#\", \"\\\\1<a href=\\\"\\\\2\\\" target=\\\"_blank\\\">\\\\2</a>\", $ret);\n\t\t $ret = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[^ \\\"\\t\\n\\r< ]*)#\", \"\\\\1<a href=\\\"http://\\\\2\\\" target=\\\"_blank\\\">\\\\2</a>\", $ret);\n\t\t $ret = preg_replace(\"/@(\\w+)/\", \"<a href=\\\"http://www.twitter.com/\\\\1\\\" target=\\\"_blank\\\">@\\\\1</a>\", $ret);\n\t\t $ret = preg_replace(\"/#(\\w+)/\", \"<a href=\\\"http://search.twitter.com/search?q=\\\\1\\\" target=\\\"_blank\\\">#\\\\1</a>\", $ret);\n\t\treturn $ret;\n\t\t}",
"function get_tweets($hash_tag) {\n $hashtag = $hash_tag ?: 'lindyhop'; // We search Twitter for the hashtag #php\n $show = 10; // And we want to get 10 tweets\n $cacheFile = 'cache/' . $hashtag .'.json.cache'; // A cachefile will be placed in cache/\n $cacheTime = 1 * 60; // 1 minute cache time\n\n // If the cache file is newer than our cache time, get the content of it\n if (file_exists($cacheFile) && (time() - $cacheTime < filemtime($cacheFile))) {\n $json = file_get_contents($cacheFile);\n }\n\n // If it's older, place a new cache file into our cache folder with the JSON result of the twitter search\n else {\n $json = file_get_contents(\"http://search.twitter.com/search.json?result_type=recent&rpp=$show&q=%23\" . $hashtag);\n // $fp = fopen($cacheFile, 'w');\n // fwrite($fp, $json);\n // fclose($fp);\n }\n\n // Get the results\n $results = json_decode($json)->results;\n $tweets = \"\";\n foreach($results as $result) {\n $text = $result->text;\n $date = \"<span class='tweet_date'>\" . date(\"H:i A - j M y\",strtotime($result->created_at)) . \"</span>\";\n // Links\n $text = preg_replace('@(https?://([-\\w\\.]+)+(/([\\w/_\\.]*(\\?\\S+)?(#\\S+)?)?)?)@', '<a class=\"twitterLink\" rel=\"nofollow\" href=\"$1\">$1</a>',$text);\n \n // Users\n $text = preg_replace('/@(\\w+)/','<a class=\"twitterUser\" rel=\"nofollow\" href=\"http://twitter.com/$1\">@$1</a>',$text);\n\n // Hashtags\n $text = preg_replace('/#(\\w+)/','<a class=\"twitterHashTag\" rel=\"nofollow\" href=\"http://twitter.com/search/%23$1\">#$1</a>',$text);\n\n $tweets = \"<div class='tweetByTag'>\n <div class='tweet'>\n {$text}\n <div class='tweet-info'>\n {$date} \n <span class='tweet-author'>\n from <a rel='nofollow' href='http://twitter.com/{$result->from_user_id}'>{$result->from_user_name}</a>\n </span>\n\n </div>\n </div>\n </div>\";\n } \n\n return $tweets;\n}",
"function twitterify($ret) {\n\t$ret = preg_replace(\"#(^|[\\n ])([\\w]+?://[\\w]+[^ \\\"\\n\\r\\t< ]*)#\", \"\\\\1<a href=\\\"\\\\2\\\" target=\\\"_blank\\\">\\\\2</a>\", $ret);\n\t$ret = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[^ \\\"\\t\\n\\r< ]*)#\", \"\\\\1<a href=\\\"http://\\\\2\\\" target=\\\"_blank\\\">\\\\2</a>\", $ret);\n\t$ret = preg_replace(\"/@(\\w+)/\", \"<a href=\\\"http://www.twitter.com/\\\\1\\\" target=\\\"_blank\\\">@\\\\1</a>\", $ret);\n\t$ret = preg_replace(\"/#(\\w+)/\", \"<a href=\\\"http://search.twitter.com/search?q=\\\\1\\\" target=\\\"_blank\\\">#\\\\1</a>\", $ret);\n\treturn $ret;\n}",
"function search_for_a_term($bearer_token, $result_type='mixed', $count='3'){\n\t$url = \"https://api.twitter.com/1.1/search/tweets.json?q=smartmirrorthesis&src=typd\"; // base url\n\tif($result_type!='mixed'){$url = $url.'&result_type='.$result_type;} // result type - mixed(default), recent, popular\n\tif($count!='3'){$url = $url.'&count='.$count;} // results per page - defaulted to 15\n\t$url = $url.'&include_entities=true'; // makes sure the entities are included, note @mentions are not included see documentation\n\tprint($url);\n\t$headers = array( \n\t\t\"GET /1.1/search/tweets.json\".$url.\" HTTP/1.1\", \n\t\t\"Host: api.twitter.com\", \n\t\t\"User-Agent: jonhurlock Twitter Application-only OAuth App v.1\",\n\t\t\"Authorization: Bearer \".$bearer_token\n\t);\n\t$ch = curl_init(); // setup a curl\n\tcurl_setopt($ch, CURLOPT_URL,$url); // set url to send to\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // set custom headers\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // return output\n\t$retrievedhtml = curl_exec ($ch); // execute the curl\n\tcurl_close($ch); // close the curl\n\tprint($retrievedhtml);\n\treturn $retrievedhtml;\n}",
"function pods_show_twitter_link($id) {\n\t$twitter = get_user_meta($id, 'twitter', true);\n\techo esc_html($twitter);\n}",
"public static function hashtag_url($hashtag = '') {\n $questionmark=\"?\";\n\n // If SEF URLs are enabled\n if (1 == PeepSo::get_option('disable_questionmark_urls', 0)) {\n\n // Make sure peepso_activity is NOT frontpage\n $frontpage = get_post(get_option('page_on_front'));\n\n // If it's NOT frontpage, it's safe tu use SEF\n if ('posts' == get_option( 'show_on_front' ) || !has_shortcode($frontpage->post_content, 'peepso_activity')) {\n $questionmark=\"\";\n }\n }\n\n // Build and return URL\n $url = PeepSo::get_page('activity').$questionmark.'hashtag/'.$hashtag;\n if(strlen($hashtag)) {\n $url .='/';\n }\n\n\n return $url;\n }",
"function exile_twitter_username( $matches ) { // $matches has already been through wp_specialchars\n\t\treturn \"$matches[1]@<a href='\" . esc_url( 'http://twitter.com/' . urlencode( $matches[3] ) ) . \"'>$matches[3]</a>\";\n\t}",
"function parse_hashtags($text) {\n return implode(\n \" \", \n array_map(\n function($el) {\n if($el !== \"\" && $el[0] == \"#\") {\n $n = substr($el, 1);\n return '<span class=\"pseudo-link\" onclick=\"document.location.href = \\'/hashtag.php?name='.$n.'\\'; return false\">'.$el.'</span>';\n }\n return $el;\n },\n explode(\" \", $text)\n )\n );\n}",
"function ts_parse_tweet_at($m)\n{\n global $ts_open_tweet_links_in_new_tab;\n $target = ($ts_open_tweet_links_in_new_tab == 1) ? '_blank' : '_self';\n $url = 'https://twitter.com/'.$m[2];\n\treturn $m[1].'<a href=\"'.esc_url($url).'\" class=\"at-link\" target=\"'.esc_attr($target).'\"><span class=\"at-sym\">@</span><span class=\"at-text\">'.$m[2].'</span></a>';\n}",
"public static function getHashtag()\n {\n return '#learn@' . G_URL;\n }",
"function cmc_twitter_feed(){\r\n\t\tif(get_query_var('coin_id')){\r\n\t\t\t$cmc_titan =TitanFramework::getInstance( 'cmc_single_settings' );\r\n\r\n\t\t\t$twitter_feed_type = $cmc_titan->getOption('twitter_feed_type');\r\n\r\n\t\t\t$coin_id=get_query_var('coin_name');\r\n\t\t\t$coin_symbol=get_query_var('coin_id');\r\n\t\t\t$coin_data=cmc_coin_extra_data_api($coin_symbol);\r\n\r\n\t\t\t$coin_name = isset($coin_data->twitterusername)?$coin_data->twitterusername:\"\";\r\n\r\n\t\tif($twitter_feed_type=='hashtag' || $coin_name==''){\r\n\t\t\t\t\t\treturn do_shortcode( '[custom-twitter-feeds hashtag=\"#'.$coin_symbol.'\"]' );\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else{\r\n\t\t\t\t\t\treturn do_shortcode( '[custom-twitter-feeds screenname=\"'.$coin_name.'\"]' );\r\n\t\t\t\t\t }\r\n\r\n\t\t}\r\n\t}",
"function tb_tweet_html($tweet,$mode = 'widget',$tb_o) {\n\n // first make sure this tweet should be shown considering current filters\n if (!tb_tweet_is_ok_to_show($tweet, $tb_o)) {\n return '';\n }\n\n // add screen name if from_user is given\n if (!isset($tweet->user)) {\n $user = new stdClass();\n if (isset($tweet->from_user)) {\n\n $user->screen_name = $tweet->from_user;\n $tweet->user = $user;\n }\n else {\n $user->screen_name = '';\n $tweet->user = $user;\n }\n }\n\n if (isset($TB_sourceNames[strtolower($tweet->user->screen_name)])) {\n $tweet->user->alias = $TB_sourceNames[strtolower($tweet->user->screen_name)];\n }\n else {\n $tweet->user->alias = null;\n }\n\n $patterns = array(); $replacements = array();\n // link URLs\n $patterns[] = '/(https?:\\/\\/\\S+)/';\n $replacements[] = '<a rel=\"nofollow\" href=\"$1\">$1</a>';\n // link screen names\n $patterns[] = '/\\@([\\w]+)/';\n $replacements[] = '<a rel=\"nofollow\" href=\"http://twitter.com/$1\">@$1</a>';\n // link hashtags\n $patterns[] = '/\\#(\\S+)/';\n $replacements[] = '<a rel=\"nofollow\" href=\"http://twitter.com/search?q=%23$1\">#$1</a>';\n\n if (sizeof($patterns) > 0) {\n $tweet->text = preg_replace($patterns,$replacements,$tweet->text);\n }\n\n // date\n $tweet_date = tb_str2time($tweet->created_at);\n if ($tb_o['general_timestamp_format']) {\n if(!version_compare(PHP_VERSION, '5.1.0', '<')) {\n date_default_timezone_set(get_option('timezone_string'));\n }\n $date_html = date($tb_o['general_timestamp_format'],$tweet_date);\n }\n else {\n $date_html = tb_verbal_time($tweet_date);\n }\n\n // if source is not url encoded -> use as is\n if (isset($tweet->source) && strpos($tweet->source,'<') === false) {\n $source_html = $tweet->source;\n }\n // else decode\n else {\n $source_html = html_entity_decode($tweet->source);\n }\n\n\n $tweet_template = '';\n\n $tweet_template .= '<li class=\"tb_tweet tweet\" id=\"{0}\">';\n\n // photo\n $tweet_template .= '<a class=\"tb_photo thumbnail\" rel=\"nofollow\" target=\"_blank\" href=\"http://twitter.com/{1}\"><img src=\"{2}\" alt=\"{1}\" /></a>';\n\n $tweet_template .= '<div class=\"details\">';\n\n // author\n $tweet_template .= '<div class=\"tweet-title tb_author\"><span class=\"name\">{7}</span> <a rel=\"nofollow\" target=\"_blank\" href=\"http://twitter.com/{1}\">@{1}</a></div>';\n\n if (empty($tb_o['general_seo_tweets_googleoff']) && $tb_o['general_seo_footer_googleoff']) {\n $tweet_template .= '<!--googleoff: index-->';\n }\n\n // tweet text\n $tweet_template .= '<p class=\"tweet-message\">{3}';\n\n // show source if requested\n if (isset($tb_o[$mode . '_show_source']) && !empty($tb_o[$mode . '_show_source']) && isset($tweet->source)) {\n $tweet_template .= ' <br>' . ' {6}'; // . __('from','tweetblender')\n }\n\n $tweet_template .= '</p>'; //tweet-message\n\n // show timestamp\n $tweet_template .= '<time class=\"tweet-time\" datetime=\"{5}\"><a rel=\"nofollow\" target=\"_blank\" href=\"http://twitter.com/{1}/statuses/{4}\">{5}</a></time>';\n\n if (empty($tb_o['general_seo_tweets_googleoff']) && $tb_o['general_seo_footer_googleoff']) {\n $tweet_template .= '<!--googleon: index-->';\n }\n\n $tweet_template .= '</div>'; //details\n\n // add tweet tools\n if ((isset($tb_o[$mode . '_show_follow_link']) && !empty($tb_o[$mode . '_show_follow_link'])) || (isset($tb_o[$mode . '_show_reply_link']) && !empty($tb_o[$mode . '_show_reply_link']))) {\n $tweet_template .= '<div class=\"tweet-tools\" style=\"display:none;\">';\n if ($tb_o[$mode . '_show_reply_link']) {\n $tweet_template .= '<a rel=\"nofollow\" target=\"_blank\" href=\"http://twitter.com/home?status=@{1}%20&in_reply_to_status_id={4}&in_reply_to={1}\">' . __('reply','tweetblender') . '</a>';\n }\n if ($tb_o[$mode . '_show_follow_link'] && $tb_o[$mode . '_show_reply_link']) {\n $tweet_template .= ' | ';\n }\n if ($tb_o[$mode . '_show_follow_link']) {\n $tweet_template .= '<a rel=\"nofollow\" target=\"_blank\" href=\"http://twitter.com/{1}\">' . __('follow','tweetblender') . ' {1}</a>';\n }\n $tweet_template .= '</div>';\n }\n\n // end tweet\n $tweet_template .= \"</li>\\n\";\n\n return str_replace(\n array(\n '{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}'\n ),\n array(\n $tweet->div_id, // {0}\n $tweet->user->screen_name, // {1}\n $tweet->user->profile_image_url, // {2}\n $tweet->text, // {3}\n $tweet->id_str, // {4}\n $date_html, // {5}\n $source_html, // {6}\n $tweet->user->name // {7}\n ),\n $tweet_template\n );\n}",
"public function autoLink($tweet = null) {\n if (is_null($tweet)) {\n $tweet = $this->tweet;\n }\n $entities = $this->extractor->extractURLWithoutProtocol(false)->extractEntitiesWithIndices($tweet);\n return $this->autoLinkEntities($tweet, $entities);\n }",
"protected function makeHashTagLink($hashTag)\n {\n $href = sprintf('http://www.twitter.com/search/%s', urlencode($hashTag));\n\n return $this->makeLink($href, $hashTag);\n }",
"function parse_twitter($t) \n {\n\t // link URLs\n\t\t$t = \" \".preg_replace( \"/(([htps]+:\\/\\/)|www\\.)([^[:space:]]*)\".\n\t \"([[:alnum:]#?\\/&=])/i\", \"<a href=\\\"\\\\1\\\\3\\\\4\\\" target=\\\"_blank\\\">\".\n\t \"\\\\1\\\\3\\\\4</a>\", $t);\n\t\t\n\t /*$t = \" \".preg_replace( \"/(([[:alnum:]]+:\\/\\/)|www\\.)([^[:space:]]*)\".\n\t \"([[:alnum:]#?\\/&=])/i\", \"<a href=\\\"\\\\1\\\\3\\\\4\\\" target=\\\"_blank\\\">\".\n\t \"\\\\1\\\\3\\\\4</a>\", $t);*/\n\t \n\t // link mailtos\n\t $t = preg_replace( \"/(([a-z0-9_]|\\\\-|\\\\.)+@([^[:space:]]*)\".\n\t \"([[:alnum:]-]))/i\", \"<a href=\\\"mailto:\\\\1\\\">\\\\1</a>\", $t);\n\t \n\t //link twitter users\n\t $t = preg_replace( \"/ *@([a-z0-9_]*) ?/i\", \" <a href=\\\"http://twitter.com/\\\\1\\\" target=\\\"_blank\\\">@\\\\1</a> \", $t);\n\t \n\t //link twitter arguments\n\t $t = preg_replace( \"/ *#([a-z0-9_]*) ?/i\", \" <a href=\\\"http://twitter.com/search?q=%23\\\\1\\\" target=\\\"_blank\\\">#\\\\1</a> \", $t);\n\t \n\t // truncates long urls that can cause display problems (optional)\n\t $t = preg_replace(\"/>(([[:alnum:]]+:\\/\\/)|www\\.)([^[:space:]]\".\n\t \"{30,40})([^[:space:]]*)([^[:space:]]{10,20})([[:alnum:]#?\\/&=])\".\n\t \"</\", \">\\\\3...\\\\5\\\\6<\", $t);\n\t return trim($t);\n }",
"function generate_twitter_url($page_url, $opts = []) {\n $args = '';\n $twitter_desc_length = $twitter_via_length = $twitter_tags_length = 0;\n\n if(isset($opts['sharing_twitter_tags'])) {\n $pattern = '/[#| ]/';\n $twitter_tags = preg_replace($pattern, \"\", $opts['sharing_twitter_tags']);\n $twitter_stripped_tags = explode(\",\", $twitter_tags);\n \n $twitter_tags_length = count($twitter_stripped_tags) * 2; //space and # before each tag\n \n foreach($twitter_stripped_tags as $tag) {\n $twitter_tags_length += strlen($tag);\n }\n \n $args .= '&hashtags='.$twitter_tags;\n }\n \n\n if(isset($opts['sharing_twitter_via'])) {\n $pattern = '/[@| ]/';\n $twitter_via = preg_replace($pattern,\"\",$opts['sharing_twitter_via']);\n $twitter_via_length = strlen($twitter_via) + 5; //+3 space+@+space+twitter_via\n\n $args .= '&via='.$twitter_via;\n }\n \n\n\n if(isset($opts['sharing_twitter_desc'])) {\n if(is_array($opts['sharing_twitter_desc']) && isset($opts['sharing_twitter_desc']['raw'])) {\n $twitter_desc = $opts['sharing_twitter_desc']['raw'];\n } else {\n $twitter_desc = $opts['sharing_twitter_desc'];\n }\n $twitter_desc_length = strlen($twitter_desc);\n $args .= '&text='.rawurlencode($twitter_desc);\n }\n \n\n // URL of any length will be altered to 23 characters\n $tweet_length = 23 + $twitter_desc_length + $twitter_via_length + $twitter_tags_length;\n if($tweet_length > 230) {\n $twitter_url = 'https://twitter.com/intent/tweet?url='.$page_url;\t\n } else {\n $twitter_url = 'https://twitter.com/intent/tweet?url='.$page_url.$args;\n }\n \n\n\n return $twitter_url;\n }",
"public function addLinksToHashtags($loose = false) {\n if (!$loose) {\n return $this->autoLinkHashtags();\n }\n return preg_replace_callback(\n self::$patterns['valid_hashtag'],\n array($this, '_addLinksToHashtags'),\n $this->tweet);\n }"
] | [
"0.7049675",
"0.7045805",
"0.665697",
"0.65755326",
"0.657408",
"0.6508676",
"0.64750475",
"0.6390679",
"0.6370885",
"0.6332685",
"0.6292329",
"0.62648046",
"0.6232262",
"0.6201371",
"0.61734396",
"0.61608213",
"0.6145542",
"0.6115152",
"0.6091095",
"0.6033259",
"0.60260534",
"0.59386903",
"0.5936841",
"0.58965695",
"0.58954823",
"0.5890226",
"0.58660674",
"0.5853846",
"0.5849064",
"0.58473444"
] | 0.75790834 | 0 |
Display admin settings on page Transactions > Seller to Buyer | public function adminDisplaySettings()
{
$db = DataAccess::getInstance();
$allow_paypal_check = ($db->get_site_setting('paypal_allow_sb') == 1) ? "checked" : "";
$html = "
<div class='col_hdr'>Paypal</div>
<div class='form-group'>
<label class='control-label col-xs-12 col-sm-5'>Enable Paypal Seller-Buyer Gateway " . geoHTML::showTooltip('Enable Paypal Seller-Buyer Gateway', "This allows winning auction bidders to pay the seller directly via a PayPal link") . "</label>
<div class='col-xs-12 col-sm-6'>
<input type=\"checkbox\" name=\"paypal_allow_sb\" value=\"1\" $allow_paypal_check/>
</div>
</div>
<div class='form-group'>
<label class='control-label col-xs-12 col-sm-5'>Official Paypal Images (use in templates or text)</label>
<div class='col-xs-12 col-sm-6 vertical-form-fix'><a href='https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/cps/general/AcceptanceMarkLogos-outside' target='_blank'>Click to view Images</a></div>
</div>
";
//TODO: hide these settings when main allow_sb setting is off
$checked = $db->get_site_setting('pp_chain_enable') ? "checked='checked'" : '';
$html .= '
<div class="col_hdr">Advanced Paypal Settings</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-5">Enable Chain Payments</label>
<div class="col-xs-12 col-sm-6"><input type="checkbox" name="pp_chain_enable" value="1" onclick="jQuery(\'#chainSettings\').toggle(this.checked);" ' . $checked . ' /></div>
</div>
<div id="chainSettings" ' . (!$checked ? 'style="display: none;"' : '') . '>
<div class="page_note" style="text-align: center;">This requires at least a Paypal Business account, and special configuration/approval from Paypal. Most sites will not need to use this.</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-5">Partner Name<br><small>You will not have this until your account is fully approved by paypal but you can still test using the settings below</small></label>
<div class="col-xs-12 col-sm-6"><input type="text" name="pp_chain_partner" class="form-control col-md-7 col-xs-12" value="' . $db->get_site_setting('pp_chain_partner') . '" /></div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-5">Developer Username</label>
<div class="col-xs-12 col-sm-6"><input type="text" name="pp_chain_username" class="form-control col-md-7 col-xs-12" value="' . $db->get_site_setting('pp_chain_username') . '" /></div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-5">Developer Password</label>
<div class="col-xs-12 col-sm-6"><input type="text" name="pp_chain_password" class="form-control col-md-7 col-xs-12" value="' . $db->get_site_setting('pp_chain_password') . '" /></div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-5">Developer Signature</label>
<div class="col-xs-12 col-sm-6"><input type="text" name="pp_chain_signature" class="form-control col-md-7 col-xs-12" value="' . $db->get_site_setting('pp_chain_signature') . '" /></div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-5">Application ID</label>
<div class="col-xs-12 col-sm-6"><input type="text" name="pp_chain_appid" class="form-control col-md-7 col-xs-12" value="' . $db->get_site_setting('pp_chain_appid') . '" placeholder="leave blank for development"/></div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-5">User ID to receive payments (final fees) on behalf of site<br />(This user must have a Paypal account configured for use with seller-buyer)</label>
<div class="col-xs-12 col-sm-6"><input type="number" name="pp_chain_site_recipient" class="form-control col-md-7 col-xs-12" value="' . $db->get_site_setting('pp_chain_site_recipient') . '" /></div>
</div>
</div>
';
//TODO: make pp_chain_site_recipient a auto-search field on usernames
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function admin_options() {\r\n\t\t?>\r\n\t\t<h3><?php _e('PAYLER', 'woocommerce'); ?></h3>\r\n\t\t<p><?php _e('Настройка приема электронных платежей через PAYLER.', 'woocommerce'); ?></p>\r\n\r\n\t <?php if ( $this->is_valid_for_use() ) : ?>\r\n\r\n\t\t<table class=\"form-table\">\r\n\r\n\t\t<?php \t\r\n \t\t\t// Generate the HTML For the settings form.\r\n \t\t\t$this->generate_settings_html();\r\n ?>\r\n </table><!--/.form-table-->\r\n \t\t\r\n <?php else : ?>\r\n\t\t<div class=\"inline error\"><p><strong><?php _e('Шлюз отключен', 'woocommerce'); ?></strong>: <?php _e('Payler не поддерживает валюты вашего магазина.', 'woocommerce' ); ?></p></div>\r\n\t\t<?php\r\n\t\t\tendif;\r\n\r\n }",
"public function admin_options(){\n echo '<h3>'.__('Zaakpay Payment Gateway').'</h3>';\n echo '<p>'.__('India online payment solutions for all your transactions by Zaakpay').'</p>';\n echo '<table class=\"form-table\">';\n $this -> generate_settings_html();\n echo '</table>';\n\n }",
"public function _settings_link() {\n\t\t$this_sub_page = Event::$data;\n\t\techo ($this_sub_page == \"contacts\") ? Kohana::lang('ui_admin.contacts') : \n\t\t\t\"<a href=\\\"\".url::site().\"admin/crowdflower_settings\\\">\".\"CrowdFlower\".\"</a>\";\n\t}",
"public function admin_options()\n {\n echo '<h3>' . __('WayForPay.com', 'woocommerce-wayforpay-payments') . '</h3>';\n echo '<p>' . __('Payment gateway', 'woocommerce-wayforpay-payments') . '</p>';\n echo '<table class=\"form-table\">';\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n echo '</table>';\n }",
"public function admin_options() {\n ?>\n <h3><?php _e('綠界 Ecbank 超商代碼 收款模組', 'woocommerce'); ?></h3>\n <p><?php _e('此模組可以讓您使用綠界科技的Ecbank 超商代碼收款功能', 'woocommerce'); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }",
"public function admin_options() {\n\n\t\t?>\n\t\t<h3><?php _e( 'Epay.kkb.kz', 'woocommerce-gateway-kkb' ); ?></h3>\n\t\t<p><?php printf( __( 'Eay.kkb.kz works by sending the user to %sEpay.kkb.kz%s to enter their payment information.', 'woocommerce-gateway-kkb' ), '<a href=\"http://epay.kkb.kz/\">', '</a>' ); ?></p>\n\n\t\t<?php\n\t\tif ( $this->is_valid_for_use() ) {\n\t\t\t?><table class=\"form-table\"><?php\n\t\t\t// Generate the HTML For the settings form.\n\t\t\t$this->generate_settings_html();\n\t\t\t?></table><!--/.form-table--><?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"inline error\"><p><strong><?php _e( 'Gateway Disabled', 'woocommerce-gateway-kkb' ); ?></strong> <?php echo sprintf( __( 'Choose Kazakhstan tenge as your store currency in \"Currency Options\" to enable the Epay.kkb.kz Gateway.', 'woocommerce-gateway-kkb' )); ?></p></div>\n\t\t<?php\n\t\t} // End check currency\n\t\t?>\n\t<?php\n\t}",
"public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e( $this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form. Built in WC function\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }",
"public function admin_options() {\n\t\t\t?>\n\t\t\t<h3><?php echo ( ! empty( $this->method_title ) ) ? $this->method_title : __( 'Settings', 'woocommerce' ) ; ?></h3>\n\n\t\t\t<?php if( empty( $this->login_id ) || empty( $this->transaction_key ) ): ?>\n\t\t\t\t<div class=\"simplify-commerce-banner updated\">\n\t\t\t\t\t<img alt=\"<?php _e( 'Authorize.net', 'yith-woocommerce-authorizenet-payment-gateway' ) ?>\" src=\"<?php echo PG_WCAUTHNET_URL . '/assets/images/logo.jpg'; ?>\" style=\"width: 300px\" />\n\t\t\t\t\t<p class=\"main\"><strong><?php _e( 'Getting started', 'yith-woocommerce-authorizenet-payment-gateway' ); ?></strong></p>\n\t\t\t\t\t<p><?php _e( 'An Authorize.Net Payment Gateway account allows you to accept credit cards and electronic checks from websites and Internet auction sites. Our solutions are designed to save time and money for small- to medium-sized businesses.', 'yith-woocommerce-authorizenet-payment-gateway' ); ?></p>\n\n\t\t\t\t\t<p><a href=\"https://account.authorize.net/\" target=\"_blank\" class=\"button button-primary\"><?php _e( 'Sign up now', 'yith-woocommerce-authorizenet-payment-gateway' ); ?></a> <a href=\"http://www.authorize.net/\" target=\"_blank\" class=\"button\"><?php _e( 'Learn more', 'yith-woocommerce-authorizenet-payment-gateway' ); ?></a></p>\n\t\t\t\t</div>\n\t\t\t<?php endif; ?>\n\n\t\t\t<?php echo ( ! empty( $this->method_description ) ) ? wpautop( $this->method_description ) : ''; ?>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<?php $this->generate_settings_html(); ?>\n\t\t\t</table><?php\n\t\t}",
"public function adminUpdateSettings()\n {\n $db = DataAccess::getInstance();\n $sb = geoSellerBuyer::getInstance();\n\n //paypal - save settings\n\n\n $go_ahead = (isset($_POST['paypal_allow_sb']) && $_POST['paypal_allow_sb']) ? 1 : false;\n\n\n //check inputs\n\n if ($go_ahead && !$db->get_site_setting('paypal_allow_sb')) {\n $sb->initTableStructure();//make sure table structure is initialized.\n //turn on paypal for all price plans\n $plans = $this->_getAuctionPricePlans();\n foreach ($plans as $plan_id) {\n //set main price plan default settings\n $sb->setDefaultPlanSettings($plan_id, 0, array('paypal_allow_sb' => true));\n\n //get any cat price plans for this price plan, and set default settings\n $cat_plans = $this->_getAuctionPricePlans($plan_id);\n foreach ($cat_plans as $cat_plan_id) {\n //set cat price plan default settings\n $sb->setDefaultPlanSettings(0, $cat_plan_id, array('paypal_allow_sb' => true));\n }\n }\n }\n $db->set_site_setting('paypal_allow_sb', $go_ahead);\n\n $db->set_site_setting('pp_chain_enable', $_POST['pp_chain_enable']);\n $db->set_site_setting('pp_chain_partner', $_POST['pp_chain_partner']);\n $db->set_site_setting('pp_chain_username', $_POST['pp_chain_username']);\n $db->set_site_setting('pp_chain_password', $_POST['pp_chain_password']);\n $db->set_site_setting('pp_chain_signature', $_POST['pp_chain_signature']);\n $db->set_site_setting('pp_chain_appid', $_POST['pp_chain_appid']);\n\n\n $sitePP = $_POST['pp_chain_site_recipient'];\n if ($sitePP && !$sb->getUserSetting($sitePP, 'paypal_id')) {\n geoAdmin::m('Selected user is not a valid user OR does NOT have a registered paypal email', geoAdmin::ERROR);\n }\n\n $db->set_site_setting('pp_chain_site_recipient', $_POST['pp_chain_site_recipient']);\n\n return true;\n }",
"public function admin_options() {\n echo '<h3>' . __('Easebuzz', 'woo_payeasebuzz') . '</h3>';\n echo '<p><small><strong>' . __('Confirm your Mode: Is it LIVE or TEST.') . '</strong></small></p>';\n echo '<table class=\"form-table\">';\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n echo '</table>';\n }",
"function _admin_settings() {\r\n $params = array( 'endpoint' => $this );\r\n $this->load_template( 'settings.php', $params );\r\n }",
"public function admin_options(){\n echo '<h3>'.__('eCommerce EMPS WooCommerce Plugin', 'emp').'</h3>';\n echo '<p>'.__('eCommerce EMP WooCommerce Plugin').'</p>';\n echo '<table class=\"form-table\">';\n $this -> generate_settings_html();\n echo '</table>';\n\n }",
"public function admin_options() {\n\n ?>\n <h3><?php _e( 'Payfort Start', 'woocommerce' ); ?></h3>\n <p><?php _e( 'Please fill in the below section to start accepting payments on your site! You can find all the required information in your <a href=\"https://dashboard.start.payfort.com/\" target=\"_blank\">Payfort Dashboard</a>.', 'woocommerce' ); ?></p>\n\n <?php if ( $this->is_valid_for_use() ) : ?>\n\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n\n <?php else : ?>\n <div class=\"inline error\"><p><strong><?php _e( 'Gateway Disabled', 'woocommerce' ); ?></strong>: <?php _e( 'Payfort Start does not support your store currency at this time.', 'woocommerce' ); ?></p></div>\n <?php\n endif;\n }",
"function settings_bluepay() {\r\n\t\t$this -> render('metaboxes' . DS . 'pmethods' . DS . 'bluepay', false, true, 'admin');\r\n\t}",
"function settings_sagepay() {\t\r\n\t\tif ($this -> is_plugin_active('sagepay')) {\r\n\t\t\t$sagepay = $this -> extension_vendor('sagepay');\t\r\n\t\t\t$sagepay -> settings();\r\n\t\t}\t\r\n\t}",
"function settings() {\n\t\tglobal $page, $action, $EM_Notices;\n\t\t$gateway_link = admin_url('edit.php?post_type='.EM_POST_TYPE_EVENT.'&page=events-manager-options#bookings');\n\t\t$messages['updated'] = esc_html__('Gateway updated.', 'em-pro');\n\t\t$messages['error'] = esc_html__('Gateway not updated.', 'em-pro');\n\t\t?>\n\t <script type=\"text/javascript\" charset=\"utf-8\"><?php include(EM_DIR.'/includes/js/admin-settings.js'); ?></script>\n\t\t<div class='wrap nosubsub'>\n\t\t\t<h1><?php echo sprintf(__('Edit "%s" settings','em-pro'), esc_html($this->title) ); ?></h1>\n\t\t\t<?php\n\t\t\tif ( isset($_GET['msg']) && !empty($messages[$_GET['msg']]) ){ \n\t\t\t\techo '<div id=\"message\" class=\"'.$_GET['msg'].' fade\"><p>' . $messages[$_GET['msg']] . \n\t\t\t\t' <a href=\"'.em_add_get_params($_SERVER['REQUEST_URI'], array('action'=>null,'gateway'=>null, 'msg' => null)).'\">'.esc_html__('Back to gateways','em-pro').'</a>'.\n\t\t\t\t'</p></div>';\n\t\t\t}\n\t\t\t?>\n\t\t\t<form action='' method='post' name='gatewaysettingsform'>\n\t\t\t\t<input type='hidden' name='action' id='action' value='updated' />\n\t\t\t\t<input type='hidden' name='gateway' id='gateway' value='<?php echo $this->gateway; ?>' />\n\t\t\t\t<?php wp_nonce_field('updated-' . $this->gateway); ?>\n\t\t\t\t<h3><?php echo sprintf(esc_html__emp( '%s Options', 'events-manager'),esc_html__emp('Booking Form','events-manager')); ?></h3>\n\t\t\t\t<table class=\"form-table\">\n\t\t\t\t<tbody>\n <?php\n //Gateway Title\n $desc = sprintf(__('Only if you have not enabled quick pay buttons in your <a href=\"%s\">gateway settings</a>.', 'em-pro'),$gateway_link).' '.\n\t\t\t\t \t\t__('The user will see this as the text option when choosing a payment method.','em-pro'); \n em_options_input_text(__('Gateway Title', 'em-pro'), 'em_'.$this->gateway.'_option_name', $desc);\n\n //Gateway booking form info\n $desc = sprintf(__('Only if you have not enabled quick pay buttons in your <a href=\"%s\">gateway settings</a>.','em-pro'),$gateway_link).\n \t' '.__('If a user chooses to pay with this gateway, or it is selected by default, this message will be shown just below the selection.', 'em-pro'); \n em_options_textarea(__('Booking Form Information', 'em-pro'), 'em_'.$this->gateway.'_form', $desc); \n ?>\n\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t<?php $this->mysettings(); ?>\n\t\t\t\t<?php if($this->button_enabled): ?>\n\t\t\t\t<h3><?php echo _e('Quick Pay Buttons','em-pro'); ?></h3>\n\t\t\t\t<p><?php echo sprintf(__('If you have chosen to only use quick pay buttons in your <a href=\"%s\">gateway settings</a>, these settings below will be used.','em-pro'), $gateway_link); ?></p>\n\t\t\t\t<table class=\"form-table\">\n\t\t\t\t<tbody>\n\t\t\t\t <?php\n\t\t\t\t $desc = sprintf(__('Choose the button text. To use an image instead, enter the full url starting with %s or %s.', 'em-pro' ), '<code>http://...</code>','<code>https://...</code>');\n em_options_input_text(__('Payment Button', 'em-pro'), 'em_'.$this->gateway.'_button', $desc); \n\t\t\t\t ?>\n\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php do_action('em_gateway_settings_footer', $this); ?>\n\t\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes') ?>\" />\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t</div> <!-- wrap -->\n\t\t<?php\n\t}",
"public function admin_options() {\n\t\t// Make sure to empty the log file if not in test mode.\n\t\tif ( $this->settings['testmode'] != 'yes' ) {\n\t\t\t$this->log( '' );\n\t\t\t$this->log( '', true );\n\t\t}\n\n \t?>\n \t<h3><?php _e( 'CPS', 'woothemes' ); ?></h3>\n \t<p><?php printf( __( 'CPS Solidstone works by sending the user to %sCPS\\' Solidstone gateway%s to enter their payment information.', 'woothemes' ), '<a href=\"https://github.com/CPScc/wiki/blob/master/checkout-api.textile\">', '</a>' ); ?></p>\n\n \t<?php\n \tif ( 'USD' == get_option( 'woocommerce_currency' ) ) {\n \t\t?><table class=\"form-table\"><?php\n\t\t\t// Generate the HTML For the settings form.\n \t\t$this->generate_settings_html();\n \t\t?></table><!--/.form-table--><?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"inline error\"><p><strong><?php _e( 'Gateway Disabled', 'woothemes' ); ?></strong> <?php echo sprintf( __( 'Choose United States dollars as your store currency in <a href=\"%s\">Pricing Options</a> to enable the CPS Gateway.', 'woocommerce' ), admin_url( '?page=woocommerce&tab=catalog' ) ); ?></p></div>\n\t\t<?php\n\t\t} // End check currency\n\t\t?>\n \t<?php\n }",
"public function render_settings_section() {\n _e('Insert your license information to enable updates.', $this->text_domain);\n }",
"function admin_settings() {\n\t\t\t\twoocommerce_admin_fields( $this->settings );\n\t\t\t}",
"function settings_eupayment() {\r\n\t\t$this -> render('metaboxes' . DS . 'settings-eupayment', false, true, 'admin');\r\n\t}",
"function bbp_admin_settings()\n{\n}",
"function adminDisplayPricePlanSettings($vars)\n {\n if (PHP5_DIR) {\n $menu_loader = geoAdmin::getInstance();\n } else {\n $menu_loader =& geoAdmin::getInstance();\n }\n if (!$this->_paypalAllowed()) {\n return ''; //main setting turned off, nothing to display...\n }\n $price_plan_id = $vars['price_plan_id'];\n $category = $vars['category'];\n\n $sb = geoSellerBuyer::getInstance();\n $allow_paypal_check = ($sb->getPlanSetting($price_plan_id, $category, 'paypal_allow_sb')) ? 'checked=\"checked\" ' : '';\n $html = \"\n\t\t\t\t<div class='form-group'>\n\t\t\t\t\t<label class='control-label col-xs-12 col-sm-5'>Enable Paypal Seller-Buyer Gateway \" . geoHTML::showTooltip('Enable Paypal Seller-Buyer Gateway', \"This allows winning auction bidders to pay the seller directly via a PayPal link\") . \"</label>\n\t\t\t\t\t<div class='col-xs-12 col-sm-6'>\n\t\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"paypal_allow_sb\\\" value=\\\"1\\\" $allow_paypal_check/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\";\n return $html;\n }",
"public function magento_settings_page() {\n echo '<div class=\"wrap\">\n <h2>Your Plugin Name</h2>\n <form method=\"post\" action=\"options.php\">';\n settings_fields( \"magento-settings-group\");\n do_settings_sections(\"magento-settings-group\");\n echo '<table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\">Magento path</th>\n <td><input type=\"text\" name=\"magento_path\" value=\"' . esc_attr(get_option('magento_path')) . '\" /></td>\n </tr>\n </table>';\n submit_button();\n echo '</form>\n </div>';\n }",
"public function settings()\n\t{\n\t\tee()->functions->redirect($this->mcp_url('settings'));\n\t}",
"public function admin_options() {\n\t\t\t\t?>\n\t\t<h3><?php _e('OpenPay', 'woocommerce'); ?></h3>\t \n\t\t\n\t\t<table class=\"form-table\">\n\t\t\n\t\t<?php\n\t\t\tif ( $this->is_valid_for_use() ) :\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Generate the HTML For the settings form\n\t\t\t\t$this->generate_settings_html();\n\t\t\t\t\n\t\t\telse :\n\t\t\t\t?>\n\t\t\t\t\t<div class=\"inline error\"><p><strong><?php _e( 'Gateway Disabled', 'woocommerce' ); ?></strong>: <?php _e( 'OpenPay está diseñado para México y solo soporta pago en pesos mexicanos. (MXN)', 'woocommerce' ); ?></p></div>\n\t\t\t\t<?php\n\t\t\tendif;\n\t\t\n\t\t\n\t\t?>\n\t\t<tr valign=\"top\">\n\t\t\t<th scope=\"row\" class=\"titledesc\">\n\t\t\t\t<label for=\"verification_code\">Código de verificación</label></th>\n\t\t\t<td class=\"forminp\">\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend class=\"screen-reader-text\"><span>Open Pay Código de Verificación</span></legend>\n\t\t\t\t\t<label for=\"woocommerce_openpay_code_private\">\n\t\t\t\t\t<input id=\"verification_code\" type=\"text\" disabled value=\"<?php echo get_option('openpay_code_private'); ?>\" />\n\t\t\t\t\t<p class=\"description\">Utilice este código para validar la página en OpenPay</p>\n\t\t\t\t</fieldset>\n\t\t\t</td>\n\t\t</tr>\n\t\t\n\t\t</table><!--/.form-table-->\n\t\t<?php\n\t\t\t}",
"function create_settings_page()\n\t{\n $this->options = get_option( 'marketo_credentials_option' );\n\t\t?>\n\t\t<div>\n\t\t\t<?php screen_icon(); ?>\n\t\t\t<h2>Marketo Subscribe Settings</h2>\n\t\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t<?php\n // This prints out all hidden setting fields\n settings_fields( 'marketo_credentials_group' ); \n do_settings_sections( 'marketo-subscribe-settings' );\n submit_button(); \n ?>\n\t\t\t</form>\n\t\t</div>\n\n\t\t<?php\n\t}",
"public function get_setting_url() {\n return admin_url( 'admin.php?page=credit-topup.php' );\n }",
"public function action_settings()\n {\n if ( ! ($this->user->role == self::ROLE_ORG_CREATOR ||\n $this->user->role == self::ROLE_PEN_CREATOR ||\n $this->user->role == self::ROLE_ADMIN ||\n $this->user->role == self::ROLE_DEMO ) ) {\n throw new HTTP_Exception_403();\n }\n\n $this->template->title = 'Настройки - ' . $this->pension->name;\n $this->template->section = View::factory('pensions/pages/settings')\n ->set('pension', $this->pension);\n }",
"function buyg_settings_page_html() {\n\n // check user capabilities\n if ( ! current_user_can( 'manage_options' ) ) {\n return;\n }\n\n // add error/update messages\n\n // check if the user have submitted the settings\n // wordpress will add the \"settings-updated\" $_GET parameter to the url\n if ( isset( $_GET['settings-updated'] ) ) {\n // echo \"Impostazioni Aggiornate\";\n // add settings saved message with the class of \"updated\"\n add_settings_error( 'buyg_messages', 'buyg_message', 'Impostazioni Salvate', 'updated' );\n }\n\n // show error/update messages\n settings_errors( 'buyg_messages' );\n ?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n settings_fields( 'buyg_settings' );\n // output setting sections and their fields\n // (sections are registered for \"wporg\", each field is registered to a specific section)\n do_settings_sections( 'buyg_settings' );\n // output save settings button\n submit_button( 'Salva Impostazioni' );\n ?>\n </form>\n </div>\n <?php\n}",
"function view_pool_settings()\r\n {\r\n if (has_priv('view_pool')) {\r\n $data =$this->set_menu();\r\n $data['poolings']= $this->Pooling_model->get_all_pooings();\r\n $this->load->view('admin/edit_view_pool_settings',$data);\r\n }\r\n }"
] | [
"0.69360095",
"0.6701063",
"0.6623394",
"0.6576804",
"0.6556509",
"0.64547896",
"0.6363383",
"0.63456124",
"0.6320475",
"0.6236118",
"0.6221677",
"0.6197267",
"0.6150608",
"0.6143153",
"0.61427444",
"0.612828",
"0.60960376",
"0.60825706",
"0.6072969",
"0.60707664",
"0.6052575",
"0.6038859",
"0.5989247",
"0.5956567",
"0.59558505",
"0.5942085",
"0.5938603",
"0.5937427",
"0.59225506",
"0.59135556"
] | 0.69697297 | 0 |
Display settings for a specific price plan, specified by $vars['price_plan_id'] or category price plan $vars['category'] | function adminDisplayPricePlanSettings($vars)
{
if (PHP5_DIR) {
$menu_loader = geoAdmin::getInstance();
} else {
$menu_loader =& geoAdmin::getInstance();
}
if (!$this->_paypalAllowed()) {
return ''; //main setting turned off, nothing to display...
}
$price_plan_id = $vars['price_plan_id'];
$category = $vars['category'];
$sb = geoSellerBuyer::getInstance();
$allow_paypal_check = ($sb->getPlanSetting($price_plan_id, $category, 'paypal_allow_sb')) ? 'checked="checked" ' : '';
$html = "
<div class='form-group'>
<label class='control-label col-xs-12 col-sm-5'>Enable Paypal Seller-Buyer Gateway " . geoHTML::showTooltip('Enable Paypal Seller-Buyer Gateway', "This allows winning auction bidders to pay the seller directly via a PayPal link") . "</label>
<div class='col-xs-12 col-sm-6'>
<input type=\"checkbox\" name=\"paypal_allow_sb\" value=\"1\" $allow_paypal_check/>
</div>
</div>";
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function plans_pricing() {\n $data['basepath'] = base_url();\n $data['plandetails'] = $this->DatabaseModel->access_database('ts_plans','select','',array( 'plan_status'=>1));\n if( $this->ts_functions->getsettings('portal','revenuemodel') != 'subscription' ) {\n redirect(base_url());\n }\n\t\t$this->load->view('themes/'.$this->theme.'/home/include/home_header',$data);\n\t\t$this->load->view('themes/'.$this->theme.'/home/include/menu_header',$data);\n\t\t$this->load->view('themes/'.$this->theme.'/home/pricing_table',$data);\n\t\t$this->load->view('themes/'.$this->theme.'/home/include/home_footer',$data);\n }",
"public function show(PricingPlan $pricingPlan)\n {\n //\n }",
"public function adminDisplaySettings()\n {\n $db = DataAccess::getInstance();\n\n $allow_paypal_check = ($db->get_site_setting('paypal_allow_sb') == 1) ? \"checked\" : \"\";\n\n $html = \"\n\t\t<div class='col_hdr'>Paypal</div>\n\t\t<div class='form-group'>\n\t\t\t<label class='control-label col-xs-12 col-sm-5'>Enable Paypal Seller-Buyer Gateway \" . geoHTML::showTooltip('Enable Paypal Seller-Buyer Gateway', \"This allows winning auction bidders to pay the seller directly via a PayPal link\") . \"</label>\n\t\t\t<div class='col-xs-12 col-sm-6'>\n\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"paypal_allow_sb\\\" value=\\\"1\\\" $allow_paypal_check/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='form-group'>\n\t\t\t<label class='control-label col-xs-12 col-sm-5'>Official Paypal Images (use in templates or text)</label>\n\t\t\t<div class='col-xs-12 col-sm-6 vertical-form-fix'><a href='https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/cps/general/AcceptanceMarkLogos-outside' target='_blank'>Click to view Images</a></div>\n\t\t</div>\n\";\n //TODO: hide these settings when main allow_sb setting is off\n $checked = $db->get_site_setting('pp_chain_enable') ? \"checked='checked'\" : '';\n $html .= '\n\t\t<div class=\"col_hdr\">Advanced Paypal Settings</div>\n\t\t<div class=\"form-group\">\n\t\t\t<label class=\"control-label col-xs-12 col-sm-5\">Enable Chain Payments</label>\n\t\t\t<div class=\"col-xs-12 col-sm-6\"><input type=\"checkbox\" name=\"pp_chain_enable\" value=\"1\" onclick=\"jQuery(\\'#chainSettings\\').toggle(this.checked);\" ' . $checked . ' /></div>\n\t\t</div>\n\t\t<div id=\"chainSettings\" ' . (!$checked ? 'style=\"display: none;\"' : '') . '>\n\t\t\t<div class=\"page_note\" style=\"text-align: center;\">This requires at least a Paypal Business account, and special configuration/approval from Paypal. Most sites will not need to use this.</div>\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<label class=\"control-label col-xs-12 col-sm-5\">Partner Name<br><small>You will not have this until your account is fully approved by paypal but you can still test using the settings below</small></label>\n\t\t\t\t<div class=\"col-xs-12 col-sm-6\"><input type=\"text\" name=\"pp_chain_partner\" class=\"form-control col-md-7 col-xs-12\" value=\"' . $db->get_site_setting('pp_chain_partner') . '\" /></div>\n\t\t\t</div>\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<label class=\"control-label col-xs-12 col-sm-5\">Developer Username</label>\n\t\t\t\t<div class=\"col-xs-12 col-sm-6\"><input type=\"text\" name=\"pp_chain_username\" class=\"form-control col-md-7 col-xs-12\" value=\"' . $db->get_site_setting('pp_chain_username') . '\" /></div>\n\t\t\t</div>\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<label class=\"control-label col-xs-12 col-sm-5\">Developer Password</label>\n\t\t\t\t<div class=\"col-xs-12 col-sm-6\"><input type=\"text\" name=\"pp_chain_password\" class=\"form-control col-md-7 col-xs-12\" value=\"' . $db->get_site_setting('pp_chain_password') . '\" /></div>\n\t\t\t</div>\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<label class=\"control-label col-xs-12 col-sm-5\">Developer Signature</label>\n\t\t\t\t<div class=\"col-xs-12 col-sm-6\"><input type=\"text\" name=\"pp_chain_signature\" class=\"form-control col-md-7 col-xs-12\" value=\"' . $db->get_site_setting('pp_chain_signature') . '\" /></div>\n\t\t\t</div>\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<label class=\"control-label col-xs-12 col-sm-5\">Application ID</label>\n\t\t\t\t<div class=\"col-xs-12 col-sm-6\"><input type=\"text\" name=\"pp_chain_appid\" class=\"form-control col-md-7 col-xs-12\" value=\"' . $db->get_site_setting('pp_chain_appid') . '\" placeholder=\"leave blank for development\"/></div>\n\t\t\t</div>\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<label class=\"control-label col-xs-12 col-sm-5\">User ID to receive payments (final fees) on behalf of site<br />(This user must have a Paypal account configured for use with seller-buyer)</label>\n\t\t\t\t<div class=\"col-xs-12 col-sm-6\"><input type=\"number\" name=\"pp_chain_site_recipient\" class=\"form-control col-md-7 col-xs-12\" value=\"' . $db->get_site_setting('pp_chain_site_recipient') . '\" /></div>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t';\n //TODO: make pp_chain_site_recipient a auto-search field on usernames\n return $html;\n }",
"public function showSettings($params);",
"function adminUpdatePricePlanSettings($vars)\n {\n $db = true;\n include(GEO_BASE_DIR . 'get_common_vars.php');\n\n $price_plan_id = $vars['price_plan_id'];\n $category = $vars['category'];\n\n if (!$db->get_site_setting('paypal_allow_sb')) {\n return true; //main setting turned off, nothing to save...\n }\n\n if (PHP5_DIR) {\n $menu_loader = geoAdmin::getInstance();\n } else {\n $menu_loader =& geoAdmin::getInstance();\n }\n\n $sb = geoSellerBuyer::getInstance();\n\n //BIDPAY - save settings\n if (isset($_POST['paypal_allow_sb']) && $_POST['paypal_allow_sb']) {\n $sb->setPlanSetting($price_plan_id, $category, 'paypal_allow_sb', true);\n\n return true;\n }\n //un-checked, turn off\n $sb->setPlanSetting($price_plan_id, $category, 'paypal_allow_sb', false);\n return true;\n }",
"public function show(Plan $plan)\n {\n //\n }",
"public function show(Plan $plan)\n {\n //\n }",
"public function pricePlan()\n {\n $self = 'sms-price-plan';\n if (Auth::user()->username !== 'admin') {\n $get_perm = Permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important' => true\n ]);\n }\n }\n\n $price_plan = SMSPricePlan::all();\n return view('admin.sms-price-plan', compact('price_plan'));\n }",
"public function planView()\n\t{\n\t\t//get data from table tbl_plan\n\t\t$fetched1Data=$this->planModel->getPlanByType(\"plan1\");\n\t\t$data['plan1Data']=$fetched1Data;\n\t\t\n\t\t$fetched2Data=$this->planModel->getPlanByType(\"plan2\");\n\t\t$data['plan2Data']=$fetched2Data;\n\t\t\n\t\t$fetched3Data=$this->planModel->getPlanByType(\"plan3\");\n\t\t$data['plan3Data']=$fetched3Data;\n\t\t\n\t\t$getPlanByUserid=$this->planModel->getPlanByUserid($this->session->userdata('user_id'));\n\t\t$data['savedplanData']=$getPlanByUserid;\n\t\t\n\t\t$data['pageSource']= 'edit';\n\t\t\n\t\t$this->load->helper('form');\n\t\t$this->load->view('templates/admin_header',$data);\n\t\t$this->load->view('templates/navigation',$data);\n\t\t$this->load->view('templates/plan_view_client',$data);\n\t\t$this->load->view('templates/admin_footer',$data);\n\n\t}",
"function m_showCustomOpt(){\n\t\t\n\t\t#DECLARYFING TEMPLATE FILE\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"optionCustom\", $this->optionsTemplate);\n\t\t\n\t\t#INTIALIZING TEMPLATE BLOCKS\t\t\n\t\t$this->ObTpl->set_block(\"optionCustom\",\"TPL_MAINOPTIONS_BLK\",\"mainoption_blk\");\t\t\n\t\t$this->ObTpl->set_block(\"TPL_MAINOPTIONS_BLK\",\"TPL_CTMOPTIONS_BLK\",\"dspctmoption_blk\");\n\t\t$this->ObTpl->set_var(\"TPL_SHOPURL\",SITE_URL.\"ecom/\");\n\t\t\n\t\t$this->ObTpl->set_var(\"mainoption_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"dspctmoption_blk\",\"\");\n\t\t\n\t\t#QUERY TO GET DEPARTMENTS UNDER SELECTED DEPARTMENT\n\t\t$query= \"SELECT * FROM \". CHOICES ;\n\t\tif(isset($this->request['search']) && !empty($this->request['search']))\n\t\t{\n\t\t\t$query=$query.\" WHERE vName LIKE '%\".$this->request['search'].\"%' OR vDescription LIKE '%\".$this->request['search'].\"%'\";\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SEARCH\",$this->request['search']);\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWALL\",\"<a href='\".SITE_URL.\"ecom/adminindex.php?action=ec_option.home'>View All</a>\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SEARCH\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWALL\",\"\");\n\t\t}\n\t\t\n\t\t$query=$query.\" order by vName\";\n\t\t$this->obDb->query=$query;\t\n\t\t\n\t\t$resChoice=$this->obDb->fetchQuery();\n\t\t$varCount1=$this->obDb->record_count;\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CURRENCY\",CONST_CURRENCY);\n\t\t$this->ObTpl->set_var(\"TPL_TOTAL_RECORDS1\",$varCount1);\n\t\tif($varCount1>0)\n\t\t{\n\t\t\tfor($i=0;$i<$varCount1;$i++)\n\t\t\t{\n\t\t\t\tif($resChoice[$i]->iUseInventory==1)\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_USTOCK\",\"yes\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_USTOCK\",\"no\");\n\t\t\t\t}\t\n\n\t\t\t\tif(file_exists($this->imagePath.\"options/\".$resChoice[$i]->vImage) && $resChoice[$i]->vImage!=\"\")\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_IMGLBL\",\"Edit\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_IMGLBL\",\"Add\");\n\t\t\t\t}\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHOICEID\",$resChoice[$i]->iChoiceid_PK);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CTITLE\",$resChoice[$i]->vName);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TYPE\",$resChoice[$i]->vType);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PRICE\",$resChoice[$i]->fPrice);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",\"\");\n\t\t\t\t$this->ObTpl->parse(\"dspctmoption_blk\",\"TPL_CTMOPTIONS_BLK\",true);\t\n\t\t\t}\n\t\t$this->ObTpl->parse(\"mainoption_blk\",\"TPL_MAINOPTIONS_BLK\",true);\n\t\t}\n\t\t\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\n\t\treturn($this->ObTpl->parse(\"return\",\"optionCustom\"));\n\t}",
"function view_pool_settings()\r\n {\r\n if (has_priv('view_pool')) {\r\n $data =$this->set_menu();\r\n $data['poolings']= $this->Pooling_model->get_all_pooings();\r\n $this->load->view('admin/edit_view_pool_settings',$data);\r\n }\r\n }",
"function display(){\n global $DOPBSP;\n \n $DOPBSP->views->backend_settings_payment_gateways->template(array('id' => $_POST['id']));\n \n die();\n }",
"function ShowSettings()\n {\n // $Panel = new Panel();\n $ln_sys = new SysLang();\n\n $script = $_SERVER['PHP_SELF'].'?module='.$this->module;\n\n $q=\"select * from `\".TblModShopSet.\"` where 1\";\n $res = $this->Right->Query( $q, $this->user_id, $this->module );\n if( !$this->Right->result ) return false;\n $row = $this->Right->db_FetchAssoc();\n\n // Write Form Header\n $this->Form->WriteHeader( $script );\n AdminHTML::PanelSimpleH();\n\n $q_spr1 = \"select * from sys_func order by id desc\";\n $res_spr1 = $this->Right->Query($q_spr1, $this->user_id, $this->module);\n $rows_spr1 = $this->Right->db_GetNumRows();\n $mas1['']='';\n for($i=0; $i<$rows_spr1; $i++){\n $row_spr1=$this->Right->db_FetchAssoc();\n $mas1[$row_spr1['id']] = $this->Spr->GetNameByCod( TblSysSprFunc, $row_spr1['id'] );\n if (!empty($row_spr1['name']))\n $mas1[$row_spr1['id']]=$mas1[$row_spr1['id']].' ('.$row_spr1['name'].')';\n }\n\n ?>\n <TR valign=\"top\">\n <TD width=\"200\">\n <table border=\"0\" cellspacing=\"1\" cellpading=\"0\" width=\"200\" class=\"EditTable\">\n <tr>\n <td colspan=\"2\"><b><?=$this->Msg->show_text('TXT_MARKET_USED_PROPS')?></b></td>\n </tr>\n <tr class=tr1>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_DELIVERY');?>\n <td><?$this->Form->CheckBox( \"delivery\", '', $row['delivery'] );?>\n </tr>\n <tr class=tr2>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_CURRENCY');?>\n <td><?$this->Form->CheckBox( \"currency\", '', $row['currency'] );?>\n </tr>\n <tr class=tr1>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_NADAVI');?>\n <td><?$this->Form->CheckBox( \"nadavi\", '', $row['nadavi'] );?>\n </tr>\n <tr class=tr2>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_META');?>\n <td><?$this->Form->CheckBox( \"meta\", '', $row['meta'] );?>\n </tr>\n <tr class=tr1>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_BIGMIR');?>\n <td><?$this->Form->CheckBox( \"bigmir\", '', $row['bigmir'] );?>\n </tr>\n <tr class=tr2>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_EKATALOG');?>\n <td><?$this->Form->CheckBox( \"e-katalog\", '', $row['e-katalog'] );?>\n </tr>\n <tr class=tr1>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_HOTPRICE');?>\n <td><?$this->Form->CheckBox( \"hotprice\", '', $row['hotprice'] );?>\n </tr>\n <tr class=tr2>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_HOTLINE');?>\n <td><?$this->Form->CheckBox( \"hotline\", '', $row['hotline'] );?>\n </tr>\n <tr class=tr1>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_PAY_UA');?>\n <td><?$this->Form->CheckBox( \"pay_ua\", '', $row['pay_ua'] );?>\n </tr>\n <tr class=tr2>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_PRICE_UA');?>\n <td><?$this->Form->CheckBox( \"price_ua\", '', $row['price_ua'] );?>\n </tr>\n <tr class=tr1>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_YANDEX');?>\n <td><?$this->Form->CheckBox( \"yandex\", '', $row['yandex'] );?>\n </tr>\n <tr class=tr2>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_I_UA');?>\n <td><?$this->Form->CheckBox( \"iua\", '', $row['iua'] );?>\n </tr>\n <tr class=tr1>\n <td align=\"left\"><?=$this->Msg->show_text('TXT_MARKET_MARKETGID');?>\n <td><?$this->Form->CheckBox( \"marketgid\", '', $row['marketgid'] );?>\n </tr>\n\n </table>\n </TD>\n <TD></TD>\n <TD>\n <table border=0 cellspacing=1 cellpading=0 class=\"EditTable\">\n <tr>\n <td colspan=2><b><?=$this->Msg->show_text('TXT_MARKET_SHOP_DATA')?>:</b></td>\n </tr>\n <tr>\n <td>\n <?\n echo \"\\n <table border=0 class='EditTable' width='100%'>\";\n\n echo \"\\n<tr><td><b>\".$this->Msg->show_text('TXT_MARKET_FLD_NAME').\":</b></td>\";\n echo \"\\n<td>\";\n $this->Form->TextBox( 'name', stripslashes($row['name']), 30 );\n echo \"\\n<tr><td><b>\".$this->Msg->show_text('TXT_MARKET_FLD_COMPANY').\":</b></td>\";\n echo \"\\n<td>\";\n $this->Form->TextBox( 'company', stripslashes($row['company']), 30 );\n echo \"\\n<tr><td><b>\".$this->Msg->show_text('TXT_MARKET_FLD_URL').\":</b></td>\";\n echo \"\\n<td>\";\n $this->Form->TextBox( 'url', stripslashes($row['url']), 30 );\n echo \"\\n</table>\";\n ?>\n </td>\n </tr>\n </table>\n </TD>\n </TR>\n <?\n AdminHTML::PanelSimpleF();\n $this->Form->WriteSavePanel( $script );\n //$this->Form->WriteCancelPanel( $script );\n\n //AdminHTML::PanelSubF();\n\n $this->Form->WriteFooter();\n return true;\n }",
"function jr_plan_price( $plan_data ) {\n\n\t$price = $plan_data[JR_FIELD_PREFIX.'price'];\n\n\tif ( ( get_query_var('job_relist') || isset($_POST['relist']) ) && isset($plan_data[JR_FIELD_PREFIX.'relist_price']) ) {\n\t\t$price = intval($plan_data[JR_FIELD_PREFIX.'relist_price']);\n\t}\n\treturn apply_filters( 'jr_plan_price', $price, $plan_data );\n}",
"public function show(PlanType $planType)\n {\n //\n }",
"public function managePricePlan($id)\n {\n $self = 'sms-price-plan';\n if (Auth::user()->username !== 'admin') {\n $get_perm = Permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important' => true\n ]);\n }\n }\n\n $price_plan = SMSPricePlan::find($id);\n if ($price_plan) {\n return view('admin.manage-price-plan', compact('price_plan'));\n } else {\n return redirect('sms/price-plan')->with([\n 'message' => language_data('Plan not found'),\n 'message_important' => true\n ]);\n }\n }",
"function showCablingPlan()\n{\n\techo \"<img hspace='10' vspace='10' src='?module=image&img=plugin_cablingplan&format=png' />\\n\";\n}",
"public function setting()\n {\n $commission = array(\n 'ucap' => ucap_get('ucap_commission') ?? 0.00,\n 'university' => ucap_get('university_commission') ?? 0.00,\n 'representative' => ucap_get('representative_commission') ?? 0.00,\n );\n $termcondition = ucap_get('termcondition');\n return view('superadmin.finance.setting', compact(['commission', 'termcondition']));\n }",
"function listings_placement_common_detailsDisplay()\n {\n $cart = geoCart::getInstance();\n $item = $cart->item;\n $sb = geoSellerBuyer::getInstance();\n if (!is_object($item)) {\n //something weird\n return;\n }\n\n //make sure paypal is turned on for price plan\n if (!$sb->getPlanSetting($item->getPricePlan(), $item->getCategory(), 'paypal_allow_sb')) {\n return '';\n }\n\n //make sure user has paypal e-mail set\n $email = $sb->getUserSetting($cart->order->getBuyer(), 'paypal_id');\n $messages = $this->_getText(9);\n $tpl = new geoTemplate('system', 'payment_gateways');\n $tpl->assign('msgs', $messages);\n\n $tpl->assign('email', $email);\n //see if setting is set in session already\n $paypal_allow_sb = $sb->getCartItemSetting('paypal_allow_sb');\n $tpl->assign('checked', ($paypal_allow_sb) ? true : false);\n\n //No paypal ID set, show text link to my info page\n $tpl->assign('myInfoLink', $cart->db->get_site_setting('classifieds_url') . \"?a=4&b=3#paypal_field\");\n\n return $tpl->fetch('seller_buyer/paypal/payment_choices_checkbox.tpl');\n }",
"public function displaySettings() {\n\t\t\n\t\t// authorize call\n\t\t$this->authorize(Permissions::SETTINGS_UPDATE_SETTINGS);\n\t\t\n\t\t// get ref to managers\n\t\t$settingsManager = $this->getCtx()->getSettingsManager();\n\t\t\n\t\t// query for the settingss\n\t\t$settings = $settingsManager->getAllSettings();\n\t\t\t\n\t\t// prepare view data\n\t\t$data[\"component\"] = \"components/component_form_settings.php\";\n\t\t$data[\"component_title\"] = \"Change Settings\";\n\n\t\t// the settings are passed as a key/value map as the view will look up values by key\n\t\t$data[\"component_settings_key_value_map\"] = $settings->toKeyValue(\"key\", \"value\");\n\t\t\n\t\t// render view\n\t\t$this->renderView($data);\n\t}",
"public function edit_plan()\n\t{\n\t\t//Get the payment if from url\n\t\t$plan_id = $this->uri->segment(3);\n\t\t\n\t\t$data['title']= 'Edit Plan';\n\t\t\n\t\t//get data from table tbl_plan\n\t\t$fetchedData=$this->planModel->getPlanById($plan_id);\n\t\t$data['confData']=$fetchedData;\n\t\t\n\t\t$data['pageSource']= 'edit';\n\t\t$this->load->helper('form');\n\t\t$this->load->view('templates/admin_header',$data);\n\t\t$this->load->view('templates/navigation',$data);\n\t\t$this->load->view('templates/plan',$data);\n\t\t$this->load->view('templates/admin_footer',$data);\n\n\t}",
"function vendor_plans() {\n $data['basepath'] = base_url();\n $data['vendorplandetails'] = $this->DatabaseModel->access_database('ts_vendorplans','select','',array( 'vplan_status'=>1));\n\n if( $this->ts_functions->getsettings('marketplace','typevendor') != 'multi') {\n redirect(base_url());\n }\n\t\t$this->load->view('themes/'.$this->theme.'/home/include/home_header',$data);\n\t\t$this->load->view('themes/'.$this->theme.'/home/include/menu_header',$data);\n\t\t$this->load->view('themes/'.$this->theme.'/home/pricing_table',$data);\n\t\t$this->load->view('themes/'.$this->theme.'/home/include/home_footer',$data);\n }",
"function mostrar_plan(){\n\t\tif (isset($_GET['temp']) && $_GET['temp']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$temp=$_GET['temp'];\n\t\t\t$sql=\"SELECT * FROM habitaciones WHERE id='$temp'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->id_cat=$resultado['id'];\n\t\t\t$this->nombre=$resultado['nombre'];\n\t\t\t$this->prioridad=$resultado['orden'];\n\t\t\t$this->mostrar=$resultado['listar'];\n\t\t\t$this->descripcion=$resultado['descripcion'];\n\t\t\t$this->precio=$resultado['precio'];\n\t\t\t$this->weekend=$resultado['weekend'];\n\t\t\t$this->tipotarifa=$resultado['tipotarifa'];\n\t\t\t$this->regimen=$resultado['regimen'];\n\t\t\t$this->maxadultos=$resultado['maxAdultos'];\n\t\t\t$this->maxpaxadd=$resultado['maxNumPaxAdic'];\n\t\t} \n\t}",
"public function show(settings $settings)\n {\n //\n }",
"public function settings_page() {\n\n if (!current_user_can($this->capability)) return;\n\n if (isset ($_GET['tab'])) $this->admin_tabs($_GET['tab']); else $this->admin_tabs($this->default_tab); // print tabs\n $tab = $this->get_tab();\n\n ?>\n <div class=\"spine-js-container\">\n <div class=\"spine-js-main\">\n <form action=\"options.php\" method=\"post\">\n <?php\n switch ($tab) {\n\n case 'db_backup' :\n settings_fields('spine_js_settings_db'); // matches option group\n do_settings_sections( $this->plugin_slug ); // prints form fields\n $this->print_submit_button(); // print submit buttton\n break;\n\n case 'wpt_custom_menu' :\n settings_fields('spine_js_settings_wpt'); // matches option group\n do_settings_sections( $this->plugin_slug ); // prints form fields\n $this->print_submit_button(); // print submit buttton\n break;\n\n case 'woo_action_taxonomy' :\n settings_fields('spine_js_settings_woo'); // matches option group\n do_settings_sections( $this->plugin_slug ); // prints form fields\n $this->print_submit_button(); // print submit buttton\n break;\n\n }\n //possibility to hook into the tabs.\n do_action(\"show_tab_{$tab}\");\n ?>\n </form>\n </div><!-- end spine-js-main-->\n </div><!-- end spine-js-main-->\n <?php\n\n }",
"function pms_get_output_subscription_plan_price( $subscription_plan = null ) {\r\n\r\n if( is_null( $subscription_plan ) )\r\n return '';\r\n\r\n if( ! is_object( $subscription_plan ) )\r\n return '';\r\n\r\n\r\n // Handle the subscription plan price\r\n if( $subscription_plan->price == 0 )\r\n $price_output = '<span class=\"pms-subscription-plan-price-value\">' . __( 'Free', 'paid-member-subscriptions' ) . '</span>';\r\n else {\r\n $price_output = pms_format_price( $subscription_plan->price, pms_get_active_currency(), array( 'before_price' => '<span class=\"pms-subscription-plan-price-value\">', 'after_price' => '</span>', 'before_currency' => '<span class=\"pms-subscription-plan-currency\">', 'after_currency' => '</span>' ) );\r\n }\r\n\r\n $price_output = apply_filters( 'pms_subscription_plan_output_price', '<span class=\"pms-divider\"> - </span>' . $price_output, $subscription_plan );\r\n\r\n // Handle the subscription plan duration\r\n if( $subscription_plan->duration == 0 )\r\n $duration_output = apply_filters( 'pms_subscription_plan_output_duration_unlimited', '', $subscription_plan );\r\n else {\r\n $duration = '';\r\n switch ($subscription_plan->duration_unit) {\r\n case 'day':\r\n $duration = sprintf( _n( '%s Day', '%s Days', $subscription_plan->duration, 'paid-member-subscriptions' ), $subscription_plan->duration );\r\n break;\r\n case 'week':\r\n $duration = sprintf( _n( '%s Week', '%s Weeks', $subscription_plan->duration, 'paid-member-subscriptions' ), $subscription_plan->duration );\r\n break;\r\n case 'month':\r\n $duration = sprintf( _n( '%s Month', '%s Months', $subscription_plan->duration, 'paid-member-subscriptions' ), $subscription_plan->duration );\r\n break;\r\n case 'year':\r\n $duration = sprintf( _n( '%s Year', '%s Years', $subscription_plan->duration, 'paid-member-subscriptions' ), $subscription_plan->duration );\r\n break;\r\n }\r\n\r\n $duration_output = apply_filters('pms_subscription_plan_output_duration_limited', '<span class=\"pms-divider\"> / </span>' . $duration, $subscription_plan);\r\n }\r\n\r\n $duration_output = apply_filters( 'pms_subscription_plan_output_duration', $duration_output, $subscription_plan );\r\n\r\n // Return output\r\n return $price_output . $duration_output;\r\n\r\n }",
"public function display_plans(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_PATH);\n\t\t}else {\n\t\t\t$this->data['heading'] = 'Plans Lists';\n\t\t\t$condition = array();\n\t\t\t$this->data['plansList'] = $this->plans_model->get_all_details(PLANS,$condition);\n\t\t\t$this->load->view(ADMIN_PATH.'/plans/display_plans',$this->data);\n\t\t}\n\t}",
"public function settingsAction() {\n\n $this->view->assign('comp_nav_settings_top', 'current');\n $this->view->assign('comp_nav_settings', 'current');\n\n $request = $this->getRequest();\n\n if ($request->isPost()) {\n $this->view->p = $request->getPost();\n $form = new Yourdelivery_Form_Company_Settings();\n if ($form->isValid($request->getPost())) {\n\n $city = null;\n try {\n $cityCheck = Yourdelivery_Model_City::getByPlz((integer) $form->getValue('ccontactplz'));\n $contactPlz = $form->getValue('ccontactplz');\n if (is_null($cityCheck['id']) && !empty($contactPlz)) {\n $this->error(__('Diese PLZ existiert nicht'));\n $this->_redirect('/company/contact');\n }\n\n $city = new Yourdelivery_Model_City($form->getValue('cityId'));\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n $this->error(__('Diese PLZ existiert nicht'));\n $this->_redirect('/company/contact');\n }\n\n $val = $form->getValues();\n\n $val['street'] = $val['cstreet'];\n $val['hausnr'] = $val['chausnr'];\n $val['plz'] = $city->getPlz();\n $val['website'] = $val['cwebsite'];\n $val['steuerNr'] = $val['csteuerNr'];\n $val['industry'] = $val['cindustry'];\n $val['ktoName'] = $val['cktoName'];\n $val['ktoNr'] = $val['cktoNr'];\n $val['ktoBlz'] = $val['cktoBlz'];\n\n\n $this->session->company->setData($val);\n $this->session->company->save();\n $this->success(__('Daten erfolgreich gesichert!'));\n $this->_redirect('/company/settings');\n } else {\n $this->error($form->getMessages());\n }\n }\n }",
"function index(){\n $details = $this->admin->fetch('pricing', $cond3);\n// \tt($details , 1);\n\n $this->data['det'] = $details;\n //t($this->data['det'],1);\n $this->get_include();\n $this->load->view($this->viewDir . \"pricing_plan/listing\", $this->data);\n }",
"public static function output() {\n global $current_section , $current_tab ;\n\n do_action( 'sumopaymentplans_settings_start' ) ;\n\n $current_tab = ( empty( $_GET[ 'tab' ] ) ) ? 'general' : sanitize_text_field( urldecode( $_GET[ 'tab' ] ) ) ;\n $current_section = ( empty( $_REQUEST[ 'section' ] ) ) ? '' : sanitize_text_field( urldecode( $_REQUEST[ 'section' ] ) ) ;\n\n // Include settings pages\n self::get_settings_pages() ;\n\n do_action( 'sumopaymentplans_add_options_' . $current_tab ) ;\n do_action( 'sumopaymentplans_add_options' ) ;\n\n if ( $current_section ) {\n do_action( 'sumopaymentplans_add_options_' . $current_tab . '_' . $current_section ) ;\n }\n\n if ( ! empty( $_POST[ 'save' ] ) ) {\n if ( empty( $_REQUEST[ '_wpnonce' ] ) || ! wp_verify_nonce( $_REQUEST[ '_wpnonce' ] , 'sumo-payment-plans-settings' ) )\n die( __( 'Action failed. Please refresh the page and retry.' , _sumo_pp()->text_domain ) ) ;\n\n // Save settings if data has been posted\n do_action( 'sumopaymentplans_update_options_' . $current_tab ) ;\n do_action( 'sumopaymentplans_update_options' ) ;\n\n if ( $current_section ) {\n do_action( 'sumopaymentplans_update_options_' . $current_tab . '_' . $current_section ) ;\n }\n\n wp_safe_redirect( esc_url_raw( add_query_arg( array ( 'saved' => 'true' ) ) ) ) ;\n exit ;\n }\n if ( ! empty( $_POST[ 'reset' ] ) || ! empty( $_POST[ 'reset_all' ] ) ) {\n if ( empty( $_REQUEST[ '_wpnonce' ] ) || ! wp_verify_nonce( $_REQUEST[ '_wpnonce' ] , 'sumo-payment-plans-reset-settings' ) )\n die( __( 'Action failed. Please refresh the page and retry.' , _sumo_pp()->text_domain ) ) ;\n\n do_action( 'sumopaymentplans_reset_options_' . $current_tab ) ;\n\n if ( ! empty( $_POST[ 'reset_all' ] ) ) {\n do_action( 'sumopaymentplans_reset_options' ) ;\n }\n if ( $current_section ) {\n do_action( 'sumopaymentplans_reset_options_' . $current_tab . '_' . $current_section ) ;\n }\n\n wp_safe_redirect( esc_url_raw( add_query_arg( array ( 'saved' => 'true' ) ) ) ) ;\n exit ;\n }\n // Get any returned messages\n $error = ( empty( $_GET[ 'wc_error' ] ) ) ? '' : urldecode( stripslashes( $_GET[ 'wc_error' ] ) ) ;\n $message = ( empty( $_GET[ 'wc_message' ] ) ) ? '' : urldecode( stripslashes( $_GET[ 'wc_message' ] ) ) ;\n\n if ( $error || $message ) {\n if ( $error ) {\n echo '<div id=\"message\" class=\"error fade\"><p><strong>' . esc_html( $error ) . '</strong></p></div>' ;\n } else {\n echo '<div id=\"message\" class=\"updated fade\"><p><strong>' . esc_html( $message ) . '</strong></p></div>' ;\n }\n } elseif ( ! empty( $_GET[ 'saved' ] ) ) {\n echo '<div id=\"message\" class=\"updated fade\"><p><strong>' . __( 'Your settings have been saved.' , _sumo_pp()->text_domain ) . '</strong></p></div>' ;\n }\n ?>\n <div class=\"wrap woocommerce\">\n <form method=\"post\" id=\"mainform\" action=\"\" enctype=\"multipart/form-data\">\n <div class=\"icon32 icon32-woocommerce-settings\" id=\"icon-woocommerce\"><br /></div>\n <h2 class=\"nav-tab-wrapper woo-nav-tab-wrapper\">\n <?php\n $tabs = apply_filters( 'sumopaymentplans_settings_tabs_array' , array () ) ;\n\n foreach ( $tabs as $name => $label ) {\n echo '<a href=\"' . admin_url( 'admin.php?page=sumo_pp_settings&tab=' . $name ) . '\" class=\"nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '\">' . $label . '</a>' ;\n }\n do_action( 'sumopaymentplans_settings_tabs' ) ;\n ?>\n </h2>\n <?php\n switch ( $current_tab ) :\n default :\n do_action( 'sumopaymentplans_sections_' . $current_tab ) ;\n do_action( 'sumopaymentplans_settings_' . $current_tab ) ;\n break ;\n endswitch ;\n ?>\n <?php if ( apply_filters( 'sumopaymentplans_submit_' . $current_tab , true ) ) : ?>\n <p class=\"submit\">\n <?php if ( ! isset( $GLOBALS[ 'hide_save_button' ] ) ) : ?>\n <input name=\"save\" class=\"button-primary\" type=\"submit\" value=\"<?php _e( 'Save changes' , _sumo_pp()->text_domain ) ; ?>\" />\n <?php endif ; ?>\n <input type=\"hidden\" name=\"subtab\" id=\"last_tab\" />\n <?php wp_nonce_field( 'sumo-payment-plans-settings' ) ; ?>\n </p>\n <?php endif ; ?>\n </form>\n <?php if ( apply_filters( 'sumopaymentplans_reset_' . $current_tab , true ) ) : ?>\n <form method=\"post\" id=\"reset_mainform\" action=\"\" enctype=\"multipart/form-data\" style=\"float: left; margin-top: -52px; margin-left: 159px;\">\n <input name=\"reset\" class=\"button-secondary\" type=\"submit\" value=\"<?php _e( 'Reset' , _sumo_pp()->text_domain ) ; ?>\"/>\n <input name=\"reset_all\" class=\"button-secondary\" type=\"submit\" value=\"<?php _e( 'Reset All' , _sumo_pp()->text_domain ) ; ?>\"/>\n <?php wp_nonce_field( 'sumo-payment-plans-reset-settings' ) ; ?>\n </form> \n <?php endif ; ?>\n </div>\n <?php\n }"
] | [
"0.6278459",
"0.6204616",
"0.59078133",
"0.5832803",
"0.5829137",
"0.57632923",
"0.57632923",
"0.5730537",
"0.5631704",
"0.5612844",
"0.5542293",
"0.5541446",
"0.55088896",
"0.5506252",
"0.5505773",
"0.5505587",
"0.548094",
"0.54462236",
"0.5425341",
"0.5416131",
"0.54109114",
"0.5407519",
"0.5403899",
"0.5390803",
"0.5390483",
"0.5389642",
"0.53877854",
"0.53671366",
"0.5357423",
"0.53410065"
] | 0.75385875 | 0 |
Save settings specific for a price plan. | function adminUpdatePricePlanSettings($vars)
{
$db = true;
include(GEO_BASE_DIR . 'get_common_vars.php');
$price_plan_id = $vars['price_plan_id'];
$category = $vars['category'];
if (!$db->get_site_setting('paypal_allow_sb')) {
return true; //main setting turned off, nothing to save...
}
if (PHP5_DIR) {
$menu_loader = geoAdmin::getInstance();
} else {
$menu_loader =& geoAdmin::getInstance();
}
$sb = geoSellerBuyer::getInstance();
//BIDPAY - save settings
if (isset($_POST['paypal_allow_sb']) && $_POST['paypal_allow_sb']) {
$sb->setPlanSetting($price_plan_id, $category, 'paypal_allow_sb', true);
return true;
}
//un-checked, turn off
$sb->setPlanSetting($price_plan_id, $category, 'paypal_allow_sb', false);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function saveSettings()\n {\n $this->getStore()->save($this->data);\n }",
"public static function save_settings() {\n\n\t\t// Only admins can save settings.\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tself::save_common_settings();\n\t\tself::save_debug_settings();\n\t\tself::save_permalink_settings();\n\t\tself::save_facebook_settings();\n\n\t\t// Let extensions hook into saving.\n\t\tdo_action( 'cartflows_admin_settings_save' );\n\t}",
"public function adminUpdateSettings()\n {\n $db = DataAccess::getInstance();\n $sb = geoSellerBuyer::getInstance();\n\n //paypal - save settings\n\n\n $go_ahead = (isset($_POST['paypal_allow_sb']) && $_POST['paypal_allow_sb']) ? 1 : false;\n\n\n //check inputs\n\n if ($go_ahead && !$db->get_site_setting('paypal_allow_sb')) {\n $sb->initTableStructure();//make sure table structure is initialized.\n //turn on paypal for all price plans\n $plans = $this->_getAuctionPricePlans();\n foreach ($plans as $plan_id) {\n //set main price plan default settings\n $sb->setDefaultPlanSettings($plan_id, 0, array('paypal_allow_sb' => true));\n\n //get any cat price plans for this price plan, and set default settings\n $cat_plans = $this->_getAuctionPricePlans($plan_id);\n foreach ($cat_plans as $cat_plan_id) {\n //set cat price plan default settings\n $sb->setDefaultPlanSettings(0, $cat_plan_id, array('paypal_allow_sb' => true));\n }\n }\n }\n $db->set_site_setting('paypal_allow_sb', $go_ahead);\n\n $db->set_site_setting('pp_chain_enable', $_POST['pp_chain_enable']);\n $db->set_site_setting('pp_chain_partner', $_POST['pp_chain_partner']);\n $db->set_site_setting('pp_chain_username', $_POST['pp_chain_username']);\n $db->set_site_setting('pp_chain_password', $_POST['pp_chain_password']);\n $db->set_site_setting('pp_chain_signature', $_POST['pp_chain_signature']);\n $db->set_site_setting('pp_chain_appid', $_POST['pp_chain_appid']);\n\n\n $sitePP = $_POST['pp_chain_site_recipient'];\n if ($sitePP && !$sb->getUserSetting($sitePP, 'paypal_id')) {\n geoAdmin::m('Selected user is not a valid user OR does NOT have a registered paypal email', geoAdmin::ERROR);\n }\n\n $db->set_site_setting('pp_chain_site_recipient', $_POST['pp_chain_site_recipient']);\n\n return true;\n }",
"public function savePaymentSettings(){\n\t\t$getPaymentSettings = $this->get_all_details(PAYMENT_GATEWAY,array());\n\t\t$config = '<?php ';\n\t\tforeach($getPaymentSettings->result_array() as $key => $val){\n\t\t\t$value = serialize($val);\n\t\t\t$config .= \"\\n\\$config['payment_$key'] = '$value'; \";\n\t\t}\n\t\t$config .= ' ?>';\n\t\t$file = realpath('commonsettings/fc_payment_settings.php');\n\t\tfile_put_contents($file, $config);\n }",
"public function save()\n\t{\n\t $this->saveSettings( $this->settings );\n\t}",
"protected function saveSettings() {\n\t\t\t$admin = new BigTreeAdmin;\n\t\t\t$admin->updateSettingValue(\"bigtree-internal-storage\",array(\n\t\t\t\t\"service\" => $this->Service,\n\t\t\t\t\"s3\" => array(\n\t\t\t\t\t\"keys\" => $this->S3Data[\"keys\"],\n\t\t\t\t\t\"bucket\" => $this->S3Data[\"bucket\"],\n\t\t\t\t\t\"files\" => $this->S3Data[\"files\"]\n\t\t\t\t),\n\t\t\t\t\"rackspace\" => array(\n\t\t\t\t\t\"keys\" => $this->RackspaceData[\"keys\"],\n\t\t\t\t\t\"containers\" => $this->RSContainers\n\t\t\t\t)\n\t\t\t));\n\t\t}",
"protected function _saveSettings()\n {\n $this->_cache->save($this->_settings, 'settings');\n }",
"function SavePlan(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n $data = \"---\" . PHP_EOL .\n \"process:\". PHP_EOL .\n \" twig: true\" . PHP_EOL .\n \" markdown: false\" . PHP_EOL .\n \"access:\" . PHP_EOL .\n \" site:\" . PHP_EOL .\n \" plan: true\" . PHP_EOL .\n \"planTemplate: \" . $_POST[\"template\"] . PHP_EOL .\n \"plan:\" . PHP_EOL;\n if(isset($_POST['data'])){\n $data = $this->add_season_to_string(\"data\",$data);\n }\n $data .= \"---\" . PHP_EOL;\n $data .= $this->parse_file_content_only($_POST[\"filePath\"]);\n\n $this->file_force_contents($_POST[\"filePath\"], $data);\n Cache::clearCache('all');\n }\n }",
"private function save_settings()\n\t{\n\t\tupdate_option('jammycakes_comment_locking', $this->settings);\n\t\tupdate_option('close_comments_for_old_posts', $this->wp_active);\n\t\tupdate_option('close_comments_days_old', $this->wp_timeout);\n\t}",
"public function theme_customizer_save()\n\t{\n\t\t$settings = $this->get_settings();\n\t\t$this->save( $settings[$this->number] );\n\t}",
"public function save() {\n\t\t$values = $this->get_form_values();\n\n\t\t$pegrate = new pegrate($this->_exchange_rate_id);\n\t\t$pegrate->set($values);\n\t\t$pegrate->save();\n\t}",
"public function save()\n {\n if ($this->isDirty) {\n $this->backend->save($this->settingsValues);\n\n $this->isDirty = false;\n\n Backend\\Cache::clearCache();\n }\n }",
"function set_prices()\n\t{\n\t\t$title=get_page_title('POINTSTORE_MANAGE_INVENTORY');\n\n\t\t// Save configuration for hooks\n\t\t$_hooks=find_all_hooks('modules','pointstore');\n\t\tforeach (array_keys($_hooks) as $hook)\n\t\t{\n\t\t\trequire_code('hooks/modules/pointstore/'.filter_naughty_harsh($hook));\n\t\t\t$object=object_factory('Hook_pointstore_'.filter_naughty_harsh($hook),true);\n\t\t\tif (is_null($object)) continue;\n\t\t\tif (method_exists($object,'save_config'))\n\t\t\t{\n\t\t\t\t$object->save_config();\n\t\t\t}\n\t\t}\n\n\t\tlog_it('POINTSTORE_CHANGED_PRICES');\n\n\t\t// Show it worked / Refresh\n\t\t$url=build_url(array('page'=>'_SELF','type'=>'p'),'_SELF');\n\t\treturn redirect_screen($title,$url,do_lang_tempcode('SUCCESS'));\n\t}",
"public function Save()\n {\n // Generate a text representation of all settings.\n $data = '';\n foreach ($this->sets as $key => $value) {\n $data .= \"{$key}={$value}\\n\";\n }\n\n // Perform an atomic diskwrite, which prevents accidental truncation.\n // NOTE: If we had just written directly to settingsPath, the file would\n // have become corrupted if the script was killed mid-write. The atomic\n // write process guarantees that the data is fully written to disk.\n $this->atomicwrite($this->settingsPath, $data);\n }",
"public function actionSaveSettings()\n {\n PermissionsHelper::requirePermission(PermissionsHelper::PERMISSION_SETTINGS);\n\n $this->requirePostRequest();\n $postData = craft()->request->getPost('settings', array());\n $updateLayout = craft()->request->getPost('update_layout', false);\n\n if ($updateLayout) {\n $this->savePostedLayout();\n }\n\n $this->handleIcsFields($postData);\n\n $plugin = craft()->plugins->getPlugin('calendar');\n craft()->plugins->savePluginSettings($plugin, $postData);\n\n craft()->userSession->setNotice(Craft::t('settings_saved'));\n $this->redirectToPostedUrl();\n }",
"function save_settings()\n\t{\n\t\tif (empty($_POST)) {\n\t\t\tshow_error($this->EE->lang->line('unauthorized_access'));\n\t\t}\n\n\t\t$data = array();\n\n\t\tforeach ($this->channels AS $key => $val) {\n\t\t\t$channel_id = $val['channel_id'];\n\n\t\t\t$data[$channel_id] = array(\n\t\t\t\t'url' => $this->EE->input->post('channel_' . $channel_id . '_url'),\n\t\t\t);\n\t\t}\n\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$this->EE->db->update('extensions', array('settings' => serialize($data)));\n\n\t\t$this->EE->session->set_flashdata(\n\t\t\t'message_success',\n\t\t\t$this->EE->lang->line('preferences_updated')\n\t\t);\n\t}",
"function save_settings()\n\t {\n\t if (empty($_POST))\n\t {\n\t show_error(lang('unauthorized_access'));\n\t }\n\t \n\t unset($_POST['submit']);\n\t \n\t ee()->lang->loadfile('gdtindex');\n\t \n\t $len = ee()->input->post('channel_id');\n\t \n\t foreach($this->settings as $key=>$row)\n\t {\n\t \t $this->settings[$key] = ee()->input->post($key);\n\t }\n\t \n\t ee()->db->where('class', __CLASS__);\n\t ee()->db->update('extensions', array('settings' => serialize($this->settings)));\n\t \n\t ee()->session->set_flashdata(\n\t 'message_success',\n\t lang('preferences_updated')\n\t \n\t );\n\t \n\t \t// Since we're updating the channel_id data, we'll need to initialize the Shared class properties.\n\t\t\t \tee()->shared->initialize();\n\n\t \n\t // Build and populate the options table based on the current settings.\n\t if($this->build_index())\n\t {\n\t\t \n\t\t // Seed the table from existing entries.\n\t\t $this->populate_index();\n\t\t \n\t\t // Create db table indexes\n\t\t $this->index_fields();\n\t\t \n\t \n\t };\n\n\t }",
"function save_settings()\n\t{\n\t\tif (empty($_POST))\n\t\t{\n\t\t\tshow_error(lang('unauthorized_access'));\n\t\t}\n\n\t\tunset($_POST['submit']);\n\n\t\tee()->db->where('class', 'Unique_channel_titles_ext');\n\t\tee()->db->update('extensions', array('settings' => serialize($_POST)));\n\n\t\tee()->session->set_flashdata(\n\t\t\t'message_success',\n\t\t\tlang('preferences_updated')\n\t\t);\n\n\t\tee()->functions->redirect(ee('CP/URL', 'addons/settings/'.$this->class_name));\n\t}",
"function grid_save_settings($data)\n { \n return $this->_save_settings($data, true);\n }",
"function _save_settings() {\r\n if ( ! fs_request_is_action( 'save_settings' ) ) {\r\n return;\r\n }\r\n\r\n check_admin_referer( 'save_settings' );\r\n\r\n $this->update_developer(\r\n fs_request_get( 'fs_id' ),\r\n fs_request_get( 'fs_public_key' ),\r\n fs_request_get( 'fs_secret_key' )\r\n );\r\n }",
"function save() {\n\n $this->validate_submitted_data(array(\n \"id\" => \"numeric\"\n ));\n\n $id = $this->request->getPost('id');\n $data = array(\n \"title\" => $this->request->getPost('title'),\n \"description\" => $this->request->getPost('description'),\n \"available_on_invoice\" => unformat_currency($this->request->getPost('available_on_invoice')),\n \"minimum_payment_amount\" => unformat_currency($this->request->getPost('minimum_payment_amount'))\n );\n\n\n //get seetings associtated with this payment type\n $model_info = $this->Payment_methods_model->get_one($id);\n\n $settings = $this->Payment_methods_model->get_settings($model_info->type);\n $settings_data = array();\n foreach ($settings as $setting) {\n $field_type = get_array_value($setting, \"type\");\n $settings_name = get_array_value($setting, \"name\");\n $value = $this->request->getPost($settings_name);\n\n if ($field_type == \"boolean\" && $value != \"1\") {\n $value = \"0\";\n }\n\n if ($field_type != \"readonly\") {\n $settings_data[$settings_name] = $value;\n }\n }\n\n $data[\"settings\"] = serialize($settings_data);\n\n\n $save_id = $this->Payment_methods_model->ci_save($data, $id);\n if ($save_id) {\n echo json_encode(array(\"success\" => true, \"data\" => $this->_row_data($save_id), 'id' => $save_id, 'message' => app_lang('record_saved')));\n } else {\n echo json_encode(array(\"success\" => false, 'message' => app_lang('error_occurred')));\n }\n }",
"public function settings_save() {\n\t\tcheck_admin_referer( 'fusion_builder_save_fb_settings', 'fusion_builder_save_fb_settings' );\n\n\t\tupdate_option( 'fusion_builder_settings', $_POST );\n\t\twp_safe_redirect( admin_url( 'admin.php?page=fusion-builder-settings' ) );\n\t\texit;\n\t}",
"public function settings_save() {\n\t\tcheck_admin_referer( 'fusion_builder_save_fb_settings', 'fusion_builder_save_fb_settings' );\n\n\t\tupdate_option( 'fusion_builder_settings', $_POST );\n\t\twp_safe_redirect( admin_url( 'admin.php?page=fusion-builder-settings' ) );\n\t\texit;\n\t}",
"public function saveAction()\n {\n if ($this->getRequest()->isPost()) {\n $postData = $this->getRequest()->getPost();\n $methodCodes = array_keys(\n Mage::getSingleton('shipping/config')->getAllCarriers()\n );\n $validator = Mage::getModel('ops/validator_kwixo_shipping_setting');\n if (true === $validator->isValid($postData)) {\n\n foreach ($postData as $shippingCode => $kwixoData) {\n\n if (!in_array($shippingCode, $methodCodes)) continue;\n $kwixoShippingModel = Mage::getModel(\n 'ops/kwixo_shipping_setting'\n )\n ->load($shippingCode, 'shipping_code');\n $kwixoShippingModel\n ->setShippingCode($shippingCode)\n ->setKwixoShippingType(\n $kwixoData['kwixo_shipping_type']\n )\n ->setKwixoShippingSpeed(\n $kwixoData['kwixo_shipping_speed']\n )\n ->setKwixoShippingDetails(\n $kwixoData['kwixo_shipping_details']\n )\n ->save();\n }\n } else {\n $postData = array_merge_recursive(\n $postData, $validator->getMessages()\n );\n Mage::getModel('adminhtml/session')->setData(\n 'errorneousData', $postData\n );\n }\n\n }\n $this->_redirect('adminhtml/kwixoshipping/index');\n }",
"public function save_settings() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check the nonce\n\t\tif (\n\t\t\t ! isset( $_POST[ m_chart()->slug ] )\n\t\t\t|| ! wp_verify_nonce( $_POST[ m_chart()->slug ]['nonce'], m_chart()->slug . '-save-settings' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t$validated_settings = array();\n\t\t$submitted_settings = $_POST[ m_chart()->slug ];\n\n\t\t$default_settings = apply_filters( 'm_chart_default_settings', m_chart()->settings );\n\n\t\tforeach ( $default_settings as $setting => $default ) {\n\t\t\tif ( ! isset( $submitted_settings[ $setting ] ) ) {\n\t\t\t\t$validated_settings[ $setting ] = $default;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( isset( $this->safe_settings[ $setting ] ) ) {\n\t\t\t\t// If we've got an array of valid values lets check against that\n\t\t\t\t$safe_setting = $this->safe_settings[ $setting ];\n\n\t\t\t\tif ( in_array( $submitted_settings[ $setting ], $safe_setting, true ) ) {\n\t\t\t\t\t$validated_settings[ $setting ] = $submitted_settings[ $setting ];\n\t\t\t\t} else {\n\t\t\t\t\t$validated_settings[ $setting ] = $default;\n\t\t\t\t}\n\t\t\t} elseif ( 'lang_settings' == $setting ) {\n\t\t\t\t// The language settinsg require a bit more checking\n\t\t\t\tforeach ( $default_settings['lang_settings'] as $lang_setting => $lang_default ) {\n\t\t\t\t\t$lang_value = $submitted_settings['lang_settings'][ $lang_setting ];\n\n\t\t\t\t\tif ( 'numericSymbols' == $lang_setting ) {\n\t\t\t\t\t\t// The numeric symbols are input as a comma seperated string so we'll deal with that here\n\t\t\t\t\t\t$numeric_symbols = explode( ',', $lang_value );\n\t\t\t\t\t\t$safe_symbols = array();\n\n\t\t\t\t\t\tforeach ( $numeric_symbols as $symbol ) {\n\t\t\t\t\t\t\t$safe_symbols[] = trim( $symbol );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$validated_settings[ $setting ][ $lang_setting ] = $safe_symbols;\n\t\t\t\t\t} elseif ( 'numericSymbolMagnitude' == $lang_setting ) {\n\t\t\t\t\t\t// Only want positive numbers for the numericSymbolMagnitude value\n\t\t\t\t\t\tif ( is_numeric( $lang_value ) && 0 < $lang_value ) {\n\t\t\t\t\t\t\t$validated_settings[ $setting ][ $lang_setting ] = absint( $lang_value );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$validated_settings[ $setting ][ $lang_setting ] = $lang_default;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// The rest of the language settings are all single character values\n\t\t\t\t\t\t$validated_settings[ $setting ][ $lang_setting ] = sanitize_text_field( substr( $lang_value, 0, 1 ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Make sure the value is safe before attempting to save it\n\t\t\t\tif ( preg_match('#^[a-zA-Z0-9-_]+$#', $submitted_settings[ $setting ] ) ) {\n\t\t\t\t\t$validated_settings[ $setting ] = $submitted_settings[ $setting ];\n\t\t\t\t} else {\n\t\t\t\t\t$validated_settings[ $setting ] = $default;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Allow third party libraries to further validate the settings\n\t\t$validated_settings = apply_filters( 'm_chart_validated_settings', $validated_settings, $submitted_settings );\n\n\t\tupdate_option( m_chart()->slug, $validated_settings );\n\n\t\t// Make sure the embed endpoint makes it into the rewrite rules\n\t\tflush_rewrite_rules();\n\n\t\tadd_action( 'admin_notices', array( $this, 'save_success' ) );\n\t}",
"public function save()\n {\n $this->_callParentSave();\n\n $sOxId = $this->getEditObjectId();\n\n if ($sOxId != -1) {\n $aParams = $this->getConfig()->getRequestParameter(\"editval\");\n $aLanguageParams = $this->getConfig()->getConfigParam('aLanguageParams');\n $aLanguageParams[$sOxId]['payppaypalplus_localecode'] = $aParams['payppaypalplus_localecode'];\n $this->getConfig()->saveShopConfVar('aarr', 'aLanguageParams', $aLanguageParams);\n }\n }",
"private function save_settings_to_db($settings)\n\t{\n\t\tglobal $DB;\n\t\t$DB->query($DB->update_string(\"exp_extensions\", array(\"settings\" => $this->serialize($settings)), array(\"class\" => __CLASS__)));\n\t}",
"public function save_product_settings( $post_id ) {\n\t\t// Duration.\n\t\tif ( ! empty( $_POST['_promotion_duration'] ) ) {\n\t\t\tupdate_post_meta( $post_id, '_promotion_duration', absint( $_POST['_promotion_duration'] ) );\n\t\t} else {\n\t\t\tdelete_post_meta( $post_id, '_promotion_duration' );\n\t\t}\n\n\t\t// Priority.\n\t\tif ( ! empty( $_POST['_promotion_priority'] ) ) {\n\t\t\tupdate_post_meta( $post_id, '_promotion_priority', absint( $_POST['_promotion_priority'] ) );\n\t\t} else {\n\t\t\tdelete_post_meta( $post_id, '_promotion_priority' );\n\t\t}\n\t}",
"public function saveCachedPlan(LibraryRelease $plan)\n {\n $path = $this->getDirectory() . '/.cow.pat.json';\n $data = $this->serialisePlan($plan);\n Config::saveToFile($path, $data);\n }",
"public function save_sub_event_settings( $settings ) {\n\t\t// cache the product price lookup becasue it can get heavy\n\t\tstatic $ea_price = array();\n\n\t\t// if the ea_id was in the submitted data (from the saving of an edit-event screen in the admin), then\n\t\tif ( isset( $settings['submitted'], $settings['submitted']->event_area ) ) {\n\t\t\t// add the event_area_id to the meta to save for the individual child event\n\t\t\t$settings['meta']['_event_area_id'] = $settings['submitted']->event_area;\n\n\t\t\t// also record the price_option product _price, because it will be used by the display options plugin when showing the events in a 'filtered by price' shop page\n\t\t\tif ( isset( $ea_price[ $settings['submitted']->event_area ] ) ) {\n\t\t\t\t$settings['meta']['_price'] = $ea_price[ $settings['submitted']->event_area ];\n\t\t\t// if that price has not been cached yet, then look it up\n\t\t\t} else {\n\t\t\t\t$price = 0;\n\t\t\t\t$product_id = get_post_meta( $settings['submitted']->event_area, '_pricing_options', true );\n\t\t\t\tif ( $product_id > 0 )\n\t\t\t\t\t$price = get_post_meta( $product_id, '_price', true );\n\t\t\t\t$ea_price[ $settings['submitted']->event_area ] = $settings['meta']['_price'] = $price;\n\t\t\t}\n\n\t\t\t// get the event area\n\t\t\t$event_area = apply_filters( 'qsot-get-event-area', false, $settings['submitted']->event_area );\n\n\t\t\t// allow the event area to add it's own save logic\n\t\t\tif ( is_object( $event_area ) && ! is_wp_error( $event_area ) && isset( $event_area->area_tye ) && is_object( $event_area->area_type ) )\n\t\t\t\t$settings['meta'] = $event_area->area_type->save_event_settings( $settings['meta'], $settings );\n\t\t}\n\n\t\treturn $settings;\n\t}"
] | [
"0.65092415",
"0.63888276",
"0.6288107",
"0.61689466",
"0.60929924",
"0.602485",
"0.59926325",
"0.5949378",
"0.5940816",
"0.5876574",
"0.582797",
"0.5790329",
"0.5761536",
"0.56648034",
"0.5616134",
"0.5602798",
"0.55962634",
"0.5595361",
"0.5586239",
"0.55841345",
"0.5566766",
"0.55448353",
"0.55448353",
"0.5516854",
"0.5510282",
"0.55035526",
"0.5494659",
"0.5488457",
"0.5453149",
"0.5447318"
] | 0.64310837 | 1 |
On client side, when user uses buy now link, should display the link to pay for the item. | function displayPaymentLinkBuyNowSuccess($vars)
{
$messages = $this->_getText(10165);
$payment_text = array(
'payment_link' => geoString::fromDB($messages[500191]),
'already_paid' => geoString::fromDB($messages[500196])
);
return $this->_getPaymentLink($vars, $payment_text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function displayPaymentLinkBuyNowEmail($vars)\n {\n $messages = $this->_getText(10167);\n $payment_text = array(\n 'email_text' => geoString::fromDB($messages[500206])\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"function quickpay_link($params)\n{\n $payment = quickpay_get_payment($params);\n\n $code = sprintf('<a href=\"%s\">%s</a>', $payment, $params['link_text']);\n\n $cart = $_GET['a'];\n\n if ($cart == 'complete') {\n $invoiceId = $params['invoiceid'];\n header('Location: viewinvoice.php?id='.$invoiceId.'&qpredirect=true');\n }\n\n //Determine if we should autoredirect\n if ($_GET['qpredirect']) {\n $code .= '<script type=\"text/javascript\">window.location.replace(\"' . $payment . '\");</script>';\n }\n\n return $code;\n}",
"function index() {\r\n\t\techo \"<p>You are about to buy</p>\";\r\n\t\techo \"<ul>\";\r\n\t\tforeach($this->product as $p) {\r\n\t\t\techo \"<li>{$p['name']} - \\${$p['price']}</li>\";\r\n\t\t}\r\n\t\techo \"</ul>\";\r\n\t\techo \"<h1><a href='\" . site_url('event/test/buy') . \"'>BUY NOW</a></h1>\";\r\n\t}",
"function makeBuyButton($subTotal = 0, $txt = \"Get it!\")\n{\n $config = parse_ini_file('conf/config.ini'); \n\n\t$PF_USER = $config['pf_user'];\n\t$PF_VENDOR = $config['pf_vendor'];\n\t$PF_PARTNER = $config['pf_partner'];\n\t$PF_PWD = $config['pf_pwd'];\n\t$PF_MODE = $config['pf_mode'];\n\t$PF_HOST_ADDR = $config['pf_host_addr']; \n\n\t$secureTokenId = uniqId('', true);\n\n\t$postData = \"USER=\" . $PF_USER\n\t\t\t.\t\"&VENDOR=\" . $PF_VENDOR\n\t\t\t.\t\"&PARTNER=\" . $PF_PARTNER\n\t\t\t.\t\"&PWD=\" . $PF_PWD\n\t\t\t.\t\"&CREATESECURETOKEN=Y\"\n\t\t\t.\t\"&SECURETOKENID=\" . $secureTokenId\n\t\t\t.\t\"&TRXTYPE=S\"\n\t\t\t.\t\"&AMT=\" . $subTotal;\n\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $PF_HOST_ADDR);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\tcurl_setopt($ch, CURLOPT_POST, TRUE);\n\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postData);\n\n\t$resp = curl_exec($ch);\n\n\tif(!$resp)\n\t{\n\t\treturn \"<p>To book please contact us.</p>\";\n\t}\n\n\tparse_str($resp, $arr);\n\n\tif($arr['RESULT'] != 0)\n\t{\n\t\treturn \"<p>To order please contact us.</p>\";\t\n\t}\n\n\treturn '<iframe src=\"https://payflowlink.paypal.com?mode=' . $PF_MODE . '&SECURETOKEN=' . $arr['SECURETOKEN']\n\t\t. '&SECURETOKENID=' . $secureTokenId . '\" width=\"490\" height=\"565\" scrolling=\"no\" frameborder=\"0\" border=\"0\"\n\t\tallowtransparency=\"true\"></iframe>';\n\n}",
"function snax_capture_item_referral_link( $post_id = null ) {\n\t$link = '';\n\t$post = get_post( $post_id );\n\n\t$ref_link = get_post_meta( $post->ID, '_snax_ref_link', true );\n\n\tif ( ! empty( $ref_link ) ) {\n\t\t$link = sprintf(\n\t\t\t'<form class=\"snax-item-referral-form\" action=\"%s\" method=\"get\" onclick=\"window.open(this.action); return false;\"><button type=\"submit\">%s</button></form>',\n\t\t\tesc_url_raw( $ref_link ),\n\t\t\tesc_html__( 'Buy now', 'snax' )\n\t\t);\n\t}\n\n\treturn apply_filters( 'snax_item_referral_link_html', $link, $post->ID );\n}",
"public function buyPage(){\n return view('admin.vouchers.buy');\n }",
"public function getPayUrl() {\n $order = $this->getOrder();\n if($order->getStatus() == $this->getConfigData('order_status') || $order->getStatus() == 'alipay_wait_buyer_pay') {\n return 'alipay/pay/index'; \n }\n }",
"function getBuyTixPanel() {\n return '<a href=\"' . get_sub_field('buy_ticket_url') . '\" target=\"_blank\"><div class=\"floatBuyTix\">'.get_sub_field('buy_ticket_text').'</div></a>';\n}",
"public function reasonForBuying();",
"function BookButton()\n\t{\n\t\tob_start();\n\t\t\n\t\t\techo '<a class=\"course_booknow\">Buy now</a>';\n\t\t\t\n\t\t\n\t\treturn ob_get_clean();\n\t}",
"public function print_buy_button( $args = array() ){\n\t\techo $this->get_buy_button( $args );\n\t\techo $this->get_script( $args );\n\t}",
"public function acceptedPage() {\n\t\techo '<html>\n\t\t\t<header><meta http-equiv=\"refresh\" content=\"4;URL=\\''. $this->storeManager->getStore()->getBaseUrl() \n\t\t\t\t. 'customer/account/\\'\"></header><body>\n\t\t\t<div style=\"background-color: #37BC9B; \n\t\t\t\t\t\tmargin: 50px; \n\t\t\t\t\t\tpadding: 40px; \n\t\t\t\t\t\ttext-align:center; \n\t\t\t\t\t\tfont-family: Arial, sans-serif; \n\t\t\t\t\t\tcolor: white; \n\t\t\t\t\t\tfont-size:26px;\">\n\t\t\t\tYour payment has been accepted!<br/> You\\'ll be redirected to the merchant site...\n\t\t\t</div></body>\n\t\t';\n\t}",
"function displayPaymentLinkListing($vars)\n {\n $messages = $this->_getText(1);\n $payment_text = array(\n 'payment_link' => $messages[500192],\n 'already_paid' => $messages[500197]\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"function bbloomer_add_premium_support_link_my_account( $items ) {\n $items['premium-support'] = 'Premium Support';\n return $items;\n}",
"function displayPaymentLinkWinningBidderEmail($vars)\n {\n $messages = $this->_getText(10174);\n $payment_text = array(\n 'email_text' => geoString::fromDB($messages[500207])\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"function sellerBuyerPage($vars)\n {\n //vars is not used.\n //called when a=sb_transaction is used.\n if (!isset($_GET['action']) || substr($_GET['action'], 0, 6) != 'paypal') {\n //this is not meant for us.\n return '';\n }\n\n if ($_GET['action'] === 'paypal_payment') {\n return $this->_actionPaypalPayment();\n } elseif ($_GET['action'] === 'paypal_p_result') {\n return $this->_actionPResult();\n } elseif ($_GET['action'] === 'paypal_cp_result') {\n return geoChainPayment::checkResult((int)$_GET['cpid'], true);\n } else {\n //not a valid thingy\n return 'Site Error. Please try again.';\n }\n }",
"public function custom_link()\n {\n $buttonText = $this->get_option('buttonText');\n $buttonURL = $this->get_option('buttonActionURL');\n $buttonTarget = $this->get_option('buttonActionURLTarget');\n\n echo '<a id=\"store_locator_custom_bottom\" target=\"' . $buttonTarget . '\" href=\"' . $buttonURL . '\" class=\"store_locator_custom_bottom button alt\">'\n . $buttonText .\n '</a>';\n }",
"function makePayPalLink($id) {\n\treturn '<a href=\"https://www.paypal.com/uk/cgi-bin/webscr?cmd=_history\">Reset for holding deposit transaction '.$id.\"</a>\";\n}",
"public function display_automatic_link_transaction() {\n\t\t$this->template = false;\n\t\t$transaction = \\Bank_Account_Statement_Transaction::get_by_id($_POST['id']);\n\t\t$response = [\n\t\t\t'id' => $transaction->id,\n\t\t\t'success' => false,\n\t\t\t'message' => ''\n\t\t];\n\n\t\ttry {\n\t\t\t$transaction->automatic_link();\n\t\t\t$response['success'] = true;\n\t\t} catch (\\Exception $e) {\n\t\t\t$response['success'] = false;\n\t\t\t$response['message'] = $e->getMessage();\n\t\t}\n\n\t\techo json_encode($response);\n\t}",
"public function sell(){\n return view('frontend.site.to-sell');\n }",
"function hookInventoryLink() {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<if test=\"$this->memberData['g_market_use'] && $this->memberData['member_id'] != 0 && isset($this->memberData[$this->settings['market_members_field']])\">\r\n\t\t\t\t\t\t\t\t<li id='market_inventory'><a href='{parse url=\"app=ibmarket&module=inventory\" template=\"ibmarketInventory\" seotitle=\"false\" base=\"public\"}'>{$this->lang->words['your_inventory']}</a></li>\r\n\r\n</if>\r\n\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}",
"function displayPaymentLinkCurrentBids($vars)\n {\n $messages = $this->_getText(10175);\n $payment_text = array(\n 'payment_link' => $messages[500193],\n 'already_paid' => $messages[500198]\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"function costs_link($row)\n{\t\t\t\n\treturn $row[\"closed\"] || !$row[\"released\"] ? '' :\n\t\tpager_link(_('Costs'),\n\t\t\t\"/manufacturing/work_order_costs.php?trans_no=\" .$row[\"id\"]);\n}",
"function show_cost_for_single_item($item)\n{\n if (file_exists(TEXT_DIR.'/betweencosts.html'))\n\t include(TEXT_DIR.'/betweencosts.html');\t \n\n\techo \"<tr valign=\\\"top\\\">\\n\";\n\tprintf(\" <th align=\\\"left\\\">%s </th>\\n\", $item->Title);\n\t//printf(\" <td align=\\\"right\\\">$%0.2f </td>\\n\", $item->Cost);\n\t\n\t// Removed cost from this page per scratch.\n\t\n\techo \" <td align=\\\"right\\\"> </td>\\n\";\n\techo \"</tr>\\n\";\n\t\n\techo \"<tr valign=\\\"top\\\">\\n\";\n\tprintf(\" <td align=\\\"left\\\" colspan=2>%s </td>\\n\", $item->Description);\n\techo \"</tr>\\n\";\n\t\t\n\techo \"<tr valign=\\\"top\\\">\\n\";\n\tprintf(\" <td align=\\\"left\\\" colspan=2> </td>\\n\");\n\techo \"</tr>\\n\";\n\t\n\t$link = create_ticket_refer_link($item->ItemId);\n\techo \"<tr valign=\\\"top\\\">\\n\";\n\tprintf(\" <td align=\\\"left\\\" colspan=2><a href=\\\"%s\\\" target=\\\"_blank\\\">\", $link);\n\tprintf(\"Purchase %s from Brown Paper Tickets</tr>\\n\", $item->Title);\n\n\t\t\n\techo \"<tr valign=\\\"top\\\">\\n\";\n\tprintf(\" <td align=\\\"left\\\" colspan=2> </td>\\n\");\n\techo \"</tr>\\n\";\n\t\n}",
"public function pendingPage() {\n\t\techo '<html>\n\t\t\t<header><meta http-equiv=\"refresh\" content=\"4;URL=\\''. $this->storeManager->getStore()->getBaseUrl() \n\t\t\t\t. 'customer/account/\\'\"></header><body>\n\t\t\t<div style=\"background-color: #37BC9B; \n\t\t\t\t\t\tmargin: 50px; \n\t\t\t\t\t\tpadding: 40px; \n\t\t\t\t\t\ttext-align:center; \n\t\t\t\t\t\tfont-family: Arial, sans-serif; \n\t\t\t\t\t\tcolor: white; \n\t\t\t\t\t\tfont-size:26px;\">\n\t\t\t\tYour payment has been processed.<br/> You\\'ll be redirected to the merchant site...\n\t\t\t</div></body>\n\t\t';\n\t}",
"function getManualPingUrl($itemid) {\r\n\t\t\tglobal $CONF;\r\n\t\t\treturn $CONF['ActionURL'].'?action=plugin&name=TrackBack&type=form&tb_id='.$itemid.'&tb_key='.$this->getTbKey();\r\n\t\t}",
"public function displaycredit_payment() {\n\t\t$this->_html .\n\t\t'</p><p style=\"text-align: center;\"></p><div style=\"clear: right;\"></div></div>'\n\t\t.'<img src=\"'.Configuration::get('CCPAY_MARK_BUTTON_IMG').'\" style=\"float:left; margin-right:15px;\" /><b>'\n\t\t.$this->l ( 'Payment Gateway.' ) . '</b><br /><br />' . '<br />' . '<div style=\"clear:both;\"> </div>';\n\t}",
"private function payWithCash(): void\n {\n $receipt = Route::goTo('pay');\n if ($receipt) {\n echo $receipt->toString();\n }\n }",
"public function showReminderPayOrderPage();",
"public function paying()\n {\n $products = $this->cartLogic->readCart();\n\n $table = $this->productsLogic->printTable($products);\n//\n include 'view/paying.php';\n }"
] | [
"0.7215515",
"0.6686591",
"0.6298053",
"0.6189383",
"0.6148408",
"0.6130807",
"0.6099854",
"0.60954523",
"0.5994409",
"0.5990506",
"0.59308",
"0.5921482",
"0.5899732",
"0.58804834",
"0.5877709",
"0.5846518",
"0.5831697",
"0.5817789",
"0.58066404",
"0.57962424",
"0.5780471",
"0.57787734",
"0.57728815",
"0.5765841",
"0.5719012",
"0.5714842",
"0.5698151",
"0.5682911",
"0.56821144",
"0.56741726"
] | 0.72334194 | 0 |
On client side, when viewing current bids won, display link to pay for bid. | function displayPaymentLinkCurrentBids($vars)
{
$messages = $this->_getText(10175);
$payment_text = array(
'payment_link' => $messages[500193],
'already_paid' => $messages[500198]
);
return $this->_getPaymentLink($vars, $payment_text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function displayPaymentLinkWinningBidderEmail($vars)\n {\n $messages = $this->_getText(10174);\n $payment_text = array(\n 'email_text' => geoString::fromDB($messages[500207])\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"function View_Bidding($pro_id)\n\t\t{\n\t\t\n\t\t\tglobal $db;\n\t\t\t$sql=\"SELECT count(*) as cnt FROM \".BID_MASTER .\" AS BM \"\n\t\t\t\t\t .\" LEFT JOIN \".MEMBER_MASTER.\" AS MM ON BM.bid_by_user = MM.user_login_id \"\n\t\t\t\t\t .\" LEFT JOIN \".COUNTRY_MASTER.\" AS CM ON MM.mem_country = CM.country_id \"\n\t\t\t\t\t .\" WHERE BM.project_id = '\".$pro_id.\" ' ORDER BY MM.membership_id DESC \";\n\t\n\t\t\t$db->query($sql);\n\t\t\t$db->next_record();\n\t\t\t$_SESSION['total_record'] = $db->f(\"cnt\") ;\n\t\t\t$db->free();\n\t\n\t\t\t# Reset the start record if required\n\t\t\tif($_SESSION['page_size'] >= $_SESSION['total_record'])\n\t\t\t{\n\t\t\t\t$_SESSION['start_record'] = 0;\n\t\t\t}\n\t\n\t\t\t$sql= \" SELECT * FROM \".BID_MASTER .\" AS BM \"\n\t\t\t\t .\" LEFT JOIN \".MEMBER_MASTER.\" AS MM ON BM.bid_by_user = MM.user_login_id \"\n\t\t\t\t .\" LEFT JOIN \".COUNTRY_MASTER.\" AS CM ON MM.mem_country = CM.country_id \"\n\t\t\t\t .\" WHERE BM.project_id = '\".$pro_id.\" ' ORDER BY MM.membership_id DESC LIMIT \". $_SESSION['start_record']. \", \". $_SESSION['page_size'];\n\t\t\t\n\t\t\t$db->query($sql);\n\t }",
"function displayPaymentLinkBuyNowEmail($vars)\n {\n $messages = $this->_getText(10167);\n $payment_text = array(\n 'email_text' => geoString::fromDB($messages[500206])\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"function displayPaymentLinkBuyNowSuccess($vars)\n {\n $messages = $this->_getText(10165);\n $payment_text = array(\n 'payment_link' => geoString::fromDB($messages[500191]),\n 'already_paid' => geoString::fromDB($messages[500196])\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"function index()\n {\n #Go view all bids\n redirect('specialprocurement/load_special_procurement_plan_form');\n }",
"public function show(Bid $bid)\n {\n //bid not the current bid\n $bids = $bid->where('bidable_id',$bid->bidable_id)->where('id', '!=', $bid->id)->get();\n $bid = $bid->load(['bidder','bidable']);\n\n return view('bid.show', compact('bid','bids'));\n }",
"function BookButton()\n\t{\n\t\tob_start();\n\t\t\n\t\t\techo '<a class=\"course_booknow\">Buy now</a>';\n\t\t\t\n\t\t\n\t\treturn ob_get_clean();\n\t}",
"function manage_bebs(){\n\n\t\t$urldata = $this->uri->uri_to_assoc(3, array('m', 'i'));\n\t\t$data = assign_to_data($urldata);\n\t\t$data = add_msg_if_any($this, $data);\n\t\t$data = handle_redirected_msgs($this, $data);\n\t\t$data['manage_bes'] = $this-> disposal -> fetch_beb_list(0,$data);\n\t\t$data['page_title'] = 'Manage Bidders';\n\t\t$data['current_menu'] = 'view_bid_responses';\n\t\t$data['view_to_load'] = 'disposal/manage_bebs';\n\t\t$data['view_data']['form_title'] = $data['page_title'];\n\t\t$this->load->view('dashboard_v', $data);\n\n\t\t}",
"function displayBanner()\n\t\t{\n\t\t\techo \"\n <div class='bg2'>\n\t\t\t<h2><em>Issues Manager</em></h2>\n\t\t\t<p align='center'>\";\n\t\t\t\n\t\t\t// menus\n\t\t\techo \"\n <a href='issues.php'>Available</a> . \n\t\t\t<a href='issues.php?event=disabled'>Disabled</a> . \n\t\t\t<a href='issuescompose.php'>Create</a>\";\n\t\t\t\n\t\t\techo \"\n </p>\n\t\t\t</div>\";\n\t\t\t\n\t\t\treturn;\n\t\t}",
"public function index()\n {\n\t $bids = $this->bid_repository->accesibleBids(Auth::user());\n\t return view('web.supplier.bids.index')->with(compact('bids'));\n }",
"function getBid(){\n\t\tif($this->bid==\"\") {\n\t\t\t$this->obtainBid();\n\t\t}\n\t\treturn $this->bid;\n\t}",
"public static function BidNow( $item, $bid ) {\n $item = self::_item($item);\n\n if (!$bid = toNum($bid)) return;\n\n $log = self::GroupLogFile($item.'.bidnow');\n\n // esniper config. file will be only as long as required on file system\n self::writeEsniperCfg();\n $cmd = array('Core::BidNow', Registry::get('bin_esniper'),\n esf_User::UserDir(), $item, $bid, $log);\n if (Exec::getInstance()->ExecuteCmd($cmd, $res, Registry::get('SuDo'))) {\n Messages::Error($res);\n } else {\n Messages::Success(Translation::get('Auction.AuctionBiddedNow', $item));\n // refresh auction data\n AuctionHTML::clearBuffer($item);\n $auction = self::fetchAuction($item, FALSE);\n self::$Auctions[$item] = $auction;\n self::Save($auction, FALSE);\n }\n self::removeEsniperCfg();\n }",
"public function show(showBidRequest $request, Bid $bid)\n {\n\t\t$settings = $this->settings_repository->findAll()->whereIn('name', 'market_place_fee')->first();\n\t\t$fee = $settings[\"value\"];\n\t\n \treturn view('web.supplier.bids.show')->with(compact('bid', 'fee'));\n }",
"function get_cts_bnt(){\r\n\t$cts_api_key \t\t\t= get_option('cts_api_key');\r\n\tif (!empty($cts_api_key)){ ?>\t\r\n<div id=\"calltosupport_btn\">\r\n<a href=\"http://calltosupport.com/client/initialize.php?indentifier=<?php echo $cts_api_key; ?>\" onclick='window.open(\"http://calltosupport.com/client/initialize.php?indentifier=<?php echo $cts_api_key; ?>\", \"myWindow\", \"status = 0, height = 530, width = 420, resizable = 0\"); return false;'>\r\n<img src=\"https://calltosupport.com/client/get_button.php?indentifier=<?php echo $cts_api_key; ?>\" alt=\"Call\" title=\"Call\" />\r\n</a>\r\n</div>\r\n\t<?php\r\n }\t\r\n}",
"public function action_bbpress_button() {\n\t\t$user = get_userdata( bbp_get_user_id() );\n\n\t\tif ( ! $user ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$link = self::maybe_switch_url( $user );\n\n\t\tif ( ! $link ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$link = add_query_arg( array(\n\t\t\t'redirect_to' => urlencode( bbp_get_user_profile_url( $user->ID ) ),\n\t\t), $link );\n\n\t\t?>\n\t\t<ul id=\"user_switching_switch_to\">\n\t\t\t<li><a href=\"<?php echo esc_url( $link ); ?>\"><?php esc_html_e( 'Switch To', 'user-switching' ); ?></a></li>\n\t\t</ul>\n\t\t<?php\n\n\t}",
"function displayPaymentLinkListing($vars)\n {\n $messages = $this->_getText(1);\n $payment_text = array(\n 'payment_link' => $messages[500192],\n 'already_paid' => $messages[500197]\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"public function getBid()\n {\n return $this->bid;\n }",
"public function link($bannerID) {\n\t\t$banner = $this->model('Banner');\n\t\tif (isset($_POST['pageID'])) {\n\t\t\t$pageID = $_POST['pageID'];\n\t\t\t$banner->linkPageToBanner($bannerID, $pageID);\n\t\t\t$this->redirect(\"../../../bn-admin\");\t\t\n\t\t} else {\n\t\t\t$this->view('home/banner/link');\t\n\t\t}\n\t}",
"public function getBanerUrl(){ \t\n\tif($this->getBanner())\n\t\treturn $this->getBanner()->getUrl();\n\telse\n\t\treturn '';\n }",
"public function thanks(int $id)\n {\n $bid = Bid::with('item')->find($id);\n $user = auth()->user();\n if (\n $bid === null\n || $user === null\n || (int)$bid->user_id !== (int)$user->id\n ) {\n return redirect(RouteServiceProvider::HOME);\n }\n\n return view('bid-thanks', ['bid' => $bid]);\n }",
"function opus_comments_popup_link(){\n\tcomments_popup_link( __( 'No Response Yet. <strong>Add Yours</strong>', 'opus' ), __( '1 Response Shared. <strong>Add Yours</strong>', 'opus' ), __( '% Responses Shared. <strong>Add Yours</strong>', 'opus' ) );\n}",
"function bellashop_cart_link()\n {\n // echo '<div class=\"cart-contents\">';\n echo '<a href=\"#\"></a>';\n echo '<i class=\"icon-bag\"></i>';\n // echo '<span class=\"count\">'.WC()->cart->get_cart_contents_count().'</span>';\n bellashop_cart_items_count();\n // echo '<span class=\"subtotal\">'.WC()->cart->get_cart_subtotal().'</span>';\n bellashop_cart_subtotal();\n // echo '</div>';\n }",
"public function banner()\n {\n $pageTitle = 'Digital Marketing Services in Africa | Online Ads Marketing Services | Display ads Marketing in Africa';\n $metaDescription = 'Advertise in Local Area, city, nationwide, or even internationally. We africans provide ads banner facility for your business growth. Inquire Now For banner marketing';\n\n $flag = 1;\n\n if (Auth::check() && Auth::user()->currency && Auth::user()->currency != 'NGN') {\n $userCurrency = Auth::user()->currency ? Auth::user()->currency : 'NGN';\n\n if ($userCurrency != 'NGN') {\n $currency = Helper::convertCurrency(strtoupper('NGN'), strtoupper($userCurrency), 1);\n } else {\n $currency = Helper::convertCurrency(strtoupper('NGN'), strtoupper('NGN'), 1);\n }\n\n $array['price'] = \"IF((currency = '\".strtoupper($userCurrency).\"'), (price), (price * \".$currency.\")) as price\";\n $array['currency'] = \"IF((currency = '\".strtoupper($userCurrency).\"'), (currency), ('\".$userCurrency.\"')) as currency\";\n\n $plans = SubscriptionPlan::select('*', DB::raw(implode(\", \", $array)))->where('type', 'like', '%business%')->where('is_blocked',0)->get();\n } elseif(!Auth::check()) {\n $userCurrency = 'USD';\n\n $currency = Helper::convertCurrency(strtoupper('NGN'), strtoupper($userCurrency), 1);\n\n $array['price'] = \"IF((currency = '\".strtoupper($userCurrency).\"'), (price), (price * \".$currency.\")) as price\";\n $array['currency'] = \"IF((currency = '\".strtoupper($userCurrency).\"'), (currency), ('\".$userCurrency.\"')) as currency\";\n\n $plans = SubscriptionPlan::select('*', DB::raw(implode(\", \", $array)))->where('type', 'like', '%business%')->where('is_blocked',0)->get();\n }else{\n $plans = SubscriptionPlan::where('type', 'like', '%business%')->where('is_blocked',0)->get();\n \n }\n\n return view('subscription-plan-pages.business', compact('pageTitle', 'flag', 'plans', 'metaDescription'));\n }",
"public function action_bp_button() {\n\t\t$user = null;\n\n\t\tif ( bp_is_user() ) {\n\t\t\t$user = get_userdata( bp_displayed_user_id() );\n\t\t} elseif ( bp_is_members_directory() ) {\n\t\t\t$user = get_userdata( bp_get_member_user_id() );\n\t\t}\n\n\t\tif ( ! $user ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$link = self::maybe_switch_url( $user );\n\n\t\tif ( ! $link ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$link = add_query_arg( array(\n\t\t\t'redirect_to' => urlencode( bp_core_get_user_domain( $user->ID ) ),\n\t\t), $link );\n\n\t\t$components = array_keys( buddypress()->active_components );\n\n\t\techo bp_get_button( array(\n\t\t\t'id' => 'user_switching',\n\t\t\t'component' => reset( $components ),\n\t\t\t'link_href' => esc_url( $link ),\n\t\t\t'link_text' => esc_html__( 'Switch To', 'user-switching' ),\n\t\t\t'wrapper_id' => 'user_switching_switch_to',\n\t\t) );\n\n\t}",
"function index() {\r\n\t\techo \"<p>You are about to buy</p>\";\r\n\t\techo \"<ul>\";\r\n\t\tforeach($this->product as $p) {\r\n\t\t\techo \"<li>{$p['name']} - \\${$p['price']}</li>\";\r\n\t\t}\r\n\t\techo \"</ul>\";\r\n\t\techo \"<h1><a href='\" . site_url('event/test/buy') . \"'>BUY NOW</a></h1>\";\r\n\t}",
"function BusinessLikeClick()\n\t{\n\t\n\t\t$rw_app_id = $_GET[\"BusinessID\"];\n\t\t\n\t\t$this->db->query(\"UPDATE business SET LikesCounter=LikesCounter+1 where id = $rw_app_id\");\n $this->db->commit();\n\t}",
"function show_numb_booklet() {\n $retval = '';\n $numberBooklet = count($_SESSION['handbook']);\n //$textAdd = get_option('handbook_linkviewbooklet');\n $textAdd = get_option('widget_handbook-widget');\n foreach($textAdd as $value){\n if(count($value['title']) > 0)\n $textAdd = $value['title'];\n }\n $textAdd = str_replace(\"{x}\", ($numberBooklet>0)?'<span class=\"numberBooklet\">'.$numberBooklet.'</span>':'<span class=\"numberBooklet\">0</span>', $textAdd);\n $retval .= '<h3><a href=\"'. WP_PLUGIN_URL .'/wp-handbook/handbook_list.php\" onclick=\"\">';\n $retval .= $textAdd; \n $retval .= '</a></h3>';\n\n return $retval;\n}",
"public function legalbid_decline() {\n\t\t\tGLOBAL $page;\n\t\t\t\n\t\t\tlogin::log(login::getUserID(),\"Declined the auction with id of \".safe::get(\"id\"));\n\t\t\t\n\t\t\t\t$db = new database();\n\t\t\t\t$dbx = new database();\n\t\t\t\t$dbe = new database();\n\t\t\t\t$db->query(\"UPDATE `legalbid_items` SET `startdate` = NOW( ) ,`verify` = '2', comment='\".safe::post('comment').\"' WHERE `id` =\".safe::get(\"id\").\" LIMIT 1 ;\");\n\t\t\t\n\t\t\t\t$sids = $db->getFirst(\"SELECT sellid FROM `legalbid_items` WHERE id=\".safe::get(\"id\").\"\");\n\t\t\t\t$sid = $sids['sellid'];\n\t\t\t\n\t\t\t\t$sql = \"SELECT email FROM `legalbid_users` WHERE id='\".$sid.\"';\";\n\t\t\t\t$emailss = $dbx->getFirst($sql);\n\t\t\t\t$emailx = $emailss['email'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$sql = \"SELECT * FROM legalbid_items WHERE id=\".safe::get(\"id\").\" LIMIT 1;\";\n\t\t\t\t$details = $dbe->getFirst($sql);\n\t\t\t\t$det = $details;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t$subject = \"Your claim addition to legalbid.co.uk has not been accepted\";\n\t\t\t\t\t\t\t$messagetosend = \"To whom it may concern.\\n\\nUnfortunately a claim you added to legalbid has not been accepted.\\n\\n\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$messagetosend .= $det[\"title\"] . \"\\n\" . $det[\"desc\"];\n\t\t\t\t\t\t\t\t$messagetosend .= \"\\n\\nThe reason given for this was\\n\" . safe::post('comment');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$messagetosend .= \"\\n\\nIf you wish to discuss this item further please contact us.\";\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$Name = \"legalbid.co.uk\"; //senders name\n\t\t\t\t\t\t\t$email = \"[email protected]\"; //senders e-mail adress\n\t\t\t\t\t\t\t$recipient = $emailx; //recipient\n\t\t\t\t\t\t\t$header = \"From: \". $Name . \" <\" . $email . \">\\r\\n\"; //optional headerfields\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t mail($recipient, $subject, $messagetosend, $header);\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\n\t\t}",
"public function thankyou_page() {\n\t \n //$order = new WC_Order($_GET['order-received']);\n\t \n echo\t'\n <table>\n\t\t\t\t <tr>\n\t\t\t\t\t <td>\n\t\t\t\t\t\t <p>';\n\t\t\t\t\t\t\t\t//if (! isset($_GET[\"sessionSubState\"])) $_GET[\"sessionSubState\"] = null;\n\t\t\t\t\t\t\t\t//echo GopayHelper::getResultMessage($_GET[\"sessionState\"], $_GET[\"sessionSubState\"]);\n\n\t\t\techo\t\n '</p>\n\t\t\t\t\t </td>\n\t\t\t\t </tr>\n </table>';\n\n }",
"function cardtobrain_print_box_link($cardtobrain) {\n global $CFG, $USER;\n\n $alias = $cardtobrain->alias;\n $target = $cardtobrain->target;\n\n if ($target == 0) {\n $link_text = get_string('boxlearn', 'cardtobrain');\n } else {\n $link_text = get_string('boxview', 'cardtobrain');\n }\n\n // Is SSO Authentication enabled?\n $enable_sso = get_config('mod_cardtobrain', 'enablesso');\n if ($enable_sso == 1) {\n // SSO URL.\n $sso_url = CARDTOBRAIN_SSO_URL;\n\n // Form: user params.\n $username = $USER->email;\n $firstname = $USER->firstname;\n $lastname = $USER->lastname;\n $lang = $USER->lang;\n // Use CARDTOBRAIN_DEFAULT_LANGUAGE if user language is not suported.\n if (!in_array($lang, explode('-', CARDTOBRAIN_LANGUAGES))) {\n $lang = CARDTOBRAIN_DEFAULT_LANGUAGE;\n }\n\n // Form: API params.\n $apikey = get_config('mod_cardtobrain', 'apikey');\n $apisecret = get_config('mod_cardtobrain', 'apisecret');\n $timestamp = round(microtime(true) * 1000);\n\n // Form: target params.\n if ($target == 0) {\n $page = 'boxlearn';\n } else {\n $page = 'box';\n }\n $box = $alias;\n\n // Prepare hash params.\n $hash_params = array(\n \"username\" => $username,\n \"firstname\" => $firstname,\n \"lastname\" => $lastname,\n \"lang\" => $lang,\n \"apikey\" => $apikey,\n \"timestamp\" => $timestamp\n );\n\n // Calculate hash for SSO Authentication.\n $hash = cardtobrain_sso_hash($hash_params, $apisecret);\n\n // Print form for SSO Authentication.\n echo '\n <form id=\"ctob_form_'.$alias.'\" name=\"ctob_form_'.$alias.'\" target=\"_blank\" method=\"POST\" action=\"'.$sso_url.'\">\n <input type=\"hidden\" name=\"timestamp\" value=\"'.$timestamp.'\" />\n <input type=\"hidden\" name=\"username\" value=\"'.$username.'\" />\n <input type=\"hidden\" name=\"firstname\" value=\"'.$firstname.'\" />\n <input type=\"hidden\" name=\"lastname\" value=\"'.$lastname.'\" />\n <input type=\"hidden\" name=\"lang\" value=\"'.$lang.'\" />\n <input type=\"hidden\" name=\"apikey\" value=\"'.$apikey.'\" />\n <input type=\"hidden\" name=\"hash\" value=\"'.$hash.'\" />\n <input type=\"hidden\" name=\"page\" value=\"'.$page.'\" />\n <input type=\"hidden\" name=\"box\" value=\"'.$box.'\" />\n <input type=\"submit\" value=\"'.$link_text.'\" />\n </form>\n ';\n\n } else {\n // Only display a simple link to box.\n $url = CARDTOBRAIN_BASE_URL;\n\n if ($target == 0) {\n $url .= (\"learn/\".$alias.\"/normal\");\n } else {\n $url .= (\"box/\".$alias);\n }\n\n // Link to the box.\n echo '<a href=\"'.$url.'\" target=\"_blank\">'.$link_text.'</a>';\n }\n}"
] | [
"0.64386016",
"0.6093278",
"0.5804713",
"0.57620955",
"0.5535921",
"0.5528952",
"0.5510934",
"0.5480864",
"0.5470692",
"0.5454912",
"0.5445562",
"0.5426257",
"0.54217577",
"0.53498226",
"0.52629066",
"0.5258338",
"0.5257474",
"0.52481544",
"0.51991004",
"0.5192569",
"0.51923776",
"0.51744324",
"0.5164933",
"0.5147812",
"0.51478094",
"0.51446766",
"0.5131119",
"0.51298404",
"0.5115048",
"0.5111995"
] | 0.67550623 | 0 |
Link to be used in the buy now email sent to person buying now | function displayPaymentLinkBuyNowEmail($vars)
{
$messages = $this->_getText(10167);
$payment_text = array(
'email_text' => geoString::fromDB($messages[500206])
);
return $this->_getPaymentLink($vars, $payment_text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function displayPaymentLinkBuyNowSuccess($vars)\n {\n $messages = $this->_getText(10165);\n $payment_text = array(\n 'payment_link' => geoString::fromDB($messages[500191]),\n 'already_paid' => geoString::fromDB($messages[500196])\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"function displayPaymentLinkWinningBidderEmail($vars)\n {\n $messages = $this->_getText(10174);\n $payment_text = array(\n 'email_text' => geoString::fromDB($messages[500207])\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"function snax_capture_item_referral_link( $post_id = null ) {\n\t$link = '';\n\t$post = get_post( $post_id );\n\n\t$ref_link = get_post_meta( $post->ID, '_snax_ref_link', true );\n\n\tif ( ! empty( $ref_link ) ) {\n\t\t$link = sprintf(\n\t\t\t'<form class=\"snax-item-referral-form\" action=\"%s\" method=\"get\" onclick=\"window.open(this.action); return false;\"><button type=\"submit\">%s</button></form>',\n\t\t\tesc_url_raw( $ref_link ),\n\t\t\tesc_html__( 'Buy now', 'snax' )\n\t\t);\n\t}\n\n\treturn apply_filters( 'snax_item_referral_link_html', $link, $post->ID );\n}",
"function quickpay_link($params)\n{\n $payment = quickpay_get_payment($params);\n\n $code = sprintf('<a href=\"%s\">%s</a>', $payment, $params['link_text']);\n\n $cart = $_GET['a'];\n\n if ($cart == 'complete') {\n $invoiceId = $params['invoiceid'];\n header('Location: viewinvoice.php?id='.$invoiceId.'&qpredirect=true');\n }\n\n //Determine if we should autoredirect\n if ($_GET['qpredirect']) {\n $code .= '<script type=\"text/javascript\">window.location.replace(\"' . $payment . '\");</script>';\n }\n\n return $code;\n}",
"function BookButton()\n\t{\n\t\tob_start();\n\t\t\n\t\t\techo '<a class=\"course_booknow\">Buy now</a>';\n\t\t\t\n\t\t\n\t\treturn ob_get_clean();\n\t}",
"function index() {\r\n\t\techo \"<p>You are about to buy</p>\";\r\n\t\techo \"<ul>\";\r\n\t\tforeach($this->product as $p) {\r\n\t\t\techo \"<li>{$p['name']} - \\${$p['price']}</li>\";\r\n\t\t}\r\n\t\techo \"</ul>\";\r\n\t\techo \"<h1><a href='\" . site_url('event/test/buy') . \"'>BUY NOW</a></h1>\";\r\n\t}",
"function activation_link($userObj) {\n $site_url=$_SERVER['HTTP_HOST'];\n $id = $userObj->id;\n $cookie = myhash(stripdate($userObj->created));\n $activation_link = \"http://$site_url/home/register.php?id=$id&cookie=$cookie\";\n return html_link($activation_link, phrase('activate', CAPITALIZE));\n}",
"function donation()\n\t\t{\n\t\t\treturn \"<font size=1 face=arial color=000000>If ezSQL has helped <a href=\\\"https://www.paypal.com/xclick/business=justin%40justinvincent.com&item_name=ezSQL&no_note=1&tax=0\\\" style=\\\"color: 0000CC;\\\">make a donation!?</a> [ go on! you know you want to! ]</font>\";\t\n\t\t}",
"public function linksuccessAction()\r\n {\r\n $order = Mage::getModel('sales/order')->loadByIncrementId($this->_getSession()->getLastRealOrderId());\r\n\r\n $payment = Mage::getModel('quickpaypayment/payment');\r\n\r\n $quoteID = $this->_getSession()->getLastQuoteId();\r\n $this->_getSession()->setLastSuccessQuoteId($quoteID);\r\n\r\n if ($quoteID) {\r\n $quote = Mage::getModel('sales/quote')->load($quoteID);\r\n $quote->setIsActive(false)->save();\r\n }\r\n\r\n // CREATES INVOICE if payment instantcapture is ON\r\n if ((int)$payment->getConfigData('instantcapture') == 1 && (int)$payment->getConfigData('instantinvoice') == 1) {\r\n if ($order->canInvoice()) {\r\n $invoice = $order->prepareInvoice();\r\n $invoice->register();\r\n $invoice->setEmailSent(true);\r\n $invoice->getOrder()->setCustomerNoteNotify(true);\r\n $invoice->sendEmail(true, '');\r\n Mage::getModel('core/resource_transaction')->addObject($invoice)->addObject($invoice->getOrder())->save();\r\n\r\n $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_COMPLETE);\r\n $order->save();\r\n }\r\n } else {\r\n if (((int)$payment->getConfigData('sendmailorderconfirmationbefore')) == 1) {\r\n $this->sendEmail($order);\r\n }\r\n }\r\n\r\n $this->_redirect('checkout/onepage/success');\r\n }",
"public function getCheckInLink()\n {\n return Director::absoluteURL(\"checkin/ticket/{$this->TicketCode}\");\n }",
"public static function get_agent_notify_email_template() {\n if (get_option('inbound_admin_notification_inboundnow_link',true)) {\n $credit = '<tr>\n <td valign=\"middle\" width=\"30\" style=\"color:#272727\"> </td>\n <td width=\"50\" height=\"40\" valign=\"middle\" align=\"left\" style=\"color:#272727\">\n <a href=\"http://www.inboundnow.com\" target=\"_blank\"><img src=\"{{leads-urlpath}}assets/images/inbound-email.png\" height=\"40\" width=\"40\" alt=\" \" style=\"outline:none;text-decoration:none;max-width:100%;display:block;width:40px;min-height:40px;border-radius:20px\"></a>\n </td>\n <td style=\"color:#272727\">\n <a style=\"color:#272727;text-decoration:none;\" href=\"http://www.inboundnow.com\" target=\"_blank\">\n ' . __('<b>Leads</b> from Inbound Now', 'inbound-pro') . '\n </a>\n </td>\n <td valign=\"middle\" align=\"left\" style=\"color:#545454;text-align:right\">{{date-time}}</td>\n <td valign=\"middle\" width=\"30\" style=\"color:#272727\"> </td>\n </tr>';\n } else {\n $credit = '';\n }\n $html = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html>\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html;\" charset=\"UTF-8\" />\n <style type=\"text/css\">\n html {\n background: #EEEDED;\n }\n </style>\n </head>\n <body style=\"margin: 0px; background-color: #FFFFFF; font-family: Helvetica, Arial, sans-serif; font-size:12px;\" text=\"#444444\" bgcolor=\"#FFFFFF\" link=\"#21759B\" alink=\"#21759B\" vlink=\"#21759B\" marginheight=\"0\" topmargin=\"0\" marginwidth=\"0\" leftmargin=\"0\">\n <table cellpadding=\"0\" width=\"600\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" border=\"0\" align=\"center\" style=\"width:100%!important;line-height:100%!important;border-collapse:collapse;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\">\n <tbody><tr>\n <td valign=\"top\" height=\"20\"> </td>\n </tr>\n <tr>\n <td valign=\"top\">\n <table cellpadding=\"0\" bgcolor=\"#ffffff\" cellspacing=\"0\" border=\"0\" align=\"center\" style=\"border-collapse:collapse;width:600px;font-size:13px;line-height:20px;color:#545454;font-family:Arial,sans-serif;border-radius:3px;margin-top:0;margin-right:auto;margin-bottom:0;margin-left:auto\">\n <tbody><tr>\n <td valign=\"top\">\n <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate;width:100%;border-radius:3px 3px 0 0;font-size:1px;line-height:3px;height:3px;border-top-color:#0298e3;border-right-color:#0298e3;border-bottom-color:#0298e3;border-left-color:#0298e3;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px\">\n <tbody><tr>\n <td valign=\"top\" style=\"font-family:Arial,sans-serif;background-color:#5ab8e7;border-top-width:1px;border-top-color:#8ccae9;border-top-style:solid\" bgcolor=\"#5ab8e7\"> </td>\n </tr>\n </tbody></table>\n <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate;width:600px;border-radius:0 0 3px 3px;border-top-color:#8c8c8c;border-right-color:#8c8c8c;border-bottom-color:#8c8c8c;border-left-color:#8c8c8c;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:0;border-right-width:1px;border-bottom-width:1px;border-left-width:1px\">\n <tbody><tr>\n <td valign=\"top\" style=\"font-size:13px;line-height:20px;color:#545454;font-family:Arial,sans-serif;border-radius:0 0 3px 3px;padding-top:3px;padding-right:30px;padding-bottom:15px;padding-left:30px\">\n <h1 style=\"margin-top:20px;margin-right:0;margin-bottom:20px;margin-left:0; font-size:28px; line-height: 28px; color:#000;\"> ' . __('A New Lead on {{form-name}} has been assigned to you.', 'inbound-pro') . '</h1>\n <p style=\"margin-top:20px;margin-right:0;margin-bottom:20px;margin-left:0\">' . __('There is a new lead that just converted on <strong>{{date-time}}</strong> from page: <a href=\"{{source}}\">{{source}}</a> {{redirect-message}}', 'inbound-pro') . '</p>\n <!-- NEW TABLE -->\n <table class=\"heavyTable\" style=\"width: 100%;\n max-width: 600px;\n border-collapse: collapse;\n border: 1px solid #cccccc;\n background: white;\n margin-bottom: 20px;\">\n <tbody>\n <tr style=\"background: #3A9FD1; height: 54px; font-weight: lighter; color: #fff;border: 1px solid #3A9FD1;text-align: left; padding-left: 10px;\">\n <td align=\"left\" width=\"600\" style=\"-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; color: #fff; font-weight: bold; text-decoration: none; font-family: Helvetica, Arial, sans-serif; display: block;\">\n <h1 style=\"font-size: 30px; display: inline-block;margin-top: 15px;margin-left: 10px; margin-bottom: 0px; letter-spacing: 0px; word-spacing: 0px; font-weight: 300;\">' . __('Lead Information', 'inbound-pro') . '</h1>\n <div style=\"float:right; margin-top: 5px; margin-right: 15px;\"><!--[if mso]>\n <v:roundrect xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" href=\"{{admin-url}}edit.php?post_type=wp-lead&s={{lead-email-address}}\" style=\"height:40px;v-text-anchor:middle;width:130px;font-size:18px;\" arcsize=\"10%\" stroke=\"f\" fillcolor=\"#ffffff\">\n <w:anchorlock/>\n <center>\n <![endif]-->\n <a href=\"{{admin-url}}edit.php?post_type=wp-lead&s={{lead-email-address}}\"\n style=\"background-color:#ffffff;border-radius:4px;color:#3A9FD1;display:inline-block;font-family:sans-serif;font-size:18px;font-weight:bold;line-height:40px;text-align:center;text-decoration:none;width:130px;-webkit-text-size-adjust:none;\">' . __('View Lead', 'inbound-pro') . '</a>\n <!--[if mso]>\n </center>\n </v:roundrect>\n <![endif]-->\n </div>\n </td>\n </tr>\n <!-- LOOP THROUGH POST PARAMS -->\n [inbound-email-post-params]\n <!-- END LOOP -->\n <!-- IF CHAR COUNT OVER 50 make label display block -->\n </tbody>\n </table>\n <!-- END NEW TABLE -->\n <!-- Start 3 col -->\n <table style=\"margin-bottom: 20px; border: 1px solid #cccccc; border-collapse: collapse;\" width=\"100%\" border=\"1\" BORDERWIDTH=\"1\" BORDERCOLOR=\"CCCCCC\" cellspacing=\"0\" cellpadding=\"5\" align=\"left\" valign=\"top\" borderspacing=\"0\" >\n <tbody valign=\"top\">\n <tr valign=\"top\" border=\"0\">\n <td width=\"160\" height=\"50\" align=\"center\" valign=\"top\" border=\"0\">\n <h3 style=\"color:#2e2e2e;font-size:15px;\"><a style=\"text-decoration: none;\" href=\"{{admin-url}}edit.php?post_type=wp-lead&s={{lead-email-address}}&tab=tabs-wpleads_lead_tab_conversions\">' . __('View Lead Activity', 'inbound-pro') . '</a></h3>\n </td>\n <td width=\"160\" height=\"50\" align=\"center\" valign=\"top\" border=\"0\">\n <h3 style=\"color:#2e2e2e;font-size:15px;\"><a style=\"text-decoration: none;\" href=\"{{admin-url}}edit.php?post_type=wp-lead&s={{lead-email-address}}&scroll-to=wplead_metabox_conversion\">' . __('Pages Viewed', 'inbound-pro') . '</a></h3>\n </td>\n <td width=\"160\" height=\"50\" align=\"center\" valign=\"top\" border=\"0\">\n <h3 style=\"color:#2e2e2e;font-size:15px;\"><a style=\"text-decoration: none;\" href=\"{{admin-url}}edit.php?post_type=wp-lead&s={{lead-email-address}}&tab=tabs-wpleads_lead_tab_raw_form_data\">' . __('View Form Data', 'inbound-pro') . '</a></h3>\n </td>\n </tr>\n </tbody></table>\n <!-- end 3 col -->\n <!-- Start half/half -->\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin-bottom:10px;\">\n <tbody><tr>\n <td align=\"center\" width=\"250\" height=\"30\" cellpadding=\"5\">\n <div><!--[if mso]>\n <v:roundrect xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" href=\"{{admin-url}}edit.php?post_type=wp-lead&s={{lead-email-address}}\" style=\"height:40px;v-text-anchor:middle;width:250px;\" arcsize=\"10%\" strokecolor=\"#7490af\" fillcolor=\"#3A9FD1\">\n <w:anchorlock/>\n <center style=\"color:#ffffff;font-family:sans-serif;font-size:13px;font-weight:bold;\">' . __('View Lead', 'inbound-pro') . '</center>\n </v:roundrect>\n <![endif]--><a href=\"{{admin-url}}edit.php?post_type=wp-lead&s={{lead-email-address}}\"\n style=\"background-color:#3A9FD1;border:1px solid #7490af;border-radius:4px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:18px;font-weight:bold;line-height:40px;text-align:center;text-decoration:none;width:250px;-webkit-text-size-adjust:none;mso-hide:all;\" title=\"' . __('View the full Lead details in WordPress', 'inbound-pro') . '\">' . __('View Full Lead Details', 'inbound-pro') . '</a>\n </div>\n </td>\n <td align=\"center\" width=\"250\" height=\"30\" cellpadding=\"5\">\n <div><!--[if mso]>\n <v:roundrect xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" href=\"mailto:{{lead-email-address}}?subject=RE:{{form-name}}&body=' . __('Thanks for filling out our form.', 'inbound-pro') . '\" style=\"height:40px;v-text-anchor:middle;width:250px;\" arcsize=\"10%\" strokecolor=\"#558939\" fillcolor=\"#59b329\">\n <w:anchorlock/>\n <center style=\"color:#ffffff;font-family:sans-serif;font-size:13px;font-weight:bold;\">' . __('Reply to Lead Now', 'inbound-pro') . '</center>\n </v:roundrect>\n <![endif]--><a href=\"mailto:{{lead-email-address}}?subject=RE:{{form-name}}&body=' . __('Thanks for filling out our form on {{current-page-url}}', 'inbound-pro') . '\"\n style=\"background-color:#59b329;border:1px solid #558939;border-radius:4px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:18px;font-weight:bold;line-height:40px;text-align:center;text-decoration:none;width:250px;-webkit-text-size-adjust:none;mso-hide:all;\" title=\"' . __('Email This Lead now', 'inbound-pro') . '\">' . __('Reply to Lead Now', 'inbound-pro') . '</a></div>\n </td>\n </tr>\n </tbody>\n </table>\n <!-- End half/half -->\n </td>\n </tr>\n </tbody></table>\n </td>\n </tr>\n </tbody></table>\n <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" style=\"border-collapse:collapse;width:600px;font-size:13px;line-height:20px;color:#545454;font-family:Arial,sans-serif;margin-top:0;margin-right:auto;margin-bottom:0;margin-left:auto\">\n <tbody><tr>\n <td valign=\"top\" width=\"30\" style=\"color:#272727\"> </td>\n <td valign=\"top\" height=\"18\" style=\"height:18px;color:#272727\"></td>\n <td style=\"color:#272727\"> </td>\n <td style=\"color:#545454;text-align:right\" align=\"right\"> </td>\n <td valign=\"middle\" width=\"30\" style=\"color:#272727\"> </td>\n </tr>\n '.$credit.'\n <tr>\n <td valign=\"top\" height=\"6\" style=\"color:#272727;line-height:1px\"> </td>\n <td style=\"color:#272727;line-height:1px\"> </td>\n <td style=\"color:#272727;line-height:1px\"> </td>\n <td style=\"color:#545454;text-align:right;line-height:1px\" align=\"right\"> </td>\n <td valign=\"middle\" width=\"30\" style=\"color:#272727;line-height:1px\"> </td>\n </tr>\n </tbody></table>\n <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" style=\"border-collapse:collapse;width:600px\">\n <tbody><tr>\n <td valign=\"top\" style=\"color:#b1b1b1;font-size:11px;line-height:16px;font-family:Arial,sans-serif;text-align:center\" align=\"center\">\n <p style=\"margin-top:1em;margin-right:0;margin-bottom:1em;margin-left:0\"></p>\n </td>\n </tr>\n </tbody></table>\n </td>\n </tr>\n <tr>\n <td valign=\"top\" height=\"20\"> </td>\n </tr>\n </tbody></table>\n </body>';\n $email_template['subject'] = apply_filters('inbound_new_lead_notification/subject', '');\n $email_template['body'] = apply_filters('inbound_new_lead_notification/body', $html);\n return $email_template;\n }",
"public function getContactUsUrl()\n {\n return 'http://www.x-payments.com/contact-us.html?utm_source=mage_shop&utm_medium=link&utm_campaign=mage_shop_link';\n }",
"function my_custom_prefix_add_sample_referral_tag() {\n\n\tgive_add_email_tag(\n\t\t\t'engraving_message',\n\t\t\t'This outputs the Engraved Message',\n\t\t\t'my_custom_prefix_get_donation_referral_data'\n\t);\n\n}",
"public function getSendQuoteMessageUrl(){\r\n return $this->getUrl('customer/quotation/sendMessage');\r\n }",
"function Link() {\n\t\tif(!$this->Hash) $this->write();\n\t\t\n\t\treturn 'newsletterlinks/'. $this->Hash;\n\t}",
"function makePayPalLink($id) {\n\treturn '<a href=\"https://www.paypal.com/uk/cgi-bin/webscr?cmd=_history\">Reset for holding deposit transaction '.$id.\"</a>\";\n}",
"function merchant_checkout_send_buyer_email( $purchase, $details, $email ) {\n\n\t\t// Make sure email content exists\n\t\tif ( !is_array( $details ) || !array_key_exists( 'email_1_subject', $details ) || !array_key_exists( 'email_1_content', $details ) ) return;\n\n\t\t// Variables\n\t\t$admin_email = sanitize_email( get_option( 'admin_email' ) );\n\t\t$name = get_bloginfo( 'name' );\n\t\t$domain = merchant_get_site_domain();\n\n\t\t// Setup email\n\t\t$to = sanitize_email( $email );\n\t\t$headers = array(\n\t\t\t'From: ' . $name . ' <notifications@' . $domain . '>',\n\t\t\t'Sender: ' . $name . ' <' . $admin_email . '>',\n\t\t\t'Reply-To: ' . $name . ' <' . $admin_email . '>',\n\t\t);\n\t\t$subject = $details['email_1_subject'];\n\t\t$message = nl2br( $details['email_1_content'] );\n\n\t\t// Send email\n\t\twp_mail( $to, $subject, $message, $headers );\n\n\t}",
"function say_thanks(){\n\t\tif( $_REQUEST['thanks'] == 1 ){\n\t\t\techo \"<div class='em-booking-message em-booking-message-success'>\".get_option('em_'.$this->gateway.'_booking_feedback_thanks').'</div>';\n\t\t}\n\t}",
"function donation()\n\t\t{\n\t\t\treturn \"<font size=1 face=arial color=000000>If ezSQL has helped <a href=\\\"https://www.paypal.com/xclick/business=justin%40justinvincent.com&item_name=ezSQL&no_note=1&tax=0\\\" style=\\\"color: 0000CC;\\\">make a donation!?</a> <!--[ go on! you know you want to! ]--></font>\";\n\t\t}",
"public function pendingPage() {\n\t\techo '<html>\n\t\t\t<header><meta http-equiv=\"refresh\" content=\"4;URL=\\''. $this->storeManager->getStore()->getBaseUrl() \n\t\t\t\t. 'customer/account/\\'\"></header><body>\n\t\t\t<div style=\"background-color: #37BC9B; \n\t\t\t\t\t\tmargin: 50px; \n\t\t\t\t\t\tpadding: 40px; \n\t\t\t\t\t\ttext-align:center; \n\t\t\t\t\t\tfont-family: Arial, sans-serif; \n\t\t\t\t\t\tcolor: white; \n\t\t\t\t\t\tfont-size:26px;\">\n\t\t\t\tYour payment has been processed.<br/> You\\'ll be redirected to the merchant site...\n\t\t\t</div></body>\n\t\t';\n\t}",
"protected function sendMail()\n {\n $this->_html .= $this->displayConfirmation($this->l('You are now registered for your free trial. Our team will contact you soon.')).'\n <img src=\"http://www.prestashop.com/partner/shoppingflux/image.php?site='.Tools::safeOutput(Tools::getValue('site')).'&nom='.Tools::safeOutput(Tools::getValue('nom')).'&prenom='.Tools::safeOutput(Tools::getValue('prenom')).'&email='.Tools::safeOutput(Tools::getValue('email')).'&telephone='.Tools::safeOutput(Tools::getValue('telephone')).'&flux='.Tools::safeOutput(Tools::getValue('flux')).'\" border=\"0\" />';\n\n $xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>';\n $xml .= '<AddProspect>';\n $xml .= '<LastName><![CDATA['.Tools::safeOutput(Tools::getValue('nom')).']]></LastName>';\n $xml .= '<FirstName><![CDATA['.Tools::safeOutput(Tools::getValue('prenom')).']]></FirstName>';\n $xml .= '<Site><![CDATA['.Tools::safeOutput(Tools::getValue('site')).']]></Site>';\n $xml .= '<Email><![CDATA['.Tools::safeOutput(Tools::getValue('email')).']]></Email>';\n $xml .= '<Phone><![CDATA['.Tools::safeOutput(Tools::getValue('telephone')).']]></Phone>';\n $xml .= '<Feed><![CDATA['.Tools::safeOutput(Tools::getValue('flux')).']]></Feed>';\n $xml .= '<Code><![CDATA['.Tools::safeOutput(Tools::getValue('code')).']]></Code>';\n $xml .= '<Lang><![CDATA['.$this->default_country->iso_code.']]></Lang>';\n $xml .= '</AddProspect>';\n\n if ($this->isCurlInstalled(true)) {\n $this->_callWebService('AddProspectPrestashop', $xml);\n }\n }",
"protected function getReturnUrl()\n\t{\n\t\t$url = '';\n\t\t$testSite = $this->params->get('subscriptions_test_site', '');\n\t\t$testSiteQs = $this->params->get('subscriptions_test_site_qs', '');\n\t\t$testMode = (bool)$this->params->get('subscriptions_testmode', false);\n\n\t\t$qs = '/index.php?option=com_fabrik&task=plugin.pluginAjax&formid=' . $this->formModel->get('id') . '&g=form&plugin=subscriptions&method=thanks&rowid=' . $this->data['rowid']. '&renderOrder=' . $this->renderOrder;\n\n\t\tif ($testMode)\n\t\t{\n\t\t\t$url = !empty($testSite) ? $testSite . $qs : COM_FABRIK_LIVESITE . $qs;\n\t\t\tif (!empty($testSiteQs))\n\t\t\t{\n\t\t\t\t$url .= $testSiteQs;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url = COM_FABRIK_LIVESITE . $qs;\n\t\t}\n\t\treturn urlencode($url);\n\t}",
"public function reasonForBuying();",
"function webinarjam_send_webinar_link_to_paid_client( $order_id ) {\n\n\t$user_email = '';\n\t$user_first_name = '';\n\t$user_last_name = '';\n\n\t$order = new WC_Order( $order_id );\n\t$user = $order->get_user();\n\n\tif ( $user instanceof WP_User && $user->ID > 0 ) {\n\t\t$user_email = $user->user_email;\n\t\t$user_first_name = ! empty( $user->user_firstname ) ? $user->user_firstname : $user->display_name;\n\t\t$user_last_name = ! empty( $user->user_lastname ) ? $user->last_name : '';\n\t} else {\n\t\t// get user data from order. Idea from Sam Krieg to support guests orders.\n\t\t$user_email = $order->get_billing_email();\n\t\t$user_first_name = $order->get_billing_first_name();\n\t\t$user_last_name = $order->get_billing_last_name();\n\t}\n\n\t$registration_results = array(); // array to store webinar registration results - in case we have multiple webinars bought in one order.\n\n\t$old_registration_results = json_decode( get_post_meta( $order->get_id(), 'webinarjam_registration_result', true ) );\n\n\tif ( ! empty( $old_registration_results ) ) {\n\t\treturn; // do nothing as otherwise we'll reregister user again.\n\t}\n\n\tif ( count( $order->get_items() ) > 0 ) {\n\t\tforeach ( $order->get_items() as $item ) {\n\t\t\tif ( ! is_object( $item ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( $item->is_type( 'line_item' ) ) {\n\t\t\t\t$_product = $item->get_product();\n\n\t\t\t\tif ( 'webinarjam' === $_product->product_type ) {\n\t\t\t\t\t// lets register user for webinar and send him access link.\n\t\t\t\t\t$admin_email = get_option( 'admin_email', '' );\n\t\t\t\t\t$webinarjam_api_key = get_option( 'webinarjam_api_key', '' );\n\t\t\t\t\t$webinarjam_id = get_post_meta( $_product->get_id(), 'webinarjam_id', true );\n\n\t\t\t\t\t// get whole webinar object to access it's friendly name to show.\n\t\t\t\t\t$webinar_obj = webinarjam_get_webinar_data( $webinarjam_api_key, $webinarjam_id );\n\t\t\t\t\t$webinar_name = isset( $webinar_obj->name ) ? $webinar_obj->name : $_product->get_title();\n\t\t\t\t\t// lets extract first schedule id - so register to webinar start working.\n\t\t\t\t\t$schedule = isset( $webinar_obj->schedules[0]->schedule ) ? $webinar_obj->schedules[0]->schedule : 0;\n\t\t\t\t\t// REGISTER user to webinar!\n\t\t\t\t\t$webinar_registration = webinarjam_register_user_to_webinar( $webinarjam_api_key, $webinarjam_id, $user_email, $user_first_name, $user_last_name, $schedule );\n\n\t\t\t\t\tif ( is_wp_error( $webinar_registration ) ) {\n\t\t\t\t\t\t// email to admin registration error!\n\t\t\t\t\t\t$error_email_template = file_get_contents( plugin_dir_path( __FILE__ ) . 'includes/error_email_template.php' );\n\t\t\t\t\t\t$user_name = $user_first_name . ' ' . $user_last_name;\n\t\t\t\t\t\t$error = new WP_Error();\n\n\t\t\t\t\t\tif ( is_wp_error( $webinar_obj ) ) {\n\t\t\t\t\t\t\t $error->add( $webinar_obj->get_error_code(), $webinar_obj->get_error_message() );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$error->add( $webinar_registration->get_error_code(), $webinar_registration->get_error_message() );\n\n\t\t\t\t\t\t$error_messages = '<ul>';\n\t\t\t\t\t\tforeach ( $error->get_error_messages() as $message ) {\n\t\t\t\t\t\t\t$error_messages .= '<li>' . $message . '</li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$error_messages .= '</ul>';\n\t\t\t\t\t\t$error_data = array(\n\t\t\t\t\t\t\t'webinar_name' => $webinar_name,\n\t\t\t\t\t\t\t'user_email' => $user_email,\n\t\t\t\t\t\t\t'user_name' => $user_name,\n\t\t\t\t\t\t\t'order_id' => $order->get_id(),\n\t\t\t\t\t\t\t'product_id' => $_product->id,\n\t\t\t\t\t\t\t'product_name' => $_product->get_title(),\n\t\t\t\t\t\t\t'date' => gmdate( 'Y-m-d H:i:s' ),\n\t\t\t\t\t\t\t'errors' => $error_messages,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tforeach ( $error_data as $item => $value ) {\n\t\t\t\t\t\t\t$error_email_template = str_replace( '{' . $item . '}', $value, $error_email_template );\n\t\t\t\t\t\t}\n\t\t\t\t\t\twc_mail( $admin_email, 'Webinar registration Error!', $error_email_template );\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// lets store successful registration to webinar to Order post meta.\n\t\t\t\t\t\t$webinar_registration->{'webinar_name'} = $webinar_name; // extend stored data with webinar_name.\n\t\t\t\t\t\t$registration_results[] = $webinar_registration; // push it to array of registration results\n\t\t\t\t\t\t// send email to client and admin notification here:) .\n\t\t\t\t\t\t$default_email_template = file_get_contents( plugin_dir_path( __FILE__ ) . 'includes/email-templates/default.php' );\n\t\t\t\t\t\t$default_admin_email_template = file_get_contents( plugin_dir_path( __FILE__ ) . 'includes/email-templates/default-admin.php' );\n\n\t\t\t\t\t\t$subject = get_option( 'webinarjam_paid_successfully_email_subject', 'Successfull webinar registration' );\n\t\t\t\t\t\t$email_body = get_option( 'webinarjam_paid_successfully_email_template', $default_email_template );\n\t\t\t\t\t\t$admin_email_body = get_option( 'webinarjam_paid_successfully_admin_email_template', $default_admin_email_template );\n\n\t\t\t\t\t\t$email_body = str_replace( '{webinar_name}', $webinar_name, $email_body );\n\t\t\t\t\t\t$subject = str_replace( '{webinar_name}', $webinar_name, $subject );\n\t\t\t\t\t\t$admin_email_body = str_replace( '{webinar_name}', $webinar_name, $admin_email_body );\n\n\t\t\t\t\t\t$substitutes = (array) $webinar_registration;\n\n\t\t\t\t\t\tforeach ( $substitutes as $item => $value ) {\n\t\t\t\t\t\t\t$email_body = str_replace( '{' . $item . '}', $value, $email_body );\n\t\t\t\t\t\t\t$subject = str_replace( '{' . $item . '}', $value, $subject );\n\t\t\t\t\t\t\t$admin_email_body = str_replace( '{' . $item . '}', $value, $admin_email_body );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( 'on' === get_option( 'webinarjam_notify_client_on_successfull_registration', false ) ) {\n\t\t\t\t\t\t\t// lets send prepared email to user:) .\n\t\t\t\t\t\t\twc_mail( $user_email, $subject, $email_body );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( 'on' === get_option( 'webinarjam_notify_admin_on_successfull_registration', false ) ) {\n\t\t\t\t\t\t\twc_mail( $admin_email, 'New Webinar applicant!', $admin_email_body );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( count( $registration_results ) ) {\n\t\tupdate_post_meta( $order->get_id(), 'webinarjam_registration_result', wp_json_encode( $registration_results ) );\n\t}\n}",
"public function getPayUrl() {\n $order = $this->getOrder();\n if($order->getStatus() == $this->getConfigData('order_status') || $order->getStatus() == 'alipay_wait_buyer_pay') {\n return 'alipay/pay/index'; \n }\n }",
"public function custom_link()\n {\n $buttonText = $this->get_option('buttonText');\n $buttonURL = $this->get_option('buttonActionURL');\n $buttonTarget = $this->get_option('buttonActionURLTarget');\n\n echo '<a id=\"store_locator_custom_bottom\" target=\"' . $buttonTarget . '\" href=\"' . $buttonURL . '\" class=\"store_locator_custom_bottom button alt\">'\n . $buttonText .\n '</a>';\n }",
"function send_email_asfter_signup($to, $subject, $message, $user_id, $bandfemail){\n $email_status = false;\n //define the message to be sent.\n $message = 'Go to this link and activate'.'some link...'.$user_id; \n //define the headers we want passed\n $headers = 'From: '.$bandfemail;\n\n //send the email\n if(mail( $to, $subject, $message, $headers )){\n $email_status = true;\n }\n return $email_status;\n}",
"function bbloomer_add_premium_support_link_my_account( $items ) {\n $items['premium-support'] = 'Premium Support';\n return $items;\n}",
"public function urlSendmail(){\n\t\t$order_id = $this->input->getInt('order_id');\n\t\t$this->sendMail($order_id);\n\t\texit;\n\t}",
"public function thankyou_page() {\n\t \n //$order = new WC_Order($_GET['order-received']);\n\t \n echo\t'\n <table>\n\t\t\t\t <tr>\n\t\t\t\t\t <td>\n\t\t\t\t\t\t <p>';\n\t\t\t\t\t\t\t\t//if (! isset($_GET[\"sessionSubState\"])) $_GET[\"sessionSubState\"] = null;\n\t\t\t\t\t\t\t\t//echo GopayHelper::getResultMessage($_GET[\"sessionState\"], $_GET[\"sessionSubState\"]);\n\n\t\t\techo\t\n '</p>\n\t\t\t\t\t </td>\n\t\t\t\t </tr>\n </table>';\n\n }"
] | [
"0.6959532",
"0.64023685",
"0.6170168",
"0.6101481",
"0.6090227",
"0.6086168",
"0.6030786",
"0.6030628",
"0.60124564",
"0.6005065",
"0.59876484",
"0.59835714",
"0.59745264",
"0.5974331",
"0.5973737",
"0.59545577",
"0.5952711",
"0.5948931",
"0.5943367",
"0.59381425",
"0.5924647",
"0.5924627",
"0.5906175",
"0.5856415",
"0.58496857",
"0.5836145",
"0.5834636",
"0.5834421",
"0.5833338",
"0.5814915"
] | 0.7718402 | 0 |
Link for the email sent to winning bidder. | function displayPaymentLinkWinningBidderEmail($vars)
{
$messages = $this->_getText(10174);
$payment_text = array(
'email_text' => geoString::fromDB($messages[500207])
);
return $this->_getPaymentLink($vars, $payment_text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function displayPaymentLinkBuyNowEmail($vars)\n {\n $messages = $this->_getText(10167);\n $payment_text = array(\n 'email_text' => geoString::fromDB($messages[500206])\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"public function sendLinkToInvidualEmailAction()\n\t{\n\t\t$params = $this->getRequest()->getParams();\n\t\t$subject = Email_Mailer::SUBJECT_SHARE_POST;\n\t\t$photoID = $params[\"photo_id\"];\n\t\t$photoObj = \\Extended\\socialise_photo::getRowObject($photoID);\n\t\t$shareMSG = $params[\"share_text_msg\"];\n\t\t$c_userID = Auth_UserAdapter::getIdentity()->getId();\n\t\t$c_userObj = \\Extended\\ilook_user::getRowObject($c_userID);\n\t\t$c_username = $c_userObj->getFirstname().\" \".$c_userObj->getLastname();\n\t\t$bodyText =\n\t\t'<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" style=\"font-family:Arial, Helvetica, sans-serif;\">\n\t\t<tr>\n\t\t<td valign=\"top\" style=\"background:#fff; padding-bottom:20px;\"><table width=\"100%\" border=\"0\" cellpadding=\"10\" cellspacing=\"0\">\n\t\t<br />\n\t\t<p style=\"margin:0 20px 0 0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#3a3a3a \">\n\t\t'+$c_username+' has shared the photo, that you be interested in.\n\t\t</p>\n\t\t<br />\n\t\t<p style=\"margin:0 20px 0 0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#3a3a3a \">\n\t\t'.$shareMSG.'\n\t\t</p>\n\t\t<br />\n\t\t<p style=\"margin:0 20px 0 0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#3a3a3a \">Please click on this link: </p>\n\t\t<br />\n\t\t<a href=\"'.PROJECT_URL.'/'.PROJECT_NAME . \"profile/photo-detail/id/\" . $photoID.'\" style=\"margin:0 0 0 0; text-decoration:none; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#b084e9 \">'. PROJECT_URL.\"/\".PROJECT_NAME . \"profile/photo-detail/id/\" . $photoID. '</a>\n\t\t<br />\n\t\t<br />\n\t\t<p style=\"margin:0 20px 0 0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#3a3a3a \">If you are unable to click on the link, you can also copy the URL and paste\n\t\tit into your browser manually </p>\n\t\t<br /><br />\n\t\t</td>\n\t\t</tr>\n\t\t</table>';\n\t\t$userArr = explode(\",\",$params[\"receiver_id\"]);\n\t\t$filteredArr = array_unique($userArr);\n\t\t$iMailMsg = array();\n\t\tfor($i=0;$i<count($filteredArr);$i++)\n\t\t{\n\t\t\t$userObj = \\Extended\\ilook_user::getRowObject($filteredArr[$i]);\n\t\t\t$msg_receiver = $userObj->getFirstname().\" \".$userObj->getLastname();\n\t\t\t$photoArr = array();\n\t\t\t$usrIDArr = array($filteredArr[$i]); \n\t\t\t//Zend_Debug::dump($photoObj->getPhotoGroup());\n\t\t\t//Zend_Debug::dump($photoObj->getSocialise_photosSocialise_album()->getId());\n\t\t\t\n\t\t\tif($photoObj->getWallPost())\n\t\t\t{\n\t\t\t$photoArr[\"wallpost_id\"] = $photoObj->getWallPost()->getId();\n\t\t\t}\n\t\t\t\n\t\t\t//if album_name is DEFAULT then store album name as album_default else append underscore and timestamp.\n\t\t\tif(strtolower( $photoObj->getSocialise_photosSocialise_album()->getAlbum_name()) == strtolower(\\Extended\\socialise_album::DEFAULT_ALBUM_NAME)\n\t\t\t\t\t|| $photoObj->getSocialise_photosSocialise_album()->getAlbum_name() == \\Extended\\socialise_album::PROFILE_PHOTOS_ALBUM_NAME\n\t\t\t\t\t|| $photoObj->getSocialise_photosSocialise_album()->getAlbum_name() == \\Extended\\socialise_album::COVER_PHOTOS_ALBUM_NAME\n\t\t\t)\n\t\t\t{\n\t\t\t\t$albName= strtolower($photoObj->getSocialise_photosSocialise_album()->getAlbum_name());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$albName = $photoObj->getSocialise_photosSocialise_album()->getAlbum_name().\"_\".$photoObj->getSocialise_photosSocialise_album()->getCreated_at_timestamp()->getTimestamp();\n\t\t\t}\n\n\t\t\t$photoArr[\"photo_id\"] = $photoID;\n\t\t\t$photoArr[\"photo_path\"] = IMAGE_PATH.'/albums/user_'.$photoObj->getSocialise_photosPosted_by()->getId().'/album_'.$albName.'/wall_thumbnails/thumbnail_'.$photoObj->getImage_name();\n\t\t\t$photoArr[\"photo_desc\"] = $photoObj->getDescription();\n\t\t\t$iMailMsg = Helper_common::getPhotopostTemplateForMail(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$photoArr, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$c_username,\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t$msg_receiver,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shareMSG\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$result = Helper_common::sendMessage($c_userID, $usrIDArr, $subject, $iMailMsg, Extended\\message::MSG_TYPE_GENERAL, NULL, false, null, 1 );\n\t\t}\n\t\t// Record admin activity log on sharing photos with individual.\n\t\tif(\\Zend_Registry::get('admin_logged_in_as_user'))\n\t\t{\n\t\t\tif($result)\n\t\t\t{\t\n\t\t\t\t\\Extended\\admin_activity_log::addAdminActivityLog(\\Zend_Registry::get('admin_logged_in_as_user'), \\Auth_UserAdapter::getIdentity()->getId(), \\Extended\\admin_activity_log::MODULE_PHOTOS);\n\t\t\t}\n\t\t}\n\t\techo Zend_Json::encode ( TRUE );\n\t\tdie;\n\t}",
"public function email() {\n\n\t\tif ($this->get('status') != 'place' && $this->get('receiver_net') == 'fb') {\n\t\t\t$receiver = ThwUser::getBy([\n\t\t\t\t\t\t'uid'\t => $this->get('receiver_uid'),\n\t\t\t\t\t\t'net'\t => 'fb'\n\t\t\t]);\n\n\t\t\tif (!empty($receiver) && $receiver->get('email')) {\n\n\t\t\t\tif ($this->get('place')) {\n\t\t\t\t\t$place = $this->get('place');\n\t\t\t\t} else {\n\t\t\t\t\t$sender = ThwUser::getBy([\n\t\t\t\t\t\t\t\t'uid'\t => $this->get('sender_uid'),\n\t\t\t\t\t\t\t\t'net'\t => $this->get('receiver_net')\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\n\t\t\t\t$karma = ThwThank::getKarma($receiver, 'dontmail');\n\n\t\t\t\t$html = H::getTemplate('letter_3', [\n\t\t\t\t\t\t\t'sender'\t\t\t\t => empty($place)\n\t\t\t\t\t\t\t\t\t? $sender->get('name')\n\t\t\t\t\t\t\t\t\t: $place,\n\t\t\t\t\t\t\t'karma'\t\t\t\t\t => $karma['karma'],\n\t\t\t\t\t\t\t'average_friends_karma'\t => $karma['average_friends_karma'],\n\t\t\t\t\t\t\t'thank_back'\t\t\t => empty($place)\n\t\t\t\t\t\t\t\t\t? H::getTemplate('letter_4', [\n\t\t\t\t\t\t\t\t\t\t'link'\t => '<a style=\"color:rgb(41,169,225);\" href=\"' . Thanklink::getLink('sms', '') . '\">https://topkarma.com</a>',\n\t\t\t\t\t\t\t\t\t\t'back'\t => B::setProtocol('https:', B::baseURL() . 'thank/' . ($sender->d('id') + 23457890))\n\t\t\t\t\t\t\t\t\t\t\t], 'parse')\n\t\t\t\t\t\t\t\t\t: H::getTemplate('letter_5', [\n\t\t\t\t\t\t\t\t\t\t\t], 'parse')\n\t\t\t\t\t\t\t\t], 'parse');\n\n//die($html);\n\n\t\t\t\tMandrillmail::send([\n\t\t\t\t\t'to'\t\t => $receiver->get('email'),\n\t\t\t\t\t'html'\t\t => $html,\n\t\t\t\t\t'from_name'\t => 'Top Karma',\n\t\t\t\t\t'subject'\t => T::out([\n\t\t\t\t\t\t'thank_1978' => [\n\t\t\t\t\t\t\t'en'\t\t => 'You get thank from {{sender_name}}',\n\t\t\t\t\t\t\t'ru'\t\t => 'Вы получили спасибо от {{sender_name}}',\n\t\t\t\t\t\t\t'_include'\t => [\n\t\t\t\t\t\t\t\t'sender_name' => empty($place)\n\t\t\t\t\t\t\t\t\t\t? $sender->get('name')\n\t\t\t\t\t\t\t\t\t\t: $place\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t]\n\t\t\t\t\t])\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\n\n\t\treturn $this;\n\t}",
"public function sendOkcsEmailAnswerLink() {\n if(IS_DEVELOPMENT){\n $startTime = microtime(true);\n }\n AbuseDetection::check();\n // Populate all email related labels into an array to be sent to the model layer\n $emailData = array(\n 'sendTo' => $this->input->post('to'),\n 'name' => $this->input->post('name'),\n 'from' => $this->input->post('from'),\n 'answerID' => $this->input->post('aId'),\n 'title' => $this->input->post('title'),\n 'emailHeaderLabel' => $this->input->post('emailHeader'),\n 'emailSenderLabel' => $this->input->post('emailSender'),\n 'summaryLabel' => $this->input->post('summaryLabel'),\n 'answerViewLabel' => $this->input->post('answerViewLabel'),\n 'emailAnswerToken' => $this->input->post('emailAnswerToken')\n );\n $response = $this->model('Okcs')->emailOkcsAnswerLink($emailData);\n if(IS_DEVELOPMENT){\n $timingArray = $this->calculateTimeDifference($startTime, 'sendOkcsEmailAnswerLink | OkcsAjaxRequestController');\n $response->ajaxTimings = $timingArray;\n }\n $this->_renderJSON($response);\n }",
"function displayPaymentLinkCurrentBids($vars)\n {\n $messages = $this->_getText(10175);\n $payment_text = array(\n 'payment_link' => $messages[500193],\n 'already_paid' => $messages[500198]\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"protected function message_url($av_id){\n if (cnf_CLI) {\n $reply = '';\n }else{\n $url = b_url::same(\"?form=\".bForm_Avatar::$bForm_Avatar.\"&id=$av_id\",\n\t\t\t array('ed_bList','holder'));\n $reply = (False\n\t\t? bJS()->modal_ajax($url,'[ see the record ]',Null,True)\n\t\t: b_btn::link('see the record',$url));\n }\n return $reply;\n }",
"function bp_invite_button() {\n\t\tglobal $post, $bp;\n\n\t\techo \"<a href = '{$bp->loggedin_user->domain}events/invites/accept/{$post->ID}/' class = 'button'>\" . __( 'Accept', 'eventpress' ) . \"</a>\" . \" \";\n\t\techo \"<a href = '{$bp->loggedin_user->domain}events/invites/reject/{$post->ID}/' class = 'button'>\" . __( 'Reject', 'eventpress' ) . \"</a>\";\n\t}",
"public function getBanerUrl(){ \t\n\tif($this->getBanner())\n\t\treturn $this->getBanner()->getUrl();\n\telse\n\t\treturn '';\n }",
"function Link() {\n\t\tif(!$this->Hash) $this->write();\n\t\t\n\t\treturn 'newsletterlinks/'. $this->Hash;\n\t}",
"public function urlSendmail(){\n\t\t$order_id = $this->input->getInt('order_id');\n\t\t$this->sendMail($order_id);\n\t\texit;\n\t}",
"public function getSendQuoteMessageUrl(){\r\n return $this->getUrl('customer/quotation/sendMessage');\r\n }",
"public function getCheckInLink()\n {\n return Director::absoluteURL(\"checkin/ticket/{$this->TicketCode}\");\n }",
"public function sendNotificationToOwner()\n {\n return \\XLite\\Core\\Mailer::sendNewReview($this);\n }",
"public function getFriendLink()\n\t{\n\t\t$img = Image::getImage(\"b.gif\", Core::getLanguage()->getItem(\"ADD_TO_BUDDYLIST\"));\n\t\treturn Link::get(\"game/\".SID.\"/Friends/Add/\".$this->getUserid(), $img);\n\t}",
"function bbp_reply_to_link($args = array())\n{\n}",
"public function custom_link()\n {\n $buttonText = $this->get_option('buttonText');\n $buttonURL = $this->get_option('buttonActionURL');\n $buttonTarget = $this->get_option('buttonActionURLTarget');\n\n echo '<a id=\"store_locator_custom_bottom\" target=\"' . $buttonTarget . '\" href=\"' . $buttonURL . '\" class=\"store_locator_custom_bottom button alt\">'\n . $buttonText .\n '</a>';\n }",
"public function getUrl() {\n\t\treturn CSR_ROOT . '/bibliotheek/boek/' . $this->getId();\n\t}",
"public function notifyWinner($auction, $options = array()){\n\t\t$winner = $this->getWinner($auction['Auction']['id'], $options);\n\t\tif (!empty($winner)) { // there may not have been a winner\n\t\t\t$emailarr = $auction + $winner;\n\t\t\t$this->__sendMail($winner['HighBidder']['email'],'Webpages.Auction Winner Notification', $emailarr);\n\t\t}\n\t}",
"function bbp_reply_url($reply_id = 0)\n{\n}",
"private function sendVerificationEmail()\n {\n $textBody = 'In order to confirm your email please click on this link: ' . $this->generateVerificationLink();\n /* @var $mailer Mailer */\n $mailer = make(Mailer::class)->compose()\n ->setSubject('Verification link')\n ->setHtmlBody($textBody);\n /* @var $mailQueueData MailQueueData */\n $mailQueueData = make(MailQueueData::class);\n $mailQueueData->from = '[email protected]';\n $mailQueueData->subject = $mailer->getSubject();\n $mailQueueData->body = $textBody; //We should've used something along the lines of: $mailer->getSwiftMessage()->toString(); But for some reason I can't get the links to work properly with it\n $mailQueueData->recipient = $this->email;\n if(!$mailQueueData->save()) {\n throw new UnableToSaveException('Unable to save mail queue');\n }\n }",
"protected function Render_ShipmentLinks() {\n\t$rsShip = $this->ShipmentRecords();\n\t$out = \"\\nCheck in to: \";\n\twhile ($rsShip->NextRow()) {\n\t $sShip = $rsShip->ShortName();\n\t $arAct['ship.id'] = $rsShip->GetKeyValue();\n\t $htLink = $this->SelfLink($sShip,'assign package to shipment '.$sShip,$arAct);\n\t $htAct = \"[ $htLink ]\";\n\t $out .= $htAct;\n\t}\n\treturn $out;\n }",
"public function getUrl()\n {\n return WEB_SERVER_BASE_URL . '/issuers/' . $this->data['id'];\n }",
"public function sendEmail()\n {\n return Yii::$app->mailer->compose()\n ->setTo($this->email)\n ->setFrom([Yii::$app->params['adminEmail'] => 'BROWSER POLL'])\n ->setSubject('Vote Confirmation')\n ->setTextBody('Thank you for contibuting to our site us.')\n ->send();\n }",
"function sendConfirmation() {\n\t\t$confirm = new SendEmail($this->email, $this->emailHash, $this->db);\n\t\t$confirm->constructConfirmLink();\n\t}",
"public function generateVerificationLink()\n {\n return Url::to(['/verification', 'token' => $this->generateVerificationToken()], true);\n }",
"public function notifyOutbid($bid, $options = array()){\n\t\tif($outbid = $this->getOutbid($bid[$this->alias]['auction_id'], $options)){\n\t\t\tApp::uses('User', 'Users.Model');\n\t\t\t$User = new User;\n\t\t\tif($email = $User->field('email', array('User.id' => $outbid['AuctionBid']['bidder_id']))){\n\t\t\t\t$this->__sendMail($email,'Webpages.Auction Outbid Notification', $bid);\n\t\t\t}\n\t\t}\n\t}",
"function displayPaymentLinkBuyNowSuccess($vars)\n {\n $messages = $this->_getText(10165);\n $payment_text = array(\n 'payment_link' => geoString::fromDB($messages[500191]),\n 'already_paid' => geoString::fromDB($messages[500196])\n );\n return $this->_getPaymentLink($vars, $payment_text);\n }",
"public function thankyou_page() {\n\t \n //$order = new WC_Order($_GET['order-received']);\n\t \n echo\t'\n <table>\n\t\t\t\t <tr>\n\t\t\t\t\t <td>\n\t\t\t\t\t\t <p>';\n\t\t\t\t\t\t\t\t//if (! isset($_GET[\"sessionSubState\"])) $_GET[\"sessionSubState\"] = null;\n\t\t\t\t\t\t\t\t//echo GopayHelper::getResultMessage($_GET[\"sessionState\"], $_GET[\"sessionSubState\"]);\n\n\t\t\techo\t\n '</p>\n\t\t\t\t\t </td>\n\t\t\t\t </tr>\n </table>';\n\n }",
"public function mailFinishedAuctionOwners()\n {\n $finishedAuctions = Auction::resultArrayToClassArray(DB::select(\"\n SELECT id,title,user_id\n FROM auctions\n WHERE auctions.end_datetime > DATEADD(MINUTE, -1, GETDATE()) AND auctions.end_datetime < GETDATE()\n \"));\n\n $endingAuctions = Auction::resultArrayToClassArray(DB::select(\"\n WITH finalInfo AS(\n SELECT *\n FROM bids\n WHERE EXISTS(\n SELECT bids.auction_id, bids.amount as amount\n FROM bids bd\n LEFT JOIN auctions\n ON bids.auction_id=auctions.id\n WHERE EXISTS (\n SELECT auctions.id\n FROM auctions\n WHERE auctions.end_datetime > DATEADD(MINUTE, -1, DATEADD(MINUTE,10,GETDATE())) AND auctions.end_datetime < DATEADD(MINUTE,10,GETDATE()) AND bids.auction_id=auctions.id\n )\n AND bids.auction_id=bd.auction_id AND bids.amount=bd.amount\n )\n )\n\n SELECT DISTINCT auction_id,title,email\n FROM (\n SELECT auction_id,user_id,amount, Rank()\n over (Partition BY auction_id\n ORDER BY amount DESC ) AS Rank\n FROM finalInfo\n ) rs\n LEFT JOIN auctions\n ON auctions.id=rs.auction_id\n LEFT JOIN users\n ON users.id=rs.user_id\n WHERE Rank <= 5\n \"));\n\n foreach ($finishedAuctions as $auction) {\n Mail::to($auction->getSeller()->email)->send(new AuctionEnded($auction->title));\n }\n foreach ($endingAuctions as $auction) {\n Mail::to($auction->email)->send(new AuctionEnding($auction->title, $auction->auction_id));\n }\n\n\n $data = [\n 'endingAuctionsCount' => count($endingAuctions),\n 'finishedAuctionsCount' => count($finishedAuctions)\n ];\n return view(\"auctions.finishedauctions\")->with($data);\n }",
"public function sendMailNotGivenBack(){\n $this->setUser();\n \n $conn = connection();\n $sql = \"SELECT stdId, name FROM seller\";\n $result = $conn->query($sql);\n //echo $result->num_rows . \"\\n\";\n if($result->num_rows > 0){\n while($row = $result->fetch_assoc()) {\n $stdId = $row[\"stdId\"];\n $name = $row[\"name\"];\n \n \n $this->addRecipient($stdId . '@ntu.edu.tw', $name);\n \n $sql = \"SELECT * FROM bookorder WHERE stdId = '$stdId' AND state = '未領錢或退書'\";\n $result = $conn->query($sql);\n \n if ($result->num_rows > 0) {\n // output data of each row\n $body = $name . \"先生/小姐您好,您尚未領取以下書籍的賣出費用或是退書:\" . \"<br>\";\n \n while($row = $result->fetch_assoc()) \n $body = $body . $row[\"subject\"] . \"<br>\" ;\n $body = $body . \"補領時間請關注電機二手書臉書粉絲專頁\"; \n \n $this -> addBody( $body );\n $this -> sendMail();\n } \n } \n }\n }"
] | [
"0.63703376",
"0.6235501",
"0.6205747",
"0.6095705",
"0.5859554",
"0.58357894",
"0.57457423",
"0.5714079",
"0.5701244",
"0.56581867",
"0.5605317",
"0.55956024",
"0.5594619",
"0.5559942",
"0.5557661",
"0.5554845",
"0.55456734",
"0.55409396",
"0.55383474",
"0.55337757",
"0.5519933",
"0.5516135",
"0.54834104",
"0.54756254",
"0.5466458",
"0.5464991",
"0.54621",
"0.5457283",
"0.5453505",
"0.5443829"
] | 0.7625589 | 0 |
Operation augmentByUrlsAsyncWithHttpInfo Answers a given query from the documents in the index | public function augmentByUrlsAsyncWithHttpInfo($payload, string $contentType = self::contentTypes['augmentByUrls'][0])
{
$returnType = '\Semanticwrap\Model\AsyncProcessResponse';
$request = $this->augmentByUrlsRequest($payload, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function augmentByUrlsRequest($payload, string $contentType = self::contentTypes['augmentByUrls'][0])\n {\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling augmentByUrls'\n );\n }\n\n\n $resourcePath = '/augment/complex-chain/urls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function augmentByUrlsAsync($payload, string $contentType = self::contentTypes['augmentByUrls'][0])\n {\n return $this->augmentByUrlsAsyncWithHttpInfo($payload, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function upsert(string $url, RequestOptionsInterface $requestOptions) : ResponseInterface;",
"public function addUrls(array $urls) : int;",
"public function addAZRLocationAsyncWithHttpInfo($body = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse20076';\n $request = $this->addAZRLocationRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function searchLooksAsyncWithHttpInfo($title = null, $description = null, $content_favorite_id = null, $space_id = null, $user_id = null, $view_count = null, $deleted = null, $query_id = null, $curate = null, $fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $filter_or = null)\n {\n $returnType = '\\Funeralzone\\LookerClient\\Model\\Look[]';\n $request = $this->searchLooksRequest($title, $description, $content_favorite_id, $space_id, $user_id, $view_count, $deleted, $query_id, $curate, $fields, $page, $per_page, $limit, $offset, $sorts, $filter_or);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"function aggregate_by_url(&$post, array $urls);",
"public function numbersearchGetAsyncWithHttpInfo($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->numbersearchGetRequest($api_version, $offset, $limit, $country, $prefix, $contains, $number_type);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function allLooksAsyncWithHttpInfo($fields = null)\n {\n $returnType = '\\Funeralzone\\LookerClient\\Model\\Look[]';\n $request = $this->allLooksRequest($fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function writeBeginUrlCollection(ODataURLCollection &$odataUrls);",
"protected function appendApiKey($url) {\r\n if (is_null(parse_str(parse_url($url)[\"query\"])[\"api_key\"])) {\r\n return $this->appendToUrl($url, \"api_key\", $this->m_api_key);\r\n } else {\r\n return $url;\r\n }\r\n }",
"public function add_endpoints() {\n\t\tforeach ( $this->query_vars as $key => $var ) {\n\t\t\tadd_rewrite_endpoint( $var, EP_ROOT | EP_PAGES );\n\t\t}\n\t}",
"public function customerInvoicesV2PostAsyncWithHttpInfo($id, $eu_third_party, $is_credit_invoice, $currency_code, $currency_rate, $created_by_user_id, $total_amount, $total_vat_amount, $total_roundings, $total_amount_invoice_currency, $total_vat_amount_invoice_currency, $set_off_amount_invoice_currency, $customer_id, $rows, $vat_specification, $invoice_date, $due_date, $delivery_date, $rot_reduced_invoicing_type, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_percent, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $persons, $rot_reduced_invoicing_automatic_distribution, $electronic_reference, $electronic_address, $edi_service_deliverer_id, $our_reference, $your_reference, $buyers_order_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_term_name, $delivery_method_code, $delivery_term_code, $customer_is_private_person, $terms_of_payment_id, $customer_email, $invoice_number, $customer_number, $payment_reference_number, $rot_property_type, $sales_document_attachments, $has_auto_invoice_error, $is_not_delivered, $reverse_charge_on_construction_services, $work_house_other_costs, $remaining_amount, $remaining_amount_invoice_currency, $referring_invoice_id, $created_from_order_id, $created_from_draft_id, $voucher_number, $voucher_id, $created_utc, $modified_utc, $reversed_construction_vat_invoicing, $includes_vat, $send_type, $payment_reminder_issued, $uses_green_technology, $rot_reduced_automatic_distribution = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\CustomerInvoiceApi';\n $request = $this->customerInvoicesV2PostRequest($id, $eu_third_party, $is_credit_invoice, $currency_code, $currency_rate, $created_by_user_id, $total_amount, $total_vat_amount, $total_roundings, $total_amount_invoice_currency, $total_vat_amount_invoice_currency, $set_off_amount_invoice_currency, $customer_id, $rows, $vat_specification, $invoice_date, $due_date, $delivery_date, $rot_reduced_invoicing_type, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_percent, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $persons, $rot_reduced_invoicing_automatic_distribution, $electronic_reference, $electronic_address, $edi_service_deliverer_id, $our_reference, $your_reference, $buyers_order_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_term_name, $delivery_method_code, $delivery_term_code, $customer_is_private_person, $terms_of_payment_id, $customer_email, $invoice_number, $customer_number, $payment_reference_number, $rot_property_type, $sales_document_attachments, $has_auto_invoice_error, $is_not_delivered, $reverse_charge_on_construction_services, $work_house_other_costs, $remaining_amount, $remaining_amount_invoice_currency, $referring_invoice_id, $created_from_order_id, $created_from_draft_id, $voucher_number, $voucher_id, $created_utc, $modified_utc, $reversed_construction_vat_invoicing, $includes_vat, $send_type, $payment_reminder_issued, $uses_green_technology, $rot_reduced_automatic_distribution);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function addLinkExtractionTags()\n {\n $tags = func_get_args();\n return $this->setLinkExtractionTags($tags);\n }",
"public function bulkAsUrl()\n {\n $zipUrl = $this->exporter->doExport('zip');\n return response()->json([\n 'file_url' => $zipUrl,\n ]);\n }",
"public function quotesV2PutAsyncWithHttpInfo($id2, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology, $id)\n {\n $returnType = 'object';\n $request = $this->quotesV2PutRequest($id2, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology, $id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function add_custom_rest_endpoints() {\n $this->add_custom_jobs_endpoint();\n $this->add_custom_job_labels_endpoint();\n }",
"public function associateEipAddressBatchWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->bindedInstanceId)) {\n $query['BindedInstanceId'] = $request->bindedInstanceId;\n }\n if (!Utils::isUnset($request->bindedInstanceType)) {\n $query['BindedInstanceType'] = $request->bindedInstanceType;\n }\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->instanceIds)) {\n $query['InstanceIds'] = $request->instanceIds;\n }\n if (!Utils::isUnset($request->mode)) {\n $query['Mode'] = $request->mode;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'AssociateEipAddressBatch',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return AssociateEipAddressBatchResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"public function queryPatternsAsyncWithHttpInfo($offset = null, $limit = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $request = $this->queryPatternsRequest($offset, $limit);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function run()\n {\n $client = new \\GuzzleHttp\\Client();\n $urls = array(\n 'https://data.baomoi.com/api/v2.0/video/byzone?apikey=ee7b8c7c7019f1b5c0674d41b125faf7&client_version=18.09.03&ctime=%20%20%201538380996&deviceName=iPhone7Plus&fields=title%2Credirect%2Cdate%2CcontentTypes%2Curl%2CoriginalUrl%2CpublisherId%2CpublisherName%2CpublisherIcon%2CvideoChannelId%2CvideoChannelName%2CparentVideoChannelId%2CparentVideoChannelName%2CavatarUrl%2CavatarWidth%2CavatarHeight%2Cdescription%2Ctags%2CtotalImages%2Cimages%2CtotalComments%2CvideoChannelName%2Cbody%2CshareUrl&gy=402967000&imgsize=a500x&os=ios&sig=b7601abbcdbfba8fd7fb7f2b670bb75d&size=30&start=0&v=2.0&zone=v_59',\n 'https://data.baomoi.com/api/v2.0/video/byzone?apikey=ee7b8c7c7019f1b5c0674d41b125faf7&client_version=18.09.03&ctime=%20%20%201538381481&deviceName=iPhone7Plus&fields=title%2Credirect%2Cdate%2CcontentTypes%2Curl%2CoriginalUrl%2CpublisherId%2CpublisherName%2CpublisherIcon%2CvideoChannelId%2CvideoChannelName%2CparentVideoChannelId%2CparentVideoChannelName%2CavatarUrl%2CavatarWidth%2CavatarHeight%2Cdescription%2Ctags%2CtotalImages%2Cimages%2CtotalComments%2CvideoChannelName%2Cbody%2CshareUrl&gy=402967000&imgsize=a500x&os=ios&sig=35d0506bc389448daa25af08e54d907b&size=30&start=30&v=2.0&zone=v_59',\n 'https://data.baomoi.com/api/v2.0/video/byzone?apikey=ee7b8c7c7019f1b5c0674d41b125faf7&client_version=18.09.03&ctime=%20%20%201538381572&deviceName=iPhone7Plus&fields=title%2Credirect%2Cdate%2CcontentTypes%2Curl%2CoriginalUrl%2CpublisherId%2CpublisherName%2CpublisherIcon%2CvideoChannelId%2CvideoChannelName%2CparentVideoChannelId%2CparentVideoChannelName%2CavatarUrl%2CavatarWidth%2CavatarHeight%2Cdescription%2Ctags%2CtotalImages%2Cimages%2CtotalComments%2CvideoChannelName%2Cbody%2CshareUrl&gy=402967000&imgsize=a500x&os=ios&sig=9ca68f06082ee07b90e90b8c59e4dbe4&size=30&start=60&v=2.0&zone=v_59'\n );\n\n foreach ($urls as $url) {\n $res = $client->get($url);\n $content = json_decode($res->getBody())->data;\n foreach ($content as $item) {\n try {\n $file = file_get_contents(end($item->body[0]->mediaUrl->mp4));\n if (!Storage::disk('local')->exists('public/\\'.$item->videoContentId.\\'.mp4\\'')) {\n Storage::disk('local')->put('public/'.$item->videoContentId.'.mp4', $file);\n }\n\n $post = new \\App\\Post();\n $post->title = preg_replace('~[^\\\\pL\\d]+~u',' ',$item->title);\n $post->type = 1;\n $post->description = preg_replace('~[^\\\\pL\\d]+~u',' ',$item->description);\n $post->handle_url = str_random(10);\n $post->thumbnail = $item->avatarUrl;\n $post->thumbnail_width = $item->avatarWidth;\n $post->thumbnail_height = $item->avatarHeight;\n $post->content = 'http://localhost:8000/storage/'.$item->videoContentId.'.mp4';\n $post->content_width = $item->body[0]->width;\n $post->content_height = $item->body[0]->height;\n $post->duration = $item->body[0]->duration;\n $post->source = 'Collect';\n $post->seen_count = 0;\n $post->comment_count = 0;\n $post->status = 1;\n $post->save();\n } catch (Exception $e) {\n continue;\n }\n }\n }\n\n $res = $client->get('https://xemvn-parser-api.herokuapp.com/');\n $content = json_decode($res->getBody());\n\n foreach ($content as $item) {\n try {\n $post = new \\App\\Post();\n $post->title = preg_replace('~[^\\\\pL\\d]+~u',' ',$item->title);\n $post->type = 2;\n $post->description = preg_replace('~[^\\\\pL\\d]+~u',' ',$item->title);\n $post->handle_url = str_random(10);\n $post->thumbnail = $item->img;\n $post->thumbnail_width = 400;\n $post->thumbnail_height = 400;\n $post->content = preg_replace('/\\b-400.jpg\\b/','-650.jpg', $item->img);\n $post->content_width = 650;\n $post->content_height = 650;\n $post->duration = 0;\n $post->source = 'Collect';\n $post->seen_count = 0;\n $post->comment_count = 0;\n $post->status = 1;\n $post->save();\n } catch (Exception $e) {\n continue;\n }\n }\n }",
"public function createLookAsyncWithHttpInfo($body = null, $fields = null)\n {\n $returnType = '\\Funeralzone\\LookerClient\\Model\\LookWithQuery';\n $request = $this->createLookRequest($body, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function imagesAddPreviewAsyncWithHttpInfo($id, $name, $namespace, $width, $height, $tenant_id = null, $format = null, $file = null)\n {\n $returnType = '\\Aurigma\\AssetStorage\\Model\\ImageDto';\n $request = $this->imagesAddPreviewRequest($id, $name, $namespace, $width, $height, $tenant_id, $format, $file);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function api($url) {\r\n $this->query['api_url'] = $url;\r\n return $this;\r\n }",
"function append(iUriSequence $appendUri);",
"public function memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAsyncAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAsyncAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/async/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function addRequestsCreateExistingLocationAsyncWithHttpInfo($api_key, $v, $content_type, $body)\n {\n $returnType = '';\n $request = $this->addRequestsCreateExistingLocationRequest($api_key, $v, $content_type, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function assemble(array $info, array $query = null);",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}"
] | [
"0.5039237",
"0.4958155",
"0.45261914",
"0.44812524",
"0.44601858",
"0.43929377",
"0.4348719",
"0.43251458",
"0.4304505",
"0.42773145",
"0.42222875",
"0.4218096",
"0.41118178",
"0.4061286",
"0.4014689",
"0.40015045",
"0.3998945",
"0.39841744",
"0.3979993",
"0.39786693",
"0.39749464",
"0.39591208",
"0.395871",
"0.39512652",
"0.3949307",
"0.3932077",
"0.39242804",
"0.3920423",
"0.3920423",
"0.3920423"
] | 0.58129966 | 0 |
Create request for operation 'augmentByUrls' | public function augmentByUrlsRequest($payload, string $contentType = self::contentTypes['augmentByUrls'][0])
{
// verify the required parameter 'payload' is set
if ($payload === null || (is_array($payload) && count($payload) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $payload when calling augmentByUrls'
);
}
$resourcePath = '/augment/complex-chain/urls';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$headers = $this->headerSelector->selectHeaders(
['application/json', ],
$contentType,
$multipart
);
// for model (json/xml)
if (isset($payload)) {
if (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the body
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));
} else {
$httpBody = $payload;
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'POST',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function upsert(string $url, RequestOptionsInterface $requestOptions) : ResponseInterface;",
"public function constructOpUrl();",
"public function createUrlArgs(): array\n {\n return [\n 'id' => $this->getId(),\n ];\n }",
"function xmls_clone_addrequest($url, $ip, $patterns) {\n if ($ip) {\n watchdog('Clone', 'xmls_clone_addrequest ' . $ip);\n }\n if (!$url) {\n return xmlrpc_error(1, t('error adding url to the list. Specify an URL in the configuration'));\n }\n if (variable_get('clone_allow_clone', FALSE)) {\n foreach ($patterns as $pattern) {\n $id = db_insert('clone_requests')\n ->fields(array(\n 'url' => $url,\n 'ip' => $ip,\n 'created' => time(),\n 'name' => $pattern['name'],\n 'title' => $pattern['title'],\n 'version' => $pattern['version'],\n 'format' => $pattern['format'],\n 'content' => $pattern['content'],\n ))\n ->execute();\n watchdog('Clone', $pattern['title'] . ' ' . $pattern['version']);\n }\n return t('Successfully made a clone request.');\n }\n else {\n return xmlrpc_error(1, t('Sorry, but this instance does not allow any clone requests.'));\n }\n}",
"public function resourceUrls(): ResourceUrlsGeneratorContract;",
"public function associateEipAddressBatchWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->bindedInstanceId)) {\n $query['BindedInstanceId'] = $request->bindedInstanceId;\n }\n if (!Utils::isUnset($request->bindedInstanceType)) {\n $query['BindedInstanceType'] = $request->bindedInstanceType;\n }\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->instanceIds)) {\n $query['InstanceIds'] = $request->instanceIds;\n }\n if (!Utils::isUnset($request->mode)) {\n $query['Mode'] = $request->mode;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'AssociateEipAddressBatch',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return AssociateEipAddressBatchResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"private function createUrl(string $date): string\n {\n return $this->endpoint . '/merge_requests?' .\n 'created_after=' . $date . '&' .\n $this->getOptionsUrl();\n }",
"public function getUrlFromRequest(): self\n {\n $adapterName = 'App\\API\\V1\\Adapters\\\\' . $this->getFormat() . '\\Url' . $this->getFormat();\n $adapter = new $adapterName($this->request);\n\n /** @var UrlJson $adapter */\n $adapter\n ->setEntity((new UrlEntity)->getArray())\n ->setAction($this->request->method())\n ;\n\n $urlService = new UrlService($this->request, new UrlMapper( $adapter));\n\n $this->data = $urlService->getUrls()->getData();\n $this->entityFields = $adapter->getMappingFields();\n\n return $this;\n }",
"private function getEnhanceUri(AnalysisRequest $analysisRequest, $addOutputFormatParam = false)\n {\n $initUrl = $this->initiateUriBuilding();\n $params = array(\"path\" => self::PATH . DIRECTORY_SEPARATOR . $analysisRequest->getAnalysis() . DIRECTORY_SEPARATOR . self::ENHANCE);\n if ($addOutputFormatParam) {\n $params[\"query\"] = self::$OUTPUT_FORMAT . \"=\" . $analysisRequest->getOutputFormat();\n }\n return \\http_build_url($initUrl, $params , HTTP_URL_STRIP_AUTH | HTTP_URL_JOIN_PATH | HTTP_URL_JOIN_QUERY | HTTP_URL_STRIP_FRAGMENT);\n }",
"function url($base, $vars = null /* ... */) {\n\t// use an ArrayMergeDecorator to have them merged\n\t// at value evaluation time.\n\tif (func_num_args() > 2) {\n\t\t$v = func_get_args();\n\t\tarray_shift($v);\n\t\treturn new UrlDecorator($base, new ArrayMergeDecorator($v));\n\t}\n\treturn new UrlDecorator($base, $vars);\n}",
"public function associateEipAddressBatch($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->associateEipAddressBatchWithOptions($request, $runtime);\n }",
"function aggregate_by_url(&$post, array $urls);",
"public function associateEipAddressWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->allocationId)) {\n $query['AllocationId'] = $request->allocationId;\n }\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->instanceId)) {\n $query['InstanceId'] = $request->instanceId;\n }\n if (!Utils::isUnset($request->instanceRegionId)) {\n $query['InstanceRegionId'] = $request->instanceRegionId;\n }\n if (!Utils::isUnset($request->instanceType)) {\n $query['InstanceType'] = $request->instanceType;\n }\n if (!Utils::isUnset($request->mode)) {\n $query['Mode'] = $request->mode;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->privateIpAddress)) {\n $query['PrivateIpAddress'] = $request->privateIpAddress;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->vpcId)) {\n $query['VpcId'] = $request->vpcId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'AssociateEipAddress',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return AssociateEipAddressResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"public function createRequest($url = null, $method = null, $headers = array()) {}",
"public function create(){\n $this->create_meta();\n $this->convert_tags();\n $this->insert();\n $this->update_url();\n $this->create_relation_tag();\n return $this->url;\n }",
"public function addOauthV2($request) {\n\t\t$request['uri']['query'] = (array)Hash::get($request, 'uri.query') + $this->getCredentials();\n\t\treturn $request;\n\t}",
"public function createNatIpWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->dryRun)) {\n $query['DryRun'] = $request->dryRun;\n }\n if (!Utils::isUnset($request->natGatewayId)) {\n $query['NatGatewayId'] = $request->natGatewayId;\n }\n if (!Utils::isUnset($request->natIp)) {\n $query['NatIp'] = $request->natIp;\n }\n if (!Utils::isUnset($request->natIpCidr)) {\n $query['NatIpCidr'] = $request->natIpCidr;\n }\n if (!Utils::isUnset($request->natIpDescription)) {\n $query['NatIpDescription'] = $request->natIpDescription;\n }\n if (!Utils::isUnset($request->natIpName)) {\n $query['NatIpName'] = $request->natIpName;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'CreateNatIp',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return CreateNatIpResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"protected abstract function _buildSpecificRequestUri();",
"public function encodeURL(Request $request)\n {\n\n try \n {\n \n //receieve the requests\n $long_url = $request->long_url;\n $short_code = $request->custom_url ?? null;\n $scheme = $request->scheme ?? 'ALPHANUMERIC';\n\n \n //Generate short code if the scheme is not CUSTOM\n if ($scheme != 'CUSTOM') \n {\n\n $bool = true;\n\n while( $bool )\n {\n //generate a random short code\n $short_code = $this->generateShortCode($scheme);\n \n //check if the code already exists in the DB\n $bool = $this->shortCodeExists($short_code);\n \n }\n \n }\n\n //If the custom code already exists in the DB, throw an exception\n if ($this->shortCodeExists($short_code)) {\n \n throw new \\Exception(\"Custom URL already exists\", 701);\n\n }\n\n //store record in the DB\n $url_map = new URLMapping;\n $url_map->long_url = $long_url;\n $url_map->short_code = $short_code; \n $url_map->scheme_type = $scheme;\n $url_map->save();\n\n //generate short URL\n $short_url = $_SERVER['SERVER_NAME'] . '/' . $short_code; \n\n // //return response\n return response()->json([\n\n 'long_url' => $long_url,\n 'short_url' => $short_url,\n 'encoding_scheme' => $scheme,\n\n ], 200);\n\n } catch (\\Exception $e) {\n\n return response()->json($e->getMessage(), 400);\n\n }\n\n }",
"private function UrlRequests(){\n }",
"function merge_urls($base_url, $new_url)\n{\n $result_url = $new_url + array_intersect_key($base_url, array('scheme' => '', 'host' => ''));\n\n if (isset($new_url['path']) && isset($base_url['path']))\n {\n if ($new_url['path'] == '' || $new_url['path'][0] != '/')\n {\n $base_path = $base_url['path'];\n if (substr($base_path, -1) != '/')\n {\n $base_path = str_replace(basename($base_path), '', $base_path);\n }\n $result_url['path'] = rtrim($base_path, '/') . '/' . ltrim($new_url['path'], '/');\n }\n }\n return $result_url;\n}",
"public function createNatIpCidrWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->dryRun)) {\n $query['DryRun'] = $request->dryRun;\n }\n if (!Utils::isUnset($request->natGatewayId)) {\n $query['NatGatewayId'] = $request->natGatewayId;\n }\n if (!Utils::isUnset($request->natIpCidr)) {\n $query['NatIpCidr'] = $request->natIpCidr;\n }\n if (!Utils::isUnset($request->natIpCidrDescription)) {\n $query['NatIpCidrDescription'] = $request->natIpCidrDescription;\n }\n if (!Utils::isUnset($request->natIpCidrName)) {\n $query['NatIpCidrName'] = $request->natIpCidrName;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'CreateNatIpCidr',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return CreateNatIpCidrResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"public function addLinkExtractionTags()\n {\n $tags = func_get_args();\n return $this->setLinkExtractionTags($tags);\n }",
"public function create(Request $request) \n\t{\n\n\t\tif (empty($request) || empty(trim($request->url))) {\n\t\t\t$result = $this->getResult(self::ERROR, self::BAD_REQUEST, null, 'Invalid parameter sent');\n\t\t\treturn response()->json($result, self::BAD_REQUEST);\n\t\t}\n\n\t\tif (!filter_var($request->url, FILTER_VALIDATE_URL)) {\n\t\t\t$result = $this->getResult(self::ERROR, self::BAD_REQUEST, null, 'Please provide a valid URL');\n\t\t\treturn response()->json($result, self::BAD_REQUEST);\n\t\t}\n\n\t\t$url = $request->url;\n\t\t$link = Links::whereUrl($url)->first();\n\t\tif (!$link) {\n\t\t\t$code = \"\";\n\t\t\t$link = Links::create(['url' => $request->url, 'code' => $code]);\n\n\n\t\t\t$code = base_convert($link->id + rand(10000,100000), 10, 36);\n\t\t\t$link = Links::whereUrl($url)->update([\n\t\t\t\t'code' => $code\n\t\t\t]);\n\t\t}\n\n\t\t$code = isset($code) ? $code : $link->code;\n\t\t$data = [\n\t\t\t'link' => [\n\t\t\t\t'hash' => $code, \n\t\t\t\t'url' => env('BASE_URL') .\"/\". $code,\n\t\t\t\t'long_url' => $url\n\t\t\t]\n\t\t];\n\t\t$result = $this->getResult(self::SUCCESS, self::CREATED, $data);\n\t\treturn response()->json($result, self::CREATED);\n\t\t\n\t}",
"public function add_url_query_parts($query):Util_DryRequest{\n\t $this->url_query_parts[] = $query;\n\t return $this;\n\t}",
"public function bulkAsUrl()\n {\n $zipUrl = $this->exporter->doExport('zip');\n return response()->json([\n 'file_url' => $zipUrl,\n ]);\n }",
"public function associateAddress($request);",
"public function toArray($request)\n {\n $additional = [\n 'images' => \\json_decode($this->images),\n 'qrcode_link' => $this->genQrcodeLink()\n ];\n\n return array_merge(parent::toArray($request), $additional);\n }",
"function create_url($urlOrController=null, $method=null, $arguments=null) {\n\treturn CLanaya::Instance()->request->CreateUrl($urlOrController, $method, $arguments);\n}",
"public function create(Request $request)\n {\n Validator::make($request->all(), [\n 'url' => 'required|url',\n ])->validate();\n $feed = Feed::createFromUrl($request->input('url'));\n $subscription = FeedSubscription::firstOrCreate([\n 'feed_id' => $feed->id,\n 'user_id' => Auth::id(),\n ]);\n return response()->json(array_merge(\n $feed->toArray(),\n ['subscription_id' => $subscription->id]\n ), 201);\n }"
] | [
"0.5461553",
"0.5434101",
"0.5051232",
"0.5009212",
"0.49312595",
"0.4836838",
"0.48058388",
"0.47852075",
"0.4783742",
"0.47272366",
"0.4726949",
"0.47016698",
"0.47008675",
"0.46867073",
"0.46707365",
"0.46439412",
"0.46412537",
"0.4627207",
"0.46255055",
"0.46025828",
"0.45987448",
"0.45923865",
"0.4586978",
"0.456647",
"0.45652953",
"0.4560202",
"0.45509335",
"0.45305893",
"0.45133668",
"0.4486566"
] | 0.66500914 | 0 |
Operation complexAugmentAsyncWithHttpInfo Answers a given query from the documents in the index | public function complexAugmentAsyncWithHttpInfo($payload, string $contentType = self::contentTypes['complexAugment'][0])
{
$returnType = '\Semanticwrap\Model\AsyncProcessResponse';
$request = $this->complexAugmentRequest($payload, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n $request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\Semanticwrap\\Model\\AsyncProcessResponse' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\Semanticwrap\\Model\\AsyncProcessResponse' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\Semanticwrap\\Model\\AsyncProcessResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Semanticwrap\\Model\\AsyncProcessResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAsyncAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAsyncAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/async/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function numbersearchGetAsyncWithHttpInfo($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->numbersearchGetRequest($api_version, $offset, $limit, $country, $prefix, $contains, $number_type);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memorylessAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memoryfullAugmentRequest($index_name, $payload, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function complexAugmentRequest($payload, string $contentType = self::contentTypes['complexAugment'][0])\n {\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling complexAugment'\n );\n }\n\n\n $resourcePath = '/augment/complex-chain/docs';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function searchGeneralInfoAsyncWithHttpInfo($entity, $matrix_vars, $q = null, $fq = null, $start = null, $limit = null, $language = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse20099';\n $request = $this->searchGeneralInfoRequest($entity, $matrix_vars, $q, $fq, $start, $limit, $language);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function memorylessAsyncAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n $request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function customerInvoicesV2PostAsyncWithHttpInfo($id, $eu_third_party, $is_credit_invoice, $currency_code, $currency_rate, $created_by_user_id, $total_amount, $total_vat_amount, $total_roundings, $total_amount_invoice_currency, $total_vat_amount_invoice_currency, $set_off_amount_invoice_currency, $customer_id, $rows, $vat_specification, $invoice_date, $due_date, $delivery_date, $rot_reduced_invoicing_type, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_percent, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $persons, $rot_reduced_invoicing_automatic_distribution, $electronic_reference, $electronic_address, $edi_service_deliverer_id, $our_reference, $your_reference, $buyers_order_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_term_name, $delivery_method_code, $delivery_term_code, $customer_is_private_person, $terms_of_payment_id, $customer_email, $invoice_number, $customer_number, $payment_reference_number, $rot_property_type, $sales_document_attachments, $has_auto_invoice_error, $is_not_delivered, $reverse_charge_on_construction_services, $work_house_other_costs, $remaining_amount, $remaining_amount_invoice_currency, $referring_invoice_id, $created_from_order_id, $created_from_draft_id, $voucher_number, $voucher_id, $created_utc, $modified_utc, $reversed_construction_vat_invoicing, $includes_vat, $send_type, $payment_reminder_issued, $uses_green_technology, $rot_reduced_automatic_distribution = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\CustomerInvoiceApi';\n $request = $this->customerInvoicesV2PostRequest($id, $eu_third_party, $is_credit_invoice, $currency_code, $currency_rate, $created_by_user_id, $total_amount, $total_vat_amount, $total_roundings, $total_amount_invoice_currency, $total_vat_amount_invoice_currency, $set_off_amount_invoice_currency, $customer_id, $rows, $vat_specification, $invoice_date, $due_date, $delivery_date, $rot_reduced_invoicing_type, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_percent, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $persons, $rot_reduced_invoicing_automatic_distribution, $electronic_reference, $electronic_address, $edi_service_deliverer_id, $our_reference, $your_reference, $buyers_order_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_term_name, $delivery_method_code, $delivery_term_code, $customer_is_private_person, $terms_of_payment_id, $customer_email, $invoice_number, $customer_number, $payment_reference_number, $rot_property_type, $sales_document_attachments, $has_auto_invoice_error, $is_not_delivered, $reverse_charge_on_construction_services, $work_house_other_costs, $remaining_amount, $remaining_amount_invoice_currency, $referring_invoice_id, $created_from_order_id, $created_from_draft_id, $voucher_number, $voucher_id, $created_utc, $modified_utc, $reversed_construction_vat_invoicing, $includes_vat, $send_type, $payment_reminder_issued, $uses_green_technology, $rot_reduced_automatic_distribution);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function memorylessAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function complexAugmentAsync($payload, string $contentType = self::contentTypes['complexAugment'][0])\n {\n return $this->complexAugmentAsyncWithHttpInfo($payload, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function numbersearchGetWithHttpInfo($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->numbersearchGetRequest($api_version, $offset, $limit, $country, $prefix, $contains, $number_type);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse2006',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse403',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse500',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function eventGetAdHocSchemaAsyncWithHttpInfo()\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\EventModel';\n $request = $this->eventGetAdHocSchemaRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function queryPatternsAsyncWithHttpInfo($offset = null, $limit = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $request = $this->queryPatternsRequest($offset, $limit);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function createLookAsyncWithHttpInfo($body = null, $fields = null)\n {\n $returnType = '\\Funeralzone\\LookerClient\\Model\\LookWithQuery';\n $request = $this->createLookRequest($body, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function assemble(array $info, array $query = null){ }",
"public function memoryfullAugmentRequest($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memoryfullAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memoryfullAugment'\n );\n }\n\n\n\n\n $resourcePath = '/augment/memoryfull/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function assemble(array $info, array $query = null);",
"public function updateAisleCustomFieldsAsyncWithHttpInfo($body)\n {\n $returnType = '';\n $request = $this->updateAisleCustomFieldsRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function queryPlatformsMixin0AsyncWithHttpInfo($offset = null, $limit = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $request = $this->queryPlatformsMixin0Request($offset, $limit);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function searchCouponsAdvancedAsyncWithHttpInfo($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null)\n {\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse2001';\n $request = $this->searchCouponsAdvancedRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function queryPatternsWithHttpInfo($offset = null, $limit = null)\n {\n $request = $this->queryPatternsRequest($offset, $limit);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\MsaQueryResponse' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaQueryResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 403:\n if ('\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 429:\n if ('\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n default:\n if ('\\OpenAPI\\Client\\Model\\MsaQueryResponse' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaQueryResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaQueryResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n default:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaQueryResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function quotesV2PutAsyncWithHttpInfo($id2, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology, $id)\n {\n $returnType = 'object';\n $request = $this->quotesV2PutRequest($id2, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology, $id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function __query($index, $type = null, array $query = []) {\n $result = $this->client->search([\n 'index' => $index,\n 'body' => array_merge_recursive($query, $this->additionalQuery())\n ] + ($type ? ['type' => $type] : []));\n return $this->_makeResult($result);\n }"
] | [
"0.5199817",
"0.5117006",
"0.5052499",
"0.4971322",
"0.49484226",
"0.48501843",
"0.47115993",
"0.47038788",
"0.46647918",
"0.4631408",
"0.4568861",
"0.4533134",
"0.45271063",
"0.45238277",
"0.45238277",
"0.45238277",
"0.45238277",
"0.45238277",
"0.45238277",
"0.44802204",
"0.4458522",
"0.44386858",
"0.44355777",
"0.4416769",
"0.43821782",
"0.43678743",
"0.4336232",
"0.43106294",
"0.42546925",
"0.42489848"
] | 0.5814468 | 0 |
Create request for operation 'complexAugment' | public function complexAugmentRequest($payload, string $contentType = self::contentTypes['complexAugment'][0])
{
// verify the required parameter 'payload' is set
if ($payload === null || (is_array($payload) && count($payload) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $payload when calling complexAugment'
);
}
$resourcePath = '/augment/complex-chain/docs';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$headers = $this->headerSelector->selectHeaders(
['application/json', ],
$contentType,
$multipart
);
// for model (json/xml)
if (isset($payload)) {
if (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the body
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));
} else {
$httpBody = $payload;
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'POST',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function memorylessAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public abstract function generateRequestObject();",
"abstract public function buildRequest();",
"public function memoryfullAugmentRequest($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memoryfullAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memoryfullAugment'\n );\n }\n\n\n\n\n $resourcePath = '/augment/memoryfull/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAsyncAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAsyncAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/async/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function eventGetAdHocSchemaRequest()\n {\n\n $resourcePath = '/Event/$adHocSchema';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"function AddComplex($server)\n {\n\n $server->wsdl->addComplexType(\n 'listaHistorial',\n 'complexType',\n 'struct',\n 'all',\n '',\n array(\n 'actividad' => array('name' => 'actividad', 'type' => 'xsd:string'),\n 'fechaFin' => array('name' => 'fechaFin', 'type' => 'xsd:string'),\n 'fechaInicio' => array('name' => 'fechaInicio', 'type' => 'xsd:string'),\n 'id' => array('name' => 'id', 'type' => 'xsd:integer'),\n 'mensaje' => array('name' => 'mensaje', 'type' => 'xsd:string'),\n 'userName' => array('name' => 'userName', 'type' => 'xsd:string'),\n 'usuario' => array('name' => 'usuario', 'type' => 'xsd:string'),\n 'workflowOrigen' => array('name' => 'workflowOrigen', 'type' => 'xsd:string')\n )\n );\n\n $server->wsdl->addComplexType(\n 'arraylistaHistorial',\n 'complexType',\n 'array',\n '',\n 'SOAP-ENC:Array',\n array(),\n array(\n array(\n 'ref' => 'SOAP-ENC:arrayType',\n 'wsdl:arrayType' => 'tns:listaHistorial[]'\n )\n ),\n 'tns:listaHistorial'\n );\n\n $server->wsdl->addComplexType(\n 'arrayString',\n 'complexType',\n 'array',\n '',\n 'SOAP-ENC:Array',\n array(),\n array(\n array(\n 'ref' => 'SOAP-ENC:arrayType',\n 'wsdl:arrayType' => 'xsd:string[]'\n )\n ),\n 'xsd:string'\n );\n\n\n $server->wsdl->addComplexType(\n 'documentoDetalle',\n 'complexType',\n 'struct',\n 'all',\n '',\n array(\n \"datosPropios\" => array(\"name\" => \"datosPropios\", \"type\" => \"tns:arrayString\"),\n \"fechaCreacion\" => array(\"name\" => \"fechaCreacion\", \"type\" => \"xsd:string\"),\n \"listaArchivosDeTrabajo\" => array(\"name\" => \"listaArchivosDeTrabajo\", \"type\" => \"tns:arrayString\"),\n \"listaFirmantes\" => array(\"name\" => \"listaFirmantes\", \"type\" => \"tns:arrayString\"),\n \"listaHistorial\" => array(\"name\" => \"listaHistorial\", \"type\" => \"tns:arraylistaHistorial\"),\n \"numeroEspecial\" => array(\"name\" => \"numeroEspecial\", \"type\" => \"xsd:string\"),\n \"numeroSade\" => array(\"name\" => \"numeroSade\", \"type\" => \"xsd:string\"),\n \"puedeVerDocumento\" => array(\"name\" => \"puedeVerDocumento\", \"type\" => \"xsd:boolean\"),\n \"referencia\" => array(\"name\" => \"referencia\", \"type\" => \"xsd:string\"),\n \"tipoDocumento\" => array(\"name\" => \"tipoDocumento\", \"type\" => \"xsd:string\"),\n \"urlArchivo\" => array(\"name\" => \"urlArchivo\", \"type\" => \"xsd:string\")\n \n )\n );\n return;\n }",
"static function addComplexType($server, $complexName=null)\n\t{\n\t\t\n\t\t$types = array();\n\t\t$types['AccessToken'] = array(\n\t\t\t\t'AccessToken',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'all',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'result' => array('name' => 'Result', 'type' => 'xsd:int'),\n\t\t\t \t'token' => array('name' => 'Token', 'type' => 'xsd:string')\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\n\t\t$types['ExecutionToken'] =array(\n\t\t\t\t'ExecutionToken',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'all',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'token' => array('name' => 'token', 'type' => 'xsd:string'),\n\t\t\t \t'random' => array('name' => 'random', 'type' => 'xsd:string'),\n\t\t\t \t'datetime' => array('name' => 'datetime', 'type' => 'xsd:dateTime')\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['ResultToken']=array(\n\t\t\t\t'ResultToken',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'all',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'status' => array('name' => 'status', 'type' => 'xsd:int'), //0 - fail //1 - success\n\t\t\t \t'token' => array('name' => 'token', 'type' => 'xsd:string'),\n\t\t\t \t'random' => array('name' => 'random', 'type' => 'xsd:string'),\n\t\t\t \t'datetime' => array('name' => 'datetime', 'type' => 'xsd:dateTime')\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['EducationLevel']=array(\n\t\t\t 'EducationLevel',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\n\t\t$types['EducationLevels']= array(\n\t\t\t\t'EducationLevel',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:EducationLevel[]')\n\t\t \t\t),\n\t\t \t\t'tns:EducationLevel',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['EducationDegree']=array(\n\t\t\t 'EducationDegree',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['EducationDegrees'] = array(\n\t\t\t\t'EducationDegrees',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:EducationDegree[]')\n\t\t \t\t),\n\t\t \t\t'tns:EducationDegree',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['Service']=array(\n\t\t\t 'Service',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'type' => array('name' => 'Type', 'type' => 'xsd:int'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\n\t\t\n\t\t$types['Services'] = array(\n\t\t\t\t'Services',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Service[]')\n\t\t \t\t),\n\t\t \t\t'tns:Service',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['Accreditation']=array(\n\t\t\t 'Accreditation',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Accreditations'] = array(\n\t\t\t\t'Accreditations',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Accreditation[]')\n\t\t \t\t),\n\t\t \t\t'tns:Accreditation',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['EducationCourse'] = array(\n\t\t\t 'EducationCourse',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['EducationCourses'] = array(\n\t\t\t\t'EducationCourses',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:EducationCourse[]')\n\t\t \t\t),\n\t\t \t\t'tns:EducationCourse',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['Profession']=array(\n\t\t\t 'Profession',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'description' => array('name' => 'Description', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Professions'] = array(\n\t\t\t\t'Professions',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Profession[]')\n\t\t \t\t),\n\t\t \t\t'tns:Profession',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['EducationCourseProfession']=array(\n\t\t\t 'EducationCourseProfession',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'EducationCourse'=> array('name' => 'EducationCourse', 'type' => 'tns:EducationCourse'),\n\t\t\t \t'Profession'=> array('name' => 'Profession', 'type' => 'tns:Profession'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['EducationCourseProfessions']= array(\n\t\t\t\t'EducationCourseProfessions',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:EducationCourseProfession[]')\n\t\t \t\t),\n\t\t \t\t'tns:EducationCourseProfession',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['Industry']=array(\n\t\t\t 'Industry',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'description' => array('name' => 'Description', 'type' => 'xsd:string'),\n\t\t\t \t'health_risk_rating' => array('name' => 'HealthRiskRating','type'=>'xsd:int'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Industries']= array(\n\t\t\t\t'Industries',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Industry[]')\n\t\t \t\t),\n\t\t \t\t'tns:Industry',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['StreetCode']=array(\n\t\t\t 'StreetCode',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Address']=array(\n\t\t\t 'Address',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'floor' => array('name' => 'Floor', 'type' => 'xsd:string'),\n\t\t\t \t'unit' => array('name' => 'Unit', 'type' => 'xsd:string'),\n\t\t\t \t'building_apartment' => array('name' => 'BuildingApartment', 'type' => 'xsd:string'),\n\t\t\t \t'street_number' => array('name' => 'StreetNumber','type'=>'xsd:string'),\n\t\t\t \t'street_id' => array('name' => 'StreetId','type'=>'xsd:long'),\n\t\t\t \t'lot' => array('name' => 'Lot','type'=>'xsd:string'),\n\t\t\t \t'block' => array('name' => 'Block','type'=>'xsd:string'),\n\t\t\t \t'StreetCode' => array('name' => 'StreetCode', 'type' => 'tns:StreetCode'),\n\t\t\t \t'village_id' => array('name' => 'VillageId','type'=>'xsd:long'),\n\t\t\t \t'town_city_id' => array('name' => 'TownCityId','type'=>'xsd:long'),\n\t\t\t \t'province_state_id' => array('name' => 'ProvinceStateId','type'=>'xsd:long'),\n\t\t\t \t'country_id' => array('name' => 'CountryId','type'=>'xsd:long'),\n\t\t\t \t'longitude' => array('name' => 'Longitude','type'=>'xsd:decimal'),\n\t\t\t \t'latitude' => array('name' => 'Latitude','type'=>'xsd:decimal'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Addresses']=array(\n\t\t\t\t'Addresses',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Address[]')\n\t\t \t\t),\n\t\t \t\t'tns:Address',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['IdentificationType']=array(\n\t\t\t 'IdentificationType',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'internal_id' => array('name' => 'InternalId', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'description' => array('name' => 'Description', 'type' => 'xsd:string'),\n\t\t\t \t'type' => array('name' => 'StreetNumber','type'=>'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['IdentificationTypes']=array(\n\t\t\t\t'IdentificationTypes',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:IdentificationType[]')\n\t\t \t\t),\n\t\t \t\t'tns:IdentificationType',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['ContactInformation']=array(\n\t\t\t 'ContactInformation',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'type' => array('name' => 'Floor', 'type' => 'xsd:int'),\n\t\t\t \t'contact' => array('name' => 'Contact', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['ContactInformations']=array(\n\t\t\t\t'ContactInformations',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:ContactInformation[]')\n\t\t \t\t),\n\t\t \t\t'tns:ContactInformation',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['Company']=array(\n\t\t\t\t'Company',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'type' => array('name' => 'type', 'type' => 'xsd:int'), //1 - single, 2 - partnership, 3 - corporation\n\t\t\t \t'Industry' => array('name' => 'Industry', 'type' => 'tns:Industry'),\n\t\t\t \t'website' => array('name' => 'Website', 'type' => 'xsd:string'),\n\t\t\t \t'logo' => array('name' => 'Logo', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Companies']=array(\n\t\t\t\t'Companies',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Company[]')\n\t\t \t\t),\n\t\t \t\t'tns:Company',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranch']=array(\n\t\t\t\t'CompanyBranch',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'Company' => array('name' => 'Company', 'type' => 'tns:Company'),\n\t\t\t \t'Laboratory' => array('name' => 'Laboratory', 'type' => 'tns:Laboratory'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranches']=array(\n\t\t\t\t'CompanyBranches',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:CompanyBranch[]')\n\t\t \t\t),\n\t\t \t\t'tns:CompanyBranch',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchInfo']=array(\n\t\t\t\t'CompanyBranchInfo',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyBranch' => array('name' => 'CompanyBranch', 'type' => 'tns:CompanyBranch'),\n\t\t\t \t'logo' => array('name' => 'Logo', 'type' => 'xsd:string'),\n\t\t\t\t\t'mission' => array('name' => 'Mission', 'type' => 'xsd:string'),\n\t\t\t \t'vision' => array('name' => 'Vision', 'type' => 'xsd:string'),\n\t\t\t \t'website' => array('name' => 'Website', 'type' => 'xsd:string'),\n\t\t\t\t\t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\n\t\t$types['CompanyBranchInfoList']=array(\n\t\t\t\t'CompanyBranchInfoList',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:CompanyBranchInfo[]')\n\t\t \t\t),\n\t\t \t\t'tns:CompanyBranchInfo',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchContactInformation']=array(\n\t\t\t 'CompanyBranchContactInformation',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyBranch' => array('name' => 'CompanyBranch', 'type' => 'tns:CompanyBranch'),\n\t\t\t \t'ContactInformation' => array('name'=>'ContactInformation','type'=>'tns:ContactInformation'),\n\t\t\t\t\t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchContactInformations']=array(\n\t\t\t\t'CompanyBranchContactInformations',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:CompanyBranchContactInformation[]')\n\t\t \t\t),\n\t\t \t\t'tns:CompanyBranchContactInformation',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchAddress']=array(\n\t\t\t 'CompanyBranchAddress',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyBranch' => array('name' => 'CompanyBranch', 'type' => 'tns:CompanyBranch'),\n\t\t\t \t'Address' => array('name'=>'Address','type'=>'tns:Address'),\n\t\t\t\t\t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchAddresses']=array(\n\t\t\t\t'CompanyBranchAddresses',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:CompanyBranchAddress[]')\n\t\t \t\t),\n\t\t \t\t'tns:CompanyBranchAddress',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchOperatingHour']=array(\n\t\t\t 'CompanyBranchOperatingHour',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyBranch' => array('name' => 'CompanyBranch', 'type' => 'tns:CompanyBranch'),\n\t\t\t \t'day' => array('name' => 'Day', 'type' => 'xsd:int'),\n\t\t\t \t'start_time' => array('name' => 'StartIme', 'type' => 'xsd:time'),\n\t\t\t \t'end_time' => array('name' => 'EndTime', 'type' => 'xsd:time'),\n\t\t\t\t\t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchOperatingHours']=array(\n\t\t\t\t'CompanyBranchOperatingHours',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:CompanyBranchOperatingHour[]')\n\t\t \t\t),\n\t\t \t\t'tns:CompanyBranchOperatingHour',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchService']=array(\n\t\t\t 'CompanyBranchService',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyBranch' => array('name' => 'CompanyBranch', 'type' => 'tns:CompanyBranch'),\n\t\t\t \t'Service' => array('name'=>'Service','type'=>'tns:Service'),\n\t\t\t\t\t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchServices']=array(\n\t\t\t\t'CompanyBranchServices',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:CompanyBranchService[]')\n\t\t \t\t),\n\t\t \t\t'tns:CompanyBranchService',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchAccreditation']=array(\n\t\t\t 'CompanyBranchAccreditation',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyBranch' => array('name' => 'CompanyBranch', 'type' => 'tns:CompanyBranch'),\n\t\t\t \t'Accreditation' => array('name'=>'Accreditation','type'=>'tns:Accreditation'),\n\t\t\t \t'accreditation_id' => array('name'=>'AccreditationId','type'=>'xsd:long'),\n\t\t\t \t'accreditation_number' => array('name' => 'AccreditationNumber', 'type' => 'xsd:string'),\n\t\t\t \t'accreditation_date' => array('name' => 'AccreditationDate', 'type' => 'xsd:dateTime'),\n\t\t\t \t'accreditation_renewal_date' => array('name' => 'AccreditationRenewalDate', 'type' => 'xsd:dateTime'),\n\t\t\t \t'accreditation_expiration_date' => array('name' => 'AccreditationExpirationDate', 'type' => 'xsd:dateTime'),\n\t\t\t\t\t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchAccreditations']=array(\n\t\t\t\t'CompanyBranchAccreditations',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:CompanyBranchAccreditation[]')\n\t\t \t\t),\n\t\t \t\t'tns:CompanyBranchAccreditation',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['User']=array(\n\t\t\t\t'User',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'username' => array('name' => 'Username', 'type' => 'xsd:string'),\n\t\t\t \t'password' => array('name' => 'Password', 'type' => 'xsd:string'),\n\t\t\t \t'role' => array('name' => 'Role', 'type' => 'xsd:int'),\n\t\t\t \t'last_login_datetime' => array('name' => 'LastLoginDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t\t\t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'PersonIdentity' => array('type'=>'tns:PersonIdentities'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Person']=array(\n\t\t\t\t'Person',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'myresultonline_id' => array('name' => 'MyresulonlineId', 'type' => 'xsd:string'),\n\t\t\t \t'title_id' => array('name' => 'TitleId', 'type' => 'xsd:long'),\n\t\t\t \t'lastname' => array('name' => 'Lastname', 'type' => 'xsd:string'),\n\t\t\t \t'firstname' => array('name' => 'Firstname', 'type' => 'xsd:string'),\n\t\t\t \t'middlename' => array('name' => 'Middlename', 'type' => 'xsd:string'),\n\t\t\t \t'maidenname' => array('name' => 'Maidenname', 'type' => 'xsd:string'),\n\t\t\t \t'nickname' => array('name' => 'Maidenname', 'type' => 'xsd:string'),\n\t\t\t \t'suffix_id' => array('name' => 'SuffixId', 'type' => 'xsd:long'),\n\t\t\t \t'birthdate' => array('name' => 'Birthdate', 'type' => 'xsd:dateTime'),\n\t\t\t \t'sex' => array('name' => 'Sex', 'type' => 'xsd:string'),\n\t\t\t \t'marital_status' => array('name' => 'MaritalStatus', 'type' => 'xsd:string'),\n\t\t\t \t'father_person_id' => array('name' => 'FatherPersonId', 'type' => 'xsd:long'),\n\t\t\t \t'mother_person_id' => array('name' => 'MotherPersonId', 'type' => 'xsd:long'),\n\t\t\t \t'living_status' => array('name' => 'LivingStatus', 'type' => 'xsd:int'),\n\t\t\t \t'record_status' => array('name' => 'RecordStatus', 'type' => 'xsd:int'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'checksum' => array('name' => 'Checksum', 'type' => 'xsd:string')\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['People']=array(\n\t\t\t\t'People',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Person[]')\n\t\t \t\t),\n\t\t \t\t'tns:Person',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['PersonIdentity']=array(\n\t\t\t 'PersonIdentity',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'users_id' => array('name' => 'UsersId', 'type' => 'xsd:long'),\n\t\t\t \t'User' => array('name' => 'User', 'type' => 'tns:User'),\n\t\t\t \t'person_id' => array('name' => 'PersonId', 'type' => 'xsd:long'),\n\t\t\t \t'Person' => array('name' => 'Person', 'type' => 'tns:Person'),\n\t\t\t \t'default' => array('name' => 'Default', 'type' => 'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PersonIdentities']=array(\n\t\t\t\t'PersonIdentities',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:PersonIdentity[]')\n\t\t \t\t),\n\t\t \t\t'tns:PersonIdentity',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['PersonIdentification']=array(\n\t\t\t 'PersonIdentification',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'Person' => array('name' => 'Person', 'type' => 'tns:Person'),\n\t\t\t \t'IdentificationType' => array('name' => 'IdentificationType', 'type' => 'tns:IdentificationType'),\n\t\t\t \t'expiration_date' => array('name' => 'ExpirationDate', 'type' => 'xsd:dateTime'),\n\t\t\t \t'reference_number' => array('name' => 'ReferenceNumber', 'type' => 'xsd:string'),\n\t\t\t \t'remarks' => array('name' => 'ReferenceNumber', 'type' => 'xsd:string'),\n\t\t\t \t'image' => array('name' => 'ReferenceNumber', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PersonIdentifications']=array(\n\t\t\t\t'PersonIdentifications',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:PersonIdentification[]')\n\t\t \t\t),\n\t\t \t\t'tns:PersonIdentification',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['PersonAddress']=array(\n\t\t\t 'PersonAddress',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'person_id' => array('name' => 'PersonId', 'type' => 'xsd:long'),\n\t\t\t \t'Person' => array('name' => 'Person', 'type' => 'tns:Person'),\n\t\t\t \t'address_id' => array('name' => 'PersonId', 'type' => 'xsd:long'),\n\t\t\t \t'Address' => array('name' => 'Address', 'type' => 'tns:Address'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PersonAddresses']=array(\n\t\t\t\t'PersonAddresses',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:PersonAddress[]')\n\t\t \t\t),\n\t\t \t\t'tns:PersonAddress',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['Patient']=array(\n\t\t\t\t'Patient',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'internal_id' => array('name' => 'InternalId', 'type' => 'xsd:string'),\n\t\t\t \t'person_id' => array('name' => 'PersonId', 'type' => 'xsd:long'),\n\t\t\t \t'registered_date' => array('name' => 'RegisteredDate', 'type' => 'xsd:string'),\n\t\t\t \t'registered_time' => array('name' => 'RegisteredTime', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'checksum' => array('name' => 'Checksum', 'type' => 'xsd:string')\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Patients']=array(\n\t\t\t\t'Patients',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Patient[]')\n\t\t \t\t),\n\t\t \t\t'tns:Patient',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['School']=array(\n\t\t\t 'School',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyBranch' => array('name' => 'Id', 'type' => 'tns:CompanyBranch'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'Address' => array('name'=>'Address','type'=>'tns:Address'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Schools']=array(\n\t\t\t\t'Schools',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:School[]')\n\t\t \t\t),\n\t\t \t\t'tns:School',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['PersonEducationalBackground']=array(\n\t\t\t 'PersonEducationalBackground',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'Person' => array('name' => 'Person', 'type' => 'tns:Person'),\n\t\t\t \t'School'=> array('name' => 'Id', 'type' => 'tns:School'),\n\t\t\t \t'start_date_coverage' => array('name' => 'StartDateCoverage', 'type' => 'xsd:dateTime'),\n\t\t\t \t'end_date_coverage' => array('name' => 'EndDateCoverage', 'type' => 'xsd:dateTime'),\n\t\t\t \t'education_level_id' => array('name' => 'EducationLevelId', 'type' => 'xsd:long'),\n\t\t\t \t'education_degree_id' => array('name' => 'EducationDegreeId', 'type' => 'xsd:long'),\n\t\t\t \t'education_major_id' => array('name' => 'EducationMajorId', 'type' => 'xsd:long'),\n\t\t\t \t'education_minor_id' => array('name' => 'EducationMinorId', 'type' => 'xsd:long'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PersonEducationalBackgrounds']=array(\n\t\t\t\t'PersonEducationalBackgrounds',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:PersonEducationalBackground[]')\n\t\t \t\t),\n\t\t \t\t'tns:PersonEducationalBackground',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['PersonAlias']=array(\n\t\t\t 'PersonAlias',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'Person' => array('name' => 'Person', 'type' => 'tns:Person'),\n\t\t\t \t'PersonAlias' => array('name' => 'PersonAlias', 'type' => 'tns:Person'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PersonAliases']=array(\n\t\t\t\t'PersonAliases',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:PersonAlias[]')\n\t\t \t\t),\n\t\t \t\t'tns:PersonAlias',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['PersonContactInformation']=array(\n\t\t\t 'PersonContactInformation',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'person_id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'Person' => array('name'=>'Person','type'=>'tns:Person'),\n\t\t\t \t'contact_id' => array('name' => 'ContactId', 'type' => 'xsd:long'),\n\t\t\t \t'ContactInformation' => array('name'=>'ContactInformation','type'=>'tns:ContactInformation'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PersonContactInformations']=array(\n\t\t\t\t'PersonContactInformations',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:PersonContactInformation[]')\n\t\t \t\t),\n\t\t \t\t'tns:PersonContactInformation',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t\t//Todo: Insurance Provider Product\n\t\t\t//Todo: Insurance Provider\n\t\t$types['PersonInsurance']=array(\n\t\t\t 'PersonInsurance',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'person_id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'insurance_provider_product_id' => array('name'=>'InsuranceProviderProductId','type'=>'xsd:long'),\n\t\t\t \t'insurance_number' => array('name'=>'InsuranceNumber','type'=>'xsd:string'),\n\t\t\t \t'effectivity_date' => array('name'=>'EffectivityDate','type'=>'xsd:dateTime'),\n\t\t\t \t'expiration_date' => array('name'=>'ExpirationDate','type'=>'xsd:dateTime'),\n\t\t\t \t'limit_details' => array('name'=>'LimitDetails','type'=>'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PersonInsurances']=array(\n\t\t\t\t'PersonInsurances',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:PersonInsurance[]')\n\t\t \t\t),\n\t\t \t\t'tns:PersonInsurance',\n\t\t \t\tnull\n\t\t\t);\n\t\t\n\t\t$types['PersonMark']=array(\n\t\t\t\t'PersonMark',\n\t\t\t\t'complexType',\n\t\t\t\t'struct',\n\t\t\t\t'sequence',\n\t\t\t\t'',\n\t\t\t\tarray(\n\t\t\t\t\t\t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t\t\t\t'person_id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t\t\t\t'type' => array('name' => 'Type', 'type' => 'xsd:int'),\n\t\t\t\t\t\t'finger' => array('name' => 'Finger', 'type' => 'xsd:int'),\n\t\t\t\t\t\t'description' => array('name'=>'Description','type'=>'xsd:string'),\n\t\t\t\t\t\t'filename' => array('name'=>'Filename','type'=>'xsd:string'),\n\t\t\t\t\t\t'default' => array('name' => 'Default', 'type' => 'xsd:boolean'),\n\t\t\t\t\t\t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t\t\t\t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t\t\t\t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t\t\t\t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t\t),\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t);\n\t\t\t\n\t\t$types['PersonMarks']=array(\n\t\t\t\t'PersonMarks',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t\t\tarray(),\n\t\t\t\tarray(\n\t\t\t\t\t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:PersonMark[]')\n\t\t\t\t),\n\t\t\t\t'tns:PersonMark',\n\t\t\t\tnull\n\t\t);\n\t\t\n\t\t$types['PersonMarkImage']=array(\n\t\t\t\t'PersonMarkImage',\n\t\t\t\t'complexType',\n\t\t\t\t'struct',\n\t\t\t\t'sequence',\n\t\t\t\t'',\n\t\t\t\tarray(\n\t\t\t\t\t\t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t\t\t\t'part' => array('name' => 'Id', 'type' => 'xsd:int'),\n\t\t\t\t\t\t'image' => array('name'=>'Filename','type'=>'xsd:string'),\n\t\t\t\t),\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t);\n\t\t\t\n\t\t$types['PersonDetail']=array(\n\t\t\t 'PersonDetail',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'PersonAddress' => array('name'=>'person_addresses','type'=>'tns:PersonAddresses'),\n\t\t\t \t'PersonContactInformation' => array('name'=>'person_contact_informations','type'=>'tns:PersonContactInformations'),\n\t\t\t \t'PersonIdentification' => array('name'=>'person_identifications','type'=>'tns:PersonIdentifications'),\n\t\t\t \t'PersonInsurance' => array('name'=>'person_insurances','type'=>'tns:PersonInsurances'),\n\t\t\t \t'PersonMark' => array('name'=>'person_marks','type'=>'tns:PersonMarks'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PersonDetails']=array(\n\t\t\t\t'PersonDetails',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:PersonDetail[]')\n\t\t \t\t),\n\t\t \t\t'tns:PersonDetail',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['UserIdentities']=array(\n\t\t\t\t'UserIdentities',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'PersonIdentity' => array('type'=>'tns:PersonIdentities'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchMember']=array(\n\t\t\t\t'CompanyBranchMember',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name'=>'Id','type'=>'xsd:long'),\n\t\t\t \t'company_branch_id' => array('name' => 'CompanyBranchId', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyBranch' => array('name' => 'CompanyBranch', 'type' => 'tns:CompanyBranch'),\n\t\t\t \t'users_id' => array('name' => 'UsersId', 'type' => 'xsd:long'),\n\t\t\t \t'User' => array('name' => 'User', 'type' => 'tns:User'),\n\t\t\t \t'role' => array('name' => 'Username', 'type' => 'xsd:int'),\n\t\t\t \t'enabled' => array('name' => 'Enabled', 'type' => 'xsd:boolean'),\n\t\t\t\t\t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyBranchMembers']=array(\n\t\t\t\t'CompanyBranchMembers',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:CompanyBranchMember[]')\n\t\t \t\t),\n\t\t \t\t'tns:CompanyBranchMember',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['Laboratory']=array(\n\t\t\t\t'Laboratory',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyBranch'=> array('name' => 'CompanyBranch', 'type' => 'tns:CompanyBranch'),\n\t\t\t \t'type' => array('name' => 'Type', 'type' => 'xsd:int'),\n\t\t\t \t'class' => array('name' => 'Class', 'type' => 'xsd:int'),\n\t\t\t \t'status' => array('name' => 'Username', 'type' => 'xsd:int'),\n\t\t\t\t\t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Laboratories']=array(\n\t\t\t\t'Laboratories',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Laboratory[]')\n\t\t \t\t),\n\t\t \t\t'tns:Laboratory',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryAcceptedInsurance']=array(\n\t\t\t 'LaboratoryAcceptedInsurance',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'insurance_provider_product_id' => array('name' => 'InsuranceProviderProductId', 'type' => 'xsd:long'),\n\t\t\t \t'remarks' => array('name' => 'Remarks', 'type' => 'xsd:string'),\n\t\t\t \t'validity_start_date' => array('name' => 'ValidityStartDate', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validity_end_date' => array('name' => 'ValidityEndDate', 'type' => 'xsd:dateTime'),\n\t\t\t \t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryAcceptedInsurances']=array(\n\t\t\t\t'LaboratoryAcceptedInsurances',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryAcceptedInsurance[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryAcceptedInsurance',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyDetail']=array(\n\t\t\t 'CompanyDetail',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyBranchInfo' => array('name'=>'CompanyBranchServices','type'=>'tns:CompanyBranchInfo'),\n\t\t\t \t'CompanyBranchAddress' => array('name'=>'CompanyBranchAddress','type'=>'tns:CompanyBranchAddresses'),\n\t\t\t \t'CompanyBranchContactInformation' => array('name'=>'CompanyBranchContactInfomation','type'=>'tns:CompanyBranchContactInformations'),\n\t\t\t \t'CompanyBranchService' => array('name'=>'CompanyBranchServices','type'=>'tns:CompanyBranchServices'),\n\t\t\t \t'CompanyBranchOperatingHour' => array('name'=>'CompanyBranchServices','type'=>'tns:CompanyBranchOperatingHours'),\n\t\t\t \t'CompanyBranchAccreditation' => array('name'=>'CompanyBranchServices','type'=>'tns:CompanyBranchAccreditations'),\n\t\t\t \t//'LaboratoryAcceptedInsurance' => array('name'=>'LaboratoryAcceptedInsurance','type'=>'tns:LaboratoryAcceptedInsurances'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['CompanyDetails']=array(\n\t\t\t\t'CompanyDetails',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:CompanyDetail[]')\n\t\t \t\t),\n\t\t \t\t'tns:CompanyDetail',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryDetail']=array(\n\t\t\t 'LaboratoryDetail',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'CompanyDetail'=>array('Name'=>'CompanyDetail','type' => 'tns:CompanyDetail')\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryDetails']=array(\n\t\t\t\t'LaboratoryDetails',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryDetail[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryDetail',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['UserResult']=array(\n\t\t\t 'UserResult',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'ResultToken' => array('name' => 'ResultToken', 'type' => 'tns:ResultToken'),\n\t\t\t \t'User' => array('name' => 'User', 'type' => 'tns:User'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['UserIdentitiesResult']=array(\n\t\t\t 'UserIdentitiesResult',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'ResultToken' => array('name' => 'ResultToken', 'type' => 'tns:ResultToken'),\n\t\t\t \t'UserIdentities' => array('name' => 'User', 'type' => 'tns:UserIdentities'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PersonResult']=array(\n\t\t\t 'PersonResult',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'ResultToken' => array('name' => 'ResultToken', 'type' => 'tns:ResultToken'),\n\t\t\t \t'Person' => array('name' => 'Person', 'type' => 'tns:Person'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PersonDetailResult']=array(\n\t\t\t 'PersonDetailResult',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'ResultToken' => array('name' => 'ResultToken', 'type' => 'tns:ResultToken'),\n\t\t\t \t'PersonDetail' => array('name' => 'PersonDetail', 'type' => 'tns:PersonDetail'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['MembershipsResult']=array(\n\t\t\t 'MembershipsResult',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'ResultToken' => array('name' => 'ResultToken', 'type' => 'tns:ResultToken'),\n\t\t\t \t'CompanyBranchMembers' => array('name' => 'CompanyBranchMembers', 'type' => 'tns:CompanyBranchMembers'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryResult']=array(\n\t\t\t 'LaboratoryResult',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'ResultToken' => array('name' => 'ResultToken', 'type' => 'tns:ResultToken'),\n\t\t\t \t'Laboratory' => array('name' => 'Laboratory', 'type' => 'tns:Laboratory'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryDetailResult']=array(\n\t\t\t 'LaboratoryDetailResult',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'ResultToken' => array('name' => 'ResultToken', 'type' => 'tns:ResultToken'),\n\t\t\t \t'LaboratoryDetail' => array('name' => 'LaboratoryDetail', 'type' => 'tns:LaboratoryDetail'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t\n\n\t\t$types['BeginLimPosting']=array(\n\t\t\t 'BeginLimPosting',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'session_id' => array('name' => 'SessionId', 'type' => 'xsd:string'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['BeginLimPostingResult']=array(\n\t\t\t 'BeginLimPostingResult',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'ResultToken' => array('name' => 'ResultToken', 'type' => 'tns:ResultToken'),\n\t\t\t \t'BeginLimPosting' => array('name' => 'BeginLimPosting', 'type' => 'tns:BeginLimPosting'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t\n\t\t$types['EndResultPosting']=array(\n\t\t\t 'EndResultPosting',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:string'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\n\t\t$types['EndLimPostingResult']=array(\n\t\t\t 'EndLimPostingResult',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'ResultToken' => array('name' => 'ResultToken', 'type' => 'tns:ResultToken'),\n\t\t\t \t'EndLimPostingResult' => array('name' => 'EndLimPostingResult', 'type' => 'tns:EndLimPostingResult'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Physician']=array(\n\t\t\t 'Physician',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'users_id' => array('name' => 'UsersId', 'type' => 'xsd:long'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Physicians']=array(\n\t\t\t\t'Physicians',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Physician[]')\n\t\t \t\t),\n\t\t \t\t'tns:Physician',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['PhysicianProfile']=array(\n\t\t\t 'PhysicianProfile',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'physician_id' => array('name' => 'PhysicianId', 'type' => 'xsd:long'),\n\t\t\t \t'key_competencies' => array('name' => 'KeyCompetencies', 'type' => 'xsd:string'),\n\t\t\t \t'practice_profile' => array('name' => 'PracticeProfile', 'type' => 'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['PhysicianProfiles']=array(\n\t\t\t\t'PhysicianProfiles',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:PhysicianProfile[]')\n\t\t \t\t),\n\t\t \t\t'tns:PhysicianProfile',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTest']=array(\n\t\t\t 'LaboratoryTest',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'standard_test_id' => array('name' => 'StandardTestId', 'type' => 'xsd:string'),\n\t\t\t \t'laboratory_id' => array('name' => 'LaboratoryId', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'description' => array('name' => 'Description', 'type' => 'xsd:string'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTests']=array(\n\t\t\t\t'LaboratoryTests',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTest[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTest',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestSet']=array(\n\t\t\t 'LaboratoryTestSet',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'laboratory_id' => array('name' => 'LaboratoryId', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'description' => array('name' => 'Description', 'type' => 'xsd:string'),\n\t\t\t \t'default' => array('name' => 'Default','type'=>'xsd:boolean'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestSets']=array(\n\t\t\t\t'LaboratoryTestSets',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTestSet[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTestSet',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestConvertion']=array(\n\t\t\t 'LaboratoryTestConvertion',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'test_set_id' => array('name' => 'TestSetId', 'type' => 'xsd:long'),\n\t\t\t \t'test_id' => array('name' => 'TestId', 'type' => 'xsd:long'),\n\t\t\t \t'unit_type' => array('name' => 'UnitType', 'type' => 'xsd:int'),\n\t\t\t \t'si_convertion_factor' => array('name' => 'SiConvertionFactor', 'type' => 'xsd:decimal'),\n\t\t\t \t'conventional_convertion_factor' => array('name' => 'ConventionalConvertionFactor', 'type' => 'xsd:decimal'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestConvertions']=array(\n\t\t\t\t'LaboratoryTestConvertions',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTestConvertion[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTestConvertion',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestReferenceRange']=array(\n\t\t\t 'LaboratoryTestReferenceRange',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'test_set_id' => array('name' => 'TestSetId', 'type' => 'xsd:long'),\n\t\t\t \t'test_id' => array('name' => 'TestId', 'type' => 'xsd:long'),\n\t\t\t \t'sex' => array('name' => 'Sex', 'type' => 'xsd:string'),\n\t\t\t \t'start_age' => array('name' => 'StartAge', 'type' => 'xsd:decimal'),\n\t\t\t \t'end_age' => array('name' => 'EndAge', 'type' => 'xsd:decimal'),\n\t\t\t \t'si_reference_range' => array('name' => 'SiReferenceRange', 'type' => 'xsd:string'),\n\t\t\t \t'si_unit' => array('name' => 'SiUnit', 'type' => 'xsd:string'),\n\t\t\t \t'conventional_reference_range' => array('name' => 'ConventionalReferenceRange', 'type' => 'xsd:string'),\n\t\t\t \t'conventional_unit' => array('name' => 'ConventionalUnit', 'type' => 'xsd:string'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestReferenceRanges']=array(\n\t\t\t\t'LaboratoryTestReferenceRanges',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTestReferenceRange[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTestReferenceRange',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestInterpretation']=array(\n\t\t\t 'LaboratoryTestInterpretation',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'test_set_id' => array('name' => 'TestSetId', 'type' => 'xsd:long'),\n\t\t\t \t'test_id' => array('name' => 'TestId', 'type' => 'xsd:long'),\n\t\t\t \t'sex' => array('name' => 'Sex', 'type' => 'xsd:string'),\n\t\t\t \t'age_condition' => array('name' => 'AgeCondition', 'type' => 'xsd:int'),\n\t\t\t \t'start_age' => array('name' => 'StartAge', 'type' => 'xsd:decimal'),\n\t\t\t \t'end_age' => array('name' => 'EndAge', 'type' => 'xsd:decimal'),\n\t\t\t \t'start_result' => array('name' => 'StartResult', 'type' => 'xsd:decimal'),\n\t\t\t \t'end_result' => array('name' => 'EndResult', 'type' => 'xsd:decimal'),\n\t\t\t \t'user_cut_off' => array('name' => 'UseCutOff', 'type' => 'xsd:boolean'),\n\t\t\t \t'cut_off_value' => array('name' => 'CutOffValue', 'type' => 'xsd:decimal'),\n\t\t\t \t'flag' => array('name' => 'Flag', 'type' => 'xsd:string'),\n\t\t\t \t'web_patient_viewable' => array('name' => 'WebPatientViewable', 'type' => 'xsd:boolean'),\n\t\t\t \t'web_physician_viewable' => array('name' => 'WebPhysicianViewable', 'type' => 'xsd:boolean'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestInterpretations']=array(\n\t\t\t\t'LaboratoryTestInterpretations',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTestInterpretation[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTestInterpretation',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestGroup']=array(\n\t\t\t 'LaboratoryTestGroup',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'standard_test_group_id' => array('name' => 'StandardTestGroupId', 'type' => 'xsd:string'),\n\t\t\t \t'laboratory_id' => array('name' => 'LaboratoryId', 'type' => 'xsd:long'),\n\t\t\t \t'internal_id' => array('name' => 'InternalId', 'type' => 'xsd:string'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'description' => array('name' => 'Description', 'type' => 'xsd:string'),\n\t\t\t \t'primary' => array('name' => 'Primary','type'=>'xsd:boolean'),\n\t\t\t \t'primary_test_group_id' => array('name' => 'PrimaryTestGroupId', 'type' => 'xsd:long'),\n\t\t\t \t'default' => array('name' => 'Default','type'=>'xsd:boolean'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestGroups']=array(\n\t\t\t\t'LaboratoryTestGroups',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTestGroup[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTestGroup',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestGroupPrice']=array(\n\t\t\t 'LaboratoryTestGroupPrice',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'test_group_id' => array('name' => 'TestGroupId', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'description' => array('name' => 'Description', 'type' => 'xsd:string'),\n\t\t\t \t'priority' => array('name' => 'Priority', 'type' => 'xsd:int'),\n\t\t\t \t'validity_start_datetime' => array('name' => 'ValidityStartDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validity_end_datetime' => array('name' => 'ValidityEndDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'price' => array('name' => 'Price','type'=>'xsd:decimal'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestGroupPrices']=array(\n\t\t\t\t'LaboratoryTestGroupPrices',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTestGroupPrice[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTestGroupPrice',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestGroupDetail']=array(\n\t\t\t 'LaboratoryTestGroupDetail',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'test_group_id' => array('name' => 'TestGroupId', 'type' => 'xsd:long'),\n\t\t\t \t'test_id' => array('name' => 'TestId', 'type' => 'xsd:long'),\n\t\t\t \t'specimen_type' => array('name' => 'SpecimenType', 'type' => 'xsd:int'),\n\t\t\t \t'result_type' => array('name' => 'ResultType', 'type' => 'xsd:int'),\n\t\t\t \t'test_set_id' => array('name' => 'TestSetId', 'type' => 'xsd:long'),\n\t\t\t \t'display_order' => array('name' => 'DisplayOrder', 'type' => 'xsd:int'),\n\t\t\t \t'default' => array('name' => 'Default','type'=>'xsd:boolean'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestGroupDetails']=array(\n\t\t\t\t'LaboratoryTestGroupDetails',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTestGroupDetail[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTestGroupDetail',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPackage']=array(\n\t\t\t 'LaboratoryPackage',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'laboratory_id' => array('name' => 'LaboratoryId', 'type' => 'xsd:long'),\n\t\t\t \t'internal_id' => array('name' => 'InternalId', 'type' => 'xsd:string'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'description' => array('name' => 'Description', 'type' => 'xsd:string'),\n\t\t\t \t'validity_start_datetime' => array('name' => 'ValidityStartDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validity_end_datetime' => array('name' => 'ValidityEndDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'price' => array('name' => 'Price','type'=>'xsd:decimal'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'packages' => array('name' => 'Packages', 'type' => 'xsd:string'),\n\t\t\t \t'validated' => array('name' => 'Validated', 'type' => 'xsd:boolean'),\n\t\t\t \t'validated_datetime' => array('name' => 'ValidatedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'validating_user_id' => array('name' => 'ValidatingUserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPackages']=array(\n\t\t\t\t'Packages',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryPackage[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryPackage',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPackageTestGroup']=array(\n\t\t\t 'LaboratoryPackageTestGroup',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'package_id' => array('name' => 'PackageId', 'type' => 'xsd:long'),\n\t\t\t \t'test_group_id' => array('name' => 'TestGroupId', 'type' => 'xsd:long'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t\t\t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPackageTestGroups']=array(\n\t\t\t\t'LaboratoryPackageTestGroups',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryPackageTestGroup[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryPackageTestGroup',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPackageDetail']=array(\n\t\t\t 'LaboratoryPackageDetail',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'package_test_group_id' => array('name' => 'PackageTestGroupId', 'type' => 'xsd:long'),\n\t\t\t \t'test_id' => array('name' => 'TestId', 'type' => 'xsd:long'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t\t\t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPackageDetails']=array(\n\t\t\t\t'LaboratoryPackageDetails',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryPackageDetail[]')\n\t\t \t\t),\n\t\t \t\t'tns:PackageDetail',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['Discount']=array(\n\t\t\t 'Discount',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'name' => array('name' => 'Name', 'type' => 'xsd:string'),\n\t\t\t \t'text' => array('name' => 'Text', 'type' => 'xsd:string'),\n\t\t\t \t'description' => array('name' => 'Description', 'type' => 'xsd:string'),\n\t\t\t \t'discount' => array('name' => 'Discount','type'=>'xsd:decimal'),\n\t\t\t \t'enabled' => array('name' => 'Enabled','type'=>'xsd:boolean'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['Discounts']=array(\n\t\t\t\t'Discounts',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Discount[]')\n\t\t \t\t),\n\t\t \t\t'tns:Discount',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPatientOrder']=array(\n\t\t\t 'LaboratoryPatientOrder',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'laboratory_id' => array('name' => 'LaboratoryId', 'type' => 'xsd:long'),\n\t\t\t \t'company_branch_id' => array('name' => 'CompanyBranchId', 'type' => 'xsd:long'),\n\t\t\t \t'internal_id' => array('name' => 'InternalId', 'type' => 'xsd:string'),\n\t\t\t \t'patient_id' => array('name' => 'PatientId','type'=>'xsd:long'),\n\t\t\t \t'total_amount_due' => array('name' => 'TotalAmountDue','type'=>'xsd:decimal'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t\t\t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPatientOrders']=array(\n\t\t\t\t'LaboratoryPatientOrders',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryPatientOrder[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryPatientOrder',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t\t\n\t\t$types['LaboratoryPatientBatchOrder']=array(\n\t\t\t 'LaboratoryPatientBatchOrder',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'patient_order_id' => array('name' => 'PatientOrderId', 'type' => 'xsd:long'),\n\t\t\t \t'batch_number' => array('name' => 'BatchNumber', 'type' => 'xsd:int'),\n\t\t\t \t'reference_number' => array('name' => 'ReferenceNumber', 'type' => 'xsd:string'),\n\t\t\t \t'total' => array('name' => 'Total','type'=>'xsd:decimal'),\n\t\t\t \t'vat' => array('name' => 'Vat','type'=>'xsd:decimal'),\n\t\t\t \t'vat_amount' => array('name' => 'VatAmount','type'=>'xsd:decimal'),\n\t\t\t \t'amount_due' => array('name' => 'AmountDue','type'=>'xsd:decimal'),\n\t\t\t \t'requested_date' => array('name' => 'RequestedDate','type'=>'xsd:string'),\n\t\t\t \t'requested_time' => array('name' => 'RequestedTime','type'=>'xsd:string'),\n\t\t\t \t'confirmed' => array('name' => 'Confirmed','type'=>'xsd:boolean'),\n\t\t\t \t'confirmed_date' => array('name' => 'ConfirmedDate','type'=>'xsd:string'),\n\t\t\t \t'confirmed_time' => array('name' => 'ConfirmedTime','type'=>'xsd:string'),\n\t\t\t \t'confirming_user_id' => array('name' => 'ConfirmingUserId','type'=>'xsd:long'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t\t\t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPatientBatchOrders']=array(\n\t\t\t\t'LaboratoryPatientBatchOrders',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryPatientBatchOrder[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryPatientBatchOrder',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPatientBatchOrderDiscount']=array(\n\t\t\t 'LaboratoryPatientBatchOrderDiscount',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'patient_batch_order_id' => array('name' => 'PatientBatchOrderId', 'type' => 'xsd:long'),\n\t\t\t \t'discount_id' => array('name' => 'DiscountId', 'type' => 'xsd:long'),\n\t\t\t \t'discount' => array('name' => 'Discount','type'=>'xsd:decimal'),\n\t\t\t \t'amount' => array('name' => 'Amount','type'=>'xsd:decimal'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPatientBatchOrderDiscounts']=array(\n\t\t\t\t'LaboratoryPatientBatchOrderDiscounts',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryPatientBatchOrderDiscount[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryPatientBatchOrderDiscount',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPatientBatchOrderPackage']=array(\n\t\t\t 'LaboratoryPatientBatchOrderPackage',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'patient_batch_order_id' => array('name' => 'PatientBatchOrderId', 'type' => 'xsd:long'),\n\t\t\t \t'package_id' => array('name' => 'PackageId', 'type' => 'xsd:long'),\n\t\t\t \t'test_group_id' => array('name' => 'TestGroupId', 'type' => 'xsd:long'),\n\t\t\t \t'test_group_price_id' => array('name' => 'TestGroupPriceId', 'type' => 'xsd:long'),\n\t\t\t \t'physician_id' => array('name' => 'PhysicianId', 'type' => 'xsd:long'),\n\t\t\t \t'company_branch_id' => array('name' => 'CompanyBranchId', 'type' => 'xsd:long'),\n\t\t\t \t'price' => array('name' => 'Price','type'=>'xsd:decimal'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t\t\t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPatientBatchOrderPackages']=array(\n\t\t\t\t'LaboratoryPatientBatchOrderPackages',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryPatientBatchOrderPackage[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryPatientBatchOrderPackage',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPatientBatchOrderDetail']=array(\n\t\t\t 'LaboratoryPatientBatchOrderDetail',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'patient_batch_order_package_id' => array('name' => 'PatientBatchOrderPackageId', 'type' => 'xsd:long'),\n\t\t\t \t'test_id' => array('name' => 'TestId', 'type' => 'xsd:long'),\n\t\t\t \t'price' => array('name' => 'Price','type'=>'xsd:decimal'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t\t\t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryPatientBatchOrderDetails']=array(\n\t\t\t\t'LaboratoryPatientBatchOrderDetails',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryPatientBatchOrderDetail[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryPatientBatchOrderDetail',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestOrder']=array(\n\t\t\t 'LaboratoryTestOrder',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'patient_order_id' => array('name' => 'PatientOrderId', 'type' => 'xsd:long'),\n\t\t\t \t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t \t'release_date' => array('name' => 'ReleaseDate','type'=>'xsd:string'),\n\t\t\t \t'release_time' => array('name' => 'ReleaseTime','type'=>'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t\t\t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestOrders']=array(\n\t\t\t\t'LaboratoryTestOrders',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTestOrder[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTestOrder',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestOrderPackage']=array(\n\t\t\t 'LaboratoryTestOrderPackage',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'patient_batch_order_package_id' => array('name' => 'PatientBatchOrderPackageId', 'type' => 'xsd:long'),\n\t\t\t \t'test_order_id' => array('name' => 'TestOrderId', 'type' => 'xsd:long'),\n\t\t\t \t'test_group_id' => array('name' => 'TestGroupId', 'type' => 'xsd:long'),\n\t\t\t \t'supervisor_user_id' => array('name' => 'SupervisorUserId', 'type' => 'xsd:long'),\n\t\t\t \t'technologies_user_id' => array('name' => 'TechnologiesUserId', 'type' => 'xsd:long'),\n\t\t\t \t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t \t'release_date' => array('name' => 'ReleaseDate','type'=>'xsd:string'),\n\t\t\t \t'release_time' => array('name' => 'ReleaseTime','type'=>'xsd:string'),\n\t\t\t \t'remarks' => array('name' => 'Remarks','type'=>'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t\t\t'status' => array('name' => 'Status', 'type' => 'xsd:int'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestOrderPackages']=array(\n\t\t\t\t'LaboratoryTestOrderPackages',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTestOrderPackage[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTestOrderPackage',\n\t\t \t\tnull\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestOrderResult']=array(\n\t\t\t 'LaboratoryTestOrderResult',\n\t\t\t 'complexType',\n\t\t\t 'struct',\n\t\t\t 'sequence',\n\t\t\t '',\n\t\t\t array(\n\t\t\t \t'id' => array('name' => 'Id', 'type' => 'xsd:long'),\n\t\t\t \t'test_order_package_id' => array('name' => 'TestSetId', 'type' => 'xsd:long'),\n\t\t\t \t'test_id' => array('name' => 'TestId', 'type' => 'xsd:long'),\n\t\t\t \t'test_set_id' => array('name' => 'TestSetId', 'type' => 'xsd:long'),\n\t\t\t \t'value' => array('name' => 'Value', 'type' => 'xsd:string'),\n\t\t\t \t'unit' => array('name' => 'Unit', 'type' => 'xsd:string'),\n\t\t\t \t'si_value' => array('name' => 'SiValue', 'type' => 'xsd:string'),\n\t\t\t \t'si_unit' => array('name' => 'SiUnit', 'type' => 'xsd:string'),\n\t\t\t \t'si_reference_range' => array('name' => 'SiReferenceRange', 'type' => 'xsd:string'),\n\t\t\t \t'conventional_value' => array('name' => 'ConventionalValue', 'type' => 'xsd:string'),\n\t\t\t \t'conventional_unit' => array('name' => 'ConventionalUnit', 'type' => 'xsd:string'),\n\t\t\t \t'conventional_reference_range' => array('name' => 'ConventionalReferenceRange', 'type' => 'xsd:string'),\n\t\t\t \t'result_flag' => array('name' => 'ResultFlag', 'type' => 'xsd:string'),\n\t\t\t \t'status' => array('name' => 'status', 'type' => 'xsd:int'),\n\t\t\t \t'web_patient_viewable' => array('name' => 'WebPatientViewable', 'type' => 'xsd:boolean'),\n\t\t\t \t'web_physician_viewable' => array('name' => 'WebPhysicianViewable', 'type' => 'xsd:boolean'),\n\t\t\t \t'remarks' => array('name' => 'Remarks','type'=>'xsd:string'),\n\t\t\t \t'entry_datetime' => array('name' => 'EntryDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t \t'user_id' => array('name' => 'UserId', 'type' => 'xsd:long'),\n\t\t\t \t'posted' => array('name' => 'Posted', 'type' => 'xsd:boolean'),\n\t\t\t \t'posted_datetime' => array('name' => 'PostedDatetime', 'type' => 'xsd:dateTime'),\n\t\t\t ),\n\t\t\t null,\n\t\t\t null,\n\t\t\t null\n\t\t\t);\n\t\t\t\n\t\t$types['LaboratoryTestOrderResults']=array(\n\t\t\t\t'LaboratoryTestOrderResults',\n\t\t\t\t'complexType',\n\t\t\t\t'array',\n\t\t\t\t'sequence',\n\t\t\t\t'SOAP-ENC:Array',\n\t\t \t\tarray(),\n\t\t \t\tarray(\n\t\t \t\tarray('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:LaboratoryTestOrderResult[]')\n\t\t \t\t),\n\t\t \t\t'tns:LaboratoryTestOrderResult',\n\t\t \t\tnull\n\t\t\t);\n\t\t\n\t\tif ($complexName)\n\t\t{\n\t\t\tif (isset($types[$complexName]))\n\t\t\t{\n\t\t\t\t$type=$types[$complexName];\n\t\t\t\t$server->wsdl->addComplexType(\n\t\t\t\t\t$types[0],\n\t\t\t\t $types[1],\n\t\t\t\t $types[2],\n\t\t\t\t $types[3],\n\t\t\t\t $types[4],\n\t\t\t\t $types[5],\n\t\t\t\t $types[6],\n\t\t\t\t $types[7],\n\t\t\t\t $types[8]\n\t\t\t\t);\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tforeach ($types as $key=>$type)\n\t\t\t{\n\t\t\t\t$server->wsdl->addComplexType(\n\t\t\t\t\t$type[0],\n\t\t\t\t $type[1],\n\t\t\t\t $type[2],\n\t\t\t\t $type[3],\n\t\t\t\t $type[4],\n\t\t\t\t $type[5],\n\t\t\t\t $type[6],\n\t\t\t\t $type[7],\n\t\t\t\t $type[8]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"abstract function getAPIFormattedRequest();",
"protected function billGetAdHocSchemaRequest()\n {\n\n $resourcePath = '/Bill/$adHocSchema';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"private function buildRequest()\n {\n return [\n 'AppKey' => $this->accessKey,\n 'Secret' => $this->secretKey,\n $this->dataKey => [],\n $this->deleteKey => [],\n 'Format' => 'magentoplugin1.0.0'\n ];\n }",
"public function toArray()\n {\n $json_request = $this->request;\n $json_request[\"params\"][\"order\"] = $this->order_id;\n $json_request[\"params\"][\"amount\"] = $this->amount;\n $json_request[\"params\"][\"currency\"] = $this->currency;\n $json_request[\"params\"][\"group_id\"] = $this->group_id;\n $json_request[\"params\"][\"original_url\"] = $this->original_url;\n $json_request[\"params\"][\"notify\"][\"result\"] = $this->notify;\n if ($this->sca_exemptions !== null) {\n $json_request[\"params\"][\"sca_exemptions\"] = $this->sca_exemptions;\n }\n if ($this->emv3ds !== null) {\n $json_request[\"params\"][\"emv3ds\"] = $this->emv3ds;\n }\n return $json_request;\n }",
"public static function requestBuild(){\n $tranDateTime = DateTime::getDateTime();\n $uuid = Uuid::generate()->string;\n $applicationId = \"Sadad\";\n $request = array();\n $request += [\"applicationId\" => $applicationId];\n $request += [\"UUID\" => $uuid];\n $request += [\"tranDateTime\" => $tranDateTime];\n\n return $request;\n }",
"function lapizzeria_agregar_campos_rest_api() {\n\n register_rest_field( \n 'especialidades', \n 'precio', \n array(\n 'get_callback' => 'lapizzeria_obtener_precio',\n 'update_callback' => null,\n 'schema' => null\n ) \n );\n\n register_rest_field( \n 'especialidades', \n 'categoria_menu', \n array(\n 'get_callback' => 'lapizzeria_taxonomia_menu',\n 'update_callback' => null,\n 'schema' => null\n ) \n );\n\n register_rest_field( \n 'especialidades', \n 'imagen_destacada', \n array(\n 'get_callback' => 'lapizzeria_obtener_imagen_destacada',\n 'update_callback' => null,\n 'schema' => null\n ) \n );\n}",
"protected function setUpOwsRequest()\n {\n $request = ms_newOwsRequestObj();\n //$request->loadparams();\n foreach ($_REQUEST as $n => $v) {\n if ($n[0] !== '_') {\n $request->setParameter($n, $v);\n }\n }\n\n return $request;\n }",
"protected function getV1ServicesOpInvoiceCreditRequest()\n {\n\n $resourcePath = '/v1/services/op_invoice_credit';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function accountByPeriodInquiryGetAdHocSchemaRequest()\n {\n\n $resourcePath = '/AccountByPeriodInquiry/$adHocSchema';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"function prov_assocArray_to_Http_ServerRequest()\n{\n return [\n \"param1\" => \"paramValue1\",\n \"param2\" => \"paramValue2\",\n \"param3\" => \"paramValue3\",\n \"param4\" => \"paramValue4\",\n ];\n}",
"protected function _prepareRequest()\n {\n /** @var \\Magento\\Sales\\Model\\Order $order */\n $order = $this->getEntity();\n\n $data = [\n 'info' => [\n 'NumberOfPackages' => 1,\n 'ConsigneeAddress' => [\n 'CustomerName' => $order->getCustomerName(),\n 'ContactPerson' => $order->getCustomerName(),\n 'CityName' => $order->getShippingAddress()->getCity(),\n 'StreetName' => $order->getShippingAddress()->getStreetLine(0),\n 'Phone1' => $order->getShippingAddress()->getTelephone()\n ],\n 'PickupPointID' => $order->getShippingAddress()->getShippingUpsPickupId(),\n 'Reference1' => $this->getEntity()->getIncrementId(),\n 'UseDefaultShipperAddress' => 'true',\n 'Weight' => $this->getEntity()->getWeight()\n ]\n ];\n\n return $data;\n }",
"public function build_API_request(){\n\t\t\n\t\tswitch($this->api_method){\n\t\t\tcase 'customfield_UPDATE_EMAIL_LIST':\n\t\t\t\tif(!is_array($this->loaded_data)){return false;}\n\t\t\t\t\n\t\t\t\tforeach($this->loaded_data as $item){\n\t\t\t\t\t$js['options'][] = array('label'=>$item);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn json_encode($js);\n\t\t\t\tBREAK;\n\t\t\t/*\n\t\t\tcase 'dealfilter_ADD':\n\t\t\t\treturn '{\"name\":\"New Filter\",\"type\":\"deals\",\"conditions\":{\"glue\":\"and\",\"conditions\":[{\"glue\":\"and\",\"conditions\":[{\"object\":\"deal\",\"stage_id\":\"2\",\"operator\":\"=\"}]},{\"glue\":\"or\",\"conditions\":[]}]}}';\n\t\t\t\tBREAK;\n\t\t\t*/\n\t\t\t\n\t\t\tcase 'deal_notes_ADD_NOTE':\n\t\t\t\t$js['deal_id'] = $this->deal_id;\n\t\t\t\t$js['content'] = $this->deal_note;\n\t\t\t\t$js['pinned_to_deal_flag'] = '1';\n\t\t\t\t\n\t\t\t\treturn json_encode($js);\n\t\t\t\tBREAK;\n\t\t\t\n\t\t\n\t\t\tcase 'deal_MOVE_TO_SENT_STAGE':\n\t\t\t\t$js['stage_id'] = $this->SENT_stage_id;\n\t\t\t\t\n\t\t\t\treturn json_encode($js);\n\t\t\t\tBREAK;\n\t\t\t\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tRETURN FALSE;\n\t\t}\n\t\n\t}",
"protected function getV1ServicesAtgRequest()\n {\n\n $resourcePath = '/v1/services/atg';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getRequestObject();",
"public function toRequest() {\n\t\t// add all attributes back to the request\n\t\tforeach($this->attributes as $key => $attribute) {\n\t\t\t$this->parameters[$key] = $attribute;\n\t\t}\n\t}",
"function create_ACF_meta_in_REST() {\n\n // Get all post types\n $post_types = get_post_types();\n\n // Add rest field for each post type\n foreach ($post_types as $post_type) {\n register_rest_field( $post_type, \"post_type_data\", [\n 'get_callback' => array( $this, 'expose_ACF_fields'),\n 'schema' => null,\n ]);\n }\n }",
"public function addCustomRequestData($apiRequest, &$args) { }",
"public abstract function requestToObject($request);",
"abstract public function getRequestParameters(): array;",
"protected function prepRequest (string $method, \\stdClass $args): string {\n\n $r = new \\stdClass();\n foreach($args->records as $record) {\n $r->method = $method;\n $r->url = $this->getConfig()->getBaseUri() . '/sobjects/' . $args->object\n . (property_exists($record, 'Id') ? '/' . $record->Id : '');\n //$r->body = $record;\n if( $method == 'PATCH') {\n $r->richInput = $record->updateFields;\n }\n $req[] = $r;\n }\n\n return json_encode(['batchRequests' => $req]);\n }",
"private function getEnrollParameters()\n {\n // array we need to convert to XML\n $parameters = [\n \"RequestSource\" => \"PartnerCode\",\n \"Product\" => [\n \"PackageId\" => env('IDCS_PACKAGE'),\n \"ProductUser\" => [\n \"Memberid\" => $this->user->uuid,\n \"EmailAddress\" => $this->user->email,\n \"Password\" => str_random(12),\n \"Address\" => [\n \"Address1\" => $this->user->address,\n \"Address2\" => \"\",\n \"City\" => $this->user->city,\n \"State\" => $this->user->state,\n \"ZipCode\" => $this->user->zip,\n ],\n \"Phone\" => [\n \"PhoneNumber\" => $this->user->phone,\n \"PhoneType\" => \"Home\"\n ],\n \"Person\" => [\n \"FirstName\" => $this->user->first_name,\n \"LastName\" => $this->user->last_name,\n \"MiddleName\" => \"\"\n ]\n ]\n ],\n \"Partner\" => [\n \"partnerAccount\" => env('IDCS_USERNAME'),\n \"partnerCode\" => env('IDCS_USERNAME'),\n \"partnerPassword\" => env('IDCS_PASSWORD'),\n \"Branding\" => env('IDCS_USERNAME')\n ]\n ];\n\n\n $xml = new \\SimpleXMLElement(\"<Request></Request>\");\n\n $this->array_to_xml($parameters, $xml);\n $raw_xml = $xml->asXML();\n $raw_xml = trim(str_replace('<?xml version=\"1.0\"?>', '', $raw_xml));\n\n $parameters = [\n 'xmlRequest' => [\n 'any' => new \\SoapVar($raw_xml, XSD_ANYXML)\n ]\n ];\n\n return $parameters;\n }",
"function get_request_obj()\n {\n $request = new SimpleXMLElement(\"<packet></packet>\");\n $request->addAttribute(\"version\", \"1.6.3.0\");\n\n return $request;\n }"
] | [
"0.60031337",
"0.56903577",
"0.5558709",
"0.5548179",
"0.54458326",
"0.5355995",
"0.5337041",
"0.5327341",
"0.5101826",
"0.509512",
"0.5062413",
"0.50378245",
"0.5016937",
"0.49813315",
"0.49735904",
"0.4973425",
"0.49437582",
"0.49138406",
"0.48501787",
"0.48001832",
"0.47958085",
"0.4792084",
"0.47856474",
"0.47628182",
"0.47620982",
"0.47554815",
"0.47477996",
"0.47475225",
"0.47457284",
"0.47262153"
] | 0.70440024 | 0 |
Operation memoryfullAugmentAsync Answers a given query from the documents in the index | public function memoryfullAugmentAsync($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])
{
return $this->memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query, $with_source, $contentType)
->then(
function ($response) {
return $response[0];
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function memoryfullAugmentRequest($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memoryfullAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memoryfullAugment'\n );\n }\n\n\n\n\n $resourcePath = '/augment/memoryfull/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memoryfullAugmentRequest($index_name, $payload, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function memorylessAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAsyncAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAsyncAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/async/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n return $this->memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function memorylessAsyncAugment($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n list($response) = $this->memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n return $response;\n }",
"function query() {}",
"function query() {}",
"public function memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memorylessAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"function query() {\n }",
"function memory_alter_query($query) {\n global $wp_query;\n \n if (!$query->is_archive()) \n return;\n \n if($query->query_vars['post_type'] != 'memory')\n return;\n \n if ( !$query->is_main_query() )\n return;\n\n $query->set('orderby' ,'rand');\n $query->set('nopaging' ,true);\n $query->set('posts_per_page' ,-1);\n}",
"public function getIndexedDocuments();",
"public function query() {}",
"public function index()\n {\n $data = [];\n $query = Input::get('query');\n $query = substr($query, 0, 64);\n $query = preg_replace('/[^\\p{L}0-9 ]/iu','',$query);\n $queryModel = new Query;\n\n if(!empty($query)){\n $queries = $queryModel->where('query','LIKE','%'.$query.'%');\n $exact_match = $queryModel->where('query','LIKE', $query);\n }\n\n $data = $queries->get()->toArray();\n $exact = $exact_match->get()->toArray();\n if(count($exact) < 1){\n $queryModel->query = $query;\n $queryModel->save();\n }else{\n $exact = reset($exact);\n $queryModel->where('id', $exact['id'])\n ->update(['weight' => DB::raw($exact['weight']+1)]);\n }\n\n return response()->json(array('data' => $data), 200);\n }",
"function razuna_query($query) {\n\t $target = htmlspecialchars($_SERVER[\"PHP_SELF\"]);\n\t $search_limit = array(\"img\" => \"image only\", \"vid\" => \"video only\",\"doc\" => \"document only\",\"aud\" => \"audio only\");\n \n //if the form has been submitted (see if statement above) perform the functions below \n //For each step see the functions below\n //1. Replace white space in the search query with %20\n //2. Prepare the QUERY STRING portion of the url \n //3. Build the file url using the BASE var, the API Key, the QUERY STRING AND any search limiters ($show_ass) \n //4. Pass the url to JSON AND CREATE THE RAZUNA array\n //5. Convert the RAZUNA ARRAY to the data model of the new IMREE array, return the final array to AIR\n \n return return_array($query);\n \n }",
"public function memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n $request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\Semanticwrap\\Model\\AsyncProcessResponse' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\Semanticwrap\\Model\\AsyncProcessResponse' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\Semanticwrap\\Model\\AsyncProcessResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Semanticwrap\\Model\\AsyncProcessResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"function indextank_index_posts($offset=0, $pagesize=30){\n $api_url = get_option(\"it_api_url\");\n $index_name = get_option(\"it_index_name\");\n if ($api_url and $index_name) { \n $client = new Indextank_Api($api_url);\n $index = $client->get_index($index_name);\n $max_execution_time = ini_get('max_execution_time');\n $max_input_time = ini_get('max_input_time');\n ini_set('max_execution_time', 0);\n ini_set('max_input_time', 0);\n $my_query = new WP_Query();\n $query_res = $my_query->query(\"post_status=publish&orderby=ID&order=DESC&post_type=any&posts_per_page=$pagesize&offset=$offset\");\n $message = \"\";\n if ($query_res) {\n // this may throw an exception .. let it float!\n indextank_batch_add_posts($index, $query_res);\n \n // count all posts, even from previous iterations\n $count = $offset + count($query_res);\n $message = \"<b>Indexed $count posts</b>\";\n }\n ini_set('max_execution_time', $max_execution_time);\n ini_set('max_input_time', $max_input_time);\n return $message;\n }\n\n return NULL;\n\n}",
"public function perform_query()\n {\n $query_string = $this->get_query_string();\n $query_return = file_get_contents($query_string);\n return $this->create_data_collection(json_decode($query_return));\n }",
"public function results(object $query, Context $context): array;",
"protected function build() {\n $this->query = new Query();\n $offset = (empty($this->query_options['offset'])) ? 0 : $this->query_options['offset'];\n $limit = (empty($this->query_options['limit'])) ? 10 : $this->query_options['limit'];\n\n $keys = $this->search_api_query->getKeys();\n if (!empty($keys)) {\n if (is_string($keys)) {\n $keys = array($keys);\n }\n\n $full_text_fields = $this->search_api_query->getFields();\n $string = $this->flattenKeys($keys, $this->query_options['parse mode']);\n\n if (!empty($string)) {\n $query_string = new QueryString($string);\n $query_string->setFields(array_values($full_text_fields));\n }\n }\n\n $sort = $this->getSortQuery();\n $parsed_filters = $this->parseFilter($this->search_api_query->getFilter());\n if (!empty($parsed_filters)) {\n $search_filter = $parsed_filters[0];\n }\n\n $this->query->setFrom($offset);\n $this->query->setSize($limit);\n\n if (isset($query_string) && isset($search_filter)) {\n $bool_query = new BoolQuery();\n $bool_query->addMust($query_string);\n $bool_query->addFilter($search_filter);\n $this->query->setQuery($bool_query);\n }\n elseif (isset($query_string)) {\n $this->query->setQuery($query_string);\n }\n elseif (isset($search_filter)) {\n $this->query->setPostFilter($search_filter);\n }\n\n if (!empty($sort)) {\n $this->query->setSort($sort);\n }\n\n $this->addAggregations();\n }",
"public function hook_query_index(&$query)\n {\n //Your code here\n\n }",
"public function query();",
"public function query();",
"public function query();",
"public function query();",
"function insert_entry($entry_contents) {\r\n\r\n global $mongo;\r\n\r\n $command = new MongoDB\\Driver\\Command([\r\n 'insert' => 'entries',\r\n 'documents' => $entry_contents\r\n ]);\r\n\r\n $cursor = $mongo->executeCommand('memoryatlas', $command);\r\n\r\n foreach ($cursor as $doc) {\r\n return $doc;\r\n }\r\n}",
"public function toQuery()\n {\n /** @var Resource $resource */\n $resource = $this->resource();\n\n return $resource::buildIndexQuery(\n $this,\n $this->newQuery(),\n $this->search,\n $this->filters()->all(),\n $this->orderings()\n );\n }",
"public abstract function queryAll();",
"public function memorylessAsyncAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n return $this->memorylessAsyncAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"abstract public function query();"
] | [
"0.6308466",
"0.55358565",
"0.550742",
"0.5467545",
"0.53651434",
"0.4993691",
"0.46753702",
"0.46753702",
"0.46606925",
"0.4655587",
"0.4636696",
"0.46225265",
"0.45829228",
"0.45373788",
"0.45167783",
"0.44752932",
"0.4427399",
"0.4424738",
"0.44087884",
"0.44047275",
"0.43881154",
"0.4353427",
"0.4353427",
"0.4353427",
"0.4353427",
"0.4345456",
"0.43343747",
"0.4315171",
"0.4287325",
"0.4274666"
] | 0.602419 | 1 |
Operation memoryfullAugmentAsyncWithHttpInfo Answers a given query from the documents in the index | public function memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])
{
$returnType = '\Semanticwrap\Model\AugmentationResponse';
$request = $this->memoryfullAugmentRequest($index_name, $payload, $ignore_query, $with_source, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function memoryfullAugmentRequest($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memoryfullAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memoryfullAugment'\n );\n }\n\n\n\n\n $resourcePath = '/augment/memoryfull/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memorylessAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n $request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\Semanticwrap\\Model\\AsyncProcessResponse' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\Semanticwrap\\Model\\AsyncProcessResponse' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\Semanticwrap\\Model\\AsyncProcessResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Semanticwrap\\Model\\AsyncProcessResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAsyncAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAsyncAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/async/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memoryfullAugmentAsync($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n return $this->memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function memorylessAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n return $this->memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function memorylessAsyncAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n $request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function memorylessAsyncAugment($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n list($response) = $this->memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n return $response;\n }",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null);",
"public function assemble(array $info, array $query = null){ }",
"public function memorylessAsyncAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n return $this->memorylessAsyncAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function numbersearchGetAsyncWithHttpInfo($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->numbersearchGetRequest($api_version, $offset, $limit, $country, $prefix, $contains, $number_type);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function numbersearchGetWithHttpInfo($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->numbersearchGetRequest($api_version, $offset, $limit, $country, $prefix, $contains, $number_type);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse2006',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse403',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse500',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function searchGeneralInfoAsyncWithHttpInfo($entity, $matrix_vars, $q = null, $fq = null, $start = null, $limit = null, $language = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse20099';\n $request = $this->searchGeneralInfoRequest($entity, $matrix_vars, $q, $fq, $start, $limit, $language);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"function assemble(array $info, array $query = null)\n {\n return false;\n }",
"public function complexAugmentAsyncWithHttpInfo($payload, string $contentType = self::contentTypes['complexAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n $request = $this->complexAugmentRequest($payload, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function queryPatternsWithHttpInfo($offset = null, $limit = null)\n {\n $request = $this->queryPatternsRequest($offset, $limit);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\MsaQueryResponse' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaQueryResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 403:\n if ('\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 429:\n if ('\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n default:\n if ('\\OpenAPI\\Client\\Model\\MsaQueryResponse' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaQueryResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaQueryResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n default:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaQueryResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"function indextank_index_posts($offset=0, $pagesize=30){\n $api_url = get_option(\"it_api_url\");\n $index_name = get_option(\"it_index_name\");\n if ($api_url and $index_name) { \n $client = new Indextank_Api($api_url);\n $index = $client->get_index($index_name);\n $max_execution_time = ini_get('max_execution_time');\n $max_input_time = ini_get('max_input_time');\n ini_set('max_execution_time', 0);\n ini_set('max_input_time', 0);\n $my_query = new WP_Query();\n $query_res = $my_query->query(\"post_status=publish&orderby=ID&order=DESC&post_type=any&posts_per_page=$pagesize&offset=$offset\");\n $message = \"\";\n if ($query_res) {\n // this may throw an exception .. let it float!\n indextank_batch_add_posts($index, $query_res);\n \n // count all posts, even from previous iterations\n $count = $offset + count($query_res);\n $message = \"<b>Indexed $count posts</b>\";\n }\n ini_set('max_execution_time', $max_execution_time);\n ini_set('max_input_time', $max_input_time);\n return $message;\n }\n\n return NULL;\n\n}",
"public function searchCouponsAdvancedApplicationWideAsyncWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null)\n {\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse2001';\n $request = $this->searchCouponsAdvancedApplicationWideRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function queryPatternsAsyncWithHttpInfo($offset = null, $limit = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $request = $this->queryPatternsRequest($offset, $limit);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function numbersearchGetRequest($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n\n $resourcePath = '/numbersearch/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($offset !== null) {\n $queryParams['offset'] = ObjectSerializer::toQueryValue($offset);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($country !== null) {\n $queryParams['country'] = ObjectSerializer::toQueryValue($country);\n }\n // query params\n if ($prefix !== null) {\n $queryParams['prefix'] = ObjectSerializer::toQueryValue($prefix);\n }\n // query params\n if ($contains !== null) {\n $queryParams['contains'] = ObjectSerializer::toQueryValue($contains);\n }\n // query params\n if (is_array($number_type)) {\n $number_type = ObjectSerializer::serializeCollection($number_type, 'csv', true);\n }\n if ($number_type !== null) {\n $queryParams['number_type'] = ObjectSerializer::toQueryValue($number_type);\n }\n // header params\n if ($api_version !== null) {\n $headerParams['api-version'] = ObjectSerializer::toHeaderValue($api_version);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"function razuna_query($query) {\n\t $target = htmlspecialchars($_SERVER[\"PHP_SELF\"]);\n\t $search_limit = array(\"img\" => \"image only\", \"vid\" => \"video only\",\"doc\" => \"document only\",\"aud\" => \"audio only\");\n \n //if the form has been submitted (see if statement above) perform the functions below \n //For each step see the functions below\n //1. Replace white space in the search query with %20\n //2. Prepare the QUERY STRING portion of the url \n //3. Build the file url using the BASE var, the API Key, the QUERY STRING AND any search limiters ($show_ass) \n //4. Pass the url to JSON AND CREATE THE RAZUNA array\n //5. Convert the RAZUNA ARRAY to the data model of the new IMREE array, return the final array to AIR\n \n return return_array($query);\n \n }",
"function search($limit,$offset) {\n $url_params = array();\n \n $url_params['term'] = $GLOBALS['DEFAULT_TERM'];\n $url_params['location'] = $GLOBALS['DEFAULT_LOCATION'];\n $url_params['sort'] = $GLOBALS['SEARCH_SORT'];\n\n if($limit){\n $url_params['limit'] = $limit;\n }\n else\n {\n $url_params['limit'] = $GLOBALS['SEARCH_LIMIT'];\n }\n\n if($offset){\n $url_params['offset'] = $offset;\n }\n else\n {\n $url_params['offset'] = $GLOBALS['SEARCH_OFFSET'];\n }\n\n $search_path = $GLOBALS['SEARCH_PATH'] . \"?\" . http_build_query($url_params);\n\n $res = request($GLOBALS['API_HOST'], $search_path);\n\n echo $res;\n}"
] | [
"0.5797136",
"0.5785382",
"0.5659847",
"0.5598098",
"0.55043244",
"0.5370663",
"0.5256098",
"0.5141258",
"0.49170777",
"0.47550333",
"0.47550333",
"0.47550333",
"0.47550333",
"0.47550333",
"0.47550333",
"0.467468",
"0.46610332",
"0.44428143",
"0.4399933",
"0.4101961",
"0.40991426",
"0.40574586",
"0.40518078",
"0.40095055",
"0.4004301",
"0.39899197",
"0.39443016",
"0.39422587",
"0.3940881",
"0.38897917"
] | 0.61661816 | 0 |
Create request for operation 'memoryfullAugment' | public function memoryfullAugmentRequest($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])
{
// verify the required parameter 'index_name' is set
if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $index_name when calling memoryfullAugment'
);
}
// verify the required parameter 'payload' is set
if ($payload === null || (is_array($payload) && count($payload) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $payload when calling memoryfullAugment'
);
}
$resourcePath = '/augment/memoryfull/{index_name}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$ignore_query,
'ignore_query', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$with_source,
'with_source', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// path params
if ($index_name !== null) {
$resourcePath = str_replace(
'{' . 'index_name' . '}',
ObjectSerializer::toPathValue($index_name),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(
['application/json', ],
$contentType,
$multipart
);
// for model (json/xml)
if (isset($payload)) {
if (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the body
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));
} else {
$httpBody = $payload;
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'POST',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function memorylessAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAsyncAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAsyncAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/async/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getMemory(): Memory;",
"public function getRequestData(): Bag;",
"public abstract function generateRequestObject();",
"public function update(Request $request, Memory $memory)\n {\n //\n }",
"public function allocateAddress($request);",
"public function memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memoryfullAugmentRequest($index_name, $payload, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"function prov_assocArray_to_Http_ServerRequest()\n{\n return [\n \"param1\" => \"paramValue1\",\n \"param2\" => \"paramValue2\",\n \"param3\" => \"paramValue3\",\n \"param4\" => \"paramValue4\",\n ];\n}",
"public function allocateAssets() {\n try {\n $serviceToCall = \"InvestmentWS\";\n\n $lsCalcXmlClientObject = new nusoap_client($this->serviceUrl . \"/\" . $serviceToCall);\n\n $lsCalcXmlClientObject->setCurlOption(CURLOPT_SSLVERSION, 3);\n\n $lsCalcXmlReqestXmlBody = <<<END\n <calcxmlRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.calcxml.com/schema/calcxmlRequest.xsd\" username=\"{$this->user}\" password=\"{$this->password}\" responseType=\"raw\" returnRelevantLinks=\"false\" chartLibrary=\"none\" version=\"1.3\"><dataTable><cssClassName>simpletable</cssClassName></dataTable>\n <calcInput includeInResponse=\"true\">\n <inv01>\n <q1>A</q1>\n <q2>A</q2>\n <q3>A</q3>\n <q4>A</q4>\n <q5>A</q5>\n <q6>A</q6>\n <q7>A</q7>\n <q8>A</q8>\n <q9>A</q9>\n <q10>A</q10>\n </inv01>\n </calcInput>\n</calcxmlRequest>\nEND;\n $lsCalcXmlReqestXmlBodyENT = self::xmlentities($lsCalcXmlReqestXmlBody);\n\n //request to soap service\n $lsCalcXmlReqestXml = <<<END\n<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <soapenv:Body>\n <inv01 xmlns=\"http://webservice.calcxml.com\">\n <in0 xsi:type=\"xsd:string\">\n {$lsCalcXmlReqestXmlBodyENT}\n </in0>\n </inv01>\n </soapenv:Body>\n</soapenv:Envelope>\nEND;\n $lsCalcXMLResponseArray = $lsCalcXmlClientObject->send($lsCalcXmlReqestXml);\n\n if ($lsCalcXmlClientObject->fault) {\n //throw the exception\n // throw new CException('');\n } else {\n\n if (isset($lsCalcXMLResponseArray[\"inv01Return\"])) {\n $lsXmlResponseDom = new DOMDocument();\n $lsXmlResponseDom->loadXML($lsCalcXMLResponseArray[\"inv01Return\"]);\n $outputCalc = $lsXmlResponseDom->getElementsByTagName(\"inv01Out\")->item(0);\n print_r($outputCalc);\n die;\n }\n }\n } catch (SoapFault $E) {\n print_r($E);\n die;\n throw new CException('');\n }\n }",
"public function toRequest() {\n\t\t// add all attributes back to the request\n\t\tforeach($this->attributes as $key => $attribute) {\n\t\t\t$this->parameters[$key] = $attribute;\n\t\t}\n\t}",
"public function memoryfullAugmentAsync($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n return $this->memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"abstract public function buildRequest();",
"public function complexAugmentRequest($payload, string $contentType = self::contentTypes['complexAugment'][0])\n {\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling complexAugment'\n );\n }\n\n\n $resourcePath = '/augment/complex-chain/docs';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"function get_request_obj()\n {\n $request = new SimpleXMLElement(\"<packet></packet>\");\n $request->addAttribute(\"version\", \"1.6.3.0\");\n\n return $request;\n }",
"public function allocateEipSegmentAddressWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->bandwidth)) {\n $query['Bandwidth'] = $request->bandwidth;\n }\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->eipMask)) {\n $query['EipMask'] = $request->eipMask;\n }\n if (!Utils::isUnset($request->internetChargeType)) {\n $query['InternetChargeType'] = $request->internetChargeType;\n }\n if (!Utils::isUnset($request->isp)) {\n $query['Isp'] = $request->isp;\n }\n if (!Utils::isUnset($request->netmode)) {\n $query['Netmode'] = $request->netmode;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceGroupId)) {\n $query['ResourceGroupId'] = $request->resourceGroupId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->zone)) {\n $query['Zone'] = $request->zone;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'AllocateEipSegmentAddress',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return AllocateEipSegmentAddressResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"function test_callback($evhttp_request)\n{\n echo \"script-land memory: \".memory_get_usage().\" and real memory from system: \".memory_get_usage(true).\"\\n\";\n\n $uri = evhttp_request_uri($evhttp_request);\n\n $ct = evhttp_request_find_header($evhttp_request, 'Content-Type');\n echo \"URI: $uri\\n\";\n echo \"Content-Type: $ct\\n\";\n\n print_r(evhttp_request_headers($evhttp_request));\n echo evhttp_request_body($evhttp_request);\n\tevhttp_response_add_header($evhttp_request, \"Content-Type\", \"text/plain\");\n\n \treturn evhttp_response_set(\"Hello World!\", 200, \"OK\");\n}",
"function NewRequest() {\n\t\t$this->PostString = \"\";\n\t\t$this->RawData = \"\";\n\t\t$this->Values = \"\";\n\t}",
"public static function requestBuild(){\n $tranDateTime = DateTime::getDateTime();\n $uuid = Uuid::generate()->string;\n $applicationId = \"Sadad\";\n $request = array();\n $request += [\"applicationId\" => $applicationId];\n $request += [\"UUID\" => $uuid];\n $request += [\"tranDateTime\" => $tranDateTime];\n\n return $request;\n }",
"public function get_request():array;",
"function returnPostRequest($buffer) {\n $post_req_schema = \"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4\";\n $data = json_encode(array(\"schema\" => $post_req_schema, \"data\" => $buffer));\n return $data;\n}",
"public function swarmInspectRequest()\n {\n\n $resourcePath = '/swarm';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/plain']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/plain'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getRequestObject();",
"protected function getCardReserveAccountDetailsUsingGetRequest()\n {\n\n $resourcePath = '/card/reserve';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function createRequest() {\n $query = [];\n $config = $this->configFactory->get('open_weather_map.settings');\n $key_config = $this->configFactory->get('open_weather_map.settings')->get('key');\n $query['appid'] = Html::escape($key_config);\n $cityname = Html::escape($config->get('cityname'));\n $country_code = Html::escape($config->get('country_code'));\n\n $query['q'] = $cityname . \",\" . $country_code;\n return $query;\n }",
"public function build() {\n\n\t\t$this->requestblock = $this->xml->dom->getElementsByTagName('requestblock')->item(0);\n\n\t\t//create the operation nodes\n\t\t$this->request = new DOMElement('request');\n\t\t$this->requestblock->appendChild($this->request);\n\n\t\t//get nodes\n\t\t$operation \t= $this->_getOperationNode();\n\t\t$billing \t= $this->_getBillingNode();\n\n\t\t//set attributes of request node\n\t\t$this->request->setAttribute('type', $this->requestType);\n\n\t\t//add child elements of request\n\t\t$this->request->appendChild($operation);\n\t\t$this->request->appendChild($billing);\n\n\t\t//save\n\t\treturn $this->base;\n\t}",
"public function create()\n {\n //\n // return $req->\n }",
"public function getAvailableAcceleratedMemory() { return 1; }",
"private function buildRequest()\n {\n return [\n 'AppKey' => $this->accessKey,\n 'Secret' => $this->secretKey,\n $this->dataKey => [],\n $this->deleteKey => [],\n 'Format' => 'magentoplugin1.0.0'\n ];\n }",
"public function memorylessAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n return $this->memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }"
] | [
"0.6412701",
"0.57181114",
"0.4946963",
"0.48185566",
"0.47865534",
"0.4733622",
"0.47148442",
"0.46644253",
"0.4514114",
"0.45114133",
"0.45046142",
"0.4486699",
"0.44787258",
"0.44566667",
"0.44428",
"0.4440758",
"0.44311306",
"0.4413657",
"0.43790728",
"0.4371208",
"0.43371508",
"0.43317664",
"0.43236428",
"0.43216676",
"0.43201536",
"0.4307991",
"0.43062004",
"0.42988166",
"0.4287937",
"0.42776513"
] | 0.6693617 | 0 |
Operation memorylessAsyncAugmentWithHttpInfo Answers a given query from the documents in the index | public function memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])
{
$request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
);
} catch (ConnectException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
null,
null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
(string) $request->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
switch($statusCode) {
case 200:
if ('\Semanticwrap\Model\AsyncProcessResponse' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\Semanticwrap\Model\AsyncProcessResponse' !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, '\Semanticwrap\Model\AsyncProcessResponse', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
$returnType = '\Semanticwrap\Model\AsyncProcessResponse';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Semanticwrap\Model\AsyncProcessResponse',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAsyncAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAsyncAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/async/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memorylessAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memoryfullAugmentRequest($index_name, $payload, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function memorylessAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAsyncAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n $request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function memoryfullAugmentRequest($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memoryfullAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memoryfullAugment'\n );\n }\n\n\n\n\n $resourcePath = '/augment/memoryfull/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n return $this->memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function numbersearchGetAsyncWithHttpInfo($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->numbersearchGetRequest($api_version, $offset, $limit, $country, $prefix, $contains, $number_type);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function memorylessAsyncAugment($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n list($response) = $this->memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n return $response;\n }",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null);",
"public function assemble(array $info, array $query = null){ }",
"public function memorylessAsyncAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n return $this->memorylessAsyncAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function memoryfullAugmentAsync($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n return $this->memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function complexAugmentAsyncWithHttpInfo($payload, string $contentType = self::contentTypes['complexAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n $request = $this->complexAugmentRequest($payload, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function numbersearchGetWithHttpInfo($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->numbersearchGetRequest($api_version, $offset, $limit, $country, $prefix, $contains, $number_type);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse2006',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse403',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse500',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function queryPatternsAsyncWithHttpInfo($offset = null, $limit = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $request = $this->queryPatternsRequest($offset, $limit);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function numbersearchGetRequest($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n\n $resourcePath = '/numbersearch/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($offset !== null) {\n $queryParams['offset'] = ObjectSerializer::toQueryValue($offset);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($country !== null) {\n $queryParams['country'] = ObjectSerializer::toQueryValue($country);\n }\n // query params\n if ($prefix !== null) {\n $queryParams['prefix'] = ObjectSerializer::toQueryValue($prefix);\n }\n // query params\n if ($contains !== null) {\n $queryParams['contains'] = ObjectSerializer::toQueryValue($contains);\n }\n // query params\n if (is_array($number_type)) {\n $number_type = ObjectSerializer::serializeCollection($number_type, 'csv', true);\n }\n if ($number_type !== null) {\n $queryParams['number_type'] = ObjectSerializer::toQueryValue($number_type);\n }\n // header params\n if ($api_version !== null) {\n $headerParams['api-version'] = ObjectSerializer::toHeaderValue($api_version);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function queryPatternsWithHttpInfo($offset = null, $limit = null)\n {\n $request = $this->queryPatternsRequest($offset, $limit);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\MsaQueryResponse' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaQueryResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 403:\n if ('\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 429:\n if ('\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n default:\n if ('\\OpenAPI\\Client\\Model\\MsaQueryResponse' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaQueryResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaQueryResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n default:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaQueryResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function searchCouponsAdvancedApplicationWideAsyncWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null)\n {\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse2001';\n $request = $this->searchCouponsAdvancedApplicationWideRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function customerInvoicesV2PostAsyncWithHttpInfo($id, $eu_third_party, $is_credit_invoice, $currency_code, $currency_rate, $created_by_user_id, $total_amount, $total_vat_amount, $total_roundings, $total_amount_invoice_currency, $total_vat_amount_invoice_currency, $set_off_amount_invoice_currency, $customer_id, $rows, $vat_specification, $invoice_date, $due_date, $delivery_date, $rot_reduced_invoicing_type, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_percent, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $persons, $rot_reduced_invoicing_automatic_distribution, $electronic_reference, $electronic_address, $edi_service_deliverer_id, $our_reference, $your_reference, $buyers_order_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_term_name, $delivery_method_code, $delivery_term_code, $customer_is_private_person, $terms_of_payment_id, $customer_email, $invoice_number, $customer_number, $payment_reference_number, $rot_property_type, $sales_document_attachments, $has_auto_invoice_error, $is_not_delivered, $reverse_charge_on_construction_services, $work_house_other_costs, $remaining_amount, $remaining_amount_invoice_currency, $referring_invoice_id, $created_from_order_id, $created_from_draft_id, $voucher_number, $voucher_id, $created_utc, $modified_utc, $reversed_construction_vat_invoicing, $includes_vat, $send_type, $payment_reminder_issued, $uses_green_technology, $rot_reduced_automatic_distribution = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\CustomerInvoiceApi';\n $request = $this->customerInvoicesV2PostRequest($id, $eu_third_party, $is_credit_invoice, $currency_code, $currency_rate, $created_by_user_id, $total_amount, $total_vat_amount, $total_roundings, $total_amount_invoice_currency, $total_vat_amount_invoice_currency, $set_off_amount_invoice_currency, $customer_id, $rows, $vat_specification, $invoice_date, $due_date, $delivery_date, $rot_reduced_invoicing_type, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_percent, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $persons, $rot_reduced_invoicing_automatic_distribution, $electronic_reference, $electronic_address, $edi_service_deliverer_id, $our_reference, $your_reference, $buyers_order_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_term_name, $delivery_method_code, $delivery_term_code, $customer_is_private_person, $terms_of_payment_id, $customer_email, $invoice_number, $customer_number, $payment_reference_number, $rot_property_type, $sales_document_attachments, $has_auto_invoice_error, $is_not_delivered, $reverse_charge_on_construction_services, $work_house_other_costs, $remaining_amount, $remaining_amount_invoice_currency, $referring_invoice_id, $created_from_order_id, $created_from_draft_id, $voucher_number, $voucher_id, $created_utc, $modified_utc, $reversed_construction_vat_invoicing, $includes_vat, $send_type, $payment_reminder_issued, $uses_green_technology, $rot_reduced_automatic_distribution);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function queryPlatformsMixin0AsyncWithHttpInfo($offset = null, $limit = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $request = $this->queryPlatformsMixin0Request($offset, $limit);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function searchAdvance(Request $request)\n {\n $client = ClientBuilder::create()->build();\n //Default search\n $params =[\n \"index\" =>\"picinside\",\n \"type\" =>\"themes\",\n \"from\" =>0,\n \"size\" =>500,\n \"body\" =>[\n \"query\"=>[\n \"match\"=> [\n \"_all\" => $request['q']\n ],\n ]\n ]\n ];\n\n //Advance search\n if ($request[\"enable-advance\"] != null)\n {\n if($request['search'] == null) $request['search'] = 'name';\n $params =[\n \"index\" => \"picinside\",\n \"type\" => \"themes\",\n \"from\" => 0,\n \"size\" => 500,\n \"body\" => [\n \"query\" => [\n \"match\" => [\n $request['search'] => $request['q']\n ],\n ],\n \"sort\" => [\n \"sales\" => \"desc\"\n ]\n\n ]\n ];\n }\n\n //Advance search\n if ($request[\"orderby-sales\"] != null)\n {\n if($request['search'] == null) $request['search'] = 'name';\n $params =[\n \"index\" => \"picinside\",\n \"type\" => \"themes\",\n \"from\" => 0,\n \"size\" => 500,\n \"body\" => [\n \"query\" => [\n \"match_all\" => [],\n ],\n \"sort\" => [\n \"sales\" => \"desc\"\n ]\n\n ]\n ];\n }\n\n $results = $client->search($params);\n $data = $results['hits']['hits'];\n return view('search.tableajax', compact('data','results'));\n }",
"function razuna_query($query) {\n\t $target = htmlspecialchars($_SERVER[\"PHP_SELF\"]);\n\t $search_limit = array(\"img\" => \"image only\", \"vid\" => \"video only\",\"doc\" => \"document only\",\"aud\" => \"audio only\");\n \n //if the form has been submitted (see if statement above) perform the functions below \n //For each step see the functions below\n //1. Replace white space in the search query with %20\n //2. Prepare the QUERY STRING portion of the url \n //3. Build the file url using the BASE var, the API Key, the QUERY STRING AND any search limiters ($show_ass) \n //4. Pass the url to JSON AND CREATE THE RAZUNA array\n //5. Convert the RAZUNA ARRAY to the data model of the new IMREE array, return the final array to AIR\n \n return return_array($query);\n \n }",
"public function getApplicationCustomersByAttributesAsyncWithHttpInfo($body)\n {\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse20013';\n $request = $this->getApplicationCustomersByAttributesRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }"
] | [
"0.596109",
"0.592858",
"0.5729851",
"0.5536469",
"0.5503543",
"0.52505666",
"0.5234796",
"0.50863737",
"0.5060666",
"0.48989093",
"0.48989093",
"0.48989093",
"0.48989093",
"0.48989093",
"0.48989093",
"0.48143202",
"0.48072413",
"0.46686032",
"0.4653824",
"0.46356714",
"0.45931175",
"0.44278136",
"0.44247106",
"0.43055287",
"0.42588735",
"0.42309666",
"0.4214868",
"0.4202615",
"0.41746715",
"0.41441387"
] | 0.60153395 | 0 |
Create request for operation 'memorylessAsyncAugment' | public function memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])
{
// verify the required parameter 'index_name' is set
if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $index_name when calling memorylessAsyncAugment'
);
}
// verify the required parameter 'payload' is set
if ($payload === null || (is_array($payload) && count($payload) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $payload when calling memorylessAsyncAugment'
);
}
$resourcePath = '/augment/async/memoryless/{index_name}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$context_mandatory,
'context_mandatory', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$custom_context,
'custom_context', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$ignore_query,
'ignore_query', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$with_source,
'with_source', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// path params
if ($index_name !== null) {
$resourcePath = str_replace(
'{' . 'index_name' . '}',
ObjectSerializer::toPathValue($index_name),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(
['application/json', ],
$contentType,
$multipart
);
// for model (json/xml)
if (isset($payload)) {
if (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the body
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));
} else {
$httpBody = $payload;
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'POST',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function memorylessAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memoryfullAugmentRequest($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memoryfullAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memoryfullAugment'\n );\n }\n\n\n\n\n $resourcePath = '/augment/memoryfull/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n $request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\Semanticwrap\\Model\\AsyncProcessResponse' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\Semanticwrap\\Model\\AsyncProcessResponse' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\Semanticwrap\\Model\\AsyncProcessResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Semanticwrap\\Model\\AsyncProcessResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function memorylessAsyncAugment($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n list($response) = $this->memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n return $response;\n }",
"public function memorylessAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n return $this->memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public abstract function generateRequestObject();",
"public function memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memorylessAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function memorylessAsyncAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n return $this->memorylessAsyncAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memoryfullAugmentRequest($index_name, $payload, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"abstract public function buildRequest();",
"function prov_assocArray_to_Http_ServerRequest()\n{\n return [\n \"param1\" => \"paramValue1\",\n \"param2\" => \"paramValue2\",\n \"param3\" => \"paramValue3\",\n \"param4\" => \"paramValue4\",\n ];\n}",
"public function memorylessAsyncAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n $request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function complexAugmentRequest($payload, string $contentType = self::contentTypes['complexAugment'][0])\n {\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling complexAugment'\n );\n }\n\n\n $resourcePath = '/augment/complex-chain/docs';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function create()\n {\n //\n // return $req->\n }",
"public static function requestBuild(){\n $tranDateTime = DateTime::getDateTime();\n $uuid = Uuid::generate()->string;\n $applicationId = \"Sadad\";\n $request = array();\n $request += [\"applicationId\" => $applicationId];\n $request += [\"UUID\" => $uuid];\n $request += [\"tranDateTime\" => $tranDateTime];\n\n return $request;\n }",
"public function memoryfullAugmentAsync($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n return $this->memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function createClone(): RequestInterface;",
"protected function getV1ServicesAtgRequest()\n {\n\n $resourcePath = '/v1/services/atg';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function testCreateRequest(){\n\n }",
"protected function createNewRequest()\n {\n return forward_static_call(array(static::$requestClass, 'createFromGlobals'));\n }",
"abstract public function execute(Request_Async $request_async);",
"protected function createRequest () {\n \treturn new HTTP_Request2();\n }",
"public function create(array $request)\n {\n $apiReques = [];\n $url = $this->getUrl();\n $apiRequest[\"Token\"] = $request[\"Token\"];\n $apiRequest[\"Amount\"] = $request[\"Amount\"];\n\n $this->log->writeLog($apiReques);\n \n $headers = array(\"Content-Type\" => \"application/json\", \"Accept\" => \"application/json\", \"Authorization\" => $request[\"datacap_mid\"]);\n return $this->transferBuilder\n ->setMethod('POST')\n ->setHeaders($headers)\n ->setUri($url)\n ->setBody($apiRequest)\n ->build();\n }",
"abstract protected function requestData(): array;",
"function request(){\n return new Request;\n}",
"public function allocateEipSegmentAddressWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->bandwidth)) {\n $query['Bandwidth'] = $request->bandwidth;\n }\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->eipMask)) {\n $query['EipMask'] = $request->eipMask;\n }\n if (!Utils::isUnset($request->internetChargeType)) {\n $query['InternetChargeType'] = $request->internetChargeType;\n }\n if (!Utils::isUnset($request->isp)) {\n $query['Isp'] = $request->isp;\n }\n if (!Utils::isUnset($request->netmode)) {\n $query['Netmode'] = $request->netmode;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceGroupId)) {\n $query['ResourceGroupId'] = $request->resourceGroupId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->zone)) {\n $query['Zone'] = $request->zone;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'AllocateEipSegmentAddress',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return AllocateEipSegmentAddressResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"public function registerRequest(array $aArgs = []): xajaxRequest;",
"function test_callback($evhttp_request)\n{\n echo \"script-land memory: \".memory_get_usage().\" and real memory from system: \".memory_get_usage(true).\"\\n\";\n\n $uri = evhttp_request_uri($evhttp_request);\n\n $ct = evhttp_request_find_header($evhttp_request, 'Content-Type');\n echo \"URI: $uri\\n\";\n echo \"Content-Type: $ct\\n\";\n\n print_r(evhttp_request_headers($evhttp_request));\n echo evhttp_request_body($evhttp_request);\n\tevhttp_response_add_header($evhttp_request, \"Content-Type\", \"text/plain\");\n\n \treturn evhttp_response_set(\"Hello World!\", 200, \"OK\");\n}",
"private function buildRequest()\n {\n return [\n 'AppKey' => $this->accessKey,\n 'Secret' => $this->secretKey,\n $this->dataKey => [],\n $this->deleteKey => [],\n 'Format' => 'magentoplugin1.0.0'\n ];\n }",
"public function get_request():array;"
] | [
"0.60924536",
"0.5773842",
"0.55240405",
"0.5454421",
"0.5431662",
"0.52889556",
"0.52188677",
"0.49557447",
"0.49191543",
"0.4901371",
"0.48717958",
"0.48595876",
"0.48300263",
"0.46865118",
"0.46819136",
"0.4656727",
"0.4597769",
"0.455397",
"0.45352516",
"0.45316443",
"0.45131493",
"0.45089534",
"0.44635662",
"0.44627082",
"0.44517124",
"0.44316798",
"0.44308648",
"0.44264498",
"0.44214472",
"0.44168484"
] | 0.6763868 | 0 |
Operation memorylessAugmentAsyncWithHttpInfo Answers a given query from the documents in the index | public function memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])
{
$returnType = '\Semanticwrap\Model\AugmentationResponse';
$request = $this->memorylessAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAsyncAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAsyncAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/async/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n $request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\Semanticwrap\\Model\\AsyncProcessResponse' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\Semanticwrap\\Model\\AsyncProcessResponse' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\Semanticwrap\\Model\\AsyncProcessResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Semanticwrap\\Model\\AsyncProcessResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memoryfullAugmentRequest($index_name, $payload, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function memorylessAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n return $this->memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function memoryfullAugmentRequest($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memoryfullAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memoryfullAugment'\n );\n }\n\n\n\n\n $resourcePath = '/augment/memoryfull/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAsyncAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n $request = $this->memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function memorylessAsyncAugment($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n list($response) = $this->memorylessAsyncAugmentWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n return $response;\n }",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function assemble(array $info, array $query = null) {}",
"public function numbersearchGetAsyncWithHttpInfo($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->numbersearchGetRequest($api_version, $offset, $limit, $country, $prefix, $contains, $number_type);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function assemble(array $info, array $query = null);",
"public function assemble(array $info, array $query = null){ }",
"public function memoryfullAugmentAsync($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n return $this->memoryfullAugmentAsyncWithHttpInfo($index_name, $payload, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function memorylessAsyncAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n return $this->memorylessAsyncAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function numbersearchGetWithHttpInfo($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->numbersearchGetRequest($api_version, $offset, $limit, $country, $prefix, $contains, $number_type);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse2006',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse403',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse500',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function complexAugmentAsyncWithHttpInfo($payload, string $contentType = self::contentTypes['complexAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AsyncProcessResponse';\n $request = $this->complexAugmentRequest($payload, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"protected function numbersearchGetRequest($api_version = '1.0', $offset = '0', $limit = '10', $country = 'US', $prefix = null, $contains = null, $number_type = null)\n {\n\n $resourcePath = '/numbersearch/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($offset !== null) {\n $queryParams['offset'] = ObjectSerializer::toQueryValue($offset);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($country !== null) {\n $queryParams['country'] = ObjectSerializer::toQueryValue($country);\n }\n // query params\n if ($prefix !== null) {\n $queryParams['prefix'] = ObjectSerializer::toQueryValue($prefix);\n }\n // query params\n if ($contains !== null) {\n $queryParams['contains'] = ObjectSerializer::toQueryValue($contains);\n }\n // query params\n if (is_array($number_type)) {\n $number_type = ObjectSerializer::serializeCollection($number_type, 'csv', true);\n }\n if ($number_type !== null) {\n $queryParams['number_type'] = ObjectSerializer::toQueryValue($number_type);\n }\n // header params\n if ($api_version !== null) {\n $headerParams['api-version'] = ObjectSerializer::toHeaderValue($api_version);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function queryPatternsAsyncWithHttpInfo($offset = null, $limit = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $request = $this->queryPatternsRequest($offset, $limit);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function searchCouponsAdvancedApplicationWideAsyncWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null)\n {\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse2001';\n $request = $this->searchCouponsAdvancedApplicationWideRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function queryPatternsWithHttpInfo($offset = null, $limit = null)\n {\n $request = $this->queryPatternsRequest($offset, $limit);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\MsaQueryResponse' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaQueryResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 403:\n if ('\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 429:\n if ('\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n default:\n if ('\\OpenAPI\\Client\\Model\\MsaQueryResponse' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\MsaQueryResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaQueryResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaReplyMetaOnly',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n default:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\MsaQueryResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function searchCouponsAdvancedWithHttpInfo($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null)\n {\n $request = $this->searchCouponsAdvancedRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\TalonOne\\Client\\Model\\InlineResponse2001' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\TalonOne\\Client\\Model\\InlineResponse2001', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse2001';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\TalonOne\\Client\\Model\\InlineResponse2001',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"function assemble(array $info, array $query = null)\n {\n return false;\n }",
"function razuna_query($query) {\n\t $target = htmlspecialchars($_SERVER[\"PHP_SELF\"]);\n\t $search_limit = array(\"img\" => \"image only\", \"vid\" => \"video only\",\"doc\" => \"document only\",\"aud\" => \"audio only\");\n \n //if the form has been submitted (see if statement above) perform the functions below \n //For each step see the functions below\n //1. Replace white space in the search query with %20\n //2. Prepare the QUERY STRING portion of the url \n //3. Build the file url using the BASE var, the API Key, the QUERY STRING AND any search limiters ($show_ass) \n //4. Pass the url to JSON AND CREATE THE RAZUNA array\n //5. Convert the RAZUNA ARRAY to the data model of the new IMREE array, return the final array to AIR\n \n return return_array($query);\n \n }",
"function indextank_index_posts($offset=0, $pagesize=30){\n $api_url = get_option(\"it_api_url\");\n $index_name = get_option(\"it_index_name\");\n if ($api_url and $index_name) { \n $client = new Indextank_Api($api_url);\n $index = $client->get_index($index_name);\n $max_execution_time = ini_get('max_execution_time');\n $max_input_time = ini_get('max_input_time');\n ini_set('max_execution_time', 0);\n ini_set('max_input_time', 0);\n $my_query = new WP_Query();\n $query_res = $my_query->query(\"post_status=publish&orderby=ID&order=DESC&post_type=any&posts_per_page=$pagesize&offset=$offset\");\n $message = \"\";\n if ($query_res) {\n // this may throw an exception .. let it float!\n indextank_batch_add_posts($index, $query_res);\n \n // count all posts, even from previous iterations\n $count = $offset + count($query_res);\n $message = \"<b>Indexed $count posts</b>\";\n }\n ini_set('max_execution_time', $max_execution_time);\n ini_set('max_input_time', $max_input_time);\n return $message;\n }\n\n return NULL;\n\n}",
"public function searchAdvance(Request $request)\n {\n $client = ClientBuilder::create()->build();\n //Default search\n $params =[\n \"index\" =>\"picinside\",\n \"type\" =>\"themes\",\n \"from\" =>0,\n \"size\" =>500,\n \"body\" =>[\n \"query\"=>[\n \"match\"=> [\n \"_all\" => $request['q']\n ],\n ]\n ]\n ];\n\n //Advance search\n if ($request[\"enable-advance\"] != null)\n {\n if($request['search'] == null) $request['search'] = 'name';\n $params =[\n \"index\" => \"picinside\",\n \"type\" => \"themes\",\n \"from\" => 0,\n \"size\" => 500,\n \"body\" => [\n \"query\" => [\n \"match\" => [\n $request['search'] => $request['q']\n ],\n ],\n \"sort\" => [\n \"sales\" => \"desc\"\n ]\n\n ]\n ];\n }\n\n //Advance search\n if ($request[\"orderby-sales\"] != null)\n {\n if($request['search'] == null) $request['search'] = 'name';\n $params =[\n \"index\" => \"picinside\",\n \"type\" => \"themes\",\n \"from\" => 0,\n \"size\" => 500,\n \"body\" => [\n \"query\" => [\n \"match_all\" => [],\n ],\n \"sort\" => [\n \"sales\" => \"desc\"\n ]\n\n ]\n ];\n }\n\n $results = $client->search($params);\n $data = $results['hits']['hits'];\n return view('search.tableajax', compact('data','results'));\n }"
] | [
"0.58394563",
"0.5807819",
"0.5602128",
"0.5599191",
"0.53266495",
"0.5276791",
"0.52653664",
"0.5021414",
"0.48749202",
"0.48749202",
"0.48749202",
"0.48749202",
"0.48749202",
"0.48749202",
"0.48170006",
"0.47902572",
"0.47700956",
"0.47009912",
"0.4579547",
"0.44613466",
"0.44207305",
"0.42844695",
"0.42393044",
"0.42295685",
"0.42118257",
"0.412211",
"0.41160637",
"0.40732908",
"0.40649092",
"0.40611327"
] | 0.58292896 | 1 |
Create request for operation 'memorylessAugment' | public function memorylessAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])
{
// verify the required parameter 'index_name' is set
if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $index_name when calling memorylessAugment'
);
}
// verify the required parameter 'payload' is set
if ($payload === null || (is_array($payload) && count($payload) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $payload when calling memorylessAugment'
);
}
$resourcePath = '/augment/memoryless/{index_name}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$context_mandatory,
'context_mandatory', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$custom_context,
'custom_context', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$ignore_query,
'ignore_query', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$with_source,
'with_source', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// path params
if ($index_name !== null) {
$resourcePath = str_replace(
'{' . 'index_name' . '}',
ObjectSerializer::toPathValue($index_name),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(
['application/json', ],
$contentType,
$multipart
);
// for model (json/xml)
if (isset($payload)) {
if (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the body
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));
} else {
$httpBody = $payload;
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'POST',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function memoryfullAugmentRequest($index_name, $payload, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memoryfullAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memoryfullAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memoryfullAugment'\n );\n }\n\n\n\n\n $resourcePath = '/augment/memoryfull/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function memorylessAsyncAugmentRequest($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAsyncAugment'][0])\n {\n\n // verify the required parameter 'index_name' is set\n if ($index_name === null || (is_array($index_name) && count($index_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $index_name when calling memorylessAsyncAugment'\n );\n }\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling memorylessAsyncAugment'\n );\n }\n\n\n\n\n\n\n $resourcePath = '/augment/async/memoryless/{index_name}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $context_mandatory,\n 'context_mandatory', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $custom_context,\n 'custom_context', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $ignore_query,\n 'ignore_query', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $with_source,\n 'with_source', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($index_name !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($index_name),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public abstract function generateRequestObject();",
"function prov_assocArray_to_Http_ServerRequest()\n{\n return [\n \"param1\" => \"paramValue1\",\n \"param2\" => \"paramValue2\",\n \"param3\" => \"paramValue3\",\n \"param4\" => \"paramValue4\",\n ];\n}",
"public function complexAugmentRequest($payload, string $contentType = self::contentTypes['complexAugment'][0])\n {\n\n // verify the required parameter 'payload' is set\n if ($payload === null || (is_array($payload) && count($payload) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling complexAugment'\n );\n }\n\n\n $resourcePath = '/augment/complex-chain/docs';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($payload)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payload));\n } else {\n $httpBody = $payload;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function allocateAddress($request);",
"public function createClone(): RequestInterface;",
"public function toRequest() {\n\t\t// add all attributes back to the request\n\t\tforeach($this->attributes as $key => $attribute) {\n\t\t\t$this->parameters[$key] = $attribute;\n\t\t}\n\t}",
"public function getRequestData(): Bag;",
"abstract public function buildRequest();",
"public function create()\n {\n //\n // return $req->\n }",
"public function allocateEipSegmentAddressWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->bandwidth)) {\n $query['Bandwidth'] = $request->bandwidth;\n }\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->eipMask)) {\n $query['EipMask'] = $request->eipMask;\n }\n if (!Utils::isUnset($request->internetChargeType)) {\n $query['InternetChargeType'] = $request->internetChargeType;\n }\n if (!Utils::isUnset($request->isp)) {\n $query['Isp'] = $request->isp;\n }\n if (!Utils::isUnset($request->netmode)) {\n $query['Netmode'] = $request->netmode;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceGroupId)) {\n $query['ResourceGroupId'] = $request->resourceGroupId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->zone)) {\n $query['Zone'] = $request->zone;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'AllocateEipSegmentAddress',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return AllocateEipSegmentAddressResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"function get_request_obj()\n {\n $request = new SimpleXMLElement(\"<packet></packet>\");\n $request->addAttribute(\"version\", \"1.6.3.0\");\n\n return $request;\n }",
"public function create(array $request)\n {\n $apiReques = [];\n $url = $this->getUrl();\n $apiRequest[\"Token\"] = $request[\"Token\"];\n $apiRequest[\"Amount\"] = $request[\"Amount\"];\n\n $this->log->writeLog($apiReques);\n \n $headers = array(\"Content-Type\" => \"application/json\", \"Accept\" => \"application/json\", \"Authorization\" => $request[\"datacap_mid\"]);\n return $this->transferBuilder\n ->setMethod('POST')\n ->setHeaders($headers)\n ->setUri($url)\n ->setBody($apiRequest)\n ->build();\n }",
"public function memorylessAugmentAsync($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n return $this->memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function allocateEipAddressWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->activityId)) {\n $query['ActivityId'] = $request->activityId;\n }\n if (!Utils::isUnset($request->autoPay)) {\n $query['AutoPay'] = $request->autoPay;\n }\n if (!Utils::isUnset($request->bandwidth)) {\n $query['Bandwidth'] = $request->bandwidth;\n }\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->description)) {\n $query['Description'] = $request->description;\n }\n if (!Utils::isUnset($request->ISP)) {\n $query['ISP'] = $request->ISP;\n }\n if (!Utils::isUnset($request->instanceChargeType)) {\n $query['InstanceChargeType'] = $request->instanceChargeType;\n }\n if (!Utils::isUnset($request->instanceId)) {\n $query['InstanceId'] = $request->instanceId;\n }\n if (!Utils::isUnset($request->internetChargeType)) {\n $query['InternetChargeType'] = $request->internetChargeType;\n }\n if (!Utils::isUnset($request->ipAddress)) {\n $query['IpAddress'] = $request->ipAddress;\n }\n if (!Utils::isUnset($request->name)) {\n $query['Name'] = $request->name;\n }\n if (!Utils::isUnset($request->netmode)) {\n $query['Netmode'] = $request->netmode;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->period)) {\n $query['Period'] = $request->period;\n }\n if (!Utils::isUnset($request->pricingCycle)) {\n $query['PricingCycle'] = $request->pricingCycle;\n }\n if (!Utils::isUnset($request->publicIpAddressPoolId)) {\n $query['PublicIpAddressPoolId'] = $request->publicIpAddressPoolId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceGroupId)) {\n $query['ResourceGroupId'] = $request->resourceGroupId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->securityProtectionTypes)) {\n $query['SecurityProtectionTypes'] = $request->securityProtectionTypes;\n }\n if (!Utils::isUnset($request->zone)) {\n $query['Zone'] = $request->zone;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'AllocateEipAddress',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return AllocateEipAddressResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"public function createRequest() {\n $query = [];\n $config = $this->configFactory->get('open_weather_map.settings');\n $key_config = $this->configFactory->get('open_weather_map.settings')->get('key');\n $query['appid'] = Html::escape($key_config);\n $cityname = Html::escape($config->get('cityname'));\n $country_code = Html::escape($config->get('country_code'));\n\n $query['q'] = $cityname . \",\" . $country_code;\n return $query;\n }",
"public function toArray($request)\n {\n /*$mortgage_application_resource = [\n 'type' => 'mortgage_application',\n 'id' => (string) $this->getRouteKey(),\n 'attributes' => [\n 'first_name' => $this->resource->first_name,\n 'last_name' => $this->resource->last_name,\n 'email' => $this->resource->email,\n 'phone_number' => $this->resource->phone_number,\n 'net_income' => (string) $this->resource->net_income,\n 'requested_amount' => (string) $this->resource->requested_amount,\n 'mortgage_expert_id' => (string) $this->resource->mortgage_expert_id,\n 'scoring' => (string) $this->resource->scoring,\n 'assignment_date' => $this->resource->assignment_date ?? \"\",\n 'start_time_slot' => (string) $this->resource->start_time_slot,\n 'end_time_slot' => (string) $this->resource->end_time_slot,\n 'created_at' => $this->resource->created_at,\n 'updated_at' => $this->resource->updated_at,\n ]\n ];\n\n if (isset($this->resource->mortgage_expert))\n array_push($mortgage_application_resource, [\n 'relationships' => new MortgageApplicationRelationshipResource($this)\n ]);\n\n array_\n\n array_push($mortgage_application_resource, [\n 'links' => [\n 'self' => url(route('api.v1.mortgage.applications.show', $this)),\n 'mortgage_applications' => url(route('api.v1.mortgage.applications.index')),\n ]\n ]);\n\n return $mortgage_application_resource;*/\n return [\n 'type' => 'mortgage_application',\n 'id' => (string) $this->getRouteKey(),\n 'attributes' => [\n 'first_name' => $this->resource->first_name,\n 'last_name' => $this->resource->last_name,\n 'email' => $this->resource->email,\n 'phone_number' => $this->resource->phone_number,\n 'net_income' => (string) $this->resource->net_income,\n 'requested_amount' => (string) $this->resource->requested_amount,\n 'mortgage_expert_id' => (string) $this->resource->mortgage_expert_id,\n 'scoring' => (string) $this->resource->scoring,\n 'assignment_date' => $this->resource->assignment_date ?? \"\",\n 'start_time_slot' => (string) $this->resource->start_time_slot,\n 'end_time_slot' => (string) $this->resource->end_time_slot,\n 'created_at' => $this->resource->created_at,\n 'updated_at' => $this->resource->updated_at,\n ],\n 'relationships' => new MortgageApplicationRelationshipResource($this),\n 'links' => [\n 'self' => url(route('api.v1.mortgage.applications.show', $this)),\n 'mortgage_applications' => url(route('api.v1.mortgage.applications.index')),\n ],\n ];\n }",
"public function allocateAssets() {\n try {\n $serviceToCall = \"InvestmentWS\";\n\n $lsCalcXmlClientObject = new nusoap_client($this->serviceUrl . \"/\" . $serviceToCall);\n\n $lsCalcXmlClientObject->setCurlOption(CURLOPT_SSLVERSION, 3);\n\n $lsCalcXmlReqestXmlBody = <<<END\n <calcxmlRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.calcxml.com/schema/calcxmlRequest.xsd\" username=\"{$this->user}\" password=\"{$this->password}\" responseType=\"raw\" returnRelevantLinks=\"false\" chartLibrary=\"none\" version=\"1.3\"><dataTable><cssClassName>simpletable</cssClassName></dataTable>\n <calcInput includeInResponse=\"true\">\n <inv01>\n <q1>A</q1>\n <q2>A</q2>\n <q3>A</q3>\n <q4>A</q4>\n <q5>A</q5>\n <q6>A</q6>\n <q7>A</q7>\n <q8>A</q8>\n <q9>A</q9>\n <q10>A</q10>\n </inv01>\n </calcInput>\n</calcxmlRequest>\nEND;\n $lsCalcXmlReqestXmlBodyENT = self::xmlentities($lsCalcXmlReqestXmlBody);\n\n //request to soap service\n $lsCalcXmlReqestXml = <<<END\n<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <soapenv:Body>\n <inv01 xmlns=\"http://webservice.calcxml.com\">\n <in0 xsi:type=\"xsd:string\">\n {$lsCalcXmlReqestXmlBodyENT}\n </in0>\n </inv01>\n </soapenv:Body>\n</soapenv:Envelope>\nEND;\n $lsCalcXMLResponseArray = $lsCalcXmlClientObject->send($lsCalcXmlReqestXml);\n\n if ($lsCalcXmlClientObject->fault) {\n //throw the exception\n // throw new CException('');\n } else {\n\n if (isset($lsCalcXMLResponseArray[\"inv01Return\"])) {\n $lsXmlResponseDom = new DOMDocument();\n $lsXmlResponseDom->loadXML($lsCalcXMLResponseArray[\"inv01Return\"]);\n $outputCalc = $lsXmlResponseDom->getElementsByTagName(\"inv01Out\")->item(0);\n print_r($outputCalc);\n die;\n }\n }\n } catch (SoapFault $E) {\n print_r($E);\n die;\n throw new CException('');\n }\n }",
"public function testCreateRequest(){\n\n }",
"public function createNatIpWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->dryRun)) {\n $query['DryRun'] = $request->dryRun;\n }\n if (!Utils::isUnset($request->natGatewayId)) {\n $query['NatGatewayId'] = $request->natGatewayId;\n }\n if (!Utils::isUnset($request->natIp)) {\n $query['NatIp'] = $request->natIp;\n }\n if (!Utils::isUnset($request->natIpCidr)) {\n $query['NatIpCidr'] = $request->natIpCidr;\n }\n if (!Utils::isUnset($request->natIpDescription)) {\n $query['NatIpDescription'] = $request->natIpDescription;\n }\n if (!Utils::isUnset($request->natIpName)) {\n $query['NatIpName'] = $request->natIpName;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'CreateNatIp',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return CreateNatIpResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"protected function createRequest () {\n \treturn new HTTP_Request2();\n }",
"public function createNatGatewayWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->autoPay)) {\n $query['AutoPay'] = $request->autoPay;\n }\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->description)) {\n $query['Description'] = $request->description;\n }\n if (!Utils::isUnset($request->duration)) {\n $query['Duration'] = $request->duration;\n }\n if (!Utils::isUnset($request->eipBindMode)) {\n $query['EipBindMode'] = $request->eipBindMode;\n }\n if (!Utils::isUnset($request->icmpReplyEnabled)) {\n $query['IcmpReplyEnabled'] = $request->icmpReplyEnabled;\n }\n if (!Utils::isUnset($request->instanceChargeType)) {\n $query['InstanceChargeType'] = $request->instanceChargeType;\n }\n if (!Utils::isUnset($request->internetChargeType)) {\n $query['InternetChargeType'] = $request->internetChargeType;\n }\n if (!Utils::isUnset($request->name)) {\n $query['Name'] = $request->name;\n }\n if (!Utils::isUnset($request->natType)) {\n $query['NatType'] = $request->natType;\n }\n if (!Utils::isUnset($request->networkType)) {\n $query['NetworkType'] = $request->networkType;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->pricingCycle)) {\n $query['PricingCycle'] = $request->pricingCycle;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->securityProtectionEnabled)) {\n $query['SecurityProtectionEnabled'] = $request->securityProtectionEnabled;\n }\n if (!Utils::isUnset($request->spec)) {\n $query['Spec'] = $request->spec;\n }\n if (!Utils::isUnset($request->tag)) {\n $query['Tag'] = $request->tag;\n }\n if (!Utils::isUnset($request->vSwitchId)) {\n $query['VSwitchId'] = $request->vSwitchId;\n }\n if (!Utils::isUnset($request->vpcId)) {\n $query['VpcId'] = $request->vpcId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'CreateNatGateway',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return CreateNatGatewayResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"public static function requestBuild(){\n $tranDateTime = DateTime::getDateTime();\n $uuid = Uuid::generate()->string;\n $applicationId = \"Sadad\";\n $request = array();\n $request += [\"applicationId\" => $applicationId];\n $request += [\"UUID\" => $uuid];\n $request += [\"tranDateTime\" => $tranDateTime];\n\n return $request;\n }",
"protected function setUpOwsRequest()\n {\n $request = ms_newOwsRequestObj();\n //$request->loadparams();\n foreach ($_REQUEST as $n => $v) {\n if ($n[0] !== '_') {\n $request->setParameter($n, $v);\n }\n }\n\n return $request;\n }",
"public function memorylessAugmentAsyncWithHttpInfo($index_name, $payload, $context_mandatory = null, $custom_context = null, $ignore_query = null, $with_source = null, string $contentType = self::contentTypes['memorylessAugment'][0])\n {\n $returnType = '\\Semanticwrap\\Model\\AugmentationResponse';\n $request = $this->memorylessAugmentRequest($index_name, $payload, $context_mandatory, $custom_context, $ignore_query, $with_source, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"abstract public function getRequestParameters(): array;",
"public function get_request():array;",
"public function getRequestObject();",
"function NewRequest() {\n\t\t$this->PostString = \"\";\n\t\t$this->RawData = \"\";\n\t\t$this->Values = \"\";\n\t}"
] | [
"0.622944",
"0.6015243",
"0.50806403",
"0.48501742",
"0.48470342",
"0.48355117",
"0.47464198",
"0.4718742",
"0.47147644",
"0.46793938",
"0.46751174",
"0.46707028",
"0.46006578",
"0.45902002",
"0.45243445",
"0.4514464",
"0.44772506",
"0.44768262",
"0.44635338",
"0.4452297",
"0.444879",
"0.44408667",
"0.44323042",
"0.44177392",
"0.441065",
"0.4404688",
"0.43656278",
"0.43492472",
"0.43418896",
"0.43389276"
] | 0.67055017 | 0 |
Builds the unsigned string for column. Defaults to unsupported. | protected function buildUnsignedString(): string
{
return $this->isUnsigned() ? ' UNSIGNED' : '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUnsignedText(): string\n {\n return '';\n }",
"protected function typeUniversalProductNumber(Fluent $column): string\n {\n return 'upc';\n }",
"public function buildColumn($column) {\n\t\t$col = $this->columns[$column['type']];\n\t\tif (!isset($col['length']) && !isset($col['limit'])) {\n\t\t\tunset($column['length']);\n\t\t}\n\t\t$out = parent::buildColumn($column);\n\n\t\t$out = preg_replace(\n\t\t\t'/integer\\([0-9]+\\)/',\n\t\t\t'integer',\n\t\t\t$out\n\t\t);\n\t\t$out = preg_replace(\n\t\t\t'/bigint\\([0-9]+\\)/',\n\t\t\t'bigint',\n\t\t\t$out\n\t\t);\n\n\t\t$out = str_replace('integer serial', 'serial', $out);\n\t\t$out = str_replace('bigint serial', 'bigserial', $out);\n\t\tif (strpos($out, 'timestamp DEFAULT')) {\n\t\t\tif (isset($column['null']) && $column['null']) {\n\t\t\t\t$out = str_replace('DEFAULT NULL', '', $out);\n\t\t\t} else {\n\t\t\t\t$out = str_replace('DEFAULT NOT NULL', '', $out);\n\t\t\t}\n\t\t}\n\t\tif (strpos($out, 'DEFAULT DEFAULT')) {\n\t\t\tif (isset($column['null']) && $column['null']) {\n\t\t\t\t$out = str_replace('DEFAULT DEFAULT', 'DEFAULT NULL', $out);\n\t\t\t} elseif (in_array($column['type'], array('integer', 'float'))) {\n\t\t\t\t$out = str_replace('DEFAULT DEFAULT', 'DEFAULT 0', $out);\n\t\t\t} elseif ($column['type'] === 'boolean') {\n\t\t\t\t$out = str_replace('DEFAULT DEFAULT', 'DEFAULT FALSE', $out);\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}",
"public function buildColumns(array|string $columns): string;",
"function toSQL() {\n \t\treturn \"0\";\n \t}",
"public function ___build(): string\n {\n $tables = \\implode(', ', $this->tables);\n $fields = \\implode(', ', $this->fields);\n $where = $orderBy = $limit = '';\n\n if ($this->where != '') {\n $where = \\sprintf(' WHERE %s', $this->where);\n }\n if (\\count($this->orderBy) > 0) {\n $orderBy = \\sprintf(' ORDER BY %s', \\implode(', ', $this->orderBy));\n }\n if ($this->limit != 0) {\n $limit = \\sprintf(' LIMIT %s', $this->limit);\n }\n\n return \\sprintf('UPDATE %s SET %s%s%s%s', $tables, $fields, $where, $orderBy, $limit);\n }",
"public function generate()\n {\n $sql = new Str();\n $sql->append('`' . $this->key . '` ')\n ->append($this->type);\n\n if(!is_null($this->length))\n {\n $sql->append('(' . $this->length . ')');\n }\n\n if(!is_null($this->not_null))\n {\n $sql->append(' NOT NULL');\n }\n\n if(!is_null($this->default))\n {\n $sql->append(\" DEFAULT '\")\n ->append($this->default)\n ->append(\"'\");\n }\n\n return $sql->get();\n }",
"public function unsigned() : SchemaPropertyDescriptor\n {\n $this->m_isUnsigned = true;\n return $this;\n }",
"private function generateColumnSQL($info) {\n $sql = '';\n if (isset($info['old_name'])) {\n $sql = '`'.$info['old_name'].'` ';\n }\n $sql .= '`'.$info['name'].'` '.$this->getSQLTypeForField($info);\n if (isset($info['unsigned'])) $sql .= ' unsigned';\n if (isset($info['zerofill'])) $sql .= ' zerofill';\n if (isset($info['auto_increment'])) {\n $sql .= ' NOT NULL auto_increment';\n } elseif (isset($info['default']) && (strpos($info['default'], '#sql#') === false)) {\n $sql .= ' DEFAULT \\''.$info['default'].\"'\";\n } elseif (isset($info['not_null'])) {\n $sql .= ' NOT NULL';\n }\n //var_dump($sql);die();\n return $sql;\n }",
"public function __toString()\n {\n return\n $this->type .\n $this->buildLengthString() .\n $this->buildNotNullString() .\n $this->buildUniqueString() .\n $this->buildDefaultString() .\n $this->buildCheckString() .\n $this->buildCommentString();\n }",
"public function __toString() {\n\t\tif ($this->isIndex()) return $this->compileIndex();\n\t\tif ($this->isDropIndex()) return $this->compileDropIndex();\n\t\tif ($this->name === 'dropColumn') return $this->compileDropColumn();\n\n\t\treturn 'Unknown command: ' . $this->name . ' -> ' . json_encode($this->parameters);\n\t}",
"public function build(): string\n {\n $counter = Helpers::dec2bin($this->counter, 8);\n\n return $counter;\n }",
"public function ___build(): string\n {\n $fields = \\implode(', ', $this->fields);\n $from = \\implode(', ', $this->from);\n $join = $where = $groupBy = $having = $orderBy = $limit = $offset = '';\n\n if (\\count($this->join) > 0) {\n $join = \\implode('', $this->join);\n }\n if ($this->where !== '') {\n $where = \\sprintf(' WHERE %s', $this->where);\n }\n if (\\count($this->groupBy) > 0) {\n $groupBy = \\sprintf(' GROUP BY %s', \\implode(', ', $this->groupBy));\n }\n if ($this->having !== '') {\n $having = \\sprintf(' HAVING %s', $this->having);\n }\n if (\\count($this->orderBy) > 0) {\n $orderBy = \\sprintf(' ORDER BY %s', \\implode(', ', $this->orderBy));\n }\n if ($this->limit !== 0) {\n $limit = \\sprintf(' LIMIT %s', $this->limit);\n }\n if ($this->offset !== 0) {\n $offset = \\sprintf(' OFFSET %s', $this->offset);\n }\n\n return \\sprintf(\n 'SELECT %s FROM %s%s%s%s%s%s%s%s',\n $fields,\n $from,\n $join,\n $where,\n $groupBy,\n $having,\n $orderBy,\n $limit,\n $offset\n );\n }",
"public function build()\n {\n $this->values = [];\n\n $fields = [];\n foreach ($this->setValues as $key => $value) {\n if ($id = $this->escapeIdentifier($key)) {\n $fields[] = $id.' = ?';\n $this->values[] = $value;\n }\n }\n\n if (count($fields) == 0) {\n return '';\n }\n\n // produces \"SET `col1`=?,`col2`=?,`col3`=?\"\n return 'SET '.implode(', ', $fields);\n }",
"public function toBinaryString() {\n $string = '';\n for ($i = $this->length - 1; $i >= 0; $i--) {\n $string .= $this->getBit($i) ? '1' : '0';\n }\n return $string;\n }",
"public function getUuidColumn(): string\n {\n return 'uuid';\n }",
"public function getUuidColumn(): string\n {\n return 'uuid';\n }",
"public static function static_toUnsignedString($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"private function BuildSQLstring()\n\t{\n\t\t$params = '';\n\t \tforeach ($this->tableSchema as $columnName) {\n\t \t\tif ($this->$columnName != null) {\n\t\t \t\tif (is_int($this->$columnName)) {\n\t\t \t\t\t$params .= $columnName . ' = ' . $this->$columnName . ', ';\n\t\t \t\t} else {\n\t\t \t\t\t$params .= $columnName . \" = '\" . $this->$columnName . \"', \";\n\t\t \t\t}\n\t \t\t}\n\t \t}\n\t \treturn trim($params, ', ');\n\t}",
"public function toSql()\n {\n return '';\n }",
"function output_data_types_as_sql()\n {\n $str_output = '';\n foreach($this->arr_field_types as $index=>$value)\n {\n $str_output .= '`'.$index.'` '.$value->field_type.\" NOT NULL,\";\n }\n return $str_output;\n }",
"protected function getEncryptedColumn(): string\n {\n return $this->encrypted ?? 'encrypted';\n }",
"public function toSql() {\n\t\treturn \"\";\n\t}",
"abstract protected function column2String($column);",
"private function actualBoardMemberStatus() : string\n {\n return BoardMemberStatus::fromDates(\n new DateTimeImmutable(),\n DateTimeImmutable::createFromMutable($this->installed_at),\n $this->demissioned_at ? DateTimeImmutable::createFromMutable($this->demissioned_at) : null,\n $this->decharged_at ? DateTimeImmutable::createFromMutable($this->decharged_at) : null\n );\n }",
"function unsigned() {\n\t\t$this->unsigned = true;\n\t\treturn $this;\n\t}",
"public function getUpSQL()\n {\n return array (\n 'default' => '\nBEGIN;\n\nALTER TABLE \"permission\"\n\n ALTER COLUMN \"key\" TYPE VARCHAR(64),\n\n ALTER COLUMN \"key\" DROP DEFAULT;\n\nCOMMIT;\n',\n);\n }",
"public function renderSQLDef()\n\t{\n\t\t$elems = array();\n\t\t$elems[] = $this->name;\n\t\t$elems[] = $this->SQLType() . (($this->maxlength) ? ('(' . $this->maxlength . ')') : '');\n\t\t$elems[] = ($this->nullable) ? 'DEFAULT NULL' : 'NOT NULL';\n\t\tif ($this->autoincrement) $elems[] = 'AUTO_INCREMENT';\n\t\tif ($this->primarykey) $elems[] = ', PRIMARY KEY(' . $this->name . ')';\n\t\treturn implode(' ', $elems);\n\t}",
"public function is_unsigned() {\n\n return $this->unsigned;\n\n }",
"protected function build_if_not_exists() {\n\t\t\n\t\treturn ($this->if_not_exists) ? ' IF NOT EXISTS' : '';\n\t\t\n\t}"
] | [
"0.60372543",
"0.5549798",
"0.5470991",
"0.5465281",
"0.5425212",
"0.54141647",
"0.5351751",
"0.5348011",
"0.53078306",
"0.5234153",
"0.5225764",
"0.5212461",
"0.51967704",
"0.51508796",
"0.51082474",
"0.5105935",
"0.5105935",
"0.5085198",
"0.50740093",
"0.49937972",
"0.4986958",
"0.49688426",
"0.49435893",
"0.49402046",
"0.4922563",
"0.49089205",
"0.4906206",
"0.4897581",
"0.48650962",
"0.4861065"
] | 0.8083118 | 1 |
Parse an di xml file to look for preferences | protected function parseDiXML(&$preferences, $diFile, $key)
{
$xml = simplexml_load_file($diFile);
foreach ($xml->children()->preference as $element) {
$preference = [];
$preference['name'] = (string) $element['for'];
$preference['instance'] = (string) $element['type'];
$preferences[$key][] = $preference;
}
// Update the totals
$preferences["total_{$key}"] = count($preferences[$key]);
$preferences['total'] = $preferences['total'] + $preferences["total_{$key}"];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function parseData()\n {\n $this->ensure(file_exists($this->_config), \"Config file isn't exist.\");\n $options = parse_ini_file($this->_config);\n if (isset($options[\"host\"])\n && isset($options[\"dbname\"])\n && isset($options[\"charset\"])) {\n \\Core\\Registry\\ApplicationRegistry::setConfig($options);\n }\n $this->ensure($options, \"The config file is empty!\");\n\n }",
"private function _cargaVarConfig()\r\n {\r\n $config_variables = simplexml_load_file('configuration.xml');\r\n foreach ($config_variables as $key => $value) {\r\n switch ($key) {\r\n case \"sdmModule_id\":\r\n $this->_moduleID = $value; break;\r\n case \"widget_name\":\r\n $this->_widget_name = $value; break;\r\n }\r\n } \r\n }",
"function load_prop($file) {\r\n global $prop, $curEle;\r\n $prop = array(array(array()));\r\n $curEle = \"\";\r\n $xml_parser = xml_parser_create();\r\n // use case-folding so we are sure to find the tag in $map_array\r\n xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);\r\n xml_set_element_handler($xml_parser, \"xmlstartElement\", \"xmlendElement\");\r\n xml_set_character_data_handler($xml_parser, \"xmlcharacterData\");\r\n if (!($fp = c_fopen($file, \"r\"))) {\r\n die(debug(\"could not open XML input\", \"red\"));\r\n }\r\n\r\n while ($data = fread($fp, 4096)) {\r\n if (!xml_parse($xml_parser, $data, feof($fp))) {\r\n die(debug(\"XML error: \" . xml_error_string(xml_get_error_code($xml_parser)) . \" at line \" . xml_get_current_line_number($xml_parser), \"red\"));\r\n }\r\n }\r\n xml_parser_free($xml_parser);\r\n $prop[\"pd\"][$curEle[0]] = $curEle[\"saved\"]; //What a fuckin' patch!! Ugh!\r\n\r\n /* Some default System properties */\r\n $prop[\"p\"][\"S_UserID_CB\"] = \"\";\r\n $prop[\"pd\"][\"S_UserID_CB\"] = \"Creado por\";\r\n $prop[\"pt\"][\"S_UserID_CB\"] = \"ref:\";\r\n\r\n $prop[\"p\"][\"S_UserID_MB\"] = \"\";\r\n $prop[\"pd\"][\"S_UserID_MB\"] = \"Modificado por\";\r\n $prop[\"pt\"][\"S_UserID_MB\"] = \"ref:\";\r\n\r\n $prop[\"p\"][\"S_Date_C\"] = \"\";\r\n $prop[\"pd\"][\"S_Date_C\"] = \"Fecha Creacion\";\r\n $prop[\"pt\"][\"S_Date_C\"] = \"date:\";\r\n\r\n $prop[\"p\"][\"S_Date_M\"] = \"\";\r\n $prop[\"pd\"][\"S_Date_M\"] = \"Fecha Modificacion\";\r\n $prop[\"pt\"][\"S_Date_M\"] = \"date:\";\r\n\r\n return ($prop);\r\n }",
"function load_prop($file) {\n\t\tglobal $prop,$curEle;\n\t\t$prop=array(array(array()));\n\t\t$curEle=\"\";\n\t\t$xml_parser = xml_parser_create();\n\t\t\t// use case-folding so we are sure to find the tag in $map_array\n\t\t\txml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);\n\t\t\txml_set_element_handler($xml_parser, \"xmlstartElement\", \"xmlendElement\");\n\t\t\txml_set_character_data_handler($xml_parser, \"xmlcharacterData\");\n\t\t\tif (!($fp = c_fopen($file, \"r\"))) {\n\t\t\t\tdie(debug(\"could not open XML input\",\"red\"));\n\t\t\t}\n\n\t\t\twhile ($data = fread($fp, 4096)) {\n\t\t\t\tif (!xml_parse($xml_parser, $data, feof($fp))) {\n\t\t\t\t\tdie(debug(\"XML error: \".xml_error_string(xml_get_error_code($xml_parser)).\" at line \".xml_get_current_line_number($xml_parser),\"red\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\txml_parser_free($xml_parser);\n\t\t\t$prop[\"pd\"][$curEle[0]]=$curEle[\"saved\"];//What a fuckin' patch!! Ugh!\n\t\t\t\n\t\t\t/* Some default System properties */\n\t\t\t$prop[\"p\"][\"S_UserID_CB\"]=\"\";\n\t\t\t$prop[\"pd\"][\"S_UserID_CB\"]=\"Creado por\";\n\t\t\t$prop[\"pt\"][\"S_UserID_CB\"]=\"ref:\";\n\t\t\t\n\t\t\t$prop[\"p\"][\"S_UserID_MB\"]=\"\";\n\t\t\t$prop[\"pd\"][\"S_UserID_MB\"]=\"Modificado por\";\n\t\t\t$prop[\"pt\"][\"S_UserID_MB\"]=\"ref:\";\n\t\t\t\n\t\t\t$prop[\"p\"][\"S_Date_C\"]=\"\";\n\t\t\t$prop[\"pd\"][\"S_Date_C\"]=\"Fecha Creacion\";\n\t\t\t$prop[\"pt\"][\"S_Date_C\"]=\"date:\";\n\t\t\t\n\t\t\t$prop[\"p\"][\"S_Date_M\"]=\"\";\n\t\t\t$prop[\"pd\"][\"S_Date_M\"]=\"Fecha Modificacion\";\n\t\t\t$prop[\"pt\"][\"S_Date_M\"]=\"date:\";\n\t\t\t\n\t\t\treturn ($prop);\n\n\t}",
"private function loadConfigXML()\n {\n\t// Read XML\n\t$oXML = new SimpleXMLElement(file_get_contents(XML_CONFIGURACIONES));\n\t$arr_config = $this->parseXML($oXML);\n\tThefCache::set(self::$cache_key, $arr_config, 60);\n\treturn $arr_config;\n }",
"function readconfig() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n $filename = $arg_list[0];\n $xmltag = $arg_list[1];\n }\n $data = implode(\"\",file($filename));\n $parser = xml_parser_create();\n xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);\n xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);\n xml_parse_into_struct($parser,$data,$values,$tags);\n xml_parser_free($parser);\n\n // loop through the structures\n foreach ($tags as $key=>$val) {\n if ($key == \"$xmltag\") {\n $noderanges = $val;\n // each contiguous pair of array entries are the\n // lower and upper range for each node definition\n for ($i=0; $i < count($noderanges); $i+=2) {\n $offset = $noderanges[$i] + 1;\n $len = $noderanges[$i + 1] - $offset;\n $tdb[] = module::parsexml(array_slice($values, $offset, $len));\n }\n } else {\n continue;\n }\n }\n return $tdb;\n }",
"private function parseConfig(){\n\t\t\treturn parse_ini_file(BASE_PATH . 'config' . DIRECTORY_SEPARATOR . 'config.ini');\n\t\t}",
"public static function configurationFromXML( DOMElement $element )\n {\n return array(\n 'name' => $element->getAttribute( 'variable' ),\n 'operand' => $element->getAttribute( 'operand' )\n );\n }",
"protected function _load() {\n $file = __DIR__ . '/../../../config/'.$this->_fileName;\n if (file_exists($file)) {\n $xml = simplexml_load_file($file);\n //print_r($xml);\n foreach ($xml as $key => $_device) {\n $this->_data[$key] = array(\n 'type' => $key,\n 'active' => (int)$_device['active'],\n 'description' => (string)$_device->description,\n 'data' => array(),\n );\n\n if ($_device->data->count()) {\n $this->_data[$key]['data'] = $this->_xml2array($_device->data->children());\n }\n }\n\n } else {\n throw new \\Exception('file '.$file.' does not exist');\n }\n }",
"function simpledir_loadconf() {\n $vals=array();\n $configfile=GSDATAOTHERPATH . 'simpledir.xml';\n if (!file_exists($configfile)) {\n //default settings\n $xml_root = new SimpleXMLElement('<settings><dirpath>' . GSDATAUPLOADPATH . '</dirpath><urlpath>' . str_replace(GSROOTPATH, '', '/' . GSDATAUPLOADPATH) . '</urlpath><ignore>php</ignore></settings>');\n if ($xml_root->asXML($configfile) === FALSE) {\n\t exit('Error saving ' . $configfile . ', check folder privlidges.');\n }\n if (defined('GSCHMOD')) {\n\t chmod($configfile, GSCHMOD);\n } else {\n chmod($configfile, 0755);\n }\n }\n\n $xml_root = simplexml_load_file($configfile);\n \n if ($xml_root !== FALSE) {\n $node = $xml_root->children();\n \n $vals['dirpath'] = (string)$node->dirpath;\n $vals['urlpath'] = (string)$node->urlpath;\n $vals['ignore'] = explode(',', (string)$node->ignore);\n\n if (empty($vals['dirpath'])) {\n $vals['dirpath'] = GSDATAUPLOADPATH;\n }\n \n if (empty($vals['urlpath'])) {\n $vals['urlpath'] = '/' . str_replace(GSROOTPATH, '', GSDATAUPLOADPATH);\n }\n }\n return($vals);\n}",
"private function parseConfig()\n {\n // setup the DI layer\n $diClass = $this->config->get(Config::KEY_DI);\n if ($diClass && class_exists($diClass)) {\n $di = new $diClass();\n if ($di instanceof DiInterface) {\n Di::setDefault($di);\n }\n }\n Di::getDefault()->set(self::KEY_CONFIG, $this->config);\n $this->setupHandlers(\n $this->config->get(Config::KEY_HANDLERS, [])\n );\n }",
"public function _Read_INI()\n\t{\n\t\t$this->props = parse_ini_file($this->inifile,true);\t\t\n\t}",
"private function read_config()\n {\n // Read from file, store as triplet (bodypart, partlocation, labellocation)\n }",
"protected function parseDiXML(&$plugins, $diFile, $key)\n {\n $xml = simplexml_load_file($diFile);\n foreach ($xml->children()->type as $element) {\n if ($element->plugin) {\n $plugin = [];\n $plugin['name'] = (string)$element['name'];\n $plugin['instance'] = (string)$element->plugin['type'];\n\n $plugins[$key][] = $plugin;\n }\n }\n\n // Update the totals\n $plugins[\"total_{$key}\"] = count($plugins[$key]);\n $plugins['total'] = $plugins['total'] + $plugins[\"total_{$key}\"];\n }",
"function _xml_parser($xml, $map = NULL) {\n\t\t$xmlObject = simplexml_load_string($xml);\t\t\n\t\t$xmlPiece = $xmlObject->xpath('NewDataSet/dbs');\n\n\t\t$data = array();\n\t\t\n\t\t// Build an array from the XML data\n\t\tforeach ($xmlPiece as $item) {\n\t\t\n\t\t\tif ($map != NULL) {\n\t\t\t\t$tmp = array_fill_keys($map, '');\n\t\t\t} else {\n\t\t\t\t$tmp = array();\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($item as $val) {\n\t\t\t\t$tmp[$val->getName()] = trim($val);\n\t\t\t}\n\t\t\t\n\t\t\t$data[] = $tmp;\n\t\t}\n\n\t\treturn $data;\n\t}",
"abstract protected function parseFile(DOMDocument $xml);",
"function process_config_xml($a = array(), $e)\n {\n $ilversion = $current_setting_group = '';\n $settingarray = array();\n $elementcount = count($a);\n for ($i = 0; $i < $elementcount; $i++)\n {\n if ($a[$i]['tag'] == 'CONFIG')\n {\n if (empty($ilversion) AND $a[$i]['type'] == 'open')\n {\n $ilversion = $a[$i]['attributes']['ILVERSION'];\n }\n }\n else if ($a[$i]['tag'] == 'CONFIGGROUP')\n {\n if ($a[$i]['type'] == 'open' OR $a[$i]['type'] == 'complete')\n {\n $current_setting_group = $a[$i]['attributes']['GROUPNAME'];\n $settinggrouparray[] = array(\n $current_setting_group, \n $a[$i]['attributes']['PARENTGROUPNAME'], \n $a[$i]['attributes']['GROUPNAME'],\n $a[$i]['attributes']['DESCRIPTION'],\n $a[$i]['attributes']['HELP'],\n $a[$i]['attributes']['CLASS'],\n $a[$i]['attributes']['SORT']\n );\n }\n }\n else if ($a[$i]['tag'] == 'SETTING')\n {\n if ($a[$i]['type'] == 'complete')\n {\n $settingarray[] = array(\n $current_setting_group, \n trim($a[$i]['attributes']['NAME']),\n trim($a[$i]['attributes']['DESCRIPTION']),\n trim($a[$i]['attributes']['VALUE']),\n trim($a[$i]['attributes']['CONFIGGROUP']),\n trim($a[$i]['attributes']['INPUTTYPE']),\n trim($a[$i]['attributes']['INPUTCODE']),\n trim($a[$i]['attributes']['INPUTNAME']),\n trim($a[$i]['attributes']['HELP']),\n trim($a[$i]['attributes']['SORT']),\n trim($a[$i]['attributes']['VISIBLE'])\n );\n }\n }\n }\n $result = array(\n 'ilversion' => $ilversion, \n 'settingarray' => $settingarray, \n 'settinggrouparray' => $settinggrouparray,\n );\n return $result;\n }",
"private function _load_conf() {\n $conf_content = file_get_contents($this->conf);\n if (strlen($conf_content) < 15 || substr($conf_content, 0, 15) != 'upage_conf_file')\n echo \"Config file in incorrect format: \" . $conf_content;\n $args = explode(\"\\n\", $conf_content);\n\n $this->disallowed_words = explode(\";\", $args[1]);\n $this->is_debug = $args[2] == \"true\";\n }",
"private function loadConfig()\n {\n $this->config = parse_ini_file('config.ini', true);\n }",
"private function _parseConfig()\n {\n if( is_dir( self::INI_DIR ) && $files = scandir( self::INI_DIR ) )\n {\n foreach( $files as $fileName )\n {\n $file = self::INI_DIR . '/' . $fileName;\n\n if( is_file( $file ) )\n {\n if( $sections = parse_ini_file( $file, TRUE ) )\n {\n foreach( $sections as $section => $config )\n {\n $config = (object) $config;\n\n if( 'spawnd' === $section )\n {\n $this->_config = $config;\n }\n else\n {\n $this->_setProcess( $section, $config );\n }\n }\n }\n else\n {\n throw new Exception( $file . ' file is invalid' );\n }\n }\n }\n }\n else\n {\n throw new Exception( self::INI_DIR . ' directory does not exist' );\n }\n }",
"function get_parse_ini($file)\n{\n if (!is_file($file))\n return false;\n $ini = file($file);\n // to hold the categories, and within them the entries\n $cats = array();\n foreach ($ini as $i) {\n if (@preg_match('/\\[(.+)\\]/', $i, $matches)) {\n $last = $matches[1];\n } elseif (@preg_match('/(.+)=(.+)/', $i, $matches)) {\n $cats[$last][trim($matches[1])] = trim($matches[2]);\n }\n }\n return $cats;\n}",
"public function LoadSettingsXML($settings_xml) {\n \n $result = FALSE;\n $settings = new SimpleXMLElement($settings_xml);\n //DONE: ~ 03.04.2012 16:46:37 to array al subkeys\n $result = $this->LoadSettingsExt(convert_xml_to_assoc($settings));\n \n return $result;\n \n }",
"public static function load() {\n self::$config = parse_ini_file(dirname(__FILE__) . \"/../configuration.loli\", true);\n }",
"function get_parse_ini($file)\n{\n if (!is_file($file))\n return false;\n\n $ini = file($file);\n\n // to hold the categories, and within them the entries\n $cats = array();\n\n foreach ($ini as $i) {\n if (@preg_match('/\\[(.+)\\]/', $i, $matches)) {\n $last = $matches[1];\n } elseif (@preg_match('/(.+)=(.+)/', $i, $matches)) {\n $cats[$last][trim($matches[1])] = trim($matches[2]);\n }\n }\n\n return $cats;\n\n}",
"public function LoadSettingsXMLFile($settings_xmlfile) {\n \n $result = FALSE;\n \n $xmlfile = realpath($settings_xmlfile);\n if(!file_exists($xmlfile)) {\n throw new Exception(\"File not found: '$settings_xmlfile'\");\n }\n \n $settings = simplexml_load_file($xmlfile);\n if(!$settings) {\n throw new Exception(\"Not XML file format: '$settings_xmlfile'\");\n }\n \n //DONE: ~ 03.04.2012 16:46:37 to array all subkeys\n $result = $this->LoadSettingsExt(convert_xml_to_assoc($settings));\n \n return $result;\n \n }",
"function parse_ini_file ($filename, $process_sections = false, $scanner_mode = 'INI_SCANNER_NORMAL') {}",
"function RecupConf(){\n\n\t\t// Regex for conf.txt file\n\t\t$reConf = \"/(.*)=\\\"(.*)\\\"/\";\n\t\t$this->readFile($reConf);\n\n\t}",
"protected function getGlobalPreferences(&$preferences, $etcModuleDir)\n {\n $key = self::GLOBAL_KEY;\n $diFile = $etcModuleDir . DIRECTORY_SEPARATOR . 'di.xml';\n $dirReader = $this->directoryReaderFactory->create($etcModuleDir);\n $preferences[$key] = [];\n $preferences[\"total_{$key}\"] = 0;\n\n if ($dirReader->isExist('di.xml')) {\n $this->parseDiXML($preferences, $diFile, $key);\n }\n }",
"function parse_config_file ($filename) {\n\tif (!file_exists($filename)) {\n\t\treturn false;\n\t}\n\tif (substr($filename, -4, 4) === '.ini') {\n\t\t$return = array();\n\t\t$lines = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n\t\tif ($lines === false) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!empty($lines)) {\n\t\t\tforeach ($lines as $linenum => $linestr) {\n\t\t\t\tif (substr($linestr, 0, 1) === ';') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$line = explode(' = ', $linestr);\n\t\t\t\t$key = trim($line[0]);\n\t\t\t\tif ((isset($line[1])) && (substr($key, 0, 1) !== '[')) {\n\t\t\t\t\tif (isset($value)) {\n\t\t\t\t\t\tunset($value);\n\t\t\t\t\t}\n\t\t\t\t\tif ((substr($line[1], 0, 1) === '\"') && (substr($line[1], -1, 1) === '\"')) {\n\t\t\t\t\t\t$value = str_replace(array('\\\\\"', '\\\\\\\\'), array('\"', '\\\\'), substr($line[1], 1, -1));\n\t\t\t\t\t}\n\t\t\t\t\telseif ((ctype_digit($line[1])) || ((substr($line[1], 0, 1) === '-') && (ctype_digit(substr($line[1], 1))))) {\n\t\t\t\t\t\t$num = $line[1];\n\t\t\t\t\t\tif (substr($num, 0, 1) === '-') {\n\t\t\t\t\t\t\t$num = substr($line[1], 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (substr($num, 0, 1) === '0') {\n\t\t\t\t\t\t\tif (substr($line[1], 0, 1) === '-') {\n\t\t\t\t\t\t\t\t$value = -octdec($line[1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$value = octdec($line[1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$value = (int)$line[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunset($num);\n\t\t\t\t\t}\n\t\t\t\t\telseif ($line[1] === 'true') {\n\t\t\t\t\t\t$value = true;\n\t\t\t\t\t}\n\t\t\t\t\telseif ($line[1] === 'false') {\n\t\t\t\t\t\t$value = false;\n\t\t\t\t\t}\n\t\t\t\t\telseif ($line[1] === 'null') {\n\t\t\t\t\t\t$value = null;\n\t\t\t\t\t}\n\t\t\t\t\telseif (preg_match('/^0[xX][0-9a-fA-F]+$/', $line[1])) {\n\t\t\t\t\t\t$value = hexdec(substr($line[1], 2));\n\t\t\t\t\t}\n\t\t\t\t\telseif (preg_match('/^\\-0[xX][0-9a-fA-F]+$/', $line[1])) {\n\t\t\t\t\t\t$value = -hexdec(substr($line[1], 3));\n\t\t\t\t\t}\n\t\t\t\t\telseif (preg_match('/^0b[01]+$/', $line[1])) {\n\t\t\t\t\t\t$value = bindec(substr($line[1], 2));\n\t\t\t\t\t}\n\t\t\t\t\telseif (preg_match('/^\\-0b[01]+$/', $line[1])) {\n\t\t\t\t\t\t$value = -bindec(substr($line[1], 3));\n\t\t\t\t\t}\n\t\t\t\t\telseif (filter_var($line[1], FILTER_VALIDATE_FLOAT) !== false) {\n\t\t\t\t\t\t$value = (float)$line[1];\n\t\t\t\t\t}\n\t\t\t\t\telseif (defined($line[1])) {\n\t\t\t\t\t\t$value = constant($line[1]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttrigger_error('Unknown value in ini file on line ' . ($linenum + 1) . ': ' . $linestr, E_USER_WARNING);\n\t\t\t\t\t}\n\t\t\t\t\tif (isset($value)) {\n\t\t\t\t\t\tif (!isset($lastkey)) {\n\t\t\t\t\t\t\t$return[$key] = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$return = array_merge_recursive_distinct($return, string_to_nested_array($lastkey, array($key => $value)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$lastkey = substr($key, 1, -1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}\n\telseif (substr($filename, -4, 4) === '.php') {\n\t\tinclude $filename;\n\t\tif ((isset($config)) && (is_array($config))) {\n\t\t\treturn $config;\n\t\t}\n\t}\n\treturn false;\n}",
"protected function parseFile(DOMDocument $xml)\n {\n $xpath = new DOMXPath($xml);\n $plugin = $xpath->query('//plugin');\n /** @var DOMElement $pluginData */\n $pluginData = $plugin->item(0);\n $info = [];\n\n if ($label = self::parseTranslatableNodeList($xpath->query('//plugin/label'))) {\n $info['label'] = $label;\n }\n\n if ($description = self::parseTranslatableNodeList($xpath->query('//plugin/description'))) {\n $info['description'] = $description;\n }\n\n $simpleFields = ['version', 'license', 'author', 'copyright', 'link'];\n foreach ($simpleFields as $simpleField) {\n if (null !== ($fieldValue = self::getElementChildValueByName($pluginData, $simpleField))) {\n $info[$simpleField] = $fieldValue;\n }\n }\n /** @var DOMElement $changelog */\n foreach ($pluginData->getElementsByTagName('changelog') as $changelog) {\n $version = $changelog->getAttribute('version');\n /** @var DOMElement $changes */\n foreach ($changelog->getElementsByTagName('changes') as $changes) {\n $lang = $changes->getAttribute('lang') ?: 'en';\n $info['changelog'][$version][$lang][] = $changes->nodeValue;\n }\n }\n /** @var DOMElement|null $compatibility */\n $compatibility = $xpath->query('//plugin/compatibility')->item(0);\n if (null !== $compatibility) {\n $info['compatibility'] = [\n 'minVersion' => $compatibility->getAttribute('minVersion'),\n 'maxVersion' => $compatibility->getAttribute('maxVersion'),\n 'blacklist' => self::parseBlacklist(\n $compatibility->getElementsByTagName('blacklist')\n ),\n ];\n }\n $requiredPlugins = self::getFirstChildren(\n $pluginData,\n 'requiredPlugins'\n );\n if (null !== $requiredPlugins) {\n $info['requiredPlugins'] = $this->parseRequiredPlugins($requiredPlugins);\n }\n\n return $info;\n }"
] | [
"0.57123774",
"0.56969815",
"0.56517065",
"0.55409396",
"0.5477763",
"0.54137886",
"0.53462994",
"0.5262166",
"0.51463217",
"0.51059884",
"0.5096041",
"0.50894505",
"0.5030926",
"0.50088346",
"0.49486336",
"0.49299455",
"0.49212894",
"0.49000445",
"0.48602843",
"0.48292425",
"0.48283273",
"0.48175317",
"0.48095894",
"0.47877508",
"0.4787193",
"0.47858816",
"0.4768042",
"0.47470373",
"0.47319406",
"0.47254547"
] | 0.67450666 | 0 |
Generate block IEP Updates. | public function renderIEPUpdates() {
$layout = RCLayout::factory()
->newLine()
->addText('V. IEP Updates (Address and include only the applicable attachments.):', $this->titleStyle());
$updates = IDEADef::getValidValues('TX_IEP_Updates');
$allUpdates = count($updates);
$values = explode(
',',
IDEAStudentRegistry::readStdKey(
$this->std->get('tsrefid') ,
'tx_ard' ,
'iep_updates' ,
$this->std->get('stdiepyear')
)
);
for ($i = 0; $i < $allUpdates; $i++) {
$layout->newLine('.martop10')
->addText('<b>' . $updates[$i]->get(IDEADefValidValue::F_VALUE_ID) . '</b>');
$check = 'N';
# if exist in array refid add checked
if (in_array($updates[$i]->get(IDEADefValidValue::F_REFID), $values)) $check = 'Y';
$this->addYN($layout->newLine('.martop10'), $check);
$layout->addText($updates[$i]->get(IDEADefValidValue::F_VALUE), '.padtop5');
}
$this->rcDoc->addObject($layout);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function commit()\n {\n CModule::IncludeModule(\"iblock\");\n $start = microtime(true);\n $startMemory = 0;\n $arSelect = [\n \"ID\",\n \"IBLOCK_ID\",\n \"PROPERTY_TEXTS\"\n ];\n\n $arFilter = [\n \"IBLOCK_ID\" => $this->getIblockId(),\n \"!PROPERTY_TEXTS\" => false\n ];\n\n $res = CIBlockElement::GetList(array(), $arFilter, false, false, $arSelect);\n\n fwrite(STDOUT, sprintf('найдено %d элементов', $res->SelectedRowsCount()) . \"\\r\\n\");\n\n $generator = $this->makeGenerator($res, 10);\n\n $el = new CIBlockElement;\n\n fwrite(STDOUT, 'старт обновления' . \"\\r\\n\");\n\n $cnt = 1;\n $ids = [];\n try {\n foreach ($generator as $request) {\n fwrite(STDOUT, sprintf('страница номер %d', $cnt) . \"\\r\\n\");\n $cnt++;\n while ($res = $request->Fetch()) {\n if (!$res || !$res['ID']) {\n continue;\n }\n fwrite(STDOUT, sprintf('обновляется элемент %d', $res['ID']) . \"\\r\\n\");\n $ids[$res['ID']] = $res['ID'];\n\n $el->Update(\n $res[\"ID\"],\n [\n \"DETAIL_TEXT\" => $res['PROPERTY_TEXTS_VALUE']['TEXT'],\n ]\n );\n\n fwrite(STDOUT, sprintf('элемент с id:%s обновлен', $res[\"ID\"]) . \"\\r\\n\");\n }\n }\n } catch (Exception $exception) {\n fwrite(STDOUT, $exception->getMessage() . \"\\r\\n\");\n }\n\n $this->setData(['IDS' => $ids]);\n $startMemory = memory_get_usage();\n $time = microtime(true) - $start;\n\n fwrite(STDOUT, sprintf('время выполнения скрипта:%d', $time) . \"\\r\\n\");\n fwrite(STDOUT, sprintf('потребление памяти:%d', $startMemory / (1024 * 1024) . \"\\r\\n\"));\n }",
"static public function saveParamsIblock()\n {\n global $DB;\n $arUpdateID = array();\n $array = array();\n\n for ($r = 0; $r < $cid = count($_POST['id']); $r++)\n $arUpdateID[] = $_POST['id'][$r];\n\n $slqSelectAllIblock = $DB->Query(\"SELECT `ID` FROM `b_sitemap_property` WHERE `TYPE`= '1'\", false);\n while ($arSelectAllIblock = $slqSelectAllIblock->Fetch())\n {\n if (!$keyOfArray = array_keys($arUpdateID, $arSelectAllIblock['ID']))\n {\n $sqlDelete = $DB->Query(\"DELETE FROM `b_sitemap_property` WHERE `TYPE` = '1' AND `ID` = '\" . $arSelectAllIblock['ID'] . \"'\", false);\n }\n }\n\n for ($x = 0; $x < count($_POST['id']); $x++)\n {\n if (LANG_CHARSET == 'windows-1251')\n {\n $resInsert = $DB->Query(\"UPDATE `b_sitemap_property` SET `CODE` = '\" . $DB->ForSql(iconv('UTF-8', 'windows-1251', $_POST['folder'][$x])) . \"', `NAME` = '\" . $DB->ForSql(iconv('UTF-8', 'windows-1251', $_POST['name'][$x])) . \"', `PATH` = '\" . $DB->ForSql(iconv('UTF-8', 'windows-1251', $_POST['path'][$x])) . \"', `MOD` = '\" . $DB->ForSql(iconv('UTF-8', 'windows-1251', $_POST['mod'][$x])) . \"', `PRIORITY` = '\" . $DB->ForSql(iconv('UTF-8', 'windows-1251', $_POST['priority'][$x])) . \"', `FREQ` = '\" . $DB->ForSql(iconv('UTF-8', 'windows-1251', $_POST['freq'][$x])) . \"', `SIT` = '\" . $DB->ForSql(iconv('UTF-8', 'windows-1251', $_POST['site'][$x])) . \"' WHERE `ID` = '\" . $DB->ForSql(iconv('UTF-8', 'windows-1251', $_POST['id'][$x])) . \"'\", false);\n }\n else\n {\n $resInsert = $DB->Query(\"UPDATE `b_sitemap_property` SET `CODE` = '\" . $DB->ForSql($_POST['folder'][$x]) . \"', `NAME` = '\" . $DB->ForSql($_POST['name'][$x]) . \"', `PATH` = '\" . $DB->ForSql($_POST['path'][$x]) . \"', `MOD` = '\" . $DB->ForSql($_POST['mod'][$x]) . \"', `PRIORITY` = '\" . $DB->ForSql($_POST['priority'][$x]) . \"', `FREQ` = '\" . $DB->ForSql($_POST['freq'][$x]) . \"', `SIT` = '\" . $DB->ForSql($_POST['site'][$x]) . \"' WHERE `ID` = '\" . $DB->ForSql($_POST['id'][$x]) . \"'\", false);\n }\n if (!$resInsert)\n {\n $array['error']['count']++;\n }\n else\n {\n $array['succes']['count']++;\n }\n }\n\n return $array;\n }",
"public function update()\n\t{\n\t\t$dbKey\t= \"dashboard_blocks_\" . \\IPS\\Member::loggedIn()->member_id;\n\t\t$blocks = \\IPS\\Request::i()->blocks;\n\t\t\n\t\tif( !isset( $blocks['main'] ) )\n\t\t{\n\t\t\t$blocks['main'] = array();\n\t\t}\n\t\tif( !isset( $blocks['side'] ) )\n\t\t{\n\t\t\t$blocks['side'] = array();\n\t\t}\n\t\t\n\t\t\\IPS\\Data\\Store::i()->$dbKey\t= $blocks;\n\n\t\tif( \\IPS\\Request::i()->isAjax() )\n\t\t{\n\t\t\t\\IPS\\Output::i()->output = 1;\n\t\t\treturn;\n\t\t}\n\n\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal( \"app=core&module=dashboard\" ), 'saved' );\n\t}",
"protected function _update()\n\t{\n\t}",
"public function for_update();",
"protected function update()\n {\n }",
"public function update() {\n\t\treturn;\n\t}",
"function update() {\r\n \r\n }",
"public function update()\n {\n\t$interval = $this->request->post('interval',12,bP_INT) * 3600;\n\tfile_put_contents(bPack_App_BaseDir . 'config/engine.interval', $interval);\t\n\t\n $this->config->set('fetch.depth', $this->request->post('depth',5,bP_INT));\n\n $this->config->set('fetch.delete_enable', $this->request->post('delete_enable',0,bP_INT));\n\n //$this->config->set('fetch.keyword_combination', $this->request->post('keyword_combination',1,bP_INT));\n \n $this->notifyHelper->set('抓取程式設定已更新!');\n $this->adminHelper->log('抓取程式設定已更新!');\n\n $this->go('system/fetch');\n }",
"protected function update(){\n\t}",
"function update() {\n\t\t\n\t}",
"protected function update () {\n\n }",
"function new_update()\n\t{\n\t\tif (!defined(PAPOO_ABS_PFAD)) {\n\t\t\tglobal $version;\n\t\t\tdefine(PAPOO_ABS_PFAD,PAPOO_ABS_PFAD);\n\t\t\tdefine(PAPOO_VERSION_STRING,$version);\n\t\t}\n\n\t\t//Update der 3.6.0\n\t\tif (stristr(PAPOO_VERSION_STRING,\"3.6.0\")) {\n\t\t\t$nr=360;\n\t\t}\n\t\t//Update der 3.6.1\n\t\tif (stristr(PAPOO_VERSION_STRING,\"3.6.1\")) {\n\t\t\t$nr=361;\n\t\t}\n\t\t//Update der 3.6.0\n\t\tif (stristr(PAPOO_VERSION_STRING,\"3.7.0\")) {\n\t\t\t$nr=370;\n\t\t}\n\t\t//Update der 3.6.1\n\t\tif (stristr(PAPOO_VERSION_STRING,\"3.7.1\")) {\n\t\t\t$nr=371;\n\t\t}\n\t\tif (stristr(PAPOO_VERSION_STRING,\"3.7.2\")) {\n\t\t\t$nr=372;\n\t\t}\n\t\tif (stristr(PAPOO_VERSION_STRING,\"3.7.3\")) {\n\t\t\t$nr=373;\n\t\t}\n\t\tif (stristr(PAPOO_VERSION_STRING,\"3.7.5\")) {\n\t\t\t$nr=375;\n\t\t}\n\n\t\t$this->content->template['update_templateweiche_ok'] = \"OK\";\n\t\t$this->content->template['update_templateweiche_new'] = \"NEU\";\n\n\t\t//Update noch nicht durchgeführt\n\t\tif ($this->checked->drin!=\"ok\") {\n\t\t\t//Update durchführen\n\t\t\tif ($this->checked->update_now==\"ok\") {\n\t\t\t\t$this->dumpnrestore->restore_load(PAPOO_ABS_PFAD.\"/update/update\".$nr.\".sql\");\n\t\t\t\t$this->db->hide_errors();\n\t\t\t\t$this->dumpnrestore->restore_save();\n\t\t\t\t//Menüpunkte zuweisen aus der alten Version\n\t\t\t\tif ($nr<370) {\n\t\t\t\t\t$this->do_old_menu();\n\t\t\t\t}\n\t\t\t\t//Interne Templates_c löschen\n\t\t\t\t$this->diverse->remove_files(PAPOO_ABS_PFAD.\"/interna/templates_c/standard/\",\".html.php\");\n\n\t\t\t\t$_SESSION['start_update']=\"20\";\n\t\t\t\t$location_url = $_SERVER['PHP_SELF'] . \"?menuid=65&drin=ok&start_update=2\";\n\t\t\t\tif ($_SESSION['debug_stopallredirect']) {\n\t\t\t\t\techo '<a href=\"' . $location_url . '\">Weiter</a>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\theader(\"Location: $location_url\");\n\t\t\t\t}\n\t\t\t\texit();\n\t\t\t}\n\n\n\t\t\t//Update Text anzeigen\n\t\t\t$dateiarray = @file(PAPOO_ABS_PFAD.\"/update/update\".$nr.\".txt\");\n\t\t\t$this->content->template['update_content_text'] =@implode($dateiarray);\n\t\t\tif (empty($this->content->template['update_content_text'])) {\n\t\t\t\t$this->content->template['update_content_text']=\"Keine Datei vorhanden / No File\";\n\t\t\t}\n\t\t\t//Update Datei anzeigen\n\t\t\t$dateiarray = @file(PAPOO_ABS_PFAD.\"/update/update\".$nr.\".sql\");\n\t\t\t$this->content->template['update_content'] =(htmlentities(@implode($dateiarray), ENT_COMPAT,'utf-8'));\n\t\t\tif (empty($this->content->template['update_content'])) {\n\t\t\t\t$this->content->template['update_content']=\"Keine Datei vorhanden / No File\";\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Fertig anzeigen\n\t\t\t$this->content->template['fertig_update']=\"ok\";\n\t\t}\n\t}",
"public function updateBlockedIp()\n\t{\n\t\t\\App\\Log::trace('Start ' . __METHOD__);\n\t\t$db = \\App\\Db::getInstance('admin');\n\t\t$time = $this->get('timelock');\n\t\t$date = new DateTime();\n\t\t$checkData = $date->modify(\"-$time minutes\")->format('Y-m-d H:i:s');\n\t\t$ip = \\App\\RequestUtil::getRemoteIP();\n\n\t\t$bfData = (new \\App\\Db\\Query())\n\t\t\t\t->select(['id', 'attempts'])\n\t\t\t\t->from('a_#__bruteforce_blocked')\n\t\t\t\t->where(['>=', 'time', $checkData])\n\t\t\t\t->andWhere(['blocked' => self::UNBLOCKED])\n\t\t\t\t->andWhere(['ip' => $ip])->one();\n\t\tif (!$bfData) {\n\t\t\t$this->setBlockedIp($ip);\n\t\t} else {\n\t\t\t$attempts = ++$bfData['attempts'];\n\t\t\t$blocked = $attempts >= $this->get('attempsnumber') ? self::BLOCKED : self::UNBLOCKED;\n\t\t\t$db->createCommand()\n\t\t\t\t->update('a_#__bruteforce_blocked', [\n\t\t\t\t\t'attempts' => $attempts,\n\t\t\t\t\t'blocked' => $blocked,\n\t\t\t\t\t], ['id' => $bfData['id']])\n\t\t\t\t->execute();\n\t\t\t$this->isBlocked = $blocked === self::BLOCKED;\n\t\t\t$this->blockedId = $bfData['id'];\n\t\t}\n\t\t$this->clearBlockedByIp($ip, $checkData);\n\t\t\\App\\Log::trace('End ' . __METHOD__);\n\t}",
"function pfblockerng_sync_cron() {\n\tglobal $config, $pfb, $pfbarr;\n\n\t// Call base hour converter\n\t$pfb_sch = pfb_cron_base_hour();\n\n\t$hour = date('G');\n\t$dow = date('N');\n\t$pfb['update_cron'] = FALSE;\n\t$log = \" CRON PROCESS START [ NOW ]\\n\";\n\tpfb_logger(\"{$log}\", 1);\n\n\t$list_type = array('pfblockernglistsv4' => '_v4', 'pfblockernglistsv6' => '_v6', 'pfblockerngdnsbl' => '_v4', 'pfblockerngdnsbleasylist' => '_v4');\n\tforeach ($list_type as $ip_type => $vtype) {\n\t\tif (!empty($config['installedpackages'][$ip_type]['config'])) {\n\t\t\tforeach ($config['installedpackages'][$ip_type]['config'] as $list) {\n\t\t\t\tif (isset($list['row']) && $list['action'] != 'Disabled' && $list['cron'] != 'Never') {\n\t\t\t\t\tforeach ($list['row'] as $row) {\n\t\t\t\t\t\tif (!empty($row['url']) && $row['state'] != 'Disabled') {\n\n\t\t\t\t\t\t\tif ($vtype == '_v4') {\n\t\t\t\t\t\t\t\t$header = \"{$row['header']}\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$header = \"{$row['header']}_v6\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Determine folder location for alias (return array $pfbarr)\n\t\t\t\t\t\t\tpfb_determine_list_detail($list['action'], '', '', '');\n\t\t\t\t\t\t\t$pfbfolder\t= $pfbarr['folder'];\n\t\t\t\t\t\t\t$pfborig\t= $pfbarr['orig'];\n\n\t\t\t\t\t\t\t// Bypass update if state is defined as 'Hold' and list file exists\n\t\t\t\t\t\t\tif ($row['state'] == 'Hold' && file_exists(\"{$pfbfolder}/{$header}.txt\")) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Allow cURL SSL downgrade if user configured.\n\t\t\t\t\t\t\t$pflex = FALSE;\n\t\t\t\t\t\t\tif ($row['state'] == 'Flex') {\n\t\t\t\t\t\t\t\t$pflex = TRUE;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch ($list['cron']) {\n\t\t\t\t\t\t\t\tcase 'EveryDay':\n\t\t\t\t\t\t\t\t\tif ($hour == $pfb['24hour']) {\n\t\t\t\t\t\t\t\t\t\tpfb_update_check($header, $row['url'], $pfbfolder, $pfborig, $pflex, $row['format']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Weekly':\n\t\t\t\t\t\t\t\t\tif ($hour == $pfb['24hour'] && $dow == $list['dow']) {\n\t\t\t\t\t\t\t\t\t\tpfb_update_check($header, $row['url'], $pfbfolder, $pfborig, $pflex, $row['format']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tif ($pfb['interval'] == '1' || in_array($hour, $pfb_sch)) {\n\t\t\t\t\t\t\t\t\t\tpfb_update_check($header, $row['url'], $pfbfolder, $pfborig, $pflex, $row['format']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// If no lists require updates, check if Continents are configured and update accordingly.\n\tif (!$pfb['update_cron']) {\n\t\tforeach ($pfb['continents'] as $continent => $pfb_alias) {\n\t\t\tif (isset($config['installedpackages']['pfblockerng' . strtolower(str_replace(' ', '', $continent))]['config'])) {\n\t\t\t\t$continent_config = $config['installedpackages']['pfblockerng' . strtolower(str_replace(' ', '', $continent))]['config'][0];\n\t\t\t\tif ($continent_config['action'] != 'Disabled') {\n\t\t\t\t\t$pfb['update_cron'] = TRUE;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ($pfb['update_cron']) {\n\t\tsync_package_pfblockerng('cron');\n\t\t$pfb['update_cron'] = FALSE;\n\t} else {\n\t\tsync_package_pfblockerng('noupdates');\n\t\t$log = \"\\n No Updates required.\\n CRON PROCESS ENDED\\n UPDATE PROCESS ENDED\\n\";\n\t\tpfb_logger(\"{$log}\", 1);\n\t}\n\n\t// Call log mgmt function\n\t// If Update GUI 'Manual view' is selected. Last output will be missed. So sleep for 5 secs.\n\tsleep(5);\n\tpfb_log_mgmt();\n}",
"public function update() {\n throw new Exception('Not Implemented', 501);\n }",
"public function update() {}",
"function DoIBlockAfterSave($arg1, $arg2 = false)\n{\n $ELEMENT_ID = false;\n $IBLOCK_ID = false;\n $OFFERS_IBLOCK_ID = false;\n $OFFERS_PROPERTY_ID = false;\n global $USER;\n\n //Check for catalog event\n if (is_array($arg2) && $arg2[\"PRODUCT_ID\"] > 0) {\n //Get iblock element\n $rsPriceElement = CIBlockElement::GetList(\n array(),\n array(\n \"ID\" => $arg2[\"PRODUCT_ID\"],\n ),\n false,\n false,\n array(\"ID\", \"IBLOCK_ID\")\n );\n if ($arPriceElement = $rsPriceElement->Fetch()) {\n $arCatalog = CCatalog::GetByID($arPriceElement[\"IBLOCK_ID\"]);\n if (is_array($arCatalog)) {\n //Check if it is offers iblock\n if ($arCatalog[\"OFFERS\"] == \"Y\") {\n //Find product element\n $rsElement = CIBlockElement::GetProperty(\n $arPriceElement[\"IBLOCK_ID\"],\n $arPriceElement[\"ID\"],\n \"sort\",\n \"asc\",\n array(\"ID\" => $arCatalog[\"SKU_PROPERTY_ID\"])\n );\n $arElement = $rsElement->Fetch();\n if ($arElement && $arElement[\"VALUE\"] > 0) {\n $ELEMENT_ID = $arElement[\"VALUE\"];\n $IBLOCK_ID = $arCatalog[\"PRODUCT_IBLOCK_ID\"];\n $OFFERS_IBLOCK_ID = $arCatalog[\"IBLOCK_ID\"];\n $OFFERS_PROPERTY_ID = $arCatalog[\"SKU_PROPERTY_ID\"];\n }\n } //or iblock wich has offers\n elseif ($arCatalog[\"OFFERS_IBLOCK_ID\"] > 0) {\n $ELEMENT_ID = $arPriceElement[\"ID\"];\n $IBLOCK_ID = $arPriceElement[\"IBLOCK_ID\"];\n $OFFERS_IBLOCK_ID = $arCatalog[\"OFFERS_IBLOCK_ID\"];\n $OFFERS_PROPERTY_ID = $arCatalog[\"OFFERS_PROPERTY_ID\"];\n } //or it's regular catalog\n else {\n $ELEMENT_ID = $arPriceElement[\"ID\"];\n $IBLOCK_ID = $arPriceElement[\"IBLOCK_ID\"];\n $OFFERS_IBLOCK_ID = false;\n $OFFERS_PROPERTY_ID = false;\n }\n }\n }\n } //Check for iblock event\n elseif (is_array($arg1) && $arg1[\"ID\"] > 0 && $arg1[\"IBLOCK_ID\"] > 0) {\n //Check if iblock has offers\n $arOffers = CIBlockPriceTools::GetOffersIBlock($arg1[\"IBLOCK_ID\"]);\n if (is_array($arOffers)) {\n $ELEMENT_ID = $arg1[\"ID\"];\n $IBLOCK_ID = $arg1[\"IBLOCK_ID\"];\n $OFFERS_IBLOCK_ID = $arOffers[\"OFFERS_IBLOCK_ID\"];\n $OFFERS_PROPERTY_ID = $arOffers[\"OFFERS_PROPERTY_ID\"];\n }\n }\n\n if ($ELEMENT_ID) {\n static $arPropCache = array();\n if (!array_key_exists($IBLOCK_ID, $arPropCache)) {\n //Check for MINIMAL_PRICE property\n $rsProperty = CIBlockProperty::GetByID(\"MINIMUM_PRICE\", $IBLOCK_ID);\n $arProperty = $rsProperty->Fetch();\n if ($arProperty)\n $arPropCache[$IBLOCK_ID] = $arProperty[\"ID\"];\n else\n $arPropCache[$IBLOCK_ID] = false;\n }\n\n if ($arPropCache[$IBLOCK_ID]) {\n //Compose elements filter\n $arProductID = array($ELEMENT_ID);\n if ($OFFERS_IBLOCK_ID) {\n $rsOffers = CIBlockElement::GetList(\n array(),\n array(\n \"IBLOCK_ID\" => $OFFERS_IBLOCK_ID,\n \"PROPERTY_\" . $OFFERS_PROPERTY_ID => $ELEMENT_ID,\n \"ACTIVE_DATE\" => \"Y\",\n \"ACTIVE\" => \"Y\",\n ),\n false,\n false,\n array(\"ID\")\n );\n while ($arOffer = $rsOffers->Fetch())\n $arProductID[] = $arOffer[\"ID\"];\n }\n\n $minPrice = 9999999999;\n $maxPrice = false;\n //Get prices\n $rsPrices = CPrice::GetList(\n array(),\n array(\n \"BASE\" => \"Y\",\n \"PRODUCT_ID\" => $arProductID,\n )\n );\n //$arGroups = $USER->GetUserGroupArray();\n $percDiscount = false;\n while ($arPrice = $rsPrices->Fetch()) {\n $PRICE = intval($arPrice[\"PRICE\"]);\n\n if ($minPrice > $PRICE) {\n $minPrice = $PRICE;\n }\n\n if ($maxPrice < $PRICE) {\n $maxPrice = $PRICE;\n }\n\n $percDiscount = CCatalogProduct::GetOptimalPrice($arPrice[\"PRODUCT_ID\"], 1, false, 'N');\n if ($percDiscount['RESULT_PRICE']['PERCENT']) {\n $percDiscount = ($percDiscount['RESULT_PRICE']['PERCENT'] / 100);\n }else{\n $percDiscount = false;\n }\n }\n }\n\n //Save found minimal price into property\n if ($minPrice !== false) {\n if ($percDiscount !== false) {\n $minPrice = round(($minPrice - ($minPrice * $percDiscount)), 2);\n }\n CIBlockElement::SetPropertyValuesEx(\n $ELEMENT_ID,\n $IBLOCK_ID,\n array(\n \"MINIMUM_PRICE\" => $minPrice,\n )\n );\n }\n\n\n\n CIBlockElement::SetPropertyValuesEx(\n $ELEMENT_ID,\n $IBLOCK_ID,\n array(\n \"MAXIMUM_PRICE\" => $maxPrice,\n )\n );\n }\n\n}",
"public function updateAuctions()\n\t{\n\t\t//Get Start/End Time\n\t\t$from = Mage::getModel('magebid/auction')->getResource()->getOldestStartDate();\n\t\t$to = Mage::getModel('magebid/auction')->getResource()->getFutureStartDate();\n\t\t\n\t\t//Make call\n\t\tif ($from!=\"\") //If there is a start date\n\t\t{\n\t\t\t$items = Mage::getModel('magebid/ebay_items')->getSellerList($from,$to);\t\t\t\n\t\t\t\n\t\t\t//For every modified item\n\t\t\tforeach ($items as $item)\n\t\t\t{\n\t\t\t\t//$mapped_item = Mage::getModel('magebid/ebay_items')->getHandler()->mappingItem($item);\t\t\t\t\t\t\t\n\t\t\t\t$auction = Mage::getModel('magebid/auction')->load($item['ebay_item_id'],'ebay_item_id');\n\t\t\t\t$auction->ebayUpdate($item);\n\t\t\t}\t\n\t\t}\n\t}",
"abstract public static function update();",
"public function update() {\t}",
"abstract protected function update();",
"public static function OnAfterIBlockUpdate($arIBlockFields){\n\t\tif(class_exists(__NAMESPACE__.'\\Exporter')){\n\t\t\t$intIBlockID = IntVal($arIBlockFields['ID']);\n\t\t\tif($intIBlockID>0){\n\t\t\t\tforeach(Exporter::getExportModules() as $strModuleId){\n\t\t\t\t\t$arQuery = [\n\t\t\t\t\t\t'filter' => array(\n\t\t\t\t\t\t\t'ACTIVE' => 'Y',\n\t\t\t\t\t\t\t'AUTO_GENERATE' => 'Y',\n\t\t\t\t\t\t),\n\t\t\t\t\t];\n\t\t\t\t\t#$resProfiles = Profile::getList($arQuery);\n\t\t\t\t\t$resProfiles = Helper::call($strModuleId, 'Profile', 'getList', [$arQuery]);\n\t\t\t\t\tif($resProfiles){\n\t\t\t\t\t\twhile($arProfile = $resProfiles->fetch()){\n\t\t\t\t\t\t\t$intProfileID = $arProfile['ID'];\n\t\t\t\t\t\t\t$arQuery = [\n\t\t\t\t\t\t\t\t'filter' => array(\n\t\t\t\t\t\t\t\t\t'PROFILE_ID' => $intProfileID,\n\t\t\t\t\t\t\t\t\t'IBLOCK_ID' => $intIBlockID,\n\t\t\t\t\t\t\t\t\t'TYPE' => 'FIELD',\n\t\t\t\t\t\t\t\t\t'VALUE' => 'IBLOCK__%',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'limit' => 1,\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t#$resValue = ProfileValue::getList($arQuery);\n\t\t\t\t\t\t\t$resValue = Helper::call($strModuleId, 'ProfileValue', 'getList', [$arQuery]);\n\t\t\t\t\t\t\tif($resValue){\n\t\t\t\t\t\t\t\tif($resValue->fetch()){\n\t\t\t\t\t\t\t\t\t# Если есть значения \"IBLOCK__\", значит, нужно перестроить данные, т.е. удаляем старые записи по этому инфоблоку\n\t\t\t\t\t\t\t\t\t#ExportData::deleteProfileElementsByIBlockID($intProfileID, $intIBlockID);\n\t\t\t\t\t\t\t\t\tHelper::call($strModuleId, 'ExportData', 'deleteProfileElementsByIBlockID', [$intProfileID, $intIBlockID]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private function doUpdatePing(): void\n {\n\n $pkt = MineceitUtil::constructCustomPkt([\"GetPing\", $this->getName()]);\n RequestPool::addRequest(Request::TYPE_PING, $this, $pkt->buffer, function ($data, $uuid) {\n if (($player = MineceitUtil::getPlayerFromUUID($uuid)) != null && $player instanceof MineceitPlayer) {\n $player->completePingUpdate($data['ping']);\n }\n });\n $this->dataPacket($pkt);\n }",
"public function doUpdate()\n\t{\n\t\t$this->latest_id = (int)$this->latest_id;\n\t\t$this->prev_latest_id = $this->latest_id;\n\n\t\t$page = 1;\n\t\tdo\n\t\t{\n\t\t\t$new_items = $this->doUpdatePage($page);\n\t\t\t$page++;\n\t\t}\n\t\t// Keep iterating while we're adding a full page of items. Since we added a full page, there's a chance there\n\t\t// could be more new items on the next page.\n\t\twhile ($new_items == static::ITEMS_PER_PAGE && $page <= static::MAX_PAGE);\n\t}",
"public function update()\n\t{\n\t}",
"public function update()\n\t{\n\t}",
"public function update()\n\t{\n\t}",
"function _pm_refresh() {\n drush_print(dt(\"Refreshing update status information ...\"));\n update_refresh();\n drush_print(dt(\"Done.\"));\n}",
"public function update() {\n \n }"
] | [
"0.629225",
"0.5691901",
"0.5622099",
"0.55350995",
"0.54566705",
"0.5412231",
"0.5377524",
"0.5362499",
"0.53335834",
"0.53140956",
"0.5313461",
"0.52801955",
"0.52625984",
"0.5248198",
"0.5231407",
"0.5207911",
"0.51990545",
"0.51840717",
"0.5183707",
"0.5174917",
"0.5172729",
"0.5170427",
"0.51602525",
"0.5151315",
"0.51511025",
"0.5147552",
"0.5147552",
"0.5147552",
"0.51452583",
"0.5143091"
] | 0.66718143 | 0 |
Generate block Special Education Eligibility. | public function renderSpedexEligibility() {
$disabilityList = $this->std->disabilityList();
$rowDisability = ' <i>';
foreach ($disabilityList as $item) {
if ($item['dcrefid'] != '') $rowDisability .= $item['desc'];
}
$rowDisability .= '</i>';
$layout = RCLayout::factory()
->newLine()
->addText('IV. Special Education Eligibility:', $this->titleStyle('width: 200px;'))
->newLine()
->addText(
'The student qualifies for special education services in the eligibility category(s):' . $rowDisability
);
$this->rcDoc->addObject($layout);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function education_overview() {\n\t\techo '<div class=\"wrap\">' .\n\t\t\t'<div id=\"icon-education\" class=\"icon32-pa\"></div><h2>Übersicht: Bildungsbereich</h2>';\n\t\t$feech = new VCA_ASM_Admin_Future_Feech( array(\n\t\t\t'title' => 'Übersicht: Bildungsbereich',\n\t\t\t'version' => '1.6 (?)',\n\t\t\t'explanation' => 'Statistiken etc.'\n\t\t));\n\t\t$feech->output();\n\t\techo '</div>';\n\t}",
"public function getEducationRequirements()\n {\n return $this->educationRequirements;\n }",
"function et_resume_template () {?>\n\t\t<script type=\"text/template\" id=\"education_template\">\n\t\t\t<div class=\"education element\">\n\t\t\t\t<div class=\"input-text-remind\">\n\t <input type=\"text\" class=\"name\" value=\"\" placeholder=\"<?php _e('School name', ET_DOMAIN); ?>\">\n\t </div>\n\t <div class=\"input-text-remind\">\n\t <input type=\"text\" class=\"degree\" value=\"\" placeholder=\"<?php _e('Degree', ET_DOMAIN); ?>\">\n\t </div>\n\t <div class=\"clear\" style=\"clear:both; height:5px; overflow:hidden;\"></div>\n\t <div class=\"date-select\">\n\t <?php\n\t JE_Helper::monthSelectBox('fromMonth' , false, array('class' => 'month fromMonth' , ) );\n\t JE_Helper::yearSelectBox('fromYear' , false, array('class' => 'year fromYear' , ) );\n\t ?>\n\t </div>\n\t <div class=\"clear\" style=\"clear:both; height:18px; overflow:hidden;\"><?php _e(\"to\", ET_DOMAIN); ?></div>\n\t <div class=\"date-select\">\n\t <?php\n\t JE_Helper::monthSelectBox('toMonth' , false, array('class' => 'month toMonth' ) );\n\t JE_Helper::yearSelectBox('toYear' , false, array('class' => 'year toYear' , ) );\n\t ?>\n\t </div>\n\t\t\t <div class=\"ui-checkbox signup\">\n\t\t\t <label for=\"education-{{ i }}\" class=\"ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-checkbox-off\">\n\t\t\t \t<?php _e(\"I currently study here\", ET_DOMAIN); ?>\n\t\t\t </label>\n\t\t\t <input type=\"checkbox\" name=\"education-{{ i }}\" id=\"education-{{ i }}\" data-enhanced=\"true\" class=\"curr\">\n\t\t\t <!-- <span class=\"icon icon-track\" data-icon=\"#\"></span> -->\n\t\t\t </div>\n\t\t\t</div>\n\t\t</script>\n\n\t\t<script type=\"text/template\" id=\"exp_template\">\n\t\t\t<div class=\"experience element\">\n\t \t\t<div class=\"input-text-remind\">\n\t <input type=\"text\" required class=\"name\" value=\"\" placeholder=\"<?php _e('Company name', ET_DOMAIN); ?>\">\n\t </div>\n\t <div class=\"clear\" style=\"clear:both; height:5px; overflow:hidden;\"></div>\n\t <div class=\"input-text-remind\">\n\t <input type=\"text\" required class=\"position\" value=\"\" placeholder=\"<?php _e('Position', ET_DOMAIN); ?>\">\n\t </div>\n\t <div class=\"clear\" style=\"clear:both; height:5px; overflow:hidden;\"></div>\n\t <div class=\"date-select\">\n\t <?php\n\t JE_Helper::monthSelectBox('fromMonth' , false, array('class' => 'month fromMonth' ) );\n\t JE_Helper::yearSelectBox('fromYear' , false, array('class' => 'year fromYear' ) );\n\t ?>\n\t </div>\n\t <div class=\"clear\" style=\"clear:both; height:18px; overflow:hidden;\"><?php _e(\"to\", ET_DOMAIN); ?></div>\n\t <div class=\"date-select\">\n\t <?php\n\t JE_Helper::monthSelectBox('toMonth' , false, array('class' => 'month toMonth' ) );\n\t JE_Helper::yearSelectBox('toYear' , false, array('class' => 'year toYear' ) );\n\t ?>\n\t </div>\n\t <div class=\"ui-checkbox signup\">\n\t <label for=\"experience-{{ i }}\" class=\"ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-checkbox-off\">\n\t \t<?php _e(\"I currently work here\", ET_DOMAIN); ?>\n\t </label>\n\t <input type=\"checkbox\" name=\"checkbox-enhanced\" id=\"experience-{{i}}\" data-enhanced=\"true\" class=\"curr\">\n\t <!-- <span class=\"icon icon-track\" data-icon=\"#\"></span> -->\n\t </div>\n\t </div>\n\t </script>\n\t <script type=\"text/template\" id=\"skill_template\">\n\t \t<li class=\"element\" ><span class=\"icon icon-track\" data-icon=\"#\"></span><span class=\"text\">{{val}}</span><input class=\"skill\" type=\"hidden\" value=\"{{val}}\" ></li>\n\t </script>\n\t<?php\n\t}",
"public function getDisputeCreditEligibility()\n {\n return $this->disputeCreditEligibility;\n }",
"function right_block() \r\n {\r\n $ret_val = container();\r\n\t\t\r\n $hr = html_hr();\r\n $hr->set_tag_attribute(\"noshade\");\r\n $hr->set_tag_attribute(\"size\", 2);\r\n\t $ret_val->add($hr);\r\n\t\t\r\n\t $div = html_div();\r\n \t $div->add( Theme::getThemeImage('edcenters.png') );\r\n \r\n $infoCourse = $this->getViewVariable('infoCourse');\r\n $path_arr = $infoCourse['path']; \r\n $strPath = $path_arr['institution'];\r\n if ( $path_arr['faculty'] != '' ) {\r\n $strPath .= ' > ';\r\n }\r\n $strPath .= $path_arr['faculty']; \r\n if ( $path_arr['department'] != '' ) {\r\n $strPath .= ' > ';\r\n }\r\n $strPath .= $path_arr['department'];\r\n if ( $path_arr['area'] != '' ) {\r\n $strPath .= ' > ';\r\n }\r\n $strPath .= $path_arr['area'];\r\n $div->add( $strPath );\r\n\t\t\r\n $div->add(html_br());\r\n\r\n \r\n $div->add(Theme::getThemeImage('info.png', $infoCourse['name']) );\r\n $div->add(html_b(html_a(Util::format_URLPath(\"course/index.php\", 'course=' . $infoCourse['course_id']), $infoCourse['name'])));\r\n\t\t$div->add(html_br());\r\n \r\n $mailLink = Theme::getMailURL($infoCourse['email'], Session::getValue('migueloo_userinfo_user_id') ); \r\n $div->add(html_b( agt('miguel_responsable') . ' '), html_a( $mailLink, $infoCourse['user_responsable']));\r\n $div->add(html_br(2));\r\n\t\t\r\n $table = html_table(\"100%\",0,8,0);\r\n $table->set_class(\"simple\");\r\n $table->set_id(\"modules\");\r\n $table->set_tag_attribute(\"valign\", \"top\"); \r\n\t\t\r\n /*$arr_elem = $this->_getModuleElements();\r\n $int_elem = count($arr_elem);\r\n\r\n for($i=0; $i<$int_elem; $i = $i+2){\r\n $row = html_tr();\r\n\t\t\t$col = html_td(\"\",\"left\"); \r\n $col->add( $this->imag_ref( Util::format_URLPath( $arr_elem[$i][0]), Theme::getThemeImagePath( $arr_elem[$i][1] ), agt('miguel_Module' . $arr_elem[$i][2]) ) );\r\n $row->add($col);\r\n\r\n $col = html_td(\"\",\"left\");\r\n if ( $arr_elem[$i+1][0] != '' ){\r\n\t\t\t $col->add( $this->imag_ref(Util::format_URLPath( $arr_elem[$i+1][0]), Theme::getThemeImagePath( $arr_elem[$i+1][1] ), agt( 'miguel_Module' . $arr_elem[$i+1][2]) ));\r\n\t\t\t $row->add($col);\r\n \t}\r\n \t $table->add_row($row); \r\n \t}\r\n\t\t*/\r\n\t\t$is_admin = $this->getViewVariable('isCourseAdmin');\r\n\t\t$arr_elem = $this->getViewVariable('visual_array');\r\n\t\t//Debug::oneVar($arr_elem, __FILE__,__LINE__);\r\n\t\t$int_elem = count($arr_elem);\r\n\t\t\r\n\t\t$bol_row = true;\r\n\t\t \r\n\t\tfor($i=0; $i<$int_elem; $i++){\r\n\t\t\t$item = $i+1;\r\n\t\t\tif($bol_row){\r\n\t\t\t\t$row = html_tr();\r\n\t\t\t\t$bol_row_add = false;\r\n\t\t\t}\r\n \t\t\t\r\n $row->add( $this->_formatRowElement($arr_elem[$i], $item, $is_admin));\r\n \r\n\t\t\t$bol_row = ($bol_row)?false:true; \r\n\t\t\tif($bol_row){\r\n\t\t\t\t$table->add($row);\r\n\t\t\t\t$bol_row_add = true;\r\n\t\t\t}\r\n\r\n \t}\r\n\t\tif(!$bol_row_add){\r\n\t\t\t$table->add($row);\r\n\t\t}\r\n \t\r\n $div->add( $table );\r\n $ret_val->add($div);\r\n \t\r\n return $ret_val;\r\n }",
"public function getEducation() {\r\n return $this->education;\r\n }",
"public function education()\n {\n return $this->morphedByMany(\\App\\Education::class, 'userable');\n }",
"public function getDefaultEduDesc()\n {\n return __('You will be redirected to Affirm to securely complete your purchase. Just fill out a few pieces of basic information and get a real-time decision. Checking your eligibility won\\'t affect your credit score.');\n }",
"function dkan_sitewide_license_block() {\n $node = menu_get_object();\n if (!isset($node->type)) {\n return '';\n }\n elseif ($node->type != 'dataset') {\n return '';\n }\n else {\n if (isset($node->field_license) && $node->field_license) {\n $key = (isset($node->field_license[$node->language][0])) ? $node->field_license[$node->language][0] : $node->field_license[LANGUAGE_NONE][0];\n $key = $key['value'];\n $subscribed_values = dkan_dataset_content_types_license_subscribed_values();\n if (isset($subscribed_values[$key])) {\n $license = $subscribed_values[$key];\n if (isset($license['uri'])) {\n $output = l($license['label'], $license['uri']) . '<br/>';\n $output .= l(\n '<img class=\"open-data\" src=\"http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png\" alt=\"[Open Data]\">',\n $license['uri'],\n array('html' => TRUE)\n );\n }\n else {\n $output = $license['label'];\n }\n return $output;\n }\n }\n return t('License not specified');\n }\n}",
"public function getEducation()\n {\n return $this->education;\n }",
"public function actionGeneratexml(){\n\t\t\n\ttry{\n\t\t$clean_ein='';\n\t\t$reporting_year='';\n\t\t$employer_name='';\n\t\t$addressone='';\n\t\t$addresstwo='';\n\t\t$city='';\n\t\t$state ='';\n\t\t$zip='';\n\t\t$contact_first_name='';\n\t\t$contact_middle_name='';\n\t\t$contact_last_name='';\n\t\t$contact_suffix='';\n\t\t$clean_phone='';\n\t\t$govt_entity_name='';\n\t\t$employer_ein='';\n\t\t$total_no_records_submitted='';\n\t\t$_1094c_box23B = '';\n\t\t$_1094c_box23C = '';\n\t\t$arr_minimal_essential_coverage = array();\n\t\t$other_ale_member='';\n\t\t$address_line_one = '';\n\t\t$address_line_two = '';\n\t\t$city_or_town_2_I = '';\n\t\t$state_or_province_2_I = '';\n\t\t$country_and_zip_2_I = '';\n\t\t$first_name_of_person_to_contact_2_I = '';\n\t\t$middle_name_of_person_to_contact_2_I = '';\n\t\t$last_name_of_person_to_contact_2_I = '';\n\t\t$suffix_name_of_person_to_contact_2_I = '';\n\t\t$contact_telephone_number_2_I = '';\n\t\t$total_no_records_submitted = '';\n\t\t$total_no_of_1095c_filled_II = '';\n\t\t$ale_member_check = '';\n\t\t$quality_offer_method ='';\n\t\t$section_4980_transition = '';\n\t\t$offer_method = '';\n\t\t$minimal_essential_coverage = '';\n\t\t$full_time_employee_count = '';\n\t\t$total_employee_count_for_ale_member = '';\n\t\t$aggregate_group_all ='';\n\t\t$arr_minimal_essential_coverage = array();\n\t\t$arr_total_employee_count = array();\n\t\t$arr_aggrigated_grp_indicator = array();\n\t\t$arr_section_4980h_transition = array();\n\t\t$other_ale_member = '';\n\t\t$total_1095_count = '';\n\t\t\n\t\t// get the efile approved companies\n\t\t$companies = TblAcaForms::find()->where(['is_approved'=>1])->andWhere(['xml_file'=>NULL])->All();\t\n\t\t\n\t\tforeach($companies as $company){\n\t\t\t\t\t\n\t\t\t$time = time();\n\t\t\t\n\t\t\t$unique_company_id = $company->company_id;\n\t\t\t\n\t\t\t$company_details = TblAcaCompanies::find()->where(['company_id'=>$unique_company_id])->One();\n\t\t\t\n\t\t\t$company_client_number = $company_details->company_client_number;\n\t\t\t\n\t\t\t$form_id = $company->id;\n\t\t\t\n\t\t\t// getting compamy EIN (2)\n\t\t\t$company_ein = $company->company->company_ein;\n\t\t\t$clean_ein = preg_replace ( '/[^0-9]/s', '', $company_ein );\n\t\t\t\n\t\t\t// getting company year\n\t\t\t$reporting_year = $company->companyreportingyear->year->lookup_value;\n\t\t\t$model_1094 = TblAca1094::find()->where(['form_id'=>$form_id])->one();\n\t\t\t//print_r($model_1094);die();\n\t\t\t// getting 1094c data\n\t\t\t\n\t\t\t//part 1\n\t\t\tif(!empty($model_1094->serialise_data1)){\n\t\t\t\t$unserialise_data_part1 = unserialize ( $model_1094->serialise_data1 );\n\t\t\t\t$part1 = json_decode ( $unserialise_data_part1 );\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$part1 = array();\n\t\t\t}\n\t\t \n\t\t\t\n\t\t\t//part 2\n\t\t\tif(!empty($model_1094->serialise_data2)){\n\t\t\t\t$unserialise_data_part2 = unserialize ( $model_1094->serialise_data2 );\n\t\t\t\t$part2 = json_decode ( $unserialise_data_part2 );\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$part2 = array();\n\t\t\t}\n\t\t\t\n\t\t\t//part 3\n\t\t\tif(!empty($model_1094->serialise_data3)){\n\t\t\t\t$unserialise_data_part3 = unserialize ( $model_1094->serialise_data3 );\n\t\t\t\t$part3 = json_decode ( $unserialise_data_part3 );\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$part3 = array();\n\t\t\t}\n\t\t\t\n\t\t\t//part 4\n\t\t\tif(!empty($model_1094->serialise_data4)){\n\t\t\t\t$unserialise_data_part4 = unserialize ( $model_1094->serialise_data4 );\n\t\t\t\t$part4 = json_decode ( $unserialise_data_part4 );\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$part4 = array();\n\t\t\t}\n\t\t\t\n\t\t\t//part 5\n\t\t\tif(!empty($model_1094->xml_data)){\n\t\t\t\t$unserialise_data_part5 = unserialize ( $model_1094->xml_data );\n\t\t\t\t$part5 = json_decode ( $unserialise_data_part5 );\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$part5 = array();\n\t\t\t}\n\t\t\t\n\t\t\t///////////////////////\n\t\t\t\n\t\t\t//getting 1094c company name (1)\n\t\t\tif(!empty($part1->name_of_ale_member_1_I)){\n\t\t\t\t$employer_name = $part1->name_of_ale_member_1_I;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c address one (3.1)\n\t\t\tif(!empty($part5->street_address_1__3)){\n\t\t\t\t$addressone = $part5->street_address_1__3;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c address two (3.2)\n\t\t\tif(!empty($part5->street_address_2__3)){\n\t\t\t\t$addresstwo = $part5->street_address_2__3;\n\t\t\t}\n\t\t\t \n\t\t\t//getting 1094c city (4)\n\t\t\tif(!empty($part1->city_or_town_I)){\n\t\t\t\t$city = $part1->city_or_town_I;\n\t\t\t}\n\t\t \n\t\t\t//getting 1094c state (5)\n\t\t\tif(!empty($part1->state_or_province_I)){\n\t\t\t\t$state = $part1->state_or_province_I;\n\t\t\t}\n\t\t \n\t\t\t//getting 1094c zip (6)\n\t\t\tif(!empty($part1->country_and_zip_I)){\n\t\t\t\t$zip = $part1->country_and_zip_I;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c contact_first_name (7.1)\n\t\t\t/*if(!empty($part1->first_name_of_the_person_contact_I)){\n\t\t\t\t$contact_first_name = $part1->first_name_of_the_person_contact_I;\n\t\t\t}\n\t\t\t$contact_first_name = $part1->name_of_the_person_contact_I;*/\n\t\t\tif(!empty($part5->first_name__7)){\n\t\t\t\t$contact_first_name = $part5->first_name__7;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//getting 1094c contact_middle_name (7.2)\n\t\t\tif(!empty($part5->middle_name__7)){\n\t\t\t\t$contact_middle_name = $part5->middle_name__7;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c contact_last_name (7.3)\n\t\t\tif(!empty($part5->last_name__7)){\n\t\t\t\t$contact_last_name = $part5->last_name__7;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c contact_suffix (7.4)\n\t\t\tif(!empty($part5->suffix__7)){\n\t\t\t\t$contact_suffix = $part5->suffix__7;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c contact_phone (8)\n\t\t\tif(!empty($part1->contact_telephone_number_I)){\n\t\t\t\t$contact_phone = $part1->contact_telephone_number_I;\n\t\t\t\t$clean_phone = preg_replace ( '/[^0-9\\']/', '', $contact_phone);\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c name of DGE (9)\n\t\t\tif(!empty($part1->name_of_designated_government_entity_I)){\n\t\t\t\t$govt_entity_name = $part1->name_of_designated_government_entity_I;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c employer EIN (10)\n\t\t\tif(!empty($part1->employer_identification_number_2_I)){\n\t\t\t\t$employer_ein = preg_replace ( '/[^0-9]/s', '', $part1->employer_identification_number_2_I );\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c address_line_one (11.1)\n\t\t\tif(!empty($part5->street_address_1__11)){\n\t\t\t\t$address_line_one = $part5->street_address_1__11;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c address_line_two (11.2)\n\t\t\tif(!empty($part5->street_address_2__11)){\n\t\t\t\t$address_line_two = $part5->street_address_2__11;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c city_or_town_2_I (12)\n\t\t\tif(!empty($part1->city_or_town_2_I)){\n\t\t\t\t$city_or_town_2_I = $part1->city_or_town_2_I;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c state_or_province_2_I (13)\n\t\t\tif(!empty($part1->state_or_province_2_I)){\n\t\t\t\t$state_or_province_2_I = $part1->state_or_province_2_I;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c country_and_zip_2_I (14)\n\t\t\tif(!empty($part1->country_and_zip_2_I)){\n\t\t\t\t$country_and_zip_2_I = $part1->country_and_zip_2_I;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c first_name_of_person_to_contact_2_I (15.1)\n\t\t\tif(!empty($part5->first_name__15)){\n\t\t\t\t$first_name_of_person_to_contact_2_I = $part5->first_name__15;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c last_name_of_person_to_contact_2_I (15.3)\n\t\t\tif(!empty($part5->last_name__15)){\n\t\t\t\t$last_name_of_person_to_contact_2_I = $part5->last_name__15;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c middle_name_of_person_to_contact_2_I (15.2)\n\t\t\tif(!empty($part5->middle_name__15)){\n\t\t\t\t$middle_name_of_person_to_contact_2_I = $part5->middle_name__15;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c suffix_name_of_person_to_contact_2_I (15.4)\n\t\t\tif(!empty($part5->suffix__15)){\n\t\t\t\t$suffix_name_of_person_to_contact_2_I = $part5->suffix__15;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c contact_telephone_number_2_I (16)\n\t\t\tif(!empty($part1->contact_telephone_number_2_I)){\n\t\t\t\t$contact_telephone_number_2_I = $part1->contact_telephone_number_2_I;\n\t\t\t\t$contact_telephone_number_2_I = preg_replace ( '/[^0-9\\']/', '', $contact_telephone_number_2_I);\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c total number of forms submitted (18)\n\t\t\tif(!empty($part1->total_no_of_1095c_submitted_I)){\n\t\t\t\t$total_no_records_submitted = $part1->total_no_of_1095c_submitted_I;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c total number of forms filled (20)\n\t\t\tif(!empty($part2->total_no_of_1095c_filled_II)){\n\t\t\t\t$total_no_of_1095c_filled_II = $part2->total_no_of_1095c_filled_II;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c ale member check (21)\n\t\t\tif(isset($part2->is_ale_member_yes_II) && $part2->is_ale_member_yes_II == 1){\n\t\t\t\t$ale_member_check = 1;\n\t\t\t}\n\t\t\telse if(isset($part2->is_ale_member_no_II) && $part2->is_ale_member_no_II == 1){\n\t\t\t\t$ale_member_check = 2;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c quality_offer_method (22A)\n\t\t\tif(!empty($part2->quality_offer_method_II) && $part2->quality_offer_method_II== 1){\n\t\t\t\t$quality_offer_method = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$quality_offer_method = 0;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c section_4980_transition (22C)\n\t\t\tif(!empty($part2->section_4980_transition_II) && $part2->section_4980_transition_II== 1){\n\t\t\t\t$section_4980_transition = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$section_4980_transition = 0;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c offer_method (22D)\n\t\t\tif(!empty($part2->offer_method_II) && $part2->offer_method_II== 1){\n\t\t\t\t$offer_method = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$offer_method = 0;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c section_4980_transition (22C)\n\t\t\tif(!empty($part3->minimal_essential_coverage_all_yes_III) && $part3->minimal_essential_coverage_all_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_all_no_III) && $part3->minimal_essential_coverage_all_no_III == 1){\n\t\t\t\t$minimal_essential_coverage = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage = 0;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c full_time_employee_count (23B)\n\t\t\tif(!empty($part3->section_4980h_fulltime_employee_count_all_III)){\n\t\t\t\t$full_time_employee_count = $part3->section_4980h_fulltime_employee_count_all_III;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c total_employee_count_for_ale_member (23C)\n\t\t\tif(!empty($part3->total_employee_count_all_III)){\n\t\t\t\t$total_employee_count_for_ale_member = $part3->total_employee_count_all_III;\n\t\t\t}\n\t\t\t\n\t\t\t//getting 1094c aggregate_group_all (23D)\n\t\t\tif(!empty($part3->aggregate_group_all_III) && $part3->aggregate_group_all_III== 1){\n\t\t\t\t$aggregate_group_all = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_all = 0;\n\t\t\t}\n\t\t\t\n\t\t\t/////////////////////////////////////////////////\n\t\t\t//getting 1094c 24-35 A values (preparing array)\n\t\t\t\n\t\t\t// jan value\n\t\t\tif(!empty($part3->minimal_essential_coverage_jan_yes_III) && $part3->minimal_essential_coverage_jan_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_jan = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_jan_no_III) && $part3->minimal_essential_coverage_jan_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_jan = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_jan = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[0] = '<JanMinEssentialCvrOffrCd>'.$minimal_essential_coverage_jan.'</JanMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// feb value\n\t\t\tif(!empty($part3->minimal_essential_coverage_feb_yes_III) && $part3->minimal_essential_coverage_feb_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_feb = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_feb_no_III) && $part3->minimal_essential_coverage_feb_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_feb = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_feb = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[1] = '<FebMinEssentialCvrOffrCd>'.$minimal_essential_coverage_feb.'</FebMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// mar value\n\t\t\tif(!empty($part3->minimal_essential_coverage_mar_yes_III) && $part3->minimal_essential_coverage_mar_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_mar = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_feb_no_III) && $part3->minimal_essential_coverage_feb_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_mar = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_mar = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[2] = '<MarMinEssentialCvrOffrCd>'.$minimal_essential_coverage_mar.'</MarMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// apr value\n\t\t\tif(!empty($part3->minimal_essential_coverage_apr_yes_III) && $part3->minimal_essential_coverage_apr_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_apr = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_apr_no_III) && $part3->minimal_essential_coverage_apr_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_apr = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_apr = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[3] = '<AprMinEssentialCvrOffrCd>'.$minimal_essential_coverage_apr.'</AprMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// may value\n\t\t\tif(!empty($part3->minimal_essential_coverage_may_yes_III) && $part3->minimal_essential_coverage_may_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_may = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_may_no_III) && $part3->minimal_essential_coverage_may_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_may = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_may = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[4] = '<MayMinEssentialCvrOffrCd>'.$minimal_essential_coverage_may.'</MayMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// jun value\n\t\t\tif(!empty($part3->minimal_essential_coverage_june_yes_III) && $part3->minimal_essential_coverage_june_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_june = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_june_no_III) && $part3->minimal_essential_coverage_june_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_june = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_june = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[5] = '<JunMinEssentialCvrOffrCd>'.$minimal_essential_coverage_june.'</JunMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// jul value\n\t\t\tif(!empty($part3->minimal_essential_coverage_july_yes_III) && $part3->minimal_essential_coverage_july_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_july = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_july_no_III) && $part3->minimal_essential_coverage_july_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_july = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_july = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[6] = '<JulMinEssentialCvrOffrCd>'.$minimal_essential_coverage_july.'</JulMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// aug value\n\t\t\tif(!empty($part3->minimal_essential_coverage_aug_yes_III) && $part3->minimal_essential_coverage_aug_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_aug = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_aug_no_III) && $part3->minimal_essential_coverage_aug_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_aug = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_aug = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[7] = '<AugMinEssentialCvrOffrCd>'.$minimal_essential_coverage_aug.'</AugMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// sep value\n\t\t\tif(!empty($part3->minimal_essential_coverage_sept_yes_III) && $part3->minimal_essential_coverage_sept_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_sept = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_sept_no_III) && $part3->minimal_essential_coverage_sept_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_sept = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_sept = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[8] = '<SepMinEssentialCvrOffrCd>'.$minimal_essential_coverage_sept.'</SepMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// oct value\n\t\t\tif(!empty($part3->minimal_essential_coverage_oct_yes_III) && $part3->minimal_essential_coverage_oct_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_oct = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_oct_no_III) && $part3->minimal_essential_coverage_oct_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_oct = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_oct = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[9] = '<OctMinEssentialCvrOffrCd>'.$minimal_essential_coverage_oct.'</OctMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// nov value\n\t\t\tif(!empty($part3->minimal_essential_coverage_nov_yes_III) && $part3->minimal_essential_coverage_nov_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_nov = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_nov_no_III) && $part3->minimal_essential_coverage_nov_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_nov = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_nov = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[10] = '<NovMinEssentialCvrOffrCd>'.$minimal_essential_coverage_nov.'</NovMinEssentialCvrOffrCd>';\n\t\t\t\n\t\t\t// dec value\n\t\t\tif(!empty($part3->minimal_essential_coverage_dec_yes_III) && $part3->minimal_essential_coverage_dec_yes_III== 1){\n\t\t\t\t$minimal_essential_coverage_dec = 1;\n\t\t\t}\n\t\t\telse if(!empty($part3->minimal_essential_coverage_dec_no_III) && $part3->minimal_essential_coverage_dec_no_III== 1){\n\t\t\t\t$minimal_essential_coverage_dec = 2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$minimal_essential_coverage_dec = 0;\n\t\t\t}\n\t\t\t$arr_minimal_essential_coverage[11] = '<DecMinEssentialCvrOffrCd>'.$minimal_essential_coverage_dec.'</DecMinEssentialCvrOffrCd>';\n\t\t\t//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\n\t\t\t\n\t\t\t/////////////////////////////////////////////////\n\t\t\t//getting 1094c 24-35 C values (preparing array)\n\t\t\t\n\t\t\t// jan value\n\t\t\tif(isset($part3->total_employee_count_jan_III)){\n\t\t\t\t$total_employee_count_jan = $part3->total_employee_count_jan_III;\n\t\t\t\tif(!empty($total_employee_count_jan)){\n\t\t\t\t$arr_total_employee_count[0] = '<JanALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_jan.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</JanALEMonthlyInfoGrp>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[0] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// feb value\n\t\t\tif(isset($part3->total_employee_count_feb_III)){\n\t\t\t\t$total_employee_count_feb = $part3->total_employee_count_feb_III;\n\t\t\t\tif(!empty($total_employee_count_feb)){\n\t\t\t\t$arr_total_employee_count[1] = '<FebALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_feb.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</FebALEMonthlyInfoGrp>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[1] = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// mar value\n\t\t\tif(isset($part3->total_employee_count_mar_III)){\n\t\t\t\t$total_employee_count_mar = $part3->total_employee_count_mar_III;\n\t\t\t\t\n\t\t\t\tif(!empty($total_employee_count_mar)){\n\t\t\t\t$arr_total_employee_count[2] = '<MarALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_mar.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</MarALEMonthlyInfoGrp>';\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[2] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// apr value\n\t\t\tif(isset($part3->total_employee_count_apr_III)){\n\t\t\t\t$total_employee_count_apr = $part3->total_employee_count_apr_III;\n\t\t\t\tif(!empty($total_employee_count_apr)){\n\t\t\t\t$arr_total_employee_count[3] = '<AprALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_apr.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</AprALEMonthlyInfoGrp>';\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[3] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// may value\n\t\t\tif(isset($part3->total_employee_count_may_III)){\n\t\t\t\t$total_employee_count_may = $part3->total_employee_count_may_III;\n\t\t\t\t\n\t\t\t\tif(!empty($total_employee_count_may)){\n\t\t\t\t$arr_total_employee_count[4] = '<MayALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_may.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</MayALEMonthlyInfoGrp>';\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[4] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// jun value\n\t\t\tif(isset($part3->total_employee_count_jun_III)){\n\t\t\t\t$total_employee_count_jun = $part3->total_employee_count_june_III;\n\t\t\t\tif(!empty($total_employee_count_jun)){\n\t\t\t\t$arr_total_employee_count[5] = '<JunALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_jun.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</JunALEMonthlyInfoGrp>';\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[5] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// jul value\n\t\t\tif(isset($part3->total_employee_count_jul_III)){\n\t\t\t\t$total_employee_count_jul = $part3->total_employee_count_july_III;\n\t\t\t\tif(!empty($total_employee_count_jul)){\n\t\t\t\t$arr_total_employee_count[6] = '<JulALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_jul.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</JulALEMonthlyInfoGrp>';\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[6] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// aug value\n\t\t\tif(isset($part3->total_employee_count_aug_III)){\n\t\t\t\t$total_employee_count_aug = $part3->total_employee_count_aug_III;\n\t\t\t\t\n\t\t\t\tif(!empty($total_employee_count_aug)){\n\t\t\t\t$arr_total_employee_count[7] = '<AugALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_aug.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</AugALEMonthlyInfoGrp>';\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[7] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// sep value\n\t\t\tif(isset($part3->total_employee_count_sept_III)){\n\t\t\t\t$total_employee_count_sep = $part3->total_employee_count_sept_III;\n\t\t\t\t\n\t\t\t\tif(!empty($total_employee_count_sep)){\n\t\t\t\t$arr_total_employee_count[8] = '<SeptALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_sep.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</SeptALEMonthlyInfoGrp>';\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[8] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// oct value\n\t\t\tif(isset($part3->total_employee_count_oct_III)){\n\t\t\t\t$total_employee_count_oct = $part3->total_employee_count_oct_III;\n\t\t\t\t\n\t\t\t\tif(!empty($total_employee_count_oct)){\n\t\t\t\t$arr_total_employee_count[9] = '<OctALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_oct.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</OctALEMonthlyInfoGrp>';\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[9] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// nov value\n\t\t\tif(isset($part3->total_employee_count_nov_III)){\n\t\t\t\t$total_employee_count_nov = $part3->total_employee_count_nov_III;\n\t\t\t\t\n\t\t\t\tif(!empty($total_employee_count_nov)){\n\t\t\t\t$arr_total_employee_count[10] = '<NovALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_nov.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</NovALEMonthlyInfoGrp>';\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[10] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// dec value\n\t\t\tif(isset($part3->total_employee_count_dec_III)){\n\t\t\t\t$total_employee_count_dec = $part3->total_employee_count_dec_III;\n\t\t\t\tif(!empty($total_employee_count_dec)){\n\t\t\t\t$arr_total_employee_count[11] = '<DecALEMonthlyInfoGrp>\n\t\t\t\t\t\t\t\t\t\t\t\t<TotalEmployeeCnt>'.$total_employee_count_dec.'</TotalEmployeeCnt>\n\t\t\t\t\t\t\t\t\t\t\t</DecALEMonthlyInfoGrp>';\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$arr_total_employee_count[10] = '';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\n\t\t\t/////////////////////////////////////////////////\n\t\t\t//getting 1094c 24-35 D values (preparing array)\n\t\t\t\n\t\t\t// jan value\n\t\t\tif(!empty($part3->aggregate_group_jan_III)){\n\t\t\t\t$aggregate_group_jan = $part3->aggregate_group_jan_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_jan = 0;\n\t\t\t}\n\t\t\t$arr_aggrigated_grp_indicator[0] = '<JanAggregatedGroupInd>'.$aggregate_group_jan.'</JanAggregatedGroupInd>';\n\t\t\t\n\t\t\t// feb value\n\t\t\tif(!empty($part3->aggregate_group_feb_III)){\n\t\t\t\t$aggregate_group_feb = $part3->aggregate_group_feb_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_feb = 0;\n\t\t\t}\t\t\t\n\t\t\t$arr_aggrigated_grp_indicator[1] = '<FebAggregatedGroupInd>'.$aggregate_group_feb.'</FebAggregatedGroupInd>';\n\t\t\t\n\t\t\t// mar value\n\t\t\tif(!empty($part3->aggregate_group_mar_III)){\n\t\t\t\t$aggregate_group_mar = $part3->aggregate_group_mar_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_mar = 0;\n\t\t\t}\t\t\t\n\t\t\t$arr_aggrigated_grp_indicator[2] = '<MarAggregatedGroupInd>'.$aggregate_group_mar.'</MarAggregatedGroupInd>';\n\t\t\t\n\t\t\t// apr value\n\t\t\tif(!empty($part3->aggregate_group_apr_III)){\n\t\t\t\t$aggregate_group_apr = $part3->aggregate_group_apr_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_apr = 0;\n\t\t\t}\n\t\t\t$arr_aggrigated_grp_indicator[3] = '<AprAggregatedGroupInd>'.$aggregate_group_apr.'</AprAggregatedGroupInd>';\n\t\t\t\n\t\t\t// may value\n\t\t\tif(!empty($part3->aggregate_group_may_III)){\n\t\t\t\t$aggregate_group_may = $part3->aggregate_group_may_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_may = 0;\n\t\t\t}\n\t\t\t$arr_aggrigated_grp_indicator[4] = '<MayAggregatedGroupInd>'.$aggregate_group_may.'</MayAggregatedGroupInd>';\n\t\t\t\n\t\t\t// jun value\n\t\t\tif(!empty($part3->aggregate_group_jun_III)){\n\t\t\t\t$aggregate_group_jun = $part3->aggregate_group_jun_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_jun = 0;\n\t\t\t}\t\t\t\n\t\t\t$arr_aggrigated_grp_indicator[5] = '<JunAggregatedGroupInd>'.$aggregate_group_jun.'</JunAggregatedGroupInd>';\n\t\t\t\n\t\t\t// jul value\n\t\t\tif(!empty($part3->aggregate_group_jul_III)){\n\t\t\t\t$aggregate_group_jul = $part3->aggregate_group_jul_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_jul = 0;\n\t\t\t}\t\t\t\n\t\t\t$arr_aggrigated_grp_indicator[6] = '<JulAggregatedGroupInd>'.$aggregate_group_jul.'</JulAggregatedGroupInd>';\n\t\t\t\n\t\t\t// aug value\n\t\t\tif(!empty($part3->aggregate_group_aug_III)){\n\t\t\t\t$aggregate_group_aug = $part3->aggregate_group_aug_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_aug = 0;\n\t\t\t}\t\t\t\n\t\t\t$arr_aggrigated_grp_indicator[7] = '<AugAggregatedGroupInd>'.$aggregate_group_aug.'</AugAggregatedGroupInd>';\n\t\t\t\n\t\t\t// sep value\n\t\t\tif(!empty($part3->aggregate_group_sep_III)){\n\t\t\t\t$aggregate_group_sep = $part3->aggregate_group_sep_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_sep = 0;\n\t\t\t}\t\t\t\n\t\t\t$arr_aggrigated_grp_indicator[8] = '<SepAggregatedGroupInd>'.$aggregate_group_sep.'</SepAggregatedGroupInd>';\t\t\t\n\t\t\t\n\t\t\t// oct value\n\t\t\tif(!empty($part3->aggregate_group_oct_III)){\n\t\t\t\t$aggregate_group_oct = $part3->aggregate_group_oct_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_oct = 0;\n\t\t\t}\t\t\t\n\t\t\t$arr_aggrigated_grp_indicator[9] = '<OctAggregatedGroupInd>'.$aggregate_group_oct.'</OctAggregatedGroupInd>';\n\t\t\t\n\t\t\t// nov value\n\t\t\tif(!empty($part3->aggregate_group_nov_III)){\n\t\t\t\t$aggregate_group_nov = $part3->aggregate_group_nov_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_nov = 0;\n\t\t\t}\t\t\t\n\t\t\t$arr_aggrigated_grp_indicator[10] = '<NovAggregatedGroupInd>'.$aggregate_group_nov.'</NovAggregatedGroupInd>';\n\t\t\t\n\t\t\t// dec value\n\t\t\tif(!empty($part3->aggregate_group_dec_III)){\n\t\t\t\t$aggregate_group_dec = $part3->aggregate_group_dec_III;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$aggregate_group_dec = 0;\n\t\t\t}\t\t\t\n\t\t\t$arr_aggrigated_grp_indicator[11] = '<DecAggregatedGroupInd>'.$aggregate_group_dec.'</DecAggregatedGroupInd>';\t\t\t\n\t\t\t\n\t\t\t//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\n\t\t\t/////////////////////////////////////////////////\n\t\t\t//getting 1094c 24-35 E values (preparing array)\n\t\t\t\n\t\t\t// jan value\n\t\t\tif(!empty($part3->section_4980h_transition_jan_III)){\n\t\t\t\t$section_4980h_transition_jan = $part3->section_4980h_transition_jan_III;\n\t\t\t\t$arr_section_4980h_transition[0] = '<JanALESect4980HTrnstReliefCd>'.$section_4980h_transition_jan.'</JanALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// feb value\n\t\t\tif(!empty($part3->section_4980h_transition_feb_III)){\n\t\t\t\t$section_4980h_transition_feb = $part3->section_4980h_transition_feb_III;\n\t\t\t\t$arr_section_4980h_transition[1] = '<FebALESect4980HTrnstReliefCd>'.$section_4980h_transition_feb.'</FebALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// mar value\n\t\t\tif(!empty($part3->section_4980h_transition_mar_III)){\n\t\t\t\t$section_4980h_transition_mar = $part3->section_4980h_transition_mar_III;\n\t\t\t\t$arr_section_4980h_transition[2] = '<MarALESect4980HTrnstReliefCd>'.$section_4980h_transition_mar.'</MarALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// apr value\n\t\t\tif(!empty($part3->section_4980h_transition_apr_III)){\n\t\t\t\t$section_4980h_transition_apr = $part3->section_4980h_transition_apr_III;\n\t\t\t\t$arr_section_4980h_transition[3] = '<AprALESect4980HTrnstReliefCd>'.$section_4980h_transition_apr.'</AprALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// may value\n\t\t\tif(!empty($part3->section_4980h_transition_may_III)){\n\t\t\t\t$section_4980h_transition_may = $part3->section_4980h_transition_may_III;\n\t\t\t\t$arr_section_4980h_transition[4] = '<MayALESect4980HTrnstReliefCd>'.$section_4980h_transition_may.'</MayALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// jun value\n\t\t\tif(!empty($part3->section_4980h_transition_jun_III)){\n\t\t\t\t$section_4980h_transition_jun = $part3->section_4980h_transition_jun_III;\n\t\t\t\t$arr_section_4980h_transition[5] = '<JunALESect4980HTrnstReliefCd>'.$section_4980h_transition_jun.'</JunALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// jul value\n\t\t\tif(!empty($part3->section_4980h_transition_jul_III)){\n\t\t\t\t$section_4980h_transition_jul = $part3->section_4980h_transition_jul_III;\n\t\t\t\t$arr_section_4980h_transition[6] = '<JulALESect4980HTrnstReliefCd>'.$section_4980h_transition_jul.'</JulALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// aug value\n\t\t\tif(!empty($part3->section_4980h_transition_aug_III)){\n\t\t\t\t$section_4980h_transition_aug = $part3->section_4980h_transition_aug_III;\n\t\t\t\t$arr_section_4980h_transition[7] = '<AugALESect4980HTrnstReliefCd>'.$section_4980h_transition_aug.'</AugALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// sep value\n\t\t\tif(!empty($part3->section_4980h_transition_sep_III)){\n\t\t\t\t$section_4980h_transition_sep = $part3->section_4980h_transition_sep_III;\n\t\t\t\t$arr_section_4980h_transition[8] = '<SepALESect4980HTrnstReliefCd>'.$section_4980h_transition_sep.'</SepALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// oct value\n\t\t\tif(!empty($part3->section_4980h_transition_oct_III)){\n\t\t\t\t$section_4980h_transition_oct = $part3->section_4980h_transition_oct_III;\n\t\t\t\t$arr_section_4980h_transition[9] = '<OctALESect4980HTrnstReliefCd>'.$section_4980h_transition_oct.'</OctALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// nov value\n\t\t\tif(!empty($part3->section_4980h_transition_nov_III)){\n\t\t\t\t$section_4980h_transition_nov = $part3->section_4980h_transition_nov_III;\n\t\t\t\t$arr_section_4980h_transition[10] = '<NovALESect4980HTrnstReliefCd>'.$section_4980h_transition_nov.'</NovALESect4980HTrnstReliefCd>';\n\t\t\t}\n\t\t\t\n\t\t\t// dec value\n\t\t\tif(!empty($part3->section_4980h_transition_dec_III)){\n\t\t\t\t$section_4980h_transition_dec = $part3->section_4980h_transition_dec_III;\n\t\t\t\t$arr_section_4980h_transition[11] = '<DecALESect4980HTrnstReliefCd>'.$section_4980h_transition_dec.'</DecALESect4980HTrnstReliefCd>';\n\t\t\t}\t\t\t\n\t\t\t//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t\n\t\t\t//preparing array of other ALE members of aggrigated ALE Group\n\t\t\tfor($i=36;$i<=65;$i++){\n\t\t\t\t$val = 'name_IV_'.$i;\n\t\t\t\t$ein_val = 'ein_IV_'.$i;\n\t\t\t\tif(!empty($part4->$val) || !empty($part4->$ein_val)){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$other_ale_member .= '<OtherALEMembersGrp>';\n\t\t\t\t\t\t\t\t\t\tif(!empty($part4->$val)){\n\t\t\t\t\t$other_ale_member .=\t'<BusinessName>\n\t\t\t\t\t\t\t\t\t\t\t\t<BusinessNameLine1Txt>'.$part4->$val.'</BusinessNameLine1Txt>\n\t\t\t\t\t\t\t\t\t\t\t</BusinessName>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t$other_ale_member .=\t'<irs:TINRequestTypeCd>BUSINESS_TIN</irs:TINRequestTypeCd>';\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(!empty($part4->$ein_val) && preg_replace ( '/[^0-9]/s', '', $part4->$ein_val )!= ''){\n\t\t\t\t\t$other_ale_member .= \t'<irs:EIN>'.preg_replace ( '/[^0-9]/s', '', $part4->$ein_val ).'</irs:EIN>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t$other_ale_member .= '</OtherALEMembersGrp>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/////// getting total 1095 records count\n\t\t\t$total_1095_count = TblAca1095::find()->where(['form_id'=>$form_id])->count();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//assigning all values into an array\n\t\t\t//array is for \n\t\t\t$params_array = array(\n\t\t\t\t'form_id'=>$form_id,\n\t\t\t\t'clean_ein'=>$clean_ein,\n\t\t\t\t'reporting_year'=>$reporting_year,\n\t\t\t\t'employer_name'=>$employer_name,\n\t\t\t\t'addressone'=>$addressone,\n\t\t\t\t'addresstwo'=>$addresstwo,\n\t\t\t\t'city'=>$city,\n\t\t\t\t'state'=>$state,\n\t\t\t\t'zip'=>$zip,\n\t\t\t\t'contact_first_name'=>$contact_first_name,\n\t\t\t\t'contact_middle_name'=>$contact_middle_name,\n\t\t\t\t'contact_last_name'=>$contact_last_name,\n\t\t\t\t'contact_suffix'=>$contact_suffix,\n\t\t\t\t'contact_phone'=>$clean_phone,\n\t\t\t\t'govt_entity_name'=>$govt_entity_name,\n\t\t\t\t'employer_ein'=>$employer_ein,\n\t\t\t\t'address_line_one'=>$address_line_one,\n\t\t\t\t'address_line_two'=>$address_line_two,\n\t\t\t\t'city_or_town_2_I'=>$city_or_town_2_I,\n\t\t\t\t'state_or_province_2_I'=>$state_or_province_2_I,\n\t\t\t\t'country_and_zip_2_I'=>$country_and_zip_2_I,\n\t\t\t\t'first_name_of_person_to_contact_2_I'=>$first_name_of_person_to_contact_2_I,\n\t\t\t\t'middle_name_of_person_to_contact_2_I'=>$middle_name_of_person_to_contact_2_I,\n\t\t\t\t'last_name_of_person_to_contact_2_I'=>$last_name_of_person_to_contact_2_I,\n\t\t\t\t'suffix_name_of_person_to_contact_2_I'=>$suffix_name_of_person_to_contact_2_I,\n\t\t\t\t'contact_telephone_number_2_I'=>$contact_telephone_number_2_I,\n\t\t\t\t'total_no_records_submitted'=>$total_no_records_submitted,\n\t\t\t\t'total_no_of_1095c_filled_II'=>$total_no_of_1095c_filled_II,\n\t\t\t\t'ale_member_check'=>$ale_member_check,\n\t\t\t\t'quality_offer_method'=>$quality_offer_method,\n\t\t\t\t'section_4980_transition'=>$section_4980_transition,\n\t\t\t\t'offer_method'=>$offer_method,\n\t\t\t\t'minimal_essential_coverage'=>$minimal_essential_coverage,\n\t\t\t\t'full_time_employee_count'=>$full_time_employee_count,\n\t\t\t\t'total_employee_count_for_ale_member'=>$total_employee_count_for_ale_member,\n\t\t\t\t'aggregate_group_all'=>$aggregate_group_all,\n\t\t\t\t'arr_minimal_essential_coverage'=>$arr_minimal_essential_coverage,\n\t\t\t\t'arr_total_employee_count'=>$arr_total_employee_count,\n\t\t\t\t'arr_aggrigated_grp_indicator'=>$arr_aggrigated_grp_indicator,\n\t\t\t\t'arr_section_4980h_transition'=>$arr_section_4980h_transition,\n\t\t\t\t'other_ale_member'=>$other_ale_member,\n\t\t\t\t'total_1095_count'=>$total_1095_count,\n\t\t\t\t'time'=>$time\n\t\t\t);\n\t\t\t\n\t\t\t// calling create data xml function\t\t\t\n\t\t\t$create_data_xml = $this->createdataxml($params_array,$company_client_number);\n\t\t\t\n\t\t\t// calling create manifest xml function\t\t\t\n\t\t\tif($create_data_xml == 'success'){\n\t\t\t\t$create_xml = $this->createmanifestxml($params_array,$company_client_number);\n\t\t\t\t\n\t\t\t\t// creating zip files\n\t\t\t\tif($create_xml == 'success'){\n\t\t\t\t\t$result = \\Yii::$app->Sharefile->zipaDirectory ( getcwd () . '/files/xml/'.$company_client_number. '/', getcwd () . '/files/xml/' . $company_client_number . '.zip' );\n\t\t\t\t\tif ($result == 'success') {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * ** removing files & folders from server **\n\t\t\t\t\t\t*/\n\t\t\t\t\t\texec ( 'rm -R ' . getcwd () . '/files/xml/'.$company_client_number );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$imgData = file_get_contents(getcwd () . '/files/xml/'.$company_client_number. '.zip');\n\t\t\t\t\t\t\n\t\t\t\t\t\t/// update in table\n\t\t\t\t\t\t$sql = \"UPDATE tbl_aca_forms SET xml_file='\".addslashes($imgData).\"' WHERE id=$form_id\";\n\n\t\t\t\t\t\tYii::$app->db->createCommand($sql)->execute();\n\t\t\t\t\t\t\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * ** removing files **\n\t\t\t\t\t\t*/\n\t\t\t\t\t\texec ( 'rm ' . getcwd () . '/files/xml/'.$company_client_number .'.zip' );\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t}\n\t\t\n\t\t} catch ( \\Exception $e ) { // catching the exception\n\t\t\t\t\n\t\t\t$msg = $e->getMessage ().' at line no '.$e->getLine();\n\t\t\t\n\t\t\t$arrerror ['error_desc'] = $msg;\n\t\t\t$arrerror ['error_type'] = 5;\n\n\t\t\tif(!empty($company_id)){\n\t\t\t\t$arrerror ['company_id'] = $company_id;\n\t\t\t}\n\t\t\t\t\n\t\t\t// Below function saves exceptions if occurs\n\t\t\t$this->Saveerrors ( $arrerror );\n\t\t}\n\t}",
"function ercore_user_guide() {\n $markup = \"<h2>Introduction</h2>\n<p>This guide has been developed for first time users of the EPSCoR Core\nReporting site (ERCore). This site has been developed using Drupal 7, an\nopen-source content management system. Whether you are a developer, tester,\nadministrator or an end user, we all need to get familiar with Drupal first.\nIn addition, this guide also introduces important terms used by the NSF EPSCoR\nprogram and how those terms are interpreted by the system. This relationship\nis important for system administrators to understand to be able to deliver\nreporting data to NSF with confidence.</p><p>In general, most of the data\nrequested by this reporting system will be viewable by the public, but in order\nto enter new, edit, or download the compiled tables you will need to have an\naccount and be logged in.</p>\";\n $markup .= \"<h2 id=\\\"request-account\\\">Request an Account</h2>\n<ul>\n<li>Select on the \\\"<em>Create new account</em>\\\" link located in the gray box at\nthe top left hand side of the home page. <strong>This varies by site.</strong>\n</li>\n<li>There are 4 fields that require information:\n <ol>\n <li>The name field is required. The title, generational, and credentials\n portions of this field are optional,</li>\n\t\t<li>Email: a unique email address for each individual</li>\n\t\t<li>Username: a unique value for each individual. This is not displayed.\n\t\t</li>\n\t\t<li>Participating Institution. If your institution is not on the list, talk\n\t\tto a site administrator.</li>\n\t\t<li>Department: The department field is optional, but can be helpful for\n\t\tgrouping or differentiating people.</li>\n\t\t</ol>\n</li>\n<li>Click on Create New Account when you are done. This generates an email sent\nto the Web Master who needs to approve the request. </li>\n<li>An email will be sent when your account is approved</li>\n</ul>\";\n $markup .= \"<h2 id=\\\"log-in\\\">Log In</h2>\n<p>Once the Web Master has approved your account, an email will be sent to you.\nIn it will be directions to log in and include a link to visit the site. In\nthis example we use the New Hampshire\\'s development site. In your web browser,\nvisit the URL to your jurisdiction\\'s web site. Your program administrator\nneeds to give this to you.</p>\";\n $markup .= \"<h2 id=\\\"user\\\">User Profile</h2>\n<p>The system greatly depends on complete and accurate user data. Please\ncomplete all the fields presented to you in the user profile. The final data\nis only as good as the data you enter.</p>\n<p>After you login you will be taken to your User Profile home page. At any\npoint in time you need to get back to your user account, scroll to the top of\nany page and look in the black menu bar for your user name. It actually\nsays, \\\"<em>Hello (user)</em>\\\". Click on your name and you will be taken to your\nuser account.</p>\n<p>Near your user-name is a row of tabs. The most important of those are the View and\nthe Edit tabs. Clicking either will give you that functionality (click Edit to\nedit, and View to view your profile\\'s content).</p>\n<p>Below your photo (once you have uploaded one) is a block of horizontal tabs\nof grouped information. The other tabs are Contact, Demographics, EPSCoR\nInvolvement, Institution, and Data Collection. Clicking on those tabs will\ntake you to that information. Once in a View of our choice, clicking on Edit\nwill allow you to edit that content.</p>\n<h3>Contact Information</h3>\n<ol><li>Select on the \\\"<em>Hello (Your name)</em>\\\" link at the top right of any\npage (after you are logged in)</li>\n<li>Select on the Edit tab</li>\n<li>Select on the Contact Information tab if you are not already there</li>\n<li>The red asterisk after a field means that the data is required. You will\nnot be able to save the form unless all required fields have been completed.</li>\n<li>The name field may have been entered to create your account, but it can be\nupdated, and</li>\n<li>Phone fields (mobile and work), Work Address and Professional Link are\noptional fields.</li>\n</ol>\";\n $markup .= \"<h3>Demographics</h3>\n<p>NSF requires that we try to obtain demographic data for all our participants,\nincluding those attending EPSCoR sponsored events. Given such a requirement,\nit is OPTIONAL to you if you want to submit it or not. This data will be\nencrypted and disassociated from your name. Only the counts of the various\nentries will be submitted to NSF.</p>\n<ol>\n<li>Select the appropriate radio buttons that best describes your demographics.\n<br /><em>In the case where you have multiple disabilities, citizenships or\n\traces, select the one that best describes you.</em></li>\n<li>Check the \\\"<em>I am a veteran</em>\\\" check box if you are a veteran</li></ol>\n<h3>EPSCoR Involvement</h3>\n<h4>Most Senior Project Role <em>(Required)</em></h4>\n<ul><li>Select the one position type that best describes your involvement with\nEPSCoR. This list is defined by NSF Fast-lane. If a position type is not listed\nthat better defines your involvement, select the Other option.</li></ul>\n<h4>EPSCoR Leadership Team <em>(Required)</em></h4>\n<ul><li>Select the option that best fits your role.</li></ul>\n<h4>Project Component(s) <em>(May be required or not present)</em></h4>\n<p>Components are analogous to teams and are unique to each jurisdiction.\nComponents can easily be changed by an administrator or Drupal developer.</p>\n<ul>\n<li>Select the project component of which you are involved</li>\n<li>Select multiple components if you are involved with more than one</li>\n<li>If a component you are involved with is not listed, contact your\nadministrator</li></ul>\";\n $markup .= \"<h4>Program(s) <em>(May be required or not present)</em></h4>\n<p>Programs can be projects, teams, or workign groups and will vary by\njurisdiction. Programs can easily be changed by an administrator or Drupal\ndeveloper.</p>\n<ul>\n<li>Select the program of which you are involved</li>\n<li>Select multiple programs if you are involved with more than one</li>\n<li>If a program you are involved with is not listed, contact your\nadministrator</li></ul>\n<h4>Please select which boards or committees you will be a member of</h4>\n<ul><li>Select one or multiple <em>(if applicable)</em></li></ul>\n<h4>Participating Date</h4>\n<ul><li>Enter the date you officially began participating with EPSCoR.</li></ul>\n<h4>Hire Date</h4>\n<ul><li>Enter the date that you were first hired by EPSCoR (if applicable). This\nwould be the date that you started getting paid.</li></ul>\n<h3>Are you paid by the EPSCoR grant <em>(Required)</em></h3>\n<ul><li>Select the option that best fits your role.</li>\n<li>If yes, the option for Months of Direct Funding will appear. From the drop\ndown, select how many months of direct funding you receive. Round up or down to\nthe nearest month of funding you are expected to receive.</li></ul>\";\n $markup .= \"<h4>Do you participate in EPSCoR research more than 160 hours per year</h4>\n<p>This ties into NSF Fast-lane and refers to whether or not you put in more\nthan 160 hours of effort in a year to this EPSCoR grant, whether you are paid\nor not</p>\n<ul>\n<li>Select the appropriate radio button with respect to the number of hours you\nparticipate in this EPSCoR grant in a year</li>\n<li>If yes, please select the nearest person month of effort in EPSCoR</li>\n<li>Select a number from the drop down box and round up or down to the nearest\nmonth of funding you are expected to receive.</li></ul>\n<h4>Please describe role and contribution to the project</h4>\n<ul><li>Include information about what you are doing, in which projects, who you are\nworking with, location, dates and your contribution.</li></ul>\n<h3>RCR - Responsible Conduct of Research</h3>\n<ul><li>Select the \\\"<em>I have completed the RCR training</em>\\\" check box if you have taken\neither in-person or on-line versions of the RCR training.</li></ul>\n<ul>\n<li>RCR In-Person: Enter the month, day and year of when you took the in-person\ncourse</li>\n<li>RCR In-Person Upload: Upload a txt, word or pdf of your certificate</li>\n<li>RCR On-Line: Enter the date you took the RCR online training</li>\n<li>RCR On-Line Upload: attach the txt, word or pdf of your online RCR\ncertificate</li></ul>\n<h3>Institution</h3>\n<ul><li>Select the radio button of the institution you are affiliated with.</li></ul>\n<p>Department: Enter in the name of the department for which you are\naffiliated</p>\n<h3>Data Collection</h3>\n<p>Check the \\\"<em>I plan to be collecting data through my research</em>\\\" check\nbox if you anticipate collecting data as a result of your research.</p>\n<p>Has this user been put in touch with the Data Manager?: Check the\nappropriate button for your situation. This will send notices to the\nEPSCoR administrator as well as the data repository manager.</p>\";\n $markup .= \"<h3>Account Information</h3>\n<ol>\n<li>Username: The system user name is determined by the website administrator\nupon account creation. This is a required field </li>\n<li>Current Password: This is your current (non-visible) password and can be\nreset by clicking on the \\\"<em>Request new password</em>\\\" link near your Current\npassword field or by entering a new Password in the two fields below your E-mail\naddress. <strong>Some jurisdictions may block this setting.</strong></li>\n<li>E-mail address: This will need to be A valid e-mail address. All e-mails\nfrom the system will be sent to this address. The e-mail address is not made\npublic and will only be used if you wish to receive a new password or wish to\nreceive certain news or notifications by e-mail. This is a required field.</li>\n<li>Status: This determines whether or not you or a user can login to the\nsystem. Leave it Active.</li>\n<li>Roles: These roles are the technical Drupal roles created to designate who\ncan see or access what. Different from Involvement, which is the role or hat\none wears with respect to their participation within EPSCoR. It is strongly\nrecommended that EPSCoR staff review the Roles and Permissions page to suit\nyour needs at your local area. Below is what is provided in the default EPSCoR\nReporting Core module. The standard roles are as follows:\n\t<ul>\n <li>Anonymous User: This role is used for users that don\\'t have a user\n account or that are not authenticated.</li>\n\t<li>Authenticated user: This role is automatically granted to all logged\n\tin users(simply means that you have an account in Drupal). </li>\n <li>Guest: Very limited role with access to view ERCore module functionality\n only. </li>\n <li>Student: Identical to Faculty out - of - the - box. An important\n designation technically, but left up to the jurisdiction to further restrict\n or grant access to specific areas.</li>\n <li>Faculty: A subset of EPSCoR Administrator generally restricting the\n ability to edit other\\'s content</li>\n\t<li>Administrator Staff: A subset of Site Administrator and EPSCoR\n\tAdministrator, restricting access to the more technical aspects of Drupal and\n\tEPSCoR reporting</li>\n \t<li>Administrator: Access to any and all Drupal capabilities</li></ul>\n</li></ol>\";\n $markup .= \"<h3>Administrative Overlay</h3>\n<p>Disregard this option if you see it.</p>\n<h3>Upload a photo</h3>\n<p>Click on the Choose file button to browse and upload a photo.</p>\n<h3>Locale Settings</h3>\n<p>Select your locale setting. This will configure Drupal to show date and time\nto your location.</p>\n<h3>Save</h3>\n<p>Click the Save button when you are done. If any required fields are\nincorrectly or not answered, an error message will be displayed at the top of\nthe page. Read it and address the issue. If for some reason you cannot address\nthe issue, call your EPSCoR administrator or your Drupal web site manager for\nhelp.</p>\";\n return array(\n '#markup' => $markup,\n );\n}",
"public function getFeatureEligibility()\n {\n return $this->featureEligibility;\n }",
"function ucsc_register_student_opportunities_eligibility()\n{\n\t$labels = array(\n\t\t'name' => 'Academic Support Eligibility',\n\t\t'singular_name' => 'Academic Support Eligibility Item',\n\t\t'search_items' => 'Search Eligibility Items',\n\t\t'all_items' => 'All Academic Support Eligibility Items',\n\t\t'parent_item' => 'Parent Academic Support Eligibility Item',\n\t\t'parent_item_colon' => 'Parent Academic Support Eligibility Item:',\n\t\t'edit_item' => 'Edit Academic Support Eligibility Item',\n\t\t'update_item' => 'Update Academic Support Eligibility Item',\n\t\t'add_new_item' => 'Add Academic Support Eligibility Item',\n\t\t'new_item_name' => 'New Academic Support Eligibility Item',\n\t\t'menu_name' => 'Academic Support Eligibility'\n\t);\n\n\tregister_taxonomy(\n\t\t'student-opp-eligib-tax',\n\t\tarray('studentopportunities', 'student-support'),\n\t\tarray(\n\t\t\t'hierarchical' => true,\n\t\t\t'labels' => $labels,\n\t\t\t'show_ui' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array('slug' => 'academic-support-eligib-tax'),\n\t\t\t'show_in_rest' => true, //Required for Gutenberg editor\n\t\t\t'rest_base' => 'academic-support-eligib-tax-api',\n\t\t\t'rest_controller_class' => 'WP_REST_Terms_Controller',\n\t\t)\n\t);\n}",
"public function view_attendence()\n\t{\n\t\t$query=\"select student_attendence.*,student.* from student_attendence inner join student on (student.studentID=student_attendence.studentID) order by student_attendence.attendenceID DESC\";\n\t\t$data['attendences']=$this->admin_model->raw_query($query,1);\n\t\t$this->load->view('admin/header',$data);\n\t\t$this->load->view('admin/view_attendence');\n\t\t$this->load->view('admin/footer');\n\t}",
"function GetEducationBG()\r\n {\r\n $companyid = $this->companyID;\r\n $emp_seqno = $this->empSeqNO;\r\n $sql_string = <<<eof\r\n select schoolname,\r\n edu_type_name,\r\n major,\r\n begindate,\r\n enddate,\r\n graduatetype\r\n from ehr_emp_educationbg_v\r\n where company_id = '$companyid'\r\n and emp_seq_no = '$emp_seqno'\r\n\t\t\t order by begindate desc\r\neof;\r\n return $this->DBConn->GetArray($sql_string);\r\n }",
"function xmldb_block_fn_mentor_install() {\n global $CFG, $DB, $SITE;\n\n $systemcontext = context_system::instance();\n\n // Create new roles.\n if ($ms = $DB->get_record('role', array('shortname'=>'mentor'))) {\n $mentorsystem = $ms->id;\n } else {\n $mentorsystem = create_role('Mentor', 'mentor', '', '');\n set_role_contextlevels($mentorsystem, array(CONTEXT_SYSTEM));\n }\n if ($us = $DB->get_record('role', array('shortname'=>'mentor_user'))) {\n $mentoruser = $us->id;\n } else {\n $mentoruser = create_role('Mentor user', 'mentor_user', '', '');\n set_role_contextlevels($mentoruser, array(CONTEXT_USER));\n }\n\n\n // Extra capability tweaks for new roles without archetypes.\n if ($user_system = $DB->get_record('role', array('shortname'=>'user'))) {\n assign_capability('moodle/user:viewdetails', CAP_ALLOW, $user_system->id, $systemcontext->id, true);\n }\n\n assign_capability('moodle/notes:view', CAP_ALLOW, $mentorsystem, $systemcontext->id, true);\n assign_capability('block/fn_mentor:viewcoursenotes', CAP_ALLOW, $mentorsystem, $systemcontext->id, true);\n\n assign_capability('mod/assign:grade', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('mod/assign:view', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('mod/assignment:grade', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('mod/assignment:view', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('moodle/user:readuserblogs', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('moodle/user:readuserposts', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('moodle/user:viewuseractivitiesreport', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('moodle/user:viewdetails', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('gradereport/user:view', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('moodle/grade:viewall', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('gradereport/grader:view', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('moodle/user:viewalldetails', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('moodle/grade:view', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('report/outline:view', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('report/progress:view', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('moodle/notes:view', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('moodle/notes:manage', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n assign_capability('block/fn_mentor:viewcoursenotese', CAP_ALLOW, $mentoruser, $systemcontext->id, true);\n $systemcontext->mark_dirty();\n\n return true;\n}",
"public function educationAction()\n {\n // action body\n $id=Auth_UserAdapter::getIdentity()->getId();\n $result=\\Extended\\education_detail::getEduInfoList($id);\n \t$this->view->eduInfoList=$result;\n }",
"function display_wpjobus_resume_education_settings ($post) {\n\t\t\t$wpjobus_resume_education = get_post_meta($post->ID, 'wpjobus_resume_education',true);\n\t\t\t$wpjobus_resume_award = get_post_meta($post->ID, 'wpjobus_resume_award',true);\n\n\t\t?>\n\t\t\n\t\t<input type=\"hidden\" name=\"cmb_nonce\" value=\"<?php echo wp_create_nonce(basename(__FILE__)); ?>\" />\n\n\t\t<div id='review_options_popup'>\n\n\t\t\t<div id=\"resume_institution\">\n\t\t\t\t<?php \n\t\t\t\t\tfor ($i = 0; $i < (count($wpjobus_resume_education)); $i++) {\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t<div class=\"option_item\" id=\"<?php echo $i; ?>\">\n\t\t\t\t\t\n\t\t\t\t\t<span class='text'>Institution <?php echo ($i+1); ?></span>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Institution Name:</span>\n\t\t\t\t\t\t<input type='text' id='wpjobus_resume_education[<?php echo $i; ?>][0]' name='wpjobus_resume_education[<?php echo $i; ?>][0]' value='<?php if (!empty($wpjobus_resume_education[$i][0])) echo $wpjobus_resume_education[$i][0]; ?>' class='criteria_name' placeholder=\"\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Qualification & Faculty:</span>\n\t\t\t\t\t\t<input type='text' id='wpjobus_resume_education[<?php echo $i; ?>][1]' name='wpjobus_resume_education[<?php echo $i; ?>][1]' value='<?php if (!empty($wpjobus_resume_education[$i][1])) echo $wpjobus_resume_education[$i][1]; ?>' class='criteria_name_two' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Period from:</span>\n\t\t\t\t\t\t<input type='text' id='wpjobus_resume_education[<?php echo $i; ?>][2]' name='wpjobus_resume_education[<?php echo $i; ?>][2]' value='<?php if (!empty($wpjobus_resume_education[$i][2])) echo $wpjobus_resume_education[$i][2]; ?>' class='criteria_from_time' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Period to:</span>\n\t\t\t\t\t\t<input type='text' id='wpjobus_resume_education[<?php echo $i; ?>][3]' name='wpjobus_resume_education[<?php echo $i; ?>][3]' value='<?php if (!empty($wpjobus_resume_education[$i][3])) echo $wpjobus_resume_education[$i][3]; ?>' class='criteria_to_time' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Location:</span>\n\t\t\t\t\t\t<input type='text' id='wpjobus_resume_education[<?php echo $i; ?>][4]' name='wpjobus_resume_education[<?php echo $i; ?>][4]' value='<?php if (!empty($wpjobus_resume_education[$i][4])) echo $wpjobus_resume_education[$i][4]; ?>' class='criteria_location' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Notes:</span>\n\t\t\t\t\t\t<textarea class=\"criteria_notes\" name=\"wpjobus_resume_education[<?php echo $i; ?>][5]\" id='wpjobus_resume_education[<?php echo $i; ?>][5]' cols=\"70\" rows=\"7\" ><?php if (!empty($wpjobus_resume_education[$i][5])) echo $wpjobus_resume_education[$i][5]; ?></textarea>\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<button name=\"button_del_institution\" type=\"button\" class=\"button-secondary button_del_institution\">delete</button>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<?php \n\t\t\t\t\t}\n\t\t\t\t?>\n\n\n\t\t\t</div>\n\n\t\t\t<div id=\"template_education\">\n\t\t\t\t\n\t\t\t\t<div class=\"option_item\" id=\"999\">\n\t\t\t\t\t<span class='text'>Institution 999</span>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Institution Name:</span>\n\t\t\t\t\t\t<input type='text' id='' name='' value='' class='criteria_name' placeholder=\"\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Qualification & Faculty:</span>\n\t\t\t\t\t\t<input type='text' id='' name='' value='' class='criteria_name_two' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Period from:</span>\n\t\t\t\t\t\t<input type='text' id='' name='' value='' class='criteria_from_time' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Period to:</span>\n\t\t\t\t\t\t<input type='text' id='' name='' value='' class='criteria_to_time' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Location:</span>\n\t\t\t\t\t\t<input type='text' id='' name='' value='' class='criteria_location' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Notes:</span>\n\t\t\t\t\t\t<textarea class=\"criteria_notes\" name=\"\" id='' cols=\"70\" rows=\"7\" ></textarea>\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<button name=\"button_del_institution\" type=\"button\" class=\"button-secondary button_del_institution\">delete</button>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\n\t\t\t<div class=\"option_item\">\n\t\t\t\t<button type=\"button\" name=\"submit_add_institution\" id='submit_add_institution' value=\"add\" class=\"button-secondary\">Add new institution</button>\n\t\t\t</div>\n\n\n\n\n\t\t\t<div id=\"resume_award\">\n\t\t\t\t<?php \n\t\t\t\t\tfor ($i = 0; $i < (count($wpjobus_resume_award)); $i++) {\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t<div class=\"option_item\" id=\"<?php echo $i; ?>\">\n\t\t\t\t\t\n\t\t\t\t\t<span class='text'>Award <?php echo ($i+1); ?></span>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Prize:</span>\n\t\t\t\t\t\t<input type='text' id='wpjobus_resume_award[<?php echo $i; ?>][0]' name='wpjobus_resume_award[<?php echo $i; ?>][0]' value='<?php if (!empty($wpjobus_resume_award[$i][0])) echo $wpjobus_resume_award[$i][0]; ?>' class='criteria_name' placeholder=\"\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Competition Name:</span>\n\t\t\t\t\t\t<input type='text' id='wpjobus_resume_award[<?php echo $i; ?>][1]' name='wpjobus_resume_award[<?php echo $i; ?>][1]' value='<?php if (!empty($wpjobus_resume_award[$i][1])) echo $wpjobus_resume_award[$i][1]; ?>' class='criteria_name_two' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Year:</span>\n\t\t\t\t\t\t<input type='text' id='wpjobus_resume_award[<?php echo $i; ?>][2]' name='wpjobus_resume_award[<?php echo $i; ?>][2]' value='<?php if (!empty($wpjobus_resume_award[$i][2])) echo $wpjobus_resume_award[$i][2]; ?>' class='criteria_from_time' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Location:</span>\n\t\t\t\t\t\t<input type='text' id='wpjobus_resume_award[<?php echo $i; ?>][3]' name='wpjobus_resume_award[<?php echo $i; ?>][3]' value='<?php if (!empty($wpjobus_resume_award[$i][3])) echo $wpjobus_resume_award[$i][3]; ?>' class='criteria_location' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<button name=\"button_del_award\" type=\"button\" class=\"button-secondary button_del_award\">delete</button>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<?php \n\t\t\t\t\t}\n\t\t\t\t?>\n\n\n\t\t\t</div>\n\n\t\t\t<div id=\"template_award\">\n\t\t\t\t\n\t\t\t\t<div class=\"option_item\" id=\"999\">\n\t\t\t\t\t<span class='text'>Award 999</span>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Prize:</span>\n\t\t\t\t\t\t<input type='text' id='' name='' value='' class='criteria_name' placeholder=\"\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Competition Name:</span>\n\t\t\t\t\t\t<input type='text' id='' name='' value='' class='criteria_name_two' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Year:</span>\n\t\t\t\t\t\t<input type='text' id='' name='' value='' class='criteria_from_time' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"full\" style=\"margin-top: 20px; margin-bottom: 20px;\">\n\n\t\t\t\t\t\t<span class=\"text\">Location:</span>\n\t\t\t\t\t\t<input type='text' id='' name='' value='' class='criteria_location' placeholder=\"\" style=\"width: 400px;\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<button name=\"button_del_award\" type=\"button\" class=\"button-secondary button_del_award\">delete</button>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\n\t\t\t<div class=\"option_item\">\n\t\t\t\t<button type=\"button\" name=\"submit_add_award\" id='submit_add_award' value=\"add\" class=\"button-secondary\">Add new award</button>\n\t\t\t</div>\n\n\n\t\t\t<br>\n\n\n\t\t</div>\t<!-- end review_options_pop -->\n\n\n\n\t\t<?php\n\n\t\t}",
"public function setEducationRequirements($value)\n {\n $this->educationRequirements = $value;\n }",
"public function run()\n {\n $educations = [\n\t\t\t['name' => 'Associate\\'s Degree'],\n\t\t\t['name' => 'Bachelor Degree'],\n\t\t\t['name' => 'Doctor Degree'],\n\t\t\t['name' => 'High School'],\n\t\t\t['name' => 'Master Degree'],\n\t\t\t['name' => 'Others'],\n\t\t\t['name' => 'Professional Degree'],\n\t\t];\n\t\t\n\t\tforeach($educations as $value){\n Education::create($value);\n }\n }",
"function _generate_block()\n\t{\n\t\t\t$sRules = $this->_assemble_rules( TRUE );\n\t\n\t\t$sBlock = $this->_sSelector.' { '.$sRules.' }';\n\t\n\t\treturn $sBlock;\n\t}",
"public function add_core_extensions_bundle_block() {\r\n static $block;\r\n\r\n if (!empty($block)) {\r\n return;\r\n }\r\n\r\n $oceanwp_bundle_status = get_option(\"oceanwp_bundle_status\");\r\n $oceanwp_bundle_key = get_option(\"oceanwp_bundle_key\"); ?>\r\n <table class=\"form-table bundle-block\">\r\n <tbody>\r\n <tr>\r\n <th>\r\n <label for=\"core_extensions_bundle_license_key\"><?php _e(\"Core Extensions Bundle License Key\", \"oceanwp\"); ?></label>\r\n </th>\r\n <td>\r\n <input type=\"text\" class=\"regular-text\" id=\"core_extensions_bundle_license_key\" name=\"core_extensions_bundle_license_key\" value=\"<?php echo $this->get_hidden_license_key($oceanwp_bundle_key); ?>\" <?php echo ($oceanwp_bundle_key) ? \"readonly\" : \"\"; ?> />\r\n <?php\r\n if ($oceanwp_bundle_status == \"valid\") {\r\n $expire_date = get_option(\"oceanwp_bundle_expires\");\r\n ?>\r\n <input type=\"submit\" class=\"button-secondary\" name=\"deactivate_all\" value=\"Deactivate License\">\r\n <div class=\"oceanwp-license-data oceanwp-license-valid-msg valid-msg license-expiration-date-notice\">\r\n <p><?php\r\n printf(__('Your license key expires on %1$s.', 'ocean-extra'), date_i18n(get_option('date_format'), strtotime($expire_date, current_time('timestamp'))));\r\n ?></p>\r\n </div> \r\n <?php\r\n }\r\n\r\n if (empty($oceanwp_bundle_status)) {\r\n ?>\r\n <div class=\"oceanwp-license-data oceanwp-license-empty-msg empty-msg \">\r\n\r\n <p><?php _e(\"If you bought the Core Extensions Bundle, add your bundle license key here to get automatic updates for all the extensions.\", \"ocean-extra\"); ?></p>\r\n </div> \r\n <?php\r\n } elseif ($oceanwp_bundle_status != \"valid\") {\r\n ?>\r\n <div class=\"oceanwp-license-data oceanwp-license-error-msg error-msg license-error-msg-notice \">\r\n\r\n <?php\r\n switch ($oceanwp_bundle_status) {\r\n\r\n case 'expired' :\r\n _e('Your license key is expired. Please renew your license key for auto updates.', 'ocean-extra');\r\n\r\n break;\r\n\r\n case 'revoked' :\r\n\r\n printf(\r\n __('Your license key has been disabled. Please <a href=\"%1$s\" target=\"_blank\">contact support</a> for more information.', 'ocean-extra'), 'https://oceanwp.org/support?utm_campaign=admin&utm_source=licenses&utm_medium=revoked'\r\n );\r\n\r\n break;\r\n\r\n case 'missing' :\r\n\r\n printf(\r\n __('Invalid license. Please <a href=\"%1$s\" target=\"_blank\">visit your account page</a> and verify it.', 'ocean-extra'), 'https://oceanwp.org/your-account?utm_campaign=admin&utm_source=licenses&utm_medium=missing'\r\n );\r\n\r\n\r\n break;\r\n\r\n case 'invalid' :\r\n case 'site_inactive' :\r\n printf(\r\n __('Your %1$s is not active for this URL. Please <a href=\"%2$s\" target=\"_blank\">visit your account page</a> to manage your license key URLs.', 'ocean-extra'), \"Core Extensions Bundle\", 'https://oceanwp.org/your-account?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'\r\n );\r\n\r\n\r\n break;\r\n\r\n case 'item_name_mismatch' :\r\n\r\n printf(__('This appears to be an invalid license key for %1$s.', 'ocean-extra'), \"Core Extensions Bundle\");\r\n\r\n break;\r\n\r\n case 'no_activations_left':\r\n sprintf(__('Your license key has reached its activation limit. <a href=\"%1$s\">View possible upgrades</a> now.', 'ocean-extra'), 'https://oceanwp.org/your-account/');\r\n break;\r\n\r\n case 'license_not_activable':\r\n\r\n _e('The key you entered belongs to a bundle, please use the product specific license key.', 'ocean-extra');\r\n\r\n break;\r\n }\r\n ?>\r\n </div>\r\n <?php\r\n }\r\n ?>\r\n\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <?php\r\n $block = true;\r\n }",
"function AttendanceBlock()\n\t{\tob_start();\n\t\tif ($this->course->CanAttend())\n\t\t{\techo \"<div id='booking_attendance'><h4>Attendance at course ...</h4><ul>\";\n\t\t\tforeach ($this->course->dates as $stamp=>$date)\n\t\t\t{\techo \"<li id='dateatt_\", $this->id, \"_\", $date, \"'>\", $this->AttendanceDateLink($date), \"</li>\";\n\t\t\t}\n\t\t\techo \"</ul>\\n</div>\\n\";\n\t\t}\n\t\treturn ob_get_clean();\n\t}",
"public function educations(){\n return $this->hasMany('App\\Education', 'user_id', 'id');\n }",
"function AddLegalDisclaimer() {\n\t\t$this->addPage();\n\t\t$this->SetFont('Helvetica','I',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->SetY(20);\n\t\t$this->Cell(0, 9, \"LEGAL DISCLAIMER\", 0,\t0, 'C', 0);\n\t\t$this->Ln(4);\n\t\n\t\t$this->SetY(35);\n\t\t$this->Cell(0, 5, \" \", 0,\t0, 'C', 0);\n\t\t$this->Ln();\n\t\t\n\t\t$this->MultiCell(\n\t\t\t\t/* width */ 180,\n\t\t\t\t/* height */ 5,\n\t\t\t\t///* content */ \"All the astrological services on MYSIGN are designed to provide state of the art astrology and interpretations. Bear in mind however that you also need to use your common sense and intuition. Neither MYSIGN nor any affiliated entity is responsible for how users interpret information provided by our software, reports, sunsigns, and astrologers.\",\n\t\t\t\t\"All the astrological services on MySign are designed to provide state of the art astrology and interpretations. Bear in mind, however, that you also need to use your common sense and intuition. Neither MySign nor any affiliated entity is responsible for how users interpret information provided by our astrologers, software, reports, horoscopes and other content.\",\n\t\t\t\t/* no border */ 0,\n\t\t\t\t/* align left */ 'L',\n\t\t\t\t/* transparent fill */ 0\n\t\t);\n\t\t$this->Ln(2);\n\t}",
"function ncn_ceportal_claimview_claim_exaimners($claim_id, $pvc_ce_management, $pvc_ce_management_disabled) {\n ncn_ceportal_check_expired_active_claim_timer_trigger($claim_id);\n \n $tfunction_router = isset($_POST['tfunction_router'])? $_POST['tfunction_router']: '';\n if ($tfunction_router == 'ncn_ceportal_claimview_claim_exaimners') {\n $tfunction = isset($_POST['tfunction'])? $_POST['tfunction']: '' ;\n if ($tfunction) {\n ncn_submit_handler_reflection($tfunction, $claim_id);\n }\n }\n \n if ( !($pvc_ce_management&&01) ) { return ''; }\n \n $ce_claim = ncn_ceportal_get_ncn_ce_claim($claim_id, $pvc_ce_management, $pvc_ce_management_disabled);\n \n ob_start();\n?>\n <fieldset>\n <legend>Claim Examiners Management</legend>\n <div id=\"ce_available_claim_setting_wrapper\">\n <form id=\"ce_available_claim_setting_form\" method=\"POST\">\n <input type=\"hidden\" name=\"tfunction_router\" value=\"ncn_ceportal_claimview_claim_exaimners\" />\n <input type=\"hidden\" name=\"tfunction\" value=\"ncn_ceportal_set_available_claim_handler\" />\n <label><strong>Available Claim for Claim Examiner: </strong></label> \n <?php print ncn_ceportal_render_select_available_claim_setting('ce_is_available_claim', $ce_claim['is_available'] ); ?> \n <?php if ($pvc_ce_management_disabled !='disabled'): ?>\n <input type=\"submit\" value=\" Set \" />\n <?php endif; ?>\n </form>\n </div>\n \n <?php print ncn_ceportal_claim_info_reviewable_section($claim_id, $pvc_ce_management, $pvc_ce_management_disabled); ?>\n <?php print ncn_ceportal_assign_ce_section($claim_id, $pvc_ce_management, $pvc_ce_management_disabled); ?>\n \n <div id=\"ce_history_wrapper\">\n <?php print ncn_ceportal_ce_history_section($claim_id, $pvc_ce_management, $pvc_ce_management_disabled); ?>\n </div>\n \n </fieldset>\n<?php \n $output = ob_get_contents();\n ob_end_clean();\n \n return $output;\n}",
"public function getLegalBasis()\n {\n return $this->legalBasis;\n }",
"function CreateAcademic(){\n\t\t\tglobal $faculty;\n\t\t\t$this->SetFont('Arial','B',14);\n\t\t\t$this->Cell(15,6, 'Current Academic Info', 0,0);\n\t\t\t$this->Ln(1);\n\t\t\t$this->SetFont('Times','',12);\n\t\t\t$this->Ln();\n\t\t\t$this->SetFillColor(255,211,89);\n\t\t\t$this->SetTextColor(0,0,0);\n\t\t\t$this->SetDrawColor(247,247,231);\n\t\t\t$this->SetLineWidth(.4);\n\t\t\t$this->Cell(35,6,'Faculty Phone',1,0,'C',true);\n\t\t\t$this->Cell(53,6,'Office Location',1,0,'C',true);\n\t\t\t$this->Ln();\n\t\t\t$this->SetFillColor(255,235,185);\n\t\t\t$this->SetDrawColor(255,211,89);\n\t\t\t$this->SetTextColor(0,0,0);\n\t\t\t$this->Cell(35,6,$faculty[\"faculty_phone\"],1,0,'C',true);\n\t\t\t$this->Cell(53,6,$faculty[\"room\"],1,0,'C',true);\n\t\t\t$this->Ln(15);\n\t\t}",
"public function education()\n {\n return $this->hasMany(Education::class);\n }"
] | [
"0.5690235",
"0.5445459",
"0.5411912",
"0.53897935",
"0.53129447",
"0.5285275",
"0.5215094",
"0.52024466",
"0.51868653",
"0.51797676",
"0.51598895",
"0.51154935",
"0.5112417",
"0.5101155",
"0.5091083",
"0.50862867",
"0.5052711",
"0.49858928",
"0.498127",
"0.49475533",
"0.49429438",
"0.49399155",
"0.49334595",
"0.49276313",
"0.49186456",
"0.4905321",
"0.48989192",
"0.48908794",
"0.4880998",
"0.4853542"
] | 0.6391594 | 0 |
Mark specific invoice as sent s | public function markInvoiceAsSent($id)
{
return $this->client->post('kb_invoice/'.$id.'/mark_as_sent', []);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setSent($entity) \n {\n $entity->setSent(1);\n $this->manager->flush();\n }",
"public static function mark_email_sent( ) {\n global $wpdb;\n\n $args = array(\n 'ID' => self::$row->email_id,\n 'post_status' => 'sent',\n );\n\n wp_update_post( $args );\n }",
"public function markAsSent($invoice_id, $email, $subject = '', $message = '')\n {\n\n $request_data['InvoiceEmail'] = array(\n 'invoice_id' => $invoice_id,\n 'email' => $email,\n 'subject' => $subject,\n 'message' => $message,\n );\n\n return $this->post('/invoices/mark_as_sent', $request_data);\n\n }",
"public function markAsSent($id)\n {\n $this->getConnection()->update(\n $this->getMainTable(),\n ['is_customer_notified' => 1],\n ['history_id = ?' => $id]\n );\n }",
"public function send()\n {\n $vars = $this->templateContainer->getTemplateVars();\n $this->checkInvoice($vars);\n\n parent::send();\n }",
"public function sendInvitations()\n {\n }",
"public function setEmailSent(bool $emailSent) {\n $this->email_sent = (int) $emailSent;\n\n }",
"public function sendInvoiceReminder()\n {\n if ($this->hasOverdueRemindersLimit()) {\n $limit = $this->getOverdueRemindersLimit();\n\n if ($this->reminders >= $limit) {\n return;\n }\n }\n\n /** @var Webkul\\Customer\\Models\\Customer $customer */\n $customer = $this->customer;\n\n Mail::queue(new InvoiceOverdueReminder($customer, $this));\n\n $this->reminders++;\n\n // Calculate next reminder date\n $date = now();\n\n $interval = $this->getIntervalBetweenReminders();\n\n $date->add($interval);\n $date->setTime(0, 0, 0, 0);\n\n $this->next_reminder_date = $date;\n\n $this->save();\n }",
"public function saveAction()\n {\n $data = $this->getRequest()->getPost('invoice');\n $orderId = $this->getRequest()->getParam('order_id');\n\n if (!empty($data['comment_text'])) {\n Mage::getSingleton('adminhtml/session')->setCommentText($data['comment_text']);\n }\n\n try {\n $invoice = $this->_initInvoice();\n if ($invoice) {\n\n if (!empty($data['capture_case'])) {\n $invoice->setRequestedCaptureCase($data['capture_case']);\n }\n\n if (!empty($data['comment_text'])) {\n $invoice->addComment(\n $data['comment_text'],\n isset($data['comment_customer_notify']),\n isset($data['is_visible_on_front'])\n );\n }\n\n $invoice->register();\n\n if (!empty($data['send_email'])) {\n $invoice->setEmailSent(true);\n }\n\n $invoice->getOrder()->setCustomerNoteNotify(!empty($data['send_email']));\n $invoice->getOrder()->setIsInProcess(true);\n\n $transactionSave = Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder());\n $shipment = false;\n if (!empty($data['do_shipment']) || (int) $invoice->getOrder()->getForcedDoShipmentWithInvoice()) {\n $shipment = $this->_prepareShipment($invoice);\n if ($shipment) {\n $shipment->setEmailSent($invoice->getEmailSent());\n $transactionSave->addObject($shipment);\n }\n }\n $transactionSave->save();\n\n if (isset($shippingResponse) && $shippingResponse->hasErrors()) {\n $this->_getSession()->addError($this->__('The invoice and the shipment have been created. The shipping label cannot be created at the moment.'));\n } elseif (!empty($data['do_shipment'])) {\n $this->_getSession()->addSuccess($this->__('The invoice and shipment have been created.'));\n } else {\n $this->_getSession()->addSuccess($this->__('The invoice has been created.'));\n }\n\n // send invoice/shipment emails\n $comment = '';\n if (isset($data['comment_customer_notify'])) {\n $comment = $data['comment_text'];\n }\n try {\n $invoice->sendEmail(!empty($data['send_email']), $comment);\n } catch (Exception $e) {\n Mage::logException($e);\n $this->_getSession()->addError($this->__('Unable to send the invoice email.'));\n }\n if ($shipment) {\n try {\n $shipment->sendEmail(!empty($data['send_email']));\n } catch (Exception $e) {\n Mage::logException($e);\n $this->_getSession()->addError($this->__('Unable to send the shipment email.'));\n }\n }\n Mage::getSingleton('adminhtml/session')->getCommentText(true);\n $this->_redirect('*/sales_order/view', array('order_id' => $orderId));\n } else {\n $this->_redirect('*/*/new', array('order_id' => $orderId));\n }\n return;\n } catch (Mage_Core_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n } catch (Exception $e) {\n $this->_getSession()->addError($this->__('Unable to save the invoice.'));\n Mage::logException($e);\n }\n $this->_redirect('*/*/new', array('order_id' => $orderId));\n }",
"public function setSent($sent)\n {\n $this->sent = $sent;\n\n return $this;\n }",
"public function isSent()\n {\n \n }",
"protected function markSentEmailEvents($events) {\n\t\tforeach ($events as $event) {\n\t\t\t$event['email_sent'] = true;\n\t\t\t$event->save(Billrun_Factory::db()->eventsCollection());\n\t\t}\n\t}",
"public function setInTellSpam(): void\n {\n $this->tellSpam = 5;\n }",
"public function markAsUnpaid(){\n $this->status = \"NOT APPROVED\";\n $this->save();\n }",
"public function send($invoice = NULL) {\n if (empty($invoice) && empty($this->invoice)) {\n throw new Exception(\"No valid sales invoice given!\");\n }\n\n $this->with(empty($invoice) ? $this->invoice : $invoice);\n\n $body = [];\n if (!empty($this->contact)) {\n if (empty($this->contact->email)) {\n throw new Exception(\"Contact has no email address!\");\n }\n\n if (empty($this->contact->delivery_method)) {\n throw new Exception(\"Contact has no delivery method!\");\n }\n\n $body[ \"email_address\" ] = $this->contact->email;\n $body[ \"delivery_method\" ] = $this->contact->delivery_method;\n }\n\n if (!empty($this->scheduleDate)) {\n $body[ \"sending_scheduled\" ] = TRUE;\n $body[ \"invoice_date\" ] = $this->scheduleDate;\n }\n\n if (!empty($this->emailMessage)) {\n $body[ \"email_message\" ] = $this->emailMessage;\n }\n\n if (count($body) > 0) {\n $body = [ \"sales_invoice_sending\" => $body ];\n\n } else {\n $body = NULL;\n }\n\n return $this->restUpdate($this->getResourcePath(), \"send_invoice\", $body);\n }",
"public function send()\n {\n $this->sent = true;\n }",
"function setSentOn($a_sSentOn)\n {\n $this->_sSentOn = (string) $a_sSentOn;\n $this->setSearchParameter('sent_on', $this->_sSentOn);\n }",
"public function sentStatus ($message) {\n // Mark message as sent\n $message->setMessageStatus(\n $this->em->getReference('AppBundle:MessageStatus', 4)\n );\n\n $this->em->persist($message);\n $this->em->flush();\n }",
"function sendSuccess()\r\n {\r\n $this->email->sent = 1;\r\n $date = JFactory::getDate();\r\n $this->email->sentdate = $date->toMysql();\r\n \r\n $this->report[] = $this->email;\r\n }",
"function sends_invoice( $invoice_id ) {\n \n // Get codeigniter object instance\n $CI = get_instance();\n \n // Load language\n if ( file_exists( APPPATH . 'language/' . $CI->config->item('language') . '/default_admin_lang.php' ) ) {\n $CI->lang->load( 'default_admin', $CI->config->item('language') );\n }\n if ( file_exists( APPPATH . 'language/' . $CI->config->item('language') . '/default_alerts_lang.php' ) ) {\n $CI->lang->load( 'default_alerts', $CI->config->item('language') );\n }\n \n // Load Invoice Model\n $CI->load->model('invoice');\n \n // Get the invoice's details\n $invoice = $CI->invoice->get_invoice( $invoice_id );\n \n // Verify if invoice exists\n if ( $invoice ) {\n \n // Get the invoice logo\n $invoice_logo = get_option( 'main-logo' );\n\n if ( get_option( 'invoice-logo' ) ) {\n\n $invoice_logo = get_option( 'invoice-logo' );\n\n }\n\n // Get the invoice billing period text\n $billing_period = 'Billing Period';\n\n if ( get_option( 'invoice-billing-period' ) ) {\n\n $billing_period = get_option( 'invoice-billing-period' );\n\n } \n\n // Get the invoice transaction id\n $transaction_id = 'Transaction ID';\n\n if ( get_option( 'invoice-transaction-id' ) ) {\n\n $transaction_id = get_option( 'invoice-transaction-id' );\n\n } \n\n // Get the invoice date format\n $date_format = 'dd-mm-yyyy';\n\n if ( get_option( 'invoice-date-format' ) ) {\n\n $date_format = get_option( 'invoice-date-format' );\n\n }\n \n // Get invoice's from period\n $from_period = str_replace(['dd', 'mm', 'yyyy'], [date('d', strtotime($invoice[0]->from_period)), date('m', strtotime($invoice[0]->from_period)), date('Y', strtotime($invoice[0]->from_period))], $date_format);\n \n // Get invoice's to period\n $to_period = str_replace(['dd', 'mm', 'yyyy'], [date('d', strtotime($invoice[0]->to_period)), date('m', strtotime($invoice[0]->to_period)), date('Y', strtotime($invoice[0]->to_period))], $date_format);\n \n // Get invoice's date\n $invoice_date = str_replace(['dd', 'mm', 'yyyy'], [date('d', strtotime($invoice[0]->invoice_date)), date('m', strtotime($invoice[0]->invoice_date)), date('Y', strtotime($invoice[0]->invoice_date))], $date_format); \n\n // Get the invoice hello text\n $hello_text = str_replace('[username]', $invoice[0]->username, 'Hello [username]');\n\n if ( get_option( 'invoice-hello-text' ) ) {\n\n $hello_text = str_replace('[username]', $invoice[0]->username, get_option( 'invoice-hello-text' ) );\n\n }\n\n // Get the invoice message\n $message = 'Thanks for using using our services.';\n\n if ( get_option( 'invoice-message' ) ) {\n\n $message = get_option( 'invoice-message' );\n\n }\n\n // Get the invoice date word\n $date = 'Date';\n\n if ( get_option( 'invoice-date' ) ) {\n\n $date = get_option( 'invoice-date' );\n\n }\n\n // Get the invoice description word\n $description = 'Description';\n\n if ( get_option( 'invoice-description' ) ) {\n\n $description = get_option( 'invoice-description' );\n\n } \n\n // Get the invoice description text\n $description_text = 'Upgrade Payment';\n\n if ( get_option( 'invoice-description-text' ) ) {\n\n $description_text = get_option( 'invoice-description-text' );\n\n } \n\n // Get the invoice amount word\n $amount = 'Amount';\n\n if ( get_option( 'invoice-amount' ) ) {\n\n $amount = get_option( 'invoice-amount' );\n\n } \n\n // Get the invoice amount word\n $taxes = 'Taxes';\n\n if ( get_option( 'invoice-taxes' ) ) {\n\n $taxes = get_option( 'invoice-taxes' );\n\n } \n\n // Get the invoice total word\n $total = 'Total';\n\n if ( get_option( 'invoice-total' ) ) {\n\n $total = get_option( 'invoice-total' );\n\n }\n\n // Get the no reply message\n $no_reply = 'Please do not reply to this email. This mailbox is not monitored and you will not receive a response. For assistance, please contact us to [email protected].';\n\n if ( get_option( 'invoice-no-reply' ) ) {\n\n $no_reply = get_option( 'invoice-no-reply' );\n\n } \n \n $amount_value = $invoice[0]->amount . ' ' . $invoice[0]->currency;\n \n $invoice_taxes = '';\n \n if ( $invoice[0]->taxes ) {\n \n $invoice_taxes = '<tr class=\"taxes-area\">\n <td style=\"width:80%;text-align:right;padding:0 10px 10px 0;\" class=\"invoice-taxes\">\n ' . $taxes . '</td>\n <td style=\"width:20%;text-align:right;padding:0 10px 10px 0;\">\n <span style=\"display:inline;\" class=\"invoice-taxes-value\">\n ' . $invoice[0]->taxes . ' %\n </span>\n\n </td>\n </tr>';\n\n }\n \n $body = '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n <tbody><tr><td align=\"center\" width=\"600\" valign=\"top\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" bgcolor=\"#ffffff\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-bottom:10px;\" width=\"100%\">\n <tbody><tr valign=\"bottom\"> \n <td width=\"20\" align=\"center\" valign=\"top\"> </td>\n <td align=\"left\" height=\"64\">\n <img alt=\"logo\" class=\"invoice-logo\" src=\"' . $invoice_logo . '\">\n </td> \n <td width=\"40\" align=\"center\" valign=\"top\"> </td>\n <td align=\"right\">\n <span style=\"padding-top:15px;padding-bottom:10px;font:italic 12px;color:#757575;line-height:15px;\">\n <span style=\"display:inline;\">\n <span class=\"invoice-billing-period\">' . $billing_period . '</span> <strong><span class=\"invoice-date-format billing-period-from\">' . $from_period . '</span> ' . $CI->lang->line('ma205') . ' <span class=\"invoice-date-format billing-period-to\">' . $to_period . '</span></strong>\n </span>\n <span style=\"display:inline;\">\n <br>\n <span class=\"invoice-transaction-id\">' . $transaction_id . '</span>: <strong class=\"transaction-id\">' . $invoice[0]->transaction_id . '</strong>\n </span>\n </span>\n </td>\n <td width=\"20\" align=\"center\" valign=\"top\"> </td>\n </tr>\n </tbody>\n </table>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"padding-bottom:10px;padding-top:10px;margin-bottom:20px;\" width=\"100%\">\n <tbody><tr valign=\"bottom\"> \n <td width=\"20\" align=\"center\" valign=\"top\"> </td>\n <td valign=\"top\" style=\"font-family:Calibri, Trebuchet, Arial, sans serif;font-size:15px;line-height:22px;color:#333333;\" class=\"yiv1811948700ppsans\">\n <p>\n </p><div style=\"margin-top:30px;color:#333;font-family:arial, helvetica, sans-serif;font-size:12px;\"><span style=\"color:#333333;font-weight:bold;font-family:arial, helvetica, sans-serif;\" class=\"invoice-hello-text\">' . $hello_text . '</span><p class=\"invoice-message\">' . $message . '</p><br><div style=\"margin-top:5px;\">\n <br><div class=\"yiv1811948700mpi_image\" style=\"margin:auto;clear:both;\">\n </div>\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"clear:both;color:#333;font-family:arial, helvetica, sans-serif;font-size:12px;margin-top:20px;\" width=\"100%\">\n <tbody>\n <tr>\n <td style=\"text-align:left;border:1px solid #ccc;border-right:none;border-left:none;padding:5px 10px 5px 10px !important;color:#333333;\" class=\"invoice-date\" width=\"10%\">\n ' . $date . '</td>\n <td style=\"border:1px solid #ccc;border-right:none;border-left:none;padding:5px 10px 5px 10px !important;color:#333333;\" width=\"80%\" class=\"invoice-description\">\n ' . $description . '</td>\n <td style=\"text-align:right;border:1px solid #ccc;border-right:none;border-left:none;padding:5px 10px 5px 10px !important;color:#333333;\" width=\"10%\" class=\"amount\">\n ' . $amount . '</td>\n </tr>\n <tr>\n <td style=\"text-align:left;padding:10px;\" width=\"10%\" class=\"invoice-date-format invoice-created-date\">\n ' . $invoice_date . '</td> \n <td style=\"padding:10px;\" width=\"80%\">\n <span class=\"invoice-description-text\">' . $description_text . '</span>\n <br>\n\n <span style=\"display:inline;font-style: italic;color: #888888;\" class=\"invoice-plan-name\">\n </span>\n </td>\n <td style=\"text-align:right;padding:10px;\" width=\"10%\" class=\"invoice-amount\">\n ' . $amount_value . '\n </td>\n </tr>\n </tbody>\n </table>\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-top:1px solid #ccc;border-bottom:1px solid #ccc;color:#333;font-family:arial, helvetica, sans-serif;font-size:12px;margin-bottom:10px;\" width=\"100%\">\n <tbody>\n <tr>\n <td>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;color:#333;font-family:arial, helvetica, sans-serif;font-size:12px;margin-top:10px;\">\n <tbody>\n ' . $invoice_taxes . '\n <tr>\n <td style=\"width:80%;text-align:right;padding:0 10px 10px 0;\">\n <span style=\"color:#333333;font-weight:bold;\" class=\"invoice-total\">\n ' . $total . '\n </span>\n </td>\n <td style=\"width:20%;text-align:right;padding:0 10px 10px 0;\" class=\"invoice-total-value\">\n ' . $invoice[0]->total . ' ' . $invoice[0]->currency . '\n </td>\n </tr>\n </tbody></table>\n </td>\n </tr>\n\n </tbody></table>\n <span style=\"font-size:11px;color:#333;\" class=\"invoice-no-reply\">' . $no_reply . '</span></div>\n <span style=\"font-weight:bold;color:#444;\">\n </span>\n <span>\n </span>\n </div></td>\n <td width=\"20\" align=\"center\" valign=\"top\"> </td>\n </tr>\n </tbody>\n </table>\n <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n </td>\n </tr>\n </tbody>\n </table> \n </td>\n </tr>\n </tbody>\n </table>';\n \n if ( get_user_option('invoices_by_email', $invoice[0]->user_id) ) {\n\n // Sends to getted emails\n $CI->email->from($CI->config->item('contact_mail'), $CI->config->item('site_name'));\n $CI->email->to([$invoice[0]->email, $CI->config->item('notification_mail')]);\n $CI->email->subject($CI->lang->line('ma190'));\n $CI->email->message($body);\n\n if ( $CI->email->send() ) {\n\n // Set invoice status\n $CI->invoice->set_status( $invoice_id, 1 );\n\n return true;\n\n } else {\n\n return false;\n\n }\n \n } else {\n \n return false;\n \n }\n \n } else {\n \n return false;\n \n }\n \n }",
"public function InStock_WPNotifier_bulk_mark_status_sent( $post_ids ) {\n\t\t\t$count = count( $post_ids );\n\t\t\t$stock_api = new InStock_WPNotifier_API();\n\t\t\tif ( is_array( $post_ids ) && ! empty( $post_ids ) ) {\n\t\t\t\tforeach ( $post_ids as $each_id ) {\n\t\t\t\t\t$stock_api->InStock_WPNotifier_sms_sent_status( $each_id );\n\t\t\t\t\tdo_action( 'iwg_instock_bulk_status_action', $each_id, 'iwg_smssent' );\n\t\t\t\t\t$logger = new InStock_WPNotifier_Logger( 'success', \"Manual changed status to SMS Sent - $each_id\" );\n\t\t\t\t\t$logger->InStock_WPNotifier_record_log();\n\t\t\t\t}\n\n\t\t\t\tinstock_WPNotfier_add_persistent_notice( array(\n\t\t\t\t\t'type' => 'success',\n\t\t\t\t\t'message' => __( \"$count - Data(s) Manually marked status to SMS Sent\", 'inwpnotifier' ),\n\t\t\t\t) );\n\t\t\t}\n\t\t}",
"public function setReminderSent($orderId);",
"public function sendSalesVerification()\n {\n $subject = \"New Account Created\";\n $message = $this->createSalesMessage();\n\n $this->sendEmail($this->to, $subject, $message, $this->headers);\n }",
"public function send()\n {\n $this->transaction->save();\n }",
"public function markAsPaid(){\n $this->status = \"APPROVED\";\n $this->save();\n }",
"protected function markVoucherAsUsed()\n {\n $this->voucher->method = $this->method;\n $this->voucher->used_on = new Carbon();\n $this->voucher->used_by = $this->subscription->id;\n $this->voucher->saveOrFail();\n }",
"function setSentArray(array $entities) \n {\n foreach ($entities as $entity) {\n $entity->setSent(1);\n }\n $this->manager->flush();\n }",
"public function trigger_email_invoice( $order, $sent_to_admin, $plain_text, $email ) {\n $this->weekdays_condition();\n }",
"function invoice($k)\n\t{\n\t\treturn false;\n\t\tswitch($k)\n\t\t{\n\t\t\tcase 'email': // send invoice by mail\n\t\t\t\treturn true;\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}",
"public function refuseinvoiceAction()\n {\n $invoice_obj = new Ep_Payment_Invoice();\n $invoice_params=$this->_request->getParams();\n if(isset($invoice_params['invoice_id']))\n {\n $updated_at=date(\"Y-m-d %h:%i:%s\");\n $status=$invoice_obj->getInvoiceStatus($invoice_params['invoice_id']);\n if($status=='Not paid')\n {\t\t\t\t\n $refuse_count=\"refuse_count+1\";\n $data = array(\"status\"=>'refuse',\"updated_at\"=>$updated_at,\"refuse_count\"=> new Zend_Db_Expr('refuse_count+1'));////////updating\n $query = \"invoiceId= 'ep_invoice_\".$invoice_params['invoice_id'].\"'\";\n $invoice_obj->updateInvoice($data,$query);\n\n /**sending mail to contributor**/\n $royalty=new Ep_Payment_Royalties();\n $details=$royalty->getInvoiceDetails('ep_invoice_'.$invoice_params['invoice_id']);\n\n $parameters['invoice_id']=$invoice_params['invoice_id'];\n $this->messageToEPMail($details[0]['user_id'],68,$parameters);\n\n $this->_helper->FlashMessenger(utf8_decode(\"Invoice refused.\"));\n }\n\n $this->_redirect(\"/stats/contrib-payments-list?submenuId=ML5-SL1\");\n }\n }"
] | [
"0.6860715",
"0.6686365",
"0.65705425",
"0.6421276",
"0.60621226",
"0.5962654",
"0.5958301",
"0.583079",
"0.58248097",
"0.58143145",
"0.5811432",
"0.580214",
"0.57887125",
"0.57868046",
"0.5772486",
"0.5771584",
"0.5763561",
"0.57397264",
"0.57343763",
"0.5682636",
"0.5669184",
"0.5656476",
"0.56361276",
"0.56329006",
"0.56223875",
"0.5602053",
"0.5586875",
"0.5573915",
"0.5553034",
"0.55525714"
] | 0.6783352 | 1 |
Get specific invoice payments | public function getInvoicePayments($id)
{
return $this->client->get('kb_invoice/'.$id.'/payment', []);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPayments();",
"public function getInvoices();",
"public function getPayments(){\r\n return $this->payments;\r\n }",
"public function getInvoice($invoiceId);",
"public static function paid_invoices($company = null)\n {\n if ($company != null) {\n self::$db->where(array('client' => $company, 'show_client' => 'Yes'));\n }\n\n return self::$db->where(array('status' => 'Paid', 'inv_id >' => 0))->get('invoices')->result();\n }",
"public function getIngenicoPaymentById($payId);",
"public function getPayments()\n {\n return $this->hasMany(Payments::className(), ['customerId' => 'customerId']);\n }",
"public function getInvoicesForReport();",
"public function getInvoicePricing();",
"protected function getInvoice()\n {\n $app = JFactory::getApplication();\n\n $payment_id = $this->getState('id');\n $payment = $this->helper->payment->getItem($payment_id);\n\n $array = array(\n 'order_id' => $payment->order_id,\n 'payment_id' => $payment_id,\n 'currency' => $payment->currency,\n 'amount' => $payment->amount_payable,\n 'description' => $app->get('sitename'),\n );\n\n return $array;\n }",
"public function getInvoices()\n {\n return $this->hasMany(ArInv::className(), ['invoice_id' => 'invoice_id'])->viaTable('billing_pmt_ar_det', ['process_id' => 'process_id']);\n }",
"public function index()\n {\n $project_id = request()->get('project_id');\n\n if (!empty($project_id) && (!request()->user()->can('project.'.$project_id.'.invoice.view'))) {\n abort(403, 'Unauthorized action.');\n }\n\n $rowsPerPage = (request()->get('rowsPerPage') > 0) ? request()->get('rowsPerPage') : 0;\n $sort_by = request()->get('sort_by');\n $descending = request()->get('descending');\n\n if ('false' == $descending) {\n $orderby = 'asc';\n } elseif ('true' == $descending) {\n $orderby = 'desc';\n } elseif ('' == $descending) {\n $orderby = 'desc';\n $sort_by = 'id';\n }\n\n $transactions = Transaction::OfTransaction('invoice')\n ->leftjoin('customers', 'transactions.customer_id', '=', 'customers.id')\n ->leftjoin('projects', 'transactions.project_id', '=', 'projects.id')\n ->select('ref_no as invoice_number', 'title', 'transaction_date as invoice_date', 'due_date', 'customers.company as customer', 'total', 'transactions.id as id', 'payment_status', 'project_id', 'projects.name as project', 'transactions.status as type');\n\n if (!empty($project_id)) {\n $transactions->where('project_id', $project_id);\n }\n\n if (!empty(request()->get('customer_id'))) {\n $transactions->where('transactions.customer_id', request()->get('customer_id'));\n }\n\n if (!empty(request()->get('payment_status'))) {\n $transactions->where('payment_status', request()->get('payment_status'));\n }\n\n if (!empty(request()->get('status'))) {\n $transactions->where('transactions.status', request()->get('status'));\n } else {\n $transactions->where('transactions.status', '!=', 'estimate');\n }\n\n $transactions = $transactions->orderBy($sort_by, $orderby)\n ->paginate($rowsPerPage);\n\n foreach ($transactions as $transaction) {\n $transaction->append('download_url');\n }\n\n $data = ['transactions' => $transactions];\n\n if (!empty($project_id)) {\n $project = Project::with('customer.currency')->find($project_id);\n $currency = !empty($project->customer) ? $project->customer->currency : System::getBusinessCurrency('currency_id');\n $data['currency'] = $currency;\n }\n\n return $this->respond($data);\n }",
"public function getPayments()\n {\n return $this->payments;\n }",
"public function getPayments()\n {\n return $this->payments;\n }",
"public function allPayed()\n {\n return Collection::make($this->_get(Routes::INVOICE, ['status' => self::PAYED]));\n }",
"protected function paymentList()\n\t{\n\t\treturn [\n\t\t\t'invoice' => $this->getInvoice(),\n\t\t\t'payments' => $this->makePayments(),\n\t\t];\n\t}",
"public function paidInvoicesAction()\n {\n $invoice_obj = new Ep_Payment_Invoice();\n $this->_view->currentdate = date(\"d-m-Y\");\n $paid_params=$this->_request->getParams();\n\n if(isset($paid_params['start_date']) || isset($paid_params['end_date']) || isset($paid_params['sel_type']) || isset($paid_params['invoicename']) || isset($paid_params['contribname']))\n {\n $start_date = $this->_request->getParam('start_date');\n $end_date = $this->_request->getParam('end_date');\n $sel_type = $this->_request->getParam('sel_type');\n $invoicename = $this->_request->getParam('invoicename');\n $contribname = $this->_request->getParam('contribname');\n\n $this->_view->sel_type=$sel_type;\n $this->_view->start_date=$start_date;\n $this->_view->end_date=$end_date;\n $this->_view->contribname=$contribname;\n $this->_view->invoicename=$invoicename;\n $where = '';\n if($invoicename!='')\n {\n $where.= \" AND i.invoiceId='ep_invoice_\".$invoicename.\"'\";\n }\n\n if(!is_null($contribname) && $contribname!=0)\n {\n //$where = \" up.first_name LIKE '%\".$contribname.\"%'\";\n $where.= \" AND up.user_id ='\".$contribname.\"'\";\n }\n else if($start_date!='' && $end_date!='')\n {\n $start_date = str_replace('/','-',$start_date);\n $end_date = str_replace('/','-',$end_date);\n $start_date = date('Y-m-d', strtotime($start_date));\n $end_date = date('Y-m-d', strtotime($end_date));\n $where.= \" AND DATE_FORMAT(i.created_at, '%Y-%m-%d') BETWEEN '\".$start_date.\"' AND '\".$end_date.\"'\";\n }\n $res= $invoice_obj->paidInvoices($where);\n }\n else{\n //$where = \" 1=1\";\n $res= $invoice_obj->paidInvoices($where);\n }\n if($res!=\"NO\")\n {\n $this->_view->paginator = $res;\n }\n else\n {\n $this->_view->nores = \"true\";\n }\n $this->_view->render(\"stats_paidinvoices\");\n }",
"public function payments($id){\n $payments = DB::table('payments')\n ->select('payments.description as description',\n 'payments.id as id',\n 'payments.type as type',\n 'payments.total as total',\n 'payments.created_at as created_at',\n 'payments.updated_at as updated_at')\n ->where('payments.rent_id','=',$id)\n ->get();\n return $payments;\n }",
"public function getPayments()\n {\n return $this->hasMany(Payment::className(), ['ext_id' => 'ext_id']);\n }",
"public function payments() {\n return $this->hasMany(\n lydia()->config('models.payment'), 'transaction_id'\n ) ;\n }",
"public function invoice($id) {\n\t\t$params = array('id' => $id);\n\t\treturn $this->master->call('payments/invoice', $params);\n\t}",
"public function get_invoice($client_id){\n\t $sql = \"SELECT\n `orders`.*,\n\t\t\t\t\t`clients`.`client_name`,\n\t\t\t\t\t`clients`.`contact_person_name_1`,\n\t\t\t\t\t`clients`.`contact_person_1_phone_1`,\n `clients`.`credit_balance`,\n SUM(`payment_details`.`total_payment`) AS `paid_amount`\n FROM `orders`\n LEFT JOIN `clients` ON `clients`.`id` = `orders`.`client_id`\n LEFT JOIN `payment_details` ON `payment_details`.`order_id` = `orders`.`id`\n WHERE `orders`.`client_id` = {$client_id}\n GROUP BY `orders`.`id`\n HAVING (SUM(`payment_details`.`total_payment`) IS NULL OR SUM(`payment_details`.`total_payment`) < `orders`.`payable_amount`)\n ORDER BY `orders`.`created_at` ASC\";\n\n\t return $this->db->query($sql)->result_array();\n\t}",
"public function getPayments()\n {\n return $this->Payments;\n }",
"public function getPayments($payment_id)\n {\n $params = ['payment_id' => $payment_id];\n $body = [\n 'method' => 'get_payments',\n 'params'=> $params\n ];\n return $this->_request($body);\n }",
"public function getInvoiceById($invoice_id)\n {\n $q = \\DB::select(\"SELECT A.*, IFNULL(B.paid,0) as paid, (A.amount - IFNULL(B.paid,0)) as remaining\n FROM\n (SELECT A.invoice_id, A.invoice_nb, A.due_date, A.client_id, A.amount, DATE(A.created_at) as created_at, A.status_id, \n B.accounting_id, B.name as client_name, B.email, B.address, \n B.contact_name, B.phone, C.name as status_name, C.color_code, A.hidden\n FROM ta_invoices as A \n JOIN ta_sources as B ON A.client_id = B.source_id AND B.hidden = 0\n JOIN ta_status as C ON A.status_id = C.status_id\n WHERE A.hidden = '0') as A\n\n LEFT JOIN\n\n (SELECT A.invoice_id, SUM(A.amount) as paid\n FROM ta_transactions as A\n WHERE A.type = 1\n AND A.hidden = 0\n GROUP BY A.invoice_id) as B\n\n ON A.invoice_id = B.invoice_id\n WHERE A.hidden = '0' AND A.invoice_id = :invoice_id\",\n array(':invoice_id' => $invoice_id));\n return $q;\n }",
"public function getInvoicePayment($id, $paymentId)\n {\n return $this->client->get('kb_invoice/'.$id.'/payment/'.$paymentId, []);\n }",
"private function parsePayments($data, $invoice) {\n if ($data) {\n if ($data instanceof IPPLinkedTxn) {\n if ($data->TxnType === 'Payment') {\n $newPayment = [];\n $newPayment['accounting_id'] = $data->TxnId;\n array_push($invoice['payments'], $newPayment);\n }\n } else {\n foreach($data as $transaction) {\n if ($transaction) {\n if ($transaction->TxnType === 'Payment') {\n $newPayment = [];\n $newPayment['accounting_id'] = $transaction->TxnId;\n array_push($invoice['payments'], $newPayment);\n }\n }\n }\n }\n }\n return $invoice;\n }",
"public function invoice()\n {\n return $this->hasOne(config('core.acl.invoice_model'), 'id', 'invoice_id')\n ->select(['id', 'user_id', 'invoice_number', 'invoice_date', 'total_amount', 'total_due_amount']);\n }",
"public function getPayments(array $parameters = []): PaymentResponseModelCollection;",
"public function getInvoices($orderNumber);"
] | [
"0.7636453",
"0.71626073",
"0.66936237",
"0.66907346",
"0.66152096",
"0.66011196",
"0.6543641",
"0.6524916",
"0.6522916",
"0.6470288",
"0.6453514",
"0.642492",
"0.6424591",
"0.6424591",
"0.63813007",
"0.63526636",
"0.633846",
"0.63298476",
"0.63251585",
"0.6322558",
"0.6314406",
"0.62845033",
"0.62817866",
"0.6276738",
"0.62280303",
"0.6225155",
"0.62236124",
"0.6221118",
"0.6188245",
"0.61724466"
] | 0.72146857 | 1 |
Are additional fields are supported? | public function areAdditionalFieldsSupported(){
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function areAdditionalFieldsSupported(){\n\t\treturn false;\n\t}",
"abstract public function available_fields();",
"protected function addAdditionalFields() {\n\n\t}",
"public function validate_fields(){\n\t \n\t\t\treturn true;\n\t\t \n\t\t}",
"public function addFields() {}",
"function __hasRequiredFields(){\n\t $fields = array(\n\t 'first_name',\n\t 'last_name',\n\t 'email',\n\t 'zip',\n\t 'created',\n\t );\n\t \n\t foreach($fields as $field){\n\t if(!$this->hasField($field)){\n\t return false;\n\t }\n\t }\n\t \n\t return true;\n\t}",
"public function hasFieldInfo($field_name);",
"public function has_fields() {\n\t\treturn count( $this->fields ) > 0;\n\t}",
"abstract public function add_fields(): void;",
"protected function checkAdditionalFields(array $submittedData) {\n\t\treturn TRUE;\n\t}",
"public function getAllowedFields();",
"public function getAllowedFields();",
"protected final static function valid_fields() {\n return array(\"id\", \"mid\", \"name\");\n }",
"public function hasFieldData()\n {\n return true;\n }",
"public function hasFields()\n {\n return count($this->fields) > 0;\n }",
"public function extraFields()\n {\n return $this->extraFields;\n }",
"public function hasFields(){ return !empty($this->field_map); }",
"public function hasFields(){ return !empty($this->field_map); }",
"public function hasField($name);",
"public static function supportsRequired(): bool;",
"public function hasFields()\n {\n return null !== @$this->fields;\n }",
"public function hasFields()\n {\n return isset($this->fields);\n }",
"public function add_extended_data_fields() {\n if ( version_compare( $this->addon->options[ 'woo_data_version' ] , '4.4.01' , '<=' ) ) {\n $this->add_woo_version_4_4_01_fields();\n $this->addon->options[ 'woo_data_version' ] = $this->addon->version;\n update_option( $this->addon->option_name , $this->addon->options );\n }\n\t}",
"public function AdditionalInfo(){\n\t\tif($this->ScheduleOfPricesV2()->count() > 0)\n\t\t\treturn true;\n\t\tif($this->SpecificationsV2()->count() > 0)\n\t\t\treturn true;\n\t\tif($this->DrawingsV2()->count() > 0)\n\t\t\treturn true;\n\t\tif($this->TermsOfPaymentV2()->count() > 0)\n\t\t\treturn true;\n\t\tif($this->StandardConditionsV2()->count() > 0)\n\t\t\treturn true;\n\t\tif($this->SpecialConditionsV2()->count() > 0)\n\t\t\treturn true;\n\t\tif($this->ConditionsOfTenderingV2()->count() > 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public function check_field() {\n\t\t\t\n\t\t\tif ( isset( $this->field->name ) && isset( $this->field->type ) && isset( $this->field->title ) ) return true;\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t}",
"function checkFields( $args )\n {\n\t\treturn true;\n }",
"public function ValidateFields() {\n }",
"abstract protected function get_custom_fields();",
"public function getAvailableFields(): array\n {\n return [\n 'order_id' => 'Order ID',\n ];\n }",
"protected function fields($fields = array(), bool $primary = true) {}"
] | [
"0.82977235",
"0.72933054",
"0.71753144",
"0.6609146",
"0.658479",
"0.65257955",
"0.651571",
"0.62905496",
"0.62863505",
"0.6258969",
"0.62529856",
"0.62529856",
"0.6251526",
"0.62474525",
"0.6210139",
"0.6183372",
"0.61821127",
"0.61821127",
"0.6123579",
"0.6086141",
"0.6066975",
"0.60631466",
"0.6025991",
"0.6007787",
"0.60076886",
"0.600511",
"0.6005064",
"0.598051",
"0.59739757",
"0.5969857"
] | 0.87734294 | 0 |
Get reserved tag names | public function getReservedTags(){
return array(
'SITE_URL',
'ENCODING',
#
'ITEMS',
'CATEGORIES',
'CURRENCIES',
'PARAMS',
#
'OFFERS',
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function get_used_tag_names()\n {\n if (!isset($this->used_tag_names)) {\n $this->used_tag_names = [];\n foreach ($this->dom->getElementsByTagName('*') as $el) {\n $this->used_tag_names[$el->tagName] = \\true;\n }\n }\n return $this->used_tag_names;\n }",
"public function getReservedName() {}",
"public function getReservedName() {}",
"public function getTagNames()\n {\n $tags = $this->getTags();\n $returnTags = [];\n foreach ($tags as $tag) {\n array_push($returnTags, $tag->tag);\n }\n return $returnTags;\n }",
"public static function getTags()\n {\n return array (\n // HTML\n 'a',\n 'font',\n 'image',\n 'style',\n\n // SVG\n 'svg',\n 'altglyph',\n 'altglyphdef',\n 'altglyphitem',\n 'animatecolor',\n 'animatemotion',\n 'animatetransform',\n 'circle',\n 'clippath',\n 'defs',\n 'desc',\n 'ellipse',\n 'filter',\n 'font',\n 'g',\n 'glyph',\n 'glyphref',\n 'hkern',\n 'image',\n 'line',\n 'lineargradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialgradient',\n 'rect',\n 'stop',\n 'switch',\n 'symbol',\n 'text',\n 'textpath',\n 'title',\n 'tref',\n 'tspan',\n 'use',\n 'view',\n 'vkern',\n\n // SVG Filters\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n\n //text\n '#text'\n );\n }",
"function bbp_get_allowed_tags()\n{\n}",
"public function tagNames(): array\n {\n return $this->tagged->map(function($item){\n return $item->tag_name;\n })->toArray();\n }",
"public function getTagNamesAttribute(): array\n {\n return $this->tagNames();\n }",
"public function getTagName();",
"public function badNames()\n {\n return array\n (\n array(null),\n array(''),\n array('foo'),\n array('.'),\n array('..'),\n );\n }",
"public function getDisallowedTags(): array\n {\n return [\n '@api',\n '@author',\n '@category',\n '@copyright',\n '@filesource',\n '@global',\n '@ignore',\n '@internal',\n '@license',\n '@link',\n '@method',\n '@package',\n '@property',\n '@property-read',\n '@property-write',\n '@see',\n '@since',\n '@source',\n '@subpackage',\n '@todo',\n '@uses',\n '@var',\n '@version',\n '@inheritdoc'\n ];\n }",
"protected function getAllowedTags()\n {\n return null;\n }",
"public function listTags() {\n\t\treturn array_keys($this->tags);\n\t}",
"public function getTagNames()\r\n {\r\n return $this->dao->select('id,tag')->from('blog_tag')->orderBy('id')->fetchAll();\r\n }",
"function _get_attr_names() \r\n {\r\n return array('version', 'n', 'e', 'd', 'p', 'q', 'dmp1', 'dmq1', 'iqmp');\r\n }",
"abstract protected function getTagNameMap();",
"private function __getTags() {\n $sql = 'SELECT \"tag\" FROM \"tag\"';\n $res = $this->__execSql($sql);\n return array_map(function($v) { return $v['tag']; }, $res);\n }",
"public static function allTagNamed()\n {\n $tags = Tags::getAlltags();\n $tagsArray = [];\n $tagCombine = self::find('all');\n foreach ($tagCombine as $tag) {\n $tagsArray[$tag->article_id][$tag->tag_id] = $tags[$tag->tag_id][0];\n }\n\n return $tagsArray;\n }",
"public function _vc_font_container_get_allowed_tags() {\r\n\t\t$allowed_tags = array(\r\n __('Heading 1', 'appset') => 'h1',\r\n __('Heading 2', 'appset') => 'h2',\r\n __('Heading 3', 'appset') => 'h3',\r\n __('Heading 4', 'appset') => 'h4',\r\n __('Heading 5', 'appset') => 'h5',\r\n __('Heading 6', 'appset') => 'h6',\r\n __('Paragraph', 'appset') => 'p',\r\n __('Div', 'appset') => 'div',\r\n );\r\n\r\n\t\treturn apply_filters( 'vc_font_container_get_allowed_tags', $allowed_tags );\r\n\r\n\t}",
"private function get_allowed_nav_container_tags() {\n\t\t$tags = apply_filters( 'wp_nav_menu_container_allowedtags', array( 'div', 'nav' ) );\n\t\t$formatted_tags = array(\n\t\t\t'0' => 'None',\n\t\t);\n\t\tforeach ( $tags as $tag ) {\n\t\t\t$formatted_tags[$tag] = ucfirst( $tag );\n\t\t}\n\t\treturn $formatted_tags;\n\t}",
"function bbp_kses_allowed_tags()\n{\n}",
"public function getTags()\n {\n return $this->definedTagList;\n }",
"public function getTag(string $name): array;",
"public function tagNames() {\n\t\t$tagNames = array();\n\t\t$tagged = $this->CI->db->where([$this->tagging_tagged.'.taggable_type' => $this->taggable_type,$this->tagging_tagged.'.taggable_id' => $this->taggable_id])\n\t\t\t\t\t\t\t ->get($this->tagging_tagged)\n\t\t\t\t\t\t\t ->result();\n\t\tforeach($tagged as $tagged) {\n\t\t\t$tagNames[] = $tagged->tag_name;\n\t\t}\n\t\treturn $tagNames;\n\t}",
"public function getTag($name);",
"protected function getAllowedTags()\n {\n return array('var' => true);\n\n }",
"public function getNameTagName()\n {\n return $this->nameTagName;\n }",
"protected function scanTag()\n {\n return $this->scanInput('/^(\\w[:\\-\\w]*)/', 'tag');\n }",
"public function getTags()\n\t{\n\t\tif (is_null($this->tags)) {\n\t\t\t// Collect all tags\n\t\t\t$this->tags = array();\n\t\t\tforeach ($this->blocks as $block) {\n\t\t\t\t$this->tags = array_merge($this->tags, $block->getTags());\n\t\t\t}\n\t\t}\n\t\treturn array_keys($this->tags);\n\t}",
"public function getTagName()\n {\n return $this->tag_name;\n }"
] | [
"0.7134154",
"0.6776598",
"0.6776598",
"0.6690124",
"0.6547481",
"0.65322345",
"0.6503982",
"0.6442622",
"0.63884497",
"0.63762844",
"0.63629264",
"0.63326865",
"0.62126356",
"0.62114555",
"0.61119133",
"0.6103765",
"0.6077838",
"0.60763264",
"0.6011273",
"0.5999438",
"0.59904003",
"0.5974033",
"0.59736484",
"0.5969958",
"0.59617144",
"0.5941854",
"0.59335226",
"0.5915169",
"0.58867854",
"0.5882858"
] | 0.7749395 | 0 |
Step: XML to ZIP | public function stepZip($intProfileID, $arData){
$arSession = &$arData['SESSION']['EXPORT'];
#
if($arData['PROFILE']['PARAMS']['COMPRESS_TO_ZIP']=='Y') {
$arSession['COMPRESS_TO_ZIP'] = true;
$arZipFiles = array(
$arSession['XML_FILE'],
);
$obAchiver = \CBXArchive::GetArchive($arSession['XML_FILE_ZIP']);
$obAchiver->SetOptions(array(
'REMOVE_PATH' => pathinfo($arSession['XML_FILE'], PATHINFO_DIRNAME),
));
$strStartFile = '';
if($arSession['ZIP_NEXT_STEP']){
$strStartFile = $obAchiver->GetStartFile();
}
$intResult = $obAchiver->Pack($arZipFiles, $strStartFile);
unset($obAchiver);
if($arData['PROFILE']['PARAMS']['DELETE_XML_IF_ZIP']=='Y' && is_file($arSession['XML_FILE'])) {
@unlink($arSession['XML_FILE']);
}
if($intResult === \IBXArchive::StatusSuccess){
$arSession['EXPORT_FILE_SIZE_ZIP'] = filesize($arSession['XML_FILE_ZIP']);
return Exporter::RESULT_SUCCESS;
}
elseif ($intResult === \IBXArchive::StatusError){
return Exporter::RESULT_ERROR;
}
elseif($intResult === \IBXArchive::StatusContinue){
$arSession['ZIP_NEXT_STEP'] = true;
return Exporter::RESULT_CONTINUE;
}
}
return Exporter::RESULT_SUCCESS;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract function buildArchive();",
"protected function package()\n {\n $this->newline('Creating archive file...');\n $rootPath = str_replace('\\\\', '/', base_path());\n $archiveFile = dirname($rootPath) . '/laravel.zip';\n $archive = new ZipArchive();\n\n if ($archive->open($archiveFile, ZipArchive::CREATE | ZipArchive::OVERWRITE)) {\n $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($rootPath, RecursiveIteratorIterator::LEAVES_ONLY));\n foreach ($files as $name => $file) {\n $filePath = $file->getRealPath();\n // Format file name by removing root path\n // and replacing backslash with frontslash for Linux compatibility.\n $baseFilePath = str_replace('\\\\', '/', $filePath);\n $baseFilePath = str_replace(\"$rootPath/\", '', $baseFilePath);\n\n // Validate if file should be added to the package.\n if (! is_dir($filePath) && $this->validateFile($baseFilePath)) {\n $archive->addFile($filePath, $baseFilePath);\n }\n }\n }\n\n if ($archive->close()) {\n $this->info(\"Archive file created: $archiveFile\");\n }\n }",
"public function downloadxml(){\n\t\n\tif(isset($_SESSION['username'])&&$_SESSION['rol']<=1){\n\t\t$test['user']=$this->User_model->data($_SESSION['username']);\n\t\n\t\t$this->load->library('zip');\n\n\t\t$path = './uploads/'.$_GET['id'].'/';\n\t\t$this->zip->read_dir($path,FALSE);\n\t\t//$this->zip->download('my_backup.zip');\n\n\t\t/*\n\t\t$files = glob('./uploads/'.$_GET['id'].'/*'); // get all file names\n\t\n\t\t\tforeach($files as $file)\n\t\t\t{ \n\t\t\t\tif(is_file($file))\n\t\t\t\t$this->zip->read_file($file);\n\t\t\t}\n\n\t\t$filename = $this->zip->archive(FCPATH.'/uploads/'.$_GET['id'].'.zip');\n\t\t*/\n\t\t$this->zip->download('Solicitud-0'.$_GET['id'].'.zip');\n\n\t\t}else{\n\t\tredirect('welcome/');\n\t\t}\n}",
"public function save()\n {\n $this->zip->addFromString($this->packageDir.$this->packageFile, $this->packageXPath->document->saveXML());\n // close and reopen zip archive\n $this->zip->close();\n $this->zip->open($this->filename);\n\n $this->sync();\n }",
"#[@test]\n public function helloZip() {\n $entries= $this->entriesIn($this->archiveReaderFor($this->vendor, 'hello'));\n $this->assertEquals(1, sizeof($entries));\n $this->assertEquals('hello.txt', $entries[0]->getName());\n $this->assertEquals(5, $entries[0]->getSize());\n $this->assertFalse($entries[0]->isDirectory());\n }",
"private function _create()\n\t{\n\t\t$this->_xml->newXMLDocument();\n\t\t$this->_xml->addElement( 'xmlarchive', '', array( 'generator' => 'IPS_KERNEL', 'created' => time() ) );\n\t\t$this->_xml->addElement( 'fileset', 'xmlarchive' );\n\t\t\n\t\tforeach( $this->_fileArray as $f )\n\t\t{\n\t\t\t$f['content'] = chunk_split(base64_encode($f['content']));\n\t\t\t\n\t\t\t$this->_xml->addElementAsRecord( 'fileset', 'file', $f );\n\t\t}\n\t}",
"protected function exportToZip($zip)\r\n {\r\n $menuFileName = 'exp_dbmenus';\r\n $menuItemFileName = 'exp_dbmenuitems';\r\n\r\n if ($this->saveToFile($menuFileName, $menuItemFileName))\r\n {\r\n $menuBuilder = MenubuilderModule::getInstance();\r\n $menuFile = $menuBuilder->getDataPath() . DIRECTORY_SEPARATOR . $menuFileName . '.php';\r\n $menuItemFile = $menuBuilder->getDataPath() . DIRECTORY_SEPARATOR . $menuItemFileName . '.php';\r\n $zip->addFile($menuFile, basename($menuFile));\r\n $zip->addFile($menuItemFile, basename($menuItemFile));\r\n $ok = $zip->close();\r\n if ($ok)\r\n {\r\n // unlink($menuFile);\r\n // unlink($menuItemFile);\r\n }\r\n }\r\n }",
"public function getArchiveContents()\n\t{\n\t\t$this->_create();\n\t\treturn $this->_xml->fetchDocument();\n\t}",
"public function zipBuilder(Request $request)\n { \n $tsampDir = $request->packName;\n $zip = new ZipArchive;\n $fileName = \"myzip.zip\";\n $filePath = $request->packName;\n\n if ($zip->open(public_path($fileName), ZipArchive::CREATE) === TRUE) {\n $this->addContent($zip, public_path($filePath));\n $zip->close();\n }\n\n \n \n\n\n \n\n\n /* if ($zip->open(public_path($fileName), ZipArchive::CREATE) === TRUE) {\n $files = File::files(public_path(\"/\".$tsampDir));\n foreach ($files as $name => $file)\n {\n // Skip directories (they would be added automatically)\n if (!$file->isDir())\n {\n $relativeNameInZipFile = basename($file);\n $zip->addFile($file, $relativeNameInZipFile);\n }\n } \n $zip->close(); \n } */\n\n }",
"protected function zip(): Zip\n {\n return tap(new Zip(static::tempDirectory('archive.zip')), function (Zip $zip): void {\n $this->app->call(EncryptBackupArchive::class.'@handle', [\n 'event' => new BackupZipWasCreated($zip)\n ]);\n });\n }",
"function export()\n\t{\n\t\t$zip = $this->buildExportFile();\n\t\t\n\t ilUtil::deliverFile($zip, $this->object->getTitle().\".zip\", '', false, true);\n\t}",
"public function execute()\n {\n \n return $this->fileFactory->create('export.xml', $this->getXmlFile(), 'var');\n }",
"function run_update_package_xml( $task=null, $args=array(), $cliopts=array() )\n{\n /// @todo replace hostname, build time\n\n $opts = eZExtBuilder::getOpts( @$args[0] );\n $destdir = $opts['build']['dir'];\n $files = pakeFinder::type( 'file' )->name( 'package.xml' )->maxdepth( 0 )->in( $destdir );\n if ( count( $files ) == 1 )\n {\n // original format\n pake_replace_regexp( $files, $destdir, array(\n // <name>xxx</name>\n '#^( *\\074name\\076)(.*)(\\074/name\\076\\r?\\n?)$#m' => '${1}' . $opts['extension']['name'] . '_extension' . '$3',\n // <version>xxx</version>\n '#^( *\\074version\\076)(.*)(\\074/version\\076\\r?\\n?)$#m' => '${1}' . $opts['ezp']['version']['major'] . '.' . $opts['ezp']['version']['minor'] . '.' . $opts['ezp']['version']['release'] . '$3',\n // <named-version>xxx</named-version>\n '#^( *\\074named-version\\076)(.*)(\\074/named-version\\076\\r?\\n?)$#m' => '${1}' . $opts['ezp']['version']['major'] . '.' . $opts['ezp']['version']['minor'] . '$3',\n // <package version=\"zzzz\"\n //'#^( *\\074package +version=\")(.*)(\"\\r?\\n?)$#m' => '${1}' . $opts['version']['major'] . '.' . $opts['version']['minor'] . $opts['releasenr']['separator'] . $opts['version']['release'] . '$3',\n // <number>xxxx</number>\n '#^( *\\074number\\076)(.*)(\\074/number\\076\\r?\\n?)$#m' => '${1}' . $opts['version']['alias'] . '$3',\n // <release>yyy</release>\n '#^( *\\074release\\076)(.*)(\\074/release\\076\\r?\\n?)$#m' => '${1}' . $opts['version']['release'] . '$3',\n\n '#^( *\\074timestamp\\076)(.*)(\\074/timestamp\\076\\r?\\n?)$#m' => '${1}' . time() . '$3',\n '#^( *\\074host\\076)(.*)(\\074/host\\076\\r?\\n?)$#m' => '${1}' . gethostname() . '$3',\n '#^( *\\074licence\\076)(.*)(\\074/licence\\076\\r?\\n?)$#m' => '${1}' . $opts['version']['license'] . '$3',\n ) );\n // replacing a token based on its value instead of its location (text immediately before and after,\n // as done above) has a disadvantage: we cannot execute the substitution many\n // times on the same text, as the 1st substitution will remove the token's\n // value. This means we have to reinit the build to get a 100% updated\n // package file. Unfortunately hunting for xml attributes not based on\n // token values needs a real xml parser, simplistic regexps are not enough...\n pake_replace_tokens( $files, $destdir, '{', '}', array(\n '$name' => $opts['extension']['name'],\n '$version' => $opts['version']['alias'],\n '$ezp_version' => $opts['ezp']['version']['major'] . '.' . $opts['ezp']['version']['minor'] . '.' . $opts['ezp']['version']['release']\n ) );\n }\n}",
"public function getZip(Box_View_Document &$doc) {\n return $this->getContent($doc, 'zip')->response;\n }",
"protected function tofile():string { return $this->root->save(FOLDER.$this->nameOfFile.\".xml\"); }",
"function installItemFromZip($filename,$fileinfo=array(),$destination=''){\r\n\t\trequire_once('wp-update-filesystem.php');\r\n\t\tglobal $wp_filesystem;\r\n\t\tif( ! $wp_filesystem || ! is_object($wp_filesystem) )\r\n\t\t\tWP_Filesystem();\r\n\t\tif( ! is_object($wp_filesystem) )\r\n\t\t\treturn array('Errors'=>array(__('Filesystem options not set correctly')));\r\n\t\t$fs =& $wp_filesystem; //Just for simplicity\r\n\r\n\t\trequire_once('pclzip.lib.php');\t\r\n\t\t$messages = array();\r\n\t\t\r\n\t\tif( ! $filename )\r\n\t\t\treturn false;\r\n\t\t/* NOTE: If this uses too much memory, it might be possible to just extract each file as needed rather than extracting entire archive into memory */\r\n\t\t$archive = new PclZip($filename);\r\n\r\n\t\t//Check to see if its a Valid archive\r\n\t\tif( false == ($archiveFiles = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING)) ){\r\n\t\t\treturn array('Errors'=>array(__('Incompatible Archive')));\r\n\t\t} else {\r\n\t\t\t$messages[] = __('Valid Archive Selected');\r\n\t\t}\r\n\t\tif ( 0 == count($archiveFiles) )\r\n\t\t\treturn array('Errors'=>array(__('Empty Archive')));\r\n\t\t\r\n\t\t//First of all, Does the zip file contain a base folder?\r\n\t\t$base = $fs->get_base_dir() . $destination;\r\n\t\t$messages[] = sprintf(__(\"Base Directory: <strong>%s</strong>\"),$base);\r\n\t\t\r\n\t\t$fs->setDefaultPermissions( $fs->getchmod($base) );\r\n\t\t\r\n\t\t//Check if the destination directory exists, If not, create it.\r\n\t\t$path = explode('/',$base);\r\n\t\t$tmppath = '';\r\n\t\tfor( $j = 0; $j < count($path) - 1; $j++ ){\r\n\t\t\t$tmppath .= $path[$j] . '/';\r\n\t\t\tif( ! $fs->is_dir($tmppath) )\r\n\t\t\t\t$messages[] = __('<strong>Creating folder</strong>: ') . $tmppath . succeeded( $fs->mkdir($tmppath) );\r\n\t\t}\r\n\t\t\r\n\t\tif( count($archiveFiles) > 1){\r\n\t\t\t//Multiple files, they'll need to be in a folder\r\n\t\t\t$baseFolderName = false;\r\n\r\n\t\t\tforeach((array)$archiveFiles as $thisFileInfo){\r\n\t\t\t\t//If no Slash then it needs to be put in a folder\r\n\t\t\t\t\r\n\t\t\t\tif( false === strpos($thisFileInfo['filename'],'/') ){\r\n\t\t\t\t\t$messages[] = sprintf(__('Installing to Subdirectory: <strong>%s</strong>'),basename($fileinfo['name'],'.zip'));\r\n\r\n\t\t\t\t\t$base .= basename($fileinfo['name'],'.zip');\r\n\t\t\t\t\tif( $fs->is_dir($base) )\r\n\t\t\t\t\t\treturn array('Errors'=>array(sprintf(__('Folder Exists! Install cannot continue to installing to %s'),$base)));\r\n\t\t\t\t\t\r\n\t\t\t\t\t$messages[] = __('<strong>Creating folder</strong>: ') . basename($fileinfo['name'],'.zip') . succeeded( $fs->mkdir( $base ) );\r\n\t\t\t\t\tbreak; //We've created any folders we need, we can now break out of this loop.\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Inflate the files and Create Directory Structure\r\n\t\tforeach($archiveFiles as $archiveFile){\r\n\t\t\t$path = explode('/',$archiveFile['filename']);\r\n\t\t\t$tmppath = '';\r\n\t\t\t//Loop through each of the items and check the folder exists.\r\n\t\t\tfor( $j = 0; $j < count($path) - 1; $j++ ){\r\n\t\t\t\t$tmppath .= $path[$j] . '/';\r\n\t\t\t\tif( ! $fs->is_dir($base . $tmppath) )\r\n\t\t\t\t\t$messages[] = __('<strong>Creating folder</strong>: ') . $tmppath . succeeded( $fs->mkdir($base . $tmppath) );\r\n\t\t\t}//end for\r\n\t\t\t//We've made sure the folders are there, So lets extract the file now:\r\n\t\t\tif( ! $archiveFile['folder'] )\r\n\t\t\t\t$messages[] = __('<strong>Inflating File</strong>: ') . $archiveFile['filename'] . \r\n\t\t\t\t\t\t\tsucceeded( $fs->put_contents($base.$archiveFile['filename'], $archiveFile['content']) );\r\n\t\t}\r\n\t\treturn $messages;\r\n\t}",
"function comprime_varios_zip($directorio){\n\t\t\n\t}",
"public function stepZip($intProfileID, $arData){\n\t\t$arSession = &$arData['SESSION']['EXPORT'];\n\t\t#\n\t\tif($this->arProfile['PARAMS']['COMPRESS_TO_ZIP']=='Y') {\n\t\t\t$arSession['COMPRESS_TO_ZIP'] = true;\n\t\t\t$arZipFiles = array(\n\t\t\t\t$arSession['EXCEL_FILE'],\n\t\t\t);\n\t\t\t$obAchiver = \\CBXArchive::GetArchive($arSession['EXCEL_FILE_ZIP']);\n\t\t\t$obAchiver->SetOptions(array(\n\t\t\t\t'REMOVE_PATH' => pathinfo($arSession['EXCEL_FILE'], PATHINFO_DIRNAME),\n\t\t\t));\n\t\t\t$strStartFile = '';\n\t\t\tif($arSession['ZIP_NEXT_STEP']){\n\t\t\t\t$strStartFile = $obAchiver->GetStartFile();\n\t\t\t}\n\t\t\t$intResult = $obAchiver->Pack($arZipFiles, $strStartFile);\n\t\t\tunset($obAchiver);\n\t\t\tif($this->arProfile['PARAMS']['DELETE_EXCEL_IF_ZIP']=='Y' && is_file($arSession['EXCEL_FILE'])) {\n\t\t\t\t@unlink($arSession['EXCEL_FILE']);\n\t\t\t}\n\t\t\tif($intResult === \\IBXArchive::StatusSuccess){\n\t\t\t\t$arSession['EXPORT_FILE_SIZE_ZIP'] = filesize($arSession['EXCEL_FILE_ZIP']);\n\t\t\t\treturn Exporter::RESULT_SUCCESS;\n\t\t\t}\n\t\t\telseif ($intResult === \\IBXArchive::StatusError){\n\t\t\t\treturn Exporter::RESULT_ERROR;\n\t\t\t}\n\t\t\telseif($intResult === \\IBXArchive::StatusContinue){\n\t\t\t\t$arSession['ZIP_NEXT_STEP'] = true;\n\t\t\t\treturn Exporter::RESULT_CONTINUE;\n\t\t\t}\n\t\t}\n\t\treturn Exporter::RESULT_SUCCESS;\n\t}",
"protected function pushZip($id) {\n $dev = $this->getConfigurationByShopId($id, 'dev');\n $fields = array(\n 'username' => $this->getConfigurationByShopId($id, 'username'),\n 'password' => $this->getConfigurationByShopId($id, 'password'),\n 'account' => $this->getConfigurationByShopId($id, 'account'),\n 'dev' => $dev ? 'true' : 'false',\n 'delta' => $this->delta ? 'true' : 'false',\n 'data' => $this->getCurlFile($this->dirPath . 'export.zip', 'application/zip'),\n );\n return $this->pushFile(\n $dev ? self::URL_ZIP_DEV : self::URL_ZIP,\n $fields\n );\n }",
"function agregar_zip($dir, $zip) {\n //verificamos si $dir es un directorio\n if (is_dir($dir)) {\n //abrimos el directorio y lo asignamos a $da\n if ($da = opendir($dir)) {\n //leemos del directorio hasta que termine\n while (($archivo = readdir($da)) !== false) {\n /*Si es un directorio imprimimos la ruta\n * y llamamos recursivamente esta función\n * para que verifique dentro del nuevo directorio\n * por mas directorios o archivos\n */\n if (is_dir($dir . $archivo) && $archivo != \".\" && $archivo != \"..\") {\n //echo \"<strong>Creando directorio: $dir$archivo</strong><br/>\";\n agregar_zip($dir . $archivo . \"/\", $zip);\n\n /*si encuentra un archivo imprimimos la ruta donde se encuentra\n * y agregamos el archivo al zip junto con su ruta \n */\n } elseif (is_file($dir . $archivo) && $archivo != \".\" && $archivo != \"..\") {\n //echo \"Agregando archivo: $dir$archivo <br/>\";\n $zip->addFile($dir . $archivo, \"Soportes/\".$archivo);\n }\n }\n //cerramos el directorio abierto en el momento\n closedir($da);\n }\n }\n }",
"public function exportXmlAction() {\n $fileName = 'Onestepcheckout.xml';\n $content = $this->getLayout ()->createBlock ( 'Onestepcheckout/adminhtml_Onestepcheckout_grid' )->getXml ();\n \n $this->_sendUploadResponse ( $fileName, $content );\n }",
"public function zip()\n {\n\n if (empty($this->filepath)) {\n throw(new \\Exception(\"Must set \\sb\\Email\\Attachment::file_path before zipping attachment\"));\n }\n\n if (empty($this->name)) {\n $this->name = basename($this->filepath);\n }\n\n $zip = new \\ZipArchive();\n $zipfile_path = \\ROOT . \"/private/cache/compression/\" . md5(microtime(true)) . '_' . $this->name . \".zip\";\n $zip_dir = dirname($zipfile_path);\n if (!is_dir($zip_dir) && !@mkdir($zip_dir, 0755, true)) {\n throw(new \\Exception(\"Cannot create /private/cache/compression directory\\n\"));\n }\n\n if ($zip->open($zipfile_path, \\ZIPARCHIVE::CREATE) !== true) {\n throw(new \\Exception(\"Cannot open <$zipfile_path>\\n\"));\n }\n\n $zip->addFromString($this->name, \\file_get_contents($this->filepath));\n\n $zip->close();\n\n $this->name .= '.zip';\n\n //this is the content, in this case I am ready the blob data from a saved image file but you could easily replace this with blob data from a database. The mime type will be added based on the extension using \\sb\\Files::extensionToMime. For bizarre mime-types that are not in \\sb\\Files::extensionToMime you can override this by setting the mime-type manually $myAttachment->mime_type ='bizarre/weird';\n $this->contents = \\file_get_contents($zipfile_path);\n\n //remove the tmp zip file\n \\unlink($zipfile_path);\n\n //add mime type for zip files, \\sb\\Files should handle this after 1.41\n $this->mime_type = 'application/x-zip-compressed';\n }",
"private function createArchive(array $entity_ids = []) {\n\n // Start creating a new archive file.\n if (!class_exists('\\ZipArchive')) {\n throw new \\Exception('Feature requires PHP Zip extension.');\n }\n $zip = new \\ZipArchive();\n\n if ($this->entityArchive) {\n\n $entity_archiveRealPath = $this->archiveRealPath . '/' . $this->entityId;\n $entity_archive = $entity_archiveRealPath . '.zip';\n\n // Make sure to remove archive file first.\n if (file_exists($entity_archive)) {\n \\Drupal::service('file_system')->delete($entity_archive);\n }\n\n // Open archive.\n $result = $zip->open($entity_archive, \\ZipArchive::CREATE | \\ZipArchive::OVERWRITE);\n if ($result !== TRUE) {\n throw new \\Exception('Could not open archive file: ' . $this->zipErrorMsg($result));\n }\n // Create an archive of an article assets and content.\n foreach ($this->scanDirectory($entity_archiveRealPath) as $item) {\n $zip->addFile($entity_archiveRealPath . '/' . $item, $this->entityId . '/' . $item);\n }\n\n }\n else {\n\n // Open archive.\n $result = $zip->open($this->archiveFile, \\ZipArchive::CREATE | \\ZipArchive::OVERWRITE);\n if ($result !== TRUE) {\n throw new \\Exception('Could not open archive file: ' . $this->zipErrorMsg($result));\n }\n\n // Scan through all entity directories and add each file to an archive.\n foreach ($this->scanDirectory($this->archiveRealPath) as $item) {\n $dir = $this->archiveRealPath . '/' . $item;\n if (is_dir($dir) && in_array($item, $entity_ids)) {\n $zip->addEmptyDir($item);\n $files = $this->scanDirectory($this->archiveRealPath . '/' . $item);\n foreach ($files as $file) {\n $zip->addFile($this->archiveRealPath . '/' . $item . '/' . $file, $item . '/' . $file);\n }\n }\n }\n }\n\n // Close and save archive.\n $zip->close();\n\n }",
"public function toXMLFile($repository) {\r\n\t}",
"public function getNewestZip();",
"public function exportXmlAction(){\n $fileName = 'magazine.xml';\n $content = $this->getLayout()->createBlock('unideal_topads/adminhtml_magazine_grid')->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"protected function exportFile()\n {\n $this->xml->asXML($this->outputPath . $this->fileName);\n \n }",
"private function newArchive()\n {\n $dir = FileSystemTool::mkTmpDir();\n\n\n// FileSystemTool::mkdir($dir);\n\n\n //--------------------------------------------\n // BASIC FILES\n //--------------------------------------------\n $boilerplateDir = __DIR__ . \"/../assets/light-app-boilerplate\";\n $otherFiles = [\n \"config/services/_zzz.byml\",\n \"universe/bigbang.php\",\n \"www/index.php\",\n \"www/.htaccess\",\n ];\n foreach ($otherFiles as $rpath) {\n $file = $boilerplateDir . \"/$rpath\";\n $dst = $dir . \"/$rpath\";\n FileSystemTool::copyFile($file, $dst);\n }\n\n\n //--------------------------------------------\n // PLANETS\n //--------------------------------------------\n $uniDir = $this->uniDir;\n $deps = $this->getBoilerplateDependencies();\n\n\n if ($deps) {\n\n $nbDeps = count($deps);\n\n $c = 1;\n foreach ($deps as $pDotName) {\n\n $pSlashName = PlanetTool::getPlanetSlashNameByDotName($pDotName);\n $planetDir = $uniDir . \"/\" . $pSlashName;\n $sizeHuman = ConvertTool::convertBytes(FileSystemTool::getDirectorySize($planetDir), 'h');\n\n\n $this->msg(\"Processing planet $pDotName ($c/$nbDeps) ($sizeHuman)\" . PHP_EOL);\n flush();\n\n\n if (true === is_dir($planetDir)) {\n PlanetTool::importPlanetByExternalDir($pDotName, $planetDir, $dir, [\n \"assets\" => true,\n ]);\n } else {\n throw new LingTalfiException(\"Planet dir not found: $planetDir.\");\n }\n $c++;\n }\n }\n\n\n //--------------------------------------------\n // CREATE ZIP ARCHIVE\n //--------------------------------------------\n\n $this->msg(\"Creating zip archive...\" . PHP_EOL);\n flush();\n\n\n $zipFile = $dir . \".zip\";\n ZipTool::zip($dir, $zipFile, [\n \"ignoreName\" => [\n \".git\",\n \".gitignore\",\n ]\n ]);\n FileSystemTool::remove($dir);\n\n\n $zipFileDst = $uniDir . \"/Ling/Light_AppBoilerplate/assets/light-app-boilerplate.zip\";\n $this->msg(\"moving zip file to $zipFileDst.\" . PHP_EOL);\n FileSystemTool::move($zipFile, $zipFileDst);\n\n }",
"function zip_extract_file()\n{\n if (empty($_POST) === false) {\n $zipper = new Zipclass();\n $arrfile = $_POST['arrfile'];\n $arrfile = json_decode($arrfile);\n $root = $_SERVER['DOCUMENT_ROOT'] . '/';\n $location = $_POST['location'];\n $error_ck = false;\n $msg = '';\n if (empty($arrfile) === false && isset($arrfile) === true) {\n $error_ck = true;\n }\n if ($error_ck === true) {\n if (is_array($arrfile)) {\n foreach ($arrfile as $file) {\n if (file_exists($file)) {\n if ($zipper->zip_extract($file, $root . $location) === false) {\n echo 'Opss something is wrong!';\n } else {\n $msg = 'successfully';\n }\n }\n }\n }\n } else {\n echo 'Invalid location';\n }\n \n if (empty($msg) === false) {\n echo $msg;\n $msg = '';\n }\n }\n}",
"protected function createExportFiles($id)\n {\n if (!is_dir($this->dirPath) && !@mkdir($this->dirPath, 0777, true)) {\n $this->log->error(\"Unable to create $this->dirPath for boxalino data sync\");\n return false;\n }\n\n $metadataFactoryClassName = $this->getClassMetadataFactoryName();\n /** @var $metaDataFactory \\Doctrine\\ORM\\Mapping\\ClassMetadataFactory */\n $metaDataFactory = new $metadataFactoryClassName;\n $metaDataFactory->setEntityManager($this->getEntityManager());\n\n $zip_name = $this->dirPath . 'export.zip';\n @unlink($zip_name);\n\n $zip = new ZipArchive();\n if ($zip->open($zip_name, ZIPARCHIVE::CREATE) !== TRUE) {\n $this->log->error(\"Unable to create ZIP file $zip_name for boxalino data sync\");\n return false;\n }\n\n // Create files\n $this->startXml($id);\n $zip->addFile($this->getArticles($id), self::ITEM_PROPERTIES_CSV);\n $zip->addFile($this->getArticleDetails($id), self::ITEM_ARTICLESDETAILS_CSV);\n $zip->addFile($this->getBrands($id), self::ITEM_BRANDS_CSV);\n $zip->addFile($this->getCategories($id), self::CATEGORIES_CSV);\n $zip->addFile($this->getItemCategories($id), self::ITEM_CATEGORIES_CSV);\n if (count($this->getShopLocales($id)) > 1) {\n $zip->addFile($this->getTranslations($id), self::ITEM_TRANSLATIONS_CSV);\n }\n $zip->addFile($this->getCustomers($id), self::CUSTOMERS_CSV);\n $zip->addFile($this->getFacetValues($id), self::ITEM_FACETVALUES_CSV);\n $zip->addFile($this->getBlogs($id), self::ITEM_BLOGS_CSV);\n $zip->addFile($this->getTransactions($id), self::TRANSACTIONS_CSV);\n $zip->addFile($this->getStoreInfo($id), self::STORE_INFO_TXT);\n $zip->addFromString('properties.xml', $this->finishAndGetXml($id));\n $zip->close();\n\n $dom = new DOMDocument('1.0');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n $dom->loadXML($this->xml->asXML());\n $saveXML = $dom->saveXML();\n file_put_contents($this->dirPath . 'properties.xml', $saveXML);\n\n $this->db->query('TRUNCATE `exports`');\n $this->db->query('INSERT INTO `exports` values(NOW())');\n return true;\n }"
] | [
"0.5790132",
"0.57501966",
"0.5594493",
"0.5592082",
"0.5465575",
"0.54407334",
"0.5438967",
"0.53781736",
"0.53364724",
"0.5308982",
"0.5255905",
"0.52463806",
"0.5228182",
"0.5169449",
"0.51638883",
"0.5136853",
"0.5130494",
"0.51284575",
"0.5098329",
"0.5097323",
"0.50967574",
"0.5082084",
"0.50808",
"0.50782806",
"0.5071182",
"0.50327057",
"0.5013835",
"0.5011085",
"0.50058633",
"0.4991747"
] | 0.58331525 | 0 |
Is current matrix a square matrix | final public function is_square()
{
return $this->ndim == 2
&& $this->shape[0] == $this->shape[1];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isSquare(): bool\n {\n return $this->dimensions()->square();\n }",
"public function hasSquareId()\n {\n return !is_null($this->square_id);\n }",
"protected function in_orig($square)\r\n {\r\n if (!empty($this->_orig[$square]))\r\n {\r\n return true;\r\n }\r\n }",
"public function is2D()\n {\n return (bool) ($this->_space_type & Maths::CARTESIAN_2D);\n }",
"function isValidMatrix($matrix, $n) {\n $size = count($matrix);\n $totalValue = 0;\n foreach ($matrix as $row) {\n if ($size != count($row)) {\n /* Discards non square matrices */\n return false;\n }\n foreach ($row as $data) {\n $totalValue += $data;\n }\n }\n if ($n > $totalValue) {\n return false;\n } else {\n return $size;\n }\n}",
"public function IsMine($col,$row) {\n\t\treturn $this->mineBitmap[$row][$col];\n\t}",
"public static function multiplicable(Matrix $matrix1, Matrix $matrix2): bool\n {\n return $matrix1->getColumns() == $matrix2->getRows();\n }",
"protected function fits($value, $square)\r\n {\r\n if ($this->fits_row($value, $square) &&\r\n $this->fits_col($value, $square) &&\r\n $this->fits_block($value, $square)\r\n )\r\n {\r\n return true;\r\n }\r\n }",
"public function isSquare($squarableNumber) {\n\t\t$squarootValue = sqrt($squarableNumber);\n\t\treturn (($squarootValue*$squarootValue) == $squarableNumber);\n\t}",
"function isSquare($n)\n{\n\t$sr = (int)sqrt($n);\n\treturn ($sr * $sr == $n);\n}",
"public function is1D()\n {\n return (bool) ($this->_space_type & Maths::CARTESIAN_1D);\n }",
"private function checkMatrix($matrix_array, $id) {\n $query = \"SELECT customer_id FROM matrix WHERE customer_id = $id\";\n foreach ($matrix_array as $key => $value) {\n $query .= \" AND \" . $key . \" = '\" . $value . \"'\";\n }\n $this->conn->query($query);\n $row = $this->conn->affected_rows;\n return $row == 1;\n }",
"public function isVector() {\n\t\tif( $this->getRows() == 1 ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn $this->getCols() == 1;\n\t}",
"public static function isColumnEqualRow(array $matrix_one, array $matrix_two): bool\n {\n return sizeOf($matrix_one) === sizeOf($matrix_two[0]);\n }",
"private function checkDiagonals()\n {\n if($this->board[0][0] !== self::BLANK &&\n $this->board[0][0] === $this->board[1][1] &&\n $this->board[1][1] === $this->board[2][2])\n return TRUE;\n\n if($this->board[0][2] !== self::BLANK &&\n $this->board[0][2] === $this->board[1][1] &&\n $this->board[1][1] === $this->board[2][0])\n return TRUE;\n\n return FALSE;\n }",
"protected function isWinnerCombinationInRowSet($matrix)\n {\n $flag = false;\n\n // in rows\n foreach ($matrix as $row) {\n $tmpRow = array_diff($row, ['', '-']); // remove all not filled elements\n if (!empty($tmpRow)) {\n $uniqueList = array_unique($tmpRow);\n $duplicateCount = count($tmpRow) - count($uniqueList) + 1 ; // one symbol always still exist\n if ($duplicateCount >= $this->winLength) {\n $flag = reset($uniqueList);\n break;\n }\n }\n }\n\n return $flag;\n }",
"protected function is_solved()\r\n {\r\n $squares = $this->_squares;\r\n\r\n foreach ($squares as $value)\r\n {\r\n if (empty($value))\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }",
"public static function is2d(array $array) : boolean\n {\n return is_array($array) ? Ar::reduce($array, function($element, $initial) {\n return $initial && Ar::is1d($element);\n }, true) : false;\n }",
"function PerfectSquare($a) {\n $b = (int) (sqrt($a));\n return ($b * $b == $a);\n }",
"public function isSymmetric()\n {\n $hc = count($this->headers);\n foreach ($this->rows as $row) {\n if (count($row) != $hc) {\n return false;\n }\n }\n return true;\n }",
"public static function checkMatrixColumn(array $matrix): bool\n {\n $first_column_length = null;\n foreach ($matrix as $key => $value) {\n $first_column_length = ($first_column_length ?? sizeOf($value));\n if ($first_column_length !== sizeOf($value)) {\n return false;\n }\n }\n return true;\n }",
"public function is_square_entry( $entry_id ) {\n\t\t// Check if this is a square payment entry.\n\t\t$gateway = gform_get_meta( $entry_id, 'payment_gateway' );\n\t\treturn $gateway === $this->_slug;\n\t}",
"private function _checkNumberIsSquare($number) {\n\t\t$squareRoot = $this->squareRoot($number);\n\n\t\treturn $squareRoot == floor($squareRoot); \n\t}",
"public function getMatrix() { }",
"protected function isWinnerCombinationInDiagonal($matrix)\n {\n $diagonalVector = [];\n for($i=0; $i < count($matrix); $i++ ) {\n $diagonalVector[] = $matrix[$i][$i];\n }\n\n return $this->isWinnerCombinationInRowSet([$diagonalVector]);\n }",
"public function isValid(): bool {\n if(!$this->isFilled()) { return false; }\n\n $range = range(1,9);\n // step 2 \n for($i = 0; $i < 9; $i++) { // numbers\n $tmp = $this->row($i);\n $tmp2 = $this->column($i);\n $tmp3 = $this->square($i);\n sort($tmp);\n sort($tmp2);\n sort($tmp3);\n if($tmp != $range || $tmp2 != $range) {\n return false;\n }\n }\n return true;\n \n }",
"public function get_matrix()\n {\n return $this->_matrix;\n }",
"public function cellContainMine($row_x, $col_y) {\n if($this->cells[$row_x][$col_y]->containMine()) {\n return true;\n }\n\n return false;\n }",
"final protected function isSolved(): bool\n {\n $numberOfQueenPieces = ($this->stateManager->countStates() - 1);\n $boardSize = $this->stateManager->getBoard()->getSize();\n \n return ($numberOfQueenPieces === $boardSize);\n }",
"public function checkGridSquare($grid, $square) {\n\n // set the query.\n $query = 'select `gridId`,\n `squareId`\n from `userReg`\n where `gridId` = :grid \n and `squareId` = :square';\n\n // set the query params.\n $queryParams = [\n ':grid' => $grid,\n ':square' => $square\n ];\n\n // prepare and run the query.\n $stmt = $this->mDb->prepare($query);\n $stmt->execute($queryParams);\n\n // get the grid id and the square id\n $userCheck = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // cast values\n $userCheck['gridId'] = empty($userCheck['gridId']) === false\n ? $userCheck['gridId']\n : false;\n\n $userCheck['squareId'] = empty($userCheck['squareId']) === false\n ? $userCheck['squareId']\n : false;\n\n // if the values exist in the db.\n if ($userCheck['gridId'] == $grid && $userCheck['squareId'] == $square) {\n\n // return recent grid ID.\n return self::setMaxGrid() + 1;\n }// end if\n }"
] | [
"0.7379246",
"0.6132812",
"0.60790443",
"0.6004904",
"0.59606",
"0.5770847",
"0.5748638",
"0.5707948",
"0.5647503",
"0.55919504",
"0.5575113",
"0.55116487",
"0.5510433",
"0.54985607",
"0.54555696",
"0.54532176",
"0.5417578",
"0.53622323",
"0.53482497",
"0.53400195",
"0.5321192",
"0.5286339",
"0.52206075",
"0.51613617",
"0.5146312",
"0.50939417",
"0.5073397",
"0.50499964",
"0.5047795",
"0.50354797"
] | 0.7847954 | 0 |
Make the Certification: we will obtain the ::latest:: value | protected function getCertificationAttribute()
{
return $this->backgroundCheck
->certifications
->where('certification_type_id', $this->backgroundCheckProvider->certification_type_id)
->last();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCertificate()\n {\n $polling = 0;\n while ($this->status == 'processing' && $polling < 4) {\n sleep(5);\n $this->updateOrderData();\n $polling++;\n }\n if ($this->status == 'valid' && !empty($this->certificateURL)) {\n $get = $this->connector->get($this->certificateURL);\n if (strpos($get['header'], \"200 OK\") !== false) {\n return $get['body'];\n }\n }\n return false;\n }",
"public function latest();",
"function getCurrentDistributionValue();",
"public function run()\n {\n\n $cert = new Certification([\n 'cert_name' => 'Swiftwater Safety Awareness',\n 'cert_link' => 'certification_sample.pdf',\n ]);\n $cert->save();\n\n $cert = new Certification([\n 'cert_name' => 'Rock Climbing Training',\n 'cert_link' => 'certification_sample.pdf',\n ]);\n $cert->save();\n\n $cert = new Certification([\n 'cert_name' => 'Zipline Saftety Course',\n 'cert_link' => 'certification_sample.pdf',\n ]);\n $cert->save();\n\n $cert = new Certification([\n 'cert_name' => 'Khalid',\n 'cert_link' => 'certificate_sample.pdf',\n 'cert_expiry' => Carbon::createFromFormat('Y-m-d', '2017-12-31')->toDateString(),\n ]);\n $cert->save();\n\n\n }",
"public function setLastCertificationDateTime($val)\n {\n $this->_propDict[\"lastCertificationDateTime\"] = $val;\n return $this;\n }",
"public function getLastCertificationDateTime()\n {\n if (array_key_exists(\"lastCertificationDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastCertificationDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastCertificationDateTime\"])) {\n return $this->_propDict[\"lastCertificationDateTime\"];\n } else {\n $this->_propDict[\"lastCertificationDateTime\"] = new \\DateTime($this->_propDict[\"lastCertificationDateTime\"]);\n return $this->_propDict[\"lastCertificationDateTime\"];\n }\n }\n return null;\n }",
"private function buildCertificate()\n {\n return new Certificate(\n $_SERVER['HTTP_SIGNATURECERTCHAINURL'],\n $_SERVER['HTTP_SIGNATURE']\n );\n }",
"function Participant_Handle_Certificate_Generate()\n {\n $where=$this->Participant_Certificate_Where($this->ItemHash);\n\n $cert=$this->CertificatesObj()->Sql_Select_Hash($where);\n $cert=$this->CertificatesObj()->Certificate_Read($cert);\n\n $latex=$this->CertificatesObj()->Certificate_Generate($cert);\n\n $latex=$this->CertificatesObj()->Certificates_Latex_Ambles_Put($latex);\n $this->CertificatesObj()->Certificate_Set_Generated($cert);\n \n if ($this->CGI_GET(\"Latex\")!=1)\n {\n $this->ShowLatexCode($latex);\n }\n\n return\n $this->Latex_PDF\n (\n $this->CertificatesObj()->Certificate_TexName\n (\n $cert[ \"Friend_Hash\" ][ \"Name\" ]\n ),\n $latex\n );\n }",
"public function getCertifAuto() {\n return $this->certifAuto;\n }",
"public function __invoke()\n {\n return $this->dp->getCertExpiry()\n ->getBody()\n ->getContents();\n }",
"private function loadIntermediateCert(){\n\n\t\t\t$response = $this->puf->fetch($this->RepoEndpoint.'interm_cert', \"\", 1);\n\t\t\t$arrJson = json_decode($response);\n\n\t\t\tif ($arrJson && (int)$arrJson->status == 1 && strlen((string)$arrJson->cert)){\n\t\t\t\t$this->pfh->Delete('eqdkp_interm_cert.crt', 'eqdkp/certs');\n\t\t\t\t$this->pfh->CheckCreateFolder('certs', 'eqdkp');\n\t\t\t\t$this->pfh->CheckCreateFile('eqdkp_interm_cert.crt', 'eqdkp/certs');\n\t\t\t\t$this->pfh->putContent($this->pfh->FilePath('eqdkp_interm_cert.crt', 'eqdkp/certs'), (string)$arrJson->cert);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function getLatestVersion(){\n\t\t// Require stuff\n\t\trequire_once(__DIR__ . '/../scripts/php/includes/Utilities.php');\n\t\trequire_once(__DIR__ . '/../scripts/php/includes/Curl.php');\n\t\t\n\t\t// Set variables\n\t\t$Utilities = new \\Utilities;\n\t\t$releases = array();\n\t\t$_versions = array(\n\t\t\t'current' => $Utilities->siteData('fks_version'),\n\t\t\t'installer' => $this->fks_version,\n\t\t\t'latest' => $Utilities->getGitHubReleases(array('repo' => 'https://api.github.com/repos/FlyingKumquat/FKSrepack/', 'type' => 'latest'))['name']\n\t\t);\n\t\t\n\t\t// Make sure the version is set\n\t\t$_versions['current'] = !$_versions['current'] ? 0 : $_versions['current'];\n\t\t\n\t\t// TESTING - REMOVE ME\n\t\t//$_versions['current'] = '0.0.181025';\n\t\t//$_versions['installer'] = '0.1.191030';\n\t\t\n\t\t// Colors - Current\n\t\tif($_versions['current'] < $_versions['installer']) { $versions['current'] = '<span class=\"fks-text-danger\">' . $_versions['current'] . '</span>'; }\n\t\tif($_versions['current'] == $_versions['installer']) {\n\t\t\tif($_versions['installer'] < $_versions['latest']) { $versions['current'] = '<span class=\"fks-text-warning\">' . $_versions['current'] . '</span>'; }\n\t\t\tif($_versions['installer'] == $_versions['latest']) { $versions['current'] = '<span class=\"fks-text-success\">' . $_versions['current'] . '</span>'; }\n\t\t\tif($_versions['installer'] > $_versions['latest']) { $versions['current'] = '<span class=\"fks-text-critical\">' . $_versions['current'] . '</span>'; }\n\t\t}\n\t\tif($_versions['current'] > $_versions['installer']) { $versions['current'] = '<span class=\"fks-text-critical\">' . $_versions['current'] . '</span>'; }\n\t\t\n\t\t// Colors - Installer\n\t\tif($_versions['installer'] < $_versions['latest']) { $versions['installer'] = '<span class=\"fks-text-warning\">' . $_versions['installer'] . '</span>'; }\n\t\tif($_versions['installer'] == $_versions['latest']) { $versions['installer'] = '<span class=\"fks-text-success\">' . $_versions['installer'] . '</span>'; }\n\t\tif($_versions['installer'] > $_versions['latest']) { $versions['installer'] = '<span class=\"fks-text-critical\">' . $_versions['installer'] . '</span>'; }\n\t\t\n\t\t// Colors - Latest\n\t\t$versions['latest'] = '<span class=\"fks-text-success\">' . $_versions['latest'] . '</span>';\n\t\t\n\t\t// Only grab the YYMMDD formated date\n\t\t$_current = explode('.', $_versions['current'])[2];\n\t\t\n\t\t// Grab all releases\n\t\t$_releases = $Utilities->getGitHubReleases(array('repo' => 'https://api.github.com/repos/FlyingKumquat/FKSrepack/', 'type' => 'all'));\n\t\t\n\t\t// Loop through all the releases and only return missing\n\t\tforeach($_releases as $r) {\n\t\t\t// Only grab the YYMMDD formated date\n\t\t\t$_date = explode('.', $r['name'])[2];\n\t\t\t\n\t\t\t// Add the release if newer\n\t\t\tif($_date > $_current) { $releases[$_date] = $r; }\n\t\t}\n\t\t\n\t\t// Sort\n\t\tksort($releases);\n\t\t\n\t\t// Return\n\t\treturn array('result' => 'success', 'versions' => $versions, 'releases' => $releases);\n\t}",
"function get_certificate()\n {\n clearos_profile(__METHOD__, __LINE__);\n }",
"public function getLastPingValue()\n {\n if ($this->status != self::STATUS_ACTIVE) {\n\n return self::ZERO;\n }\n\n $getInitResult = $this->getInit();\n\n if ($getInitResult == 'Ok') {\n\n return $this->ping;\n }\n\n return self::ZERO;\n }",
"private function getIntermediateCert(){\n\t\t\tif (is_file($this->pfh->FilePath('eqdkp_interm_cert.crt', 'eqdkp/certs', false))){\n\t\t\t\treturn file_get_contents($this->pfh->FilePath('eqdkp_interm_cert.crt', 'eqdkp/certs'));\n\t\t\t} else {\n\t\t\t\t$blnResult = $this->loadIntermediateCert();\n\t\t\t\tif ($blnResult){\n\t\t\t\t\treturn file_get_contents($this->pfh->FilePath('eqdkp_interm_cert.crt', 'eqdkp/certs'));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function getCertFingerprint()\n {\n return $this->cert_fingerprint;\n }",
"public function computeNewValue();",
"function getInfocert()\n{ \n return openssl_x509_parse(file_get_contents($this->certificado));\n}",
"public function last_checked_now( $transient ) {\n\t\tinclude ABSPATH . WPINC . '/version.php';\n\t\t$current = new stdClass;\n\t\t$current->updates = array();\n\t\t$current->version_checked = $wp_version;\n\t\t$current->last_checked = time();\n\t\t\n\t\treturn $current;\n\t}",
"public function getCertificate()\n\t{\n\t\treturn $this->certificate;\n\t}",
"public function getRenew();",
"public function findLatestWithoutSecurity();",
"function wp_automatic_latest_version() {\n\t$latest_version = get_option ( 'wp_automatic_version_last', '' );\n\t\n\tif (trim ( $latest_version ) == '') {\n\t\treturn wp_automatic_update_version ();\n\t} else {\n\t\t// now a registred version is available let's send it if before 24h or update if more than that .\n\t\t$last_update = get_option ( 'wp_automatic_version_updated', '1379233804' );\n\t\t$diff = wp_automatic_get_time_difference ( $last_update, time ( 'now' ) );\n\t\t\n\t\tif ($diff < 1440) {\n\t\t\treturn $latest_version;\n\t\t} else {\n\t\t\treturn wp_automatic_update_version ();\n\t\t}\n\t\t\n\t\treturn $latest_version;\n\t}\n}",
"public function getNextSigningCertificate()\n {\n if (array_key_exists(\"nextSigningCertificate\", $this->_propDict)) {\n return $this->_propDict[\"nextSigningCertificate\"];\n } else {\n return null;\n }\n }",
"public function getCert()\n {\n return $this->certificado;\n }",
"public function get_stored_cert() {\n\t\tif ( is_null( $this->cert ) ) {\n\t\t\t$cert = get_option( 'livechat_public_key' );\n\t\t\tif ( ! $cert ) {\n\t\t\t\t$cert = $this->api_client->get_cert();\n\t\t\t\tupdate_option( 'livechat_public_key', $cert );\n\t\t\t}\n\n\t\t\t$this->cert = $cert;\n\t\t}\n\n\t\treturn $this->cert;\n\t}",
"function opcion__generar_cert()\n\t{\t\t\n\t\t$parametros = $this->get_parametros();\n\t\t//Creo el directorio para el servicio web\n\t\t$proyecto = $this->get_proyecto();\n\t\t$dir_instalacion = $proyecto->get_dir_instalacion_proyecto();\t\t\n\t\tif (toba_modelo_servicio_web::existe_archivo_certificado($proyecto) && ! isset($parametros['-r'])) {\n\t\t\t$this->consola->error(\"Ya existe la clave privada del proyecto en '$dir_instalacion/privada.key'. Para sobreescribirla indique el parametro -r\");\n\t\t\tdie;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\ttoba_modelo_servicio_web::generar_certificados($proyecto, $dir_instalacion);\n\t\t\t$this->consola->mensaje(\"Ok. Certificado publico generado en:\");\n\t\t\t$this->consola->mensaje(\"$dir_instalacion/publica.crt\");\t\t\t\t\n\t\t} catch (toba_error_usuario $e) {\n\t\t\t$this->consola->mensaje('Se ha producido un error durante el proceso', true);\n\t\t\t$this->consola->error($e->getMessage());\n\t\t}\n\t}",
"public function getCertificationStatusChangeDate(){\n return $this->certificationStatusChangeDate;\n }",
"function Participants_Handle_Certificates_Generate()\n {\n return\n $this->CertificatesObj()->Certificates_Generate_Handle\n (\n $this->Participant_Certificates_Where(),\n \"Certs.Participants.\".\n $this->Event(\"Name\")\n );\n }",
"public function getLastUpdate()\n {\n return Mage::app()->loadCache('epoqinterface_version_lastcheck');\n }"
] | [
"0.54224896",
"0.5302481",
"0.5141137",
"0.5094185",
"0.50929874",
"0.50436944",
"0.5011848",
"0.49649298",
"0.4949531",
"0.49224657",
"0.49060088",
"0.48903385",
"0.4858608",
"0.48349145",
"0.48119128",
"0.47452995",
"0.47261757",
"0.47091696",
"0.46796936",
"0.46677697",
"0.4650442",
"0.46493328",
"0.46443626",
"0.46262425",
"0.45686293",
"0.4563082",
"0.45622888",
"0.45537123",
"0.45506713",
"0.4545859"
] | 0.56152815 | 0 |
Make the Certification Status | protected function getCStatusAttribute()
{
if($this->certification){
return 'PASS';
}
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function flo_statuSSL()\n {\n $status = is_ssl();\n $result = array();\n\n if ($status == true) {\n $result[\"response\"] = true;\n $result[\"message\"] = \"SSL Activated\";\n } else {\n $result[\"response\"] = false;\n $result[\"message\"] = \"SSL not detected\";\n }\n\n $initActions = new FLO_LAUNCH_ACTIONS();\n $initActions->logMessage('Clone Status :: ' . json_encode($result));\n echo json_encode($result);\n\n die();\n }",
"public function certificate(Request $request)\n {\n $user = Auth::user();\n $course = DB::table(\"courses\")->where(\"id\", $request->courseid)->first();\n $enrollment = DB::table(\"coursesenrolleds\")->where(\"course\", $request->courseid)->where(\"student\", $user->id)->first();\n \n \n if ($enrollment->status == \"Pending\") {\n return response()->json(responder(\"warning\", \"Hmmm\", \"Please complete the course to get a certificate\"));\n }else {\n $exams = DB::table(\"exams\")->where([\"course\"=> $request->courseid, \"status\"=>'Published'])->count();\n $completedExams = DB::table(\"examsreports\")->where(\"course\", $request->courseid)->where(\"student\", $user->id)->count();\n if($completedExams < $exams ){\n return response()->json(responder(\"warning\", \"Hmmm\", \"You've got some pending exams, Please take them to get a certificate\"));\n }\n }\n return response()->json(responder(\"success\", \"\", \"\", \"redirect('\".url('/course/viewcertificate/'.$enrollment->id).\"', true)\", false));\n }",
"public function run()\n {\n\n $cert = new Certification([\n 'cert_name' => 'Swiftwater Safety Awareness',\n 'cert_link' => 'certification_sample.pdf',\n ]);\n $cert->save();\n\n $cert = new Certification([\n 'cert_name' => 'Rock Climbing Training',\n 'cert_link' => 'certification_sample.pdf',\n ]);\n $cert->save();\n\n $cert = new Certification([\n 'cert_name' => 'Zipline Saftety Course',\n 'cert_link' => 'certification_sample.pdf',\n ]);\n $cert->save();\n\n $cert = new Certification([\n 'cert_name' => 'Khalid',\n 'cert_link' => 'certificate_sample.pdf',\n 'cert_expiry' => Carbon::createFromFormat('Y-m-d', '2017-12-31')->toDateString(),\n ]);\n $cert->save();\n\n\n }",
"public function updateCourseStatus( )\n {\n //\n }",
"public function certificate(){\n\t\t$_POST['user_id'] = $_SESSION['service']->data->id;\n\t\t$_POST['token']= $_SESSION['service']->token;\n\t\t$service_url = api_base_url('getCertificate');\n\t\t$response = call_postMethod($type = \"POST\",$service_url,$_POST);\n\t\t$data = json_decode($response);\n\t\t$title['title']=\"Certificate\";\n\t\t$this->load->view('includes/service/metadata',$title);\n\t\t$this->load->view('includes/service/header',$title);\n\t\t$this->load->view('includes/service/sidebar');\n\t\t$this->load->view('service/certificate',$data);\n\t\t$this->load->view('includes/service/footer');\t\n\t}",
"function Participant_Handle_Certificate_Generate()\n {\n $where=$this->Participant_Certificate_Where($this->ItemHash);\n\n $cert=$this->CertificatesObj()->Sql_Select_Hash($where);\n $cert=$this->CertificatesObj()->Certificate_Read($cert);\n\n $latex=$this->CertificatesObj()->Certificate_Generate($cert);\n\n $latex=$this->CertificatesObj()->Certificates_Latex_Ambles_Put($latex);\n $this->CertificatesObj()->Certificate_Set_Generated($cert);\n \n if ($this->CGI_GET(\"Latex\")!=1)\n {\n $this->ShowLatexCode($latex);\n }\n\n return\n $this->Latex_PDF\n (\n $this->CertificatesObj()->Certificate_TexName\n (\n $cert[ \"Friend_Hash\" ][ \"Name\" ]\n ),\n $latex\n );\n }",
"public function registrarCertificacionObtenida() {\n\t\t$dataGet = Input::all();\n\t\t$certificacionObt = new CertificacionObtenida;\n\t\t$certificacionObt->personaId = $dataGet['personaId'];\n\t\t$certificacionObt->tituloCertificacion = $dataGet['tituloCertificacion'];\n\t\t$certificacionObt->fechaCertificacion = $dataGet['fechaCertificacion'];\n\t\t$certificacionObt->organizacionId = $dataGet['organizacionId'];\n\t\t$certificacionObt->descripcion = $dataGet['descripcion'];\n\t\t$certificacionObt->created_by = $dataGet['created_by'];\n\t\t$certificacionObt->save();\n\t\treturn (\"success\");\n\t}",
"public function provisional()\n {\n $this->user_model->check_permissions(\"certificate/provisional\");\n \n $data['menu'] = $this->load_model->menu();\n $data['base_url'] = base_url();\n $data['userInfo'] = $this->userInfo;\n $branch=$this->user_model->getbranch();\n if($this->user_model->is_super())\n $data['branch'] = $this->db->select(\"name,id\")->from(\"branch\")->get()->result();\n else\n $data['branch'] = $this->db->select(\"name,id\")->from(\"branch\")->where(\"id\",$branch)->get()->result();\n \n\n $this->load->view('header',$data);\n $this->load->view('sidebar',$data);\n $this->load->view('certificate/add_provisional_info',$data);\n \n }",
"private static function retrieveCertificatesStatus()\n {\n // We retrieve the public keys\n $ch = curl_init('https://get.dgc.gov.it/v1/dgc/signercertificate/status');\n\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $response = curl_exec($ch);\n $info = curl_getinfo($ch);\n\n // Then, after your curl_exec call:\n $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n $body = substr($response, $header_size);\n\n if (empty($info['http_code'])) {\n throw new \\InvalidArgumentException(\"No HTTP code was returned\");\n }\n\n if ($info['http_code'] == 200) {\n return $body;\n }\n\n return \"\";\n }",
"public function drawCertificate($arrArgs) {\n\t\ttry { \n\t\t\t$error=array();\n\t\t\t\techo \"<pre/>\";\n\t\t\t\tprint_r($arrArgs);\n\t\t\tif (! empty ( $arrArgs )) {\n\t\t\t\tforeach( $arrArgs as $key => $value) {\t\t\n\t\t\t\n\t\t\t\t\t$certficateName = $value['name'];\n\t\t\t\t\t$firstName \t\t= $value['first_name'];\n\t\t\t\t\t$lastName \t\t= $value['last_name'];\n\t\t\t\t\t$marksObtained\t= $value['score'];\n\t\t\t\t\t$imagePath\t\t= $value['upload_path'];\n\t\t\t\t\t$email\t\t\t= $value['email_enroll_no'];\n\t\t\t\t\t$completeName\t= $firstName.\" \".$lastName ;\n\t\t\t\t\t$imageSavePath=DOC_ROOT.\"/misc/SavedCertificate/\".$email.\".jpeg\";\t\n\t\t\t\t \n\t\t\t\t\t$font = 8;\t\t#fontsize for writing details on certificate\n\t\t\t\t\t$im = ImageCreateFromJPEG( $imagePath );\n\t\t\t\n\t\t\t\t\t$backgroundColor = imagecolorallocate ($im, 255, 255, 255);\n\t\t\t\t\t$textColor = imagecolorallocate ($im, 0, 0,0);\n\n\t\t\t\t\t#writing user specific details on the certificate\n\t\t\t\t\timagestring ($im, $font, 60 , 80, $completeName , $textColor);\n\t\t\t\t\timagestring ($im, $font, 50 , 110, $certficateName , $textColor);\n\t\t\t\t\timagestring ($im, $font, 70 , 130, $marksObtained , $textColor);\n\t\t\t\t//\timagestring ($im, $font, 100, 120, $totralMarks , $textColor);\n\t\t\t\t//\timagestring ($im, $font, 100, 144, $testDate , $textColor);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t#saving certificate image\n\t\t\t\t\timagejpeg($im, $imageSavePath, 100);\t\t\t\t\n\t\t\t\t\t$error=\"\";\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\t\t\n\t\t\tif(empty($error)){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t} \n\t\tcatch ( Exception $e ) {\n\t\t\t$this->handleException ( $e->getMessage () );\n\t\t}\n}",
"public function store(CertificationRequest $request)\n {\n try{\n $request->validated();\n $user = User::where('identity_number',$request->student_identity_number)->first();\n $student = Student::where(\"user_id\",$user->id)->first();\n Certification::create([\n 'student_id'=>$student->id,\n 'student_name'=>$student->user->name,\n 'student_dob'=>$student->user->dob,\n 'notes'=>$request->notes,\n 'student_class'=>$request->classroom\n ]);\n return $this->sendResponse(\"\",\"تمت عملية الاضافة بنجاح\");\n }\n catch (ModelNotFoundException $e)\n {\n return $e;\n }\n\n }",
"public function getCertificationStatusChangeDate(){\n return $this->certificationStatusChangeDate;\n }",
"public function updateCertification(Certification $certification)\n {\n }",
"public function addCertificationStatusLog(\\CertificationStatusLog $certStatusLog){\n $this->certificationStatusLog[] = $certStatusLog; \n $certStatusLog->setParentSite($this); \n }",
"public function setWillValidateCertificate($flag) {\n $this->willValidateCertificate = $flag;\n }",
"public function updateCertificationInfoAction()\n {\n \t$params=$this->getRequest()->getParams();\n \t$id=Auth_UserAdapter::getIdentity()->getId();\n \t$result=\\Extended\\certification::updateCertificationInfo($params);\n \tif($result){\n \t\t$certi_id=$params[\"certi_id\"];\n \t\t$result_arr=\\Extended\\certification::getEditCertificationInfo($certi_id);\n \t}\n \telse{\n \t\t$result_arr=array(\"msg\"=>\"error\");\n \t}\n \techo Zend_Json::encode($result_arr);\n \tdie;\n }",
"private function setVerificationStatus($result)\r\n {\r\n global $DBCONFIG;\r\n if($DBCONFIG->dbType==\"Oracle\"){\r\n $query = \" select \\\"UserName\\\", \\\"PrimaryEmailID\\\" as \\\"email\\\" from Users where \\\"ID\\\" = {$result['UserID']} and \\\"isEnabled\\\" = 1 \";\r\n }else{\r\n $query = \" select UserName, PrimaryEmailID as email from Users where ID = {$result['UserID']} and isEnabled = '1' \";\r\n }\r\n $data = $this->db->getSingleRow($query);\r\n\r\n if($data['UserName'] == '' || $data['UserName'] == null)\r\n {\r\n $this->session->load('verified_userID', $result['UserID']);\r\n }\r\n else\r\n {\r\n if($DBCONFIG->dbType==\"Oracle\"){\r\n $query = \" update MapClientUser set \\\"isVerified\\\" = 'Y' where \\\"ID\\\" = {$result['ID']} \";\r\n }else{\r\n $query = \" update MapClientUser set isVerified = 'Y' where ID = {$result['ID']} \";\r\n }\r\n $this->db->execute($query);\r\n }\r\n $this->registry->instName = $result['OrganizationName'];\r\n return $data;\r\n }",
"public function testProductAPIProductCertificateAccordanceTypes()\n {\n\n }",
"public function getLegalStatus();",
"function opcion__generar_cert()\n\t{\t\t\n\t\t$parametros = $this->get_parametros();\n\t\t//Creo el directorio para el servicio web\n\t\t$proyecto = $this->get_proyecto();\n\t\t$dir_instalacion = $proyecto->get_dir_instalacion_proyecto();\t\t\n\t\tif (toba_modelo_servicio_web::existe_archivo_certificado($proyecto) && ! isset($parametros['-r'])) {\n\t\t\t$this->consola->error(\"Ya existe la clave privada del proyecto en '$dir_instalacion/privada.key'. Para sobreescribirla indique el parametro -r\");\n\t\t\tdie;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\ttoba_modelo_servicio_web::generar_certificados($proyecto, $dir_instalacion);\n\t\t\t$this->consola->mensaje(\"Ok. Certificado publico generado en:\");\n\t\t\t$this->consola->mensaje(\"$dir_instalacion/publica.crt\");\t\t\t\t\n\t\t} catch (toba_error_usuario $e) {\n\t\t\t$this->consola->mensaje('Se ha producido un error durante el proceso', true);\n\t\t\t$this->consola->error($e->getMessage());\n\t\t}\n\t}",
"public function run()\n {\n Certificate::create\n ([\n 'title' => 'RHCSA',\n 'year_of_certification' => 2020,\n 'institution' => 'Red Hat',\n 'validity_period' => '5 years',\n 'candidate_id' => 1\n ]);\n }",
"public function addCertificationStatusLog(\\CertificationStatusLog $certStatusLog){\n $this->certificationStatusLog[] = $certStatusLog;\n $certStatusLog->setParentSite($this);\n }",
"public function actCertificates($mode){\r\n\t\t$mode = strtoupper($mode);\r\n\t\tswitch($mode){\r\n\t\t\tcase \"I\":\r\n\t\t\t\t$Sql = \"INSERT INTO rs_tbl_certificates(\r\n\t\t\t\t\t\t\tcertificate_id,\r\n\t\t\t\t\t\t\tposotion_id,\r\n\t\t\t\t\t\t\tcertificate_name,\r\n\t\t\t\t\t\t\tis_active)\r\n\t\t\t\t\t\tVALUES(\";\r\n\t\t\t\t$Sql .= $this->isPropertySet(\"certificate_id\", \"V\") ? $this->getProperty(\"certificate_id\") : \"NULL\";\r\n\t\t\t\t$Sql .= \",\";\r\n\t\t\t\t$Sql .= $this->isPropertySet(\"posotion_id\", \"V\") ? \"'\" . $this->getProperty(\"posotion_id\") . \"'\" : \"NULL\";\r\n\t\t\t\t$Sql .= \",\";\r\n\t\t\t\t$Sql .= $this->isPropertySet(\"certificate_name\", \"V\") ? \"'\" . $this->getProperty(\"certificate_name\") . \"'\" : \"NULL\";\r\n\t\t\t\t$Sql .= \",\";\r\n\t\t\t\t$Sql .= $this->isPropertySet(\"is_active\", \"V\") ? \"'\" . $this->getProperty(\"is_active\") . \"'\" : \"NULL\";\r\n\t\t\t\t$Sql .= \")\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"U\":\r\n\t\t\t\t$Sql = \"UPDATE rs_tbl_certificates SET \";\r\n\t\t\t\t\r\n\t\t\t\tif($this->isPropertySet(\"certificate_name\", \"K\")){\r\n\t\t\t\t\t$Sql .= \"$cat certificate_name='\" . $this->getProperty(\"certificate_name\") . \"'\";\r\n\t\t\t\t\t$cat = \",\";\r\n\t\t\t\t}\t\r\n\t\t\t\tif($this->isPropertySet(\"posotion_id\", \"K\")){\r\n\t\t\t\t\t$Sql .= \"$cat posotion_id='\" . $this->getProperty(\"posotion_id\") . \"'\";\r\n\t\t\t\t\t$cat = \",\";\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\tif($this->isPropertySet(\"is_active\", \"K\")){\r\n\t\t\t\t\t$Sql .= \"$cat is_active='\" . $this->getProperty(\"is_active\") . \"'\";\r\n\t\t\t\t\t$cat = \",\";\r\n\t\t\t\t}\r\n\t\t\t\t$Sql .= \" WHERE 1=1\";\r\n\t\t\t\t$Sql .= \" AND certificate_id=\" . $this->getProperty(\"certificate_id\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"D\":\r\n\t\t\t\t$Sql = \"DELETE FROM rs_tbl_certificates \r\n\t\t\t\t\t\t WHERE 1=1\";\r\n\t\t\t\tif($this->isPropertySet(\"certificate_id\", \"K\")){\r\n\t\t\t\t\t$Sql .= \" AND certificate_id=\" . $this->getProperty(\"certificate_id\");\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $this->dbQuery($Sql);\r\n\t}",
"function get_certificate()\n {\n clearos_profile(__METHOD__, __LINE__);\n }",
"public function setSigningCertificateUpdateStatus($val)\n {\n $this->_propDict[\"signingCertificateUpdateStatus\"] = $val;\n return $this;\n }",
"function certificate() {\n\t\t$result=$this->loadModel('certificate','populateDropDown');\n\t\t$this->loadView ( \"header\" );\n\t\t$this->loadView ( \"user_header\" );\n\t\t$this->loadView ( \"user_examiner_view/deshboard_menu\" );\n\t\t$this->loadView ( \"user_examiner_view/manageCertificate\",$result );\n\t}",
"private function sendC2CEscrowCheckReq($ssl_flag = ALLAT_SSL_USE){\n $atData = $this->builder->make();\n $atText = $this->C2CEscrowCheckReq($atData, $ssl_flag);\n $this->response = $atText;\n return $this;\n }",
"public function createAction()\n {\n if($this->request->isPost())\n {\n $hosts=str_replace(\"\\r\", '', $this->request->getPost('hosts'));\n $data = array(\n 'request' => array(\n 'hosts' => explode(PHP_EOL,$hosts),\n 'names' => array(array(\n 'O' => $this->request->getPost('O'),\n 'OU' => $this->request->getPost('OU'),\n 'L' => $this->request->getPost('L'),\n 'C' => $this->request->getPost('C')\n )),\n 'key' => array(\n 'algo' => $this->request->getPost('algo'),\n 'size' => (int)$this->request->getPost('keysize')\n ),\n 'CN' => $this->request->getPost('CN')\n ),\n 'profile' => $this->request->getPost('profile')\n );\n $resp = $this->createCertificate($data);\n if($resp[\"success\"] == true)\n {\n $this->flash->success(\"Certificate created successfully!\");\n $this->flash->notice(\"Please save your Private-Key because it is not saved in the database. If you loose it the certificate needs to be revoked.\");\n echo '<div class=\"input-group \">\n <textarea rows=\"30\" class=\"form-control\" disabled>'.$resp[\"result\"][\"private_key\"].'</textarea>\n </div>';\n $certs = Certificates::findFirst([\n \"pem = :pem:\",\n \"bind\" => [\n \"pem\" => $resp[\"result\"][\"certificate\"]\n ]\n ]);\n return $this->dispatcher->forward([\n \"action\" => \"show\",\n \"params\" => [\n 'serial_number' => $certs->serial_number\n ]\n ]);\n }\n else {\n $this->flash->error($resp[\"errors\"][0][\"message\"]);\n }\n }\n $this->view->form = new CertificateCreateForm();\n }",
"public function setVerified($id)\n\t{\n\t$changeStatus=\\DB::table('associate')->where('Assoc_ID', $id)->update(array('Assoc_Status'=>4));\n\t$resp=array($status);\n\treturn $resp;\n\t}",
"public function update(Request $request, Certification $certification)\n {\n //\n $all = $request->all();\n\n if($all['status'] == 1){\n event(new Notice($certification->user_id,[],Lib_config::NOTIFICATION_TYPE_IDENTITY));\n }\n $int = $certification->update($all);\n\n if (!$int) return ajaxError('更新失败' );\n return ajaxSuccess();\n }"
] | [
"0.59915847",
"0.5703377",
"0.55535847",
"0.5504554",
"0.544612",
"0.5383949",
"0.5381351",
"0.53600186",
"0.53132933",
"0.53120595",
"0.530244",
"0.5296478",
"0.52710205",
"0.5246679",
"0.5228606",
"0.5212559",
"0.5206171",
"0.51833355",
"0.51832515",
"0.5166873",
"0.5163669",
"0.51631874",
"0.51601046",
"0.5158065",
"0.5136495",
"0.5090789",
"0.5070084",
"0.5045406",
"0.50350785",
"0.5015579"
] | 0.6202009 | 0 |
converts associated array to URL Query String | function array2url($arr){
if (!is_array($arr)){
return false;
}
$query = '';
foreach($arr as $key => $value){
$query .= $key . "=" . $value . "&";
}
return $query;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function toQueryString(&$array) {\n return http_build_query($array);\n }",
"public static function fromArrayToQueryString(array $arr) {\n return http_build_query($arr);\n }",
"function array2qs($array, $urlencode=false) {\n\n $qs_ar=array();\n foreach($array as $k=>$v) {\n if(is_array($v)) {\n //dump($v);\n } else if($k && strlen($v)) {\n $qs_ar[] = \"$k=\".rawurlencode($v);\n }\n }\n $glue = $urlencode ? \"&\" : \"&\";\n return implode($glue, $qs_ar);\n}",
"public function makeQueryString($array) {\n\t\tif (!is_array($array)) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$queryString = '';\n\t\tforeach ($array as $key => $val) {\n\t\t\t$queryString .= \"{$key}={$val}&\";\n\t\t}\n\n\t\treturn rtrim($queryString, '&');\n\t}",
"protected function _generate_query_data( array $array ) {\n\n $query_array = array();\n foreach ( $array as $key => $key_value ) {\n $query_array[] = urlencode( $key ) . '=' . urlencode( $key_value );\n }\n\n return join( '&', $query_array );\n }",
"function http_build_query($array)\n{\n\tarray_walk($array, create_function('&$val,$key', 'urlencode($key).\"=\".urlencode($val);'));\n\treturn implode('&', $array);\n}",
"private function arrayToQueryString(array $vars){\n\t\t$query = '';\n\t\tforeach($vars as $k => $v){\n\t\t\t$query .= urlencode($k) . '=' . urlencode($v) . '&';\n\t\t}\n\n\t\treturn rtrim($query, '&');\n\t}",
"public static function ArrayToGet($array) {\n $return = '';\n \n foreach ($array as $key => $value) {\n if (is_array($value)) {\n foreach ($value as $subKey => $subValue) {\n $return .= '&' . urlencode($key) . '[' . urlencode($subKey) . ']=' . urlencode($subValue);\n }\n } else {\n $return .= '&' . urlencode($key) . '=' . urlencode($value);\n }\n }\n \n return $return;\n }",
"function arr2qstring($arr) {\n foreach (array_keys($arr) as $key)\n $str .= \"&$key=\" . urlencode($arr[$key]);\n return $str;\n}",
"public function generateUrlQuery()\n {\n $url = '';\n $keyArray = array_keys($this->params);\n for($i = 0; $i < count($keyArray);$i++){\n $url = $url . $keyArray[$i] . \"=\" . urlencode($this->params[$keyArray[$i]]);\n if($i != count($keyArray)-1){\n $url = $url . \"&\";\n }\n }\n\n return $url;\n }",
"protected function arrayToUrlRequest(array $array) {\n $requestVariables = [];\n foreach($array as $key => $value) {\n $requestVariables[] = \"$key=$value\";\n }\n\n return '?' . implode('&', $requestVariables);\n }",
"public function getParametersAsUrl()\n {\n $params = array();\n foreach ($this->getParameters() as $name=>$value) {\n $params[] = $name.'='.urlencode($value);\n }\n return implode('&', $params);\n }",
"protected function buildUrl() {\n return http_build_query($this->params);\n }",
"static public function arrayToQueryString(array $data, $delimiter = '&', $urlencoded = false)\n {\n $queryString = '';\n $delimiterLength = strlen($delimiter);\n\n // Parse each value pairs and concate to query string\n foreach ($data as $name => $value)\n { \n // Apply urlencode if it is required\n if ($urlencoded)\n {\n $value = urlencode($value);\n }\n $queryString .= $name . '=' . $value . $delimiter;\n }\n\n // remove the last delimiter\n return substr($queryString, 0, -1 * $delimiterLength);\n }",
"private function getArrayUrl() {\n $this->post = array_key_exists('POST', $_SESSION) ? unserialize($_SESSION['POST']) : null;\n $this->get = array_key_exists('GET', $_SESSION) ? unserialize($_SESSION['GET']) : null;\n \n foreach ($this->gets as $key => $value) {\n //$this->gets[$key] = utf8_decode(urldecode($value));\n $value = is_array($value) ? $value : urldecode($value);\n $this->gets[$key] = $value;\n }\n \n if (is_array($this->post) && count($this->post) >= 1) {\n $key++;\n foreach ($this->post as $keyPost => $value) {\n $this->gets[$key++] = urldecode($keyPost);\n $value = is_array($value) ? $value : urldecode($value);\n $this->gets[$key++] = $value;\n }\n }\n \n if (is_array($this->get) && count($this->get) >= 1) {\n $key++;\n foreach ($this->get as $keyPost => $value) {\n $this->gets[$key++] = urldecode($keyPost);\n $value = is_array($value) ? $value : urldecode($value);\n $this->gets[$key++] = $value;\n }\n }\n return $this->gets;\n }",
"protected function buildQueryParams() {\n $params = array(\n 'Action' => $this->ActionName,\n 'ResponseGroup' => $this->ResponseGroupName,\n 'AWSAccessKeyId' => $this->accessKeyId,\n 'Timestamp' => self::getTimestamp(),\n 'Count' => $this->NumReturn,\n 'Start' => $this->StartNum,\n 'SignatureVersion' => self::$SigVersion,\n 'SignatureMethod' => self::$HashAlgorithm,\n 'Url' => $this->site\n );\n if (isset($this->countryCode)) {\n $params['CountryCode'] = $this->countryCode;\n }\n ksort($params);\n $keyvalue = array();\n foreach($params as $k => $v) {\n $keyvalue[] = $k . '=' . rawurlencode($v);\n }\n return implode('&',$keyvalue);\n }",
"protected function get_query($arr)\n {\n $query = array();\n if (@count($arr) > 0 && is_array($arr)) {\n foreach ($arr as $k => $v) {\n $k = ($k == 'response_type') ? 'output' : $k;\n array_push($query, \"$k=$v\");\n }\n return '&' . implode('&', $query);\n }\n }",
"public function getQueryString(array $array)\n { // which means it does not include the ?\n $salt = mt_rand(100000000, 999999999);\n $stringToHash = $salt . http_build_query($array);\n $crypt = hash('sha512', $stringToHash);\n $qs = $salt . $crypt . base64_encode( http_build_query($array) );\n return $qs;\n }",
"function my_build_query($items) {\n\t$query = array();\n\tforeach ($items as $key => $value) {\n\t\tif ($value === null)\n\t\t\t$query[] = urlencode($key);\n\t\telse\n\t\t\t$query[] = urlencode($key).\"=\".urlencode($value);\n\t}\n\treturn implode(\"&\", $query);\n}",
"function get_query_string($params = array()){\n\t$arr = array();\n\tforeach ($params as $key => $val){\n\t $arr[] = urlencode($key).\"=\".urlencode($val);\n\t}\n\treturn implode($arr, \"&\");\n}",
"function assoc_to_uri($array){\n\t\t\t$temp = array();\n\t\t\tforeach ((array)$array as $key => $val){\n\t\t\t\t$temp[] = $key;\n\t\t\t\t$temp[] = $val;\n\t\t\t}\n\t\n\t\t\treturn implode('/', $temp);\n\t\t}",
"public function getQueryString()\n {\n if (empty($this->params)) {\n return '';\n }\n\n $result = array();\n\n foreach ($this->params as $param) {\n if ($param['name'] and $param['value']) {\n $result[$param['name']] = $param['value'];\n }\n }\n\n return http_build_query($result);\n }",
"function array_envia($array) { \n\t \t\t$tmp = serialize($array); \n \t\t\t$tmp = urlencode($tmp); \n\t \t\treturn $tmp; \n\t\t\t}",
"public function getQueryString()\n\t{\n\t\treturn http_build_query($this->query);\n\t}",
"private function buildUrlFieldArray()\n {\n return $this->buildWithCampaignPostingParams();\n }",
"public static function getQueryString()\n\t{\n\t\t$a = func_get_args();\n\t\tif (sizeof($a) == 1) {\n\t\t\tlist($arr) = $a;\n\t\t} else {\n\t\t\tRequest::storeQueryParams();\n\t\t\t$arr = Request::$QUERY_PARAMS;\n\t\t}\n\t\treturn is_scalar($arr) ? $arr : http_build_query($arr);\n\t}",
"public static function array2params($array,$prefix=null){\n\t\tif(!$array){\n\t\t\treturn '';\n\t\t}\n\t\t$data = \"\";\n\t\tforeach($array as $key => $val){\n\t\t\t$fullKey = $prefix ? \"{$prefix}[$key]\" : $key;\n\n\t\t\tif(is_array($val)){\n\t\t\t\t$data .= self::array2params($val, $fullKey);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data .= '&' . urlEncode($fullKey) . '=' . urlEncode($val);\n\t\t\t}\n\t\t}\n\t\treturn $data[0]==\"&\" ? substr($data,1) : $data;\n\t}",
"function url_encode(array $values) {\r\n\treturn http_build_query($values);\r\n }",
"public function assocToUri($array)\n\t{\n\t\t$temp = array();\n\t\tforeach ((array)$array as $key => $val){\n\t\t\t$temp[] = $key;\n\t\t\t$temp[] = $val;\n\t\t}\n\t\n\t\treturn implode('/', $temp);\n\t}",
"function getQueryParams(){\n\t\treturn array_merge($this->set_arr, $this->where_arr);\n\t}"
] | [
"0.76845706",
"0.72676384",
"0.7144945",
"0.7080887",
"0.7048009",
"0.70134985",
"0.70061797",
"0.6953446",
"0.6933316",
"0.6898335",
"0.6847758",
"0.67316294",
"0.65878886",
"0.6510991",
"0.6451152",
"0.6436101",
"0.6423692",
"0.63989025",
"0.6384947",
"0.6383672",
"0.6314593",
"0.62922657",
"0.62922513",
"0.62897444",
"0.6269503",
"0.62693673",
"0.62419283",
"0.6239377",
"0.62180406",
"0.6207903"
] | 0.75761974 | 1 |
Build attributes Attributes are added in order of importance, least to greatest: 1. Filtered on the passed filter string 2. Option 'element_attributes' passed through Menu::show() 3. Attributes set by user in menu admin | protected function buildAttributes($object, $args, $filter, $option, $defaults = array())
{
$filteredAttributes = apply_filters($filter, array(), $object, $args);
$optionAttributes = (array) $args[$option];
$attributes = array_merge_recursive($filteredAttributes, $optionAttributes, $defaults);
$attributes = array_filter($attributes);
// Flatten attributes
foreach ($attributes as $key => $value)
{
if (is_array($value))
$attributes[$key] = implode(' ', $value);
}
return $this->menu->htmlAttributes($attributes);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function op_attributes( $attributes = array(), $filter = null ) {\n\treturn new \\OptionsPlus\\Markup\\Attributes( $attributes, $filter );\n}",
"protected function filterAttributes($attributes)\n {\n if(count($attributes) && strpos($attributes[0], '=')){\n $this->attributes = shortcode_atts($this->defaultAttributes, $attributes);\n }else{\n //Merge the Attributes with the defaults.\n $this->attributes = array_merge($this->defaultAttributes, $attributes);\n }\n //Pluck the template setting from the attributes.\n if (isset($this->attributes['template'])) {\n $this->template = $this->attributes['template'];\n unset($this->attributes['template']);\n }\n\n //Pluck the pagination setting from the attributes.\n if (isset($this->attributes['pagination'])) {\n $this->shouldRenderPagination = $this->attributes['pagination'];\n unset($this->attributes['pagination']);\n }\n\n //Parse and Map the Attributes to WpQuery args.\n foreach ($this->attributes as $key => $value) {\n\n\n //Remove empty values.\n if(empty($value)){\n unset($this->attributes[$key]);\n continue;\n }\n\n //Use input map if required.\n if(isset($this->inputMap[$key])){\n unset($this->attributes[$key]);\n $this->attributes[$this->inputMap[$key]] = $value;\n }\n else{\n //Use argument as it is.\n $this->attributes[$key] = $value;\n }\n }\n\n }",
"private function ProcessAttributes() {\n\t\t$csvilog = JRequest::getVar('csvilog');\n\t\t/* Check if the attributes is to be added */\n\t\tif ($this->attributes) {\n\t\t\t$csvfields = JRequest::getVar('csv_fields');\n\t\t\t$csvilog->AddMessage('debug', JText::_('DEBUG_ADDING_ATTRIBUTES'));\n\t\t\t$attributes = explode( \"|\", $this->attributes );\n\t\t\t$i = 0;\n\t\t\twhile(list(,$val) = each($attributes)) {\n\t\t\t\t$values = explode( \"::\", $val );\n\t\t\t\tif (count($values) == 2) {\n\t\t\t\t\t/* Fix the array to show the correct names to bind the data */\n\t\t\t\t\t$this->_vm_product_attribute_sku->bind(array('product_id' => $this->product_id, 'attribute_name' => $values[0], 'attribute_list' => $values[1]));\n\t\t\t\t\t/* Store the data */\n\t\t\t\t\t$this->_vm_product_attribute_sku->store();\n\t\t\t\t\t$csvilog->AddMessage('debug', JText::_('DEBUG_STORE_ATTRIBUTE'), true);\n\t\t\t\t\t/* Clean for new insert */\n\t\t\t\t\t$this->_vm_product_attribute_sku->reset();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$csvilog->AddMessage('debug', JText::_('DEBUG_ATTRIBUTE_INCORRECT'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected function _createAttributes()\r\n\t{\r\n\t\t$attributeData = array(\r\n\t\t\t'is_global' => '1',\r\n\t\t\t'frontend_input' => 'select',\r\n\t\t\t'is_visible_on_front' => '1',\r\n\t\t\t'is_configurable' => '1',\r\n\t\t\t'backend_type' => 'int',\r\n\t\t\t'is_user_defined' => '1',\r\n\t\t);\r\n\r\n\t\t$entityTypeID = Mage::getModel('eav/entity')->setType('catalog_product')->getTypeId();\r\n\t\t$attributeSet = Mage::getModel('eav/entity_attribute_set')\r\n\t\t\t->getCollection()\r\n\t\t\t->addFieldToFilter('entity_type_id', $entityTypeID)\r\n\t\t\t->getFirstItem();\r\n\r\n\t\t$attributes = array();\r\n\r\n\t\tfor ($i = 1; $i <= 3; $i++)\r\n\t\t{\r\n\t\t\t$attribute = Mage::getModel('catalog/resource_eav_attribute');\r\n\t\t\t$attribute->addData($attributeData);\r\n\t\t\t$attribute->setFrontendLabel('Test Attribute #' . $i);\r\n\t\t\t$attribute->setAttributeCode('test_attr_' . $i);\r\n\t\t\t$attribute->setEntityTypeId($entityTypeID);\r\n\t\t\t$attribute->setAttributeSetId($attributeSet->getId());\r\n\t\t\t$attribute->save();\r\n\r\n\t\t\t$this->save('product/configurable_attribute_' . $i, $attribute->getId());\r\n\r\n\t\t\t$setup = new Mage_Eav_Model_Entity_Setup('core_setup');\r\n\t\t\t$setup->addAttributeOption(array(\r\n\t\t\t\t'attribute_id' => $attribute->getId(),\r\n\t\t\t\t'value' => array(\r\n\t\t\t\t\t'test_value_1' => array('Test Option #1'),\r\n\t\t\t\t),\r\n\t\t\t));\r\n\r\n\t\t\t// Assign attribute to set group\r\n\t\t\t$setup->addAttributeToGroup(\r\n\t\t\t\t$entityTypeID,\r\n\t\t\t\t$attributeSet->getId(),\r\n\t\t\t\t'General',\r\n\t\t\t\t$attribute->getId()\r\n\t\t\t);\r\n\r\n\t\t\t$attributes[] = $attribute;\r\n\t\t}\r\n\r\n\t\treturn $attributes;\r\n\t}",
"protected function buildFilters() {\n\t\t// filter to be displayed as link\n\t\t$filterLabels = [];\n\t\tforeach ( [ 'featured', 'unreviewed' ] as $filter ) {\n\t\t\t$count = ArticleFeedbackv5Model::getCount( $filter, $this->pageId );\n\n\t\t\t// Give grep a chance to find the usages:\n\t\t\t// articlefeedbackv5-special-filter-featured, articlefeedbackv5-special-filter-unreviewed\n\t\t\t$filterLabels[$filter] =\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t[\n\t\t\t\t\t\t'href' => '#',\n\t\t\t\t\t\t'id' => \"articleFeedbackv5-special-filter-$filter\",\n\t\t\t\t\t\t'class' => 'articleFeedbackv5-filter-link' . ( $this->startingFilter == $filter ? ' filter-active' : '' )\n\t\t\t\t\t],\n\t\t\t\t\t$this->msg( \"articlefeedbackv5-special-filter-$filter\" )\n\t\t\t\t\t\t->numParams( $count )\n\t\t\t\t\t\t->escaped()\n\t\t\t\t);\n\t\t}\n\n\t\t// filters to be displayed in dropdown (only for editors)\n\t\t$filterSelectHtml = '';\n\t\tif ( $this->isAllowed( 'aft-editor' ) ) {\n\t\t\t$opts = [];\n\n\t\t\t// Give grep a chance to find the usages:\n\t\t\t// articlefeedbackv5-special-filter-featured, rticlefeedbackv5-special-filter-unreviewed,\n\t\t\t// articlefeedbackv5-special-filter-helpful, articlefeedbackv5-special-filter-unhelpful,\n\t\t\t// articlefeedbackv5-special-filter-flagged, articlefeedbackv5-special-filter-useful,\n\t\t\t// articlefeedbackv5-special-filter-resolved, articlefeedbackv5-special-filter-noaction,\n\t\t\t// articlefeedbackv5-special-filter-inappropriate, articlefeedbackv5-special-filter-archived,\n\t\t\t// articlefeedbackv5-special-filter-allcomment, articlefeedbackv5-special-filter-hidden,\n\t\t\t// articlefeedbackv5-special-filter-requested, articlefeedbackv5-special-filter-declined,\n\t\t\t// articlefeedbackv5-special-filter-oversighted,\n\t\t\t// articlefeedbackv5-special-filter-all\n\t\t\tforeach ( $this->filters as $filter ) {\n\t\t\t\tif ( isset( $filterLabels[$filter] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$count = ArticleFeedbackv5Model::getCount( $filter, $this->pageId );\n\n\t\t\t\t$key = $this->msg( \"articlefeedbackv5-special-filter-$filter\" )\n\t\t\t\t\t\t->numParams( $count )\n\t\t\t\t\t\t->text();\n\t\t\t\t$opts[(string)$key] = $filter;\n\t\t\t}\n\n\t\t\tif ( count( $opts ) > 0 ) {\n\t\t\t\t// Put the \"more filters\" option at the beginning of the opts array\n\t\t\t\t$opts = [ $this->msg( 'articlefeedbackv5-special-filter-select-more' )->text() => '' ] + $opts;\n\n\t\t\t\t$filterSelect = new XmlSelect( false, 'articleFeedbackv5-filter-select' );\n\t\t\t\t$filterSelect->setDefault( $this->startingFilter );\n\t\t\t\t$filterSelect->addOptions( $opts );\n\t\t\t\t$filterSelectHtml = $filterSelect->getHTML();\n\t\t\t}\n\t\t}\n\n\t\treturn Html::rawElement(\n\t\t\t\t'div',\n\t\t\t\t[ 'id' => 'articleFeedbackv5-filter' ],\n\t\t\t\timplode( ' ', $filterLabels ) .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t[ 'id' => 'articleFeedbackv5-select-wrapper' ],\n\t\t\t\t\t$filterSelectHtml\n\t\t\t\t)\n\t\t\t);\n\t}",
"public function buildFilters()\n {\n $this->addFilter('name', new StringFilterType('name'), 'kuma_user.group.adminlist.filter.name');\n }",
"function my_nav_menu_attribs( $atts, $item, $args ) {\n\t\t$atts['data-toggle'] = 'collapse';\n\t\t$atts['data-target'] = '.navbar-collapse';\n\t\t\n\t\t// Set the menu ID\n\t\t$menu_link = 486;\n\t\t// Conditionally match the ID and add the attribute and value\n\t\tif ( $item->ID == $menu_link ) {\n\t\t\t$atts['data-toggle'] = 'modal';\n\t\t\t$atts['data-target'] = '#modal-reservations';\n\t\t}\n\t\t\n\t\t//Return the new attribute\n\t\treturn $atts;\n\t}",
"public function buildFilters()\n {\n $this->addFilter('code', new ORM\\StringFilterType('code'), 'Code du fichier',array(), true);\n $this->addFilter('filename', new ORM\\StringFilterType('filename'), 'Nom du fichier',array(), true);\n }",
"static function getAttributesInfo ()\n {\n return array(\n 'main' => array(\n 'name' => _('FAI settings'),\n 'attrs' => array(\n new HiddenAttribute ('FAIstate'),\n new CompositeAttribute (\n _('FAI profil and release to be applied to this computer'),\n 'FAIclass',\n array(\n 'release' => new FAIreleaseAttribute (\n _('Release'), _('FAI debian release to be installed on this computer'),\n 'FAIrelease', TRUE\n ),\n 'profil' => new SelectAttribute (\n _('Profil'), _('FAI profil to be applied to this computer'),\n 'FAIprofile', TRUE\n ),\n ),\n '/^(?P<profil>.+) :(?P<release>.+)$/',\n '%2$s :%1$s'\n ),\n new SelectAttribute (\n _('Repository'), _('FAI Debian repository to be used for installation'),\n 'FAIdebianMirror', TRUE\n ),\n )\n ),\n );\n }",
"private function _add_filters() {\n\t\t\tadd_filter('wp_setup_nav_menu_item', array($this, 'add_custom_options'));\n\n\t\t\t# Update custom menu options\n\t\t\tadd_action('wp_update_nav_menu_item', array($this, 'update_custom_options'), 10, 3);\n\n\t\t\t# Set edit menu walker\n\t\t\tadd_filter('wp_edit_nav_menu_walker', array($this, 'apply_edit_walker_class'), 10, 2);\n\t\t\t\n\t\t\t# Addition style\n\t\t\t//add_action('admin_enqueue_scripts', array( $this, 'add_menu_css' ));\n\t\t\t\n\t\t\t# Addition js\n\t\t\t//add_action('admin_head-nav-menus.php', array( $this, 'add_menu_js' ));\n\n\t\t\t# Mega menu javascript\n//\t\t\tadd_action('admin_print_footer_scripts', array( $this, 'add_mega_menu_javascript' ), 80);\n\t\t\tadd_action('admin_enqueue_scripts', array( $this, 'dfd_mega_menu_admin_scripts' ), 80);\n\t\t}",
"public function attr() {\n\n\t\t\t\t$attr = fusion_builder_visibility_atts(\n\t\t\t\t\t$this->args['hide_on_mobile'],\n\t\t\t\t\t[\n\t\t\t\t\t\t'class' => 'fusion-woo-featured-products-slider fusion-woo-slider',\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\tif ( $this->args['class'] ) {\n\t\t\t\t\t$attr['class'] .= ' ' . $this->args['class'];\n\t\t\t\t}\n\n\t\t\t\tif ( $this->args['id'] ) {\n\t\t\t\t\t$attr['id'] = $this->args['id'];\n\t\t\t\t}\n\n\t\t\t\treturn $attr;\n\n\t\t\t}",
"private function build_html_tag_attributes() {\n\t\t$attributes = [];\n\n\t\tif ( function_exists( 'is_rtl' ) && is_rtl() ) {\n\t\t\t$attributes['dir'] = 'rtl';\n\t\t}\n\n\t\t$lang = get_bloginfo( 'language' );\n\t\tif ( $lang ) {\n\t\t\t$attributes['lang'] = $lang;\n\t\t}\n\n\t\t$this->add_data_by_key( 'html_tag_attributes', $attributes );\n\t}",
"static function getAttributesInfo ()\n {\n return array(\n 'section1' => array(\n 'name' => _('Proxy account'),\n 'template' => get_template_path('proxyAccount.tpl', TRUE, dirname(__FILE__)),\n 'class' => array('fullwidth'),\n\n 'attrs' => array (\n new BooleanAttribute(\n _('Filter unwanted content (i.e. pornographic or violence related)'), // Label of the attribute\n _('filterF'), // Description\n 'gosaProxyAcctFlags', // LDAP name\n FALSE, // Mandatory\n FALSE // default value\n ),\n new workingTime (\n _('Working Start'),\n 'gosaProxyWorkingStart',\n array (\n new SelectAttribute ( '', _('HourStart'), 'hourstart', TRUE, array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24), 1, array('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24')),\n new SelectAttribute ( ':', _('MinuteStart'), 'minutestart', TRUE, array('00','15','30','45'))\n ),\n '', // read format (not used)\n '', // write format (not used)\n '', // acl\n _('Limit proxy access to working time')\n ),\n new workingTime (\n _('Working Stop'),\n 'gosaProxyWorkingStop',\n array (\n new SelectAttribute ( _('-'), _('HourStart'), 'hourstop', TRUE, array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24), 1, array('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24')),\n new SelectAttribute ( _(':'), _('MinuteStop'), 'minutestop', TRUE, array('00','15','30','45'))\n ),\n '',\n ''\n ),\n new CompositeAttribute (\n _('Restrict proxy usage by quota'),\n 'gosaProxyQuota',\n array(\n new IntAttribute ('', _('Up'), 'quota_size', FALSE, 0, FALSE, 21),\n new SelectAttribute ('', '', 'quota_unit', FALSE, array('k','m','g'), '', array('KB','MB','GB')),\n ),\n '/^(\\\\d+)(.)$/',\n '%d%s',\n '', // acl\n _('Restrict proxy usage by quota')\n ),\n new SelectAttribute (\n _('per'),\n _('per'),\n 'gosaProxyQuotaPeriod',\n FALSE,\n array ('h','d','w','m'), \"\", array (_(\"hour\"),_(\"day\"),_(\"week\"),_(\"month\"))\n ),\n new BooleanAttribute (\n _('Start Working Hours'),\n _('Starting hours for internet access'),\n 'enableWorkingTime',\n FALSE,\n FALSE, // default value\n 'gosaProxyWorkingStart' // acl\n ),\n new BooleanAttribute (\n _('Proxy Quota'),\n _('Max Data quota for the proxy'),\n 'enableQuota',\n FALSE,\n FALSE, // default value\n 'gosaProxyQuota' // acl\n )\n )\n )\n );\n }",
"protected function _getFilterableAttributes()\n {\n \t$res = Mage::registry('ea_result');\n \tif ($res != null){\n\t $attributes = $this->getData('_filterable_attributes');\n\t if (is_null($attributes)) {\n\t $attributes = $this->getLayer()->getFilterableAttributes();\n\t $this->setData('_filterable_attributes', $attributes);\n\t }\n\t\n\t return $attributes;\n \t} else {\n \t\treturn parent::_getFilterableAttributes();\n \t}\n }",
"public static function getClickableFilterElements() {\n $items = Filter::getFilteredItems();\n $result = array();\n foreach( $items AS $item ) {\n if ($item->brand_alias) {\n $result[$item->id]['brand'][] = $item->brand_alias;\n }\n if ($item->model_alias) {\n $result[$item->id]['model'][] = $item->model_alias;\n }\n if ($item->size_alias) {\n $result[$item->id]['size'][] = $item->size_alias;\n }\n if ($item->size_alias) {\n $result[$item->id]['available'][] = $item->available;\n }\n if ($item->cost) {\n $result[$item->id]['cost'][] = $item->cost;\n }\n if($item->specification_value_alias AND $item->specification_alias) {\n $result[$item->id][$item->specification_alias][] = $item->specification_value_alias;\n }\n }\n foreach ($result as $key => $value) {\n foreach ($value as $_key => $val) {\n $result[$key][$_key] = array_unique($result[$key][$_key]);\n }\n }\n $filter = conf::get('filter_array');\n $params = array();\n $costs = array();\n $sortable = conf::get('sortable');\n foreach ($result as $item_id => $item) {\n $costs[] = $item['cost'][0];\n foreach ($sortable as $sort) {\n $filtered = 0;\n $f = $filter;\n if( isset($f[$sort]) ) {\n unset($f[$sort]);\n }\n if( $f ) {\n foreach ($f as $key => $value) {\n if( !isset($item[$key]) AND !in_array($key, array('min_cost', 'max_cost')) ) {\n $filtered = 1;\n } else {\n switch ($key) {\n case 'min_cost':\n if( $item['cost'][0] < $value[0] ) {\n $filtered = 1;\n }\n break;\n case 'max_cost':\n if( $item['cost'][0] > $value[0] ) {\n $filtered = 1;\n }\n break;\n default:\n $flag = 0;\n foreach ($item[$key] AS $element) {\n if( in_array($element, $value) ) {\n $flag = 1;\n }\n }\n if( !$flag ) {\n $filtered = 1;\n }\n break;\n }\n }\n }\n }\n if( !$filtered AND isset($item[$sort]) ) {\n foreach ($item[$sort] AS $value) {\n $params[$sort][] = $value;\n }\n }\n }\n }\n foreach ($params as $key => $value) {\n $params[$key] = array_unique($value);\n }\n //newdie($params);\n $min = 999999;\n $max = 0;\n foreach ($costs as $cost) {\n if ($cost < $min) {\n $min = $cost;\n }\n if ($cost > $max) {\n $max = $cost;\n }\n }\n return array(\n 'filter' => $params,\n 'min' => $min,\n 'max' => $max,\n );\n }",
"function adventure_tours_render_product_attributes( $args = array(), $postId = null ) {\n\t\tglobal $product;\n\n\t\t$curProduct = $postId ? wc_get_product( $postId ) : $product;\n\n\t\t$list = AtTourHelper::get_tour_details_attributes( $curProduct, true );\n\t\tif ( ! $list ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$defaults = array(\n\t\t\t'before' => '',\n\t\t\t'after' => '',\n\t\t\t'before_each' => '',\n\t\t\t'after_each' => '',\n\t\t\t'limit' => 5,\n\t\t\t'values_limit' => 0,\n\t\t);\n\n\t\t$args = wp_parse_args( $args, $defaults );\n\n\t\t$values_limit = $args['values_limit'] > 0 ? $args['values_limit'] : 0;\n\n\t\t$items_html = '';\n\t\tforeach ( $list as $attribute ) {\n\t\t\t$values_text = $values_limit > 0 && count( $attribute['values'] ) > $values_limit ? join( ', ', array_slice( $attribute['values'], 0, $values_limit ) ) : $attribute['text'];\n\t\t\t$items_html .= $args['before_each'] .\n\t\t\t\t'<div class=\"item-attributes__item__content\">' .\n\t\t\t\t\t( $attribute['icon_class'] ? '<div class=\"item-attributes__item__content__item\"><i class=\"' . esc_attr( $attribute['icon_class'] ) . '\"></i></div>' : '' ) .\n\t\t\t\t\t'<div class=\"item-attributes__item__content__item item-attributes__item__content__item--text\"><span>' . $values_text . '</span></div>' .\n\t\t\t\t'</div>' .\n\t\t\t$args['after_each'];\n\n\t\t\tif ( $args['limit'] > 0 ) {\n\t\t\t\t$args['limit']--;\n\t\t\t\tif ( $args['limit'] < 1 ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprintf( '%s%s%s',\n\t\t\t$args['before'],\n\t\t\t$items_html,\n\t\t\t$args['after']\n\t\t);\n\t}",
"protected function defineAttributes() {\n $this->addString('supplierId', true);\n $this->addString('warehouseId', true);\n }",
"public function attr() {\n\n\t\t\t\t$attr = fusion_builder_visibility_atts(\n\t\t\t\t\t$this->args['hide_on_mobile'],\n\t\t\t\t\t[\n\t\t\t\t\t\t'class' => 'fusion-social-links',\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\tif ( $this->args['class'] ) {\n\t\t\t\t\t$attr['class'] .= ' ' . $this->args['class'];\n\t\t\t\t}\n\n\t\t\t\tif ( $this->args['id'] ) {\n\t\t\t\t\t$attr['id'] = $this->args['id'];\n\t\t\t\t}\n\n\t\t\t\treturn $attr;\n\n\t\t\t}",
"public function initFilters() {\n\t\tforeach($this->table->getFilters() as $oneFilter) {\n\t\t\t$createFilter = true;\n\t\t\t\n// \t\t\t$modelName = $oneFilter->getModelName();\n// \t\t\tif(!empty($modelName)) {\n// \t\t\t\t$model = \\rk\\model\\manager::get($modelName);\n\t\t\t\t\n// \t\t\t\tif($model->getPK() == $oneFilter->getAttributeName()) {\t// no filter for PKs\n// \t\t\t\t\t$createFilter = false;\n// \t\t\t\t}\n// \t\t\t}\n\t\t\t\n\t\t\tif($createFilter) {\n\t\t\t\tlist($fieldName, $type, $widgetParams) = $this->computeOptionsForTableFilter($oneFilter);\n\t\n\t\t\t\tswitch($type) {\n\t\t\t\t\tcase 'ignore':\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'hidden':\n\t\t\t\t\t\t$this->addWidgets(array(new \\rk\\form\\widget\\hidden($fieldName, $widgetParams)));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'integer':\n\t\t\t\t\t\t$this->addWidgets(array(new \\rk\\form\\widget\\integer($fieldName, $widgetParams)));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tcase 'datetime':\n\t\t\t\t\tcase 'date':\n\t\t\t\t\t\t$this->addWidgets(array(new \\rk\\form\\widget\\date($fieldName, $widgetParams)));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'textCombo':\n\t\t\t\t\tcase 'richtext':\n\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t$this->addWidgets(array(new \\rk\\form\\widget\\text($fieldName, $widgetParams)));\n\t\t\t\t\tbreak;\n\t\n\t\t\t\t\tcase 'boolean':\n\t\t\t\t\t\t$this->addWidgets(array(new \\rk\\form\\widget\\checkbox($fieldName, $widgetParams)));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'enum':\n\t\t\t\t\tcase 'select':\n\t\t\t\t\t\t$this->addWidgets(array(new \\rk\\form\\widget\\select($fieldName, $widgetParams)));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new \\rk\\exception('unknown attribute type ' . $type);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private function _attributes() {\n\t\t\t$return = array();\n\t\t\t$onsubmit = false;\n\t\t\tforeach($this->attributes as $key => $value):\n\t\t\t\tif($key === 'data' && is_array($value)) foreach($value as $k => $v) $return[] = 'data-'.$k.'=\"'.htmlentities(\n\t\t\t\t\t\t\t\tis_array($v)\n\t\t\t\t\t\t\t\t\t?join(';',$v)\n\t\t\t\t\t\t\t\t\t:$v,ENT_QUOTES,'UTF-8',false).'\"';\n\t\t\t\telse $return[] = $key.'=\"'.htmlentities(\n\t\t\t\t\t\t\tis_array($value)\n\t\t\t\t\t\t\t\t?join(' ',$value)\n\t\t\t\t\t\t\t\t:$value,ENT_QUOTES,'UTF-8',false).'\"';\n\t\t\t\tif($key === 'onsubmit') $onsubmit = true;\n\t\t\tendforeach;\n\t\t\tif($this->tag === 'form' && !$onsubmit && in_array(USER_BROWSER,array('ie','ie6'))) $return[] = 'onsubmit=\";var d=document.documentElement;if(d.onsubmit){return d.onsubmit(event);}else{return Event.fire(d,\\'submit\\',event);}\"';\n\t\t\treturn ((count($return))\n\t\t\t\t?' '.join(' ',$return)\n\t\t\t\t:false);\n\t\t}",
"public function attributeWidgets()\n {\n //dd($this->slug);\n return array(\n array('source','textField'),\n array('fixed','boolean'),\n //array('ru','boolean'),\n //array('uk','boolean'),\n //array('lang','dropDownList'),\n //array('name_en','textField'),\n //array('text_en','tinyArea'),\n array('text_ru','tinyArea'),\n //array('text_uk','tinyArea'),\n array('name_ru','textField'),\n //array('name_uk','textField'),\n array('teaser_ru','textArea'),\n array('teaser_uk','textArea'),\n array('preview_source','image'),\n //array('category_id', 'dropDownList'),\n array('categories', 'checkboxes'),\n //array('type_id', 'dropDownList'),\n array('status','dropDownList'),\n array('hot','boolean'),\n //array('blog','boolean'),\n array('author_id', 'predefined'),\n array('slug', 'textField'),\n array('create_time', 'calendar', array(\n 'decode_rule' => 'date',\n )),\n );\n }",
"public function addFilterAttributes($storeId = Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID)\n {\n foreach (Mage::helper('aw_layerednavigation/attribute')->getFilterAttributes() as $attributeCode) {\n $defaultStoreAlias = $attributeCode . '_ds';\n $currentStoreAlias = $attributeCode . '_cs';\n $this->getSelect()\n ->joinLeft(\n array($defaultStoreAlias => $this->getTable('aw_layerednavigation/filter_eav')),\n \"main_table.entity_id = {$defaultStoreAlias}.filter_id AND\n {$defaultStoreAlias}.name = '{$attributeCode}' AND\n {$defaultStoreAlias}.store_id = \" . (int)Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID,\n array()\n )\n ->joinLeft(\n array($currentStoreAlias => $this->getTable('aw_layerednavigation/filter_eav')),\n \"main_table.entity_id = {$currentStoreAlias}.filter_id\n AND {$currentStoreAlias}.name = '{$attributeCode}'\n AND {$currentStoreAlias}.name = {$defaultStoreAlias}.name\n AND {$currentStoreAlias}.store_id = {$storeId}\",\n array($attributeCode => \"IFNULL({$currentStoreAlias}.value, {$defaultStoreAlias}.value)\")\n )\n ;\n }\n return $this;\n }",
"private function get_attributes() {\n\t\t$this->html = null;\n\t\n\t\tif(is_array($this->attributes)) {\n\t\t\tforeach ($this->attributes as $key=>$val) {\n\t\t\t\t$this->html .= ' '.$key.'=\"'.$val.'\"';\n\t\t\t}\n\t\t} else {\n\t\t\t$this->html .= ' '.$this->attributes;\n\t\t}\n\t\n\t\treturn $this->html;\n\t}",
"public function attributes()\n {\n return $this->menu && ($menuType = $this->menu->typeInstance()) ? $menuType->paramsAttributes : [];\n }",
"public function execute() {\n /**\n * Get Attribute set id and current product id\n */\n $attributeSetId = $this->getRequest ()->getParam ( 'attribute_set_id' );\n $currentProductId = $this->getRequest ()->getParam ( 'current_product_id' );\n \n /**\n * Create instance for object manager\n */\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n \n /**\n * Prepare current product attributes\n */\n $selectedAttributes = array ();\n if ($currentProductId) {\n $product = $objectManager->get ( 'Magento\\Catalog\\Model\\Product' )->load ( $currentProductId );\n if ($product->getTypeId () == 'configurable') {\n $configurableAttributes = $product->getTypeInstance ( true )->getConfigurableAttributesAsArray ( $product );\n foreach ( $configurableAttributes as $configurableAttribute ) {\n $selectedAttributes [] = $configurableAttribute ['attribute_id'];\n }\n }\n }\n \n /**\n * Product Types\n */\n $types = [ \n \\Magento\\Catalog\\Model\\Product\\Type::TYPE_SIMPLE,\n \\Magento\\Catalog\\Model\\Product\\Type::TYPE_VIRTUAL,\n \\Magento\\ConfigurableProduct\\Model\\Product\\Type\\Configurable::TYPE_CODE \n ];\n \n $attributes = $objectManager->get ( 'Magento\\ConfigurableProduct\\Model\\ConfigurableAttributeHandler' )->getApplicableAttributes ();\n $attributes->addFieldToFilter ( 'entity_type_id', $attributeSetId );\n \n /**\n * Prepare select attribute content\n */\n echo '<ul>';\n foreach ( $attributes as $attribute ) {\n /**\n * Checking for configurable attribute or not\n */\n if (! $attribute->getApplyTo () || count ( array_diff ( $types, $attribute->getApplyTo () ) ) === 0) {\n $checked = '';\n if (count ( $selectedAttributes ) > 0 && in_array ( $attribute->getAttributeId (), $selectedAttributes )) {\n $checked = 'checked onclick=\"return false;\" onkeydown=\"return false;\"';\n }\n echo '<li><input id=\"' . $attribute->getAttributeCode () . '\" ' . $checked . ' name=\"attributes[' . $attribute->getAttributeCode () . ']\" value=\"' . $attribute->getFrontendLabel () . '\"\n title=\"' . $attribute->getFrontendLabel () . '\" \n class=\"attribute-checkbox validate-one-required-by-name\" type=\"checkbox\">';\n echo '<input type=\"hidden\" name=\"attribute_ids[' . $attribute->getAttributeCode () . ']\" value=\"' . $attribute->getAttributeId () . '\" />';\n \n echo '<label for=\"' . $attribute->getAttributeCode () . '\">' . $attribute->getFrontendLabel () . '</label></li>';\n }\n }\n echo '</ul>';\n }",
"public function apply(\\Magento\\Framework\\App\\RequestInterface $request)\n {\n $attributeValues = $request->getParam($this->_requestVar);\n\n if (empty($attributeValues)) {\n return $this;\n }\n $attribute = $this->getAttributeModel();\n\n\n $newAttributeValues = [];\n foreach($attributeValues as $key => $attributeValue){\n //Modify index of filter array to give it 'text keys', so that it gets added to the product collection\n // filters properly\n $newAttributeValues[$attribute->getAttributeCode().'_'.$key] = intval($attributeValue);\n $label = $this->getOptionText($attributeValue);\n $this->getLayer()\n ->getState()\n ->addFilter($this->_createItem($label, $attributeValue));\n }\n\n /** @var \\Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection $productCollection */\n $productCollection = $this->getLayer()\n ->getProductCollection();\n $productCollection->addFieldToFilter($attribute->getAttributeCode(), $newAttributeValues);\n //$this->setItems([]); // set items to disable show filtering\n return $this;\n }",
"protected function buildToXmlAttributes()\n {\n\n $html = '';\n\n if (!isset($this->attributes['id']))\n $this->attributes['id'] = 'wgtitem_'.uniqid();\n\n $html .= ' id=\"'.$this->attributes['id'].'\" ';\n\n if (isset($this->attributes['value']))\n $html .= ' value=\"'.$this->attributes['value'].'\" ';\n\n if (isset($this->attributes['title']))\n $html .= 'title=\"'.$this->attributes['title'].'\" ';\n\n return $html;\n\n }",
"public function findProducts(Request $request)\n {\n\n //Info principal - Products en country y category\n $cat = Category::find($request->category);\n $prods = $cat->productsInCountry($request->country);\n \n\n //Arma data para menu builder ORIGINAL\n // $productAtts = Product_Attribute::where('attribute_id', '123123123123')->get();\n $productAtts=$this->plucker($prods);\n // return response()->json(['mandaste'=>$productAtts]);\n\n // Hace el query para buscar productos que cumplan con attributes\n if ($request->filterAtts) {\n foreach (json_decode($request->filterAtts, TRUE) as $key => $value) {\n if ($value != 'null') {\n $prods = $prods->whereHas('attributes', function($q) use($key, $value){\n $q->where('attribute_id', '=', $key)->where('value_es', '=', $value);\n });\n }\n }\n //Arma data para menu builder SHOW\n $productAttsShow=$this->plucker($prods);\n foreach ($productAtts as $key => $values) {\n foreach ($values as $v) {\n if (isset($productAttsShow[$key])) {\n foreach ($productAttsShow[$key] as $vs) {\n if ($v->value_es==$vs->value_es) {\n $v->disabled=false;\n $v->show=true;\n }\n if ($v->value_es!==$vs->value_es && !$v->show) {\n $v->disabled=true;\n }\n }\n }else {\n $v->disabled=true;\n }\n }\n }\n }\n //Arma el menu con la data que le pasamos\n $menuObj = new \\stdClass;\n $menuObj->attributes = [] ;\n //\n foreach ($productAtts as $key => $values) {\n $prAtt= Product_Attribute::where('attribute_id', $key)->first()->attribute;\n if ($prAtt->filterable=='1') {\n $menuObj->attributes[$key] =$prAtt;\n $col=collect();\n foreach ($values as $v) {\n $col->add($v);\n }\n // $col->orderBy('value');\n $menuObj->attributes[$key]->uniqueValues=$col;\n }\n }\n\n //response con todo lo necesario\n return response()->json([\n 'products'=>$prods->with('files', 'attributes.attribute')->paginate(16),\n 'menuData'=>$menuObj\n ]);\n\n }",
"public function attr() {\n\n\t\t\t\t$attr = fusion_builder_visibility_atts(\n\t\t\t\t\t$this->args['hide_on_mobile'],\n\t\t\t\t\t[\n\t\t\t\t\t\t'class' => 'fusion-separator',\n\t\t\t\t\t\t'style' => '',\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\tif ( ! $this->args['width'] || '100%' === $this->args['width'] ) {\n\t\t\t\t\t$attr['class'] .= ' fusion-full-width-sep';\n\t\t\t\t}\n\n\t\t\t\t$styles = explode( '|', $this->args['style_type'] );\n\n\t\t\t\tif ( ! in_array( 'none', $styles, true ) && ! in_array( 'single', $styles, true ) && ! in_array( 'double', $styles, true ) && ! in_array( 'shadow', $styles, true ) ) {\n\t\t\t\t\t$styles[] .= 'single';\n\t\t\t\t}\n\n\t\t\t\tforeach ( $styles as $style ) {\n\t\t\t\t\t$attr['class'] .= ' sep-' . $style;\n\t\t\t\t}\n\n\t\t\t\tif ( $this->args['sep_color'] ) {\n\t\t\t\t\tif ( 'shadow' === $this->args['style_type'] ) {\n\n\t\t\t\t\t\t$shadow = 'background:radial-gradient(ellipse at 50% -50% , ' . $this->args['sep_color'] . ' 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);';\n\n\t\t\t\t\t\t$attr['style'] = $shadow;\n\t\t\t\t\t\t$attr['style'] .= str_replace( 'radial-gradient', '-webkit-radial-gradient', $shadow );\n\t\t\t\t\t\t$attr['style'] .= str_replace( 'radial-gradient', '-moz-radial-gradient', $shadow );\n\t\t\t\t\t\t$attr['style'] .= str_replace( 'radial-gradient', '-o-radial-gradient', $shadow );\n\t\t\t\t\t} elseif ( 'none' !== $this->args['style_type'] ) {\n\n\t\t\t\t\t\t$attr['style'] = 'border-color:' . $this->args['sep_color'] . ';';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( in_array( 'single', $styles, true ) ) {\n\t\t\t\t\t$attr['style'] .= 'border-top-width:' . $this->args['border_size'] . ';';\n\t\t\t\t}\n\n\t\t\t\tif ( in_array( 'double', $styles, true ) ) {\n\t\t\t\t\t$attr['style'] .= 'border-top-width:' . $this->args['border_size'] . ';border-bottom-width:' . $this->args['border_size'] . ';';\n\t\t\t\t}\n\n\t\t\t\tif ( 'center' === $this->args['alignment'] ) {\n\t\t\t\t\t$attr['style'] .= 'margin-left: auto;margin-right: auto;';\n\t\t\t\t} elseif ( 'right' === $this->args['alignment'] ) {\n\t\t\t\t\t$attr['style'] .= 'float:right;';\n\t\t\t\t\t$attr['class'] .= ' fusion-clearfix';\n\t\t\t\t}\n\n\t\t\t\t$attr['style'] .= 'margin-top:' . $this->args['top_margin'] . ';';\n\n\t\t\t\tif ( $this->args['bottom_margin'] ) {\n\t\t\t\t\t$attr['style'] .= 'margin-bottom:' . $this->args['bottom_margin'] . ';';\n\t\t\t\t}\n\n\t\t\t\tif ( $this->args['width'] ) {\n\t\t\t\t\t$attr['style'] .= 'width:100%;max-width:' . $this->args['width'] . ';';\n\t\t\t\t}\n\n\t\t\t\tif ( $this->args['class'] ) {\n\t\t\t\t\t$attr['class'] .= ' ' . $this->args['class'];\n\t\t\t\t}\n\n\t\t\t\tif ( $this->args['id'] ) {\n\t\t\t\t\t$attr['id'] = $this->args['id'];\n\t\t\t\t}\n\n\t\t\t\treturn $attr;\n\n\t\t\t}",
"protected function filterAttribute($attributeSet) \n {\t\n $newSet = array();\n \n // process attributes\n for($i = 0; $i <count($attributeSet); $i++) \n {\n // skip blank spaces in tag\n if(!$attributeSet[$i]) \n {\n continue; \n }\n \n // split into attr name and value\n $attrSubSet = explode('=', trim($attributeSet[$i]));\n list($attrSubSet[0]) = explode(' ', $attrSubSet[0]);\n \n // removes all \"non-regular\" attr names AND also attr blacklisted\n if ((!preg_match(\"/^[a-z]*$/i\", $attrSubSet[0])) || (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), \n $this->attributesBlackList)) || (substr($attrSubSet[0], 0, 2) == 'on')))) \n {\n continue;\n }\n \n // xss attr value filtering\n if($attrSubSet[1]) \n {\n // strips unicode, hex, etc\n $attrSubSet[1] = str_replace('&#', '', $attrSubSet[1]);\n \n // strip normal newline within attr value\n $attrSubSet[1] = preg_replace('/\\s+/', '', $attrSubSet[1]);\n \n // strip double quotes\n $attrSubSet[1] = str_replace('\"', '', $attrSubSet[1]);\n \n // [requested feature] convert single quotes from either side to doubles (Single quotes shouldn't be used to pad attr value)\n if ((substr($attrSubSet[1], 0, 1) == \"'\") && (substr($attrSubSet[1], (strlen($attrSubSet[1]) - 1), 1) == \"'\")) \n {\n $attrSubSet[1] = substr($attrSubSet[1], 1, (strlen($attrSubSet[1]) - 2));\n }\n \n // strip slashes\n $attrSubSet[1] = stripslashes($attrSubSet[1]);\n }\n \n // auto strip attr's with \"javascript:\n if(((strpos(strtolower($attrSubSet[1]), 'expression') !== false) && (strtolower($attrSubSet[0]) == 'style')) \n || (strpos(strtolower($attrSubSet[1]), 'javascript:') !== false)\n || (strpos(strtolower($attrSubSet[1]), 'behaviour:') !== false) \n || (strpos(strtolower($attrSubSet[1]), 'vbscript:') !== false) \n || (strpos(strtolower($attrSubSet[1]), 'mocha:') !== false)\n || (strpos(strtolower($attrSubSet[1]), 'livescript:') !== false) \n ) continue;\n \n // if matches user defined array\n $attrFound = in_array(strtolower($attrSubSet[0]), $this->attributesArray);\n \n // keep this attr on condition\n if((!$attrFound && $this->attributesMethod) || ($attrFound && !$this->attributesMethod))\n {\n // attr has value\n if($attrSubSet[1]) \n {\n $newSet[] = $attrSubSet[0] . '=\"' . $attrSubSet[1] . '\"';\n }\n \n // attr has decimal zero as value\n elseif($attrSubSet[1] == \"0\") \n {\n $newSet[] = $attrSubSet[0] . '=\"0\"';\n } \n \n // reformat single attributes to XHTML\n else \n {\n $newSet[] = $attrSubSet[0] . '=\"' . $attrSubSet[0] . '\"';\n }\n }\t\n }\n return $newSet;\n }"
] | [
"0.61602753",
"0.6040649",
"0.60200745",
"0.58573604",
"0.57955325",
"0.5769586",
"0.5721424",
"0.5702278",
"0.5666146",
"0.5665439",
"0.56454647",
"0.56395525",
"0.5632141",
"0.5621486",
"0.55516803",
"0.5518822",
"0.55142933",
"0.55128354",
"0.54960495",
"0.5495302",
"0.5480081",
"0.54790753",
"0.5466148",
"0.54372513",
"0.5427755",
"0.54174453",
"0.5404544",
"0.5396582",
"0.5376531",
"0.5355829"
] | 0.650709 | 0 |
22 Ambil information gain max untuk diproses pada fungsi loopingMiningC45() | function getInfGainMax($atribut, $nilai_atribut)
{
$con = @mysqli_connect('localhost', 'root', '', 'db_ai');
if (!$con) {
echo "Error: " . mysqli_connect_error();
exit();
}
// select inf gain max
$sqlInfGainMaxAtribut = mysqli_query($con,"SELECT distinct atribut FROM mining_c45 WHERE gain_ratio in (SELECT max(gain_ratio) FROM `mining_c45`) LIMIT 1");
while($rowInfGainMaxAtribut = mysqli_fetch_assoc($sqlInfGainMaxAtribut)) {
$inf_gain_max_atribut = "$rowInfGainMaxAtribut[atribut]";
if (empty($atribut) AND empty($nilai_atribut)) {
// jika atribut kosong, proses atribut dgn inf gain max pada fungsi loopingMiningC45()
loopingMiningC45($inf_gain_max_atribut);
} else if (!empty($atribut) AND !empty($nilai_atribut)) {
// jika atribut tdk kosong, maka update diproses = sudah pada tabel pohon_keputusan_c45
mysqli_query($con,"UPDATE pohon_keputusan_c45 SET diproses = 'Sudah' WHERE nilai_atribut = '$nilai_atribut'");
// proses atribut dgn inf gain max pada fungsi loopingMiningC45()
loopingMiningC45($inf_gain_max_atribut);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function miningC45($atribut, $nilai_atribut)\n{\n perhitunganC45($atribut, $nilai_atribut);\n insertAtributPohonKeputusan($atribut, $nilai_atribut);\n getInfGainMax($atribut, $nilai_atribut);\n replaceNull();\n}",
"public function hitungBiaya(){\n //\n if(null === $this->currentGCost){\n $this->currentGCost = 0;\n }\n\n //counting fValue\n foreach($this->nextNodeID as $next){\n echo 'calc f of ' . $next . PHP_EOL;\n $dest = \\App\\Models\\kota::find($next);\n $gcost = \\App\\Models\\real::where('idKotaTujuan',$next)->where('idKotaAsal',$this->currentEval)->pluck('gCost');\n $hcost = $dest->hCost->hCost;\n $this->fValue[$next] = ($this->currentGCost + $gcost) + $hcost;\n }\n }",
"function mpgain() {\n \n global $userrow, $fightrow;\n $userrow[\"currentmp\"] += $userrow[\"mpgain\"];\n if ($userrow[\"currentmp\"] > $userrow[\"maxmp\"]) { $userrow[\"currentmp\"] = $userrow[\"maxmp\"]; }\n \n}",
"function loopingMiningC45($inf_gain_max_atribut) \n{\n $con = @mysqli_connect('localhost', 'root', '', 'db_ai');\n\nif (!$con) {\n echo \"Error: \" . mysqli_connect_error();\n exit();\n}\n $sqlBelumAdaKeputusanLagi = mysqli_query($con,\"SELECT * FROM pohon_keputusan_c45 WHERE keputusan = '?' and diproses = 'Belum' AND atribut = '$inf_gain_max_atribut'\");\n while($rowBelumAdaKeputusanLagi = mysqli_fetch_assoc($sqlBelumAdaKeputusanLagi)) {\n if ($rowBelumAdaKeputusanLagi['id_parent'] == 0) {\n populateAtribut();\n }\n $atribut = \"$rowBelumAdaKeputusanLagi[atribut]\";\n $nilai_atribut = \"$rowBelumAdaKeputusanLagi[nilai_atribut]\";\n $kondisiAtribut = \"AND $atribut = \\'$nilai_atribut\\'\";\n mysqli_query($con,\"TRUNCATE mining_c45\");\n mysqli_query($con,\"DELETE FROM atribut WHERE atribut = '$inf_gain_max_atribut'\");\n miningC45($atribut, $nilai_atribut);\n populateAtribut();\n }\n}",
"function insertAtributPohonKeputusan($atribut, $nilai_atribut)\n{\n $perhitunganPessimisticChildIncrement = 0;\n$keputusanPrePruning = null;\n $con = @mysqli_connect('localhost', 'root', '', 'db_ai');\n\nif (!$con) {\n echo \"Error: \" . mysqli_connect_error();\n exit();\n}\n // ambil nilai inf gain tertinggi dimana hanya 1 atribut saja yg dipilih\n $sqlInfGainMaxTemp = mysqli_query($con,\"SELECT distinct atribut, gain_ratio FROM mining_c45 WHERE gain_ratio in (SELECT max(gain_ratio) FROM `mining_c45`) LIMIT 1\");\n $rowInfGainMaxTemp = mysqli_fetch_assoc($sqlInfGainMaxTemp);\n // hanya ambil atribut dimana jumlah kasus totalnya tidak kosong\n if ($rowInfGainMaxTemp['gain_ratio'] > 0) {\n // ambil nilai atribut yang memiliki nilai inf gain max\n $sqlInfGainMax = mysqli_query($con,\"SELECT * FROM mining_c45 WHERE atribut = '$rowInfGainMaxTemp[atribut]'\");\n while($rowInfGainMax = mysqli_fetch_assoc($sqlInfGainMax)) {\n if ($rowInfGainMax['jml_yes'] == 0 AND $rowInfGainMax['jml_no'] == 0) {\n $keputusan = 'Kosong'; // jika jml_yes = 0 dan jml_no = 0, maka keputusan Null\n } else if ($rowInfGainMax['jml_yes'] !== 0 AND $rowInfGainMax['jml_no'] == 0) {\n $keputusan = '>50k'; // jika jml_yes != 0 dan jml_no = 0, maka keputusan Layak\n } else if ($rowInfGainMax['jml_yes'] == 0 AND $rowInfGainMax['jml_no'] !== 0) {\n $keputusan = '<=50k'; // jika jml_yes = 0 dan jml_no != 0, maka keputusan Tidak Layak\n } else {\n $keputusan = '?'; // jika jml_yes != 0 dan jml_no != 0, maka keputusan ?\n }\n \n if (empty($atribut) AND empty($nilai_atribut)) {\n//#18# Jika atribut yang diinput kosong (atribut awal) maka insert ke pohon keputusan id_parent = 0\n // set kondisi atribut = AND atribut = nilai atribut\n $kondisiAtribut = \"AND $rowInfGainMax[atribut] = ~$rowInfGainMax[nilai_atribut]~\";\n // insert ke tabel pohon keputusan\n mysqli_query($con,\"INSERT INTO pohon_keputusan_c45 VALUES ('', '$rowInfGainMax[atribut]', '$rowInfGainMax[nilai_atribut]', 0, '$rowInfGainMax[jml_yes]', '$rowInfGainMax[jml_no]', '$keputusan', 'Belum', '$kondisiAtribut', 'Belum')\");\n }\n\n//#19# Jika atribut yang diinput tidak kosong maka insert ke pohon keputusan dimana id_parent diambil dari tabel pohon keputusan sebelumnya (where atribut = atribut yang diinput)\n else if (!empty($atribut) AND !empty($nilai_atribut)) {\n $sqlIdParent = mysqli_query($con,\"SELECT id, atribut, nilai_atribut, jml_yes, jml_no FROM pohon_keputusan_c45 WHERE atribut = '$atribut' AND nilai_atribut = '$nilai_atribut' order by id DESC LIMIT 1\");\n while($rowIdParent = mysqli_fetch_assoc($sqlIdParent)) {\n // insert ke tabel pohon keputusan\n $tess= mysqli_query($con,\"INSERT INTO pohon_keputusan_c45 VALUES ('', '$rowInfGainMax[atribut]', '$rowInfGainMax[nilai_atribut]', $rowIdParent[id], '$rowInfGainMax[jml_yes]', '$rowInfGainMax[jml_no]', '$keputusan', 'Belum', '', 'Belum')\");\n \n //#PRE PRUNING (dokumentasi -> http://id3-c45.xp3.biz/dokumentasi/Decision-Tree.10.11.ppt)#\n // hitung Pessimistic error rate parent dan child \n $perhitunganParentPrePruning = loopingPerhitunganPrePruning($rowIdParent['jml_yes'], $rowIdParent['jml_no']);\n\n $perhitunganChildPrePruning = loopingPerhitunganPrePruning($rowInfGainMax['jml_yes'], $rowInfGainMax['jml_no']);\n \n // hitung average Pessimistic error rate child \n $perhitunganPessimisticChild = (($rowInfGainMax['jml_yes'] + $rowInfGainMax['jml_no']) / ($rowIdParent['jml_yes'] + $rowIdParent['jml_no'])) * $perhitunganChildPrePruning;\n // Increment average Pessimistic error rate child\n\n $perhitunganPessimisticChildIncrement += $perhitunganPessimisticChild;\n $perhitunganPessimisticChildIncrement = round($perhitunganPessimisticChildIncrement, 4);\n \n // jika error rate pada child lebih besar dari error rate parent\n if ($perhitunganPessimisticChildIncrement > $perhitunganParentPrePruning) {\n // hapus child (child tidak diinginkan)\n mysqli_query($con,\"DELETE FROM pohon_keputusan_c45 WHERE id_parent = $rowIdParent[id]\");\n \n // jika jml kasus layak lbh besar, maka keputusan == layak\n if ($rowIdParent['jml_yes'] > $rowIdParent['jml_no']) {\n $keputusanPrePruning = '>50k';\n // jika jml tdk kasus layak lbh besar, maka keputusan == tdk layak\n } else if ($rowIdParent['jml_yes'] < $rowIdParent['jml_no']) {\n $keputusanPrePruning = '<=50k';\n }\n // update keputusan parent\n mysqli_query($con,\"UPDATE pohon_keputusan_c45 SET keputusan = '$keputusanPrePruning' where id = $rowIdParent[id]\");\n }\n }\n }\n }\n }\n loopingKondisiAtribut();\n}",
"function clo_attain_single($course_id,$clo,$parameter,$roll_no,$conn){\r\n // Find Grade Component Weightages\r\n\t$mid_weight = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT mid_weight FROM courses_info WHERE course_id='$course_id'\"))['mid_weight'];\r\n\t$final_weight = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT final_weight FROM courses_info WHERE course_id='$course_id'\"))['final_weight'];\r\n\t$quiz_weight = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT quiz_weight FROM courses_info WHERE course_id='$course_id'\"))['quiz_weight'];\r\n\t$assign_weight = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT assign_weight FROM courses_info WHERE course_id='$course_id'\"))['assign_weight'];\r\n\t$project_weight = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT project_weight FROM courses_info WHERE course_id='$course_id'\"))['project_weight'];\r\n $viva_weight = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT viva_weight FROM courses_info WHERE course_id='$course_id'\"))['viva_weight'];\r\n $presentation_weight = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT presentation_weight FROM courses_info WHERE course_id='$course_id'\"))['presentation_weight'];\r\n\t$other_weight = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT other_weight FROM courses_info WHERE course_id='$course_id'\"))['other_weight'];\r\n $lab_weight = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT lab_weight FROM courses_info WHERE course_id='$course_id'\"))['lab_weight'];\r\n\t\r\n //Fetch total list of CLOs from cols\r\n // Fetch total available cols\r\n $sql_col_list = mysqli_query($conn,\"SHOW COLUMNS FROM $course_id\");\r\n\t$col_list_d = array();\r\n\twhile($col_list = mysqli_fetch_assoc($sql_col_list)){\r\n\t\t$col_list_d[] = $col_list['Field'];\r\n\t}\r\n \r\n\r\n //Find cols of all Grading components\r\n\t// Use col list to find cols of diff grading components\r\n\t$quiz_cols = array();\r\n\t$assign_cols = array();\r\n\t$mid_cols = array();\r\n\t$final_cols = array();\r\n $other_cols = array();\r\n $viva_cols = array();\r\n $presentation_cols = array();\r\n $lab_cols = array();\r\n $project_cols = array();\r\n \r\n $mid_cols_clo = array();\r\n $quiz_cols_clo = array();\r\n $assign_cols_clo = array();\r\n $other_cols_clo = array();\r\n $final_cols_clo = array();\r\n $lab_cols_clo = array();\r\n $viva_cols_clo = array();\r\n $presentation_cols_clo = array();\r\n $project_cols_clo = array();\r\n \r\n $marks_t_all_quiz = 0;\r\n $marks_o_clo_quiz = 0;\r\n $marks_t_clo_quiz = 0;\r\n\t$marks_t_all_assign = 0;\r\n $marks_o_clo_assign = 0;\r\n $marks_t_clo_assign = 0;\r\n\t$marks_t_all_mid = 0;\r\n $marks_o_clo_mid = 0;\r\n $marks_t_clo_mid = 0;\r\n\t$marks_t_all_final = 0;\r\n $marks_o_clo_final = 0;\r\n $marks_t_clo_final = 0;\r\n\t$marks_t_all_lab = 0;\r\n $marks_o_clo_lab = 0;\r\n $marks_t_clo_lab = 0;\r\n\t$marks_t_all_project = 0;\r\n $marks_o_clo_project = 0;\r\n $marks_t_clo_project = 0;\r\n\t$marks_t_all_viva = 0;\r\n $marks_o_clo_viva = 0;\r\n $marks_t_clo_viva = 0;\r\n\t$marks_t_all_presentation = 0;\r\n $marks_o_clo_presentation = 0;\r\n $marks_t_clo_presentation = 0;\r\n\t$marks_t_all_other = 0;\r\n $marks_o_clo_other = 0;\r\n $marks_t_clo_other = 0;\r\n \r\n\tfor ($i=2; $i< count($col_list_d); $i++){ \r\n\t\t$instrument = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id where data_detail='Instrument'\"))[$col_list_d[$i]];\r\n $clo_get = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id where data_detail='CLO'\"))[$col_list_d[$i]];\r\n \r\n\t\tif($instrument=='Quiz'){\r\n $quiz_cols[]=$col_list_d[$i];\r\n $marks_t = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='MaxMarks'\"))[$col_list_d[$i]];\r\n $marks_t_all_quiz += $marks_t;\r\n\t\t\t\r\n if ($clo_get == $clo){\r\n $quiz_cols_clo[] =$col_list_d[$i];\r\n\t\t\t\t$marks_t_clo_quiz += $marks_t;\r\n\t\t\t\t$marks_o = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n\t\t\t\t$marks_o_clo_quiz += $marks_o;\r\n\t\t\t}\r\n }\r\n\t\tif($instrument=='Assignment'){\r\n $assign_cols[]=$col_list_d[$i];\r\n $marks_t = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='MaxMarks'\"))[$col_list_d[$i]];\r\n $marks_t_all_assign += $marks_t;\r\n\t\t\t\r\n if ($clo_get == $clo){\r\n $assign_cols_clo[] =$col_list_d[$i];\r\n\t\t\t\t$marks_t_clo_assign += $marks_t;\r\n\t\t\t\t$marks_o = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n\t\t\t\t$marks_o_clo_assign += $marks_o;\r\n\t\t\t}\r\n }\r\n\t\tif($instrument=='Midterm'){\r\n $mid_cols[]=$col_list_d[$i];\r\n $marks_t = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='MaxMarks'\"))[$col_list_d[$i]];\r\n $marks_t_all_mid += $marks_t;\r\n\t\t\t\r\n if ($clo_get == $clo){\r\n $mid_cols_clo[] =$col_list_d[$i];\r\n\t\t\t\t$marks_t_clo_mid += $marks_t;\r\n\t\t\t\t$marks_o = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n\t\t\t\t$marks_o_clo_mid += $marks_o;\r\n\t\t\t}\r\n }\r\n\t\tif($instrument=='Final'){\r\n $final_cols[]=$col_list_d[$i];\r\n $marks_t = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='MaxMarks'\"))[$col_list_d[$i]];\r\n $marks_t_all_final += $marks_t;\r\n\t\t\t\r\n if ($clo_get == $clo){\r\n $final_cols_clo[] =$col_list_d[$i];\r\n\t\t\t\t$marks_t_clo_final += $marks_t;\r\n\t\t\t\t$marks_o = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n\t\t\t\t$marks_o_clo_final += $marks_o;\r\n\t\t\t}\r\n }\r\n\t\tif($instrument=='Other'){\r\n $other_cols[]=$col_list_d[$i];\r\n $marks_t = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='MaxMarks'\"))[$col_list_d[$i]];\r\n $marks_t_all_other += $marks_t;\r\n\t\t\t\r\n if ($clo_get == $clo){\r\n $other_cols_clo[] =$col_list_d[$i];\r\n $g_type = mysqli_fetch_assoc($conn->query(\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail='g_type'\"))[$col_list_d[$i]];\r\n if ($g_type=='rubric'){\r\n $marks_o_r = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n $marks_o_ra = explode(\":\\^\\:\",$marks_o_r);\r\n $marks_o = $marks_o_ra[count($marks_o_ra)-1];\r\n }\r\n else\r\n $marks_o = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n $marks_t_clo_other += $marks_t;\r\n\t\t\t\t$marks_o_clo_other += $marks_o;\r\n\t\t\t}\r\n }\r\n\t\tif($instrument=='LAB'){\r\n $lab_cols[]=$col_list_d[$i];\r\n $marks_t = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='MaxMarks'\"))[$col_list_d[$i]];\r\n $marks_t_all_lab += $marks_t;\r\n\t\t\t\r\n if ($clo_get == $clo){\r\n $lab_cols_clo[] =$col_list_d[$i];\r\n $g_type = mysqli_fetch_assoc($conn->query(\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail='g_type'\"))[$col_list_d[$i]];\r\n if ($g_type=='rubric'){\r\n $marks_o_r = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n $marks_o_ra = explode(\":\\^\\:\",$marks_o_r);\r\n $marks_o = $marks_o_ra[count($marks_o_ra)-1];\r\n }\r\n else\r\n $marks_o = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n\t\t\t\t$marks_t_clo_lab += $marks_t;\r\n\t\t\t\t$marks_o_clo_lab += $marks_o;\r\n\t\t\t}\r\n }\r\n\t\tif($instrument=='Project'){\r\n $project_cols[]=$col_list_d[$i];\r\n $marks_t = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='MaxMarks'\"))[$col_list_d[$i]];\r\n $marks_t_all_project += $marks_t;\r\n\t\t\t\r\n if ($clo_get == $clo){\r\n $project_cols_clo[] =$col_list_d[$i];\r\n\t\t\t\t$marks_t_clo_project += $marks_t;\r\n\t\t\t\t$marks_o = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n\t\t\t\t$marks_o_clo_project += $marks_o;\r\n\t\t\t}\r\n }\r\n if($instrument=='VIVA'){\r\n $viva_cols[]=$col_list_d[$i];\r\n $marks_t = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='MaxMarks'\"))[$col_list_d[$i]];\r\n $marks_t_all_viva += $marks_t;\r\n\t\t\t\r\n if ($clo_get == $clo){\r\n $viva_cols_clo[] =$col_list_d[$i];\r\n $g_type = mysqli_fetch_assoc($conn->query(\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail='g_type'\"))[$col_list_d[$i]];\r\n if ($g_type=='rubric'){\r\n $marks_o_r = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n $marks_o_ra = explode(\":\\^\\:\",$marks_o_r);\r\n $marks_o = $marks_o_ra[count($marks_o_ra)-1];\r\n }\r\n else\r\n $marks_o = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n\r\n\t\t\t\t$marks_t_clo_viva += $marks_t;\r\n\t\t\t\t$marks_o_clo_viva += $marks_o;\r\n\t\t\t}\r\n }\r\n if($instrument=='Presentation'){\r\n $presentation_cols[]=$col_list_d[$i];\r\n $marks_t = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='MaxMarks'\"))[$col_list_d[$i]];\r\n $marks_t_all_presentation += $marks_t;\r\n\t\t\t\r\n if ($clo_get == $clo){\r\n $presentation_cols_clo[] =$col_list_d[$i];\r\n $g_type = mysqli_fetch_assoc($conn->query(\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail='g_type'\"))[$col_list_d[$i]];\r\n if ($g_type=='rubric'){\r\n $marks_o_r = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n $marks_o_ra = explode(\":\\^\\:\",$marks_o_r);\r\n $marks_o = $marks_o_ra[count($marks_o_ra)-1];\r\n }\r\n else\r\n $marks_o = mysqli_fetch_assoc(mysqli_query($conn,\"SELECT $col_list_d[$i] FROM $course_id WHERE data_detail ='$roll_no'\"))[$col_list_d[$i]];\r\n\r\n\t\t\t\t$marks_t_clo_presentation += $marks_t;\r\n\t\t\t\t$marks_o_clo_presentation += $marks_o;\r\n\t\t\t}\r\n }\r\n }\r\n\t\t\r\n\r\n\t\tif (count($quiz_cols_clo)>0){\r\n\t\t\t$marks_o_clo_quiz = (($marks_o_clo_quiz/$marks_t_clo_quiz)*(($marks_t_clo_quiz/$marks_t_all_quiz)*$quiz_weight));\r\n\t\t\t$marks_t_clo_quiz = ((($marks_t_clo_quiz/$marks_t_all_quiz)*$quiz_weight));\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$marks_o_clo_quiz = 0;\r\n\t\t\t$marks_t_clo_quiz = 0;\r\n\t\t}\r\n\t\tif (count($assign_cols_clo)>0){\r\n\t\t\t$marks_o_clo_assign = (($marks_o_clo_assign/$marks_t_clo_assign)*(($marks_t_clo_assign/$marks_t_all_assign)*$assign_weight));\r\n\t\t\t$marks_t_clo_assign = ((($marks_t_clo_assign/$marks_t_all_assign)*$assign_weight));\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$marks_o_clo_assign = 0;\r\n\t\t}\r\n\t\tif (count($final_cols_clo)>0){\r\n\t\t\t$marks_o_clo_final = (($marks_o_clo_final/$marks_t_clo_final)*(($marks_t_clo_final/$marks_t_all_final)*$final_weight));\r\n\t\t\t$marks_t_clo_final = ((($marks_t_clo_final/$marks_t_all_final)*$final_weight));\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$marks_o_clo_final = 0;\r\n\t\t}\r\n\t\tif (count($mid_cols_clo)>0){\r\n\t\t\t$marks_o_clo_mid = (($marks_o_clo_mid/$marks_t_clo_mid)*(($marks_t_clo_mid/$marks_t_all_mid)*$mid_weight));\r\n\t\t\t$marks_t_clo_mid = ((($marks_t_clo_mid/$marks_t_all_mid)*$mid_weight));\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$marks_o_clo_mid = 0;\r\n\t\t}\r\n\t\tif (count($lab_cols_clo)>0){\r\n\t\t\t$marks_o_clo_lab = (($marks_o_clo_lab/$marks_t_clo_lab)*(($marks_t_clo_lab/$marks_t_all_lab)*$lab_weight));\r\n\t\t\t$marks_t_clo_lab = ((($marks_t_clo_lab/$marks_t_all_lab)*$lab_weight));\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$marks_o_clo_lab = 0;\r\n\t\t}\r\n\t\tif (count($project_cols_clo)>0){\r\n\t\t\t$marks_o_clo_project = (($marks_o_clo_project/$marks_t_clo_project)*(($marks_t_clo_project/$marks_t_all_project)*$project_weight));\r\n\t\t\t$marks_t_clo_project = ((($marks_t_clo_project/$marks_t_all_project)*$project_weight));\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$marks_o_clo_project = 0;\r\n\t\t}\r\n if (count($viva_cols_clo)>0){\r\n\t\t\t$marks_o_clo_viva = (($marks_o_clo_viva/$marks_t_clo_viva)*(($marks_t_clo_viva/$marks_t_all_viva)*$viva_weight));\r\n\t\t\t$marks_t_clo_viva = ((($marks_t_clo_viva/$marks_t_all_viva)*$viva_weight));\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$marks_o_clo_viva = 0;\r\n\t\t}\r\n if (count($presentation_cols_clo)>0){\r\n\t\t\t$marks_o_clo_presentation = (($marks_o_clo_presentation/$marks_t_clo_presentation)*(($marks_t_clo_presentation/$marks_t_all_presentation)*$presentation_weight));\r\n\t\t\t$marks_t_clo_presentation = ((($marks_t_clo_presentation/$marks_t_all_presentation)*$presentation_weight));\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$marks_o_clo_presentation = 0;\r\n\t\t}\r\n\t\tif (count($other_cols_clo)>0){\r\n\t\t\t$marks_o_clo_other = (($marks_o_clo_other/$marks_t_clo_other)*(($marks_t_clo_other/$marks_t_all_other)*$other_weight));\r\n\t\t\t$marks_t_clo_other = ((($marks_t_clo_other/$marks_t_all_other)*$other_weight));\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$marks_o_clo_other = 0;\r\n\t\t}\r\n \r\n $tot_marks_o_clo = $marks_o_clo_quiz+$marks_o_clo_assign+$marks_o_clo_mid+$marks_o_clo_final+$marks_o_clo_other+$marks_o_clo_lab+$marks_o_clo_viva+$marks_o_clo_presentation+$marks_o_clo_project;\r\n \r\n $tot_marks_t_clo = $marks_t_clo_quiz+$marks_t_clo_assign+$marks_t_clo_mid+$marks_t_clo_final+$marks_t_clo_other+$marks_t_clo_lab+$marks_t_clo_viva+$marks_t_clo_presentation+$marks_t_clo_project;\r\n \r\n $tot_percent_o_clo = round(($tot_marks_o_clo/$tot_marks_t_clo)*100,1,PHP_ROUND_HALF_UP);\r\n\r\n \r\n if($parameter == 'Percentage')\r\n return round($tot_percent_o_clo,1,PHP_ROUND_HALF_UP);\r\n\r\n \r\n if($parameter == 'Obtained_Marks')\r\n return round($tot_marks_o_clo,1,PHP_ROUND_HALF_UP);\r\n\r\n if($parameter == 'Total_Marks')\r\n return round($tot_marks_t_clo,1,PHP_ROUND_HALF_UP); \r\n}",
"function hitung(){\n\t// $ipk = $nilaiAkhir / $sks;\n\t// return $ipk;\n\t$nilaiAkhir = $GLOBALS['anilai1']*$GLOBALS['sks1'] + $GLOBALS['anilai2']*$GLOBALS['sks2'] + $GLOBALS['anilai3']*$GLOBALS['sks3'] + $GLOBALS['anilai4']*$GLOBALS['sks4'] + $GLOBALS['anilai5']*$GLOBALS['sks5'] ;\n\t$ipk = $nilaiAkhir / $GLOBALS['sks'];\n\treturn $ipk;\n}",
"function calculatePlates($targetweight, $barbellweight, $plates)\n{\n\n$loadedweights = [];\n$loadedweight = $barbellweight;\n\nforeach ($plates as $plate)\n{\n while ($loadedweight + ($plate*2) <= $targetweight )\n {\n\n array_push($loadedweights, $plate);\n $loadedweight += $plate*2;\n }\n\n}\n\nreturn $loadedweights;\n}",
"public function hitung_luas (){\n Return $this->alas * $this->tinggi;\n }",
"function insertIterasi()\n{\n $con = @mysqli_connect('localhost', 'root', '', 'db_ai');\n\nif (!$con) {\n echo \"Error: \" . mysqli_connect_error();\n exit();\n}\n $sqlInfGainMaxIterasi = mysqli_query($con,\"SELECT distinct atribut, gain_ratio FROM mining_c45 WHERE gain_ratio in (SELECT max(gain_ratio) FROM `mining_c45`) LIMIT 1\");\n $rowInfGainMaxIterasi = mysqli_fetch_assoc($sqlInfGainMaxIterasi);\n // hanya ambil atribut dimana jumlah kasus totalnya tidak kosong\n if ($rowInfGainMaxIterasi['gain_ratio'] > 0) {\n $kondisiAtribut = \"$rowInfGainMaxIterasi[atribut]\";\n $iterasiKe = 1;\n $sqlInsertIterasiC45 = mysqli_query($con,\"SELECT * FROM mining_c45\");\n while($rowInsertIterasiC45 = mysqli_fetch_assoc($sqlInsertIterasiC45)) {\n // insert ke tabel iterasi\n mysqli_query($con,\"INSERT INTO iterasi_c45 VALUES ('', $iterasiKe, '$kondisiAtribut', '$rowInsertIterasiC45[atribut]', '$rowInsertIterasiC45[nilai_atribut]', '$rowInsertIterasiC45[jml_kasus_total]', '$rowInsertIterasiC45[jml_yes]', '$rowInsertIterasiC45[jml_no]', '$rowInsertIterasiC45[entropy]', '$rowInsertIterasiC45[inf_gain]', '$rowInsertIterasiC45[split_info]', '$rowInsertIterasiC45[gain_ratio]')\");\n $iterasiKe++;\n }\n }\n}",
"function xstats_getMineralAccumulated( $gameId, $playerIndex, $mineralIndex ) {\n $mineralName = \"min\".$mineralIndex;\n $accumulatedMineral = 0;\n //get the mineral on planet surface\n $result = @mysql_query(\"SELECT {$mineralName} FROM skrupel_planeten WHERE spiel=$gameId AND besitzer=$playerIndex\") or die(mysql_error());\n while ($row=mysql_fetch_array($result)) {\n $accumulatedMineral = $accumulatedMineral+$row[$mineralName];\n }\n //get onboard mineral\n $result = @mysql_query(\"SELECT fracht_{$mineralName} FROM skrupel_schiffe WHERE spiel=$gameId AND besitzer=$playerIndex\") or die(mysql_error());\n while ($row=mysql_fetch_array($result)) {\n $accumulatedMineral = $accumulatedMineral+$row['fracht_'.$mineralName];\n }\n return( $accumulatedMineral );\n}",
"function $berekening( bedrag percentage jaar){\n static $bedrag ;\n\n if($jaar == 0)\n {\n // bedrag = 100 000 + ( 100 000 * 0.08 ) = 100 000 + 8 000 = 108 000\n $bedrag = $bedrag + ($beginbedrag * $percentage);\n array_push($array, $bedrag);\n }\n else {\n // bedrag = 108 000 + ( 108 000 * 0.08 ) = 108 000 + 8 640 = 116 640\n $bedrag = $bedrag + ($bedrag * $percentage);\n array_push($array, $bedrag);\n }\n\n//$berekening oproepen hier\n\n}",
"function mpleech() {\n \n global $userrow, $fightrow;\n $userrow[\"currentmp\"] += floor(($fightrow[\"playerphysdamage\"]+$fightrow[\"playermagicdamage\"]+$fightrow[\"playerfiredamage\"]+$fightrow[\"playerlightdamage\"]) * ($userrow[\"mpleech\"]/100));\n if ($userrow[\"currentmp\"] > $userrow[\"maxmp\"]) { $userrow[\"currentmp\"] = $userrow[\"maxmp\"]; }\n \n}",
"public function hitungratingkecocokan()\r\n\t{\r\n\t\t$sql=\"select *,max(nilairating) as maxkriteria from ratingkecocokan group by idkriteria\";\r\n\t\t$qmax=$this->db->query($sql);\r\n\t\t//hitung nilai r per kriteria tergantung jenisnya cost atau benefit\r\n\t\tforeach ($qmax->result() as $rekk) {\r\n\t\t\t$sqlk=\"select * from kriteria where idkriteria='\".$rekk->idkriteria.\"'\";\r\n\t\t\t$qk=$this->db->query($sqlk);\r\n\t\t\tforeach ($qk->result() as $rk) {\r\n\t\t\t\t$sqla=\"select * from atribut\";\r\n\t\t\t\t$qa=$this->db->query($sqla);\r\n\t\t\t\tforeach ($qa->result() as $ra) {\r\n\t\t\t\t\tif ($rk->jeniskriteria == '1') {\r\n\t\t\t\t\t\t$sqlr=\"select nilairating/\".$rekk->maxkriteria.\" as nilair from ratingkecocokan where \r\n\t\t\t idkriteria='\".$rekk->idkriteria.\"' and idatribute='\".$ra->idatribute.\"'\";\r\n } else {\r\n\t\t\t\t\t\t$sqlr=\"select \".$rekk->maxkriteria.\"/nilairating\".\" as nilair from ratingkecocokan where \r\n\t\t\t idkriteria='\".$rekk->idkriteria.\"' and idatribute='\".$ra->idatribute.\"'\";\t\r\n\t\t\t }\r\n $qr=$this->db->query($sqlr);$nilair=0;\r\n foreach ($qr->result() as $rr) {\r\n\t\t\t\t\t $bobotnormalisasi=$rk->bobotpreferensi * $rr->nilair;\r\n\t\t\t\t\t $nilair=$rr->nilair;\r\n\t\t\t $sqlri=\"update ratingkecocokan set nilainormalisasi = '\".$nilair.\"' , \r\n\t\t\t\t\t bobotnormalisasi = \".$bobotnormalisasi.\" where \r\n\t\t\t\t\t idkriteria ='\".$rekk->idkriteria.\"' and idatribute='\".$ra->idatribute.\"'\";\r\n\t\t\t $qri=$this->db->query($sqlri);\r\n }\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//hitungnilaipreferensi\r\n\t\t$sqla=\"select * from atribut\";\r\n\t\t$qa=$this->db->query($sqla);\r\n\t\tforeach ($qa->result() as $ra) {\r\n\t\t\t$sqlr=\"select sum(bobotnormalisasi) as nilaipreferensi from ratingkecocokan \r\n\t\t\twhere idatribute='\".$ra->idatribute.\"' group by idatribute\";\r\n\t\t\t$qr=$this->db->query($sqlr);\r\n\t\t\tforeach ($qr->result() as $rr) {\r\n\t\t\t\t$sqlua=\"update atribut set nilaipreferensi=\".$rr->nilaipreferensi.\" \r\n\t\t\t\twhere idatribute='\".$ra->idatribute.\"'\";\r\n\t\t\t\t$qua=$this->db->query($sqlua);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn; \r\n\t}",
"public function run()\n {\n // Yogyakarta => 55281,57561,54265,56172,53195,57178,57473,54364,55253,55251,55252,55163,55165,55161,55166,55162,55167,55164,55243,55241,55242,55244,55111,55112,55261,55262,55153,55152,55151,55142,55143,55141,55132,55133,55172,55173,55171,55231,55233,55232,55122,55121,55225,55221,55222,55224,55223,55272,55271,55211,55213,55212\n // Cirebon => 45556,45143,52271\n // Pontianak => 78111,78115,78122,78121,78124,78381,78116,78117,78393,78123,78113,78391,78233,78112,78114,78132,78385\n // Palembang => 30862,30113,30151,30153,30155 ,30161,30162,30267,30262,30263,30264,30265 ,30261,30257,30255,30254,30253,30163,30165,30164,30268,30266,30259,30258,30127,30128,30114,30119,30252,30251,30111,30112,30117,30118,30116,30115,30123,30124,30122,30125,30121,30126,30129,30141,30142,30143,30144,30145,30146,30136,30131,30139,30137,30138,30147,30149,30148,30132,30133,30134,30135,30154,31113,30265\n // Samarinda => 75115,75117,75111,75112,75113,75114,75116,75118,75119,75121,75122,75123,75124,75125,75126,75127,75128,75131,75133,75241,75242,75243,75253,77111,76114,76121,76131,76113,76125,76124,76122,76136,76111,76115\n // Balikpapan => 76114\n $branches = [\n [\n 'branch_code' => 'KGB',\n 'branch_name' => 'Kelapa Gading Barat',\n 'branch_area' => 'Jakarta',\n 'coverage_area' => [\n 10510,10520,13210,13220,13230,13240,13250,13260,13310,13320,13330,13340,13350,13410,13420,13430,13440,13450,13460,13470,13510,13520,13530,13540,13550,13560,13570,13610,13620,13630,13640,13650,13710,13720,13730,13740,13750,13760,13770,13780,13790,13810,13820,13830,13840,13850,13860,13870,13880,13890,13910,13920,13930,13940,13950,13960,14110,14120,14130,14140,14150,14240,14250,14350,16111,16121,16122,16123,16124,16125,16126,16127,16128,16129,16131,16132,16133,16134,16142,16143,16152,16153,16161,16162,17111,17112,17113,17114,17115,17116,17117,17121,17122,17123,17124,17125,17131,17132,17133,17134,17135,17136,17141,17142,17143,17144,17145,17146,17147,17148,17155,17156,17157,17158,17211,17212,17213,17214,17215,17216,17217,17218,17411,17412,17422,16965,17530,17413,17435,16968,16115,16680,17510,17431,17610,17421,16110,16740,16330,16113,16151,17423,17432,16141,17415,10530,10540,10550,10560,10570,10610,10620,10630,10640,10650,13110,13120,13130,13140,13150,14210,14220,14230,14260,14270,14310,14320,14330,14340,17520,14360,16112,16966,17320,16144,14410,14420,16340,41373,41311,17154,17426,16455,41314,41352,17414,17425,17433\n ]\n ],\n [\n 'branch_code' => 'KGT',\n 'branch_name' => 'Kelapa Gading Timur',\n 'branch_area' => 'Jakarta',\n 'coverage_area' => [\n 10510,10520,13210,13220,13230,13240,13250,13260,13310,13320,13330,13340,13350,13410,13420,13430,13440,13450,13460,13470,13510,13520,13530,13540,13550,13560,13570,13610,13620,13630,13640,13650,13710,13720,13730,13740,13750,13760,13770,13780,13790,13810,13820,13830,13840,13850,13860,13870,13880,13890,13910,13920,13930,13940,13950,13960,14110,14120,14130,14140,14150,14240,14250,14350,16111,16121,16122,16123,16124,16125,16126,16127,16128,16129,16131,16132,16133,16134,16142,16143,16152,16153,16161,16162,17111,17112,17113,17114,17115,17116,17117,17121,17122,17123,17124,17125,17131,17132,17133,17134,17135,17136,17141,17142,17143,17144,17145,17146,17147,17148,17155,17156,17157,17158,17211,17212,17213,17214,17215,17216,17217,17218,17411,17412,17422,16965,17530,17413,17435,16968,16115,16680,17510,17431,17610,17421,16110,16740,16330,16113,16151,17423,17432,16141,17415,10530,10540,10550,10560,10570,10610,10620,10630,10640,10650,13110,13120,13130,13140,13150,14210,14220,14230,14260,14270,14310,14320,14330,14340,17520,14360,16112,16966,17320,16144,14410,14420,16340,41373,41311,17154,17426,16455,41314,41352,17414,17425,17433\n ]\n ],\n [\n 'branch_code' => 'KJ',\n 'branch_name' => 'Kebon Jeruk',\n 'branch_area' => 'Jakarta',\n 'coverage_area' => [\n 11520,11530,11540,11550,11560,11610,11620,11630,11640,11650,15153,15154,15155,15156,15157,15158,15159,11510,15212\n ]\n ],\n [\n 'branch_code' => 'AS',\n 'branch_name' => 'Alam Sutera',\n 'branch_area' => 'Jakarta',\n 'coverage_area' => [\n 15111,15114,15115,15116,15117,15118,15119,15121,15122,15123,15124,15125,15126,15127,15128,15129,15131,15132,15133,15134,15135,15136,15137,15138,15139,15141,15142,15143,15144,15145,15146,15147,15148,15151,15152,15220,15112,15322,15311,15416,15810,15326,15229,15417,15318,15225,15413,15411,15310,15418,15419,15610,15315,15331,15325,15324,15710,15323,15320,15227,15343,15820,15412,15228,15113,15314,15226,15530,15345,15321,15224,15344,15414,15520,15340,15560,15339,15540,15510,15332,15334\n ]\n ],\n [\n 'branch_code' => 'STC',\n 'branch_name' => 'Senayan Trade Center',\n 'branch_area' => 'Jakarta',\n 'coverage_area' => [\n 12110,12120,12130,12140,12160,12170,12180,12190,12210,12220,12530,12710,12720,12730,12740,12750,12760,12770,12780,12790,12810,12820,12830,12840,12850,12860,12870,12910,12920,12930,12940,12950,12960,12970,12980,16411,16412,16413,16414,16415,16416,16417,16418,16421,16422,16423,16424,16425,16426,16431,16432,16433,16434,16435,16436,16437,16438,16439,16514,16512,16360,16515,16454,16451,16452,12420,10210,10250,10330,10310,10240,10260,11420,11430,11460,10150,10220,10140,10270\n ]\n ],\n [\n 'branch_code' => 'PI',\n 'branch_name' => 'Pondok Indah',\n 'branch_area' => 'Jakarta',\n 'coverage_area' => [\n 12150,12230,12250,12310,12330,12410,12420,12430,12440,12450,12540,12550,12560,12610,12620,12630,12640,12240,12260,12270,12320,12510,12520,16830,16820,16810,16118,16145,43356,16969,16116,43112,16320,15415,43169,16610,16155,45583,16963,16517,16917,16164,16961,16154,16158\n ]\n ],\n [\n 'branch_code' => 'TD',\n 'branch_name' => 'Tanjung Duren',\n 'branch_area' => 'Jakarta',\n 'coverage_area' => [\n 11470,11480,11410,10130,10320,10340,10350,10410,10420,10430,10440,10450,10460,10710,10720,10730,10740,10750,10120,11450,11460\n ]\n ],\n // New\n [\n 'branch_code' => 'PL',\n 'branch_name' => 'Pluit',\n 'branch_area' => 'Jakarta',\n 'coverage_area' => [\n 11710,11720,11730,11740,11750,11810,11820,11830,11840,11850,14430,14440,14450,14460,14470,14510,14520,14530,14540,11230,11240,11320,11330,14330,11110 ,11120,11130,11140,11150,11160,11170,11180,11210,11220,11250,11260,11270,11310,11440,15222,16135,16117,16156,16165,16511,16923,16310,16911,16620,15221,43176\n ]\n ],\n\n\n [\n 'branch_code' => 'BL',\n 'branch_name' => 'Bali',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n 80115,80361,80114,80117,80231,80112,80223,80239,80119,80226,80224,80227,80111,80582,80353,80221,80237,80232,80235,80116,80118,81111,80228,82162,86462,85617,80234,85613,81161,82252,82121,80113,80225,80233,80351,80352,80511,80236,80238,80661,80222,80581,80229\n ]\n ],\n // [\n // 'branch_code' => 'SBYB',\n // 'branch_name' => 'Surabaya Barat',\n // 'branch_area' => 'Outstation',\n // ],\n [\n 'branch_code' => 'SBB',\n 'branch_name' => 'Surabaya Barat',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n 60614,60179,60226,60214,60196,60219,60294,60251,60188,65163,62381,61122,67359,60228,61174,61258,60134,60132,61316,60189,60238,60225,60133,67373,60256,60211,60217,61257,60235,60231,60239,60227,66882,67155,67174,61112\n ]\n ],\n // [\n // 'branch_code' => 'SBYT',\n // 'branch_name' => 'Surabaya Timur',\n // 'branch_area' => 'Outstation',\n // ],\n [\n 'branch_code' => 'SBT',\n 'branch_name' => 'Surabaya Timur',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n 60182,60183,60184,60171,60172,60174,60121,60122,60123,60124,60125,60281,60282,60283,60284,60286,60126,60127,60128,60129,60112,60113,60114,60115,60116,60161,60162,60163,60164,60165,60293,60295,60296,60297,60298,60151,60152,60153,60154,60155,60141,60142,60143,60144,60145,60111,60117,60118,60119,60291,60292,60299,61257\n ]\n ],\n [\n 'branch_code' => 'LAM',\n 'branch_name' => 'Lampung',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n 35121,35215,35221,35143,35372,35144,34595,35158,35141,35148,35131,35142,35373,35133,35353,35154,35155,35115,34765,35132,35134,35136,35365,35116,34111,35233,35111,35151,35128,34519,35124,34182,34174,35118,35119,35122,35366,35361,34163,35123,35135,35214,35211,35212,35235,35231,35237,35236,35222,35223,35229,35238,35239,35232,35234,35125,35126,35113,35159,35152,35156,35244,35245,35145,35246,35243,35241,35242,35149,35153,35112,35147,35146,35129,35213,35117,35127,35228,35225,35227,35224,35226\n ]\n ],\n [\n 'branch_code' => 'BDG',\n 'branch_name' => 'Bandung',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n 40243,40235,43252,40513,40213,40385,40132,40292,40162,40221,40142,40272,40121,40253,41172,40264,41271,40191,40134,44115,46387,46321,40257,40394,40114,45375,44118,43261,41281,42176,40553,40266,40163,40617,40225,40115,40614,40561,40291,40164,40218,40123,40237,40265,40151,40261,40523,40623,40511,40281,40133,40293,40254,40131,40227,40263,40559,43282,40285,40154,40174,40135,40286,40141,40111,40616,40381,40258,40238,40512,40153,40222,40551,40215,40143,45362,40173,40214,40911,40377,40383,40391,44114,43267,40181,40171,40287\n ]\n ],\n [\n 'branch_code' => 'MKS',\n 'branch_name' => 'Makassar',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n 90173,90174,90172,90171,90162,90163,90161,90165,90164,90111,90114,90112,90113,90115,90224,90225,90223,90221,90244,90245,90241,90212,90211,90215,90214,90213,90216,90217,90222,90231,90232,90233,90126,90121,90125,90123,90122,90234,90235,90131,90132,90133,90134,90135,90143,90145,90141,90144,90142,90167,90166,90168,90153,90156,90157,90154,90152,90155,90151,90242,90243\n ]\n ],\n [\n 'branch_code' => 'BTM',\n 'branch_name' => 'Batam',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n 29433,29432,29458,29431,29464,29411,29428,29444,29426,29451,29437,29442,29427,29425,29439,29466,29467,29468,29465,29441,29443,29445,29483,29484,29486,29487,29482,29481,29485,29474,29471,29473,29472,29476,29475,29413,29414,29412,29416,29452,29454,29453,29438,29422,29424,29461\n ]\n ],\n [\n 'branch_code' => 'PKU',\n 'branch_name' => 'Pekanbaru',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n 28292,28284,28285,28282,28156,28287,28293,28291,28281,28453,28261,28294,28263,28122,28265,28262,28264,28266,28141,28142,28143,28000,28100,28150,28200,28140,28114,28116,28826,28111,28125,28286,28289,28288,28882,28283,28154,28461,28121,28131,28712,28462,28452,29514,28772,28662,28267,28123,28155,28296,28295,28290,28299,28297,28298,28126,28124,28128,28127,28153,28152,28151,28132,28133,28112,28113,28115,28144\n ]\n ],\n [\n 'branch_code' => 'MDN',\n 'branch_name' => 'Medan',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n 20232,20115,20222,20121,20157,20214,20211,20113,20153,20371,20216,20151,20155,20236,20353,20125,20131,20254,20111,20239,20141,20714,20234,20146,20142,20154,20159,20362,20611,20231,20112,20124,20133,20126,21112,21221,20235,20147,20117,20144,20242,20734,21133,20123,20148,20227,20128,24351,20122,20415,20119,20135,20116,20118,20217,20624,20255,20251,20152,20215,20238,20256,20143,20114,20372,20212,20815,24415,20136,20127,20746,20233,20221,20225,20713,20226,20986,20228,20614,20856,20512,20356,20229,20237,20132,20156,20851,20245,20857,20411,20158,20374,20137,22535,21118,20612,20811,20711,20748,21139,20585,20721,20241,22392,21352,95615,20351,20223,20355,20735,20219,20244,20252,20145,22211,20224\n ]\n ],\n [\n 'branch_code' => 'SMG',\n 'branch_name' => 'Semarang',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n 50144,50274,51216,50183,52125\n ]\n ],\n [\n 'branch_code' => 'OTHER',\n 'branch_name' => 'Other',\n 'branch_area' => 'Outstation',\n 'coverage_area' => [\n\n ]\n ],\n ];\n\n foreach($branches as $branch){\n $brch = new Branch();\n $brch->branch_code = $branch['branch_code'];\n $brch->branch_name = $branch['branch_name'];\n $brch->branch_area = $branch['branch_area'];\n $brch->save();\n\n foreach($branch['coverage_area'] as $zipCode){\n\n $codee = PostalCode::where('postal_code_number',$zipCode)->first();\n\n // $branchCoverage = BranchCoverage::where([\n // 'branch_id' => $brch->branch_id,\n // 'postal_code_id' => $codee->postal_code_id,\n // ])->first();\n\n if(!is_null($codee)){\n $coverage = new BranchCoverage();\n $coverage->branch_id = $brch->branch_id;\n $coverage->postal_code_id = $codee->postal_code_id;\n $coverage->save();\n }\n }\n }\n }",
"public function somme(){\n $nb = 0;\n for ($i=0; $i <count($this->data); $i++) { \n # code...\n $nb += $this->data[$i][0]*$this->data[$i][1];\n } \n return $nb;\n }",
"function calculate_MW($eg_id,$type='aa')\n{\n\tinclude_once(\"dblink.php\");\n\t$link=dblink();\n\tmysql_select_db('ecogene') or die('Unable to select database');\n\n// Molecular Weight DNA\n//Molecular Weight = (An x 329.21) + (Un x 306.17) + (Cn x 305.18) + (Gn x345.21) + 159.0\n// Molecular Weight protein\n// Protein Mw is calculated by the addition of average isotopic masses of amino acids in the protein and the average isotopic mass of one water molecule.\n/*\nmonoisotopic average \nAlanine (A) 71.03711 71.0788 \nArginine (R) 156.10111 156.1875 \nAsparagine (N) 114.04293 114.1038 \nAspartic acid (D) 115.02694 115.0886 \nCysteine (C) 103.00919 103.1388 \nGlutamic acid (E) 129.04259 129.1155 \nGlutae (Q) 128.05858 128.1307 \nGlycine (G) 57.02146 57.0519 \nHistidine (H) 137.05891 137.1411 \nIsoleucine (I) 113.08406 113.1594 \nLeucine (L) 113.08406 113.1594 \nLysine (K) 128.09496 128.1741 \nMethionine (M) 131.04049 131.1926 \nPhenylalanine (F) 147.06841 147.1766 \nProline (P) 97.05276 97.1167 \nSerine (S) 87.03203 87.0782 \nThreonine (T) 101.04768 101.1051 \nTryptophan (W) 186.07931 186.2132 \nTyrosine (Y) 163.06333 163.1760 \nValine (V) 99.06841 99.1326 \n*/\n\t$arr_weight_rna = array(\n\t\t\t\t\"A\" => \"329.21\", \n\t\t\t\t\"U\" => \"306.17\",\n\t\t\t\t\"C\" => \"305.18\",\n\t\t\t\t\"G\" => \"345.21\",\t\n\t\t\t\t\"O\" => \"159.0\"\t\t\t\n\t\t\t\t);\n\t$arr_weight = array(\n\n\t\t\t\t\"A\" => \"71.0788\", \n\t\t\t\t\"R\" => \"156.1875\",\n\t\t\t\t\"N\" => \"114.1038\",\n\t\t\t\t\"D\" => \"115.0886\",\n\t\t\t\t\"C\" => \"103.1388\",\n\t\t\t\t\"E\" => \"129.1155\",\n\t\t\t\t\"Q\" => \"128.1307\",\n\t\t\t\t\"G\" => \"57.0519\",\n\t\t\t\t\"H\" => \"137.1411\",\n\t\t\t\t\"I\" => \"113.1594\",\n\t\t\t\t\"L\" => \"113.1594\",\n\t\t\t\t\"K\" => \"128.1741\",\n\t\t\t\t\"M\" => \"131.1926\",\n\t\t\t\t\"F\" => \"147.1766\",\n\t\t\t\t\"P\" => \"97.1167\",\n\t\t\t\t\"S\" => \"87.0782\",\n\t\t\t\t\"T\" => \"101.1051\",\n\t\t\t\t\"W\" => \"186.2132\",\n\t\t\t\t\"Y\" => \"163.1760\",\n\t\t\t\t\"V\" => \"99.1326\",\n\t\t\t\t\"H2O\" => \"18.01524\"\n\t\t\t\t);\t\t\t\n\tif($type=='aa')\n\t{\n\t\t$query = 'SELECT '.\t\t ' sequence '.\n\t\t'FROM '.\n\t\t'\tt_product_protein '.\n\t\t'WHERE '.\n\t\t\"\teg_id = '$eg_id'\";\n\n\t\t$rst_protSequence = mysql_query($query) or die(\"Query failed : \" . $query.mysql_error());\n\t\t$row = mysql_fetch_array($rst_protSequence, MYSQL_ASSOC);\n\t\t$sequence = $row[\"sequence\"];\n\t\tmysql_free_result($rst_protSequence);\n\n\t\t$protLen = strlen($sequence);\n\t\t$molecular_weight = $arr_weight[\"H2O\"];\n\n\t\tfor ($i=0; $i<$protLen;$i++)\n\t\t{\n\t\t\t$molecular_weight = $molecular_weight + $arr_weight[$sequence{$i}];\n\t\t}\n\t}\n\t\n\tif($type=='nt')\n\t{\n\t\t\n\t\tinclude_once(\"seq_format.php\");\n\t\t$query = seq_format($eg_id);\n//\t\tprint $query.'i here';\n\t\t$rst_rnaSequence = mysql_query($query) or die(\"Query failed : \" . $query.mysql_error());\n\t\t\n\t\t$row = mysql_fetch_array($rst_rnaSequence, MYSQL_ASSOC);\t\n\t\t$sequence = $row[\"sequence\"];\n\t\t$sequence = str_replace(\"T\", \"U\", $sequence);\n\t\t\n\t\t$rnaLen = strlen($sequence);\n\t\t$molecular_weight = $arr_weight_rna[\"O\"];\n\n\t\tfor ($i=0; $i<$rnaLen;$i++)\n\t\t{\n\t\t\t$molecular_weight = $molecular_weight + $arr_weight_rna[$sequence{$i}];\n\t\t}\n\t\t\n\t\t\n\t}\n\n\treturn $molecular_weight;\n\n}",
"public function do_algorithm() {\n //yang dipanggil pertama kali adalah function init\n //kemudian melakukan proses tahap pertama.\n $this->init();\n $this->process(null, null, 1);\n //dibawah ini adalah testing iterasi secara bertahap\n //$this->process(array('product_time_delay' => 2,), array(1));\n //$this->process(array('product_time_delay' => 2, 'product_stock_buffer' => '>=0<=15'), array(1, 2));\n //$this->process(array('product_time_delay' => 2, 'product_stock_buffer' => '>=0<=15', 'product_result_sales' => '>=31<=60'), array(1, 2, 3));\n //$this->process(array('product_time_delay' => 2, 'product_stock_buffer' => '>=0<=15', 'product_result_sales' => '>=31<=60', 'product_stock_rest' => 4), array(1, 2, 3, 4));\n }",
"public function hasil()\n {\n /*$a = 0.2+(0.8 * (1 - 0.2));\n echo \"<hr> $a\";\n exit;*/\n\n $pasien_id = \\Session::get('pasien_id'); \n $periksa_id = \\Session::get('periksa_id'); \n $penyakits = \\DB::select(\"select *from aturans group by penyakit_id\");\n $penyakits = \\collect($penyakits);\n foreach ($penyakits as $penyakit) {\n $cf_he = 0;\n $a = 0;\n $penyakit_id = $penyakit->penyakit_id;\n // echo \"<h1>$penyakit_id</h1>\";\n $diagnosa = \\App\\Hitung::wherePasienId($pasien_id)\n ->wherePeriksaId($periksa_id)\n ->wherePenyakitId($penyakit_id)->get();\n foreach ($diagnosa as $v) {\n $cf_combine = $v->cf_he;\n $gejala_id = $v->gejala_id;\n $aturan = \\App\\Aturan::whereGejalaId($gejala_id)\n ->wherePenyakitId($penyakit_id)\n ->first();\n $cf2 = $v->jawaban; \n \n // echo \"Gejala $gejala_id : Penyakit $penyakit_id <br>\";\n //echo \"$cf_he = $cf_he+$v->cf_he * (1 - $cf_he)<br>\";\n //$cf_he = $cf_he+($v->cf_he * (1 - $cf_he));\n // echo \"$cf_he = $cf_he+$v->cf_he * (1 - $cf_he)<br>\";\n $cf_he2 = $v->cf_he * (1 - $cf_he); \n // echo \"$cf_he = $cf_he+$cf_he2 <br>\";\n $cf_he = $cf_he+$cf_he2;\n } \n $presentase = $cf_he*100;\n // echo \"$presentase\"; \n // echo \"<hr />\";\n $hitungPersen = new \\App\\HitungPersen();\n $hitungPersen->pasien_id = $pasien_id;\n $hitungPersen->penyakit_id = $penyakit_id;\n $hitungPersen->persen = $presentase;\n $hitungPersen->periksa_id = $periksa_id;\n $hitungPersen->save();\n }\n return redirect('sistemPakar/index_hasil');\n }",
"function verbrauchHeute()\n{\n\t\n\tglobal $verbrauch;\n\t\t\n\t$verbrauchHeuteAktor = 0.0;\n\t$euroHeuteAktor = 0.0;\n\t$verbrauchHeuteDevices = 0.0;\n\t$euroHeuteDevices = 0.0;\n\t\t\n\t$sql = query( \"SELECT iid, zeitEin, zeitHeute FROM aktor\" );\n\twhile( $row = fetch($sql))\n\t{\n\t\t$deltaZeit = 0;\n\t\t$zeitHeute = 0;\n\t\t\n\t\t// Zeit der Aktiven Aktoren miteinbeziehen\n\t\tif( $row['zeitEin'] > 0 )\n\t\t{\n\t\t\t// $deltaZeit = Zeit die der Aktor bis jetz ein war\n\t\t\t$deltaZeit = time() - $row['zeitEin'];\n\t\t}\n\t\n\t\t// zeitHeute brechnen\n\t\t$zeitHeute = $deltaZeit + $row['zeitHeute'];\n\t\t//echo $row['iid'] .\"<br/>\";\n\t\trechneVerbrauchHeute($row['iid'],\"aktor\", $zeitHeute);\n\t\t//echo \"aktor \" . $row['iid'] . \" :\" . $verbrauch['kwh'] . \"<br/>\";\n\t\t//print_r($verbrauch);\n\t\t$verbrauchHeuteAktor = $verbrauchHeuteAktor + $verbrauch['kwh'];\n\t\t$euroHeuteAktor = $euroHeuteAktor + $verbrauch['euro'];\n\t}\n\t\n\t/* Verbrauch der \"Geräte\" miteinbeziehen\n\t$monat = date(\"m\");\n\t$tagHeute = date(\"d\");\n\t$jahr = date(\"Y\");\n\t$timestamp = mktime(0, 0, 0, $monat, $tagHeute, $jahr);\n\t\n\trechneVerbrauchHeute( false, $timestamp );\n\t$verbrauchHeute = $verbrauchHeute + $verbrauch['kwh'];\n\t$euroHeute = $euroHeute + $verbrauch['euro'];\n\t*/\n\t\n\t$sql = query( \"SELECT id, zeitEin, zeitHeute FROM devices\" );\n\twhile( $row = fetch($sql))\n\t{\n\t\t$deltaZeit = 0;\n\t\t$zeitHeute = 0;\n\t\t\n\t\t// Zeit der Aktiven Aktoren miteinbeziehen\n\t\tif( $row['zeitEin'] > 0 )\n\t\t{\n\t\t\t// $deltaZeit = Zeit die der Aktor bis jetz ein war\n\t\t\t$deltaZeit = time() - $row['zeitEin'];\n\t\t}\n\t\n\t\t// zeitHeute brechnen\n\t\t$zeitHeute = $deltaZeit + $row['zeitHeute'];\n\t\t//echo $zeitHeute . \"<br/>\";\n\t\trechneVerbrauchHeute($row['id'],\"devices\", $zeitHeute);\n\t\t//echo \"device \" . $row['id'] . \" :\" . $verbrauch['kwh'] . \"<br/>\";\n\t\t$verbrauchHeuteDevices = $verbrauchHeuteDevices + $verbrauch['kwh'];\n\t\t$euroHeuteDevices = $euroHeuteDevices + $verbrauch['euro'];\n\t}\t\n\t\n\t$verbrauch['kwh'] = round($verbrauchHeuteDevices + $verbrauchHeuteAktor,2) ;\n\t$verbrauch['euro'] = round($euroHeuteDevices + $euroHeuteAktor,2);\n\t\n\treturn $verbrauch;\n\t\n}",
"public function generateGCodes() {\n \n // Generate Pre-Amble\n array_push($this->gcodes, \"G21\");\n array_push($this->gcodes, \"G64 P0.01\");\n array_push($this->gcodes, \"M1\");\n array_push($this->gcodes, \"G1 F6000 X\" . 1000 * $this->start_x);\n array_push($this->gcodes, \"G1 F6000 Y\" . $this->start_s);\n array_push($this->gcodes, \"G1 F6000 Z\" . $this->start_z); \n array_push($this->gcodes, \"M1\");\n\n // Create all the passes\n for ($layer = 0; $layer < count($this->layers); $layer++) {\n $this->calculations($layer);\n \n $this->current_pass = 0;\n for ($i = 1; $i <= $this->calculatePassesToCoverMandrel($layer) * 2; $i++) {\n $this->generatePass($layer);\n }\n \n \n // User Interation between layers.\n array_push($this->gcodes, \"M1\");\n \n // We want overlap between layers, so we advance by 1/2 distance for ensuring NO overlap.\n $feedrate = $this->transition_feed_rate + 91;\n $s_travel = $this->actualCFAdvancementAngle($layer)/2; // Divisor of 2 is key here...\n $z_angle = 0; // Should be at end...so z_angle should already be ZERO.\n $this->generateYCode($layer, $s_travel, $z_angle, $feedrate); \n\n \n }\n \n \n // Rotation - basically make it spin a long time while moving Carriage back and forward with hot air-gun going\n // First we put the hot air-gun into position\n $x_pos = $this->start_x + 0.170;\n array_push($this->gcodes, \"G1 F6000 X\" . 1000 * $x_pos);\n $this->current_x = $x_pos; // We know the gun starting point is 170mm ahead of everything. So we don't heat the Motor!!\n \n // $this->current_s = 0;\n // We wait for user to turn on Hot Air Gun, Cut the CF ... No more tow winding...\n // ... and then press 'S' key to resume...\n array_push($this->gcodes, \"M1\"); \n \n \n // Each travel = about 20 seconds. i.e. 6000 mm/min\n $feedrate = 6000;\n \n // The length of the piece we are winding.\n $x_travel = ($this->max_x - $this->start_x);\n \n // $x_travel_trail = 0.17; // 2 Meters\n $s_travel = 1800; // 1800 degrees (i.e. 5 revolutions)\n $z_angle = 0; // No need to move this.\n $cf_angle = 45; // Middle of the range Angle\n for ($i = 0; $i < 720; $i++) {\n $this->generateXYCode(null, $x_travel, $s_travel, $z_angle, $feedrate, $cf_angle);\n $this->generateXYCode(null, -1 * $x_travel, $s_travel, $z_angle, $feedrate, $cf_angle);\n }\n \n // Generate Post \n array_push($this->gcodes, \"M2\");\n array_push($this->gcodes, \"$\");\n }",
"public function doProcessing()\n\t{\n\t\tglobal $NTvTlevel1,$NTvTlevel2,$NTvTlevel3,$NTvTlevel4,$NTvTlevel5,$NTvTlevel6;\n\n $maxLimit=configVariables::$maxLimit;\n $queryLimit=$maxLimit;\n $loginDtRelax1=configVariables::$loginDtRelax1;\n $loginDtRelax2=configVariables::$loginDtRelax2;\n\t\t$dayOfRelaxation=configVariables::$use60DaysRelaxOnDay;\n\n if($this->receiverObj->getSwitchToDpp()==1)\n {\n $canUseRelaxation=0;\n }\n else\n {\n $relaxlheight=$this->filterBean->getLheightRelax();\n $relaxhheight=$this->filterBean->getHheightRelax();\n $relaxlage=$this->filterBean->getLageRelax();\n $relaxhage=$this->filterBean->getHageRelax();\n $canUseRelaxation=$this->filterBean->getCanUseRelaxation();\n }\n \t$dppCasteVal = $this->filterBean->getCaste();\n\n\t\t$NTvTlevel1++;\n\t\t$this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,$loginDtRelax1,1,'','','','','','','',$this->communityModelLogic);\n\t\tif($this->profileSetTemp && !$this->communityModelLogic)\n\t\t\t$this->processResults($queryLimit);\n\t\tunset($this->profileSetTemp);\n\n //------\n if(count($this->profileSet)>0)\n {\n $levelCount=count($this->profileSet);\n while($levelCount>0)\n {\n\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='211';\n\t\t\t\telse\n \t$this->logicLevel[]='21';\n $levelCount--;\n }\n }\n //------\n\n\t\tif($canUseRelaxation && count($this->profileSet) <$maxLimit)//Relaxed forward only 15 days\n\t\t{\n\t\t\t$NTvTlevel5++;\n\t\t\t$queryLimit=$maxLimit-count($this->profileSet);\n \n\t\t\t$this->filterBean->setLheight(intval($this->filterBean->getLheight())-$relaxlheight);\n\t\t\t$this->filterBean->setHheight(intval($this->filterBean->getHheight())+$relaxhheight);\n\t\t\t$this->filterBean->setLage(intval($this->filterBean->getLAge())-$relaxlage);\n\t\t\t$this->filterBean->setHage(intval($this->filterBean->getHAge())+$relaxhage);\n\t\t\t$this->setCasteRelaxation($this->receiverObj->getRecCaste(),$this->filterBean);\n\n\t\t\t$this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,$loginDtRelax1,1,1,$queryLimit,'LAST_LOGIN_DT DESC','','','','',$this->communityModelLogic);//1,1 was 1,0 PHASE2\n\t\t\tif($this->profileSetTemp)\n\t\t\t\t$this->profileSet=array_merge($this->profileSet,$this->profileSetTemp);\n //------\n $levelCount=count($this->profileSet)-count($this->logicLevel);\n while($levelCount>0)\n {\n\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='221';\n\t\t\t\telse\n \t$this->logicLevel[]='22';\n $levelCount--;\n }\n //------\n\t\t}\n\n\t\tif(count($this->profileSet) <$maxLimit)//Relaxed forward only 60days\n {\n\t\t\t$NTvTlevel6++;\n $queryLimit=$maxLimit-count($this->profileSet);\n $this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,$loginDtRelax2,1,1,$queryLimit,'LAST_LOGIN_DT DESC','','','','',$this->communityModelLogic);//1,1 was 1,0 PHASE2\n if($this->profileSetTemp)\n $this->profileSet=array_merge($this->profileSet,$this->profileSetTemp);\n //------\n $levelCount=count($this->profileSet)-count($this->logicLevel);\n while($levelCount>0)\n {\n\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='231';\n\t\t\t\telse\n \t$this->logicLevel[]='23';\n $levelCount--;\n }\n //------\n\n }\n\n\t\t$gap=configVariables::getNoOfDays();\n\t\tif($gap%7==$dayOfRelaxation)\n\t\t{\n if(count($this->profileSet) <$maxLimit)//Relaxed forward only + no_login_dt\n {\n $NTvTlevel6++;\n $queryLimit=$maxLimit-count($this->profileSet);\n\n\t\t\t\tif($canUseRelaxation)\n {\n\t\t\t\t\t$this->filterBean->setLheight(intval($this->filterBean->getLheight())-$relaxlheight);\n\t\t\t\t\t$this->filterBean->setHheight(intval($this->filterBean->getHheight())+$relaxhheight);\n\t\t\t\t\t$this->filterBean->setLage(intval($this->filterBean->getLAge())-$relaxlage);\n\t\t\t\t\t$this->filterBean->setHage(intval($this->filterBean->getHAge())+$relaxhage);\n\t\t\t\t\t$this->setCasteRelaxation($this->receiverObj->getRecCaste(),$this->filterBean);\n\t\t\t\t}\n\n $this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,'',1,'',$queryLimit,'LAST_LOGIN_DT DESC','','','','',$this->communityModelLogic);\n if($this->profileSetTemp)\n $this->profileSet=array_merge($this->profileSet,$this->profileSetTemp);\n //------\n $levelCount=count($this->profileSet)-count($this->logicLevel);\n while($levelCount>0)\n {\n\t\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='241';\n\t\t\t\t\telse\n \t$this->logicLevel[]='24';\n $levelCount--;\n }\n //------\n }\n }\n\n if(count($this->profileSet)<$maxLimit)//NT PROFILEIS NOT SENT\n {\n\t\t\t//NEED TO IMPLEMENT LATER\n }\n if(count($this->profileSet)<$maxLimit)\n {\n\t\t\t//TRACKING CODE\n }\n if(count($this->profileSet))\n $this->logRecords($this->profileSet,$this->receiverObj->getPartnerProfile()->getProfileId(),$this->db,configVariables::$strategyNtVsTLogic,$this->logicLevel,$this->frequency);\n else\n\t\t{\n $gap=configVariables::getNoOfDays();\n $zeropid=$this->receiverObj->getPartnerProfile()->getProfileId();\n $sql_y=\"INSERT INTO matchalerts.ZERONTvT(PROFILEID,DATE) VALUES($zeropid,$gap)\";\n mysql_query($sql_y,$this->db) or logerror1(\"In matchalert_mailer.php\",$sql_y);\n ;// some tarck for 0 res\n\t\t}\n\n\t}",
"function pengujian_avg($jenis_uji, $alpha, $epsilon, $max_epoch, $runtime, $atribut)\r\n {\r\n //Ambil data hasil uji tiap fold\r\n $hasil_uji_fold = $this->data_model->get_data('hasil_pengujian_fold');\r\n $jml_uji_fold = count(array_column($hasil_uji_fold, 'ID_FOLD'));\r\n //echo 'Jumlah hasil uji fold = '.$jml_uji_fold.'<br>';\r\n \r\n //Hitung data uji dan hasil uji rata-rata\r\n $hasil_uji['akurasi_avg'] = array_sum(array_column($hasil_uji_fold, 'AKURASI')) / $jml_uji_fold;\r\n $hasil_uji['error_avg'] = array_sum(array_column($hasil_uji_fold, 'ERROR')) / $jml_uji_fold;\r\n $hasil_uji['sensitifitas_avg'] = array_sum(array_column($hasil_uji_fold, 'SENSITIFITAS')) / $jml_uji_fold;\r\n $hasil_uji['spesifisitas_avg'] = array_sum(array_column($hasil_uji_fold, 'SPESIFISITAS')) / $jml_uji_fold;\r\n $hasil_uji['alpha_awal'] = $alpha;\r\n $hasil_uji['epsilon'] = $epsilon;\r\n $hasil_uji['epoch_akhir_avg'] = array_sum(array_column($hasil_uji_fold, 'EPOCH_AKHIR')) / $jml_uji_fold;\r\n $hasil_uji['max_epoch'] = $max_epoch;\r\n \r\n \r\n //echo 'Rata-rata Akurasi = '.$hasil_uji['akurasi_avg'].' Rata-rata Error = '.$hasil_uji['error_avg'].'<br>';\r\n //echo 'Rata-rata sensitifitas = '.$hasil_uji['sensitifitas_avg'].' Rata-rata spesifisitas = '.$hasil_uji['spesifisitas_avg'].'<br>';\r\n //echo 'Waktu pengerjaan'.$runtime.'<br>';\r\n $hasil_uji['runtime'] = $runtime;\r\n \r\n //Memasukkan data ke database\r\n $hasil_uji_avg = array(\r\n 'JENIS_UJI' => $jenis_uji,\r\n 'ALPHA_AWAL' => $alpha,\r\n 'EPSILON' => $epsilon,\r\n 'EPOCH_AKHIR_AVG' => $hasil_uji['epoch_akhir_avg'],\r\n 'EPOCH_MAX' => $max_epoch,\r\n 'AKURASI' => $hasil_uji['akurasi_avg'],\r\n 'ERROR' => $hasil_uji['error_avg'],\r\n 'SENSITIFITAS' => $hasil_uji['sensitifitas_avg'],\r\n 'SPESIFISITAS' => $hasil_uji['spesifisitas_avg'],\r\n 'RUNTIME' => $runtime,\r\n 'ATRIBUT' => $atribut\r\n );\r\n $this->data_model->insert_data('hasil_pengujian_avg',$hasil_uji_avg);\r\n \r\n return $hasil_uji;\r\n }",
"function getrandmax () {}",
"private function calculate_readings() {\n\t\t\tif( false ) {\n\t\t\t\t$this->ac1 = 408;\n\t\t\t\t$this->ac2 = -72;\n\t\t\t\t$this->ac3 = -14383;\n\t\t\t\t$this->ac4 = 32741;\n\t\t\t\t$this->ac5 = 32757;\n\t\t\t\t$this->ac6 = 23153;\n\t\t\t\t$this->b1 = 6190;\n\t\t\t\t$this->b2 = 4;\n\t\t\t\t$this->mb = -32767;\n\t\t\t\t$this->mc = -8711;\n\t\t\t\t$this->md = 2868;\n\t\t\t\t$this->operating_mode = self::ultra_low_power_mode;\n\t\t\t\t$this->ut = 27898;\n\t\t\t\t$this->up = 23843;\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t// calculate true temperature\n\t\t\t$x1 = ( $this->ut - $this->ac6 ) * $this->ac5 >> 15;\n\t\t\t$x2 = ( $this->mc << 11 ) / ( $x1 + $this->md );\n\t\t\t$b5 = $x1 + $x2;\n\t\t\t$this->t = ( $b5 + 8 ) >> 4;\n\t\t\t$this->t = $this->t * 0.1; // convert to celcius\n\t\t\tif( self::debug_mode ) {\n\t\t\t\techo \"\\nx1: $x1\";\n\t\t\t\techo \"\\nx2: $x2\";\n\t\t\t\techo \"\\nb5: $b5\";\n\t\t\t\techo \"\\nt: \" . $this->t;\n\t\t\t}\n\t\t\t\n\t\t\t// calculate true pressure\n\t\t\t$b6 = $b5 - 4000;\n\t\t\t$x1 = ( $this->b2 * ( $b6 * $b6 ) >> 12 ) >> 11;\n\t\t\t$x2 = ( $this->ac2 * $b6 ) >> 11;\n\t\t\t$x3 = $x1 + $x2;\n\t\t\t$b3 = ( ( ( $this->ac1 * 4 + $x3 ) << $this->operating_mode ) + 2 ) / 4;\n\t\t\tif( self::debug_mode ) {\n\t\t\t\techo \"\\nb6: $b6\";\n\t\t\t\techo \"\\nx1: $x1\";\n\t\t\t\techo \"\\nx2: $x2\";\n\t\t\t\techo \"\\nx3: $x3\";\n\t\t\t\techo \"\\nb3: $b3\";\n\t\t\t}\n\t\t\t$x1 = ( $this->ac3 * $b6 ) >> 13;\n\t\t\t$x2 = ( $this->b1 * ( ( $b6 * $b6 ) >> 12 ) ) >> 16;\n\t\t\t$x3 = ( ( $x1 + $x2 ) + 2 ) >> 2;\n\t\t\t$b4 = ( $this->ac4 * ( $x3 + 32768 ) ) >> 15;\n\t\t\t$b7 = ( $this->up - $b3 ) * ( 50000 >> $this->operating_mode );\n\t\t\tif( $b7 < 0x80000000 )\n\t\t\t\t$p = ( $b7 * 2 ) / $b4;\n\t\t\telse\n\t\t\t\t$p = ( $b7 / $b4 ) * 2;\n\t\t\tif( self::debug_mode ) {\n\t\t\t\techo \"\\nx1: $x1\";\n\t\t\t\techo \"\\nx2: $x2\";\n\t\t\t\techo \"\\nx3: $x3\";\n\t\t\t\techo \"\\nb4: $b4\";\n\t\t\t\techo \"\\nb7: $b7\";\n\t\t\t\techo \"\\np: $p\";\n\t\t\t}\n\t\t\t$x1 = ( $p >> 8 ) * ( $p >> 8 );\n\t\t\tif( self::debug_mode )\n\t\t\t\techo \"\\nx1: $x1\";\n\t\t\t$x1 = ( $x1 * 3038 ) >> 16;\n\t\t\t$x2 = ( -7357 * $p ) >> 16;\n\t\t\t$this->p = $p + ( ( $x1 + $x2 + 3791 ) >> 4 );\n\t\t\tif( self::debug_mode ) {\n\t\t\t\techo \"\\nx1: $x1\";\n\t\t\t\techo \"\\nx2: $x2\";\n\t\t\t\techo \"\\np: \" . $this->p;\n\t\t\t}\n\t\t\t\n\t\t\t// calculate altitude\n\t\t\t$this->a = 44330 * ( 1 - pow( ( $this->p / 101325 ), ( 0.1903 ) ) );\n\t\t\tif( self::debug_mode )\n\t\t\t\techo \"\\na: \" . $this->a;\n\t\t\t\t\n\t\t}",
"function mini($distance, $pick, $drop, $kg, $cab)\n {\n $d=$distance;\n if ($kg<=0) {\n $cost=0;\n } elseif ($kg<=10 ) {\n $cost=50;\n } elseif ($kg>10 && $kg<=20 ) {\n $cost=100;\n } elseif ($kg>20) {\n $cost=200;\n }\n $fixed=150;\n if ($d>0 && $d<=10) {\n $fixed+=($d*14.50);\n } elseif ($d>10 && $d<=50) {\n $fixed+=(10*14.50);\n $d-=10;\n $fixed+=($d*13.00);\n } elseif ($d>50 && $d<=150) {\n $fixed+=(10*14.50);\n $d-=10;\n $fixed+=(50*13.00);\n $d-=50;\n $fixed+=($d*11.20);\n\n } elseif ($d>150) {\n $fixed+=(10*14.50);\n $d-=10;\n $fixed+=(50*13.00);\n $d-=50;\n $fixed+=(100*11.20);\n $d-=100;\n $fixed+=($d*9.50);\n \n }\n display($distance, $fixed, $cost, $pick, $drop, $kg, $cab);\n }",
"function perhitunganC45($atribut, $nilai_atribut) \n{\n $con = @mysqli_connect('localhost', 'root', '', 'db_ai');\n\nif (!$con) {\n echo \"Error: \" . mysqli_connect_error();\n exit();\n}\n if (empty($atribut) AND empty($nilai_atribut)) {\n \n\n//#2# Jika atribut yg diinputkan kosong, maka lakukan perhitungan awal\n $kondisiAtribut = \"\"; // set kondisi atribut kosong\n } else if (!empty($atribut) AND !empty($nilai_atribut)) { \n // jika atribut tdk kosong, maka select kondisi atribut dari DB\n $sqlKondisiAtribut = mysqli_query($con,\"SELECT kondisi_atribut FROM pohon_keputusan_c45 WHERE atribut = '$atribut' AND nilai_atribut = '$nilai_atribut' order by id DESC LIMIT 1\");\n $rowKondisiAtribut = mysqli_fetch_assoc($sqlKondisiAtribut);\n $kondisiAtribut = str_replace(\"~\", \"'\", $rowKondisiAtribut['kondisi_atribut']); // replace string ~ menjadi '\n } \n \n // ambil seluruh atribut\n $sqlAtribut = mysqli_query($con,'SELECT distinct atribut FROM atribut');\n while($rowGetAtribut = mysqli_fetch_assoc($sqlAtribut)) {\n $getAtribut = $rowGetAtribut['atribut'];\n if ($getAtribut === 'total') { \n//#3# Jika atribut = total, maka hitung jumlah kasus total, jumlah kasus layak dan jumlah kasus tdk layak\n // hitung jumlah kasus total\n $sqlJumlahKasusTotal = mysqli_query($con,\"SELECT COUNT(*) as jumlah_total FROM sample2 WHERE income is not null $kondisiAtribut\");\n $rowJumlahKasusTotal = mysqli_fetch_assoc($sqlJumlahKasusTotal);\n $getJumlahKasusTotal = $rowJumlahKasusTotal['jumlah_total'];\n\n // hitung jumlah kasus layak\n $sqlJumlahKasusLayak = mysqli_query($con,\"SELECT COUNT(*) as jumlah_layak FROM sample2 WHERE income = '>50k' AND income is not null $kondisiAtribut\");\n $rowJumlahKasusLayak = mysqli_fetch_assoc($sqlJumlahKasusLayak);\n $getJumlahKasusLayak = $rowJumlahKasusLayak['jumlah_layak'];\n\n // hitung jumlah kasus tdk layak\n $sqlJumlahKasusTidakLayak = mysqli_query($con,\"SELECT COUNT(*) as jumlah_tidak_layak FROM sample2 WHERE income = '<=50k' AND income is not null $kondisiAtribut\");\n $rowJumlahKasusTidakLayak = mysqli_fetch_assoc($sqlJumlahKasusTidakLayak);\n $getJumlahKasusTidakLayak = $rowJumlahKasusTidakLayak['jumlah_tidak_layak'];\n\n//#4# Insert jumlah kasus total, jumlah kasus layak dan jumlah kasus tdk layak ke DB\n // insert ke database mining_c45\n mysqli_query($con,\"INSERT INTO mining_c45 VALUES ('', 'Total', 'Total', '$getJumlahKasusTotal', '$getJumlahKasusLayak', '$getJumlahKasusTidakLayak', '', '', '', '', '', '')\");\n\n } else {\n//#5# Jika atribut != total (atribut lainnya), maka hitung jumlah kasus total, jumlah kasus layak dan jumlah kasus tdk layak masing2 atribut\n // ambil nilai atribut\n $sqlNilaiAtribut = mysqli_query($con,\"SELECT nilai_atribut FROM atribut WHERE atribut = '$getAtribut' ORDER BY id\");\n while($rowNilaiAtribut = mysqli_fetch_assoc($sqlNilaiAtribut)) {\n $getNilaiAtribut = $rowNilaiAtribut['nilai_atribut'];\n\n // set kondisi dimana nilai_atribut = berdasakan masing2 atribut dan income data = data training\n $kondisi = \"$getAtribut = '$getNilaiAtribut' AND income is not null $kondisiAtribut\";\n\n // hitung jumlah kasus per atribut\n $sqlJumlahKasusTotalAtribut = mysqli_query($con,\"SELECT COUNT(*) as jumlah_total FROM sample2 WHERE $kondisi\");\n\n $rowJumlahKasusTotalAtribut = mysqli_fetch_assoc($sqlJumlahKasusTotalAtribut);\n $getJumlahKasusTotalAtribut = $rowJumlahKasusTotalAtribut['jumlah_total'];\n\n // hitung jumlah kasus layak\n $sqlJumlahKasusLayakAtribut = mysqli_query($con,\"SELECT COUNT(*) as jumlah_layak FROM sample2 WHERE $kondisi AND income = '>50k'\");\n $rowJumlahKasusLayakAtribut = mysqli_fetch_assoc($sqlJumlahKasusLayakAtribut);\n $getJumlahKasusLayakAtribut = $rowJumlahKasusLayakAtribut['jumlah_layak'];\n\n // hitung jumlah kasus TDK layak\n $sqlJumlahKasusTidakLayakAtribut = mysqli_query($con,\"SELECT COUNT(*) as jumlah_tidak_layak FROM sample2 WHERE $kondisi AND income = '<=50k'\");\n $rowJumlahKasusTidakLayakAtribut = mysqli_fetch_assoc($sqlJumlahKasusTidakLayakAtribut);\n $getJumlahKasusTidakLayakAtribut = $rowJumlahKasusTidakLayakAtribut['jumlah_tidak_layak'];\n\n//#6# Insert jumlah kasus total, jumlah kasus layak dan jumlah kasus tdk layak masing2 atribut ke DB\n // insert ke database mining_c45\n mysqli_query($con,\"INSERT INTO mining_c45 VALUES ('', '$getAtribut', '$getNilaiAtribut', '$getJumlahKasusTotalAtribut', '$getJumlahKasusLayakAtribut', '$getJumlahKasusTidakLayakAtribut', '', '', '', '', '', '')\");\n \n//#7# Lakukan perhitungan entropy\n // perhitungan entropy\n $sqlEntropy = mysqli_query($con,\"SELECT id, jml_kasus_total, jml_yes, jml_no FROM mining_c45\");\n while($rowEntropy = mysqli_fetch_assoc($sqlEntropy)) {\n $getJumlahKasusTotalEntropy = $rowEntropy['jml_kasus_total'];\n $getJumlahKasusLayakEntropy = $rowEntropy['jml_yes'];\n $getJumlahKasusTidakLayakEntropy = $rowEntropy['jml_no'];\n $idEntropy = $rowEntropy['id'];\n\n // jika jml kasus = 0 maka entropy = 0\n if ($getJumlahKasusTotalEntropy == 0 OR $getJumlahKasusLayakEntropy == 0 OR $getJumlahKasusTidakLayakEntropy == 0) {\n $getEntropy = 0;\n // jika jml kasus layak = jml kasus tdk layak, maka entropy = 1\n } else if ($getJumlahKasusLayakEntropy == $getJumlahKasusTidakLayakEntropy) {\n $getEntropy = 1;\n } else { // jika jml kasus != 0, maka hitung rumus entropy:\n $perbandingan_layak = $getJumlahKasusLayakEntropy / $getJumlahKasusTotalEntropy;\n $perbandingan_tidak_layak = $getJumlahKasusTidakLayakEntropy / $getJumlahKasusTotalEntropy;\n\n $rumusEntropy = (-($perbandingan_layak) * log($perbandingan_layak,2)) + (-($perbandingan_tidak_layak) * log($perbandingan_tidak_layak,2));\n $getEntropy = round($rumusEntropy,4); // 4 angka di belakang koma\n }\n\n//#8# Update nilai entropy\n // update nilai entropy\n mysqli_query($con,\"UPDATE mining_c45 SET entropy = $getEntropy WHERE id = $idEntropy\");\n }\n \n//#9# Lakukan perhitungan information gain\n // perhitungan information gain\n // ambil nilai entropy dari total (jumlah kasus total)\n $sqlJumlahKasusTotalInfGain = mysqli_query($con,\"SELECT jml_kasus_total, entropy FROM mining_c45 WHERE atribut = 'Total'\");\n $rowJumlahKasusTotalInfGain = mysqli_fetch_assoc($sqlJumlahKasusTotalInfGain);\n $getJumlahKasusTotalInfGain = $rowJumlahKasusTotalInfGain['jml_kasus_total'];\n // rumus information gain\n $getInfGain = (-(($getJumlahKasusTotalEntropy / $getJumlahKasusTotalInfGain) * ($getEntropy))); \n \n//#10# Update information gain tiap nilai atribut (temporary)\n // update inf_gain_temp (utk mencari nilai masing2 atribut)\n mysqli_query($con,\"UPDATE mining_c45 SET inf_gain_temp = $getInfGain WHERE id = $idEntropy\");\n $getEntropy = $rowJumlahKasusTotalInfGain['entropy'];\n\n // jumlahkan masing2 inf_gain_temp atribut \n $sqlAtributInfGain = mysqli_query($con,\"SELECT SUM(inf_gain_temp) as inf_gain FROM mining_c45 WHERE atribut = '$getAtribut'\");\n while ($rowAtributInfGain = mysqli_fetch_assoc($sqlAtributInfGain)) {\n $getAtributInfGain = $rowAtributInfGain['inf_gain'];\n\n // hitung inf gain\n $getInfGainFix = round(($getEntropy + $getAtributInfGain),4);\n\n//#11# Looping perhitungan information gain, sehingga mendapatkan information gain tiap atribut. Update information gain\n // update inf_gain (fix)\n mysqli_query($con,\"UPDATE mining_c45 SET inf_gain = $getInfGainFix WHERE atribut = '$getAtribut'\");\n } \n \n//#12# Lakukan perhitungan split info\n // rumus split info\n $getSplitInfo = (($getJumlahKasusTotalEntropy / $getJumlahKasusTotalInfGain) * (log(($getJumlahKasusTotalEntropy / $getJumlahKasusTotalInfGain),2)));\n \n//#13# Update split info tiap nilai atribut (temporary)\n // update split_info_temp (utk mencari nilai masing2 atribut)\n mysqli_query($con,\"UPDATE mining_c45 SET split_info_temp = $getSplitInfo WHERE id = $idEntropy\");\n \n // jumlahkan masing2 split_info_temp dari tiap atribut \n $sqlAtributSplitInfo = mysqli_query($con,\"SELECT SUM(split_info_temp) as split_info FROM mining_c45 WHERE atribut = '$getAtribut'\");\n while ($rowAtributSplitInfo = mysqli_fetch_assoc($sqlAtributSplitInfo)){\n $getAtributSplitInfo = $rowAtributSplitInfo['split_info'];\n\n // split info fix (4 angka di belakang koma)\n $getSplitInfoFix = -(round($getAtributSplitInfo,4));\n\n//#14# Looping perhitungan split info, sehingga mendapatkan information gain tiap atribut. Update information gain\n // update split info (fix)\n mysqli_query($con,\"UPDATE mining_c45 SET split_info = $getSplitInfoFix WHERE atribut = '$getAtribut'\");\n }\n }\n \n//#15# Lakukan perhitungan gain ratio\n $sqlGainRatio = mysqli_query($con,\"SELECT id, inf_gain, split_info FROM mining_c45\");\n while($rowGainRatio = mysqli_fetch_assoc($sqlGainRatio)) {\n $idGainRatio = $rowGainRatio['id'];\n // jika nilai inf gain == 0 dan split info == 0, maka gain ratio = 0\n if ($rowGainRatio['inf_gain'] == 0 AND $rowGainRatio['split_info'] == 0){\n $getGainRatio = 0;\n } else {\n // rumus gain ratio\n if($rowGainRatio['inf_gain'] == 0 || $rowGainRatio['split_info']==0){\n $getGainRatio = 0;\n }else{\n $getGainRatio = round(($rowGainRatio['inf_gain'] / $rowGainRatio['split_info']),4);\n }\n \n }\n \n//#16# Update gain ratio dari setiap atribut\n mysqli_query($con,\"UPDATE mining_c45 SET gain_ratio = $getGainRatio WHERE id = '$idGainRatio'\");\n }\n }\n }\n}",
"function calculate1($mode,$itemcode,$adate,$warehouse)\n{\n include \"config.php\";\n\t\t \n if ( $mode == \"Weighted Average\")\n { $wtqty = 0; \n $wtval = 0;\n\t $rtqty = 0;\n\t $rtval = 0;\n\t $cnt = 0;\n\t // Goods Receipt\n $query2 = \"SELECT * FROM pp_goodsreceipt WHERE code = '$itemcode' and aflag = '1' and adate <='$adate' \";\n $result2 = mysql_query($query2,$conn1);\n\t$cnt1 = mysql_num_rows($result2);\n while($row2 = mysql_fetch_assoc($result2))\n {\n\t $rate= 0;\n $wtqty = $wtqty + $row2['receivedquantity']; \n\t $wtval = $wtval + $row2['totalamount']; \n }\n\t //Initial Stock\n\t$query2 = \"SELECT * FROM ims_initialstock WHERE itemcode = '$itemcode' AND warehouse = '$warehouse'\";\n $result2 = mysql_query($query2,$conn1);\n\t$cnt2 = mysql_num_rows($result2); \n while($row2 = mysql_fetch_assoc($result2))\n {\n\t $rate= 0;\n $wtqty = $wtqty + $row2['quantity']; \n\t $wtval = $wtval + $row2['amount']; \n } \n\t //Direct Purchase\n\t $query2 = \"SELECT * FROM pp_sobi WHERE code = '$itemcode' and dflag = 0 and flag = 1 and warehouse = '$warehouse' and adate <= '$adate' \";\n $result2 = mysql_query($query2,$conn1);\n\t $cnt3 = mysql_num_rows($result2);\n while($row2 = mysql_fetch_assoc($result2))\n {\n\t $rate= 0;\n $wtqty = $wtqty + $row2['receivedquantity']; \n\t $wtval = $wtval + ($row2['receivedquantity'] * $row2['rateperunit']); \n }\n\t \n\t //Production\n\t \n\t $query2 = \"SELECT * FROM breeder_production WHERE itemcode = '$itemcode' and date1 <='$adate' \";\n $result2 = mysql_query($query2,$conn);\n\t $cnt4 = mysql_num_rows($result2);\n while($row2 = mysql_fetch_assoc($result2))\n {\n\t $wtqty = $wtqty + $row2['quantity'];\n\t $query21 = \"select * from ac_financialpostings where itemcode = '$itemcode' and trnum = '$row2[flock]' and type = 'Production' and date = '$row2[date1]'\";\n $result21 = mysql_query($query21,$conn);\n\t while($row21 = mysql_fetch_assoc($result21))\n { \n\t\t $wtval = $wtval + $row21['amount']; \n\t\t }\n\t\t\n }\n\t \n\t //Direct Sales\n\t //Direct Purchase\n\t $query2 = \"SELECT * FROM oc_cobi WHERE code = '$itemcode' and dflag = 0 and warehosue = '$warehouse' and flag = 1 and adate <= '$adate' \";\n $result2 = mysql_query($query2,$conn);\n\t $cnt6 = mysql_num_rows($result2);\n while($row2 = mysql_fetch_assoc($result2))\n {\n\t $rate= 0;\n $wtqty = $wtqty + $row2['quantity']; \n\t $wtval = $wtval + ($row2['quantity'] * $row2['price']); \n }\n\t \n\t\n\t\n\t \n\t if ( $cnt == 0 AND $cnt1 == 0 AND $cnt2 == 0 AND $cnt3 == 0 AND $cnt4 == 0 AND $cnt5 == 0 AND $cnt6 == 0 AND $cnt7 == 0)\n\t {\n\t $val = $row1['stdcost'];\n\t }\n\t else\n\t { \n\t $wtqty = $wtqty;\n\t $wtval = $wtval;\n\t $val = round(($wtval/$wtqty),4);\n\t }\t \n }\n\n\nreturn $val;\n}",
"public function calcFuzzyAlt() {\t\r\n\t\t$MaxAverage = 0;\r\n\t\t$this->ClearSolution();\r\n\t\t//$count_inputs = count($this->InputNames);\r\n\t\t$sum = 0;\r\n\t\t$tmpx=array();\r\n\t\t$sum = array();\r\n\t\t$cnt = array();\r\n\t\t// fill output agregate table\r\n\t\tforeach($this->getOutputNames() as $outname) {\r\n\t\t$AgregateDeltaX = ($this->FMax[$outname]-$this->FMin[$outname])/$this->AgregatePoints;\t \r\n\t\t$this->FXValues[$outname] = Range($this->FMin[$outname],$this->FMax[$outname],$AgregateDeltaX);\r\n\t\t$this->FYValues[$outname] = array_fill ( 0 , count($this->FXValues[$outname]), 0.0 );\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($this->FuzzyTable as $row_idx => $line_rule) {\r\n\t\t\t\t$sum = 0.0;\r\n\t\t\t\t$cnt = 0.0;\r\n\t\t\t\t$count_inputs = count($line_rule)-1; // last is output\r\n\t\t\t\tforeach ($line_rule as $col => $member_name) {\r\n\t\t\t\t$out_idx =$col - $count_inputs;\r\n\t\t\t\t$outname = $this->getOutputName($out_idx);\r\n\t\t\t\t\tif (!is_null($member_name)) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif ($col<$count_inputs) { // is input\r\n\t\t\t\t\t\t\t$inp_name = $this->getInputName($col);\r\n\t\t\t\t\t\t\t$mem_idx = $this->getMembersIndex($inp_name,$member_name);\r\n\t\t\t\t\t\t\t$val =$this->FOutputs[$inp_name][$mem_idx]; // get members value\r\n\t\t\t\t\t\t\tif ($val>0) { \r\n\t\t\t\t\t\t\t\t$sum+=$val; // sum members values\r\n\t\t\t\t\t\t\t\t$cnt++;\t\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t//$sum=0;\r\n\t\t\t\t\t\t\t\t//$cnt=0;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else { //is output\r\n\t\r\n\t\t\t\t\t\t\t\t$member=$this->getMemberByName($outname,$member_name); // get OUTPUT member\r\n\t\t\t\t\t\t\t\tif ($cnt == 0) $avg_sum = 0; else $avg_sum = $sum/$cnt;\r\n\t\t\t\t\t\t\t\t$this->StateOutput[$member_name] = $avg_sum;\r\n\t\t\t\t\t\t\t\tif ($avg_sum>0) $this->FuzzyAgregate($outname,$member,$avg_sum);\r\n\t\t\t\t\t\t\t\t$sum = 0.0;\r\n\t\t\t\t\t\t\t\t$cnt = 0.0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} // if $member_name\r\n\t\t\t\t} // foreach rule\t\r\n\t\t\t} // foreach rule_row\r\n\t\r\n\t\t$result = array();\r\n\t\t\r\n\t\tforeach($this->getOutputNames() as $outname) {\r\n\t\t$suma=0.0;\r\n\t\t$sumb=0.0;\r\n\t\t\r\n\t\tforeach($this->FXValues[$outname] as $id=>$x) {\r\n\t\t\t$y=$this->FYValues[$outname][$id];\r\n\t\t\tif ($y>0) {\r\n\t\t\t$suma+=($x*$y);\r\n\t\t\t$sumb+=$y;\r\n\t\t\t}\r\n\t\t}\t\r\n\t\tif ($sumb == 0) $result[]= 0; else\t$result[] = $suma/$sumb;\t\r\n\t\t}\r\n\treturn $result;\r\n}",
"public function tongChiPhiIn(){\n $settings = Yii::$app->settings;\n $calPrintingCosts = new calPrintingCosts();\n $level_quotes = (int)$settings->get('level_quotes');\n $ncc_in = Giakhomayin::find()->where(['supplierId' => intval($this->inputs->NhaCungCapIn), 'kg_default' => 1])->one();\n if($level_quotes > 2){\n for ($i = 2; $i <= $level_quotes; $i++){\n\n //chi phi thiet ke\n $this->chiPhiThietKe = floatval($this->inputs->ChiPhiThietKe);\n\n //chi phi in test\n $this->chiPhiInTest = floatval($this->inputs->order->ChiPhiInTest);\n\n //chi phi khac\n $this->chiPhiKhac = floatval($this->inputs->orderdata->tongChiPhiKhac) + floatval($this->inputs->orderdata->vanChuyenChiPhi);\n\n //tinh chi phi in va chi phi giay in\n $arr_tay = $return = $data = array();\n if(!empty($this->inputs->tay))\n $arr_tay = json_decode($this->inputs->tay, true);\n //thong tin bia\n if(intval($this->inputs->bia_ghep_ruot) != 1) {\n $data['bia'] = new \\stdClass();\n $data['bia']->chuaKepNhip = floatval($this->inputs->chua_kep_nhip);\n $data['bia']->dai = floatval($this->inputs->length);\n $data['bia']->rong = floatval($this->inputs->width) * ($this->inputs->has_inner_page == 1 ? 2 : 1) + ($this->inputs->has_inner_page == 1 && $this->inputs->nape > 0 ? $this->inputs->nape : 0);\n $data['bia']->chatLieu = intval($this->inputs->paper->GiayBiaChatLieu);\n $data['bia']->dinhLuong = intval($this->inputs->paper->GiayBiaDinhLuong);\n $data['bia']->nhaCungCap = intval($this->inputs->paper->GiayBiaNhaCungCap);\n $data['bia']->soLuong = intval($this->inputs->amount) * $i;\n $data['bia']->soToBuHao = -1;\n $data['bia']->soMauKem = intval($this->inputs->SoMauInBia);\n $data['bia']->matIn = intval($this->inputs->SoMatInBia);\n $data['bia']->nhaCungCapIn = intval($this->inputs->NhaCungCapIn);\n $data['bia']->taiSanPham = intval($this->inputs->has_ear);\n $data['bia']->viTriTai = intval($this->inputs->vi_tri_tai);\n $data['bia']->taiDai = floatval($this->inputs->tai_dai);\n $data['bia']->taiRong = floatval($this->inputs->tai_rong);\n $data['bia']->type = 'gb';\n $data['bia']->donGia = floatval($this->inputs->paper->GiayBiaPrice);\n $data['bia']->khoGiay = 0;\n $data['bia']->khoMay = !empty($ncc_in) ? $ncc_in->kg_id : 0;\n $data['bia']->soSanPham = intval($this->inputs->amount) * $i;\n $data['bia']->kieuDong = intval($this->inputs->KieuDong);\n $data['bia']->cachTinh = $this->inputs->calcu_type;\n $data['bia']->biaGhepRuot = intval($this->inputs->bia_ghep_ruot);\n $data['bia']->soTrangRuot = intval($this->inputs->inner_page_amount);\n $data['bia']->inChungKho = 0;\n $data['bia']->khoGiayTayCuoi = 0;\n $data['bia']->viTriNhip = intval($this->inputs->vt_nhip_bia);\n $data['bia']->mauPha = intval($this->inputs->MauPhaBia);\n $data['bia']->heSoMauPha = floatval($settings->get('he_so_mau_pha'));\n $data['bia']->kieuHop = intval($this->inputs->KieuHop);\n $data['bia']->cao = floatval($this->inputs->thick);\n $data['bia']->kichThuocTai = floatval($this->inputs->kich_thuoc_tai);\n $data['bia']->kichThuocCaiDay = floatval($this->inputs->kich_thuoc_cai_day);\n $data['bia']->boiSongE = floatval($this->inputs->boi_song_e);\n $data['bia']->taiNap = $this->inputs->tai_nap > 0 ? floatval($this->inputs->tai_nap) : 0;\n $data['bia']->kichThuocNap = floatval($this->inputs->kich_thuoc_nap);\n $data['bia']->nap_hop = 0;\n $data['bia']->loaiSanPham = $this->inputs->product_type;\n $data['bia']->giaTriBoiSongE = $this->inputs->product->boi_song_e;\n $data['bia']->buHaoNoiXen = $this->inputs->product->bu_hao_noi_xen;\n $data['bia']->DonGiaKem = !empty($ncc_in) ? $ncc_in->price_k : '';\n $data['bia']->DonGiaIn = !empty($ncc_in) ? $ncc_in->price_i : '';\n $data['bia']->khoKemDai = !empty($ncc_in) ? $ncc_in->kem_dai : '';\n $data['bia']->khoKemRong = !empty($ncc_in) ? $ncc_in->kem_rong : '';\n $data['bia']->banTinh = Yii::$app->settings->get('cach_tinh_gia') == 0 ? 'thuongmai' : 'dinhmuc';\n $data['bia']->thanhPham = 0;\n $data['bia']->istayCuoi = 0;\n $data['bia']->kieuTro = $this->inputs->kieu_in_tro;\n $data['bia']->quyCachIn = trim($this->inputs->QuyCachIn);\n $data['bia']->kieuInGiaTrucTiep = intval($this->inputs->checkbox_hasnt_formula_kieu_in);\n $return['bia'] = $calPrintingCosts->_productSize($data['bia']);\n $this->chiPhiIn = floatval($return['bia']['chiPhiIn']);\n $this->chiPhiGiayIn = floatval($return['bia']['chiPhiGiayIn']);\n }\n\n if($this->inputs->has_inner_page == 1 || $this->inputs->KieuHop == Products::HOP_CUNG_DINH_HINH) {\n //thong tin bia\n $soLuong_ = intval($this->inputs->amount) * $i;\n $data['ruot'] = new \\stdClass();\n $data['ruot']->chuaKepNhip = floatval($this->inputs->chua_kep_nhip);\n $data['ruot']->dai = floatval($this->inputs->length);\n $data['ruot']->rong = floatval($this->inputs->width) * ($this->inputs->KieuDong == OrderInfo::DONG_GIUA ? 2 : 1);\n $data['ruot']->chatLieu = intval($this->inputs->paper->GiayRuotChatLieu);\n $data['ruot']->dinhLuong = intval($this->inputs->paper->GiayRuotDinhLuong);\n $data['ruot']->nhaCungCap = intval($this->inputs->paper->GiayRuotNhaCungCap);\n $data['ruot']->soLuong = intval($this->inputs->inner_page_amount);\n $data['ruot']->soToBuHao = -1;\n $data['ruot']->soMauKem = intval($this->inputs->SoMauInRuot);\n $data['ruot']->matIn = intval($this->inputs->SoMatInRuot);\n $data['ruot']->nhaCungCapIn = intval($this->inputs->NhaCungCapIn);\n $data['ruot']->taiSanPham = intval($this->inputs->has_ear);\n $data['ruot']->viTriTai = intval($this->inputs->vi_tri_tai);\n $data['ruot']->taiDai = floatval($this->inputs->tai_dai);\n $data['ruot']->taiRong = floatval($this->inputs->tai_rong);\n $data['ruot']->type = 'gr';\n $data['ruot']->donGia = floatval($this->inputs->paper->GiayRuotPrice);\n $data['ruot']->khoGiay = 0;\n $data['ruot']->khoMay = !empty($ncc_in) ? $ncc_in->kg_id : 0;\n $data['ruot']->soSanPham = $soLuong_;\n $data['ruot']->kieuDong = intval($this->inputs->KieuDong);\n $data['ruot']->cachTinh = trim($this->inputs->calcu_type);\n $data['ruot']->biaGhepRuot = intval($this->inputs->bia_ghep_ruot);\n $data['ruot']->soTrangRuot = intval($this->inputs->inner_page_amount);\n $data['ruot']->inChungKho = !empty($arr_tay) && isset($arr_tay['InCungKhoGiay']) && $arr_tay['InCungKhoGiay'] > 0 ? 1 : 0;\n $data['ruot']->khoGiayTayCuoi = 0;\n $data['ruot']->viTriNhip = intval($this->inputs->vt_nhip_ruot);\n $data['ruot']->mauPha = intval($this->inputs->MauPhaRuot);\n $data['ruot']->heSoMauPha = floatval($settings->get('he_so_mau_pha'));\n $data['ruot']->kieuHop = intval($this->inputs->KieuHop);\n $data['ruot']->cao = floatval($this->inputs->thick);\n $data['ruot']->kichThuocTai = floatval($this->inputs->kich_thuoc_tai);\n $data['ruot']->kichThuocCaiDay = floatval($this->inputs->kich_thuoc_cai_day);\n $data['ruot']->boiSongE = floatval($this->inputs->boi_song_e);\n $data['ruot']->taiNap = $this->inputs->tai_nap > 0 ? floatval($this->inputs->tai_nap) : 0;\n $data['ruot']->kichThuocNap = floatval($this->inputs->kich_thuoc_nap);\n $data['ruot']->nap_hop = 0;\n $data['ruot']->loaiSanPham = intval($this->inputs->product_type);\n $data['ruot']->DonGiaKem = !empty($ncc_in) ? $ncc_in->price_k : '';\n $data['ruot']->DonGiaIn = !empty($ncc_in) ? $ncc_in->price_i : '';\n $data['ruot']->khoKemDai = !empty($ncc_in) ? $ncc_in->kem_dai : '';\n $data['ruot']->khoKemRong = !empty($ncc_in) ? $ncc_in->kem_rong : '';\n $data['ruot']->kieuInGiaTrucTiep = floatval($this->inputs->checkbox_hasnt_formula_kieu_in);\n $data['ruot']->istayCuoi = 0;\n $data['ruot']->kieuTro = '';\n $data['ruot']->quyCachIn = trim($this->inputs->QuyCachInRuot);\n $data['ruot']->banTinh = Yii::$app->settings->get('cach_tinh_gia') == 0 ? 'thuongmai' : 'dinhmuc';\n $data['ruot']->thanhPham = 0;\n $data['ruot']->buHaoTayCuoi = -1;\n $data['ruot']->thanhPhamTayCuoi = 0;\n if($this->inputs->KieuHop == Products::HOP_CUNG_DINH_HINH) {\n $data['ruot']->soLuong = $soLuong_;\n $data['ruot']->nap_hop = 1;\n }\n\n $return['ruot'] = $calPrintingCosts->_productSize($data['ruot']);\n// print_r($data['ruot']);\n $this->chiPhiIn += floatval($return['ruot']['chiPhiIn']);\n $this->chiPhiGiayIn += floatval($return['ruot']['chiPhiGiayIn']);\n if(!empty($return['ruot']['tay_cuoi'])){\n $this->chiPhiIn += floatval($return['ruot']['tay_cuoi']['chiPhiIn']);\n $this->chiPhiGiayIn += floatval($return['ruot']['tay_cuoi']['chiPhiGiayIn']);\n }\n\n //ruot mo rong\n if(!empty($this->inputs->paper->GiayRuotMoRong)){\n $giayRuotMoRong = json_decode($this->inputs->paper->GiayRuotMoRong);\n $kieuInMoRong = json_decode($this->inputs->KieuInMoRong);\n $soLuong = json_decode($this->inputs->ext_inner_page_amount, true);\n if (!is_array($this->inputs->ext_mau_pha_ruot) && !empty($this->inputs->ext_mau_pha_ruot))\n $ext_mau_pha_ruot = json_decode($this->inputs->ext_mau_pha_ruot, true);\n elseif (!empty($this->inputs->ext_mau_pha_ruot))\n $ext_mau_pha_ruot = $this->inputs->ext_mau_pha_ruot;\n\n if(!empty($giayRuotMoRong)){\n $k_ = -1;\n foreach ($giayRuotMoRong as $k => $v) {\n $k_++;\n\n $soLuongRuot = $soLuong[$k_];\n $data['ruot'.$k] = new \\stdClass();\n $data['ruot'.$k]->chuaKepNhip = floatval($this->inputs->chua_kep_nhip);\n $data['ruot'.$k]->dai = floatval($this->inputs->length);\n $data['ruot'.$k]->rong = floatval($this->inputs->width) * ($this->inputs->KieuDong == OrderInfo::DONG_GIUA ? 2 : 1);\n $data['ruot'.$k]->chatLieu = intval($v->GiayRuotChatLieu);\n $data['ruot'.$k]->dinhLuong = intval($v->GiayRuotDinhLuong);\n $data['ruot'.$k]->nhaCungCap = intval($v->GiayRuotNhaCungCap);\n $data['ruot'.$k]->soLuong = intval($soLuongRuot);\n $data['ruot'.$k]->soToBuHao = -1;\n $data['ruot'.$k]->soMauKem = intval($kieuInMoRong->{$k}->SoMauInRuot);\n $data['ruot'.$k]->soMau = intval($kieuInMoRong->{$k}->SoMauInRuot);\n $data['ruot'.$k]->matIn = intval($kieuInMoRong->{$k}->SoMatInRuot);\n $data['ruot'.$k]->nhaCungCapIn = intval($this->inputs->NhaCungCapIn);\n $data['ruot'.$k]->taiSanPham = intval($this->inputs->has_ear);\n $data['ruot'.$k]->viTriTai = intval($this->inputs->vi_tri_tai);\n $data['ruot'.$k]->taiDai = floatval($this->inputs->tai_dai);\n $data['ruot'.$k]->taiRong = floatval($this->inputs->tai_rong);\n $data['ruot'.$k]->type = 'gr';\n $data['ruot'.$k]->donGia = floatval($v->GiayRuotPrice);\n $data['ruot'.$k]->khoGiay = 0;\n $data['ruot'.$k]->khoMay = !empty($ncc_in) ? $ncc_in->kg_id : 0;\n $data['ruot'.$k]->soSanPham = intval($this->inputs->amount) * $i;\n $data['ruot'.$k]->kieuDong = intval($this->inputs->KieuDong);\n $data['ruot'.$k]->cachTinh = trim($this->inputs->calcu_type);\n $data['ruot'.$k]->biaGhepRuot = intval($this->inputs->bia_ghep_ruot);\n $data['ruot'.$k]->soTrangRuot = intval($soLuongRuot);\n $data['ruot'.$k]->inChungKho = !empty($arr_tay) && isset($arr_tay['InCungKhoGiay'.$k]) && $arr_tay['InCungKhoGiay'.$k] > 0 ? 1 : 0;\n $data['ruot'.$k]->khoGiayTayCuoi = 0;\n $data['ruot'.$k]->viTriNhip = intval($this->inputs->vt_nhip_ruot);\n $data['ruot'.$k]->mauPha = intval($ext_mau_pha_ruot[$k_]);\n $data['ruot'.$k]->heSoMauPha = floatval($settings->get('he_so_mau_pha'));\n $data['ruot'.$k]->loaiSanPham = floatval($this->inputs->product_type);\n $data['ruot'.$k]->DonGiaKem = !empty($ncc_in) ? $ncc_in->price_k : '';\n $data['ruot'.$k]->DonGiaIn = !empty($ncc_in) ? $ncc_in->price_i : '';\n $data['ruot'.$k]->khoKemDai = !empty($ncc_in) ? $ncc_in->kem_dai : '';\n $data['ruot'.$k]->khoKemRong = !empty($ncc_in) ? $ncc_in->kem_rong : '';\n $data['ruot'.$k]->kieuInGiaTrucTiep = intval($this->inputs->checkbox_hasnt_formula_kieu_in);\n $data['ruot'.$k]->istayCuoi = 0;\n $data['ruot'.$k]->nap_hop = 0;\n $data['ruot'.$k]->quyCachIn = trim($kieuInMoRong->{$k}->QuyCachInRuot);\n $data['ruot'.$k]->banTinh = Yii::$app->settings->get('cach_tinh_gia') == 0 ? 'thuongmai' : 'dinhmuc';\n $data['ruot'.$k]->kieuHop = intval($this->inputs->KieuHop);\n $data['ruot'.$k]->thanhPham = 0;\n $data['ruot'.$k]->buHaoTayCuoi = -1;\n $data['ruot'.$k]->thanhPhamTayCuoi = 0;\n $data['ruot'.$k]->kieuTro = $this->inputs->kieu_in_tro_ruot;\n $return['ruot'.$k] = $calPrintingCosts->_productSize($data['ruot'.$k]);\n $this->chiPhiIn += floatval($return['ruot'.$k]['chiPhiIn']);\n $this->chiPhiGiayIn += floatval($return['ruot'.$k]['chiPhiGiayIn']);\n if(!empty($return['ruot'.$k]['tay_cuoi'])){\n $this->chiPhiIn += floatval($return['ruot'.$k]['tay_cuoi']['chiPhiIn']);\n $this->chiPhiGiayIn += floatval($return['ruot'.$k]['tay_cuoi']['chiPhiGiayIn']);\n }\n }\n }\n }\n }\n if($this->inputs->checkbox_hasnt_formula_kieu_in == 1){\n $this->chiPhiIn = $this->inputs->ChiPhiInBia;\n }\n\n if($this->inputs->paper->checkbox_hasnt_formula_giay_in == 1){\n $this->chiPhiGiayIn = $this->inputs->paper->TongChiPhiGiayIn;\n }\n //het phan tinh chi phi in + chi phi giay in\n\n $this->chiPhiRaCan = 0;\n //chi phi ra kem\n if(!empty($this->inputs->XuatRaMoRong)) {\n $raPhim = json_decode($this->inputs->XuatRaMoRong, true);\n if(!empty($raPhim)){\n foreach ($raPhim as $v){\n $donGia = $v['ExportDonGia'];\n if($v['ExportType'] == 1){\n $dai = $return[$v['ExportBiaRuot']]['info']['length'];\n $rong = $return[$v['ExportBiaRuot']]['info']['width'];\n }elseif($v['ExportType'] == 3){\n $dai = $return[$v['ExportBiaRuot']]['khoMay']['kem_dai'];\n $rong = $return[$v['ExportBiaRuot']]['khoMay']['kem_rong'];\n }\n if($v['ExportBiaRuot'] == 'bia')\n $soluong = 1;\n else\n $soluong = floor($return[$v['ExportBiaRuot']]['soTay']);\n $soMau = $data[$v['ExportBiaRuot']]->soMauKem;\n if($v['ExportAddColor'] == 1)\n $soMau += 1;\n //( dai * rong * soluong * soMau * donGia)\n\n //neu co tay le va khong chon in cung mot kho giay\n if($v['ExportBiaRuot'] != 'bia' && !empty($return[$v['ExportBiaRuot']]['tay_cuoi'])){\n if(strpos($v['ExportBiaRuot'],'ruot') !== false)\n $soMau_ = $data[$v['ExportBiaRuot']]->soMauKem;\n// if($v['ExportAddColor'] == 1)\n// $soMau_ += 1;\n $this->chiPhiRaCan += $dai * $rong * $soluong * $soMau_ * $donGia;\n// print_r(\"($dai * $rong * $soluong * $soMau_ * $donGia)\");\n\n if(!empty($return[$v['ExportBiaRuot']]['tay_cuoi'])) {\n if ($v['ExportType'] == 1) {\n $dai = $return[$v['ExportBiaRuot']]['tay_cuoi']['info']['length'];\n $rong = $return[$v['ExportBiaRuot']]['tay_cuoi']['info']['width'];\n } elseif ($v['ExportType'] == 3) {\n $dai = $return[$v['ExportBiaRuot']]['tay_cuoi']['khoMay']['kem_dai'];\n $rong = $return[$v['ExportBiaRuot']]['tay_cuoi']['khoMay']['kem_rong'];\n }\n $soMau = $return[$v['ExportBiaRuot']]['tay_cuoi']['soMauKem'];\n if (!empty($dai) && !empty($rong) && !empty($soMau) && !empty($donGia))\n $this->chiPhiRaCan += $dai * $rong * $soMau * $donGia;\n// print_r(\"|$dai * $rong * $soMau * $donGia|\");\n }\n }else{\n if(!empty($dai) && !empty($rong) && !empty($soMau) && !empty($donGia) && !empty($soMau))\n $this->chiPhiRaCan += $dai * $rong * $soluong * $soMau * $donGia;\n// print_r(\"($dai * $rong * $soluong * $soMau * $donGia)\");\n }\n// print_r($v);\n\n }\n }\n\n }\n\n //chi phi gia cong\n $this->chiPhiGiaCong = 0;\n if(!empty($this->inputs->giacong)){\n $result = 0;\n foreach ($this->inputs->giacong as $v){\n if($v->checkbox_hasnt_formula_gia_cong == 1){\n $this->chiPhiGiaCong += $v->ChiPhiGiaCong;\n }else {\n $dai = $return[$v->Bia_Ruot]['info']['length'];\n $rong = $return[$v->Bia_Ruot]['info']['width'];\n $soLuong = intval($this->inputs->amount) * $i;\n $soToIn = $return[$v->Bia_Ruot]['soTo'];\n $soTrang = $soToIn * $return[$v->Bia_Ruot]['thanhPham'] * 2;\n $donGia = $v->DonGia;\n $soMatCan = $v->SoMat;\n\n $congthuc = str_replace(array('dai', 'rong', 'soLuong', 'soLuongSanPham', 'donGia', 'soMatCan', 'soToIn', 'soTrang'), array('$dai', '$rong', '$soLuong', '$soLuong', '$donGia', '$soMatCan', '$soToIn', '$soTrang'), $v->content->formula);\n eval('$result = ' . $congthuc . ';');\n if(!empty($result) && $result >= 0) {\n $this->chiPhiGiaCong += $result;\n }\n\n if ($v->Bia_Ruot != 'bia' && !empty($return[$v->Bia_Ruot]['tay_cuoi'])) {\n $dai = $return[$v->Bia_Ruot]['tay_cuoi']['info']['length'];\n $rong = $return[$v->Bia_Ruot]['tay_cuoi']['info']['width'];\n $soToIn = $return[$v->Bia_Ruot]['tay_cuoi']['soTo'];\n $soTrang = $soToIn * $return[$v->Bia_Ruot]['tay_cuoi']['thanhPham'] * 2;\n\n $congthuc = str_replace(array('dai', 'rong', 'soLuong', 'soLuongSanPham', 'donGia', 'soMatCan', 'soToIn', 'soTrang'), array('$dai', '$rong', '$soLuong', '$soLuong', '$donGia', '$soMatCan', '$soToIn', '$soTrang'), $v->content->formula);\n eval('$result = ' . $congthuc . ';');\n if(!empty($result) && $result >= 0) {\n $this->chiPhiGiaCong += $result;\n }\n }\n }\n }\n }\n $this->chiPhiGiaCong = ceil($this->chiPhiGiaCong);\n\n// print_r($data['ruot2']);\n// print_r($return);\n//print_r(\"$this->chiPhiThietKe + $this->chiPhiIn + $this->chiPhiGiayIn + $this->chiPhiRaCan + $this->chiPhiInTest + $this->chiPhiGiaCong + $this->chiPhiKhac\");\n//die;\n\n $chiPhiTruocThue = $this->chiPhiThietKe + $this->chiPhiIn + $this->chiPhiGiayIn + $this->chiPhiRaCan + $this->chiPhiInTest + $this->chiPhiGiaCong + $this->chiPhiKhac;\n $tongChiPhiPhanTram = (int)$this->inputs->orderdata->tongChiPhiPhanTram;\n if($tongChiPhiPhanTram <= 0){\n $tongChiPhiPhanTram = (int) $settings->get('profit_percent_for_each_product');\n }\n $soLuongSanPham = intval($this->inputs->amount) * $i;\n $donGia = sprintf('%0.2f', $chiPhiTruocThue/$soLuongSanPham);\n $this->tongChiPhi[$i]['don_gia'] = sprintf('%0.2f', ($donGia + $donGia * $tongChiPhiPhanTram / 100));\n $this->tongChiPhi[$i]['chi_phi'] = round($chiPhiTruocThue);\n }\n }\n return $this->tongChiPhi;\n }"
] | [
"0.65922076",
"0.6440212",
"0.63504416",
"0.6298489",
"0.6185077",
"0.5963305",
"0.578421",
"0.57371336",
"0.57322234",
"0.56416786",
"0.56412804",
"0.5573454",
"0.55624884",
"0.5520984",
"0.5491247",
"0.54644036",
"0.54556566",
"0.5453484",
"0.54522675",
"0.5441213",
"0.54389524",
"0.5425068",
"0.5420989",
"0.5409754",
"0.5406408",
"0.5389167",
"0.5380875",
"0.53599095",
"0.5352628",
"0.53512186"
] | 0.7241965 | 0 |
replace keputusan jika ada keputusan yg Null | function replaceNull()
{
$con = @mysqli_connect('localhost', 'root', '', 'db_ai');
if (!$con) {
echo "Error: " . mysqli_connect_error();
exit();
}
$sqlReplaceNull = mysqli_query($con,"SELECT id, id_parent FROM pohon_keputusan_c45 WHERE keputusan = 'Kosong' OR keputusan = '' OR keputusan = '?' ");
while($rowReplaceNull = mysqli_fetch_assoc($sqlReplaceNull)) {
$sqlReplaceNullIdParent = mysqli_query($con,"SELECT jml_yes, jml_no, keputusan FROM pohon_keputusan_c45 WHERE id = $rowReplaceNull[id_parent]");
$rowReplaceNullIdParent = mysqli_fetch_assoc($sqlReplaceNullIdParent);
if ($rowReplaceNullIdParent['jml_yes'] > $rowReplaceNullIdParent['jml_no']) {
$keputusanNull = '>50k'; // jika jml_yes != 0 dan jml_no = 0, maka keputusan Layak
} else if ($rowReplaceNullIdParent['jml_yes'] < $rowReplaceNullIdParent['jml_no']) {
$keputusanNull = '<=50k'; // jika jml_yes = 0 dan jml_no != 0, maka keputusan Tidak Layak
}
mysqli_query($con,"UPDATE pohon_keputusan_c45 SET keputusan = '$keputusanNull' WHERE id = $rowReplaceNull[id]");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_repeticion('');\n $this->setRepeticion('');\n $this->setTemporada('');\n $this->setTipo('');\n $this->setPrimary_key($aPK);\n }",
"function blanc_to_null($val) \r\n{\r\n if ($val == '') \r\n {\r\n $val = NULL; \r\n }\r\n return $val;\r\n}",
"function update_null($table = null, $id = 0, $campo = null, $chave = null, $id2 = null, $chave2 = null) {\n\n\t$database = open_database();\n\n\n // remove a ultima virgula\n $sql = \"UPDATE \" . $table;\n $sql .= \" SET \" . $campo . '=NULL ';\n\n\tif (is_string($id)) :\n\t\t $sql .= \" WHERE \" . $chave . \"= '\" . $id . \"'\";\n else :\n\t\t\t\t\t\t\t\t\t $sql .= \" WHERE \" . $chave . \"=\" . $id;\n\tendif;\n\n\tif ($id2): $sql .= \" AND \" . $chave2 . \" = \" . $id2; endif;\n\n\t$sql .= ';';\n\n\n\n try {\n $result = pg_query($database, $sql);\n\n\t\tif($result) {\n\t\t\t$_SESSION['message'] = 'Registro atualizado com sucesso.';\n\t $_SESSION['type'] = 'success';\n\t\t} else {\n\t\t\t$_SESSION['message'] = pg_last_error($database);\n\t\t\t$_SESSION['type'] = 'danger';\n\t\t}\n\n } catch (Exception $e) {\n $_SESSION['message'] = 'Nao foi possivel realizar a operacao.';\n $_SESSION['type'] = 'danger';\n }\n close_database($database);\n}",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_activ('');\n $this->setId_nom('');\n $this->setPropio('');\n $this->setEst_ok('');\n $this->setCfi('');\n $this->setCfi_con('');\n $this->setFalta('');\n $this->setEncargo('');\n $this->setDl_responsable('');\n $this->setObserv('');\n $this->setObserv_est('');\n $this->setPlazaSinComprobar('');\n $this->setPropietario('');\n $this->setId_tabla('');\n $this->setPrimary_key($aPK);\n }",
"public function reset(){\n foreach ($this->fields as $field){\n if (array_key_exists($field, $this->fields)) {\n $this->$field=null;\n }\n }\n }",
"public function setNullValue($var) {}",
"public function includeNull();",
"protected function setNull()\n {\n // clean up class storage\n // http://kriswallsmith.net/post/18029585104/faster-phpunit\n $refl = new ReflectionObject($this);\n foreach ($refl->getProperties() as $prop) {\n // skip static and vars belonging to PhpUnit\n if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {\n $prop->setAccessible(true);\n $prop->setValue($this, null);\n }\n }\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_nom('');\n $this->setF_traslado('');\n $this->setTipo_cmb('');\n $this->setId_ctr_origen('');\n $this->setCtr_origen('');\n $this->setId_ctr_destino('');\n $this->setCtr_destino('');\n $this->setObserv('');\n $this->setPrimary_key($aPK);\n }",
"public function resetInput(){\n $this->nik_ayah = null;\n $this->nik_ibu = null;\n $this->nm_ayah = null;\n $this->nm_ibu = null;\n $this->tgl_lahir_ayah = null;\n $this->tgl_lahir_ibu = null;\n $this->no_tlpn = null;\n $this->alamat = null;\n }",
"public function testNoneValues()\n {\n\n $exhibit = $this->_exhibit();\n $exhibit->styles = \"\n .tag1 {\n point-image: none;\n }\n \";\n $record = new NeatlineRecord($exhibit);\n $record->point_image = 'img';\n $record->tags = 'tag1';\n $record->save();\n\n $exhibit->pushStyles();\n $record = $this->_reload($record);\n\n // Should push `none` as NULL.\n $this->assertNull($record->point_image);\n\n }",
"function verif_null($var){\n if($var!=\"\"\n && $var!=\"n facture\"\n && $var!=\"date facture\"\n && $var!=\"date prestation\"\n && $var!=\"votre société\"\n && $var!=\"name contact\"\n ){\n return $var;\n }\n\n else{echo\"veuillez compléter les vides\";}\n }",
"public function reset()\n {\n $this->values[self::text] = null;\n $this->values[self::description] = null;\n $this->values[self::rebates_wholesaler] = null;\n $this->values[self::rebates_lelai] = null;\n $this->values[self::off_money] = null;\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_mod('');\n $this->setNom('');\n $this->setDescripcion('');\n $this->setMods_req('');\n $this->setApps_req('');\n $this->setPrimary_key($aPK);\n }",
"public function setCurrencyAsNull(): void\n {\n \\Logger::getLogger(\\get_class($this))->info(__METHOD__.\" set as null\");\n $this->currency = null;\n }",
"function borra() {\n $this->setGolL(null);\n $this->setGolV(null);\n $this->persist();\n }",
"private function resetInput()\n {\t\t\n $this->selected_id = null;\n $this->cam_dni = null;\n $this->cam_apellidos = null;\n $this->cam_nombres = null;\n $this->cam_fechan = null;\n }",
"function replaceBlankAnswers() {\n\t\tforeach($this->arrCsvRow as $intKey => $strValue) {\n\t\t\tif(is_int($intKey) && t3lib_div::inList('1,23,2,3,4,5', $this->pObj->arrSurveyItems[$intKey]['question_type']) && $strValue == '')\t{\n\t\t\t\t$this->arrCsvRow[$intKey] = $this->strReplacementForBlankAnswers;\n\t\t\t}\n\t\t}\n\t}",
"public function reset() {\n $this->values[self::ORI_VALUE] = null;\n $this->values[self::VALUE] = null;\n }",
"protected function checkForNull($param){\n foreach($param as $key=>$value){\n if(is_null($value) || $value == '')\n unset($param[$key]);\n }\n return $param;\n }",
"public function reset() {\n $this->values[self::POINT] = null;\n $this->values[self::NAME] = null;\n $this->values[self::AQI] = null;\n $this->values[self::UPDATE_TIME] = null;\n }",
"public function replace();",
"public function reset() {\n $this->values[self::ORI_VALUE] = null;\n $this->values[self::LINK] = null;\n $this->values[self::ICON_ID] = null;\n }",
"function verif_null($var){\n\t if($var!=\"\"\n\t \t&& $var!=\"modifier le nom\"\n\t \t&& $var!=\"modifier le prenom\"\n\t \t&& $var!=\"modifier le n° de tel.\"\n\t \t&& $var!=\"modifier l'e-mail\"\n\t ){return $var;}\n\t else{echo\"veuillez compléter les vides\";}\n\t}",
"function wp_db_null_value( $query )\n{\n return str_ireplace( \"'NULL'\", \"NULL\", $query );\n}",
"private function resetValues() {\r\n\r\n\t\t$this->NAME = null;\r\n\t\t$this->NAVIGATIONCAPTION = null;\r\n\t\t$this->DESCRIPTION = null;\r\n\t}",
"public function reset() {\n $this->values[self::PT] = null;\n $this->values[self::WD] = null;\n $this->values[self::UID] = null;\n $this->values[self::BUS_STOP] = null;\n $this->values[self::SPT] = array();\n }",
"public function reset() {\n $this->values[self::PT] = null;\n $this->values[self::WD] = null;\n $this->values[self::UID] = null;\n $this->values[self::BUS_STOP] = null;\n $this->values[self::SPT] = array();\n }",
"protected function escapeNULL()\n {\n return 'NULL';\n }",
"function removeVariaveisReal($fil)\n{\n\n$posicaorealInicial = strpos($fil,\"real\");\n//encontrando o fim da linha \nif ($posicaorealInicial){\n\t\t$posicaorealFinal = strpos($fil,\";\",$posicaorealInicial);\n\t\t//pegando as variaveis \n\t\t$variaveisrealS = substr($fil,$posicaorealInicial,$posicaorealFinal-$posicaorealInicial);\n\t\t//$variaveisreal = ;\n\t\t//declarando as variaveis real \n\t\t$variaveisreal = explode(',',str_replace(array('real ',';',' '),\"\",$variaveisrealS));\n\t\t//limpa a linha variaveis real \n\t\t$ireal=0;\n\t\t$linhaStringvariaveisreal = \"\";\n\t\t$fil = substr_replace($fil,\" \",$posicaorealInicial,$posicaorealFinal-$posicaorealInicial+1);\n\t\tif (count($variaveisreal) > 1){\n\t\t\tforeach ($variaveisreal as $varreal) {\n\t\t\t $s =\"(float)$\".$varreal;\t\n\t\t\t\t$fil = str_replace($varreal,$s,$fil);\n\t\t\t\t$ireal++;\n\t\t\t\t$linhaStringvariaveisreal = $linhaStringvariaveisreal.$s.\"=0.0;\\n \";\n\t\t\t}\n\t\t\t$fil = substr_replace($fil,$linhaStringvariaveisreal,$posicaorealInicial,0);\n\t\t}\n\t\treturn $fil;\n\t}else { return $fil;}\n\n}"
] | [
"0.6239089",
"0.6011364",
"0.5881847",
"0.5851808",
"0.5845892",
"0.5801217",
"0.5797291",
"0.5775125",
"0.5765053",
"0.57238674",
"0.5680068",
"0.56584567",
"0.56553453",
"0.56455755",
"0.5641064",
"0.5634975",
"0.56223375",
"0.56129974",
"0.55697024",
"0.554328",
"0.5522499",
"0.5476177",
"0.54719263",
"0.544906",
"0.5431178",
"0.5422371",
"0.53991187",
"0.53991187",
"0.53853565",
"0.53842"
] | 0.62665236 | 0 |
Returns true if the specified class contains and class, method, or property level annotations. | public static function hasAnnotations($class) {
$clazz = new AnnotatedClass($class);
if($clazz->isAnnotated()) return true;
foreach($clazz->getMethods() as $method)
if($method->isAnnotated()) return true;
foreach($clazz->getProperties() as $property)
if($property->isAnnotated()) return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function supports(\\ReflectionClass $class);",
"private function supports(string $class): bool\n {\n $class = new \\ReflectionClass($class);\n\n // We look for at least one non-static property\n do {\n foreach ($class->getProperties() as $property) {\n if (!$property->isStatic()) {\n return true;\n }\n }\n } while ($class = $class->getParentClass());\n\n return false;\n }",
"public function hasClass(string $class): bool;",
"public function accepts($class): bool;",
"public function hasClass( string $class ) : bool {\n\n\t\treturn in_array( $class, $this->getAttribute( 'class' ) );\n\n\t}",
"public function has_annotation($obj, $annotation);",
"public function hasClass($class)\n\t{\n\t\treturn in_array($class, $this->classes);\n\t}",
"public function hasClass($class) {\n\t\tif( !empty($class) ) {\n\t\t\tif( isset($this->attr['class']) ) {\n\t\t\t\t$attrClass = explode(' ', $this->attr['class']);\n\t\t\t\tforeach( $attrClass as $className ) {\n\t\t\t\t\tif( $className == $class ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public function supportsClass($class)\n {\n return true;\n }",
"public function supportsClass($class)\n {\n return true;\n }",
"public function supportsClass($class)\n {\n return true;\n }",
"public function hasClass($class, $type = DrupalAttributes::ATTRIBUTES) {\n return $this->getAttributes($type)->hasClass($class);\n }",
"public function supportsClass($class)\n {\n }",
"public function matchesClass(\\ReflectionClass $class)\n {\n $className = $class->getName();\n\n if (substr($className, -10, 10) == 'Controller' &&\n strpos($className, 'ExceptionController') === false\n ) {\n return true;\n }\n\n return false;\n }",
"public function supportsClass($class)\n {\n // TODO: Implement supportsClass() method.\n }",
"public function supportsClass($class)\n {\n // TODO: Implement supportsClass() method.\n }",
"private function hasAnnotation($method, $annotation)\n\t{\n\t\t$reflection = new ReflectionAnnotatedMethod($this, $method);\n\t\treturn $reflection->hasAnnotation($annotation);\n\t}",
"public function hasAnnotationElement(): bool;",
"public function hasClassName($class) {\r\n\t\t$classes = $this->getClassNames();\r\n\t\treturn in_array($class, $classes);\r\n\t}",
"function accessible($class, $method, array $caller) {\n $method = new ReflectionMethod($class, $method);\n if (!$method->isPublic()) {\n if (!array_key_exists('class', $caller)) {\n return false;\n }\n else {\n if ($method->isProtected() && ($caller['class'] != $class && !is_subclass_of($caller['class'], $class))) {\n return false;\n }\n elseif ($method->isPrivate() && $caller['class'] != $class) {\n return false;\n }\n }\n }\n return true;\n }",
"public function supportsClass(string $class): bool\n {\n return $class === User::class;\n }",
"protected function isSpecificClass($class)\n {\n if (!ctype_alpha(Tools::substr($class, 0, 1)) || preg_match('/[\\'^£$%&*()}{\\x20@#~?><>,|=+¬]/', $class)) {\n return false;\n }\n\n return true;\n }",
"public function supportsClass($class): bool\n {\n return $class === User::class;\n }",
"public function supportsClass(string $class)\n {\n }",
"public function classIsInAllowedNamespace($class)\n {\n foreach ($this->namespaces as $ns) {\n $canonicalClass = $this->canonicalizeClass($class);\n if (strpos($canonicalClass, $ns) === 0) {\n return true;\n }\n }\n \n return false;\n }",
"public function htmlHasClass($class) {\n\t\tforeach ($this->e_classes as $c) {\n\t\t\tif ($class === $c) return true;\n\t\t}\n\t\treturn false;\n\t}",
"public function hasAnnotation($annotation) {\n\t\t// Get all the annotations\n\t\t$this->annotations = $this->parser->getParams();\n\t\t\n\t\tif(array_key_exists($annotation, $this->annotations)) return true;\n\t\telse return false;\n\t}",
"public function hasAnnotation($annotation) {\n\t\t// Get all the annotations\n\t\t$this->annotations = $this->parser->getParams();\n\t\t\n\t\tif(array_key_exists($annotation, $this->annotations)) return true;\n\t\telse return false;\n\t}",
"public function hasAnnotation($annotation) {\n\t\t// Get all the annotations\n\t\t$this->annotations = $this->parser->getParams();\n\t\t\n\t\tif(array_key_exists($annotation, $this->annotations)) return true;\n\t\telse return false;\n\t}",
"public function hasClass() : bool;"
] | [
"0.67743134",
"0.6640418",
"0.6607414",
"0.6593097",
"0.6577012",
"0.6553204",
"0.63887095",
"0.6374162",
"0.63438034",
"0.63438034",
"0.63438034",
"0.62263113",
"0.6187253",
"0.60935163",
"0.60862046",
"0.60862046",
"0.60856926",
"0.6049827",
"0.6013028",
"0.5973251",
"0.5929457",
"0.5929332",
"0.5929077",
"0.5923944",
"0.59168017",
"0.5913648",
"0.58930755",
"0.58930755",
"0.58930755",
"0.58722895"
] | 0.83474386 | 0 |
Returns an array of method level annotations for the specified class/method. Uses AgilePHP CacheProvider if enabled. | public static function getMethodsAsArray($class) {
if($cacher = AgilePHP::getCacher()) {
$cacheKey = 'AGILEPHP_ANNOTATION_METHODS_ARRAY_' . $class;
if($cacher->exists($cacheKey))
return $cacher->get($cacheKey);
}
$annotes = AnnotationParser::getMethodAnnotationsAsArray($class);
if(isset($cacher)) $cacher->set($cacheKey, $annotes);
return $annotes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function get_annotations() {\n\n\t\t// PHPUnit < 9.5.0.\n\t\tif ( method_exists( $this, 'getAnnotations' ) ) {\n\t\t\treturn $this->getAnnotations();\n\t\t}\n\n\t\t// PHPUnit >= 9.5.0.\n\t\treturn \\PHPUnit\\Util\\Test::parseTestMethodAnnotations(\n\t\t\tstatic::class,\n\t\t\t$this->getName( false )\n\t\t);\n\n\t}",
"protected function searchForMethodAnnotations()\n {\n $methods = $this->getMethods(\\ReflectionMethod::IS_PUBLIC);\n foreach ($methods as $method) {\n if ($method->isConstructor()) {\n continue;\n }\n $comment = $method->getDocComment();\n $annotations = $this->parseDocBlock($comment);\n if (count($annotations) > 0) {\n $this->annotations['methods'][$method->getName()] = $annotations;\n }\n }\n }",
"public static function getMethod($class, $method) {\n\n\t if($cacher = AgilePHP::getCacher()) {\n\n\t $cacheKey = 'AGILEPHP_ANNOTATION_METHOD_' . $class . $method;\n\t if($cacher->exists($cacheKey))\n\t return $cacher->get($cacheKey);\n\t }\n\n\t $m = new AnnotatedMethod($class, $method);\n\t if(isset($cacher)) $cacher->set($cacheKey, $m);\n\t \t\t return $m;\n\t }",
"public function getAnnotations(){ }",
"protected function getCache_AnnotationsService()\n {\n return $this->privates['cache.annotations'] = new \\Symfony\\Component\\Cache\\Adapter\\TraceableAdapter(\\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('rBw9NAN4Tt', 0, $this->getParameter('container.build_id'), ($this->targetDirs[0].'/pools'), ($this->privates['monolog.logger.cache'] ?? $this->getMonolog_Logger_CacheService())));\n }",
"public function getAnnotations() : array\n {\n return $this->annotations;\n }",
"private function getAnnotations($class)\n {\n $parsed = $this->getParser()->parse($class);\n if (!is_array($parsed)) {\n return [];\n }\n $context = [\n 'class' => $class,\n 'declaringClass' => $class,\n 'type' => Context::TYPE_CLASS,\n 'name' => $class\n ];\n $annotations = [];\n if (!empty($parsed['class'])) {\n foreach ($parsed['class'] as $value) {\n $anno = $this->create($value, $context);\n if ($anno) {\n $annotations[] = $anno;\n }\n }\n }\n $map = [\n 'methods' => Context::TYPE_METHOD,\n 'properties' => Context::TYPE_PROPERTY\n ];\n $reflection = new \\ReflectionClass($class);\n foreach ($map as $type_name => $type) {\n if (!empty($parsed[$type_name])) {\n foreach ($parsed[$type_name] as $name => $values) {\n $reflType = $type == 'method' ? $reflection->getMethod($name)\n : $reflection->getProperty($name);\n $context['type'] = $type;\n $context['name'] = $name;\n $context['declaringClass'] = $reflType->getDeclaringClass()->getName();\n foreach ($values as $value) {\n $anno = $this->create($value, $context);\n if ($anno) {\n $annotations[] = $anno;\n }\n }\n }\n }\n }\n return $annotations;\n }",
"public function getAnnotationClassNames ();",
"public function getAnnotationList() {\n\n\t\tif ($this->docComment == null) {\n\t\t\t$this->docComment = new ReflectionDocComment($this);\n\t\t}\n\n\t\treturn $this->docComment->getAnnotationList();\n\t}",
"public function getMethods()/*# : array */;",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"protected function parse_annotations() {\n\t\t$class = new \\ReflectionClass( static::class );\n\t\t$properties = $class->getProperties( \\ReflectionProperty::IS_PUBLIC );\n\t\tforeach ( $properties as $property ) {\n\t\t\t$doc_block = $property->getDocComment();\n\t\t\tif ( ! stristr( $doc_block, '@property' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$this->annotations[ $property->getName() ] = array(\n\t\t\t\t'type' => $this->parse_annotations_var( $doc_block ),\n\t\t\t\t'sanitize' => $this->parse_annotation_sanitize( $doc_block ),\n\t\t\t\t'rule' => $this->parse_annotation_rule( $doc_block ),\n\t\t\t);\n\t\t}\n\t}",
"protected function getCache_AnnotationsService()\n {\n return $this->services['cache.annotations'] = new \\Symfony\\Component\\Cache\\Adapter\\TraceableAdapter(${($_ = isset($this->services['cache.annotations.recorder_inner']) ? $this->services['cache.annotations.recorder_inner'] : $this->getCache_Annotations_RecorderInnerService()) && false ?: '_'});\n }",
"public function getAdvicesFor($method);",
"protected function getAnnotations_CacheService()\n {\n return $this->services['annotations.cache'] = new \\Symfony\\Component\\Cache\\DoctrineProvider(\\Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter::create((__DIR__.'/annotations.php'), ${($_ = isset($this->services['cache.annotations']) ? $this->services['cache.annotations'] : $this->getCache_AnnotationsService()) && false ?: '_'}));\n }",
"public function getAnnotationClassNames() {\n return [\n Action::class,\n AllowAll::class,\n Api::class,\n Filter::class,\n Mount::class,\n Parameter::class,\n Requires::class,\n Route::class,\n ContextInit::class\n ];\n }",
"public function getMethods($filter = null) {\n\t\treturn array_map(function($object) { return new AnnotationMethod($this->getName(), $object->getName()); }, parent::getMethods($filter));\n\t}",
"function getAllAnnotation() {\n return queryAllAnnotation();\n}",
"public function to_array(): array {\n\t\tif ( empty( $this->annotations ) ) {\n\t\t\treturn parent::to_array();\n\t\t}\n\n\t\t$return = array();\n\t\tforeach ( array_keys( $this->annotations ) as $property ) {\n\t\t\tif ( isset( $this[ $property ] ) ) {\n\t\t\t\t$return[ $property ] = $this[ $property ];\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}",
"public function getMethods();",
"public function getMethods() {}",
"public static function getClassAsArray($class) {\n\n\t if($cacher = AgilePHP::getCacher()) {\n\n\t $cacheKey = 'AGILEPHP_ANNOTATION_CLASS_ARRAY_' . $class;\n\t if($cacher->exists($cacheKey))\n\t return $cacher->get($cacheKey);\n\t }\n\n\t \t $annotes = AnnotationParser::getClassAnnotationsAsArray($class);\n\t \t if(isset($cacher)) $cacher->set($cacheKey, $annotes);\n\n\t \t return $annotes;\n\t }",
"private function getRegisteredFields()\n {\n $reader = new IndexedReader($this->getAnnotationReader());\n $refClass = new \\ReflectionClass($this->className);\n $fields = [];\n foreach ($refClass->getMethods() as $method) {\n $annotations = $reader->getMethodAnnotations($method);\n $class = __NAMESPACE__. '\\Annotations\\RegisterField';\n if (isset($annotations[$class])) {\n $registration = $annotations[$class];\n $key = is_null($registration->name) ? $method->name :\n $registration->name;\n $field = $this->buildRegisteredField($key, $registration, $method);\n if (!is_null($field)) {\n $fields[$key] = $field;\n }\n }\n }\n\n return $fields;\n }",
"public function getInterfaces() {\n\t\treturn array_map(function ($object) { return new AnnotationClass($object); }, parent::getInterfaces());\n\t}",
"function getAllAnnotations()\r\n\t {\r\n\t \t\r\n\t \treturn $this->model->getAnnotations($this->id);\r\n\t }",
"public function getMethods(string $className): array;",
"public function getAnnotations($annotation_name = null);",
"public function getMethods($className) {}",
"public function getClasses(): array\n {\n }"
] | [
"0.61472744",
"0.6094902",
"0.5876571",
"0.58248913",
"0.575674",
"0.57545036",
"0.574598",
"0.56576574",
"0.54903245",
"0.5466602",
"0.5428974",
"0.5428974",
"0.5428915",
"0.54232466",
"0.5418855",
"0.54038996",
"0.5363068",
"0.53472054",
"0.5326758",
"0.52607155",
"0.5223406",
"0.5219277",
"0.5189495",
"0.51498467",
"0.51472807",
"0.51166105",
"0.51064795",
"0.5105974",
"0.50908947",
"0.50856924"
] | 0.6158347 | 0 |
/ Helper function to turn date string into a Carbon instance | protected function carboniseDate($date)
{
return Carbon::parse($date);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function carbon($date)\n {\n return Carbon::parse($date);\n }",
"private function date($date): Carbon\n {\n return $date != null\n ? Carbon::parse($date)\n : now();\n }",
"private function getDateAsCarbon($date)\n {\n return Carbon::createFromFormat('Y-m-d H:i:s', $date);\n }",
"public function createFromCarbon(Carbon $date);",
"public function createProperDate(string $date)\n {\n if (Carbon::hasFormatWithModifiers($date, 'd#m#Y!')) {\n return Carbon::createFromFormat('d/m/Y', $date);\n } elseif (Carbon::hasFormatWithModifiers($date, 'Y#m#d!')) {\n return Carbon::createFromFormat('Y-m-d', $date);\n }\n return new Carbon($date);\n }",
"public function forDate(Carbon $date);",
"function carbonize($timeString = null) : Carbon\n {\n return new \\Carbon\\Carbon($timeString);\n }",
"protected static function _clearCarbon(string $date)\n {\n return Carbon::parse((string)$date);\n }",
"public function testStringToCarbon ()\n {\n $test = Carbon::createFromTimestamp(0);\n $stringToCarbon = get_class_method(TestBuilder::class, 'stringToCarbon');\n $carbon = $stringToCarbon->invokeArgs($this->builder, [\n '1970-01-01 00:00',\n ]);\n\n $this->assertEquals($carbon, $test);\n }",
"public function getDate(): Carbon;",
"public function getDateAttribute($date)\n\t{\n\t\treturn Carbon::parse($date);\n\t}",
"public function date($string)\n {\n try {\n return Carbon::parse($string);\n } catch (\\Carbon\\Exceptions\\InvalidFormatException $ex) {\n // ignore\n }\n return null;\n }",
"public static function toCarbon($item)\n {\n if ($item instanceof Carbon) {\n return $item->setTimezone('UTC');\n }\n\n if ($item instanceof DateTime) {\n return Carbon::instance($item)->setTimezone('UTC');\n }\n\n if (is_integer($item)) {\n return Carbon::createFromTimestamp($item);\n }\n\n if (is_string($item)) {\n if (substr($item, 0, 6) === '/Date(') {\n // The Microsoft format date and datetime that some of the older APIs use.\n\n if (strpos($item, '+') !== false) {\n list($milli, $offset) = preg_replace('/[^0-9]/', '', explode('+', $item));\n } else {\n $milli = preg_replace('/[^0-9]/', '', $item);\n $offset = '00000';\n }\n\n return Carbon::createFromTimestamp($milli / 1000);\n }\n\n // One last, clumsy check of the format before we try to convert it.\n // We just look for the \"-99T99:\" second that is in the middle of all\n // date formats we have encountered so far.\n // This check may have to gom as it throws out, for example, OAuth expiry\n // times that may have been retrieved from the database as strings.\n\n $otherFormats = [\n '/\\-[0-9]{2}[T ][0-9]{2}:/',\n '/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',\n ];\n\n foreach ($otherFormats as $otherFormat) {\n if (preg_match($otherFormat, $item)) {\n return Carbon::parse($item, 'UTC')->setTimezone('UTC');\n }\n }\n }\n\n return $item;\n }",
"public function getFromDateAttribute($value) {\n return \\Carbon\\Carbon::parse($value)->format('d-m-Y');\n }",
"function date_check_format($date)\n {\n $date = new \\Carbon\\Carbon($date);\n return $date;\n }",
"function setImportWageEventDate($date)\n {\n // $date = Carbon::createFromFormat('m-d-Y', $date)->toDateString();\n return Carbon::parse($date);\n }",
"public function __construct(Carbon $targetDate);",
"public function getPublishedatAttribute($date)//untuk set format pada form variable\n {\n $createdAt = Carbon::parse($date);\n // $createdAt = $createdAt->format('M d Y');\n\n return new Carbon($date);\n // return $createdAt;\n\n\n }",
"public function getDateAttribute($date)\n {\n return Carbon::parse($date)->format('Y-m-d');\n }",
"public static function getDate($date)\n {\n $date = new Carbon($date);\n $date = $date->format('d/m/Y');\n return $date;\n }",
"public function getDateAttribute($value)\n {\n return Carbon::parse($value)->format('F j, Y');\n }",
"public function toCarbon()\n {\n $this->value = Carbon::parse($this->value);\n\n\n return $this;\n }",
"public function carbonFromStandartGMTString($string);",
"protected function getDateFromLine($line)\n {\n $regex = env('PHP_CLI_SERVER_WORKERS', 1) > 1\n ? '/^\\[\\d+]\\s\\[([a-zA-Z0-9: ]+)\\]/'\n : '/^\\[([^\\]]+)\\]/';\n\n preg_match($regex, $line, $matches);\n\n return Carbon::createFromFormat('D M d H:i:s Y', $matches[1]);\n }",
"public function getInvoiceDate(): Carbon;",
"public function getFechaDeInicioAttribute($value){\n return Carbon::parse($value)->format('d-m-Y ');\n }",
"public static function setDate($date)\n {\n $date = Carbon::createFromFormat('d.m.Y',$date)->format('Y-m-d');\n return $date;\n }",
"function humanize_date(Carbon\\Carbon $date, $format = 'd F Y, H:i'): string\n{\n return $date->format($format);\n}",
"function carbon($time)\n {\n return new Carbon($time);\n }",
"public function niceDate($raw) {\n $raw = trim($raw);\n $raw = explode(\" | \", $raw);\n //dd($raw);\n $date = explode(\" \", $raw[0]);\n //dd($date);\n $month = $this->getMonth($date[2]);\n //dd($month);\n $time = str_replace(' WIB', '', $raw[1]);\n $time = explode(\":\", $time);\n \n $date = Carbon::create($date[3], $month, $date[1], $time[0], $time[1], 0, 'Asia/Jakarta');\n return $date->toW3cString();\n }"
] | [
"0.71793944",
"0.6896172",
"0.68108857",
"0.67068046",
"0.6512391",
"0.63774526",
"0.6291701",
"0.6135758",
"0.6098049",
"0.6034146",
"0.6015221",
"0.59965336",
"0.5971065",
"0.5957126",
"0.583334",
"0.57535166",
"0.571379",
"0.5651921",
"0.56269157",
"0.54440784",
"0.54417026",
"0.5428769",
"0.5418616",
"0.54155165",
"0.54025304",
"0.5375915",
"0.5312307",
"0.5307394",
"0.5305451",
"0.5299242"
] | 0.7021459 | 1 |
Tests Message getters and setters. Only necessary for code coverage. | public function testSettersAndGetters()
{
$conn = new Connection();
$msg = new Message('subject', 'body', 'sid', $conn);
$this->assertEquals('subject', $msg->getSubject());
$this->assertEquals('body', $msg->getBody());
$this->assertEquals('sid', $msg->getSid());
$this->assertEquals($conn, $msg->getConn());
$msg->setSubject('subject2')->setBody('body2')->setSid('sid2');
$this->assertEquals('subject2', $msg->getSubject());
$this->assertEquals('body2', $msg->getBody());
$this->assertEquals('sid2', $msg->getSid());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetMessageObject()\n {\n $this->callValidatorProtectedMethod('getMessage', ['attribute', (object) []]);\n }",
"public function testGetMessage() {\n $plugin = new Status();\n $message = $this->createMock(IMessage::class);\n\n $this->assertNull($plugin->update($message));\n $this->assertSame($message, $plugin->getMessage());\n }",
"public function testGetDirectMessages()\n {\n }",
"public function test_get_message_method()\n {\n $result = $this->message_object->get_message();\n\n $this->assertIsArray($result);\n $this->assertArrayHasKey('success', $result);\n $this->assertEmpty($result['success']);\n $this->assertArrayHasKey('error', $result);\n $this->assertEmpty($result['error']);\n $this->assertArrayHasKey('file', $result);\n $this->assertEmpty($result['file']);\n }",
"public function testSetMessage()\n {\n $rule = new Formagic_Rule_Mock_MockRule();\n $actual = $rule->setMessage('test');\n $this->assertSame($rule, $actual);\n }",
"public function testGetConversationsMessageMessage()\n {\n }",
"public function testGetMessage()\n {\n $rule = new Formagic_Rule_Mock_MockRule();\n $expected = 'test';\n $actual = $rule->setMessage($expected)->getMessage();\n $this->assertSame($expected, $actual);\n }",
"public function testGetSetMessage()\n {\n // Test with a message having a bad type\n // Please note that other tests for `getMessage()` and `setMessage($text)` are written in `AbstractRequestTest`\n try {\n TextMessageRequest::create()->setMessage(VideoAttachmentMessage::create());\n $this->fail('Must have thrown a FacebookMessengerException !');\n } catch (FacebookMessengerException $fmex) {\n $this->assertSame(\n 'The \\'message\\' attached to a text message request must be intance of class \\'TextMessage\\' !',\n $fmex->getMessage()\n );\n }\n }",
"public function testGetMessage()\n {\n $this->callValidatorProtectedMethod('getMessage', ['attribute','rule']);\n }",
"abstract public function setMessage();",
"public function testMessage()\n {\n $message = new \\Slab\\Debug\\Message('Hello occurred, omg what do we do!', 'Sasquatch');\n\n $this->assertContains('[Sasquatch] Hello occurred, omg what do we do! (', $message->formatMessage());\n }",
"public function testSetCardMessageAndGetCardMessage()\n {\n $oBasket = new oxbasket();\n $oBasket->setCardMessage( 'xxx' );\n $this->assertEquals( 'xxx', $oBasket->getCardMessage() );\n }",
"public function testGetMessages()\n {\n $expectedMessages = [\n __('This quote is currently locked for editing. It will become available once released by the Merchant.'),\n __(\n 'Your quote has expired and the product prices have been updated as per the latest prices in your'\n . ' catalog. You can either re-submit the quote to seller for further negotiation or go to checkout.'\n ),\n __('You are not an owner of this quote. You cannot edit it or take any actions on it.')\n ];\n\n $this->quoteHelperMock->expects($this->any())\n ->method('isLockMessageDisplayed')\n ->willReturn(true);\n $this->quoteHelperMock->expects($this->any())\n ->method('isViewedByOwner')\n ->willReturn(false);\n $this->quoteHelperMock->expects($this->any())\n ->method('isExpiredMessageDisplayed')\n ->willReturn(true);\n\n $this->createInstance();\n $this->assertEquals($expectedMessages, $this->message->getMessages());\n }",
"public function testMessageStringRepresentation()\n {\n $conn = new Connection();\n\n $msg = new Message('subject', 'body', 'sid', $conn);\n\n $this->assertEquals('body', $msg->__toString());\n }",
"public function testMessage()\n {\n $validator = new NestedValidator($this->getTranslator(), $this->getPresenceVerifier(), $this->getContainer());\n $validator->verify([\n 'nested' => [ // not ok\n 'age' => 1,\n 'size' => 2\n ]\n ]);\n\n $failures = $validator->failed();\n\n\n // Failures need to be set correctly\n $this->assertCount(2, $failures); // One attribute has failed\n $this->assertArrayHasKey('nested.age', $failures); // which is the nested attribute\n $this->assertArrayHasKey('nested.size', $failures); // and size\n\n // Messages need to be set correctly\n $messages = $validator->getMessageBag()->getMessages();\n\n $this->assertcount(2, $messages); // Only messages for nested\n $this->assertArrayHasKey('nested.age', $messages);\n $this->assertArrayHasKey('nested.size', $messages);\n $this->assertCount(1, $messages['nested.age']);\n $this->assertCount(1, $messages['nested.size']);\n $this->assertTrue(is_string($messages['nested.size'][0]));\n $this->assertTrue(is_string($messages['nested.age'][0]));\n }",
"public function testGetConversationsMessage()\n {\n }",
"public function testPatchConversationsMessage()\n {\n }",
"public function testGetChatMessage()\n {\n }",
"public function testGetConversationsMessages()\n {\n }",
"public function testSendChatMessage()\n {\n }",
"public function testGetConversationsChatMessage()\n {\n }",
"abstract public function getMessage(): ReceivedMessage;",
"public function testEditChatMessage()\n {\n }",
"public function testValidationForMessage(): void\n {\n $expected = ['message' => ['lengthBetween' => 'Must be between 10 and 1000 chars']];\n foreach ([str_repeat('a', 9), str_repeat('a', 1001)] as $message) {\n $this->assertFalse($this->Form->validate(compact('message') + $this->example));\n $this->assertEquals($expected, $this->Form->getErrors());\n }\n\n foreach ([str_repeat('a', 10), str_repeat('a', 1000)] as $message) {\n $this->assertTrue($this->Form->validate(compact('message') + $this->example));\n $this->assertEmpty($this->Form->getErrors());\n }\n }",
"public function testGetMessages()\n {\n $this->assertEquals(array(), $this->validator->getMessages());\n }",
"public function testAcknowledgeChatMessage()\n {\n }",
"public function testGetConversationsEmailMessage()\n {\n }",
"public function testVerifyMessageList()\n\t{\n\t\t$actual = get_class_methods('POData\\Common\\Messages');\n\n\t\t$expected = array(\n\t\t\t'expressionLexerUnterminatedStringLiteral',\n\t\t\t'expressionLexerDigitExpected',\n\t\t\t'expressionLexerSyntaxError',\n\t\t\t'expressionLexerInvalidCharacter',\n\t\t\t'expressionParserInCompatibleTypes',\n\t\t\t'expressionParserOperatorNotSupportNull',\n\t\t\t'expressionParserOperatorNotSupportGuid',\n\t\t\t'expressionParserOperatorNotSupportBinary',\n\t\t\t'expressionParserUnrecognizedLiteral',\n\t\t\t'expressionParserUnknownFunction',\n\t\t\t'expressionParser2BooleanRequired',\n\t\t\t'expressionParser2UnexpectedExpression',\n\t\t\t'expressionParser2NonPrimitivePropertyNotAllowed',\n\t\t\t'expressionLexerNoApplicableFunctionsFound',\n\t\t\t'expressionLexerNoPropertyInType',\n\t\t\t'resourceAssociationSetPropertyMustBeNullOrInstanceofResourceProperty',\n\t\t\t'resourceAssociationSetEndPropertyMustBeNavigationProperty',\n\t\t\t'resourceAssociationSetEndResourceTypeMustBeAssignableToResourceSet',\n\t\t\t'resourceAssociationSetResourcePropertyCannotBeBothNull',\n\t\t\t'resourceAssociationSetSelfReferencingAssociationCannotBeBiDirectional',\n\t\t\t'resourceAssociationTypeEndPropertyMustBeNullOrInstanceofResourceProperty',\n\t\t\t'resourceAssociationTypeEndBothPropertyCannotBeNull',\n\t\t\t'expressionParserEntityCollectionNotAllowedInFilter',\n\t\t\t'commonArgumentShouldBeInteger',\n\t\t\t'commonArgumentShouldBeNonNegative',\n\t\t\t'commonNotValidPrimitiveEDMType',\n\t\t\t'configurationMaxResultAndPageSizeMutuallyExclusive',\n\t\t\t'configurationResourceSetNameNotFound',\n\t\t\t'configurationRightsAreNotInRange',\n\t\t\t'configurationCountNotAccepted',\n\t\t\t'resourceTypeNoBaseTypeForPrimitive',\n\t\t\t'resourceTypeNoAbstractForPrimitive',\n\t\t\t'resourceTypeTypeShouldImplementIType',\n\t\t\t'resourceTypeTypeShouldReflectionClass',\n\t\t\t'resourceTypeMissingKeyPropertiesForEntity',\n\t\t\t'resourceTypeNoAddPropertyForPrimitive',\n\t\t\t'resourceTypeKeyPropertiesOnlyOnEntityTypes',\n\t\t\t'resourceTypeETagPropertiesOnlyOnEntityTypes',\n\t\t\t'resourceTypePropertyWithSameNameAlreadyExists',\n\t\t\t'resourceTypeNoKeysInDerivedTypes',\n\t\t\t'resourceTypeHasStreamAttributeOnlyAppliesToEntityType',\n\t\t\t'resourceTypeNamedStreamsOnlyApplyToEntityType',\n\t\t\t'resourceTypeNamedStreamWithSameNameAlreadyExists',\n\t\t\t'resourcePropertyInvalidKindParameter',\n\t\t\t'resourcePropertyPropertyKindAndResourceTypeKindMismatch',\n\t\t\t'resourceSetContainerMustBeAssociatedWithEntityType',\n\t\t\t'providersWrapperExpressionProviderMustNotBeNullOrEmpty',\n\t\t\t'providersWrapperInvalidExpressionProviderInstance',\n\t\t\t'providersWrapperContainerNameMustNotBeNullOrEmpty',\n\t\t\t'providersWrapperContainerNamespaceMustNotBeNullOrEmpty',\n\t\t\t'providersWrapperEntitySetNameShouldBeUnique',\n\t\t\t'providersWrapperEntityTypeNameShouldBeUnique',\n\t\t\t'providersWrapperIDSMPGetResourceSetReturnsInvalidResourceSet',\n\t\t\t'queryProviderReturnsNonQueryResult',\n 'queryProviderResultCountMissing',\n 'queryProviderResultsMissing',\n\t\t\t'providersWrapperIDSQPMethodReturnsUnExpectedType',\n\t\t\t'providersWrapperIDSQPMethodReturnsInstanceWithNullKeyProperties',\n\t\t\t'providersWrapperIDSQPMethodReturnsInstanceWithNonMatchingKeys',\n\t\t\t'navigationInvalidResourceType',\n\t\t\t'keyDescriptorKeyCountNotMatching',\n\t\t\t'keyDescriptorMissingKeys',\n\t\t\t'keyDescriptorInCompatibleKeyType',\n\t\t\t'keyDescriptorInCompatibleKeyTypeAtPosition',\n\t\t\t'keyDescriptorValidateNotCalled',\n\t\t\t'syntaxError',\n\t\t\t'urlMalformedUrl',\n\t\t\t'segmentParserKeysMustBeNamed',\n\t\t\t'segmentParserMustBeLeafSegment',\n\t\t\t'segmentParserNoSegmentAllowedAfterPostLinkSegment',\n\t\t\t'segmentParserOnlyValueSegmentAllowedAfterPrimitivePropertySegment',\n\t\t\t'segmentParserCannotQueryCollection',\n\t\t\t'segmentParserCountCannotFollowSingleton',\n\t\t\t'segmentParserLinkSegmentMustBeFollowedByEntitySegment',\n\t\t\t'segmentParserMissingSegmentAfterLink',\n\t\t\t'segmentParserSegmentNotAllowedOnRoot',\n\t\t\t'segmentParserInconsistentTargetKindState',\n\t\t\t'segmentParserUnExpectedPropertyKind',\n\t\t\t'segmentParserCountCannotBeApplied',\n\t\t\t'uriProcessorResourceNotFound',\n\t\t\t'uriProcessorForbidden',\n\t\t\t'metadataAssociationTypeSetBidirectionalAssociationMustReturnSameResourceAssociationSetFromBothEnd',\n\t\t\t'metadataAssociationTypeSetMultipleAssociationSetsForTheSameAssociationTypeMustNotReferToSameEndSets',\n\t\t\t'metadataAssociationTypeSetInvalidGetDerivedTypesReturnType',\n\t\t\t'metadataResourceTypeSetNamedStreamsOnDerivedEntityTypesNotSupported',\n\t\t\t'metadataResourceTypeSetBagOfComplexTypeWithDerivedTypes',\n\t\t\t'metadataWriterExpectingEntityOrComplexResourceType',\n\t\t\t'metadataWriterNoResourceAssociationSetForNavigationProperty',\n\t\t\t'expandedProjectionNodeArgumentTypeShouldBeProjection',\n\t\t\t'expandProjectionParserPropertyNotFound',\n\t\t\t'expandProjectionParserExpandCanOnlyAppliedToEntity',\n\t\t\t'expandProjectionParserPrimitivePropertyUsedAsNavigationProperty',\n\t\t\t'expandProjectionParserComplexPropertyAsInnerSelectSegment',\n\t\t\t'expandProjectionParserBagPropertyAsInnerSelectSegment',\n\t\t\t'expandProjectionParserUnexpectedPropertyType',\n\t\t\t'expandProjectionParserPropertyWithoutMatchingExpand',\n\t\t\t'orderByInfoPathSegmentsArgumentShouldBeNonEmptyArray',\n\t\t\t'orderByInfoNaviUsedArgumentShouldBeNullOrNonEmptyArray',\n\t\t\t'orderByPathSegmentOrderBySubPathSegmentArgumentShouldBeNonEmptyArray',\n\t\t\t'orderByParserPropertyNotFound',\n\t\t\t'orderByParserBagPropertyNotAllowed',\n\t\t\t'orderByParserPrimitiveAsIntermediateSegment',\n\t\t\t'orderByParserSortByBinaryPropertyNotAllowed',\n\t\t\t'orderByParserResourceSetReferenceNotAllowed',\n\t\t\t'orderByParserSortByNavigationPropertyIsNotAllowed',\n\t\t\t'orderByParserSortByComplexPropertyIsNotAllowed',\n\t\t\t'orderByParserUnExpectedState',\n\t\t\t'orderByParserUnexpectedPropertyType',\n\t\t\t'orderByParserFailedToCreateDummyObject',\n\t\t\t'orderByParserFailedToAccessOrInitializeProperty',\n\t\t\t'failedToAccessProperty',\n\t\t\t'orderByLeafNodeArgumentShouldBeNonEmptyArray',\n\t\t\t'badRequestInvalidPropertyNameSpecified',\n\t\t\t'anonymousFunctionParameterShouldStartWithDollarSymbol',\n\t\t\t'skipTokenParserSyntaxError',\n\t\t\t'skipTokenParserUnexpectedTypeOfOrderByInfoArg',\n\t\t\t'skipTokenParserSkipTokenNotMatchingOrdering',\n\t\t\t'skipTokenParserNullNotAllowedForKeys',\n\t\t\t'skipTokenParserInCompatibleTypeAtPosition',\n\t\t\t'skipTokenInfoBothOrderByPathAndOrderByValuesShouldBeSetOrNotSet',\n\t\t\t'internalSkipTokenInfoFailedToAccessOrInitializeProperty',\n\t\t\t'internalSkipTokenInfoBinarySearchRequireArray',\n\t\t\t'requestVersionTooLow',\n\t\t\t'requestVersionIsBiggerThanProtocolVersion',\n\t\t\t'requestDescriptionInvalidVersionHeader',\n\t\t\t'requestDescriptionUnSupportedVersion',\n\t\t\t'uriProcessorRequestUriDoesNotHaveTheRightBaseUri',\n\t\t\t'queryProcessorInvalidValueForFormat',\n\t\t\t'queryProcessorNoQueryOptionsApplicable',\n\t\t\t'queryProcessorQueryFilterOptionNotApplicable',\n\t\t\t'queryProcessorQuerySetOptionsNotApplicable',\n\t\t\t'queryProcessorSkipTokenNotAllowed',\n\t\t\t'queryProcessorQueryExpandOptionNotApplicable',\n\t\t\t'queryProcessorInlineCountWithValueCount',\n\t\t\t'queryProcessorInvalidInlineCountOptionError',\n\t\t\t'queryProcessorIncorrectArgumentFormat',\n\t\t\t'queryProcessorSkipTokenCannotBeAppliedForNonPagedResourceSet',\n\t\t\t'queryProcessorSelectOrExpandOptionNotApplicable',\n\t\t\t'configurationProjectionsNotAccepted',\n\t\t\t'providersWrapperNull',\n\t\t\t'invalidMetadataInstance',\n\t\t\t'invalidQueryInstance',\n\t\t\t'streamProviderWrapperGetStreamETagReturnedInvalidETagFormat',\n\t\t\t'streamProviderWrapperGetStreamContentTypeReturnsEmptyOrNull',\n\t\t\t'streamProviderWrapperInvalidStreamFromGetReadStream',\n\t\t\t'streamProviderWrapperGetReadStreamUriMustReturnAbsoluteUriOrNull',\n\t\t\t'streamProviderWrapperMustImplementIStreamProviderToSupportStreaming',\n\t\t\t'streamProviderWrapperMaxProtocolVersionMustBeV3OrAboveToSupportNamedStreams',\n\t\t\t'streamProviderWrapperMustImplementStreamProvider2ToSupportNamedStreams',\n\t\t\t'streamProviderWrapperMustNotSetContentTypeAndEtag',\n\t\t\t'streamProviderWrapperInvalidStreamInstance',\n\t\t\t'streamProviderWrapperInvalidStream2Instance',\n\t\t\t'badProviderInconsistentEntityOrComplexTypeUsage',\n\t\t\t'badQueryNullKeysAreNotSupported',\n\t\t\t'objectModelSerializerFailedToAccessProperty',\n\t\t\t'objectModelSerializerLoopsNotAllowedInComplexTypes',\n\t\t\t'unsupportedMediaType',\n\t\t\t'httpProcessUtilityMediaTypeRequiresSemicolonBeforeParameter',\n\t\t\t'httpProcessUtilityMediaTypeUnspecified',\n\t\t\t'httpProcessUtilityMediaTypeRequiresSlash',\n\t\t\t'httpProcessUtilityMediaTypeRequiresSubType',\n\t\t\t'httpProcessUtilityMediaTypeMissingValue',\n\t\t\t'httpProcessUtilityEscapeCharWithoutQuotes',\n\t\t\t'httpProcessUtilityEscapeCharAtEnd',\n\t\t\t'httpProcessUtilityClosingQuoteNotFound',\n\t\t\t'httpProcessUtilityMalformedHeaderValue',\n\t\t\t'noETagPropertiesForType',\n\t\t\t'eTagValueDoesNotMatch',\n\t\t\t'eTagCannotBeSpecified',\n\t\t\t'bothIfMatchAndIfNoneMatchHeaderSpecified',\n\t\t\t'eTagNotAllowedForNonExistingResource',\n\t\t\t'onlyReadSupport',\n\t\t\t'unsupportedMethod',\n\t\t\t'badRequestInvalidUriForThisVerb',\n\t\t\t'noDataForThisVerb',\n\t\t\t'badRequestInvalidUriForMediaResource',\n\t\t\t'hostNonODataOptionBeginsWithSystemCharacter',\n\t\t\t'hostODataQueryOptionFoundWithoutValue',\n\t\t\t'hostODataQueryOptionCannotBeSpecifiedMoreThanOnce',\n\t\t\t'hostMalFormedBaseUriInConfig',\n\t\t\t'hostRequestUriIsNotBasedOnRelativeUriInConfig',\n\t\t);\n\n\t\t$this->assertEquals($expected, $actual, \"You probably added a message without a corresponding test!\");\n\n\t}",
"abstract protected function getMessage();",
"abstract protected function getMessage();"
] | [
"0.7339656",
"0.6989689",
"0.6954322",
"0.69521344",
"0.68605894",
"0.68476814",
"0.6837615",
"0.6782742",
"0.6766488",
"0.67423373",
"0.6653779",
"0.66517633",
"0.6612622",
"0.6558585",
"0.65341043",
"0.651615",
"0.6436391",
"0.6410121",
"0.63326585",
"0.63138974",
"0.6275929",
"0.62494737",
"0.6204302",
"0.61885846",
"0.6177667",
"0.61647236",
"0.611847",
"0.6103088",
"0.6101333",
"0.6101333"
] | 0.76163477 | 0 |
Tests Message string representation. | public function testMessageStringRepresentation()
{
$conn = new Connection();
$msg = new Message('subject', 'body', 'sid', $conn);
$this->assertEquals('body', $msg->__toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testMessage()\n {\n $message = new \\Slab\\Debug\\Message('Hello occurred, omg what do we do!', 'Sasquatch');\n\n $this->assertContains('[Sasquatch] Hello occurred, omg what do we do! (', $message->formatMessage());\n }",
"abstract function fromString($message);",
"public function testGetFullMessage()\n {\n $model = $this->getDevlogEntry();\n $model->setExtraData(\n [\n 'foo' => 'bar',\n '__beuser' => 13,\n ]\n );\n\n $data = $model->getFullMessage();\n\n self::assertTrue(is_string($data));\n self::assertEquals('{\"foo\":\"bar\"}', $data);\n }",
"public function __toString() {\n try {\n $this->validateMessage();\n } catch (MessageValidationException $e) {\n return '';\n }\n \n return parent::__toString();\n }",
"public function testGetMessage()\n {\n $rule = new Formagic_Rule_Mock_MockRule();\n $expected = 'test';\n $actual = $rule->setMessage($expected)->getMessage();\n $this->assertSame($expected, $actual);\n }",
"protected function stringFromMessage($message)\n {\n if (is_string($message)) {\n return $message;\n }\n\n return var_export($message, true);\n }",
"public function testBackwardsSimpleMessageVer()\n {\n Rollbar::init(self::$simpleConfig);\n\n $uuid = Rollbar::report_message(\"Hello world\");\n $this->assertStringMatchesFormat('%x-%x-%x-%x-%x', $uuid);\n }",
"public function getMessage(): string|\\Stringable;",
"public function testSimpleMessage()\n {\n $dbg = $this->dbg;\n $dbg->log(\"Running testSimpleMessage\", 0, array(\"source\" => \"src\", \"category\" => \"cat\") );\n \n $struct = $dbg->generateOutput();\n $this->assertEquals(1, count( $struct[0] ) );\n $this->assertEquals(\"Running testSimpleMessage\", $struct[0][0]->message );\n }",
"public function assertAMQPMessage($message)\n {\n $this->assertJson($message);\n $obj = json_decode($message);\n $this->assertObjectHasAttribute('id', $obj,\n 'The message has the id attribute');\n $this->assertGreaterThan(0, $obj->id,\n 'The id value is grater than 0');\n $this->assertObjectHasAttribute('type', $obj,\n 'The message has the type attribute');\n $this->assertContains($obj->type, ['activity', 'routeShareImage', 'routeIndex'], \n 'The type field contains one of the valid values');\n }",
"public function test__ToString()\n {\n // testing data (the response body)\n $this->assertRegExp('/.*<storeId>281<\\/storeId>.*/m', (string)$this->response);\n }",
"public function test_is_serialized_string( $data, $expected ) {\n\t\t$this->assertSame( $expected, is_serialized( $data ) );\n\t}",
"public function testToString(): void\n {\n $status = new Status();\n $status->setTitle('draft');\n $this->assertEquals('draft', $status);\n $this->assertEquals('draft'.'', $status);\n $this->assertEquals('object', gettype($status));\n $this->assertEquals('string', gettype($status->__toString()));\n $this->assertNotEquals('integer', gettype($status));\n $this->assertNotEquals('string', gettype($status));\n $this->assertNotEquals(0, $status);\n $this->assertNotEquals('', $status);\n $this->assertNotEquals('DRAFT', $status);\n $this->assertNotEquals([], $status);\n }",
"public function testString()\n {\n $this -> printer -> text(\"AA A\\r\\n\");\n $this -> checkOutput(\"\\x1b@\\x1b!1\\x1b%\\x01\\x1b&\\x03 \\x08\\x00\\x00\\x00\\x01\\xfc\\x00\\x06@\\x00\\x08@\\x00\\x08@\\x00\\x06@\\x00\\x01\\xfc\\x00\\x00\\x00\\x00 \\x1b&\\x03!!\\x08\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00! \\x0a\");\n }",
"public function testValidationForMessage(): void\n {\n $expected = ['message' => ['lengthBetween' => 'Must be between 10 and 1000 chars']];\n foreach ([str_repeat('a', 9), str_repeat('a', 1001)] as $message) {\n $this->assertFalse($this->Form->validate(compact('message') + $this->example));\n $this->assertEquals($expected, $this->Form->getErrors());\n }\n\n foreach ([str_repeat('a', 10), str_repeat('a', 1000)] as $message) {\n $this->assertTrue($this->Form->validate(compact('message') + $this->example));\n $this->assertEmpty($this->Form->getErrors());\n }\n }",
"public function serialize(Message $message);",
"private function stringTest($function)\n {\n $flash = new PhFlash($this->classes);\n $class = $this->getClass($function);\n $implicit = '';\n $html = '';\n $template = '<div%s>%s</div>' . PHP_EOL;\n $message = 'sample message';\n\n if ($this->notHtml) {\n $flash->setAutomaticHtml(false);\n $html = ' no HTML';\n $expected = $message;\n } else {\n $expected = sprintf($template, $class, $message);\n }\n\n\n if ($this->notImplicit) {\n $flash->setImplicitFlush(false);\n $implicit = ' no implicit';\n $actual = $flash->$function($message);\n } else {\n $actual = $this->getObResponse($flash, $function, $message);\n }\n\n $this->assertEquals(\n $expected,\n $actual,\n \"Flash\\\\Direct {$function} (string){$implicit}{$html} does not produce the correct message\"\n );\n }",
"public function __toString(): string\n {\n return (string) $this->message();\n }",
"protected abstract function getMessage();",
"function testToString() {\n $result = $this->abc->toString();\n $expected = 'Person named abc';\n $this->assertTrue($result == $expected);\n }",
"public function testAssertIsString() {\n\t\tself::assertIsString( 'test' );\n\t}",
"public function testToString()\n {\n $si = new \\obray\\ipp\\types\\NameWithLanguage('en', 'name');\n // test\n $this->assertSame('name', (string)$si);\n }",
"public function testMethodPrintAsStringIsValid()\n {\n $airportBus = new AirportBus([\n 'from' => 'Abu Dhabi',\n 'to' => 'Dubai',\n 'type' => 'airport bus'\n ]);\n $this->assertEquals('Take the airport bus from Abu Dhabi to Dubai. No seat assignment.', $airportBus->printAsString());\n }",
"public function testToString(): void\n {\n static::assertEquals('192.168.0.1', (string) $this->entity);\n }",
"abstract protected function getMessage();",
"abstract protected function getMessage();",
"protected function _filterMessage($message)\n\t{\n\t\tif (is_string($message)) {\n\t\t\treturn $message;\n\t\t}\n\t\treturn serialize($message);\n\t}",
"public function testMessage()\n {\n $validator = new NestedValidator($this->getTranslator(), $this->getPresenceVerifier(), $this->getContainer());\n $validator->verify([\n 'nested' => [ // not ok\n 'age' => 1,\n 'size' => 2\n ]\n ]);\n\n $failures = $validator->failed();\n\n\n // Failures need to be set correctly\n $this->assertCount(2, $failures); // One attribute has failed\n $this->assertArrayHasKey('nested.age', $failures); // which is the nested attribute\n $this->assertArrayHasKey('nested.size', $failures); // and size\n\n // Messages need to be set correctly\n $messages = $validator->getMessageBag()->getMessages();\n\n $this->assertcount(2, $messages); // Only messages for nested\n $this->assertArrayHasKey('nested.age', $messages);\n $this->assertArrayHasKey('nested.size', $messages);\n $this->assertCount(1, $messages['nested.age']);\n $this->assertCount(1, $messages['nested.size']);\n $this->assertTrue(is_string($messages['nested.size'][0]));\n $this->assertTrue(is_string($messages['nested.age'][0]));\n }",
"public function testGetMessageObject()\n {\n $this->callValidatorProtectedMethod('getMessage', ['attribute', (object) []]);\n }",
"protected function _parseMessage()\n {\n }"
] | [
"0.7352491",
"0.63122815",
"0.6292101",
"0.6263189",
"0.6145092",
"0.6122956",
"0.6052282",
"0.6025793",
"0.59996045",
"0.597696",
"0.597623",
"0.5937559",
"0.58831376",
"0.5863474",
"0.5833416",
"0.57968336",
"0.5763896",
"0.5757957",
"0.5727707",
"0.57191324",
"0.56840825",
"0.56820077",
"0.56797737",
"0.56694984",
"0.5639501",
"0.5639501",
"0.5606998",
"0.5602463",
"0.5601729",
"0.558891"
] | 0.8106055 | 0 |
It checks wheather an argument (or arguments) exist(s) on POST variables. | public static function CheckPost()
{
foreach(func_get_args() as $arg)
if(!isset($_POST[$arg]))
throw new ArgumentException("Argument '$arg' is not set on POST variables.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function checkPostVars(){\n\t\t\tforeach($this->post_vars as $component=>$is_mandatory){\n\t\t\t\tif(is_null($this->$component) && $is_mandatory){\n\t\t\t\t\techo 'A mandatory Post param \"'.$component.'\" is missing...<br/>';\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"public static function Check()\r\n {\r\n foreach(func_get_args() as $arg)\r\n if(!isset($_POST[$arg]) && !isset($_GET[$arg]))\r\n throw new ArgumentException(\"Argument '$arg' is not set on POST and GET variables.\");\r\n }",
"static function checkPostArgumentsPermissions() {\r\n if (isset($_POST['remove'])\r\n or isset($_POST['associate'])\r\n or isset($_POST['update'])\r\n or isset($_POST['add'])\r\n or isset($_POST['purge'])) {\r\n\r\n if ((!PluginLinesmanagerLine::canUpdate() and ( isset($_POST['remove'])\r\n or isset($_POST['associate'])\r\n or isset($_POST['update'])))\r\n\r\n or ( !PluginLinesmanagerLine::canCreate() and isset($_POST['add']))\r\n\r\n or ( !PluginLinesmanagerLine::canPurge() and isset($_POST['purge']))\r\n ) {\r\n Session::addMessageAfterRedirect(__(\"No permission\", \"linesmanager\"), false, ERROR);\r\n HTML::back();\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }",
"private function checkPost()\n {\n foreach ($_POST as $key => $value) {\n if (is_int($key)) {\n $key = $this->testInput($key);\n intval($key);\n } else {\n $key = $this->testInput($key);\n }\n if (is_int($value)) {\n $value = $this->testInput($value);\n intval($value);\n } else {\n $value = $this->testInput($value);\n }\n }\n }",
"function checkInputfield() {\n\t\t## local variables init.\n\t\t$postVar = 0;\n\t\t$inputFieldName = 0;\n\t\t$rExp = 0;\n\t\t## collect the argument parameters there should be ony 2,3 arguments\n\t\t## where the 3rd arguement is a regular exp (optional)\n\t\tif (func_num_args() == 2) {\n\t\t\t## set the variables\n\t\t\t$postVar = func_get_arg(0);\n\t\t\t$inputFieldName = func_get_arg(1);\n\t\t} else {\n\t\t\tif (func_num_args() == 3) {\n\t\t\t\t## set the variables\n\t\t\t\t$postVar = func_get_arg(0);\n\t\t\t\t$inputFieldName = func_get_arg(1);\n\t\t\t\t$rExp = func_get_arg(2);\n\t\t\t} else {\n\t\t\t\tprint \"error: invalid arguments\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t## check if $postVar is an array if not return false.\n\t\tif ( !is_array($postVar) ) {\n\t\t\treturn false;\n\t\t}\n\t\t## check if fieldName is set.\n\t\tif ( !$inputFieldName ) {\n\t\t\treturn false;\n\t\t}\n\t\t## check if rExp is set (used for regular expression checking)\n\t\tif ( !$rExp ) {\n\t\t\t## use default regular exp (ie: more than 0 apha characters)\n\t\t\t$rExp = \"/.*/\";\n\t\t}\n\t\t## check if variable was set in postVar\n\t\tif ( $postVar[\"$inputFieldName\"] ) {\n\t\t\t## check if the input has valid data.\n\t\t\t$tmpValue = $postVar[\"$inputFieldName\"];\n\t\t\tif ( preg_match($rExp,$tmpValue) ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t## return false, since field input and value does not exist.\n\t\treturn false;\n\t}",
"function checkArguments($arguments) {\r\n foreach ($this->attributes as $dbfield_name => $attribute) {\r\n if (isset($attribute['readOnly']))\r\n continue;\r\n\r\n if (isset($attribute['mandatory'])\r\n and $attribute['mandatory'] === true\r\n and (trim($arguments[$dbfield_name]) == \"\" or trim($arguments[$dbfield_name]) === \"0\")\r\n ) {\r\n return __('Mandatory field: ', 'linesmanager') . $attribute['name'];\r\n }\r\n\r\n if (isset($attribute['type'])\r\n and $attribute['type'] == 'number'\r\n and ! is_numeric($arguments[$dbfield_name])\r\n ) {\r\n return __('Numeric field: ', 'linesmanager') . $attribute['name'];\r\n }\r\n }\r\n\r\n return true;\r\n }",
"function hasData( $data ){\r\n\t\t\t\tif( !(strlen($_POST[\"{$data}\"]) === 0) ) return true;\r\n\t\t\t\telse return false;\r\n\t\t\t}",
"function validate_post($data)\n\t{\n\t\t/* Validating the hostname, the database name and the username. The password is optional. */\n\t\treturn !empty($data['hostname']) && !empty($data['username']) && !empty($data['database']) && !empty($data['useremail']) && !empty($data['userpass']);\n\t}",
"public function has_postback(){\r\n return (count($_POST) >= 1);\r\n }",
"function isData( $data ){\r\n\t\t\t\tif( isset($_POST[\"{$data}\"]) ) return true;\r\n\t\t\t\telse return false;\r\n\t\t\t}",
"function has_arg($key)\n {\n return array_key_exists($key, $this->args);\n }",
"function checkFields( $args )\n {\n\t\treturn true;\n }",
"public function postExists($key){\n return isset($_POST[$key]);\n }",
"public function check_post($post_data)\n {\n }",
"public function hasInput()\n {\n return ! empty($_POST);\n }",
"function exist_check() {\n\tfor($i = 0; $i < func_num_args(); $i++)\n\t\tif (!isset($_POST[func_get_arg($i)])) {\n\t\t\theader('Location: http://p1.img.cctvpic.com/20120409/images/1333902721891_1333902721891_r.jpg');\n\t\t\texit();\n\t\t}\n\t}",
"public function hasArgument($name)\n {\n // TODO : regarder si il ne faut pas faire comme pour les options et aller chercher si il y a bien une valeur saisie par l'utilisateur dans les cas d'arguments facultatifs !!!\n return $this->input->hasArgument($name);\n }",
"function check_fields($fields){\n foreach ($fields as $field){\n $a = filter_input(INPUT_POST, $field);\n \n if ($a === null || !isset($a) || empty($a)){\n return false;\n }\n }\n \n return true;\n }",
"function checkInput($request)\n {\n if(isset($request['n_name']) && isset($request['n_desc']) && isset($request['n_image']) ) {\n return 1;\n } \n return 0; \n }",
"protected function hasArgument($name)\n {\n return $this->input->hasArgument($name);\n }",
"private function checkReq() : bool\n {\n if (count(array_intersect_key($this->required, $this->post)) == count($this->required)) {\n return true;\n }\n return false;\n }",
"public function check() {\n\n\t\t\tif ( self::doing_ajax() ) {\n\t\t\t\tif ( false === check_ajax_referer( Options::$nonce_action, Options::$nonce_name, false ) ) {\n\t\t\t\t\twp_send_json_error( __( 'Unauthorized.', self::get_plugin_name() ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( false === check_admin_referer( Options::$nonce_action, Options::$nonce_name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn ! (\n\t\t\t\t! isset( $_POST[ Options::$nonce_name ] ) ||\n\t\t\t\t( isset( $_POST[ Options::$nonce_name ] ) && ! wp_verify_nonce( sanitize_key( $_POST[ Options::$nonce_name ] ), Options::$nonce_action ) )\n\t\t\t); // Input var ok.\n\n\t\t}",
"function checkSet(){\n return isset($_POST['address'], $_POST['city'], $_POST['state'], $_POST['landlord_fname'], $_POST['landlord_lname']);\n }",
"function post_var($var_key, $default_value = null) {\n\tglobal $_POST;\n\treturn exists($var_key, $_POST, $default_value);\n}",
"public static function validatePOST(array $vars_to_check_for): bool\n {\n\n foreach ($vars_to_check_for as $var) {\n if (!isset($_POST[$var]) || empty($_POST[$var])) {\n return false;\n break;\n }\n }\n return true;\n }",
"public static function hasPost() \n\t{ \n\t\treturn (bool)(self::Post() != null && strlen(self::Post()) > 0); \n\t}",
"public function hasPostedInput()\n {\n return true;\n }",
"private function checkIfPost(){\n\n if ($_SERVER['REQUEST_METHOD'] === 'POST')\n {\n $this->view->printMsg($this->model->{$_POST['postFunction']}(), $_POST['postFunction']);\n }\n\n }",
"function var_check($var)\n\t{\n\t\t$value = false;\n\t\t\n\t\tif (isset($_GET[$var]) AND $_GET[$var] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\tif (isset($_POST[$var]) AND $_POST[$var] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\tif (isset($_POST[$var . '_x']) AND $_POST[$var . '_x'] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}",
"function verifyRequiredParams($required_fields)\n{\n \n //Getting the request parameters\n $request_params = $_REQUEST;\n \n //Looping through all the parameters\n foreach ($required_fields as $field) {\n //if any requred parameter is missing\n if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n \n //returning true;\n return true;\n }\n }\n return false;\n}"
] | [
"0.7219731",
"0.7085317",
"0.6976408",
"0.67280555",
"0.65734017",
"0.6508193",
"0.64588416",
"0.6437745",
"0.6382075",
"0.6323808",
"0.6314073",
"0.62856084",
"0.6268067",
"0.6239454",
"0.6221501",
"0.6210019",
"0.620913",
"0.62048495",
"0.6204463",
"0.6203058",
"0.6202265",
"0.61982965",
"0.616638",
"0.61628854",
"0.61571693",
"0.60911274",
"0.6088076",
"0.6080778",
"0.6070183",
"0.60634214"
] | 0.7721436 | 0 |
It checks wheather an argument (or arguments) exist(s) on GET variables. | public static function CheckGet()
{
foreach(func_get_args() as $arg)
if(!isset($_GET[$arg]))
throw new ArgumentException("Argument '$arg' is not set on GET variables.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function Check()\r\n {\r\n foreach(func_get_args() as $arg)\r\n if(!isset($_POST[$arg]) && !isset($_GET[$arg]))\r\n throw new ArgumentException(\"Argument '$arg' is not set on POST and GET variables.\");\r\n }",
"private function checkGet()\n {\n foreach ($_GET as $key => $value) {\n if (is_int($key)) {\n $key = $this->testInput($key);\n intval($key);\n } else {\n $key = $this->testInput($key);\n }\n if (is_int($value)) {\n $value = $this->testInput($value);\n intval($value);\n } else {\n $value = $this->testInput($value);\n }\n }\n }",
"public static function validateGET(array $vars_to_check_for): bool\n {\n\n foreach ($vars_to_check_for as $var) {\n if (!isset($_GET[$var]) || empty($_GET[$var])) {\n return false;\n }\n }\n return true;\n }",
"function validarParametros($parametros) {\r\n\t$puedoUsar=true;\r\n\tforeach ($parametros as $nombre) {\r\n\t\t$puedoUsar=isset($_GET[$nombre]) && !empty($_GET[$nombre]);\r\n\t\tif($puedoUsar == false) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn $puedoUsar;\r\n}",
"function _switcher_is_cgi_parameter_present() {\n return (\n isset($_GET[SWITCHER_CGI_VAR])\n );\n}",
"public function isGet(){\n\t\tif (1 == count($_GET) && isset($_GET['r'])){\n\t\t\treturn false; \n\t\t}\n\t\treturn true; \n\t}",
"public function isGet() {\n return count($_GET) !== 0;\n }",
"public function has_getback(){\r\n return (count($_GET) >= 1);\r\n }",
"function has_arg($key)\n {\n return array_key_exists($key, $this->args);\n }",
"function iin_panels_extras_url_parameters_ctools_access_check($conf, $context) {\n // Grab the setting for this instance and compare it to the url parameters from the context\n $param_key = $conf['param_key'];\n $param_value = $conf['param_value'];\n\tif (!empty($param_key) && !empty($param_value)) {\n if(!empty($_GET) && !empty($_GET[$param_key]) && $_GET[$param_key] == $param_value) {\n return TRUE;\n } \n\t}\n\telse if (!empty($param_key) && empty($param_value)) {\n \tif(!empty($_GET) && !empty($_GET[$param_key])) {\n return TRUE;\n } \n\t}\n\t// look for the value in any url parameter\n\telse if (!empty($_GET) && in_array($param_value, $_GET) == TRUE) {\n\t\treturn TRUE;\n }\n return FALSE;\n}",
"private function _isValidQueryAttribute($arg) {\n\t\treturn in_array($arg, array_values($this->_allowedQueryStrings) );\n\t}",
"function __HTTPRequest_isParameter($name) {\n return isset($_GET[$name]) || isset($_POST[$name]);\n }",
"function cc_get_isset( $var ) {\n\tcc_get_fail_if_not_valid( $var );\n\n\treturn isset( $_GET[$var] );\n}",
"public function getExists($key){\n return isset($_GET[$key]);\n }",
"public static function existsGET(string $name): bool\n\t{\n\t\treturn array_key_exists($name, $_GET);\n\t}",
"function checkVarIsSet($string) {\n\n\t\t\tif (isset($_GET[$string] ) ){\n\t\t\t\t\n\t\t\t\treturn $_GET[$string];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\treturn \"undefined\";\n\t\t\t}\n\t\t//\tif (isset($_POST[\"idnumber\"]))\n\t\t}",
"function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}",
"function inputGet($key){\n return isset($_GET[$key])? $_GET[$key] : FALSE;\n}",
"function get_argument() {\n $query = drupal_get_query_parameters();\n if (isset($query[$this->options['arg_id']])) {\n // Just set the argument here. We'll validate and sanitize the input in\n // views_geojson_bbox_argument::query().\n return $query[$this->options['arg_id']];\n }\n else {\n if ($this->argument->options['empty_result']) {\n // Return no values if arg not present and empty result option is set.\n $this->view->built = TRUE;\n $this->view->executed = TRUE;\n return FALSE;\n }\n else {\n // Return all values if arg not present.\n return TRUE;\n }\n }\n }",
"function iin_panels_extras_url_param_bypass_ctools_access_check($conf, $context) {\n // If for some unknown reason that $context isn't set, we just want to be sure.\n //if (empty($context) || empty($context->data)) {\n // return FALSE;\n //}\n\n // Grab the setting for this instance and compare it to the url parameters from the context\n $param = $conf['url_param'];\n \n //grab the indexed version of $_GET\n //$url_params = $context->data['query_index'];\n \n //foreach($url_params as $key => $val) {\n if (!empty($_GET)) {\n\t \n\t foreach ($_GET as $key => $val) {\n\t\t if (!empty($val)) {\n\t\t\t if (strpos($param, $val) !== FALSE) {\n\t\t\t\t return TRUE;\n\t\t\t }\n\t\t }\n\t\t \n\t }\n }\n \n}",
"public static function CheckPost()\r\n {\r\n foreach(func_get_args() as $arg)\r\n if(!isset($_POST[$arg]))\r\n throw new ArgumentException(\"Argument '$arg' is not set on POST variables.\");\r\n }",
"function verifyRequiredParams($required_fields)\n{\n \n //Getting the request parameters\n $request_params = $_REQUEST;\n \n //Looping through all the parameters\n foreach ($required_fields as $field) {\n //if any requred parameter is missing\n if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n \n //returning true;\n return true;\n }\n }\n return false;\n}",
"public static function has_get($key) {\n\t\treturn array_key_exists($key,$_GET);\n\t}",
"public static function get_arg($arg_name){\n return(isset($_GET[$arg_name]) ? $_GET[$arg_name] : null);\n\t}",
"function var_check($var)\n\t{\n\t\t$value = false;\n\t\t\n\t\tif (isset($_GET[$var]) AND $_GET[$var] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\tif (isset($_POST[$var]) AND $_POST[$var] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\tif (isset($_POST[$var . '_x']) AND $_POST[$var . '_x'] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}",
"public function has($name){\r\n return (isset($_REQUEST[$name]) && $_REQUEST[$name]!=\"\" );\r\n }",
"function var_get($nom) {\n //retourne la valeur si la variable nom existe sinon false\n return (isset($_GET[$nom])) ? $_GET[$nom] : false;\n}",
"protected function checkSpecificParams()\n {\n }",
"public static function wantToRegister(){\n\t\treturn array_key_exists(self::$registerURL, $_GET);\n\t}",
"public function hasParam(){\n return $this->_has(2);\n }"
] | [
"0.729206",
"0.70095766",
"0.6860369",
"0.6637429",
"0.6628285",
"0.64815474",
"0.6413106",
"0.63889086",
"0.6350378",
"0.63149995",
"0.6282955",
"0.6278615",
"0.623512",
"0.61882013",
"0.61616737",
"0.6159875",
"0.61578774",
"0.614415",
"0.6128948",
"0.60899234",
"0.60316694",
"0.60116804",
"0.59810895",
"0.59717935",
"0.59654915",
"0.5931616",
"0.5913269",
"0.5893231",
"0.5887023",
"0.5877866"
] | 0.7859218 | 0 |
It checks wheather an argument (or arguments) exist(s) on POST or GET variables. | public static function Check()
{
foreach(func_get_args() as $arg)
if(!isset($_POST[$arg]) && !isset($_GET[$arg]))
throw new ArgumentException("Argument '$arg' is not set on POST and GET variables.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function CheckPost()\r\n {\r\n foreach(func_get_args() as $arg)\r\n if(!isset($_POST[$arg]))\r\n throw new ArgumentException(\"Argument '$arg' is not set on POST variables.\");\r\n }",
"private function checkPostVars(){\n\t\t\tforeach($this->post_vars as $component=>$is_mandatory){\n\t\t\t\tif(is_null($this->$component) && $is_mandatory){\n\t\t\t\t\techo 'A mandatory Post param \"'.$component.'\" is missing...<br/>';\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"public static function CheckGet()\r\n {\r\n foreach(func_get_args() as $arg)\r\n if(!isset($_GET[$arg]))\r\n throw new ArgumentException(\"Argument '$arg' is not set on GET variables.\");\r\n }",
"static function checkPostArgumentsPermissions() {\r\n if (isset($_POST['remove'])\r\n or isset($_POST['associate'])\r\n or isset($_POST['update'])\r\n or isset($_POST['add'])\r\n or isset($_POST['purge'])) {\r\n\r\n if ((!PluginLinesmanagerLine::canUpdate() and ( isset($_POST['remove'])\r\n or isset($_POST['associate'])\r\n or isset($_POST['update'])))\r\n\r\n or ( !PluginLinesmanagerLine::canCreate() and isset($_POST['add']))\r\n\r\n or ( !PluginLinesmanagerLine::canPurge() and isset($_POST['purge']))\r\n ) {\r\n Session::addMessageAfterRedirect(__(\"No permission\", \"linesmanager\"), false, ERROR);\r\n HTML::back();\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }",
"function has_arg($key)\n {\n return array_key_exists($key, $this->args);\n }",
"function checkInputfield() {\n\t\t## local variables init.\n\t\t$postVar = 0;\n\t\t$inputFieldName = 0;\n\t\t$rExp = 0;\n\t\t## collect the argument parameters there should be ony 2,3 arguments\n\t\t## where the 3rd arguement is a regular exp (optional)\n\t\tif (func_num_args() == 2) {\n\t\t\t## set the variables\n\t\t\t$postVar = func_get_arg(0);\n\t\t\t$inputFieldName = func_get_arg(1);\n\t\t} else {\n\t\t\tif (func_num_args() == 3) {\n\t\t\t\t## set the variables\n\t\t\t\t$postVar = func_get_arg(0);\n\t\t\t\t$inputFieldName = func_get_arg(1);\n\t\t\t\t$rExp = func_get_arg(2);\n\t\t\t} else {\n\t\t\t\tprint \"error: invalid arguments\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t## check if $postVar is an array if not return false.\n\t\tif ( !is_array($postVar) ) {\n\t\t\treturn false;\n\t\t}\n\t\t## check if fieldName is set.\n\t\tif ( !$inputFieldName ) {\n\t\t\treturn false;\n\t\t}\n\t\t## check if rExp is set (used for regular expression checking)\n\t\tif ( !$rExp ) {\n\t\t\t## use default regular exp (ie: more than 0 apha characters)\n\t\t\t$rExp = \"/.*/\";\n\t\t}\n\t\t## check if variable was set in postVar\n\t\tif ( $postVar[\"$inputFieldName\"] ) {\n\t\t\t## check if the input has valid data.\n\t\t\t$tmpValue = $postVar[\"$inputFieldName\"];\n\t\t\tif ( preg_match($rExp,$tmpValue) ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t## return false, since field input and value does not exist.\n\t\treturn false;\n\t}",
"function __HTTPRequest_isParameter($name) {\n return isset($_GET[$name]) || isset($_POST[$name]);\n }",
"private function check_post_actions() {\n\t\t$action = $this->params['action'];\n\t\t$post_actions = $this->post_actions;\n\t\tif (is_string($post_actions)) {\n\t\t\t$post_actions = preg_split('/\\s*,\\s*/', $post_actions);\n\t\t}\n\t\tif ($this->request->method == 'GET' && in_array($action, $post_actions)) {\n\t\t\techo 'No route matches [GET]: ' . $this->request->path;\n\t\t\texit;\n\t\t}\n\t}",
"function var_check($var)\n\t{\n\t\t$value = false;\n\t\t\n\t\tif (isset($_GET[$var]) AND $_GET[$var] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\tif (isset($_POST[$var]) AND $_POST[$var] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\tif (isset($_POST[$var . '_x']) AND $_POST[$var . '_x'] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}",
"private function checkReq() : bool\n {\n if (count(array_intersect_key($this->required, $this->post)) == count($this->required)) {\n return true;\n }\n return false;\n }",
"function checkInput($request)\n {\n if(isset($request['n_name']) && isset($request['n_desc']) && isset($request['n_image']) ) {\n return 1;\n } \n return 0; \n }",
"protected function hasArgument($name)\n {\n return $this->input->hasArgument($name);\n }",
"public function hasArgument($name)\n {\n // TODO : regarder si il ne faut pas faire comme pour les options et aller chercher si il y a bien une valeur saisie par l'utilisateur dans les cas d'arguments facultatifs !!!\n return $this->input->hasArgument($name);\n }",
"private function checkPost()\n {\n foreach ($_POST as $key => $value) {\n if (is_int($key)) {\n $key = $this->testInput($key);\n intval($key);\n } else {\n $key = $this->testInput($key);\n }\n if (is_int($value)) {\n $value = $this->testInput($value);\n intval($value);\n } else {\n $value = $this->testInput($value);\n }\n }\n }",
"public function has($name){\r\n return (isset($_REQUEST[$name]) && $_REQUEST[$name]!=\"\" );\r\n }",
"function exist_check() {\n\tfor($i = 0; $i < func_num_args(); $i++)\n\t\tif (!isset($_POST[func_get_arg($i)])) {\n\t\t\theader('Location: http://p1.img.cctvpic.com/20120409/images/1333902721891_1333902721891_r.jpg');\n\t\t\texit();\n\t\t}\n\t}",
"function _switcher_is_cgi_parameter_present() {\n return (\n isset($_GET[SWITCHER_CGI_VAR])\n );\n}",
"function checkArguments($arguments) {\r\n foreach ($this->attributes as $dbfield_name => $attribute) {\r\n if (isset($attribute['readOnly']))\r\n continue;\r\n\r\n if (isset($attribute['mandatory'])\r\n and $attribute['mandatory'] === true\r\n and (trim($arguments[$dbfield_name]) == \"\" or trim($arguments[$dbfield_name]) === \"0\")\r\n ) {\r\n return __('Mandatory field: ', 'linesmanager') . $attribute['name'];\r\n }\r\n\r\n if (isset($attribute['type'])\r\n and $attribute['type'] == 'number'\r\n and ! is_numeric($arguments[$dbfield_name])\r\n ) {\r\n return __('Numeric field: ', 'linesmanager') . $attribute['name'];\r\n }\r\n }\r\n\r\n return true;\r\n }",
"function verifyRequiredParams($required_fields)\n{\n \n //Getting the request parameters\n $request_params = $_REQUEST;\n \n //Looping through all the parameters\n foreach ($required_fields as $field) {\n //if any requred parameter is missing\n if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n \n //returning true;\n return true;\n }\n }\n return false;\n}",
"public function hasControllerArguments(): bool;",
"function validate_post($data)\n\t{\n\t\t/* Validating the hostname, the database name and the username. The password is optional. */\n\t\treturn !empty($data['hostname']) && !empty($data['username']) && !empty($data['database']) && !empty($data['useremail']) && !empty($data['userpass']);\n\t}",
"public function check() {\n\n\t\t\tif ( self::doing_ajax() ) {\n\t\t\t\tif ( false === check_ajax_referer( Options::$nonce_action, Options::$nonce_name, false ) ) {\n\t\t\t\t\twp_send_json_error( __( 'Unauthorized.', self::get_plugin_name() ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( false === check_admin_referer( Options::$nonce_action, Options::$nonce_name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn ! (\n\t\t\t\t! isset( $_POST[ Options::$nonce_name ] ) ||\n\t\t\t\t( isset( $_POST[ Options::$nonce_name ] ) && ! wp_verify_nonce( sanitize_key( $_POST[ Options::$nonce_name ] ), Options::$nonce_action ) )\n\t\t\t); // Input var ok.\n\n\t\t}",
"function hasData( $data ){\r\n\t\t\t\tif( !(strlen($_POST[\"{$data}\"]) === 0) ) return true;\r\n\t\t\t\telse return false;\r\n\t\t\t}",
"public static function validateGET(array $vars_to_check_for): bool\n {\n\n foreach ($vars_to_check_for as $var) {\n if (!isset($_GET[$var]) || empty($_GET[$var])) {\n return false;\n }\n }\n return true;\n }",
"function GETPOSTISSET($paramname)\n{\n\treturn (isset($_POST[$paramname]) || isset($_GET[$paramname]));\n}",
"function validarParametros($parametros) {\r\n\t$puedoUsar=true;\r\n\tforeach ($parametros as $nombre) {\r\n\t\t$puedoUsar=isset($_GET[$nombre]) && !empty($_GET[$nombre]);\r\n\t\tif($puedoUsar == false) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn $puedoUsar;\r\n}",
"function checkVarIsSet($string) {\n\n\t\t\tif (isset($_GET[$string] ) ){\n\t\t\t\t\n\t\t\t\treturn $_GET[$string];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\treturn \"undefined\";\n\t\t\t}\n\t\t//\tif (isset($_POST[\"idnumber\"]))\n\t\t}",
"public function has_postback(){\r\n return (count($_POST) >= 1);\r\n }",
"function checkFields( $args )\n {\n\t\treturn true;\n }",
"private function checkIfPost(){\n\n if ($_SERVER['REQUEST_METHOD'] === 'POST')\n {\n $this->view->printMsg($this->model->{$_POST['postFunction']}(), $_POST['postFunction']);\n }\n\n }"
] | [
"0.756965",
"0.69067895",
"0.6814043",
"0.6808377",
"0.657076",
"0.65400094",
"0.6460059",
"0.64241976",
"0.639118",
"0.6360781",
"0.63526964",
"0.6318468",
"0.63070244",
"0.63036495",
"0.6282503",
"0.6274128",
"0.62555736",
"0.62495697",
"0.6233701",
"0.6213847",
"0.621232",
"0.6207412",
"0.61771244",
"0.61685437",
"0.6165669",
"0.61595285",
"0.6136148",
"0.6123379",
"0.6108128",
"0.6105567"
] | 0.7706357 | 0 |
Operation userCountWithHttpInfo Counts the number of results given for a specific search criteria | public function userCountWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)
{
$returnType = 'int';
$request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'int',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userCount_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getUserCountWithHttpInfo($id = null, $id_in = null, $first_name = null, $first_name_like = null, $last_name = null, $last_name_like = null, $email = null, $email_like = null, $member_of_group = null, $member_of_tenant = null, $potential_starter = null)\n {\n $request = $this->getUserCountRequest($id, $id_in, $first_name, $first_name_like, $last_name, $last_name_like, $email, $email_like, $member_of_group, $member_of_tenant, $potential_starter);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\CountResultDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\CountResultDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\CountResultDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userCountAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function userCount_0Request($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount_0, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function customersCountGetWithHttpInfo($where = null)\n {\n // parse inputs\n $resourcePath = \"/Customers/count\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2001',\n '/Customers/count'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2001', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2001', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function CountUser_get()\r\n {\r\n $Select = $this->UserModel->Count_Users();\r\n $this->response($Select,REST_Controller::HTTP_OK);\r\n }",
"protected function userCountRequest($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n // verify the required parameter 'virtual_operator' is set\n if ($virtual_operator === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $virtual_operator when calling userCount'\n );\n }\n if (strlen($virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/{virtualOperator}/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n // path params\n if ($virtual_operator !== null) {\n $resourcePath = str_replace(\n '{' . 'virtualOperator' . '}',\n ObjectSerializer::toPathValue($virtual_operator),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function findUserCount();",
"public function getUserCount($filter = array()) {\n if(!is_null($this->usermanager_auth) && $this->canDo('getUserCount') ){\n return $this->usermanager_auth->getUserCount($filter);\n } else {\n msg(\"authorisation method does not provide user counts\", -1);\n return 0;\n }\n }",
"public function tagsCountGetWithHttpInfo($where = null)\n {\n // parse inputs\n $resourcePath = \"/Tags/count\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2001',\n '/Tags/count'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2001', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2001', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getAuthorizationCountWithHttpInfo($id = null, $type = null, $user_id_in = null, $group_id_in = null, $resource_type = null, $resource_id = null)\n {\n $request = $this->getAuthorizationCountRequest($id, $type, $user_id_in, $group_id_in, $resource_type, $resource_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\CountResultDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\CountResultDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\CountResultDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public static function get_users_count($context, $search = '') {\n global $DB;\n\n list($sql, $params) = self::get_users_sql_and_params($context, $search, true);\n return $DB->count_records_sql($sql, $params);\n\n }",
"public function getCount(UserFilter $filter): int;",
"public function userCount_0($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n list($response) = $this->userCount_0WithHttpInfo($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n return $response;\n }",
"public function count()\n {\n if ($this->queryShouldBeStopped) {\n return 0;\n }\n\n $queryType = 'UserQuery::count';\n $filter = $this->normalizeFilter();\n $callback = function() use ($filter) {\n return (int) $this->bxObject->getList($order = 'ID', $by = 'ASC', $filter, [\n 'NAV_PARAMS' => [\n 'nTopCount' => 0,\n ],\n ])->NavRecordCount;\n };\n\n return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);\n }",
"public function imageCollectionCountWithHttpInfo($where = null)\n {\n // parse inputs\n $resourcePath = \"/imageCollections/count\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\DBCDK\\CommunityServices\\Model\\InlineResponse200',\n '/imageCollections/count'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\DBCDK\\CommunityServices\\Model\\InlineResponse200', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\DBCDK\\CommunityServices\\Model\\InlineResponse200', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function userCount()\n {\n return $this->count();\n }",
"public function getUsersBySearchWithHttpInfo($first_name = null, $last_name = null, $email = null, $updated_after_utc = null, $skip = null, $top = null, $count_total = null)\n {\n // parse inputs\n $resourcePath = \"/Users/Search\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json'));\n\n // query params\n if ($first_name !== null) {\n $queryParams['first_name'] = $this->apiClient->getSerializer()->toQueryValue($first_name);\n }\n // query params\n if ($last_name !== null) {\n $queryParams['last_name'] = $this->apiClient->getSerializer()->toQueryValue($last_name);\n }\n // query params\n if ($email !== null) {\n $queryParams['email'] = $this->apiClient->getSerializer()->toQueryValue($email);\n }\n // query params\n if ($updated_after_utc !== null) {\n $queryParams['updated_after_utc'] = $this->apiClient->getSerializer()->toQueryValue($updated_after_utc);\n }\n // query params\n if ($skip !== null) {\n $queryParams['skip'] = $this->apiClient->getSerializer()->toQueryValue($skip);\n }\n // query params\n if ($top !== null) {\n $queryParams['top'] = $this->apiClient->getSerializer()->toQueryValue($top);\n }\n // query params\n if ($count_total !== null) {\n $queryParams['count_total'] = $this->apiClient->getSerializer()->toQueryValue($count_total);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\User[]',\n '/Users/Search'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\User[]', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\User[]', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getUserCount() : int\n {\n return $this->userCount;\n }",
"public function userSearch_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto[]';\n $request = $this->userSearch_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserOutputDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"function getUserCount($filter=array()) {\n\n if($this->users === null) $this->_loadUserData();\n\n if (!count($filter)) return count($this->users);\n\n $count = 0;\n $this->_constructPattern($filter);\n\n foreach ($this->users as $user => $info) {\n $count += $this->_filter($user, $info);\n }\n\n return $count;\n }",
"public function getIncidentsCountWithHttpInfo($incident_id = null, $incident_type = null, $incident_message = null, $incident_message_like = null, $process_definition_id = null, $process_definition_key_in = null, $process_instance_id = null, $execution_id = null, $incident_timestamp_before = null, $incident_timestamp_after = null, $activity_id = null, $failed_activity_id = null, $cause_incident_id = null, $root_cause_incident_id = null, $configuration = null, $tenant_id_in = null, $job_definition_id_in = null)\n {\n $request = $this->getIncidentsCountRequest($incident_id, $incident_type, $incident_message, $incident_message_like, $process_definition_id, $process_definition_key_in, $process_instance_id, $execution_id, $incident_timestamp_before, $incident_timestamp_after, $activity_id, $failed_activity_id, $cause_incident_id, $root_cause_incident_id, $configuration, $tenant_id_in, $job_definition_id_in);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\CountResultDto[]' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\CountResultDto[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto[]';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\CountResultDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function countuserbyqueryAction()\n\t{\n\t\t\n\t\t$r = $this->getRequest();\n\t\t//$q = ($r->getParam('q'))? $r->getParam('q') : '';\n\t\t//$q = base64_decode($q);\n\t\t\n\t\t$pColumns = array( 'ku.kopel', 'ku.username', 'ku.company', 'gag.value', 'kus.status' );\n\t\t\n\t\t$sWhere = \"\";\n\t\tif ($r->getParam('q'))\n\t\t{\n\t\t\t$q = base64_decode($r->getParam('q'));\n\t\t\tfor ($i=0;$i<count($pColumns);$i++)\n\t\t\t{\n\t\t\t\t$sWhere .= $pColumns[$i].\" LIKE '%\".mysql_real_escape_string($q).\"%' OR \";\n\t\t\t}\n\t\t\t\n\t\t\t$sWhere = substr_replace($sWhere,\"\",-3);\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$sWhere = \"1=1\";\n\t\t}\n\t\t\n\t\t//$finalQuery = $mainQuery.$sWhere;\n\t\t//$db = Zend_Registry::get('db2');\n\t\t//$query = $db->query($finalQuery);\n\t\t//$db = Zend_Db_Table::getDefaultAdapter()->query($finalQuery);\n\t\t\n\t\t//$row = $query->fetchAll(Zend_Db::FETCH_ASSOC);\n\t\t//$row = $db->fetchAll(Zend_Db::FETCH_OBJ);\n\t\t//echo $row[0]['count'];\n\t\t\n\t\t$tblUser = new App_Model_Db_Table_User();\n\t\t$row = App_Model_Show_User::show()->countUser($sWhere);\n\t\techo $row; \n\t\tdie();\n\t}",
"public function getUserCountAsyncWithHttpInfo($id = null, $id_in = null, $first_name = null, $first_name_like = null, $last_name = null, $last_name_like = null, $email = null, $email_like = null, $member_of_group = null, $member_of_tenant = null, $potential_starter = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n $request = $this->getUserCountRequest($id, $id_in, $first_name, $first_name_like, $last_name, $last_name_like, $email, $email_like, $member_of_group, $member_of_tenant, $potential_starter);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function countUsers() {\n\t\t$count = $this->sm->countUsers(time());\n\t\tif(isset($count[0])) {\n\t\t\treturn intval($count[0]['theCount']);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"function getUserCount($filter=array()){\n $count = 0;\n $uc_filter = array();\n// if($this->users !== NULL){\n// $count = count($this->users);\n// }else{\n if(!empty($filter)){\n $uc_filter = $this->_construct_filter($filter);\n }\n $count = uc_user_count($uc_filter);\n// }\n return $count;\n }",
"public function countAction(){\r\n \r\n $countYouth = $this->getDoctrine()->getRepository('zahiraBundle:youth')->counterUser();\r\n return new JsonResponse($countYouth);\r\n }",
"function wp_count_users( $args = '' ) {\n\twp_parse_args(\n\t\t$args, array(\n\t\t\t'role' => ''\n\t\t)\n\t);\n\t\n\t$users = new WP_Query_Users( $args );\n\treturn $users->get_total();\n\t\n}",
"function user_count()\n {\n $this->company_db->from('tbl_user');\n return $this->company_db->count_all_results();\n }"
] | [
"0.7701078",
"0.66073155",
"0.6547441",
"0.62181276",
"0.6135468",
"0.6080681",
"0.60623306",
"0.60144776",
"0.59932125",
"0.57799804",
"0.57236683",
"0.57110476",
"0.5646778",
"0.5614184",
"0.5606964",
"0.55630004",
"0.5515245",
"0.5515117",
"0.5494573",
"0.54777604",
"0.546819",
"0.54649603",
"0.5445454",
"0.54343903",
"0.5422476",
"0.54040474",
"0.53771615",
"0.536498",
"0.5361188",
"0.5340371"
] | 0.72531354 | 1 |
Operation userCountAsyncWithHttpInfo Counts the number of results given for a specific search criteria | public function userCountAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)
{
$returnType = 'int';
$request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userCount_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userCountWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getUserCountAsyncWithHttpInfo($id = null, $id_in = null, $first_name = null, $first_name_like = null, $last_name = null, $last_name_like = null, $email = null, $email_like = null, $member_of_group = null, $member_of_tenant = null, $potential_starter = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n $request = $this->getUserCountRequest($id, $id_in, $first_name, $first_name_like, $last_name, $last_name_like, $email, $email_like, $member_of_group, $member_of_tenant, $potential_starter);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function userCount_0Async($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n return $this->userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userCountAsync($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n return $this->userCountAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getUserCountWithHttpInfo($id = null, $id_in = null, $first_name = null, $first_name_like = null, $last_name = null, $last_name_like = null, $email = null, $email_like = null, $member_of_group = null, $member_of_tenant = null, $potential_starter = null)\n {\n $request = $this->getUserCountRequest($id, $id_in, $first_name, $first_name_like, $last_name, $last_name_like, $email, $email_like, $member_of_group, $member_of_tenant, $potential_starter);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\CountResultDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\CountResultDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\CountResultDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"protected function userCount_0Request($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount_0, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function userCountRequest($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n // verify the required parameter 'virtual_operator' is set\n if ($virtual_operator === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $virtual_operator when calling userCount'\n );\n }\n if (strlen($virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/{virtualOperator}/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n // path params\n if ($virtual_operator !== null) {\n $resourcePath = str_replace(\n '{' . 'virtualOperator' . '}',\n ObjectSerializer::toPathValue($virtual_operator),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function virtualOperatorCountAsyncWithHttpInfo($search_criteria_id = null, $search_criteria_email = null, $search_criteria_alias = null, $search_criteria_name = null, $search_criteria_include_settings = null, $search_criteria_include_medias = null, $search_criteria_offset = null, $search_criteria_number_of_records = null, $search_criteria_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->virtualOperatorCountRequest($search_criteria_id, $search_criteria_email, $search_criteria_alias, $search_criteria_name, $search_criteria_include_settings, $search_criteria_include_medias, $search_criteria_offset, $search_criteria_number_of_records, $search_criteria_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getAuthorizationCountAsyncWithHttpInfo($id = null, $type = null, $user_id_in = null, $group_id_in = null, $resource_type = null, $resource_id = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n $request = $this->getAuthorizationCountRequest($id, $type, $user_id_in, $group_id_in, $resource_type, $resource_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function CountUser_get()\r\n {\r\n $Select = $this->UserModel->Count_Users();\r\n $this->response($Select,REST_Controller::HTTP_OK);\r\n }",
"public function findUserCount();",
"public function getIncidentsCountAsyncWithHttpInfo($incident_id = null, $incident_type = null, $incident_message = null, $incident_message_like = null, $process_definition_id = null, $process_definition_key_in = null, $process_instance_id = null, $execution_id = null, $incident_timestamp_before = null, $incident_timestamp_after = null, $activity_id = null, $failed_activity_id = null, $cause_incident_id = null, $root_cause_incident_id = null, $configuration = null, $tenant_id_in = null, $job_definition_id_in = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto[]';\n $request = $this->getIncidentsCountRequest($incident_id, $incident_type, $incident_message, $incident_message_like, $process_definition_id, $process_definition_key_in, $process_instance_id, $execution_id, $incident_timestamp_before, $incident_timestamp_after, $activity_id, $failed_activity_id, $cause_incident_id, $root_cause_incident_id, $configuration, $tenant_id_in, $job_definition_id_in);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function count()\n {\n if ($this->queryShouldBeStopped) {\n return 0;\n }\n\n $queryType = 'UserQuery::count';\n $filter = $this->normalizeFilter();\n $callback = function() use ($filter) {\n return (int) $this->bxObject->getList($order = 'ID', $by = 'ASC', $filter, [\n 'NAV_PARAMS' => [\n 'nTopCount' => 0,\n ],\n ])->NavRecordCount;\n };\n\n return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);\n }",
"public function tagsCountGetWithHttpInfo($where = null)\n {\n // parse inputs\n $resourcePath = \"/Tags/count\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2001',\n '/Tags/count'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2001', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2001', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function customersCountGetWithHttpInfo($where = null)\n {\n // parse inputs\n $resourcePath = \"/Customers/count\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2001',\n '/Customers/count'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2001', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2001', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getUserCountAsync($id = null, $id_in = null, $first_name = null, $first_name_like = null, $last_name = null, $last_name_like = null, $email = null, $email_like = null, $member_of_group = null, $member_of_tenant = null, $potential_starter = null)\n {\n return $this->getUserCountAsyncWithHttpInfo($id, $id_in, $first_name, $first_name_like, $last_name, $last_name_like, $email, $email_like, $member_of_group, $member_of_tenant, $potential_starter)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getUserCount($filter = array()) {\n if(!is_null($this->usermanager_auth) && $this->canDo('getUserCount') ){\n return $this->usermanager_auth->getUserCount($filter);\n } else {\n msg(\"authorisation method does not provide user counts\", -1);\n return 0;\n }\n }",
"public function technologicalProviderCountAsyncWithHttpInfo($technological_provider_search_criteria_input_dto_id = null, $technological_provider_search_criteria_input_dto_name = null, $technological_provider_search_criteria_input_dto_nit = null)\n {\n $returnType = 'int';\n $request = $this->technologicalProviderCountRequest($technological_provider_search_criteria_input_dto_id, $technological_provider_search_criteria_input_dto_name, $technological_provider_search_criteria_input_dto_nit);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userSearch_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto[]';\n $request = $this->userSearch_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getExecutionsCountAsyncWithHttpInfo($business_key = null, $process_definition_id = null, $process_definition_key = null, $process_instance_id = null, $activity_id = null, $signal_event_subscription_name = null, $message_event_subscription_name = null, $active = null, $suspended = null, $incident_id = null, $incident_type = null, $incident_message = null, $incident_message_like = null, $tenant_id_in = null, $variables = null, $process_variables = null, $variable_names_ignore_case = null, $variable_values_ignore_case = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n $request = $this->getExecutionsCountRequest($business_key, $process_definition_id, $process_definition_key, $process_instance_id, $activity_id, $signal_event_subscription_name, $message_event_subscription_name, $active, $suspended, $incident_id, $incident_type, $incident_message, $incident_message_like, $tenant_id_in, $variables, $process_variables, $variable_names_ignore_case, $variable_values_ignore_case);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function getCount(UserFilter $filter): int;",
"public function showAllCount()\n {\n $userCount = $this->users->countData();\n\n if (! $userCount) {\n throw new HttpResponseException(\n response()\n ->json([\n 'message' => trans('api.unable_to_count'),\n 'type' => ServerErrorType::SERVER_ERROR_FAILED_COUNT_USER\n ], 500)\n );\n }\n\n return fractal($userCount, new UserCountTransformer)->respond(201);\n }",
"public static function get_users_count($context, $search = '') {\n global $DB;\n\n list($sql, $params) = self::get_users_sql_and_params($context, $search, true);\n return $DB->count_records_sql($sql, $params);\n\n }",
"public function systemConfigurationCountAsyncWithHttpInfo()\n {\n $returnType = 'int';\n $request = $this->systemConfigurationCountRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userCount()\n {\n return $this->count();\n }",
"public function getUserCount() : int\n {\n return $this->userCount;\n }",
"public function userCount_0($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n list($response) = $this->userCount_0WithHttpInfo($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n return $response;\n }",
"public function searchUserAsyncWithHttpInfo()\n {\n $returnType = '';\n $request = $this->searchUserRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }"
] | [
"0.75195414",
"0.702082",
"0.65903974",
"0.6371861",
"0.6257406",
"0.6253475",
"0.6026606",
"0.59873664",
"0.58203197",
"0.5745054",
"0.5592202",
"0.5583531",
"0.5542827",
"0.5537483",
"0.544357",
"0.5435846",
"0.54076445",
"0.53868985",
"0.5370223",
"0.53646666",
"0.5353763",
"0.5346826",
"0.5241412",
"0.5211859",
"0.5202324",
"0.51941746",
"0.5167006",
"0.51382214",
"0.51268893",
"0.51005423"
] | 0.70654786 | 1 |
Operation userCount_0WithHttpInfo Counts the number of results given for a specific search criteria | public function userCount_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)
{
$returnType = 'int';
$request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'int',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userCountWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function userCount_0Request($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount_0, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getUserCountWithHttpInfo($id = null, $id_in = null, $first_name = null, $first_name_like = null, $last_name = null, $last_name_like = null, $email = null, $email_like = null, $member_of_group = null, $member_of_tenant = null, $potential_starter = null)\n {\n $request = $this->getUserCountRequest($id, $id_in, $first_name, $first_name_like, $last_name, $last_name_like, $email, $email_like, $member_of_group, $member_of_tenant, $potential_starter);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\CountResultDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\CountResultDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\CountResultDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userCount_0($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n list($response) = $this->userCount_0WithHttpInfo($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n return $response;\n }",
"public function CountUser_get()\r\n {\r\n $Select = $this->UserModel->Count_Users();\r\n $this->response($Select,REST_Controller::HTTP_OK);\r\n }",
"public function count()\n {\n if ($this->queryShouldBeStopped) {\n return 0;\n }\n\n $queryType = 'UserQuery::count';\n $filter = $this->normalizeFilter();\n $callback = function() use ($filter) {\n return (int) $this->bxObject->getList($order = 'ID', $by = 'ASC', $filter, [\n 'NAV_PARAMS' => [\n 'nTopCount' => 0,\n ],\n ])->NavRecordCount;\n };\n\n return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);\n }",
"public function getUserCount($filter = array()) {\n if(!is_null($this->usermanager_auth) && $this->canDo('getUserCount') ){\n return $this->usermanager_auth->getUserCount($filter);\n } else {\n msg(\"authorisation method does not provide user counts\", -1);\n return 0;\n }\n }",
"protected function userCountRequest($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n // verify the required parameter 'virtual_operator' is set\n if ($virtual_operator === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $virtual_operator when calling userCount'\n );\n }\n if (strlen($virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/{virtualOperator}/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n // path params\n if ($virtual_operator !== null) {\n $resourcePath = str_replace(\n '{' . 'virtualOperator' . '}',\n ObjectSerializer::toPathValue($virtual_operator),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function userCountAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function customersCountGetWithHttpInfo($where = null)\n {\n // parse inputs\n $resourcePath = \"/Customers/count\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2001',\n '/Customers/count'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2001', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2001', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function findUserCount();",
"public function countUsers() {\n\t\t$count = $this->sm->countUsers(time());\n\t\tif(isset($count[0])) {\n\t\t\treturn intval($count[0]['theCount']);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function showAllCount()\n {\n $userCount = $this->users->countData();\n\n if (! $userCount) {\n throw new HttpResponseException(\n response()\n ->json([\n 'message' => trans('api.unable_to_count'),\n 'type' => ServerErrorType::SERVER_ERROR_FAILED_COUNT_USER\n ], 500)\n );\n }\n\n return fractal($userCount, new UserCountTransformer)->respond(201);\n }",
"public function getCount(UserFilter $filter): int;",
"function getUserCount($filter=array()){\n $count = 0;\n $uc_filter = array();\n// if($this->users !== NULL){\n// $count = count($this->users);\n// }else{\n if(!empty($filter)){\n $uc_filter = $this->_construct_filter($filter);\n }\n $count = uc_user_count($uc_filter);\n// }\n return $count;\n }",
"public function userCount()\n {\n return $this->count();\n }",
"public function getUserCount() : int\n {\n return $this->userCount;\n }",
"function getUserCount($filter=array()) {\n\n if($this->users === null) $this->_loadUserData();\n\n if (!count($filter)) return count($this->users);\n\n $count = 0;\n $this->_constructPattern($filter);\n\n foreach ($this->users as $user => $info) {\n $count += $this->_filter($user, $info);\n }\n\n return $count;\n }",
"public function getUserCount()\n\t{\n\t\ttry {\n\t\t\t$db = Factory::getDatabase($this->getJname());\n\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->select('count(*)')\n\t\t\t\t->from('#__users');\n\n\t\t\t$db->setQuery($query);\n\t\t\t//getting the results\n\t\t\treturn $db->loadResult();\n\t\t} catch (Exception $e) {\n\t\t\tFramework::raise(LogLevel::ERROR, $e, $this->getJname());\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function countuserbyqueryAction()\n\t{\n\t\t\n\t\t$r = $this->getRequest();\n\t\t//$q = ($r->getParam('q'))? $r->getParam('q') : '';\n\t\t//$q = base64_decode($q);\n\t\t\n\t\t$pColumns = array( 'ku.kopel', 'ku.username', 'ku.company', 'gag.value', 'kus.status' );\n\t\t\n\t\t$sWhere = \"\";\n\t\tif ($r->getParam('q'))\n\t\t{\n\t\t\t$q = base64_decode($r->getParam('q'));\n\t\t\tfor ($i=0;$i<count($pColumns);$i++)\n\t\t\t{\n\t\t\t\t$sWhere .= $pColumns[$i].\" LIKE '%\".mysql_real_escape_string($q).\"%' OR \";\n\t\t\t}\n\t\t\t\n\t\t\t$sWhere = substr_replace($sWhere,\"\",-3);\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$sWhere = \"1=1\";\n\t\t}\n\t\t\n\t\t//$finalQuery = $mainQuery.$sWhere;\n\t\t//$db = Zend_Registry::get('db2');\n\t\t//$query = $db->query($finalQuery);\n\t\t//$db = Zend_Db_Table::getDefaultAdapter()->query($finalQuery);\n\t\t\n\t\t//$row = $query->fetchAll(Zend_Db::FETCH_ASSOC);\n\t\t//$row = $db->fetchAll(Zend_Db::FETCH_OBJ);\n\t\t//echo $row[0]['count'];\n\t\t\n\t\t$tblUser = new App_Model_Db_Table_User();\n\t\t$row = App_Model_Show_User::show()->countUser($sWhere);\n\t\techo $row; \n\t\tdie();\n\t}",
"public function getAuthorizationCountWithHttpInfo($id = null, $type = null, $user_id_in = null, $group_id_in = null, $resource_type = null, $resource_id = null)\n {\n $request = $this->getAuthorizationCountRequest($id, $type, $user_id_in, $group_id_in, $resource_type, $resource_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\CountResultDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\CountResultDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\CountResultDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userCount_0Async($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n return $this->userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function tagsCountGetWithHttpInfo($where = null)\n {\n // parse inputs\n $resourcePath = \"/Tags/count\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2001',\n '/Tags/count'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2001', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2001', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function userSearch_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto[]';\n $request = $this->userSearch_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserOutputDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"function user_count()\n {\n $this->company_db->from('tbl_user');\n return $this->company_db->count_all_results();\n }",
"public function countAction(){\r\n \r\n $countYouth = $this->getDoctrine()->getRepository('zahiraBundle:youth')->counterUser();\r\n return new JsonResponse($countYouth);\r\n }",
"public function actionUsers() {\n $this->filterAjax();\n\n $system = new System();\n $this->renderJson($system->userCount());\n }",
"function wp_count_users( $args = '' ) {\n\twp_parse_args(\n\t\t$args, array(\n\t\t\t'role' => ''\n\t\t)\n\t);\n\t\n\t$users = new WP_Query_Users( $args );\n\treturn $users->get_total();\n\t\n}",
"public function getIncidentsCountWithHttpInfo($incident_id = null, $incident_type = null, $incident_message = null, $incident_message_like = null, $process_definition_id = null, $process_definition_key_in = null, $process_instance_id = null, $execution_id = null, $incident_timestamp_before = null, $incident_timestamp_after = null, $activity_id = null, $failed_activity_id = null, $cause_incident_id = null, $root_cause_incident_id = null, $configuration = null, $tenant_id_in = null, $job_definition_id_in = null)\n {\n $request = $this->getIncidentsCountRequest($incident_id, $incident_type, $incident_message, $incident_message_like, $process_definition_id, $process_definition_key_in, $process_instance_id, $execution_id, $incident_timestamp_before, $incident_timestamp_after, $activity_id, $failed_activity_id, $cause_incident_id, $root_cause_incident_id, $configuration, $tenant_id_in, $job_definition_id_in);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\CountResultDto[]' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\CountResultDto[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto[]';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\CountResultDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }"
] | [
"0.70590925",
"0.67905706",
"0.67118",
"0.66010135",
"0.6379972",
"0.627752",
"0.61714774",
"0.6101615",
"0.602863",
"0.60120845",
"0.5999546",
"0.59988385",
"0.5904239",
"0.5786012",
"0.57630926",
"0.57589895",
"0.57587683",
"0.5748212",
"0.57266587",
"0.5695119",
"0.56874144",
"0.56288695",
"0.56179917",
"0.5589252",
"0.55854404",
"0.5566385",
"0.5508611",
"0.55078906",
"0.55039746",
"0.54895407"
] | 0.8057387 | 0 |
Operation userCount_0Async Counts the number of results given for a specific search criteria | public function userCount_0Async($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)
{
return $this->userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field)
->then(
function ($response) {
return $response[0];
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function count()\n {\n if ($this->queryShouldBeStopped) {\n return 0;\n }\n\n $queryType = 'UserQuery::count';\n $filter = $this->normalizeFilter();\n $callback = function() use ($filter) {\n return (int) $this->bxObject->getList($order = 'ID', $by = 'ASC', $filter, [\n 'NAV_PARAMS' => [\n 'nTopCount' => 0,\n ],\n ])->NavRecordCount;\n };\n\n return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);\n }",
"public function findUserCount();",
"public function userCountAsync($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n return $this->userCountAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"protected function userCount_0Request($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount_0, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function userCount()\n {\n return $this->count();\n }",
"public function getCount(UserFilter $filter): int;",
"public function userCountAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function count()\n {\n if ($this->queryShouldBeStopped) {\n return 0;\n }\n\n $queryType = 'SectionQuery::count';\n $filter = $this->normalizeFilter();\n $callback = function() use ($filter) {\n return (int) $this->bxObject->getCount($filter);\n };\n\n return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);\n }",
"public function getUserCount($filter = array()) {\n if(!is_null($this->usermanager_auth) && $this->canDo('getUserCount') ){\n return $this->usermanager_auth->getUserCount($filter);\n } else {\n msg(\"authorisation method does not provide user counts\", -1);\n return 0;\n }\n }",
"public function userCount_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"protected function userCountRequest($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n // verify the required parameter 'virtual_operator' is set\n if ($virtual_operator === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $virtual_operator when calling userCount'\n );\n }\n if (strlen($virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/{virtualOperator}/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n // path params\n if ($virtual_operator !== null) {\n $resourcePath = str_replace(\n '{' . 'virtualOperator' . '}',\n ObjectSerializer::toPathValue($virtual_operator),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function CountUser_get()\r\n {\r\n $Select = $this->UserModel->Count_Users();\r\n $this->response($Select,REST_Controller::HTTP_OK);\r\n }",
"public function countUsers() {\n\t\t$count = $this->sm->countUsers(time());\n\t\tif(isset($count[0])) {\n\t\t\treturn intval($count[0]['theCount']);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function getUserCount() : int\n {\n return $this->userCount;\n }",
"function user_count()\n {\n $this->company_db->from('tbl_user');\n return $this->company_db->count_all_results();\n }",
"public function countuserbyqueryAction()\n\t{\n\t\t\n\t\t$r = $this->getRequest();\n\t\t//$q = ($r->getParam('q'))? $r->getParam('q') : '';\n\t\t//$q = base64_decode($q);\n\t\t\n\t\t$pColumns = array( 'ku.kopel', 'ku.username', 'ku.company', 'gag.value', 'kus.status' );\n\t\t\n\t\t$sWhere = \"\";\n\t\tif ($r->getParam('q'))\n\t\t{\n\t\t\t$q = base64_decode($r->getParam('q'));\n\t\t\tfor ($i=0;$i<count($pColumns);$i++)\n\t\t\t{\n\t\t\t\t$sWhere .= $pColumns[$i].\" LIKE '%\".mysql_real_escape_string($q).\"%' OR \";\n\t\t\t}\n\t\t\t\n\t\t\t$sWhere = substr_replace($sWhere,\"\",-3);\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$sWhere = \"1=1\";\n\t\t}\n\t\t\n\t\t//$finalQuery = $mainQuery.$sWhere;\n\t\t//$db = Zend_Registry::get('db2');\n\t\t//$query = $db->query($finalQuery);\n\t\t//$db = Zend_Db_Table::getDefaultAdapter()->query($finalQuery);\n\t\t\n\t\t//$row = $query->fetchAll(Zend_Db::FETCH_ASSOC);\n\t\t//$row = $db->fetchAll(Zend_Db::FETCH_OBJ);\n\t\t//echo $row[0]['count'];\n\t\t\n\t\t$tblUser = new App_Model_Db_Table_User();\n\t\t$row = App_Model_Show_User::show()->countUser($sWhere);\n\t\techo $row; \n\t\tdie();\n\t}",
"function wp_count_users( $args = '' ) {\n\twp_parse_args(\n\t\t$args, array(\n\t\t\t'role' => ''\n\t\t)\n\t);\n\t\n\t$users = new WP_Query_Users( $args );\n\treturn $users->get_total();\n\t\n}",
"function get_number_of_users() {\n\t$counter = 0;\n\tif (!empty($_SESSION[\"id_session\"])){\n\t\t$a_course_users = CourseManager :: get_user_list_from_course_code($_SESSION['_course']['id'], $_SESSION['id_session']);\n\n\t} else {\n\t\t$a_course_users = CourseManager :: get_user_list_from_course_code($_SESSION['_course']['id'], 0);\n\t}\n\tforeach ($a_course_users as $user_id => $o_course_user) {\n\t\tif ((isset($_GET['keyword']) && search_keyword($o_course_user['firstname'], $o_course_user['lastname'], $o_course_user['username'], $o_course_user['official_code'], $_GET['keyword'])) || !isset($_GET['keyword']) || empty($_GET['keyword'])) {\n\t\t\t$counter++;\n\t\t}\n\t}\n\treturn $counter;\n}",
"function getUserCount($filter=array()) {\n\n if($this->users === null) $this->_loadUserData();\n\n if (!count($filter)) return count($this->users);\n\n $count = 0;\n $this->_constructPattern($filter);\n\n foreach ($this->users as $user => $info) {\n $count += $this->_filter($user, $info);\n }\n\n return $count;\n }",
"public function showAllCount()\n {\n $userCount = $this->users->countData();\n\n if (! $userCount) {\n throw new HttpResponseException(\n response()\n ->json([\n 'message' => trans('api.unable_to_count'),\n 'type' => ServerErrorType::SERVER_ERROR_FAILED_COUNT_USER\n ], 500)\n );\n }\n\n return fractal($userCount, new UserCountTransformer)->respond(201);\n }",
"function getUserCount()\r\n {\r\n $db = JFusionFactory::getDatabase($this->getJname());\r\n $query = 'SELECT count(*) from #__user';\r\n $db->setQuery($query );\r\n\r\n //getting the results\r\n return $db->loadResult();\r\n }",
"public function countQuery();",
"function getUserCount($filter=array()){\n $count = 0;\n $uc_filter = array();\n// if($this->users !== NULL){\n// $count = count($this->users);\n// }else{\n if(!empty($filter)){\n $uc_filter = $this->_construct_filter($filter);\n }\n $count = uc_user_count($uc_filter);\n// }\n return $count;\n }",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count(): int\n {\n $this->command = 'count';\n return call_user_func_array([$this->collection, $this->command], $this->params);\n }",
"function user_count() {\n\treturn count(user_array());\n}"
] | [
"0.68747175",
"0.6865423",
"0.6837009",
"0.6600521",
"0.6537211",
"0.6216704",
"0.6126404",
"0.6045457",
"0.5995304",
"0.5952695",
"0.5925671",
"0.58904743",
"0.5880463",
"0.5862014",
"0.5849184",
"0.5842943",
"0.58124065",
"0.57748216",
"0.5762516",
"0.5760334",
"0.5728677",
"0.5721038",
"0.5716575",
"0.5701906",
"0.5701436",
"0.5701436",
"0.5701436",
"0.5701436",
"0.5701434",
"0.56942606"
] | 0.7462936 | 0 |
Operation userCount_0AsyncWithHttpInfo Counts the number of results given for a specific search criteria | public function userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)
{
$returnType = 'int';
$request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userCount_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userCount_0Async($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n return $this->userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userCountAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userCountAsync($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n return $this->userCountAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getUserCountAsyncWithHttpInfo($id = null, $id_in = null, $first_name = null, $first_name_like = null, $last_name = null, $last_name_like = null, $email = null, $email_like = null, $member_of_group = null, $member_of_tenant = null, $potential_starter = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n $request = $this->getUserCountRequest($id, $id_in, $first_name, $first_name_like, $last_name, $last_name_like, $email, $email_like, $member_of_group, $member_of_tenant, $potential_starter);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"protected function userCount_0Request($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount_0, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function userCountWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getUserCountWithHttpInfo($id = null, $id_in = null, $first_name = null, $first_name_like = null, $last_name = null, $last_name_like = null, $email = null, $email_like = null, $member_of_group = null, $member_of_tenant = null, $potential_starter = null)\n {\n $request = $this->getUserCountRequest($id, $id_in, $first_name, $first_name_like, $last_name, $last_name_like, $email, $email_like, $member_of_group, $member_of_tenant, $potential_starter);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\CountResultDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\CountResultDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\CountResultDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getIncidentsCountAsyncWithHttpInfo($incident_id = null, $incident_type = null, $incident_message = null, $incident_message_like = null, $process_definition_id = null, $process_definition_key_in = null, $process_instance_id = null, $execution_id = null, $incident_timestamp_before = null, $incident_timestamp_after = null, $activity_id = null, $failed_activity_id = null, $cause_incident_id = null, $root_cause_incident_id = null, $configuration = null, $tenant_id_in = null, $job_definition_id_in = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto[]';\n $request = $this->getIncidentsCountRequest($incident_id, $incident_type, $incident_message, $incident_message_like, $process_definition_id, $process_definition_key_in, $process_instance_id, $execution_id, $incident_timestamp_before, $incident_timestamp_after, $activity_id, $failed_activity_id, $cause_incident_id, $root_cause_incident_id, $configuration, $tenant_id_in, $job_definition_id_in);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function getUserCountAsync($id = null, $id_in = null, $first_name = null, $first_name_like = null, $last_name = null, $last_name_like = null, $email = null, $email_like = null, $member_of_group = null, $member_of_tenant = null, $potential_starter = null)\n {\n return $this->getUserCountAsyncWithHttpInfo($id, $id_in, $first_name, $first_name_like, $last_name, $last_name_like, $email, $email_like, $member_of_group, $member_of_tenant, $potential_starter)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function virtualOperatorCountAsyncWithHttpInfo($search_criteria_id = null, $search_criteria_email = null, $search_criteria_alias = null, $search_criteria_name = null, $search_criteria_include_settings = null, $search_criteria_include_medias = null, $search_criteria_offset = null, $search_criteria_number_of_records = null, $search_criteria_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->virtualOperatorCountRequest($search_criteria_id, $search_criteria_email, $search_criteria_alias, $search_criteria_name, $search_criteria_include_settings, $search_criteria_include_medias, $search_criteria_offset, $search_criteria_number_of_records, $search_criteria_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function count()\n {\n if ($this->queryShouldBeStopped) {\n return 0;\n }\n\n $queryType = 'UserQuery::count';\n $filter = $this->normalizeFilter();\n $callback = function() use ($filter) {\n return (int) $this->bxObject->getList($order = 'ID', $by = 'ASC', $filter, [\n 'NAV_PARAMS' => [\n 'nTopCount' => 0,\n ],\n ])->NavRecordCount;\n };\n\n return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);\n }",
"public function getAuthorizationCountAsyncWithHttpInfo($id = null, $type = null, $user_id_in = null, $group_id_in = null, $resource_type = null, $resource_id = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n $request = $this->getAuthorizationCountRequest($id, $type, $user_id_in, $group_id_in, $resource_type, $resource_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"protected function userCountRequest($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n // verify the required parameter 'virtual_operator' is set\n if ($virtual_operator === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $virtual_operator when calling userCount'\n );\n }\n if (strlen($virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/{virtualOperator}/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n // path params\n if ($virtual_operator !== null) {\n $resourcePath = str_replace(\n '{' . 'virtualOperator' . '}',\n ObjectSerializer::toPathValue($virtual_operator),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getExecutionsCountAsyncWithHttpInfo($business_key = null, $process_definition_id = null, $process_definition_key = null, $process_instance_id = null, $activity_id = null, $signal_event_subscription_name = null, $message_event_subscription_name = null, $active = null, $suspended = null, $incident_id = null, $incident_type = null, $incident_message = null, $incident_message_like = null, $tenant_id_in = null, $variables = null, $process_variables = null, $variable_names_ignore_case = null, $variable_values_ignore_case = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n $request = $this->getExecutionsCountRequest($business_key, $process_definition_id, $process_definition_key, $process_instance_id, $activity_id, $signal_event_subscription_name, $message_event_subscription_name, $active, $suspended, $incident_id, $incident_type, $incident_message, $incident_message_like, $tenant_id_in, $variables, $process_variables, $variable_names_ignore_case, $variable_values_ignore_case);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function userCount_0($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n list($response) = $this->userCount_0WithHttpInfo($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n return $response;\n }",
"public function systemConfigurationCountAsyncWithHttpInfo()\n {\n $returnType = 'int';\n $request = $this->systemConfigurationCountRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function CountUser_get()\r\n {\r\n $Select = $this->UserModel->Count_Users();\r\n $this->response($Select,REST_Controller::HTTP_OK);\r\n }",
"public function userSearch_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto[]';\n $request = $this->userSearch_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function showAllCount()\n {\n $userCount = $this->users->countData();\n\n if (! $userCount) {\n throw new HttpResponseException(\n response()\n ->json([\n 'message' => trans('api.unable_to_count'),\n 'type' => ServerErrorType::SERVER_ERROR_FAILED_COUNT_USER\n ], 500)\n );\n }\n\n return fractal($userCount, new UserCountTransformer)->respond(201);\n }",
"public function tagsCountGetWithHttpInfo($where = null)\n {\n // parse inputs\n $resourcePath = \"/Tags/count\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2001',\n '/Tags/count'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2001', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2001', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getUserCount($filter = array()) {\n if(!is_null($this->usermanager_auth) && $this->canDo('getUserCount') ){\n return $this->usermanager_auth->getUserCount($filter);\n } else {\n msg(\"authorisation method does not provide user counts\", -1);\n return 0;\n }\n }",
"public function customersCountGetWithHttpInfo($where = null)\n {\n // parse inputs\n $resourcePath = \"/Customers/count\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2001',\n '/Customers/count'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2001', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2001', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function findUserCount();",
"public function technologicalProviderCountAsyncWithHttpInfo($technological_provider_search_criteria_input_dto_id = null, $technological_provider_search_criteria_input_dto_name = null, $technological_provider_search_criteria_input_dto_nit = null)\n {\n $returnType = 'int';\n $request = $this->technologicalProviderCountRequest($technological_provider_search_criteria_input_dto_id, $technological_provider_search_criteria_input_dto_name, $technological_provider_search_criteria_input_dto_nit);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userCount()\n {\n return $this->count();\n }",
"public function imageCollectionCountWithHttpInfo($where = null)\n {\n // parse inputs\n $resourcePath = \"/imageCollections/count\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\DBCDK\\CommunityServices\\Model\\InlineResponse200',\n '/imageCollections/count'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\DBCDK\\CommunityServices\\Model\\InlineResponse200', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\DBCDK\\CommunityServices\\Model\\InlineResponse200', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getUserCount() : int\n {\n return $this->userCount;\n }",
"public function count() {\n\t\t$response = $this->rest_client->get( $this->endpoint . '/count' );\n\n\t\treturn $response['body'];\n\t}",
"public function queryExecutionsCountAsyncWithHttpInfo($execution_query_dto = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\CountResultDto';\n $request = $this->queryExecutionsCountRequest($execution_query_dto);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }"
] | [
"0.7157738",
"0.71528244",
"0.6949672",
"0.64525986",
"0.6410362",
"0.62827057",
"0.6270846",
"0.5997187",
"0.5815444",
"0.57801104",
"0.57604694",
"0.5751877",
"0.57017565",
"0.5593612",
"0.55639374",
"0.55602145",
"0.55287236",
"0.55240035",
"0.5470004",
"0.54555714",
"0.5431523",
"0.53981525",
"0.53318036",
"0.52592653",
"0.52158004",
"0.5157577",
"0.51541036",
"0.5137257",
"0.5134119",
"0.51255023"
] | 0.7856575 | 0 |
Create request for operation 'userCount_0' | protected function userCount_0Request($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)
{
if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {
throw new \InvalidArgumentException('invalid length for "$user_search_criteria_input_dto_user_name" when calling UserApi.userCount_0, must be smaller than or equal to 100.');
}
if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {
throw new \InvalidArgumentException('invalid length for "$user_search_criteria_input_dto_email" when calling UserApi.userCount_0, must be smaller than or equal to 100.');
}
if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {
throw new \InvalidArgumentException('invalid length for "$user_search_criteria_input_dto_virtual_operator" when calling UserApi.userCount_0, must be smaller than or equal to 60.');
}
$resourcePath = '/api/users/count';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($user_search_criteria_input_dto_id !== null) {
$queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);
}
// query params
if ($user_search_criteria_input_dto_user_name !== null) {
$queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);
}
// query params
if ($user_search_criteria_input_dto_email !== null) {
$queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);
}
// query params
if ($user_search_criteria_input_dto_virtual_operator !== null) {
$queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);
}
// query params
if ($user_search_criteria_input_dto_company_id !== null) {
$queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);
}
// query params
if ($user_search_criteria_input_dto_offset !== null) {
$queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);
}
// query params
if ($user_search_criteria_input_dto_number_of_records !== null) {
$queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);
}
// query params
if ($user_search_criteria_input_dto_sort_field !== null) {
$queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json', 'text/json', 'application/xml', 'text/xml']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json', 'text/json', 'application/xml', 'text/xml'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
$httpBody = $_tempBody;
// \stdClass has no __toString(), so we should encode it manually
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($httpBody);
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValue
];
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$query = \GuzzleHttp\Psr7\build_query($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function userCountRequest($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n // verify the required parameter 'virtual_operator' is set\n if ($virtual_operator === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $virtual_operator when calling userCount'\n );\n }\n if (strlen($virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/{virtualOperator}/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n // path params\n if ($virtual_operator !== null) {\n $resourcePath = str_replace(\n '{' . 'virtualOperator' . '}',\n ObjectSerializer::toPathValue($virtual_operator),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function CountUser_get()\r\n {\r\n $Select = $this->UserModel->Count_Users();\r\n $this->response($Select,REST_Controller::HTTP_OK);\r\n }",
"public function findUserCount();",
"public function counts_get()\n\n {\n\n // $token = $_SERVER['HTTP_TOKEN'];\n\n $user_id = $this->input->get('user_id');\n\n $data = array(\n\n 'status' => 0,\n\n 'code' => -1,\n\n 'msg' => 'Bad Request',\n\n 'data' => null\n\n );\n\n $getCounts = $this->Api_model->getCounts($user_id);\n\n if (isset($getCounts)) {\n\n $data = array(\n\n 'status' => 1,\n\n 'code' => 1,\n\n 'msg' => 'success',\n\n 'data' => $getCounts\n\n );\n\n }else{\n\n $data = array(\n\n 'status' => 1,\n\n 'code' => 1,\n\n 'msg' => 'success',\n\n 'data' => null\n\n );\n\n }\n\n $this->response($data, REST_Controller::HTTP_OK);\n\n }",
"public function countAction(){\r\n \r\n $countYouth = $this->getDoctrine()->getRepository('zahiraBundle:youth')->counterUser();\r\n return new JsonResponse($countYouth);\r\n }",
"public function getNewuserCount()//for all pending quires\n\t\t{\n\t\t\t\n\t\t\t\t$this->load->model('admin/Users_model', 'users');\n\t\t\t\t$data['queryCount'] = $this->users->getNuCount();\n\t\t\t\techo $data['queryCount'];\n\t\t\t\n\t\t}",
"public function countuserbyqueryAction()\n\t{\n\t\t\n\t\t$r = $this->getRequest();\n\t\t//$q = ($r->getParam('q'))? $r->getParam('q') : '';\n\t\t//$q = base64_decode($q);\n\t\t\n\t\t$pColumns = array( 'ku.kopel', 'ku.username', 'ku.company', 'gag.value', 'kus.status' );\n\t\t\n\t\t$sWhere = \"\";\n\t\tif ($r->getParam('q'))\n\t\t{\n\t\t\t$q = base64_decode($r->getParam('q'));\n\t\t\tfor ($i=0;$i<count($pColumns);$i++)\n\t\t\t{\n\t\t\t\t$sWhere .= $pColumns[$i].\" LIKE '%\".mysql_real_escape_string($q).\"%' OR \";\n\t\t\t}\n\t\t\t\n\t\t\t$sWhere = substr_replace($sWhere,\"\",-3);\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$sWhere = \"1=1\";\n\t\t}\n\t\t\n\t\t//$finalQuery = $mainQuery.$sWhere;\n\t\t//$db = Zend_Registry::get('db2');\n\t\t//$query = $db->query($finalQuery);\n\t\t//$db = Zend_Db_Table::getDefaultAdapter()->query($finalQuery);\n\t\t\n\t\t//$row = $query->fetchAll(Zend_Db::FETCH_ASSOC);\n\t\t//$row = $db->fetchAll(Zend_Db::FETCH_OBJ);\n\t\t//echo $row[0]['count'];\n\t\t\n\t\t$tblUser = new App_Model_Db_Table_User();\n\t\t$row = App_Model_Show_User::show()->countUser($sWhere);\n\t\techo $row; \n\t\tdie();\n\t}",
"public function count_requet(Request $request)\n {\n $validator = Validator::make($request->all(),[\n \n 'token'=>'required',\n ]);\n if ($validator->fails()) \n { \n return $this->apiResponse(null,'404',$validator->messages()->first()); \n }\n $user=$this->__construct();\n \n if($user)\n {\n $token=$user->token;\n $data['count']= Addrequest::where([['reciever', $user->id],['status',1]])->count('status');\n return $this->apiResponse($data);\n }\n return $this->apiResponse(null,404); \n\n }",
"public function count(Request $request)\n {\n\n }",
"public function getUserCount($filter = array()) {\n if(!is_null($this->usermanager_auth) && $this->canDo('getUserCount') ){\n return $this->usermanager_auth->getUserCount($filter);\n } else {\n msg(\"authorisation method does not provide user counts\", -1);\n return 0;\n }\n }",
"public function getCount(UserFilter $filter): int;",
"public function userCount_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getItemsCount(Request $request);",
"public function getUserCountRequest($id = null, $id_in = null, $first_name = null, $first_name_like = null, $last_name = null, $last_name_like = null, $email = null, $email_like = null, $member_of_group = null, $member_of_tenant = null, $potential_starter = null)\n {\n\n $resourcePath = '/user/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($id !== null) {\n if('form' === 'form' && is_array($id)) {\n foreach($id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['id'] = $id;\n }\n }\n // query params\n if ($id_in !== null) {\n if('form' === 'form' && is_array($id_in)) {\n foreach($id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['idIn'] = $id_in;\n }\n }\n // query params\n if ($first_name !== null) {\n if('form' === 'form' && is_array($first_name)) {\n foreach($first_name as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['firstName'] = $first_name;\n }\n }\n // query params\n if ($first_name_like !== null) {\n if('form' === 'form' && is_array($first_name_like)) {\n foreach($first_name_like as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['firstNameLike'] = $first_name_like;\n }\n }\n // query params\n if ($last_name !== null) {\n if('form' === 'form' && is_array($last_name)) {\n foreach($last_name as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['lastName'] = $last_name;\n }\n }\n // query params\n if ($last_name_like !== null) {\n if('form' === 'form' && is_array($last_name_like)) {\n foreach($last_name_like as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['lastNameLike'] = $last_name_like;\n }\n }\n // query params\n if ($email !== null) {\n if('form' === 'form' && is_array($email)) {\n foreach($email as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['email'] = $email;\n }\n }\n // query params\n if ($email_like !== null) {\n if('form' === 'form' && is_array($email_like)) {\n foreach($email_like as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['emailLike'] = $email_like;\n }\n }\n // query params\n if ($member_of_group !== null) {\n if('form' === 'form' && is_array($member_of_group)) {\n foreach($member_of_group as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['memberOfGroup'] = $member_of_group;\n }\n }\n // query params\n if ($member_of_tenant !== null) {\n if('form' === 'form' && is_array($member_of_tenant)) {\n foreach($member_of_tenant as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['memberOfTenant'] = $member_of_tenant;\n }\n }\n // query params\n if ($potential_starter !== null) {\n if('form' === 'form' && is_array($potential_starter)) {\n foreach($potential_starter as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['potentialStarter'] = $potential_starter;\n }\n }\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"function getUserCount($filter=array()){\n $count = 0;\n $uc_filter = array();\n// if($this->users !== NULL){\n// $count = count($this->users);\n// }else{\n if(!empty($filter)){\n $uc_filter = $this->_construct_filter($filter);\n }\n $count = uc_user_count($uc_filter);\n// }\n return $count;\n }",
"public function getAuthorizationCountRequest($id = null, $type = null, $user_id_in = null, $group_id_in = null, $resource_type = null, $resource_id = null)\n {\n\n $resourcePath = '/authorization/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($id !== null) {\n if('form' === 'form' && is_array($id)) {\n foreach($id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['id'] = $id;\n }\n }\n // query params\n if ($type !== null) {\n if('form' === 'form' && is_array($type)) {\n foreach($type as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['type'] = $type;\n }\n }\n // query params\n if ($user_id_in !== null) {\n if('form' === 'form' && is_array($user_id_in)) {\n foreach($user_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['userIdIn'] = $user_id_in;\n }\n }\n // query params\n if ($group_id_in !== null) {\n if('form' === 'form' && is_array($group_id_in)) {\n foreach($group_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['groupIdIn'] = $group_id_in;\n }\n }\n // query params\n if ($resource_type !== null) {\n if('form' === 'form' && is_array($resource_type)) {\n foreach($resource_type as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['resourceType'] = $resource_type;\n }\n }\n // query params\n if ($resource_id !== null) {\n if('form' === 'form' && is_array($resource_id)) {\n foreach($resource_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['resourceId'] = $resource_id;\n }\n }\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public static function count_user_entries ($req = []){\n\t\tif(empty($req)){\n\n\t\t\t// load list from DB\n\t\t\t$list = self::pdo('count_user');\n\t\t\tif($list === false) return self::response(560);\n\n\t\t\t// return list\n\t\t\treturn self::response(200, $list);\n\t\t\t}\n\n\t\t// other request param invalID\n\t\treturn self::response(400, ['need menuID or no parameter']);\n\n\t\t}",
"function TemplateCount(Request $request)\n {\n\n error_log('in controller');\n\n $searchKeyword = $request->input('searchKeyword');\n $userId = $request->input('userId');\n\n //Fetching user if looged in user is belonging to admin\n $userData = UserModel::GetSingleUserViaId($userId);\n if (count($userData) == 0) {\n return response()->json(['data' => null, 'message' => 'User not found'], 400);\n } else {\n //Means user data fetched\n $val = TemplateModel::TemplateCountWithSearch(\"proposal_template\", $searchKeyword);\n\n return response()->json(['data' => $val, 'message' => 'Templates count'], 200);\n\n }\n }",
"public function count()\n {\n if ($this->queryShouldBeStopped) {\n return 0;\n }\n\n $queryType = 'UserQuery::count';\n $filter = $this->normalizeFilter();\n $callback = function() use ($filter) {\n return (int) $this->bxObject->getList($order = 'ID', $by = 'ASC', $filter, [\n 'NAV_PARAMS' => [\n 'nTopCount' => 0,\n ],\n ])->NavRecordCount;\n };\n\n return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);\n }",
"public function countIterations($request);",
"function user_count()\n {\n $this->company_db->from('tbl_user');\n return $this->company_db->count_all_results();\n }",
"protected function systemConfigurationCountRequest()\n {\n\n $resourcePath = '/api/systemconfigurations/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function userCount()\n {\n return $this->count();\n }",
"abstract public function getCount(GridViewRequest $request) : int;",
"public function actionUsers() {\n $this->filterAjax();\n\n $system = new System();\n $this->renderJson($system->userCount());\n }",
"public function countQuery();",
"function bbp_get_user_post_count($user_id = 0, $integer = \\false)\n{\n}",
"abstract public function get_Count();",
"public function getGplusCountAction(Request $request)\n {\n\t\t$url = $request->get('url');\n \n if (strlen($url) == 0) {\n $data = array(\n 'success' => false\n );\n } else {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, \"https://clients6.google.com/rpc\");\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, '[{\"method\":\"pos.plusones.get\",\"id\":\"p\",\"params\":{\"nolog\":true,\"id\":\"' . $url . '\",\"source\":\"widget\",\"userId\":\"@viewer\",\"groupId\":\"@self\"},\"jsonrpc\":\"2.0\",\"key\":\"p\",\"apiVersion\":\"v1\"}]');\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/json'));\n $curl_results = curl_exec ($curl);\n curl_close ($curl);\n\n $json = json_decode($curl_results, true);\n\n $data = array(\n 'success' => true,\n 'count' => (intval($json[0]['result']['metadata']['globalCounts']['count']))\n );\n }\n\n return new JsonResponse($data);\n }",
"public function getKudosCount()\n\t{\n\t\t$arrayResponse = array();\n\t\ttry \n\t\t{ \t\n\t\t\tif($this->tokenData)\n\t\t\t{ \n\t\t\t\t$usrId = isset($this->requestData->usrId)?$this->requestData->usrId:\"\";\n\t\t\t\t\n\t\t\t\tif(empty($usrId))\n\t\t\t\t{\n\t\t\t\t\t$arrayResponse = array('success' => false, 'message' => 'User id is required');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//--Call model function for get report list\n\t\t\t\t\t$response = $this->UserModel->getKudosCount($usrId);\n\n\t\t\t\t\tif ($response)\n\t\t\t\t\t{\n\t\t\t\t\t\t$arrayResponse = array('success' => true, 'data' => $response,'message' => 'Get successfully');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$arrayResponse = array('success' => false, 'message' => 'Oops! There is no data to display.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$arrayResponse = array(\"success\" => false, \"message\" => \"Your session has timed out, please login again.\");\n\t\t\t}\n\n\t\t\tif(empty($arrayResponse))\n\t\t\t{\n\t\t\t\tthrow new Exception('Server Error, please try again.');\n\t\t\t}\n\t\t} \n\t\tcatch (Exception $e) \n\t\t{\n\t\t\t$arrayResponse = array('success' => false, 'message' => $e->getMessage());\n\t\t}\n\n\t\t//--Convert Response to json\n\t\t$this->getJsonData($arrayResponse);\n\t}"
] | [
"0.67719257",
"0.66520303",
"0.6514884",
"0.64260554",
"0.6364428",
"0.63602054",
"0.62718135",
"0.611225",
"0.60976315",
"0.6096573",
"0.6075668",
"0.6030055",
"0.59769607",
"0.5967064",
"0.59637415",
"0.5893604",
"0.58741945",
"0.5873169",
"0.5847859",
"0.58148474",
"0.5776742",
"0.5761831",
"0.5737692",
"0.5707824",
"0.5687372",
"0.56707245",
"0.56661695",
"0.56561804",
"0.56529224",
"0.5630445"
] | 0.74889874 | 0 |
Operation userCreate Creates a user. | public function userCreate($user)
{
list($response) = $this->userCreateWithHttpInfo($user);
return $response;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createUser($user = null)\n {\n list($response) = $this->createUserWithHttpInfo($user);\n return $response;\n }",
"public function usersCreate($data = null)\n {\n list($response) = $this->usersCreateWithHttpInfo($data);\n return $response;\n }",
"public function create(UserCreateRequest $request)\n {\n $user = $this->repository->create($request->validated());\n return $this->respondWithItem($user, 201);\n }",
"public function store(CreateUserRequest $request)\n {\n $user = (new CreateUserService())->execute($request);\n return $this->resourceResponse('User created', new UserResource($user), 201);\n }",
"public function create(User $user)\n {\n }",
"public function create(User $user)\n {\n\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }"
] | [
"0.7623985",
"0.7437955",
"0.7340857",
"0.70248216",
"0.6994722",
"0.69931203",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621",
"0.6932621"
] | 0.8188975 | 0 |
Operation userCreateAsync Creates a user. | public function userCreateAsync($user)
{
return $this->userCreateAsyncWithHttpInfo($user)
->then(
function ($response) {
return $response[0];
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createUserAsync($user = null)\n {\n return $this->createUserAsyncWithHttpInfo($user)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function createUserAsync($body = null, $fields = null)\n {\n return $this->createUserAsyncWithHttpInfo($body, $fields)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userCreate($user)\n {\n list($response) = $this->userCreateWithHttpInfo($user);\n return $response;\n }",
"public function create(UserCreateRequest $request)\n {\n $user = $this->repository->create($request->validated());\n return $this->respondWithItem($user, 201);\n }",
"public function createDomainUserAsync($body)\n {\n return $this->createDomainUserAsyncWithHttpInfo($body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function createUser($user = null)\n {\n list($response) = $this->createUserWithHttpInfo($user);\n return $response;\n }",
"public function userCreateAsyncWithHttpInfo($user)\n {\n $returnType = 'string';\n $request = $this->userCreateRequest($user);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function store(CreateUserRequest $request)\n {\n $user = (new CreateUserService())->execute($request);\n return $this->resourceResponse('User created', new UserResource($user), 201);\n }",
"public function createEmbedUserAsync($body)\n {\n return $this->createEmbedUserAsyncWithHttpInfo($body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function store(CreateUserRequest $request)\n {\n $user = $this->userService->create($request->input());\n\n return response()->json($user);\n }",
"public function create()\n {\n if (array_key_exists('User', $_POST)) {\n $request = new Request();\n $response = new JsonResponse($this->makeRequest($request->setBody(Formatter::cleanData($_POST['User'])), 'user/create'));\n if ($response->isSuccess()) {\n $data = $response->getData();\n $userId = Arr::getNestedElement($data, 'user.id');\n if (is_null($userId)) {\n $response->addError('No user id provided');\n } else {\n $this->storage->set(self::SESSION_USER_ID, $userId);\n }\n }\n return $this->dump($request, $response, 'Create user - response');\n }\n \n return ($this->show(new Webpage('user/create', [\n 'form' => [\n 'action' => \"/{$this->getFramework()->getRouter()->getUrl()}\",\n 'data' => self::DEFAULT_USER_DATA\n ]\n ]), 'Create user'));\n }",
"public function createUser()\n {\n $validatedData = Validator::make($this->data, [\n 'name' => 'required',\n 'position' => 'required',\n 'nation' => 'required',\n 'region' => 'required',\n 'district' => 'required',\n 'ward' => 'required',\n 'street' => 'required',\n 'address' => 'required',\n 'email' => 'required|email|unique:users',\n 'mobile' => 'required|regex:/^(0)[0-9]{9}$/|not_regex:/[a-z]/',\n 'password' => 'required|confirmed',\n ])->validate();\n\n $validatedData['password'] = bcrypt($validatedData['password']);\n\n User::create($validatedData);\n\n $this->dispatchBrowserEvent('hide-form', ['message' => 'User added successfuly!']);\n }",
"public function usersCreate($data = null)\n {\n list($response) = $this->usersCreateWithHttpInfo($data);\n return $response;\n }",
"public function createUserAsyncWithHttpInfo($user = null)\n {\n $returnType = '\\CrowdClient\\Model\\CwdUser';\n $request = $this->createUserRequest($user);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function store(UserCreateRequest $request)\n {\n $user = $this->userService->create($request->all());\n\n return $this->response->item($user, new UserTransformer());\n }",
"public function create(User $user)\n {\n\n //\n }",
"public function create(User $user)\n {\n return $this->handleCreate($user);\n }",
"public function createUser()\n {\n $params = $this->getQueryParams();\n $results = false;\n if ($params) {\n $results = $this->user->create($params);\n }\n if (!$results) {\n $this->user->addError(Configuration::CONT_ERROR_MSG . 'Could not create new user, check parameters.');\n }\n $this->callRender($results, 'create', true);\n return $results;\n }",
"public function create(User $user)\n {\n }",
"public function store(CreateUserRequest $request)\n {\n $request_data = $request->except([\"password\", \"password_confirmation\", \"status\", \"role\", \"permissions\"]);\n $request_data[\"password\"] = bcrypt($request->password);\n\n $user = User::create($request_data);\n $user->attachRole($request->role);\n $user->syncPermissions($request->permissions);\n\n return response()->json([\n \"success\" => true,\n \"message\" => \"Created User IS Successfully\"\n ],201);\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }",
"public function create(User $user)\n {\n //\n }"
] | [
"0.75184524",
"0.70999557",
"0.70050704",
"0.687053",
"0.66674584",
"0.65033805",
"0.6463174",
"0.64322144",
"0.6347754",
"0.63156676",
"0.627",
"0.62579596",
"0.62007236",
"0.6116662",
"0.60878897",
"0.6076458",
"0.6060198",
"0.60472155",
"0.60419893",
"0.6029335",
"0.60290486",
"0.60290486",
"0.60290486",
"0.60290486",
"0.60290486",
"0.60290486",
"0.60290486",
"0.60290486",
"0.60290486",
"0.60290486"
] | 0.7706211 | 0 |
Operation userCreateAsyncWithHttpInfo Creates a user. | public function userCreateAsyncWithHttpInfo($user)
{
$returnType = 'string';
$request = $this->userCreateRequest($user);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createDomainUserAsyncWithHttpInfo($body)\n {\n $returnType = '\\WooletClient\\Model\\User';\n $request = $this->createDomainUserRequest($body);\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function createUserAsyncWithHttpInfo($body = null, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\User';\n $request = $this->createUserRequest($body, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function createEmbedUserAsyncWithHttpInfo($body)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserPublic';\n $request = $this->createEmbedUserRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function createUserAsyncWithHttpInfo($user = null)\n {\n $returnType = '\\CrowdClient\\Model\\CwdUser';\n $request = $this->createUserRequest($user);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function createUserAsync($body = null, $fields = null)\n {\n return $this->createUserAsyncWithHttpInfo($body, $fields)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userCreateAsync($user)\n {\n return $this->userCreateAsyncWithHttpInfo($user)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function signupUserAsyncWithHttpInfo($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserSignUpResponseObject';\n $request = $this->signupUserRequest($body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function createUserWithHttpInfo($account_id, $v, $create_user_request)\n {\n // verify the required parameter 'account_id' is set\n if ($account_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $account_id when calling createUser');\n }\n // verify the required parameter 'v' is set\n if ($v === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $v when calling createUser');\n }\n // verify the required parameter 'create_user_request' is set\n if ($create_user_request === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $create_user_request when calling createUser');\n }\n // parse inputs\n $resourcePath = \"/accounts/{accountId}/users\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // query params\n if ($v !== null) {\n $queryParams['v'] = $this->apiClient->getSerializer()->toQueryValue($v);\n }\n // path params\n if ($account_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"accountId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($account_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($create_user_request)) {\n $_tempBody = $create_user_request;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');\n if (strlen($apiKey) !== 0) {\n $queryParams['api_key'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Yext\\Client\\Model\\IdResponse',\n '/accounts/{accountId}/users'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Yext\\Client\\Model\\IdResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\IdResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n default:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\ErrorResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function createUserAsync($user = null)\n {\n return $this->createUserAsyncWithHttpInfo($user)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userCreateWithHttpInfo($user)\n {\n $returnType = 'string';\n $request = $this->userCreateRequest($user);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function usersCreateWithHttpInfo($data = null)\n {\n // parse inputs\n $resourcePath = \"/users/\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/users/'\n );\n\n return [null, $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }",
"public function addUserAsyncWithHttpInfo($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UseridObject';\n $request = $this->addUserRequest($body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUserMeAsyncWithHttpInfo()\n {\n $returnType = '\\Bitween\\DevTo\\Model\\User';\n $request = $this->getUserMeRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function createUserWithHttpInfo($body = null, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\User';\n $request = $this->createUserRequest($body, $fields);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\User',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 409:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 422:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\ValidationError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function create(UserCreateRequest $request)\n {\n $user = $this->repository->create($request->validated());\n return $this->respondWithItem($user, 201);\n }",
"public function createDomainUserWithHttpInfo($body)\n {\n $returnType = '\\WooletClient\\Model\\User';\n $request = $this->createDomainUserRequest($body);\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n $statusCode = $response->getStatusCode();\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string', 'integer', 'bool'])) {\n $content = json_decode($content);\n }\n }\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\WooletClient\\Model\\User',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userCreate($user)\n {\n list($response) = $this->userCreateWithHttpInfo($user);\n return $response;\n }",
"public function signupUserAsync($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n return $this->signupUserAsyncWithHttpInfo($body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function createDomainUserAsync($body)\n {\n return $this->createDomainUserAsyncWithHttpInfo($body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function createEmbedUserAsync($body)\n {\n return $this->createEmbedUserAsyncWithHttpInfo($body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function signupUserWithHttpInfo($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserSignUpResponseObject';\n $request = $this->signupUserRequest($body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserSignUpResponseObject',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getUserAsyncWithHttpInfo($userId)\n {\n $returnType = '\\TalonOne\\Client\\Model\\User';\n $request = $this->getUserRequest($userId);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function addUserAsync($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n return $this->addUserAsyncWithHttpInfo($body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function authenticateUserAsyncWithHttpInfo($body = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\JsonMDNToken';\n $request = $this->authenticateUserRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function searchUserAsyncWithHttpInfo()\n {\n $returnType = '';\n $request = $this->searchUserRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function createEmbedUserWithHttpInfo($body)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserPublic';\n $request = $this->createEmbedUserRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserPublic',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function createUserCredentialsTotpAsyncWithHttpInfo($user_id, $body = null, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\CredentialsTotp';\n $request = $this->createUserCredentialsTotpRequest($user_id, $body, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function create()\n {\n if (array_key_exists('User', $_POST)) {\n $request = new Request();\n $response = new JsonResponse($this->makeRequest($request->setBody(Formatter::cleanData($_POST['User'])), 'user/create'));\n if ($response->isSuccess()) {\n $data = $response->getData();\n $userId = Arr::getNestedElement($data, 'user.id');\n if (is_null($userId)) {\n $response->addError('No user id provided');\n } else {\n $this->storage->set(self::SESSION_USER_ID, $userId);\n }\n }\n return $this->dump($request, $response, 'Create user - response');\n }\n \n return ($this->show(new Webpage('user/create', [\n 'form' => [\n 'action' => \"/{$this->getFramework()->getRouter()->getUrl()}\",\n 'data' => self::DEFAULT_USER_DATA\n ]\n ]), 'Create user'));\n }",
"public function usersCreate($data = null)\n {\n list($response) = $this->usersCreateWithHttpInfo($data);\n return $response;\n }",
"public function createApiUser() {\n try {\n $response = $this->newClient()->post(self::BASE_URL . self::API_USER_URI, [\n 'headers' => ['X-Reference-Id' => $this->xReferenceId],\n 'json' => ['providerCallbackHost' => $this->callbackHost]\n ]);\n return json_encode(['statusCode' => $response->getStatusCode()]);\n } catch (\\Exception $exception) {\n throw new \\Exception($exception->getMessage());\n }\n }"
] | [
"0.69458425",
"0.6805139",
"0.6730909",
"0.6702599",
"0.65881664",
"0.6565083",
"0.6479297",
"0.64455044",
"0.6368307",
"0.6276885",
"0.6243845",
"0.61416626",
"0.5963038",
"0.5835103",
"0.5818629",
"0.5803843",
"0.5772912",
"0.5722522",
"0.57225174",
"0.5706789",
"0.5705037",
"0.56376195",
"0.55777645",
"0.55647796",
"0.55577576",
"0.55065894",
"0.54798925",
"0.5470307",
"0.5402536",
"0.53997296"
] | 0.72402203 | 0 |
Create request for operation 'userDetails' | protected function userDetailsRequest($id, $virtual_operator)
{
// verify the required parameter 'id' is set
if ($id === null) {
throw new \InvalidArgumentException(
'Missing the required parameter $id when calling userDetails'
);
}
// verify the required parameter 'virtual_operator' is set
if ($virtual_operator === null) {
throw new \InvalidArgumentException(
'Missing the required parameter $virtual_operator when calling userDetails'
);
}
if (strlen($virtual_operator) > 60) {
throw new \InvalidArgumentException('invalid length for "$virtual_operator" when calling UserApi.userDetails, must be smaller than or equal to 60.');
}
$resourcePath = '/api/{virtualOperator}/users/{id}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($id !== null) {
$resourcePath = str_replace(
'{' . 'id' . '}',
ObjectSerializer::toPathValue($id),
$resourcePath
);
}
// path params
if ($virtual_operator !== null) {
$resourcePath = str_replace(
'{' . 'virtualOperator' . '}',
ObjectSerializer::toPathValue($virtual_operator),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json', 'text/json', 'application/xml', 'text/xml']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json', 'text/json', 'application/xml', 'text/xml'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
$httpBody = $_tempBody;
// \stdClass has no __toString(), so we should encode it manually
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($httpBody);
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValue
];
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$query = \GuzzleHttp\Psr7\build_query($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createUserRequest($user = null)\n {\n\n $resourcePath = '/user';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($user)) {\n $_tempBody = $user;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function withUserDetails();",
"function details($params = array()) {\n \n if(!isset($params['user_id'])){\n echo \"User ID required\";\n die();\n }\n \n \n \n $request = 'users/' . $params['user_id'];\n $request .= parent::createURL($params, array('user_id'));\n \n $result = parent::makeRequest($request);\n \n return $result;\n \n }",
"public function getUserMeRequest()\n {\n\n $resourcePath = '/users/me';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function fetchUserDetails(Request $request)\n {\n if ($request->isMethod('post')) {\n // Validating inputs\n $validator = Validator::make($request->all(), [\n 'id' => 'required|integer',\n ]);\n if ($validator->fails()) {\n return apiResponse(401,\n array_values(json_decode($validator->errors(), true))[0],\n 'Validation error');\n }\n $userDetails = Database::getInstance()->selectQuery([\n 'rawQuery' => 'id = ?',\n 'bindParams' => [$request['id']]\n ]);\n if (!empty($userDetails)) {\n return apiResponse(200, 'User details fetched successfully.', null, $userDetails[0]);\n } else {\n return apiResponse(400, 'User details not found.', null, []);\n }\n \n } else {\n return apiResponse(401, \"Method not allowed.\", \"Invalid method\");\n }\n }",
"protected function userDetails_0Request($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling userDetails_0'\n );\n }\n\n $resourcePath = '/api/users/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function userCreateRequest($user)\n {\n // verify the required parameter 'user' is set\n if ($user === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user when calling userCreate'\n );\n }\n\n $resourcePath = '/api/users';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($user)) {\n $_tempBody = $user;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['application/json', 'text/json', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function getUserRequest($userId)\n {\n // verify the required parameter 'userId' is set\n if ($userId === null || (is_array($userId) && count($userId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $userId when calling getUser'\n );\n }\n\n $resourcePath = '/v1/users/{userId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($userId !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($userId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function fetchUserDetails(User $user);",
"public function availableOperationsRequest()\n {\n\n $resourcePath = '/user';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'OPTIONS',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function createUserRequest($user_dto = null)\n {\n\n $resourcePath = '/user/create';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($user_dto)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($user_dto));\n } else {\n $httpBody = $user_dto;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function createUser(){\n\t\t$data = json_decode(file_get_contents('php://input'), true);\n\t\t$this->model->createUser($data);\n\n\t\t}",
"private function setupUserInfo(RequestInterface $request): RequestInterface\n {\n $uri = $request->getUri();\n if (empty($uri->getUserInfo())) {\n if (isset($this->user)) {\n $request = $request->withUri($uri->withUserInfo($this->user, $this->password));\n }\n }\n return $request;\n }",
"public function post()\n {\n return new ApiOperation([\n 'method' => 'POST',\n 'summary' => __('New User'),\n 'description' => __('Creates new User'),\n 'parameters' => [\n $this->stringInput('name', __('Name'))->required(),\n $this->stringInput('phone', __('Customer Phone'))->required(),\n $this->stringInput('email', __('Email'))->required(),\n $this->stringInput('token', __('Loyalty Card token')),\n $this->stringInput('promo_code', __('Promo code (for referral program needs)')),\n $this->stringPath('return_existing_user', __('Return existing user if already exists (0/1)')),\n $this->stringPath('force_email_confirmation', __('Force email confirmation (0/1)')),\n ],\n 'tags' => [__('Users')],\n 'responses' => [\n $this->jsonItem(__('User'), 'User'),\n ],\n ]);\n }",
"public function httpGetMethod()\n {\n return ['_form' => new UserForm()];\n }",
"public function UserDetailsUpdate(): GraphQLOperationMutation\n {\n return $this->prepareExecution(\n Globals::OAUTH_ACCESS_AS_AGENT_USER,\n Globals::OAUTH_SCOPE_USER,\n Globals::GRAPHQL_OPERATION_TYPE_MUTATION,\n 'UserDetailsUpdate',\n [],\n ['id', 'name', 'email']\n );\n }",
"protected function initializeProfileManagementFlowRequest()\n {\n\n $resourcePath = '/profiles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function completeProfileManagementFlowRequest()\n {\n\n $resourcePath = '/profiles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function urlUserDetails(): string\n {\n return self::USER_API_URL . 'user/id';\n }",
"public function manipulateUser() {\n\t\tWCF::getUser()->__construct(null, null, $this->userObj);\n\t}",
"public function authenticateUserRequest($body = null)\n {\n\n $resourcePath = '/authentication';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function passRequest($user)\r\n \t{ //Checking user in our records\r\n $data = $this->userInfo($user);\r\n// Return result...\r\n return $data;\r\n }",
"public function __construct(array $request_data)\n {\n $this->user = $request_data;\n \n }",
"protected function updateUserRequest($username = null, $user = null)\n {\n\n $resourcePath = '/user';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($username !== null) {\n $queryParams['username'] = ObjectSerializer::toQueryValue($username);\n }\n\n\n // body params\n $_tempBody = null;\n if (isset($user)) {\n $_tempBody = $user;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public abstract function generateRequestObject();",
"public function getObjectRequest()\n {\n\n $resourcePath = '/authentication';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function createOpenAPIUser(Company $company, $userDetails, $userProfileDetails = [], $productId)\n {\n $userDetails['first_name'] = 'Open';\n $userDetails['last_name'] = 'API';\n $subscriber = $company->subscriber;\n $userDetails['email'] = ucfirst(substr(clean($company->name), 0, 1)) . strtolower(clean($subscriber->last_name)) . $company->id . '@jobprogress.com';\n $userDetails['password'] = 'JP' . strtolower(strrev(str_replace(' ', '', $subscriber->last_name)));\n $group = User::GROUP_OPEN_API;\n $this->register($userDetails, $userProfileDetails, $group, $company->id, [], $productId);\n }",
"protected function indexSystemUsersRequest()\n {\n\n $resourcePath = '/users/-/systems';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function getUserRequest($username = null, $key = null, $expand = 'attributes')\n {\n\n $resourcePath = '/user';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($username !== null) {\n $queryParams['username'] = ObjectSerializer::toQueryValue($username);\n }\n // query params\n if ($key !== null) {\n $queryParams['key'] = ObjectSerializer::toQueryValue($key);\n }\n // query params\n if ($expand !== null) {\n $queryParams['expand'] = ObjectSerializer::toQueryValue($expand);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function availableUserOperationsRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling availableUserOperations'\n );\n }\n\n $resourcePath = '/user/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'OPTIONS',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }"
] | [
"0.63303864",
"0.6291441",
"0.62050635",
"0.613037",
"0.6049382",
"0.6025046",
"0.5892999",
"0.58711284",
"0.5785202",
"0.57170683",
"0.56329304",
"0.56021965",
"0.553757",
"0.55168545",
"0.54927605",
"0.5464578",
"0.5463875",
"0.5440916",
"0.5431323",
"0.54285693",
"0.54149574",
"0.5414566",
"0.54067147",
"0.54024255",
"0.53941697",
"0.53698504",
"0.53557384",
"0.53527594",
"0.5350733",
"0.5348837"
] | 0.631955 | 1 |
Operation userDetails_0WithHttpInfo Get a user details. | public function userDetails_0WithHttpInfo($id)
{
$returnType = '\Swagger\Client\Model\UserOutputDto';
$request = $this->userDetails_0Request($id);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\UserOutputDto',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userDetails_0($id)\n {\n list($response) = $this->userDetails_0WithHttpInfo($id);\n return $response;\n }",
"public function getUserMeWithHttpInfo()\n {\n // parse inputs\n $resourcePath = \"/Users/Me\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\APIUser',\n '/Users/Me'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\APIUser', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\APIUser', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getUserWithHttpInfo($account_id, $v, $user_id)\n {\n // verify the required parameter 'account_id' is set\n if ($account_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $account_id when calling getUser');\n }\n // verify the required parameter 'v' is set\n if ($v === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $v when calling getUser');\n }\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $user_id when calling getUser');\n }\n // parse inputs\n $resourcePath = \"/accounts/{accountId}/users/{userId}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // query params\n if ($v !== null) {\n $queryParams['v'] = $this->apiClient->getSerializer()->toQueryValue($v);\n }\n // path params\n if ($account_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"accountId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($account_id),\n $resourcePath\n );\n }\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"userId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($user_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');\n if (strlen($apiKey) !== 0) {\n $queryParams['api_key'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Yext\\Client\\Model\\UserResponse',\n '/accounts/{accountId}/users/{userId}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Yext\\Client\\Model\\UserResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\UserResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n default:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\ErrorResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getUserWithHttpInfo($userId)\n {\n $request = $this->getUserRequest($userId);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\TalonOne\\Client\\Model\\User' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\TalonOne\\Client\\Model\\User', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\TalonOne\\Client\\Model\\User';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\TalonOne\\Client\\Model\\User',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getInfo($user = null)\n {\n return $this->getClient()->call('user.getinfo', array(\n 'user' => $user,\n ));\n }",
"public function info(string $user): UserResponse;",
"public function user_info($params=array())\r\n {\r\n $data = $this->call_oauth2_metrics(\"v3/user/info\", $params);\r\n return $data;\r\n }",
"public function getDetailInfo()\r\n {\r\n try {\r\n $response = $this->userApi_instance->usersUserIdGet($this->user_id);\r\n\r\n } catch (Exception $e) {\r\n echo 'Exception: ', $e->getMessage(), PHP_EOL;\r\n }\r\n echo $response;\r\n }",
"public function userDetailsWithHttpInfo($id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto';\n $request = $this->userDetailsRequest($id, $virtual_operator);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getUserInfoAction()\n {\n \t// action body\n \t$user_info = \\Extended\\ilook_user::getUserdetailById( $this->getRequest()->getParam('user_id') );\n \techo Zend_Json::encode($user_info);\n \tdie;\n }",
"public function fetchUserDetails(User $user);",
"public function get_user_details($user_token){\r\n \r\n $master_url = 'http://23.99.141.44:3000/getUserDetails?user=';\r\n $user_response = file_get_contents($master_url.$user_token, false, $context);\r\n\r\n $user_response = json_decode($user_response);\r\n $user_detail = $user_response->user;\r\n\r\n return $user_detail;\r\n }",
"public function getDetails(&$user)\n\t{\t\t\n\t\t$params = array(\n\t\t\t'action' => \"viewUserDetail\",\n\t\t\t'userID' => $user->id,\t\n\t\t);\n\t\t\n\t\t$path = \"rest/svcUsers\";\n\t\t\t\t\n\t\ttry {\n\t\t\t$user_data = $this->_client->callRest($path, $params);\n\t\t\t\t\t\t\n\t\t\tif (empty($user_data[0]['user_id'])) {\n\t\t\t\tthrow new onesite_exception('Invalid user details returned');\n\t\t\t}\n\t\t\t\n\t\t\t$user->loadProperties($user_data[0]);\t\t\t\n\t\t\t\n\t\t} catch (onesite_exception $e) {\n\t\t\t$this->_logException(\n\t\t\t\t\t\"user.getDetails\",\n\t\t\t\t\t$e,\n\t\t\t\t\t\"user.log\"\n\t\t\t\t);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public function searchUserWithHttpInfo()\n {\n $returnType = '';\n $request = $this->searchUserRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }",
"public function getUserInfo($user): Google_Service_Oauth2_Userinfo\n {\n $this->setAccessToken($user);\n return $this->oauth_service->userinfo->get();\n }",
"public function user_info($user_id) {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,1);\n \n $getdata = $this->user->get_user_info($user_id);\n \n if ( $getdata ) {\n \n echo json_encode([\n 'msg' => $getdata,\n 'user_id' => $this->user_id\n ]);\n \n }\n \n }",
"public function getUserWithHttpInfo($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling getUser');\n }\n // parse inputs\n $resourcePath = \"/Users/{id}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\User',\n '/Users/{id}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\User', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\User', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getUserMeAsyncWithHttpInfo()\n {\n $returnType = '\\Bitween\\DevTo\\Model\\User';\n $request = $this->getUserMeRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUserInfo($username)\n\t{\n\t\t// make the call\n\t\treturn $this->doCall((string) $username . '/info.json');\n\t}",
"public function userInfo($username = '')\n {\n $args = array(\n 'user' => $username\n );\n \n return $this->_request('user', $args);\n }",
"private function getUserDetails()\n {\n require_once $this->root.'api/classes/Database.php';\n $db = new Database();\n $db->connect();\n $statement = 'SELECT * FROM users WHERE username = :username LIMIT 1';\n $params = array('username' => $this->username);\n $result = $db->run($statement, $params);\n $user = $result[0];\n $db->close();\n\n $this->user_password_in_database = $user['password'];\n $this->user_id = $user['id'];\n\n // Check if user has an existing Avatar\n $db->connect();\n $statement = 'SELECT thumbnail FROM photos WHERE user_id = :user_id LIMIT 1';\n $params = array('user_id' => $this->user_id);\n $photo_result = $db->run($statement, $params);\n $avatar = $photo_result[0];\n $db->close();\n if (empty($avatar['thumbnail'])) {\n $this->user_has_avatar = false;\n } else {\n $this->user_has_avatar = true;\n }\n }",
"public function userDetails_0AsyncWithHttpInfo($id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto';\n $request = $this->userDetails_0Request($id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"function details($params = array()) {\n \n if(!isset($params['user_id'])){\n echo \"User ID required\";\n die();\n }\n \n \n \n $request = 'users/' . $params['user_id'];\n $request .= parent::createURL($params, array('user_id'));\n \n $result = parent::makeRequest($request);\n \n return $result;\n \n }",
"public function getUser() {\n\n \t\t//parse inputs\n \t\t$resourcePath = \"/users/info\";\n \t\t$resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n \t\t$method = \"GET\";\n $queryParams = array();\n $headerParams = array();\n $headerParams['Accept'] = 'application/json';\n $headerParams['Content-Type'] = 'application/json';\n\n //make the API Call\n if (! isset($body)) {\n $body = null;\n }\n \t\t$response = $this->apiClient->callAPI($resourcePath, $method,\n \t\t $queryParams, $body,\n \t\t $headerParams);\n\n\n if(! $response){\n return null;\n }\n\n \t\t$responseObject = $this->apiClient->deserialize($response,\n \t\t 'UserDto');\n \t\treturn $responseObject;\n\n }",
"public function getUserInfo()\r\n {\r\n return $this->userInfo;\r\n }",
"public function getUserAsyncWithHttpInfo($userId)\n {\n $returnType = '\\TalonOne\\Client\\Model\\User';\n $request = $this->getUserRequest($userId);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function basic_info( )\r\n {\r\n header(\"Content-type: application/json; charset = utf-8\");\r\n $basic_data = json_decode(file_get_contents('php://input'));\r\n\r\n if(isset($_SESSION['uid']))\r\n {\r\n $user_id = $_SESSION['uid'];\r\n\r\n $m_user = new UserService();\r\n $result = $m_user->userBasicInfo($user_id);\r\n // $result = array();\r\n // $result[\"status\"] = 0;\r\n // $result[\"info\"] = \"Failed to connect to Server!\";\r\n\r\n $this->ajaxReturn($result);\r\n }\r\n else\r\n {\r\n $this->redirect('User/signIn');\r\n } \r\n }",
"public function userDetails($id, $virtual_operator)\n {\n list($response) = $this->userDetailsWithHttpInfo($id, $virtual_operator);\n return $response;\n }",
"public function getUserDetails(){\n\t\t$this->load->model('user_model');\n\n\t\t$id = $this->input->post(\"user_id\");\n\n\t\t$users \t= $this->user_model->getUserDetails($id);\n\n\t\techo json_encode($users);\n\t\texit();\n\t}",
"public function getUserDetailAction()\n {\n //get input\n $inputs = $this->getAllUrlParam();\n\n //define default\n $default = [];\n \n // Validate input\n $params = $this->validateApi($this->getUserDetail, $default, $inputs);\n \n if (isset($params['msgError']))\n {\n //Validate error\n return $this->validateError($params['fieldError'], $params['msgError']);\n }\n \n //get user repository\n $userRepo = $this->getUserRepository();\n \n //get user data by id\n $result = $userRepo->getUserDetail($params);\n\n //Check response error\n if (!$result['success'])\n {\n return $this->validateBussinessError($result['message']);\n }\n\n return $this->output($result['data']);\n }"
] | [
"0.68678343",
"0.65517545",
"0.6114869",
"0.6095765",
"0.6009927",
"0.60048455",
"0.59998006",
"0.5975519",
"0.594119",
"0.5893617",
"0.58516693",
"0.5842913",
"0.577433",
"0.5764737",
"0.5749751",
"0.5716897",
"0.57016647",
"0.56562597",
"0.56446165",
"0.5582833",
"0.5579236",
"0.5568458",
"0.55081385",
"0.5483473",
"0.5471076",
"0.5447283",
"0.54362226",
"0.53988695",
"0.53949815",
"0.5388104"
] | 0.6741889 | 1 |
Operation userDetails_0AsyncWithHttpInfo Get a user details. | public function userDetails_0AsyncWithHttpInfo($id)
{
$returnType = '\Swagger\Client\Model\UserOutputDto';
$request = $this->userDetails_0Request($id);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUserMeAsyncWithHttpInfo()\n {\n $returnType = '\\Bitween\\DevTo\\Model\\User';\n $request = $this->getUserMeRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userDetails_0Async($id)\n {\n return $this->userDetails_0AsyncWithHttpInfo($id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getUserAsyncWithHttpInfo($userId)\n {\n $returnType = '\\TalonOne\\Client\\Model\\User';\n $request = $this->getUserRequest($userId);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUserMeWithHttpInfo()\n {\n // parse inputs\n $resourcePath = \"/Users/Me\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\APIUser',\n '/Users/Me'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\APIUser', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\APIUser', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function userDetails_0WithHttpInfo($id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto';\n $request = $this->userDetails_0Request($id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userDetails_0($id)\n {\n list($response) = $this->userDetails_0WithHttpInfo($id);\n return $response;\n }",
"public function userDetailsAsyncWithHttpInfo($id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto';\n $request = $this->userDetailsRequest($id, $virtual_operator);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function info(string $user): UserResponse;",
"public function searchUserAsyncWithHttpInfo()\n {\n $returnType = '';\n $request = $this->searchUserRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getDetailInfo()\r\n {\r\n try {\r\n $response = $this->userApi_instance->usersUserIdGet($this->user_id);\r\n\r\n } catch (Exception $e) {\r\n echo 'Exception: ', $e->getMessage(), PHP_EOL;\r\n }\r\n echo $response;\r\n }",
"public function userDetailsAsync($id, $virtual_operator)\n {\n return $this->userDetailsAsyncWithHttpInfo($id, $virtual_operator)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getInfo($user = null)\n {\n return $this->getClient()->call('user.getinfo', array(\n 'user' => $user,\n ));\n }",
"public function get_user_details($user_token){\r\n \r\n $master_url = 'http://23.99.141.44:3000/getUserDetails?user=';\r\n $user_response = file_get_contents($master_url.$user_token, false, $context);\r\n\r\n $user_response = json_decode($user_response);\r\n $user_detail = $user_response->user;\r\n\r\n return $user_detail;\r\n }",
"public function getUserAsyncWithHttpInfo($id, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserObject';\n $request = $this->getUserRequest($id, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUserAsyncWithHttpInfo($id, $url = null)\n {\n $returnType = '\\Bitween\\DevTo\\Model\\User';\n $request = $this->getUserRequest($id, $url);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function showWalletAccountUserAsyncWithHttpInfo($id)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\SingleUser';\n $request = $this->showWalletAccountUserRequest($id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUserWithHttpInfo($account_id, $v, $user_id)\n {\n // verify the required parameter 'account_id' is set\n if ($account_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $account_id when calling getUser');\n }\n // verify the required parameter 'v' is set\n if ($v === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $v when calling getUser');\n }\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $user_id when calling getUser');\n }\n // parse inputs\n $resourcePath = \"/accounts/{accountId}/users/{userId}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // query params\n if ($v !== null) {\n $queryParams['v'] = $this->apiClient->getSerializer()->toQueryValue($v);\n }\n // path params\n if ($account_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"accountId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($account_id),\n $resourcePath\n );\n }\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"userId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($user_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');\n if (strlen($apiKey) !== 0) {\n $queryParams['api_key'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Yext\\Client\\Model\\UserResponse',\n '/accounts/{accountId}/users/{userId}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Yext\\Client\\Model\\UserResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\UserResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n default:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\ErrorResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getUserAsync($userId)\n {\n return $this->getUserAsyncWithHttpInfo($userId)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getUserMeAsync()\n {\n return $this->getUserMeAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function authenticateUserAsyncWithHttpInfo($body = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\JsonMDNToken';\n $request = $this->authenticateUserRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUserAsync($id, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n return $this->getUserAsyncWithHttpInfo($id, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function user_info($params=array())\r\n {\r\n $data = $this->call_oauth2_metrics(\"v3/user/info\", $params);\r\n return $data;\r\n }",
"public function getUserWithHttpInfo($userId)\n {\n $request = $this->getUserRequest($userId);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\TalonOne\\Client\\Model\\User' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\TalonOne\\Client\\Model\\User', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\TalonOne\\Client\\Model\\User';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\TalonOne\\Client\\Model\\User',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userDetailsWithHttpInfo($id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto';\n $request = $this->userDetailsRequest($id, $virtual_operator);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function createEmbedUserAsyncWithHttpInfo($body)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserPublic';\n $request = $this->createEmbedUserRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function indexSystemUsersAsyncWithHttpInfo()\n {\n $returnType = '\\NodeumSDK\\Client\\Model\\SystemUserCollection';\n $request = $this->indexSystemUsersRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUser() {\n\n \t\t//parse inputs\n \t\t$resourcePath = \"/users/info\";\n \t\t$resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n \t\t$method = \"GET\";\n $queryParams = array();\n $headerParams = array();\n $headerParams['Accept'] = 'application/json';\n $headerParams['Content-Type'] = 'application/json';\n\n //make the API Call\n if (! isset($body)) {\n $body = null;\n }\n \t\t$response = $this->apiClient->callAPI($resourcePath, $method,\n \t\t $queryParams, $body,\n \t\t $headerParams);\n\n\n if(! $response){\n return null;\n }\n\n \t\t$responseObject = $this->apiClient->deserialize($response,\n \t\t 'UserDto');\n \t\treturn $responseObject;\n\n }",
"public function getUserInfo($user): Google_Service_Oauth2_Userinfo\n {\n $this->setAccessToken($user);\n return $this->oauth_service->userinfo->get();\n }",
"public function fetchUserDetails(User $user);",
"public function getUserDetails($user_id) {\n\n // Get the parameters\n $strime_api_url = $this->container->getParameter('strime_api_url');\n $strime_api_token = $this->container->getParameter('strime_api_token');\n\n // Set the headers\n $headers = array(\n 'Accept' => 'application/json',\n 'X-Auth-Token' => $strime_api_token,\n 'Content-type' => 'application/json'\n );\n\n // Set the endpoint to get the videos of this user\n $endpoint = $strime_api_url.\"user/\".$user_id.\"/get\";\n\n // Send the request\n $client = new \\GuzzleHttp\\Client();\n $json_response = $client->request('GET', $endpoint, [\n 'headers' => $headers,\n 'http_errors' => false\n ]);\n $curl_status = $json_response->getStatusCode();\n $response = json_decode( $json_response->getBody() );\n\n // If the request was properly executed\n if($curl_status == 200) {\n $user_details = $response->{'results'};\n }\n else {\n $user_details = NULL;\n }\n\n return $user_details;\n }"
] | [
"0.67305017",
"0.6310224",
"0.626546",
"0.60854423",
"0.6040388",
"0.5879063",
"0.58534247",
"0.5844669",
"0.5819705",
"0.57725286",
"0.56836677",
"0.5680309",
"0.5676904",
"0.56538594",
"0.5649357",
"0.56409895",
"0.56262726",
"0.56013846",
"0.55679667",
"0.5513803",
"0.5464251",
"0.544822",
"0.5440067",
"0.5419705",
"0.5343633",
"0.5327131",
"0.5317468",
"0.5302573",
"0.52741337",
"0.5233715"
] | 0.6419413 | 1 |
Operation userRemove Removes a user from the system. | public function userRemove($user_id)
{
list($response) = $this->userRemoveWithHttpInfo($user_id);
return $response;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function removeUser($user) {\n $this->removeValues('users', $user);\n }",
"public function removeUser(User $user)\n {\n $this->em->remove($user);\n }",
"public function deleteUser() {\n\t\tif (!empty($this -> users)) {\n\t\t\t$user = array_pop($this -> users);\n\t\t\t$this -> userService -> deleteUser($user -> getId());\n\t\t}\n\t}",
"public function removeUser($userId) {\n\t\tunset($this->users->data[$userId]);\n\t}",
"public function removeUser(User $user)\n {\n if ($this->hasUser($user)) {\n $this->getUsers()->removeElement($user);\n $user->removeOrganization($this);\n }\n }",
"public function remove(UserInterface $user);",
"public function removeUser(User $user) {\r\n return Lib\\Db::Query(\r\n 'CALL proc_RemoveUserFromBracket(:bracketId, :userId)',\r\n [\r\n 'bracketId' => $this->id,\r\n 'userId' => $user->id\r\n ]\r\n );\r\n }",
"public function removeUser($user) {\n\t\t$result = false;\n\t\tif ($this->emitter) {\n\t\t\t$this->emitter->emit('\\OC\\Group', 'preRemoveUser', array($this, $user));\n\t\t}\n\t\tforeach ($this->backends as $backend) {\n\t\t\tif ($backend->implementsActions(OC_GROUP_BACKEND_REMOVE_FROM_GOUP) and $backend->inGroup($user->getUID(), $this->gid)) {\n\t\t\t\t$backend->removeFromGroup($user->getUID(), $this->gid);\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\t\tif ($result) {\n\t\t\tif ($this->emitter) {\n\t\t\t\t$this->emitter->emit('\\OC\\Group', 'postRemoveUser', array($this, $user));\n\t\t\t}\n\t\t\tif ($this->users) {\n\t\t\t\tforeach ($this->users as $index => $groupUser) {\n\t\t\t\t\tif ($groupUser->getUID() === $user->getUID()) {\n\t\t\t\t\t\tunset($this->users[$index]);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function destroy(User $user) { \n try { \n $user->delete(); \n return Message::success(Message::$REMOVE);\n } catch (\\Exception $exc) {\n return Message::error(Message::$ERROR);\n }\n }",
"public function removeUser($user)\n {\n if ($user->current_workspace_id === $this->id) {\n $user->forceFill([\n 'current_workspace_id' => null,\n ])->save();\n }\n\n $this->users()->detach($user);\n }",
"public function core_notify_user_remove($user_id)\n {\n }",
"public function deleteUser(User $user);",
"public function removeUser(User $user, Task $task)\n {\n $task->users()->detach([$user->id]);\n }",
"function removeUser()\n\t\t{\n\n\t\t\t\t\t\t\n\t\t\t$userInfo = $this->userInfo();\n\t\t\t\n\t\t\tif (!$userInfo)\n\t\t\t{\n\t\t\t\theader(\"location:index.php\");\n\t\t\t}\n\t\t\telse \n\t\t\t{\t\n\t\t\t\t$therapist_id = (int) $this->value('id');\t\n\t\t\t\t\n\t\t\t\t$queryUpdate = \"UPDATE user SET status = 3 WHERE user_id = \". $therapist_id;\t\t\t\t\t\n\t\t\t\t$this->execute_query($queryUpdate);\t\t\n\n\t\t\t\t$sqlUpdate = \"DELETE FROM therapist_patient WHERE therapist_id = '\".$therapist_id.\"'\";\t\t\t\n\t\t\t\t$result = $this->execute_query($sqlUpdate);\t\t\t\t\n\t\t\t\t\n\t\t\t\theader(\"location:index.php?action=userListing\");\n\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}",
"public function removeUser($user)\n {\n if ($user->current_location_id === $this->id) {\n $user->forceFill([\n 'current_location_id' => null,\n ])->save();\n }\n\n $this->users()->detach($user);\n }",
"function remove_user($userId, &$rMsg) {\n global $OK, $ERROR;\n if ( user_exists($userId, $rMsg ) ) {\n $newUsers = array();\n $users = get_list_of_users($rMsg);\n foreach ( $users as $user ) {\n if ( strcmp($user->userid, $userId ) != 0 ) {\n array_push($newUsers, $user);\n }\n }\n return _write_user_info($newUsers, $rMsg);\n }\n return $ERROR;\n}",
"public function removeUser(User $user)\n {\n $userElementsByEmail = ArrayHelper::index(\n $this->getUsers()->all(),\n 'email'\n );\n\n // Does the user already exist?\n if (array_key_exists($user->email, $userElementsByEmail)) {\n unset($userElementsByEmail[$user->email]);\n\n $this->getUsers()->setCachedResult(\n array_values($userElementsByEmail)\n );\n }\n\n return $this;\n }",
"public function userRemoveWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->userRemoveRequest($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function actionRemove($userID)\n {\n if ($user = $this->_em->getRepository('\\Jazzee\\Entity\\User')->find($userID)) {\n //clear out all current program roles\n foreach ($user->getRoles() as $role) {\n if ($role->getProgram() == $this->_program) {\n $user->getRoles()->removeElement($role);\n }\n }\n $this->_em->persist($user);\n $this->addMessage('success', \"User removed from program successfuly\");\n $this->redirectPath('setup/users');\n } else {\n $this->addMessage('error', \"Error: User #{$userID} does not exist.\");\n }\n }",
"function user_remove ($user)\n{\n\t// Copy Valid Users\n\t$cnt = count($GLOBALS[\"users\"]);\n\tfor ($i=0; $i < $cnt; ++$i)\n\t{\n\t\tif ($GLOBALS[\"users\"][$i][0] != $user)\n\t\t\t$save_users[] = $GLOBALS[\"users\"][$i];\n\t}\n\t$GLOBALS[\"users\"]=$save_users;\n\treturn _saveUsers();\n}",
"public function remove(\n UserDeleteRequest $request, \n User $user, \n StorageService $storages)\n {\n $this->users->remove($user);\n\n $storages->destroy('images', $user->id, 'profile');\n\n return $this->respondJson(['user' => $user]);\n }",
"public function delete(User $user)\n\t{\n\t\tif ($this->isDeletable($user)) {\n\t\t\ttry {\n\t\t\t\tif ($user->subscriber) {\n\t\t\t\t\t$this->subscriberFacade->delete($user->subscriber);\n\t\t\t\t}\n\t\t\t\tif ($user->basket) {\n\t\t\t\t\t$this->em->remove($user->basket);\n\t\t\t\t}\n\t\t\t\t$this->em->remove($user);\n\t\t\t\t$this->em->flush();\n\t\t\t\treturn $user;\n\t\t\t} catch (DBALException $ex) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tthrow new CantDeleteUserException('This user can\\'t be deleted');\n\t}",
"public function userRemoveAsync($user_id)\n {\n return $this->userRemoveAsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function deleteAction(User $user)\n { \n $user_current = $this->container->get('security.context')->getToken()->getUser();\n $em = $this->getDoctrine()->getManager();\n $user_remove = $em->getRepository('USRUserBundle:User')->find($user->getId());\n $user_db = $em->getRepository('USRUserBundle:User')->find($user_current->getId());\n $user_db->removeUser($user_remove);\n $em->persist($user_db);\n $em->flush();\n return $this->redirectToRoute('bonobo_index');\n }",
"public function removeUser($id){\n // Delete a user account\n if($id != 1){\n $this->removeData('user_admin', array('user_admin_id' => $id));\n }\n $this->Cms_model->clear_file_cache('getUserEmail*', TRUE);\n }",
"function delete_user_delete($user_id) {\r\n $result = $this->um->delete_user($user_id);\r\n if ($result === FALSE) {\r\n $this->response(array('status' => 'failed'));\r\n } else {\r\n $this->response(array('status' => 'success'));\r\n }\r\n }",
"public function deleteUser(User $user)\n {\n // TODO: Implement deleteUser() method.\n }",
"public function destroy($user) {\n return $this->successResponse($this->userService->deleteUser($user));\n }",
"public function testRemove() : void\n {\n /** CREATE FAKE USER */\n $faker = \\Faker\\Factory::create('pt_BR');\n\n $newUser = new User(\n $faker->userName,\n $faker->name,\n $faker->email,\n $faker->password(5, 30)\n );\n\n $newUser = $this->userRepository->save($newUser);\n\n $this->assertNotEmpty($newUser);\n\n /** ENSURE USER BELONGS TO DATABASE */\n $user = $this->userRepository->findByUsername($newUser->getUsername());\n\n $this->assertNotEmpty($newUser);\n $this->assertEquals($newUser->getEmail(), $user->getEmail());\n\n /** REMOVE USER FROM DATABASE */\n $this->userRepository->remove($user);\n\n $user = $this->userRepository->findByUsername($newUser->getUsername());\n\n $this->assertEmpty($user);\n }",
"public function removeUser(){\n $req = \"DELETE FROM user WHERE id = ?\"; // Requête.\n $instance = DBconnexion::getInstance(); // Connexion à la DB.\n if($instance != null){ // Si connexion possible ....\n $instance->setQuery($req); // Préparation de la requête.\n $instance->execQuery(array($_GET[\"id\"])); // Exécution de la requête.\n }else{ // Sinon ...\n echo Controller::ERROR_DB; // Retourne erreur.\n }\n }"
] | [
"0.76457393",
"0.7323236",
"0.7101056",
"0.68500364",
"0.68433565",
"0.6801744",
"0.6794486",
"0.67261446",
"0.67233205",
"0.66724443",
"0.6543681",
"0.65202373",
"0.64982796",
"0.64259595",
"0.641029",
"0.64080375",
"0.6399078",
"0.63736457",
"0.6347739",
"0.63006985",
"0.6280156",
"0.62780184",
"0.6272269",
"0.6266957",
"0.62610555",
"0.62533945",
"0.62425584",
"0.62313807",
"0.62047046",
"0.62039995"
] | 0.7776927 | 0 |
Operation userRemoveWithHttpInfo Removes a user from the system. | public function userRemoveWithHttpInfo($user_id)
{
$returnType = 'string';
$request = $this->userRemoveRequest($user_id);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'string',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userRemoveAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->userRemoveRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRemove($user_id)\n {\n list($response) = $this->userRemoveWithHttpInfo($user_id);\n return $response;\n }",
"function removeUser($user) {\n $this->removeValues('users', $user);\n }",
"public function deleteUserWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserRequest($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 204:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function removeUser(User $user)\n {\n $this->em->remove($user);\n }",
"public function removeUser($userId) {\n\t\tunset($this->users->data[$userId]);\n\t}",
"public function remove(\n UserDeleteRequest $request, \n User $user, \n StorageService $storages)\n {\n $this->users->remove($user);\n\n $storages->destroy('images', $user->id, 'profile');\n\n return $this->respondJson(['user' => $user]);\n }",
"public function destroy($user) {\n return $this->successResponse($this->userService->deleteUser($user));\n }",
"public function remove(UserInterface $user);",
"public function removePhoto(User $user, $request)\n\t{\n\t\t$data = [\n\t\t\t'success' => true,\n\t\t\t'result' => null,\n\t\t];\n\t\t\n\t\tif (empty($user)) {\n\t\t\t$data['success'] = false;\n\t\t\t$data['message'] = t('User not found');\n\t\t}\n\t\t\n\t\t// Check logged User\n\t\tif (auth('sanctum')->user()->id != $user->id) {\n\t\t\t$data['success'] = false;\n\t\t\t$data['message'] = t('Unauthorized action');\n\t\t}\n\t\t\n\t\tif (isDemo()) {\n\t\t\t$data['success'] = false;\n\t\t\t$data['message'] = t('demo_mode_message');\n\t\t}\n\t\t\n\t\tif (!isset($data['success']) || !$data['success']) {\n\t\t\treturn $data;\n\t\t}\n\t\t\n\t\t// Remove all the current user's photos, by removing his photos' directory.\n\t\t$destinationPath = substr($user->photo, 0, strrpos($user->photo, '/'));\n\t\tif ($this->disk->exists($destinationPath)) {\n\t\t\t$this->disk->deleteDirectory($destinationPath);\n\t\t}\n\t\t\n\t\t// Delete the photo path from DB\n\t\t$user->photo = null;\n\t\t$user->save();\n\t\t\n\t\t$data['message'] = t('Your photo or avatar has been deleted');\n\t\t$data['result'] = (new UserResource($user))->toArray($request);\n\t\t\n\t\treturn $data;\n\t}",
"public function destroy(User $user) { \n try { \n $user->delete(); \n return Message::success(Message::$REMOVE);\n } catch (\\Exception $exc) {\n return Message::error(Message::$ERROR);\n }\n }",
"public function usersDeleteWithHttpInfo($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling usersDelete');\n }\n // parse inputs\n $resourcePath = \"/users/{id}/\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/users/{id}/'\n );\n\n return [null, $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }",
"function removeUser()\n\t\t{\n\n\t\t\t\t\t\t\n\t\t\t$userInfo = $this->userInfo();\n\t\t\t\n\t\t\tif (!$userInfo)\n\t\t\t{\n\t\t\t\theader(\"location:index.php\");\n\t\t\t}\n\t\t\telse \n\t\t\t{\t\n\t\t\t\t$therapist_id = (int) $this->value('id');\t\n\t\t\t\t\n\t\t\t\t$queryUpdate = \"UPDATE user SET status = 3 WHERE user_id = \". $therapist_id;\t\t\t\t\t\n\t\t\t\t$this->execute_query($queryUpdate);\t\t\n\n\t\t\t\t$sqlUpdate = \"DELETE FROM therapist_patient WHERE therapist_id = '\".$therapist_id.\"'\";\t\t\t\n\t\t\t\t$result = $this->execute_query($sqlUpdate);\t\t\t\t\n\t\t\t\t\n\t\t\t\theader(\"location:index.php?action=userListing\");\n\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}",
"public function deleteDomainUserWithHttpInfo($user_id)\n {\n $returnType = '';\n $request = $this->deleteDomainUserRequest($user_id);\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n $statusCode = $response->getStatusCode();\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }",
"public function deleteUserWithHttpInfo($username = null)\n {\n $request = $this->deleteUserRequest($username);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }",
"public function deleteUser(User $user);",
"public function destroy(User $user)\n {\n try {\n $user->delete();\n } catch (\\Throwable $th) {\n return response('There was an error deleting the user', Response::HTTP_BAD_REQUEST);\n }\n }",
"public function removeUserData($userId)\n {\n global $wpdb;\n\n $wpdb->query(\n \t\"DELETE FROM \" . DB_ACCESSGROUP_TO_OBJECT . \" \n \tWHERE object_id = \".$userId.\"\n AND object_type = 'user'\"\n );\n }",
"public function removeUser(User $user) {\r\n return Lib\\Db::Query(\r\n 'CALL proc_RemoveUserFromBracket(:bracketId, :userId)',\r\n [\r\n 'bracketId' => $this->id,\r\n 'userId' => $user->id\r\n ]\r\n );\r\n }",
"public function getUserWithHttpInfo($userId)\n {\n $request = $this->getUserRequest($userId);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\TalonOne\\Client\\Model\\User' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\TalonOne\\Client\\Model\\User', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\TalonOne\\Client\\Model\\User';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\TalonOne\\Client\\Model\\User',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function destroy(User $user)\n {\n $user->delete();\n return response(null, 204);\n }",
"protected function userRemoveRequest($user_id)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userRemove'\n );\n }\n\n $resourcePath = '/api/users/{userId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function destroy(User $user)\n {\n $this->service->delete($user);\n\n return response()->json(['Given User has been deleted successfully.']);\n }",
"public function removeAdmin(Request $request, User $user)\n {\n $removeAdmin = User::where('id', $user->id)->update([\n 'is_admin' => null\n ]);\n\n // Returning success API response.\n return $this->success(null, 'Admin privilege was successfully removed from the user.');\n }",
"public function removeUser(User $user)\n {\n if ($this->hasUser($user)) {\n $this->getUsers()->removeElement($user);\n $user->removeOrganization($this);\n }\n }",
"public function removeUser() {\n $userId =(int) $_POST['search'];\n $userModel = new UserModel();\n $userModel->removeUserByID($userId);\n echo View(\"delete-success\");\n }",
"public function destroy(User $user)\n {\n $user->delete ();\n\n return response ()->json ();\n }",
"public function deleteUserAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"function delete_user($userid)\n\t{\n\t\t$url = $this->restApiUrl. 'users/'.$this->locale.'/'.$this->apiAuthKey.'/' . $userid;\n\t\treturn json_decode($this->call_rest_delete($url,''));\n\t}",
"function delete_user($userid)\n\t{\n\t\t$url = $this->restApiUrl. 'users/'.$this->locale.'/'.$this->apiAuthKey.'/' . $userid;\n\t\treturn json_decode($this->call_rest_delete($url,''));\n\t}"
] | [
"0.6259658",
"0.6188378",
"0.58418673",
"0.55142903",
"0.551347",
"0.5492997",
"0.5458065",
"0.5384563",
"0.5366352",
"0.53205174",
"0.52593994",
"0.52527547",
"0.52295196",
"0.5214874",
"0.5209622",
"0.5177237",
"0.51512843",
"0.5086385",
"0.5073611",
"0.5067966",
"0.50629795",
"0.5044104",
"0.502876",
"0.50257874",
"0.5014392",
"0.49871564",
"0.4984133",
"0.4982107",
"0.49807483",
"0.49807483"
] | 0.6975631 | 0 |
Operation userRemoveAsync Removes a user from the system. | public function userRemoveAsync($user_id)
{
return $this->userRemoveAsyncWithHttpInfo($user_id)
->then(
function ($response) {
return $response[0];
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userRemoveAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->userRemoveRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserAsync($user_id)\n {\n return $this->deleteUserAsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function deleteUserAsync($id, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n return $this->deleteUserAsyncWithHttpInfo($id, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRemove($user_id)\n {\n list($response) = $this->userRemoveWithHttpInfo($user_id);\n return $response;\n }",
"public function removeUser(User $user)\n {\n $this->em->remove($user);\n }",
"public function deleteUserAsync($username = null)\n {\n return $this->deleteUserAsyncWithHttpInfo($username)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"function removeUser($user) {\n $this->removeValues('users', $user);\n }",
"public function removeUser(User $user, Task $task)\n {\n $task->users()->detach([$user->id]);\n }",
"public function deleteUser() {\n\t\tif (!empty($this -> users)) {\n\t\t\t$user = array_pop($this -> users);\n\t\t\t$this -> userService -> deleteUser($user -> getId());\n\t\t}\n\t}",
"public function remove(UserInterface $user);",
"public function removeMember($user): ExtendedPromiseInterface\n {\n if ($user instanceof User || $user instanceof Member) {\n $user = $user->id;\n } elseif ($user instanceof ThreadMember) {\n $user = $user->user_id;\n }\n\n return $this->http->delete(Endpoint::bind(Endpoint::THREAD_MEMBER, $this->id, $user));\n }",
"public function removeUser(User $user) {\r\n return Lib\\Db::Query(\r\n 'CALL proc_RemoveUserFromBracket(:bracketId, :userId)',\r\n [\r\n 'bracketId' => $this->id,\r\n 'userId' => $user->id\r\n ]\r\n );\r\n }",
"public function deleteUserAttributeUserValueAsync($user_id, $user_attribute_id)\n {\n return $this->deleteUserAttributeUserValueAsyncWithHttpInfo($user_id, $user_attribute_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function deleteUser()\n {\n $user = User::findOrFail($this->userIdBeingRemoved);\n $user->delete();\n $this->dispatchBrowserEvent('hide-delete-modal', ['message' => 'User deleted successfuly!']);\n }",
"public function deleteUser(User $user);",
"public function deleteUserAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function removeUser($user) {\n\t\t$result = false;\n\t\tif ($this->emitter) {\n\t\t\t$this->emitter->emit('\\OC\\Group', 'preRemoveUser', array($this, $user));\n\t\t}\n\t\tforeach ($this->backends as $backend) {\n\t\t\tif ($backend->implementsActions(OC_GROUP_BACKEND_REMOVE_FROM_GOUP) and $backend->inGroup($user->getUID(), $this->gid)) {\n\t\t\t\t$backend->removeFromGroup($user->getUID(), $this->gid);\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\t\tif ($result) {\n\t\t\tif ($this->emitter) {\n\t\t\t\t$this->emitter->emit('\\OC\\Group', 'postRemoveUser', array($this, $user));\n\t\t\t}\n\t\t\tif ($this->users) {\n\t\t\t\tforeach ($this->users as $index => $groupUser) {\n\t\t\t\t\tif ($groupUser->getUID() === $user->getUID()) {\n\t\t\t\t\t\tunset($this->users[$index]);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function deleteDomainUserAsync($user_id)\n {\n return $this->deleteDomainUserAsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function destroy($user) {\n return $this->successResponse($this->userService->deleteUser($user));\n }",
"public function destroy(User $user) { \n try { \n $user->delete(); \n return Message::success(Message::$REMOVE);\n } catch (\\Exception $exc) {\n return Message::error(Message::$ERROR);\n }\n }",
"public function removeUser(User $user)\n {\n $userElementsByEmail = ArrayHelper::index(\n $this->getUsers()->all(),\n 'email'\n );\n\n // Does the user already exist?\n if (array_key_exists($user->email, $userElementsByEmail)) {\n unset($userElementsByEmail[$user->email]);\n\n $this->getUsers()->setCachedResult(\n array_values($userElementsByEmail)\n );\n }\n\n return $this;\n }",
"public function removeUser(User $user)\n {\n if ($this->hasUser($user)) {\n $this->getUsers()->removeElement($user);\n $user->removeOrganization($this);\n }\n }",
"public function destroy(User $user)\n {\n $this->service->delete($user);\n\n return response()->json(['Given User has been deleted successfully.']);\n }",
"public function removeUser($user)\n {\n if ($user->current_workspace_id === $this->id) {\n $user->forceFill([\n 'current_workspace_id' => null,\n ])->save();\n }\n\n $this->users()->detach($user);\n }",
"public function createUserAsync($user = null)\n {\n return $this->createUserAsyncWithHttpInfo($user)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function removeUser($user)\n {\n if ($user->current_location_id === $this->id) {\n $user->forceFill([\n 'current_location_id' => null,\n ])->save();\n }\n\n $this->users()->detach($user);\n }",
"public function remove(\n UserDeleteRequest $request, \n User $user, \n StorageService $storages)\n {\n $this->users->remove($user);\n\n $storages->destroy('images', $user->id, 'profile');\n\n return $this->respondJson(['user' => $user]);\n }",
"public function deleteUser(int $userId): \\Http\\Promise\\Promise{\n //Delete a user is an admin only feature\n return $this->delete(\n $this->config->flarumUrl . self::GET_USER_PATH .'/'.$userId,\n new FlarumUser(),\n 204,\n null);\n\n }",
"public function destroy(User $user)\n {\n try {\n $user->delete();\n } catch (\\Throwable $th) {\n return response('There was an error deleting the user', Response::HTTP_BAD_REQUEST);\n }\n }",
"public function userCreateAsync($user)\n {\n return $this->userCreateAsyncWithHttpInfo($user)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }"
] | [
"0.65282863",
"0.6158539",
"0.6045518",
"0.59831315",
"0.5941668",
"0.58604103",
"0.5843558",
"0.5764741",
"0.5668083",
"0.5657488",
"0.5530051",
"0.54717034",
"0.5453865",
"0.5415018",
"0.54002035",
"0.5393228",
"0.5376198",
"0.53669685",
"0.534447",
"0.5340126",
"0.5316487",
"0.5314082",
"0.5230461",
"0.5214647",
"0.5206651",
"0.5201204",
"0.520017",
"0.5192894",
"0.5178436",
"0.51745874"
] | 0.7512789 | 0 |
Operation userRemoveAsyncWithHttpInfo Removes a user from the system. | public function userRemoveAsyncWithHttpInfo($user_id)
{
$returnType = 'string';
$request = $this->userRemoveRequest($user_id);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userRemoveWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->userRemoveRequest($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userRemoveAsync($user_id)\n {\n return $this->userRemoveAsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function deleteUserAsyncWithHttpInfo($id, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '';\n $request = $this->deleteUserRequest($id, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserAsyncWithHttpInfo($username = null)\n {\n $returnType = '';\n $request = $this->deleteUserRequest($username);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserCredentialsOidcAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserCredentialsOidcRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUserAsyncWithHttpInfo($userId)\n {\n $returnType = '\\TalonOne\\Client\\Model\\User';\n $request = $this->getUserRequest($userId);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserCredentialsEmailAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserCredentialsEmailRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserCredentialsTotpAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserCredentialsTotpRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserAttributeUserValueAsyncWithHttpInfo($user_id, $user_attribute_id)\n {\n $returnType = '';\n $request = $this->deleteUserAttributeUserValueRequest($user_id, $user_attribute_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserCredentialsLookerOpenidAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserCredentialsLookerOpenidRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserAsync($id, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n return $this->deleteUserAsyncWithHttpInfo($id, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRemove($user_id)\n {\n list($response) = $this->userRemoveWithHttpInfo($user_id);\n return $response;\n }",
"public function deleteDomainUserAsyncWithHttpInfo($user_id)\n {\n $returnType = '';\n $request = $this->deleteDomainUserRequest($user_id);\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUserMeAsyncWithHttpInfo()\n {\n $returnType = '\\Bitween\\DevTo\\Model\\User';\n $request = $this->getUserMeRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function remove(UserInterface $user);",
"public function deleteUserSessionAsyncWithHttpInfo($user_id, $session_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserSessionRequest($user_id, $session_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"function removeUser($user) {\n $this->removeValues('users', $user);\n }",
"public function deleteUserCredentialsLdapAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserCredentialsLdapRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteTelegrafsIDOwnersIDAsyncWithHttpInfo($user_id, $telegraf_id, $zap_trace_span = null)\n {\n $returnType = '';\n $request = $this->deleteTelegrafsIDOwnersIDRequest($user_id, $telegraf_id, $zap_trace_span);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function destroy($user) {\n return $this->successResponse($this->userService->deleteUser($user));\n }",
"public function remove(\n UserDeleteRequest $request, \n User $user, \n StorageService $storages)\n {\n $this->users->remove($user);\n\n $storages->destroy('images', $user->id, 'profile');\n\n return $this->respondJson(['user' => $user]);\n }",
"public function renameUserAsyncWithHttpInfo($username = null, $newname = null)\n {\n $returnType = '\\CrowdClient\\Model\\CwdUser';\n $request = $this->renameUserRequest($username, $newname);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserCredentialsSamlAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserCredentialsSamlRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function removePhoto(User $user, $request)\n\t{\n\t\t$data = [\n\t\t\t'success' => true,\n\t\t\t'result' => null,\n\t\t];\n\t\t\n\t\tif (empty($user)) {\n\t\t\t$data['success'] = false;\n\t\t\t$data['message'] = t('User not found');\n\t\t}\n\t\t\n\t\t// Check logged User\n\t\tif (auth('sanctum')->user()->id != $user->id) {\n\t\t\t$data['success'] = false;\n\t\t\t$data['message'] = t('Unauthorized action');\n\t\t}\n\t\t\n\t\tif (isDemo()) {\n\t\t\t$data['success'] = false;\n\t\t\t$data['message'] = t('demo_mode_message');\n\t\t}\n\t\t\n\t\tif (!isset($data['success']) || !$data['success']) {\n\t\t\treturn $data;\n\t\t}\n\t\t\n\t\t// Remove all the current user's photos, by removing his photos' directory.\n\t\t$destinationPath = substr($user->photo, 0, strrpos($user->photo, '/'));\n\t\tif ($this->disk->exists($destinationPath)) {\n\t\t\t$this->disk->deleteDirectory($destinationPath);\n\t\t}\n\t\t\n\t\t// Delete the photo path from DB\n\t\t$user->photo = null;\n\t\t$user->save();\n\t\t\n\t\t$data['message'] = t('Your photo or avatar has been deleted');\n\t\t$data['result'] = (new UserResource($user))->toArray($request);\n\t\t\n\t\treturn $data;\n\t}",
"public function createDomainUserAsyncWithHttpInfo($body)\n {\n $returnType = '\\WooletClient\\Model\\User';\n $request = $this->createDomainUserRequest($body);\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteUserWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->deleteUserRequest($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 204:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userCreateAsyncWithHttpInfo($user)\n {\n $returnType = 'string';\n $request = $this->userCreateRequest($user);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function actionRemove()\n {\n $requestBody = Yii::$app->request->get();\n $id = $requestBody['id'];\n $user = $requestBody['user'];\n $secret = $requestBody['secret'];\n\n if (empty($id) || empty($user) || empty($secret)) {\n return $this->throwError('missing parameter');\n }\n\n if ($secret != $this->verifySecret($id, $user)) {\n return $this->throwError('access denied');\n }\n\n $settings = $this->getSettings();\n $url = 'https://api.twitter.com/1.1/lists/members/destroy.json';\n $requestMethod = 'POST';\n $postfields = array(\n 'screen_name' => $user\n );\n $twitter = new \\TwitterAPIExchange($settings);\n if ($twitter) {\n $twitter->buildOauth($url, $requestMethod)\n ->setPostfields($postfields)\n ->performRequest();\n } else {\n return $this->throwError('internal error');\n }\n\n }",
"public function delete($userId)\r\n {\r\n $result = $this->dispatchFromArray(\r\n 'Darryldecode\\Backend\\Components\\User\\Commands\\DeleteUserCommand',\r\n array(\r\n 'id' => $userId,\r\n )\r\n );\r\n\r\n return $this->response->json(array(\r\n 'data' => null,\r\n 'message' => $result->getMessage()\r\n ), $result->getStatusCode());\r\n }"
] | [
"0.61576813",
"0.6120739",
"0.5823657",
"0.57659787",
"0.5678378",
"0.52772117",
"0.5275451",
"0.5274549",
"0.52195925",
"0.5205326",
"0.52036995",
"0.51943594",
"0.51852244",
"0.51451194",
"0.5111198",
"0.50920165",
"0.50396526",
"0.50273657",
"0.50170577",
"0.49846005",
"0.4976725",
"0.49409604",
"0.49308112",
"0.49259567",
"0.49028102",
"0.48917928",
"0.4852068",
"0.48514938",
"0.48400185",
"0.4835831"
] | 0.69514114 | 0 |
Create request for operation 'userRemove' | protected function userRemoveRequest($user_id)
{
// verify the required parameter 'user_id' is set
if ($user_id === null) {
throw new \InvalidArgumentException(
'Missing the required parameter $user_id when calling userRemove'
);
}
$resourcePath = '/api/users/{userId}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($user_id !== null) {
$resourcePath = str_replace(
'{' . 'userId' . '}',
ObjectSerializer::toPathValue($user_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json', 'text/json', 'application/xml', 'text/xml']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json', 'text/json', 'application/xml', 'text/xml'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
$httpBody = $_tempBody;
// \stdClass has no __toString(), so we should encode it manually
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($httpBody);
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValue
];
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$query = \GuzzleHttp\Psr7\build_query($queryParams);
return new Request(
'DELETE',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionRemove()\n {\n $requestBody = Yii::$app->request->get();\n $id = $requestBody['id'];\n $user = $requestBody['user'];\n $secret = $requestBody['secret'];\n\n if (empty($id) || empty($user) || empty($secret)) {\n return $this->throwError('missing parameter');\n }\n\n if ($secret != $this->verifySecret($id, $user)) {\n return $this->throwError('access denied');\n }\n\n $settings = $this->getSettings();\n $url = 'https://api.twitter.com/1.1/lists/members/destroy.json';\n $requestMethod = 'POST';\n $postfields = array(\n 'screen_name' => $user\n );\n $twitter = new \\TwitterAPIExchange($settings);\n if ($twitter) {\n $twitter->buildOauth($url, $requestMethod)\n ->setPostfields($postfields)\n ->performRequest();\n } else {\n return $this->throwError('internal error');\n }\n\n }",
"public function removeUser() {\n $userId =(int) $_POST['search'];\n $userModel = new UserModel();\n $userModel->removeUserByID($userId);\n echo View(\"delete-success\");\n }",
"public function remove(UserInterface $user);",
"function removeUser()\n\t\t{\n\n\t\t\t\t\t\t\n\t\t\t$userInfo = $this->userInfo();\n\t\t\t\n\t\t\tif (!$userInfo)\n\t\t\t{\n\t\t\t\theader(\"location:index.php\");\n\t\t\t}\n\t\t\telse \n\t\t\t{\t\n\t\t\t\t$therapist_id = (int) $this->value('id');\t\n\t\t\t\t\n\t\t\t\t$queryUpdate = \"UPDATE user SET status = 3 WHERE user_id = \". $therapist_id;\t\t\t\t\t\n\t\t\t\t$this->execute_query($queryUpdate);\t\t\n\n\t\t\t\t$sqlUpdate = \"DELETE FROM therapist_patient WHERE therapist_id = '\".$therapist_id.\"'\";\t\t\t\n\t\t\t\t$result = $this->execute_query($sqlUpdate);\t\t\t\t\n\t\t\t\t\n\t\t\t\theader(\"location:index.php?action=userListing\");\n\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}",
"public function remove_user($id = null){\n \n $removeUser = $this->User->findById($id);\n if($this->request->is('post')){\n $this->User->id = $id;\n if($this->User->saveField('active',0)){\n /* email send user activ email */\n \n $url = Router::url( array('controller'=>'users','action'=>'active_user'), true );\n $ms=$url;\n $ms=wordwrap($ms,1000);\n \n $Email = new CakeEmail();\n $Email->config('gmail');\n $Email->template('delete_account');\n $Email->viewVars(array('url' => $ms));\n $Email->emailFormat('html');\n $Email->from(array('[email protected]' => 'Tutorial Masters'));\n $Email->subject('Deleted account Tutorial Masters');\n $Email->to($removeUser['User']['email']);\n $Email->send();\n \n /* email sen duser activ email end */\n $this->redirect(array('action' => 'user_list'));\n }\n }\n $this->request->data = $removeUser; \n }",
"public function delete($user);",
"public function removeUser(){\n $req = \"DELETE FROM user WHERE id = ?\"; // Requête.\n $instance = DBconnexion::getInstance(); // Connexion à la DB.\n if($instance != null){ // Si connexion possible ....\n $instance->setQuery($req); // Préparation de la requête.\n $instance->execQuery(array($_GET[\"id\"])); // Exécution de la requête.\n }else{ // Sinon ...\n echo Controller::ERROR_DB; // Retourne erreur.\n }\n }",
"public function delete(User $user, Request $request)\n {\n //\n }",
"function rest_user_delete( \\Slim\\Http\\Request $p_request, \\Slim\\Http\\Response $p_response, array $p_args ) {\n\t$t_user_id = $p_args['id'];\n\n\t$t_data = array(\n\t\t'query' => array( 'id' => $t_user_id )\n\t);\n\n\t$t_command = new UserDeleteCommand( $t_data );\n\t$t_command->execute();\n\n\treturn $p_response->withStatus( HTTP_STATUS_NO_CONTENT );\t\n}",
"public function removeAction() {\n $this->response\n ->setHeader('Access-Control-Allow-Origin', '*')\n ->setHeader('Access-Control-Allow-Headers', 'X-Requested-With')\n ->setHeader(\"Content-Type\", 'text/plain')\n ->sendHeaders();\n $data = $this->request->getJsonRawBody( true );\n $token = $data[ 'token' ];\n $pet = (int) $data[ 'pet' ];\n $user = (int) $data[ 'user' ];\n try {\n $db = DbConnection::getConnection();\n $Token = new Token( $db );\n $validation = $Token->checkUserToken( $user, $token );\n if ( $validation !== 1 ) { \n return $this->response->setStatusCode( 403, 'Forbidden' );\n }\n $Watch = new Watch( $db );\n $db->beginTransaction();\n $delete = $Watch->deleteUserWatch( $pet, $user );\n if ( $delete !== 1 ) {\n $db->rollBack();\n return $this->response->setStatusCode( 500, 'Internal Server Error' );\n }\n $db->commit();\n return $this->response->setStatusCode( 201, 'Success' );\n } catch ( Exception $e ) {\n return $this->response->setStatusCode( 500, 'Internal Server Error' );\n }\n }",
"function api_user_del($user_to_remove) {\r\n // CURL process to call the API\r\n $curlRequest = curl_init();\r\n\r\n // Specific URL to perform this request\r\n $customURL = sprintf(\"%s/users/%s\", $GLOBALS['API_url'], $user_to_remove);\r\n\r\n // CURL options for this task\r\n curl_setopt($curlRequest, CURLOPT_URL, $customURL);\r\n curl_setopt($curlRequest, CURLOPT_HEADER, 0);\r\n curl_setopt($curlRequest, CURLOPT_USERPWD, $GLOBALS['API_user'] . \":\" . $GLOBALS['API_pass']);\r\n curl_setopt($curlRequest, CURLOPT_TIMEOUT, 30);\r\n curl_setopt($curlRequest, CURLOPT_RETURNTRANSFER, TRUE);\r\n curl_setopt($curlRequest, CURLOPT_CUSTOMREQUEST, \"DELETE\");\r\n curl_setopt($curlRequest, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n\r\n // Exec CURL request to fetch the API\r\n $return = curl_exec($curlRequest);\r\n // Finish CURL process\r\n curl_close($curlRequest);\r\n\r\n // Parse the return of CURL from XML to an Array\r\n $response = new SimpleXMLElement($return);\r\n // Return the result of the operation and exit\r\n if ($response->meta->statuscode == 100 && $response->meta->status == \"ok\") // Double check just in case...\r\n return TRUE;\r\n else\r\n return FALSE;\r\n}",
"public function delete($user)\n {\n }",
"public function deleteUserAction(): void {\n\n if ( $this->isConnected() ){\n if (isset($_POST['id'])){\n $user = new Users();\n $user->delete([\"id\"=>$_POST['id']]);\n }\n }\n }",
"public function delete(User $user);",
"public function remove(Post $user)\n {\n }",
"public function remove($username);",
"public function deleteUser(Request $request){\n\n\t \t$inputs = $request->toArray();\n\n\t \t$user = User::find($inputs['id']);\n\n\t \t$message = '';\n\t \t$class = '';\n\n\t \tif(isset($user)){\n\n\t\t \t$status = $user->delete();\t\t\t\t\t\t\t\t\t\t\t\t\t//Se elimina el usuario\n\n\t\t \t$privilegesDeleted = Privilege::where('idUser', $inputs['id'])->delete(); \t//Se eliminan los privilegios\n\n\t\t \tif($status == 1){\n\n\t\t \t\t$message = 'Usuario eliminado!';\n\t\t \t\t$class = 'bg-info';\n\n\t\t \t} else {\n\n\t\t \t\t$message = 'Error, favor de intentar mas tarde!';\n\t\t \t\t$class = 'bg-danger';\n\n\t\t \t}\n\n\t \t}\n\n\t \treturn $this->displayUsers($message, $class);\n\n\t }",
"public function eliminarUser(){\r\n //obtener el usuario a borrar\r\n $usu = User_model::getIdObj($_POST['idUser']);\r\n return $usu->eliminar();\r\n }",
"public function destroy()\n {\n $user_id=request()->post();\n $res=user::destroy($user_id);\n if($res){\n return ['code'=>1];\n }\n }",
"public function delete()\n {\n if (array_key_exists('User', $_POST)) {\n $request = new Request();\n return $this->dump($request->setMethod(cUrl::METHOD_DELETE), new JsonResponse($this->makeRequest($request, \"user/delete/{$this->getUserId($_POST['User'])}\")), 'Delete user - response');\n }\n return ($this->show(new Webpage('user/delete', [\n 'form' => [\n 'action' => \"/{$this->getFramework()->getRouter()->getUrl()}\",\n 'data' => [\n 'id' => $this->storage->get(self::SESSION_USER_ID)\n ]\n ]\n ]), 'Delete user'));\n }",
"public function friend_remove(){\n\t\tif($this->input->post()){\n\t\t\t$data = array(\n\t\t\t\t'user_id_1' => $this->input->post('user_id_1'),\n\t\t\t\t'user_id_2' => $this->input->post('user_id_2'),\n\t\t\t);\n\t\t\t\n\t\t\t$deleteFriend = $this->postPatients('deleteFriend', $data);\n\t\t\t$this->redirect(true,$this->input->post('username'));\n\t\t}else{\n\t\t\t$this->denyAccess();\n\t\t}\n\t}",
"abstract public function deleteUser();",
"public function testHandleRemoveNoUser()\n {\n $this->withSession($this->adminSession)\n ->call('POST', '/user/remove', ['ID' => 2]);\n \n $this->assertResponseStatus(404);\n }",
"public function removeUser(Request $request)\n {\n $data = $request->only('campaignId', 'userId');\n $campaign = $this->campaignRepository->findOrFail($data['campaignId']);\n\n return $this->doAction(function () use ($data, $campaign) {\n $this->authorize('manage', $campaign);\n $this->campaignRepository->removeUser($campaign, $data['userId']);\n });\n }",
"function removeUser($user) {\n $this->removeValues('users', $user);\n }",
"function delete_user(){\n }",
"public function remove()\n {\n //If you want, you can remove user table manually.\n }",
"private function deleteUser(){\n\t\t\tif($this->get_request_method() != \"DELETE\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$id = (int)$this->_request['id'];\n\t\t\tif($id > 0){\n\t\t\t\tmysql_query(\"DELETE FROM users WHERE user_id = $id\");\n\t\t\t\t$success = array('status' => \"Success\", \"msg\" => \"Successfully one record deleted.\");\n\t\t\t\t$this->response($this->json($success),200);\n\t\t\t}else\n\t\t\t\t$this->response('',204);\t// If no records \"No Content\" status\n\t\t}",
"public function deleteUserAction($userId)\r\n {\r\n \r\n }",
"function deleteUser() { \r\n }"
] | [
"0.693736",
"0.6589677",
"0.64997554",
"0.6423543",
"0.64224803",
"0.6344109",
"0.6336722",
"0.6315374",
"0.6286809",
"0.6254184",
"0.623417",
"0.62295336",
"0.6226401",
"0.6218965",
"0.6169055",
"0.61486244",
"0.61288977",
"0.61248076",
"0.6119223",
"0.61168295",
"0.61076736",
"0.60980123",
"0.6063527",
"0.6053569",
"0.6050816",
"0.60189915",
"0.6014478",
"0.6009362",
"0.59922916",
"0.59811383"
] | 0.6845127 | 1 |
Operation userRolesWithHttpInfo Get a user roles. | public function userRolesWithHttpInfo($user_id, $virtual_operator)
{
$returnType = '\Swagger\Client\Model\UserRolesOutputDto';
$request = $this->userRolesRequest($user_id, $virtual_operator);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\UserRolesOutputDto',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userRoles_0WithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserRolesOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function roleSkillv1rolesWithHttpInfo($role_title = null, $role_description = null, $sort_attr = null, $sort_dir = null, $page = null, $page_size = null, $lang = null, $role_status = null, $get_total_count = null, $role_id = null, $skill_id = null, $user_id = null, $branch_id = null, $exclude_role = null, $has_users = null, $has_not_skill = null, $filters = null, $search_text = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // query params\n if (is_array($role_title)) {\n $role_title = $this->apiClient->getSerializer()->serializeCollection($role_title, 'brackets', true);\n }\n if ($role_title !== null) {\n $queryParams['role_title'] = $this->apiClient->getSerializer()->toQueryValue($role_title);\n }\n // query params\n if (is_array($role_description)) {\n $role_description = $this->apiClient->getSerializer()->serializeCollection($role_description, 'brackets', true);\n }\n if ($role_description !== null) {\n $queryParams['role_description'] = $this->apiClient->getSerializer()->toQueryValue($role_description);\n }\n // query params\n if ($sort_attr !== null) {\n $queryParams['sort_attr'] = $this->apiClient->getSerializer()->toQueryValue($sort_attr);\n }\n // query params\n if ($sort_dir !== null) {\n $queryParams['sort_dir'] = $this->apiClient->getSerializer()->toQueryValue($sort_dir);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = $this->apiClient->getSerializer()->toQueryValue($page);\n }\n // query params\n if ($page_size !== null) {\n $queryParams['page_size'] = $this->apiClient->getSerializer()->toQueryValue($page_size);\n }\n // query params\n if ($lang !== null) {\n $queryParams['lang'] = $this->apiClient->getSerializer()->toQueryValue($lang);\n }\n // query params\n if (is_array($role_status)) {\n $role_status = $this->apiClient->getSerializer()->serializeCollection($role_status, 'brackets', true);\n }\n if ($role_status !== null) {\n $queryParams['role_status'] = $this->apiClient->getSerializer()->toQueryValue($role_status);\n }\n // query params\n if ($get_total_count !== null) {\n $queryParams['get_total_count'] = $this->apiClient->getSerializer()->toQueryValue($get_total_count);\n }\n // query params\n if (is_array($role_id)) {\n $role_id = $this->apiClient->getSerializer()->serializeCollection($role_id, 'brackets', true);\n }\n if ($role_id !== null) {\n $queryParams['role_id'] = $this->apiClient->getSerializer()->toQueryValue($role_id);\n }\n // query params\n if (is_array($skill_id)) {\n $skill_id = $this->apiClient->getSerializer()->serializeCollection($skill_id, 'brackets', true);\n }\n if ($skill_id !== null) {\n $queryParams['skill_id'] = $this->apiClient->getSerializer()->toQueryValue($skill_id);\n }\n // query params\n if (is_array($user_id)) {\n $user_id = $this->apiClient->getSerializer()->serializeCollection($user_id, 'brackets', true);\n }\n if ($user_id !== null) {\n $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id);\n }\n // query params\n if (is_array($branch_id)) {\n $branch_id = $this->apiClient->getSerializer()->serializeCollection($branch_id, 'brackets', true);\n }\n if ($branch_id !== null) {\n $queryParams['branch_id'] = $this->apiClient->getSerializer()->toQueryValue($branch_id);\n }\n // query params\n if ($exclude_role !== null) {\n $queryParams['exclude_role'] = $this->apiClient->getSerializer()->toQueryValue($exclude_role);\n }\n // query params\n if ($has_users !== null) {\n $queryParams['has_users'] = $this->apiClient->getSerializer()->toQueryValue($has_users);\n }\n // query params\n if (is_array($has_not_skill)) {\n $has_not_skill = $this->apiClient->getSerializer()->serializeCollection($has_not_skill, 'brackets', true);\n }\n if ($has_not_skill !== null) {\n $queryParams['has_not_skill'] = $this->apiClient->getSerializer()->toQueryValue($has_not_skill);\n }\n // query params\n if ($filters !== null) {\n $queryParams['filters'] = $this->apiClient->getSerializer()->toQueryValue($filters);\n }\n // query params\n if ($search_text !== null) {\n $queryParams['search_text'] = $this->apiClient->getSerializer()->toQueryValue($search_text);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleListResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleListResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleListResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getAllRolesWithHttpInfo()\n {\n $request = $this->getAllRolesRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\TalonOne\\Client\\Model\\InlineResponse20030' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\TalonOne\\Client\\Model\\InlineResponse20030', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse20030';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\TalonOne\\Client\\Model\\InlineResponse20030',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userRolesWithHttpInfo($user_id, $fields = null, $direct_association_only = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->userRolesRequest($user_id, $fields, $direct_association_only);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Role[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userUpdateRolesWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function setUserRolesWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Role[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getRolesWithHttpInfo($account_id, $v)\n {\n // verify the required parameter 'account_id' is set\n if ($account_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $account_id when calling getRoles');\n }\n // verify the required parameter 'v' is set\n if ($v === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $v when calling getRoles');\n }\n // parse inputs\n $resourcePath = \"/accounts/{accountId}/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // query params\n if ($v !== null) {\n $queryParams['v'] = $this->apiClient->getSerializer()->toQueryValue($v);\n }\n // path params\n if ($account_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"accountId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($account_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');\n if (strlen($apiKey) !== 0) {\n $queryParams['api_key'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Yext\\Client\\Model\\RolesResponse',\n '/accounts/{accountId}/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Yext\\Client\\Model\\RolesResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\RolesResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n default:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\ErrorResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function roleSkillv1rolesroleIdusers_1WithHttpInfo($role_id, $body = null)\n {\n // verify the required parameter 'role_id' is set\n if ($role_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $role_id when calling roleSkillv1rolesroleIdusers_1');\n }\n // parse inputs\n $resourcePath = \"/skill/v1/roles/{role_id}/users\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($role_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"role_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($role_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleRemoveUserRoleResponse',\n '/skill/v1/roles/{role_id}/users'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleRemoveUserRoleResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleRemoveUserRoleResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function userRolesAsyncWithHttpInfo($user_id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRolesRequest($user_id, $virtual_operator);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRoles_0AsyncWithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function roleSkillv1rolesroleIdusers_0WithHttpInfo($role_id, $body = null)\n {\n // verify the required parameter 'role_id' is set\n if ($role_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $role_id when calling roleSkillv1rolesroleIdusers_0');\n }\n // parse inputs\n $resourcePath = \"/skill/v1/roles/{role_id}/users\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($role_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"role_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($role_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleAddUserRoleResponse',\n '/skill/v1/roles/{role_id}/users'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleAddUserRoleResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleAddUserRoleResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function roleSkillv1roles_0WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleCreateResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleCreateResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleCreateResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function roleSkillv1roles_1WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getAllRolesAsyncWithHttpInfo()\n {\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse20030';\n $request = $this->getAllRolesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function setUserRolesAsyncWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function indexSystemUsersWithHttpInfo()\n {\n $request = $this->indexSystemUsersRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\NodeumSDK\\Client\\Model\\SystemUserCollection' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\NodeumSDK\\Client\\Model\\SystemUserCollection', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\NodeumSDK\\Client\\Model\\SystemUserCollection';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\NodeumSDK\\Client\\Model\\SystemUserCollection',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getUsersRoles(GetUserId $request)\n {\n //if user_id not passed\n if (!isset($request->user_id) || empty($request->user_id)) {\n $user_id = Auth::user()->id; //set user id to current user\n } else {\n $user_id = $request->user_id;\n }\n\n $roles = Role::where('user_id',$user_id)->get();\n return response()->json([\n 'data' => $roles,\n ], 200);\n }",
"public function getUserRoles();",
"public function roleSkillv1rolesusersWithHttpInfo($assigned_to_role = null, $exclude_assigned = null, $get_total_count = null, $sort_attr = null, $sort_dir = null, $page = null, $page_size = null, $filters = null, $search_text = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles/users\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // query params\n if ($assigned_to_role !== null) {\n $queryParams['assigned_to_role'] = $this->apiClient->getSerializer()->toQueryValue($assigned_to_role);\n }\n // query params\n if ($exclude_assigned !== null) {\n $queryParams['exclude_assigned'] = $this->apiClient->getSerializer()->toQueryValue($exclude_assigned);\n }\n // query params\n if ($get_total_count !== null) {\n $queryParams['get_total_count'] = $this->apiClient->getSerializer()->toQueryValue($get_total_count);\n }\n // query params\n if ($sort_attr !== null) {\n $queryParams['sort_attr'] = $this->apiClient->getSerializer()->toQueryValue($sort_attr);\n }\n // query params\n if ($sort_dir !== null) {\n $queryParams['sort_dir'] = $this->apiClient->getSerializer()->toQueryValue($sort_dir);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = $this->apiClient->getSerializer()->toQueryValue($page);\n }\n // query params\n if ($page_size !== null) {\n $queryParams['page_size'] = $this->apiClient->getSerializer()->toQueryValue($page_size);\n }\n // query params\n if ($filters !== null) {\n $queryParams['filters'] = $this->apiClient->getSerializer()->toQueryValue($filters);\n }\n // query params\n if ($search_text !== null) {\n $queryParams['search_text'] = $this->apiClient->getSerializer()->toQueryValue($search_text);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleListUsersResponse',\n '/skill/v1/roles/users'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleListUsersResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleListUsersResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function userUpdateRolesAsyncWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRolesAsyncWithHttpInfo($user_id, $fields = null, $direct_association_only = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->userRolesRequest($user_id, $fields, $direct_association_only);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function listUserRoles() {\r\n\t\t$r = new UserRole();\r\n\t\treturn $r->getList('', 'WHERE userid = ' . $this->id);\r\n\t}",
"public function getUserRoles($user)\n {\n return $user->roles()->pluck('name')->toArray();\n }",
"public function user(Request $request) {\n\n $user = $request->user();\n $roles_user = $user->roles();\n\n return response()->json([\n \"userRoles\" => $roles_user\n ]);\n }",
"protected function userUpdateRolesRequest($user_id, $roles)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userUpdateRoles'\n );\n }\n // verify the required parameter 'roles' is set\n if ($roles === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $roles when calling userUpdateRoles'\n );\n }\n\n $resourcePath = '/api/users/{userId}/roles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($roles)) {\n $_tempBody = $roles;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['application/json', 'text/json', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function createRoleWithHttpInfo($body)\n {\n $returnType = '\\AuthressSdk\\Model\\Role';\n $request = $this->createRoleRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\AuthressSdk\\Model\\Role',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function indexSystemUsersAsyncWithHttpInfo()\n {\n $returnType = '\\NodeumSDK\\Client\\Model\\SystemUserCollection';\n $request = $this->indexSystemUsersRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public static function select(\\Scrivo\\Context $context, $user) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(null, null));\n\t\ttry {\n\t\t\tif (!$user instanceof \\Scrivo\\User) {\n\t\t\t\tthrow new \\Scrivo\\SystemException(\"Invalid argument type\");\n\t\t\t}\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"SELECT R.role_id, R.type, R.title, R.description,\n\t\t\t\t\tUR.is_publisher FROM role R, user_role UR\n\t\t\t\tWHERE R.instance_id = :instId AND UR.instance_id = :instId\n\t\t\t\t\tAND R.role_id = UR.role_id AND UR.user_id = :userId\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":userId\", $user->id, \\PDO::PARAM_INT);\n\n\t\t\t$res = array();\n\t\t\t$sth->execute();\n\n\t\t\twhile ($rd = $sth->fetch(\\PDO::FETCH_ASSOC)) {\n\n\t\t\t\t$li = new UserRole();\n\t\t\t\t$li->setFields($context, $rd);\n\t\t\t\t$li->isPublisher = $rd[\"is_publisher\"] == 1;\n\n\t\t\t\t$res[$li->id] = $li;\n\t\t\t}\n\n\t\t\treturn $res;\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}",
"public static function user_role_list_filter($roles, $user)\n {\n }",
"public static function roles() {\n\t\t$roles = AuthComponent::user(USER_ROLE_KEY);\n\t\tif (!is_array($roles)) {\n\t\t\treturn $roles;\n\t\t}\n\t\tif (isset($roles[0]['id'])) {\n\t\t\t$roles = Hash::extract($roles, '{n}.id');\n\t\t}\n\t\treturn $roles;\n\t}"
] | [
"0.6168525",
"0.5773444",
"0.55756813",
"0.5518304",
"0.5467652",
"0.54506016",
"0.54345363",
"0.5412523",
"0.5394186",
"0.5369485",
"0.5357467",
"0.5300335",
"0.5227885",
"0.51311487",
"0.5074695",
"0.50204587",
"0.49945593",
"0.49512318",
"0.4936076",
"0.49174663",
"0.49019435",
"0.4880216",
"0.48750782",
"0.48074248",
"0.47938177",
"0.47731042",
"0.47582743",
"0.47531134",
"0.4722428",
"0.4701098"
] | 0.62965554 | 0 |
Operation userRoles_0 Get a user roles. | public function userRoles_0($user_id)
{
list($response) = $this->userRoles_0WithHttpInfo($user_id);
return $response;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userRoles_0Async($user_id)\n {\n return $this->userRoles_0AsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function listUserRoles() {\r\n\t\t$r = new UserRole();\r\n\t\treturn $r->getList('', 'WHERE userid = ' . $this->id);\r\n\t}",
"public function userRoles_0WithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserRolesOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"private function get_user_roles($user_id = 0)\n {\n }",
"public static function get_user_roles() {\r\n\r\n\t\t//Get the users current users ID\r\n\t\t$var = Auth::instance()->get_user();\r\n\t\t$currentUser = $var['id'];\r\n\r\n\t\t//Get the current users role id and assign it to the $result_array[]\r\n\t\t$roles = DB::select('role_id')\r\n\t\t\t\t->from('engine_users')\r\n\t\t\t\t->where('id', '=', $currentUser)\r\n\t\t\t\t->execute()\r\n\t\t\t\t->as_array();\r\n\r\n\t\t//Return the users role\r\n\t\treturn $roles[0]['role_id'];\r\n\t}",
"public function roles(User $user): ?Roles\n {\n if ($this->session->hasValue(Roles::SESSION_KEY)) {\n return $this->session->value(Roles::SESSION_KEY);\n }\n\n $roles = $this->authorizationProvider->roles($user);\n $this->session->putValue(Roles::SESSION_KEY, $roles);\n return $roles;\n }",
"public function getUserRoles();",
"public function getUserRoles()\n {\n return $this->user_roles;\n }",
"public function getUserRoles()\n {\n return $this->userRoles;\n }",
"public function getUserRoles()\n {\n return $this->userRoles;\n }",
"public function getUserRoles($user)\n {\n return $user->roles()->pluck('name')->toArray();\n }",
"public function get_roles() {\r\n\t\treturn $this->get_from_cache('userroles', 'do_get_roles');\r\n\t}",
"function getUserRoles()\n {\n return $this->userRoles;\n }",
"public static function roles() {\n\t\t$roles = AuthComponent::user(USER_ROLE_KEY);\n\t\tif (!is_array($roles)) {\n\t\t\treturn $roles;\n\t\t}\n\t\tif (isset($roles[0]['id'])) {\n\t\t\t$roles = Hash::extract($roles, '{n}.id');\n\t\t}\n\t\treturn $roles;\n\t}",
"public function get_user_roles($id) {\n\t\t$this->db->join('roles', \"{$this->tables['roles']}.role_id = {$this->tables['user_roles']}.role_id\");\n\t\t$result = $this->db->get_where($this->tables['user_roles'], array('user_id' => $id));\n\t\treturn $result->result_array();\n\t}",
"public function getUserRoles(): ?array {\n\t\tif($user = $this->getUser()) {\n\t\t\tif(!isset($this->cachedUserRoles[$user->getUsername()]) || NULL === $this->cachedUserRoles[$user->getUsername()]) {\n\t\t\t\t$this->cachedUserRoles[$user->getUsername()] = array_map(function($r) {if($r instanceof RoleInterface){return$r->getRole();}else{return(string)$r;}}, $user->getRoles());\n\t\t\t\t$this->userRoleCache[$user->getUsername()] = [];\n\t\t\t}\n\t\t\treturn $this->cachedUserRoles[$user->getUsername()];\n\t\t}\n\t\treturn NULL;\n\t}",
"public function getUserrolesForUserByUrl($userUrl)\n {\n return $this->db->query(\n 'SELECT userroles.id, userroles.created, userroles.name '.\n 'FROM users '.\n 'LEFT JOIN users_userroles ON users_userroles.user_id = users.id '.\n 'LEFT JOIN userroles ON userroles.id = users_userroles.userrole_id '.\n 'WHERE users.url = ?',\n 's',\n $userUrl\n );\n }",
"function get_roles($user_id) {\n\n $this->load->model('users/role_model');\n $this->db->join('users_roles', 'users_roles.role_id = roles.id');\n $this->db->where('users_roles.user_id', $user_id);\n $this->db->select('roles.id', 'id');\n $this->db->select('roles.name', 'name');\n $this->db->select('roles.description', 'description');\n $roles = $this->role_model->get();\n return $roles;\n }",
"public function userRoles($user_id, $virtual_operator)\n {\n list($response) = $this->userRolesWithHttpInfo($user_id, $virtual_operator);\n return $response;\n }",
"public function getRoles() {\n\t\tif ( $this->cacheEnabled() ) {\n\t\t\tif ( is_null( $this->getCachedRoles() ) ) {\n\t\t\t\tCache::remember( 'roles.user_' . $this->id, config( 'roles.cache.expiry' ), function () {\n\t\t\t\t\treturn $this->roles()->get();\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn $this->getCachedRoles();\n\t\t} else {\n\t\t\treturn $this->roles()->get();\n\t\t}\n\t}",
"public function getUserRoles() : ?array\n {\n return $this->userRoles;\n }",
"public static function roles(ORM $user)\n\t{\n\t\t$roles = '<ul class=\"user-roles\">';\n\t\tforeach ($user->roles() as $role)\n\t\t{\n \t\t$roles .= '<li>'. Text::plain($role) . '</li>';\n\t\t}\n\t\t$roles .= '</ul>';\n\t\t\n\t\treturn $roles;\n\t}",
"public function getUserrolesForUserById($userId)\n {\n return $this->db->query(\n 'SELECT userroles.id, userroles.created, userroles.name '.\n 'FROM users_userroles '.\n 'LEFT JOIN userroles ON userroles.id = users_userroles.userrole_id '.\n 'WHERE users_userroles.user_id = ?',\n 'i',\n $userId\n );\n }",
"public static function getRoles($user)\n {\n $userInfo = self::get($user, false);\n if ($userInfo==null) {\n return array();\n }\n $list = BaseService::getList(\"SELECT role_name as `role` FROM user_to_roles WHERE user=:user ORDER BY role_name ASC;\", array(\"user\"=>$userInfo[\"ID\"]), \"role\");\n $list[] = AUTH_ROLE_USER; // the user exists, so it has the role 'user' too\n \n // remove superadmin and admin rights in case they got inside the roles somehow\n $list = array_filter($list, function ($element) {\n return $element != AUTH_ROLE_SUPERADMIN && $element != AUTH_ROLE_ADMIN;\n });\n\n // add admin and superadmin roles\n $isAdmin = $userInfo[\"is_admin\"];\n $isSuperAdmin = $userInfo[\"ID\"] == AUTH_SUPERADMIN;\n if ($isAdmin || $isSuperAdmin) {\n $list[] = AUTH_ROLE_ADMIN;\n }\n if ($isSuperAdmin) {\n $list[] = AUTH_ROLE_SUPERADMIN;\n }\n return $list;\n }",
"public function getUserRoles($userId)\n {\n $sql = '\n SELECT\n roles.role\n FROM\n users_roles\n INNER JOIN\n roles\n ON users_roles.role_id=roles.id\n WHERE\n users_roles.user_id = ?\n ';\n\n $result = $this->_db->fetchAll($sql, array((string) $userId));\n\n $roles = array();\n foreach($result as $row) {\n $roles[] = $row['role'];\n }\n\n return $roles;\n }",
"public function getRoles($user_id)\n {\n $data=User::with('roles')->where('id','=',$user_id)->get();\n return view('manytomany',compact('data'));\n }",
"public function getRolesCollection()\n {\n return $this->user_roles;\n }",
"public function getEffectiveRolesForUser($user)\n {\n if (isset($user['roles']) && is_array($user['roles'])) {\n $userRoles = $user['roles'];\n $userRoles[] = self::ROLE_EVERYONE;\n } else {\n $userRoles = [];\n }\n $userRoles[] = self::ROLE_ANONYMOUS;\n\n return $userRoles;\n }",
"public static function select(\\Scrivo\\Context $context, $user) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(null, null));\n\t\ttry {\n\t\t\tif (!$user instanceof \\Scrivo\\User) {\n\t\t\t\tthrow new \\Scrivo\\SystemException(\"Invalid argument type\");\n\t\t\t}\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"SELECT R.role_id, R.type, R.title, R.description,\n\t\t\t\t\tUR.is_publisher FROM role R, user_role UR\n\t\t\t\tWHERE R.instance_id = :instId AND UR.instance_id = :instId\n\t\t\t\t\tAND R.role_id = UR.role_id AND UR.user_id = :userId\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":userId\", $user->id, \\PDO::PARAM_INT);\n\n\t\t\t$res = array();\n\t\t\t$sth->execute();\n\n\t\t\twhile ($rd = $sth->fetch(\\PDO::FETCH_ASSOC)) {\n\n\t\t\t\t$li = new UserRole();\n\t\t\t\t$li->setFields($context, $rd);\n\t\t\t\t$li->isPublisher = $rd[\"is_publisher\"] == 1;\n\n\t\t\t\t$res[$li->id] = $li;\n\t\t\t}\n\n\t\t\treturn $res;\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}",
"public function getRoles () {\n return RoleUser::query()->where('user_id', $this->id)->get()\n ->map(function ($item, $key) {\n return Role::query()->find($item['role_id']);\n });\n }"
] | [
"0.7050543",
"0.6994304",
"0.6709777",
"0.6707039",
"0.6619353",
"0.64165175",
"0.63990223",
"0.63880295",
"0.6324083",
"0.6324083",
"0.6318057",
"0.6222805",
"0.61470264",
"0.61442673",
"0.61384004",
"0.609329",
"0.608806",
"0.60754883",
"0.60623735",
"0.60377246",
"0.59236467",
"0.5909817",
"0.5908895",
"0.59088725",
"0.5904092",
"0.5897194",
"0.58784205",
"0.5867061",
"0.5859575",
"0.5855446"
] | 0.7812065 | 0 |
Operation userRoles_0WithHttpInfo Get a user roles. | public function userRoles_0WithHttpInfo($user_id)
{
$returnType = '\Swagger\Client\Model\UserRolesOutputDto';
$request = $this->userRoles_0Request($user_id);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\UserRolesOutputDto',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userRolesWithHttpInfo($user_id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRolesRequest($user_id, $virtual_operator);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserRolesOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userRoles_0AsyncWithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRoles_0($user_id)\n {\n list($response) = $this->userRoles_0WithHttpInfo($user_id);\n return $response;\n }",
"public function roleSkillv1roles_0WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleCreateResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleCreateResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleCreateResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function userUpdateRolesWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userRolesAsyncWithHttpInfo($user_id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRolesRequest($user_id, $virtual_operator);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function roleSkillv1roles_1WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function userUpdateRolesAsyncWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRoles_0Async($user_id)\n {\n return $this->userRoles_0AsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getAllRolesAsyncWithHttpInfo()\n {\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse20030';\n $request = $this->getAllRolesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function roleSkillv1rolesroleIdusers_0WithHttpInfo($role_id, $body = null)\n {\n // verify the required parameter 'role_id' is set\n if ($role_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $role_id when calling roleSkillv1rolesroleIdusers_0');\n }\n // parse inputs\n $resourcePath = \"/skill/v1/roles/{role_id}/users\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($role_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"role_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($role_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleAddUserRoleResponse',\n '/skill/v1/roles/{role_id}/users'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleAddUserRoleResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleAddUserRoleResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getAllRolesWithHttpInfo()\n {\n $request = $this->getAllRolesRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\TalonOne\\Client\\Model\\InlineResponse20030' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\TalonOne\\Client\\Model\\InlineResponse20030', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse20030';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\TalonOne\\Client\\Model\\InlineResponse20030',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function roleSkillv1rolesroleIdusers_1WithHttpInfo($role_id, $body = null)\n {\n // verify the required parameter 'role_id' is set\n if ($role_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $role_id when calling roleSkillv1rolesroleIdusers_1');\n }\n // parse inputs\n $resourcePath = \"/skill/v1/roles/{role_id}/users\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($role_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"role_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($role_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleRemoveUserRoleResponse',\n '/skill/v1/roles/{role_id}/users'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleRemoveUserRoleResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleRemoveUserRoleResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getRolesWithHttpInfo($account_id, $v)\n {\n // verify the required parameter 'account_id' is set\n if ($account_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $account_id when calling getRoles');\n }\n // verify the required parameter 'v' is set\n if ($v === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $v when calling getRoles');\n }\n // parse inputs\n $resourcePath = \"/accounts/{accountId}/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // query params\n if ($v !== null) {\n $queryParams['v'] = $this->apiClient->getSerializer()->toQueryValue($v);\n }\n // path params\n if ($account_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"accountId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($account_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');\n if (strlen($apiKey) !== 0) {\n $queryParams['api_key'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Yext\\Client\\Model\\RolesResponse',\n '/accounts/{accountId}/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Yext\\Client\\Model\\RolesResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\RolesResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n default:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\ErrorResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function roleSkillv1roles_1($body = null)\n {\n list($response) = $this->roleSkillv1roles_1WithHttpInfo($body);\n return $response;\n }",
"public function roleSkillv1roles_0($body = null)\n {\n list($response) = $this->roleSkillv1roles_0WithHttpInfo($body);\n return $response;\n }",
"public function setUserRolesWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Role[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function setUserRolesAsyncWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function indexSystemUsersWithHttpInfo()\n {\n $request = $this->indexSystemUsersRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\NodeumSDK\\Client\\Model\\SystemUserCollection' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\NodeumSDK\\Client\\Model\\SystemUserCollection', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\NodeumSDK\\Client\\Model\\SystemUserCollection';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\NodeumSDK\\Client\\Model\\SystemUserCollection',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function indexSystemUsersAsyncWithHttpInfo()\n {\n $returnType = '\\NodeumSDK\\Client\\Model\\SystemUserCollection';\n $request = $this->indexSystemUsersRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function roleSkillv1rolesWithHttpInfo($role_title = null, $role_description = null, $sort_attr = null, $sort_dir = null, $page = null, $page_size = null, $lang = null, $role_status = null, $get_total_count = null, $role_id = null, $skill_id = null, $user_id = null, $branch_id = null, $exclude_role = null, $has_users = null, $has_not_skill = null, $filters = null, $search_text = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // query params\n if (is_array($role_title)) {\n $role_title = $this->apiClient->getSerializer()->serializeCollection($role_title, 'brackets', true);\n }\n if ($role_title !== null) {\n $queryParams['role_title'] = $this->apiClient->getSerializer()->toQueryValue($role_title);\n }\n // query params\n if (is_array($role_description)) {\n $role_description = $this->apiClient->getSerializer()->serializeCollection($role_description, 'brackets', true);\n }\n if ($role_description !== null) {\n $queryParams['role_description'] = $this->apiClient->getSerializer()->toQueryValue($role_description);\n }\n // query params\n if ($sort_attr !== null) {\n $queryParams['sort_attr'] = $this->apiClient->getSerializer()->toQueryValue($sort_attr);\n }\n // query params\n if ($sort_dir !== null) {\n $queryParams['sort_dir'] = $this->apiClient->getSerializer()->toQueryValue($sort_dir);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = $this->apiClient->getSerializer()->toQueryValue($page);\n }\n // query params\n if ($page_size !== null) {\n $queryParams['page_size'] = $this->apiClient->getSerializer()->toQueryValue($page_size);\n }\n // query params\n if ($lang !== null) {\n $queryParams['lang'] = $this->apiClient->getSerializer()->toQueryValue($lang);\n }\n // query params\n if (is_array($role_status)) {\n $role_status = $this->apiClient->getSerializer()->serializeCollection($role_status, 'brackets', true);\n }\n if ($role_status !== null) {\n $queryParams['role_status'] = $this->apiClient->getSerializer()->toQueryValue($role_status);\n }\n // query params\n if ($get_total_count !== null) {\n $queryParams['get_total_count'] = $this->apiClient->getSerializer()->toQueryValue($get_total_count);\n }\n // query params\n if (is_array($role_id)) {\n $role_id = $this->apiClient->getSerializer()->serializeCollection($role_id, 'brackets', true);\n }\n if ($role_id !== null) {\n $queryParams['role_id'] = $this->apiClient->getSerializer()->toQueryValue($role_id);\n }\n // query params\n if (is_array($skill_id)) {\n $skill_id = $this->apiClient->getSerializer()->serializeCollection($skill_id, 'brackets', true);\n }\n if ($skill_id !== null) {\n $queryParams['skill_id'] = $this->apiClient->getSerializer()->toQueryValue($skill_id);\n }\n // query params\n if (is_array($user_id)) {\n $user_id = $this->apiClient->getSerializer()->serializeCollection($user_id, 'brackets', true);\n }\n if ($user_id !== null) {\n $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id);\n }\n // query params\n if (is_array($branch_id)) {\n $branch_id = $this->apiClient->getSerializer()->serializeCollection($branch_id, 'brackets', true);\n }\n if ($branch_id !== null) {\n $queryParams['branch_id'] = $this->apiClient->getSerializer()->toQueryValue($branch_id);\n }\n // query params\n if ($exclude_role !== null) {\n $queryParams['exclude_role'] = $this->apiClient->getSerializer()->toQueryValue($exclude_role);\n }\n // query params\n if ($has_users !== null) {\n $queryParams['has_users'] = $this->apiClient->getSerializer()->toQueryValue($has_users);\n }\n // query params\n if (is_array($has_not_skill)) {\n $has_not_skill = $this->apiClient->getSerializer()->serializeCollection($has_not_skill, 'brackets', true);\n }\n if ($has_not_skill !== null) {\n $queryParams['has_not_skill'] = $this->apiClient->getSerializer()->toQueryValue($has_not_skill);\n }\n // query params\n if ($filters !== null) {\n $queryParams['filters'] = $this->apiClient->getSerializer()->toQueryValue($filters);\n }\n // query params\n if ($search_text !== null) {\n $queryParams['search_text'] = $this->apiClient->getSerializer()->toQueryValue($search_text);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleListResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleListResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleListResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function userRolesWithHttpInfo($user_id, $fields = null, $direct_association_only = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->userRolesRequest($user_id, $fields, $direct_association_only);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Role[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userRolesAsyncWithHttpInfo($user_id, $fields = null, $direct_association_only = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->userRolesRequest($user_id, $fields, $direct_association_only);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function userUpdateRolesRequest($user_id, $roles)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userUpdateRoles'\n );\n }\n // verify the required parameter 'roles' is set\n if ($roles === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $roles when calling userUpdateRoles'\n );\n }\n\n $resourcePath = '/api/users/{userId}/roles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($roles)) {\n $_tempBody = $roles;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['application/json', 'text/json', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function listUserRoles() {\r\n\t\t$r = new UserRole();\r\n\t\treturn $r->getList('', 'WHERE userid = ' . $this->id);\r\n\t}",
"public function roleSkillv1rolesroleIdusersWithHttpInfo($role_id, $fullname = null, $user_ids = null, $username = null, $page = null, $page_size = null, $get_total_count = null, $sort_attr = null, $sort_dir = null)\n {\n // verify the required parameter 'role_id' is set\n if ($role_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $role_id when calling roleSkillv1rolesroleIdusers');\n }\n // parse inputs\n $resourcePath = \"/skill/v1/roles/{role_id}/users\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // query params\n if ($fullname !== null) {\n $queryParams['fullname'] = $this->apiClient->getSerializer()->toQueryValue($fullname);\n }\n // query params\n if (is_array($user_ids)) {\n $user_ids = $this->apiClient->getSerializer()->serializeCollection($user_ids, 'brackets', true);\n }\n if ($user_ids !== null) {\n $queryParams['user_ids'] = $this->apiClient->getSerializer()->toQueryValue($user_ids);\n }\n // query params\n if ($username !== null) {\n $queryParams['username'] = $this->apiClient->getSerializer()->toQueryValue($username);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = $this->apiClient->getSerializer()->toQueryValue($page);\n }\n // query params\n if ($page_size !== null) {\n $queryParams['page_size'] = $this->apiClient->getSerializer()->toQueryValue($page_size);\n }\n // query params\n if ($get_total_count !== null) {\n $queryParams['get_total_count'] = $this->apiClient->getSerializer()->toQueryValue($get_total_count);\n }\n // query params\n if ($sort_attr !== null) {\n $queryParams['sort_attr'] = $this->apiClient->getSerializer()->toQueryValue($sort_attr);\n }\n // query params\n if ($sort_dir !== null) {\n $queryParams['sort_dir'] = $this->apiClient->getSerializer()->toQueryValue($sort_dir);\n }\n // path params\n if ($role_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"role_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($role_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleListRoleUsersResponse',\n '/skill/v1/roles/{role_id}/users'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleListRoleUsersResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleListRoleUsersResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function userRolesAsync($user_id, $virtual_operator)\n {\n return $this->userRolesAsyncWithHttpInfo($user_id, $virtual_operator)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getUserRoles();",
"protected function userRoles_0Request($user_id)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userRoles_0'\n );\n }\n\n $resourcePath = '/api/users/{userId}/roles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public static function roles() {\n\t\t$roles = AuthComponent::user(USER_ROLE_KEY);\n\t\tif (!is_array($roles)) {\n\t\t\treturn $roles;\n\t\t}\n\t\tif (isset($roles[0]['id'])) {\n\t\t\t$roles = Hash::extract($roles, '{n}.id');\n\t\t}\n\t\treturn $roles;\n\t}"
] | [
"0.6519615",
"0.6467538",
"0.6386317",
"0.6359985",
"0.63193816",
"0.61124897",
"0.6031136",
"0.60062826",
"0.5830834",
"0.58295715",
"0.58007956",
"0.57854956",
"0.57694817",
"0.5747003",
"0.5697489",
"0.56912",
"0.5652382",
"0.5644231",
"0.5562576",
"0.5478929",
"0.5477162",
"0.53731716",
"0.52777445",
"0.5250829",
"0.5228245",
"0.514572",
"0.5094999",
"0.5078157",
"0.50685155",
"0.5011224"
] | 0.73833156 | 0 |
Operation userRoles_0Async Get a user roles. | public function userRoles_0Async($user_id)
{
return $this->userRoles_0AsyncWithHttpInfo($user_id)
->then(
function ($response) {
return $response[0];
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userRoles_0($user_id)\n {\n list($response) = $this->userRoles_0WithHttpInfo($user_id);\n return $response;\n }",
"public function listUserRoles() {\r\n\t\t$r = new UserRole();\r\n\t\treturn $r->getList('', 'WHERE userid = ' . $this->id);\r\n\t}",
"public function userRolesAsync($user_id, $fields = null, $direct_association_only = null)\n {\n return $this->userRolesAsyncWithHttpInfo($user_id, $fields, $direct_association_only)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRolesAsync($user_id, $virtual_operator)\n {\n return $this->userRolesAsyncWithHttpInfo($user_id, $virtual_operator)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getUserRoles();",
"public function getAllRolesAsync()\n {\n return $this->getAllRolesAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public static function get_user_roles() {\r\n\r\n\t\t//Get the users current users ID\r\n\t\t$var = Auth::instance()->get_user();\r\n\t\t$currentUser = $var['id'];\r\n\r\n\t\t//Get the current users role id and assign it to the $result_array[]\r\n\t\t$roles = DB::select('role_id')\r\n\t\t\t\t->from('engine_users')\r\n\t\t\t\t->where('id', '=', $currentUser)\r\n\t\t\t\t->execute()\r\n\t\t\t\t->as_array();\r\n\r\n\t\t//Return the users role\r\n\t\treturn $roles[0]['role_id'];\r\n\t}",
"public function get_roles() {\r\n\t\treturn $this->get_from_cache('userroles', 'do_get_roles');\r\n\t}",
"public function userRoles_0AsyncWithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUserRoles()\n {\n return $this->user_roles;\n }",
"public function getUserRoles()\n {\n return $this->userRoles;\n }",
"public function getUserRoles()\n {\n return $this->userRoles;\n }",
"private function get_user_roles($user_id = 0)\n {\n }",
"public function getRoles() {\n\t\tif ( $this->cacheEnabled() ) {\n\t\t\tif ( is_null( $this->getCachedRoles() ) ) {\n\t\t\t\tCache::remember( 'roles.user_' . $this->id, config( 'roles.cache.expiry' ), function () {\n\t\t\t\t\treturn $this->roles()->get();\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn $this->getCachedRoles();\n\t\t} else {\n\t\t\treturn $this->roles()->get();\n\t\t}\n\t}",
"public function getUserRoles($user)\n {\n return $user->roles()->pluck('name')->toArray();\n }",
"public function getRolesCollection()\n {\n return $this->user_roles;\n }",
"public static function roles() {\n\t\t$roles = AuthComponent::user(USER_ROLE_KEY);\n\t\tif (!is_array($roles)) {\n\t\t\treturn $roles;\n\t\t}\n\t\tif (isset($roles[0]['id'])) {\n\t\t\t$roles = Hash::extract($roles, '{n}.id');\n\t\t}\n\t\treturn $roles;\n\t}",
"public function userRoles_0WithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserRolesOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getRoles () {\n return RoleUser::query()->where('user_id', $this->id)->get()\n ->map(function ($item, $key) {\n return Role::query()->find($item['role_id']);\n });\n }",
"public function getRoles()\n {\n $user = $this->user();\n if ($user)\n {\n $userRoles = $user->roles;\n if (count($userRoles))\n {\n foreach ($userRoles as $role) {\n $roles = $role->slug;\n }\n }\n }\n\n return $roles;\n }",
"function getUserRoles()\n {\n return $this->userRoles;\n }",
"public function getUserRoles() : ?array\n {\n return $this->userRoles;\n }",
"public function getRoles()\n {\n $roles = Role::all();\n\n return response()->success(compact('roles'));\n }",
"public function getRoles();",
"public function getRoles();",
"public function getRoles();",
"protected function do_get_roles($params) {\r\n\t\treturn UserRoles::get_for_user($this->id);\r\n\t}",
"public function getRoles($user_id)\n {\n $data=User::with('roles')->where('id','=',$user_id)->get();\n return view('manytomany',compact('data'));\n }",
"public function user_roles(){\n\n return view('roles.user_role_list');\n\n }",
"public function setUserRolesAsync($user_id, $body, $fields = null)\n {\n return $this->setUserRolesAsyncWithHttpInfo($user_id, $body, $fields)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }"
] | [
"0.6650905",
"0.65335065",
"0.64048743",
"0.6401989",
"0.6367903",
"0.6334433",
"0.6328233",
"0.6307793",
"0.6245341",
"0.6212422",
"0.620401",
"0.620401",
"0.61400765",
"0.6123602",
"0.60667044",
"0.60352266",
"0.6012881",
"0.60077596",
"0.59780586",
"0.59527963",
"0.58653265",
"0.58617735",
"0.58599466",
"0.58463824",
"0.58463824",
"0.58463824",
"0.5805193",
"0.57960826",
"0.579211",
"0.57819796"
] | 0.7533138 | 0 |
Operation userRoles_0AsyncWithHttpInfo Get a user roles. | public function userRoles_0AsyncWithHttpInfo($user_id)
{
$returnType = '\Swagger\Client\Model\UserRolesOutputDto';
$request = $this->userRoles_0Request($user_id);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userRoles_0WithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserRolesOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getAllRolesAsyncWithHttpInfo()\n {\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse20030';\n $request = $this->getAllRolesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRolesAsyncWithHttpInfo($user_id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRolesRequest($user_id, $virtual_operator);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRoles_0Async($user_id)\n {\n return $this->userRoles_0AsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function setUserRolesAsyncWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userUpdateRolesAsyncWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function indexSystemUsersAsyncWithHttpInfo()\n {\n $returnType = '\\NodeumSDK\\Client\\Model\\SystemUserCollection';\n $request = $this->indexSystemUsersRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRolesAsync($user_id, $virtual_operator)\n {\n return $this->userRolesAsyncWithHttpInfo($user_id, $virtual_operator)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRolesWithHttpInfo($user_id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRolesRequest($user_id, $virtual_operator);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserRolesOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userRolesAsyncWithHttpInfo($user_id, $fields = null, $direct_association_only = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->userRolesRequest($user_id, $fields, $direct_association_only);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRoles_0($user_id)\n {\n list($response) = $this->userRoles_0WithHttpInfo($user_id);\n return $response;\n }",
"public function userRolesAsync($user_id, $fields = null, $direct_association_only = null)\n {\n return $this->userRolesAsyncWithHttpInfo($user_id, $fields, $direct_association_only)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getAllRolesAsync()\n {\n return $this->getAllRolesAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function roleSkillv1roles_0WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleCreateResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleCreateResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleCreateResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function getAllRolesWithHttpInfo()\n {\n $request = $this->getAllRolesRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\TalonOne\\Client\\Model\\InlineResponse20030' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\TalonOne\\Client\\Model\\InlineResponse20030', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse20030';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\TalonOne\\Client\\Model\\InlineResponse20030',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function setUserRolesAsync($user_id, $body, $fields = null)\n {\n return $this->setUserRolesAsyncWithHttpInfo($user_id, $body, $fields)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getRolesWithHttpInfo($account_id, $v)\n {\n // verify the required parameter 'account_id' is set\n if ($account_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $account_id when calling getRoles');\n }\n // verify the required parameter 'v' is set\n if ($v === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $v when calling getRoles');\n }\n // parse inputs\n $resourcePath = \"/accounts/{accountId}/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // query params\n if ($v !== null) {\n $queryParams['v'] = $this->apiClient->getSerializer()->toQueryValue($v);\n }\n // path params\n if ($account_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"accountId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($account_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');\n if (strlen($apiKey) !== 0) {\n $queryParams['api_key'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Yext\\Client\\Model\\RolesResponse',\n '/accounts/{accountId}/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Yext\\Client\\Model\\RolesResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\RolesResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n default:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Yext\\Client\\Model\\ErrorResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function userUpdateRolesWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function roleSkillv1roles_1WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function setUserRolesWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Role[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function indexSystemUsersWithHttpInfo()\n {\n $request = $this->indexSystemUsersRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\NodeumSDK\\Client\\Model\\SystemUserCollection' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\NodeumSDK\\Client\\Model\\SystemUserCollection', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\NodeumSDK\\Client\\Model\\SystemUserCollection';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\NodeumSDK\\Client\\Model\\SystemUserCollection',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userUpdateRolesAsync($user_id, $roles)\n {\n return $this->userUpdateRolesAsyncWithHttpInfo($user_id, $roles)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function listUserRoles() {\r\n\t\t$r = new UserRole();\r\n\t\treturn $r->getList('', 'WHERE userid = ' . $this->id);\r\n\t}",
"public function getUserRoles();",
"public function roleSkillv1roles_1($body = null)\n {\n list($response) = $this->roleSkillv1roles_1WithHttpInfo($body);\n return $response;\n }",
"protected function do_get_roles($params) {\r\n\t\treturn UserRoles::get_for_user($this->id);\r\n\t}",
"public function getUsersRoles(GetUserId $request)\n {\n //if user_id not passed\n if (!isset($request->user_id) || empty($request->user_id)) {\n $user_id = Auth::user()->id; //set user id to current user\n } else {\n $user_id = $request->user_id;\n }\n\n $roles = Role::where('user_id',$user_id)->get();\n return response()->json([\n 'data' => $roles,\n ], 200);\n }",
"public static function roles() {\n\t\t$roles = AuthComponent::user(USER_ROLE_KEY);\n\t\tif (!is_array($roles)) {\n\t\t\treturn $roles;\n\t\t}\n\t\tif (isset($roles[0]['id'])) {\n\t\t\t$roles = Hash::extract($roles, '{n}.id');\n\t\t}\n\t\treturn $roles;\n\t}",
"public function roleSkillv1roles_0($body = null)\n {\n list($response) = $this->roleSkillv1roles_0WithHttpInfo($body);\n return $response;\n }",
"public function userRolesWithHttpInfo($user_id, $fields = null, $direct_association_only = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->userRolesRequest($user_id, $fields, $direct_association_only);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Role[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }"
] | [
"0.682819",
"0.6824476",
"0.6601446",
"0.65497404",
"0.62393737",
"0.6188379",
"0.61140305",
"0.5982507",
"0.5965896",
"0.5907469",
"0.5863226",
"0.57677805",
"0.5747172",
"0.56661415",
"0.5663299",
"0.5656363",
"0.56015325",
"0.5522447",
"0.5501694",
"0.5393927",
"0.5218837",
"0.52173865",
"0.51796424",
"0.5123483",
"0.5106285",
"0.5090786",
"0.5084756",
"0.5075746",
"0.50702226",
"0.5063249"
] | 0.6955711 | 0 |
Operation userSearch_0WithHttpInfo Search users using a search criterias | public function userSearch_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)
{
$returnType = '\Swagger\Client\Model\UserOutputDto[]';
$request = $this->userSearch_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\UserOutputDto[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function searchUserWithHttpInfo()\n {\n $returnType = '';\n $request = $this->searchUserRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }",
"public function searchUser()\n {\n $this->searchUserWithHttpInfo();\n }",
"public function userSearchWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto[]';\n $request = $this->userSearchRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserOutputDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userSearch_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto[]';\n $request = $this->userSearch_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userCount_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getUsersBySearchWithHttpInfo($first_name = null, $last_name = null, $email = null, $updated_after_utc = null, $skip = null, $top = null, $count_total = null)\n {\n // parse inputs\n $resourcePath = \"/Users/Search\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json'));\n\n // query params\n if ($first_name !== null) {\n $queryParams['first_name'] = $this->apiClient->getSerializer()->toQueryValue($first_name);\n }\n // query params\n if ($last_name !== null) {\n $queryParams['last_name'] = $this->apiClient->getSerializer()->toQueryValue($last_name);\n }\n // query params\n if ($email !== null) {\n $queryParams['email'] = $this->apiClient->getSerializer()->toQueryValue($email);\n }\n // query params\n if ($updated_after_utc !== null) {\n $queryParams['updated_after_utc'] = $this->apiClient->getSerializer()->toQueryValue($updated_after_utc);\n }\n // query params\n if ($skip !== null) {\n $queryParams['skip'] = $this->apiClient->getSerializer()->toQueryValue($skip);\n }\n // query params\n if ($top !== null) {\n $queryParams['top'] = $this->apiClient->getSerializer()->toQueryValue($top);\n }\n // query params\n if ($count_total !== null) {\n $queryParams['count_total'] = $this->apiClient->getSerializer()->toQueryValue($count_total);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\User[]',\n '/Users/Search'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\User[]', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\User[]', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function searchUserAsyncWithHttpInfo()\n {\n $returnType = '';\n $request = $this->searchUserRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function userSearch_0Request($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userSearch_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userSearch_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userSearch_0, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/users';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function search(UserSearch $search)\n {\n $response = $this->send(new Request('GET', self::INTERCOM_BASE_URL . '/users', $search->format()))->json();\n $users = [];\n\n foreach ($response['users'] as $userData) {\n $user = new UserObject(\n $this->accessor->getValue($userData, '[user_id]'),\n $this->accessor->getValue($userData, '[email]')\n );\n\n $users[] = $this->hydrate($user, $userData);\n }\n\n return new PaginatedResponse($users, $response['pages']['page'], $response['pages']['next'], $response['pages']['total_pages'], $response['total_count']);\n }",
"public function searchUsersWithHttpInfo($fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $id = null, $first_name = null, $last_name = null, $verified_looker_employee = null, $embed_user = null, $email = null, $is_disabled = null, $filter_or = null, $content_metadata_id = null, $group_id = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\User[]';\n $request = $this->searchUsersRequest($fields, $page, $per_page, $limit, $offset, $sorts, $id, $first_name, $last_name, $verified_looker_employee, $embed_user, $email, $is_disabled, $filter_or, $content_metadata_id, $group_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\User[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userSearchAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto[]';\n $request = $this->userSearchRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function userSearchRequest($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n // verify the required parameter 'virtual_operator' is set\n if ($virtual_operator === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $virtual_operator when calling userSearch'\n );\n }\n if (strlen($virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$virtual_operator\" when calling UserApi.userSearch, must be smaller than or equal to 60.');\n }\n\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userSearch, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userSearch, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userSearch, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/{virtualOperator}/users';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n // path params\n if ($virtual_operator !== null) {\n $resourcePath = str_replace(\n '{' . 'virtualOperator' . '}',\n ObjectSerializer::toPathValue($virtual_operator),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"function user_search( $args ){\n\n\t\t// Setup default values\n\t\t$defaults = array(\n\t\t\t'q' \t\t=> false,\n\t\t\t'count' \t=> false\n\t\t);\n\n\t\t// parse arguments\n\t\t$args = wp_parse_args( $args, $defaults );\n\n\t\t// Define endpoint\n\t\t$endpoint = \"{$this->endpoint}users/search?access_token={$this->access_token}\";\n\n\t\treturn $this->get( $endpoint, $args );\n\t}",
"public function userSearch_0($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n list($response) = $this->userSearch_0WithHttpInfo($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n return $response;\n }",
"public function userCountWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"protected function searchUsersRequest($fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $id = null, $first_name = null, $last_name = null, $verified_looker_employee = null, $embed_user = null, $email = null, $is_disabled = null, $filter_or = null, $content_metadata_id = null, $group_id = null)\n {\n\n $resourcePath = '/users/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($fields !== null) {\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page);\n }\n // query params\n if ($per_page !== null) {\n $queryParams['per_page'] = ObjectSerializer::toQueryValue($per_page);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($offset !== null) {\n $queryParams['offset'] = ObjectSerializer::toQueryValue($offset);\n }\n // query params\n if ($sorts !== null) {\n $queryParams['sorts'] = ObjectSerializer::toQueryValue($sorts);\n }\n // query params\n if ($id !== null) {\n $queryParams['id'] = ObjectSerializer::toQueryValue($id);\n }\n // query params\n if ($first_name !== null) {\n $queryParams['first_name'] = ObjectSerializer::toQueryValue($first_name);\n }\n // query params\n if ($last_name !== null) {\n $queryParams['last_name'] = ObjectSerializer::toQueryValue($last_name);\n }\n // query params\n if ($verified_looker_employee !== null) {\n $queryParams['verified_looker_employee'] = ObjectSerializer::toQueryValue($verified_looker_employee);\n }\n // query params\n if ($embed_user !== null) {\n $queryParams['embed_user'] = ObjectSerializer::toQueryValue($embed_user);\n }\n // query params\n if ($email !== null) {\n $queryParams['email'] = ObjectSerializer::toQueryValue($email);\n }\n // query params\n if ($is_disabled !== null) {\n $queryParams['is_disabled'] = ObjectSerializer::toQueryValue($is_disabled);\n }\n // query params\n if ($filter_or !== null) {\n $queryParams['filter_or'] = ObjectSerializer::toQueryValue($filter_or);\n }\n // query params\n if ($content_metadata_id !== null) {\n $queryParams['content_metadata_id'] = ObjectSerializer::toQueryValue($content_metadata_id);\n }\n // query params\n if ($group_id !== null) {\n $queryParams['group_id'] = ObjectSerializer::toQueryValue($group_id);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function search(UserSearch $search): array;",
"public function userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"function userBySearch($username, $perPage)\r\n {\r\n /**\r\n * Output::pic_s => link of image\r\n * Output::pic_m => link of image\r\n * Output::pic_b\t=> link of image\r\n * Output::username => *\r\n * Output::name => *\r\n * Output::video_cnt => numeric\r\n * Output::url => url of user \r\n * Output::follower_cnt => numeric\t\t \r\n * Output::descr => *\r\n * Output::official => yes/no\r\n */\r\n $perPage = (!empty($perPage)) ? '/perpage/' . $perPage : '';\r\n $json = $this->getDataInArray('userBySearch/text/' . $username . $perPage);\r\n foreach ($json as $objects => $single):\r\n foreach ($single as $key => $value):\r\n if (!empty($value['username'])):\r\n $Data[$key] = $value;\r\n endif;\r\n endforeach;\r\n endforeach;\r\n return $Data;\r\n }",
"public function search_users( $order, $search ) {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,1);\n $page = 0;\n $limit = 10;\n $total = $this->user->count_all_users($search);\n $get_users = $this->user->get_users($page * $limit, $limit, $order, $search);\n \n if ( $get_users ) {\n \n $data = [\n 'total' => $total,\n 'users' => $get_users\n ];\n echo json_encode($data);\n \n }\n \n }",
"static function searching_users($search){\n $user_type = Log::get_type();\n $user_id = Log::get_id();\n $datas = null;\n $response = array();\n\n if($user_type == 2)\n $datas = PDOQueries::search_users_from_TE($search,$user_id);\n else\n $datas = PDOQueries::search_users($search);\n\n foreach($datas as $user){\n User::init();\n $tmp = new UserDatas();\n ReturnDatas::format_datas($user,$tmp);\n $response[] = $tmp;\n }\n\n if(count($response) == 0)\n throw new \\PersonalizeException(3002,['search'=>$search]);\n\n return $response;\n }",
"public function searchAction() {\n\t\t$request = $this->getRequest();\n\n\t\t$userSearch = array();\n\n\n\t\t$data = $request->getQuery('data',false);\n\n\t\tif( $data ) {\n\t\t\t$data=json_decode($data, true);\n\t\t\t//var_dump($data);exit();\n\t\t\tif(!isset($data['data']['value'])) {\n\t\t\t\t$data=false;\n\t\t\t}\n\t\t}\n\n\t\tif ($data) {\n\t\t\t$user = new \\Api\\User\\User();\n\t\t\t$column = 'name';\n\t\t\t$search = array(\n\t\t\t\tarray('column' => $column, 'value' => $data['data']['value'], 'type' => 'like'),\n\t\t\t);\n\t\t\t$userSearch = $user->table(true)->search($search);\n\n\t\t}\n\t\t//sleep(5);\n\n\t\t$jsonp = new JsonModel(array(\n\t\t\t'users' => $userSearch,'data'=>$data\n\t\t));\n\t\t$callback = $request->getQuery('callback',false);\n\t\tif($callback){\n\t\t\t$jsonp->setJsonpCallback($callback);\n\t\t}\n\t\treturn $jsonp;\n\t}",
"public function search(SearchUserRequest $request)\n {\n $email = $request->email;\n $name = $request->name;\n \n\n $user = User::where('name', $name)\n ->orWhere('email', $email)\n ->get();\n \n \t\n\t return fractal()\n\t ->collection($user)\n\t ->transformWith(new UserTransformer)\n\t ->toArray();\n\n\n }",
"public function searchAction() {\r\n\r\n $this->_helper->layout->disableLayout();\r\n $this->_helper->viewRenderer->setNoRender(true);\r\n\r\n $page = $this->_getParam('page', 1);\r\n \r\n $q = $this->_getParam('term');\r\n\r\n $model = new User_Model_UserMapper();\r\n $users = $model->findUserFuzzy($page, $q, Zend_Auth::getInstance()->getIdentity()->user_login);\r\n\r\n $output = array();\r\n foreach ($users as $user) {\r\n $output[] = $user['user_login'];\r\n }\r\n echo json_encode($output);\r\n }",
"public function UserSearch(iterable $query): object\n {\n return $this->apiCall('UserSearch',$query);\n }",
"public function get_all_users_by_advance_search()\r\n {\r\n $wh = array();\r\n $SQL = 'SELECT * FROM user';\r\n if ($this->session->userdata('user_search_type') != '')\r\n $wh[] = \"is_active = '\" . $this->session->userdata('user_search_type') . \"'\";\r\n if ($this->session->userdata('user_search_from') != '')\r\n $wh[] = \" `created_at` >= '\" . date('Y-m-d', strtotime($this->session->userdata('user_search_from'))) . \"'\";\r\n if ($this->session->userdata('user_search_to') != '')\r\n $wh[] = \" `created_at` <= '\" . date('Y-m-d', strtotime($this->session->userdata('user_search_to'))) . \"'\";\r\n\r\n if (count($wh) > 0) {\r\n $WHERE = implode(' and ', $wh);\r\n return $this->datatable->LoadJson($SQL, $WHERE);\r\n } else {\r\n return $this->datatable->LoadJson($SQL);\r\n }\r\n }",
"public function test_search_user_ok() {\n $link = $this->_link.'users/search';\n $method = 'GET';\n $params = array('keyword' => 'tam');\n\n $res = $this->curl($link, $method, $params);\n $this->assertEquals(STATUS_OK, $res->meta->code);\n }",
"function byName($params = array()) {\n \n if(!isset($params['search_name'])){\n echo \"Username or partial username required\";\n die();\n }\n \n $request = 'users/keywords/' . $params['search_name'];\n $request .= $this->createURL($params, array('search_name'));\n \n $result = $this->makeRequest($request);\n \n return $result;\n \n }",
"public function searchUsersNamesWithHttpInfo($pattern, $fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $id = null, $first_name = null, $last_name = null, $verified_looker_employee = null, $email = null, $is_disabled = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\User[]';\n $request = $this->searchUsersNamesRequest($pattern, $fields, $page, $per_page, $limit, $offset, $sorts, $id, $first_name, $last_name, $verified_looker_employee, $email, $is_disabled);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\User[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function searchUser(Request $request)\n {\n $user['name']=$request->searchName;\n $user['email']=$request->searchEmail;\n $user['create_to']=$request->searchCreated_at;\n $user['create_from']=$request->searchCreated_from;\n $users = $this->userInterface->searchUser($user);\n if($users->isEmpty()){\n return redirect()->route('users.index')->with('success','Oops! Sorry, nothing was Found...');\n }\n else\n {\n return view('users.index', ['users' => $users],compact('users'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }\n }"
] | [
"0.73953277",
"0.7096713",
"0.6871068",
"0.6686154",
"0.66470915",
"0.65164894",
"0.6402569",
"0.6358784",
"0.623923",
"0.62078327",
"0.6200084",
"0.6064548",
"0.5969349",
"0.59458715",
"0.58957404",
"0.57830447",
"0.5759551",
"0.57518035",
"0.5745994",
"0.573954",
"0.5709767",
"0.5687903",
"0.56367683",
"0.56146574",
"0.56049675",
"0.5589",
"0.5542887",
"0.554008",
"0.5533406",
"0.550451"
] | 0.75957465 | 0 |
Operation userSearch_0AsyncWithHttpInfo Search users using a search criterias | public function userSearch_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)
{
$returnType = '\Swagger\Client\Model\UserOutputDto[]';
$request = $this->userSearch_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function searchUserAsyncWithHttpInfo()\n {\n $returnType = '';\n $request = $this->searchUserRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userSearchAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto[]';\n $request = $this->userSearchRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userSearch_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto[]';\n $request = $this->userSearch_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserOutputDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function searchUser()\n {\n $this->searchUserWithHttpInfo();\n }",
"public function userSearch_0Async($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n return $this->userSearch_0AsyncWithHttpInfo($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function searchUserAsync()\n {\n return $this->searchUserAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function searchUserWithHttpInfo()\n {\n $returnType = '';\n $request = $this->searchUserRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }",
"public function userCount_0AsyncWithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function searchUsersAsyncWithHttpInfo($fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $id = null, $first_name = null, $last_name = null, $verified_looker_employee = null, $embed_user = null, $email = null, $is_disabled = null, $filter_or = null, $content_metadata_id = null, $group_id = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\User[]';\n $request = $this->searchUsersRequest($fields, $page, $per_page, $limit, $offset, $sorts, $id, $first_name, $last_name, $verified_looker_employee, $embed_user, $email, $is_disabled, $filter_or, $content_metadata_id, $group_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userSearchAsync($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n return $this->userSearchAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"protected function userSearch_0Request($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userSearch_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userSearch_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userSearch_0, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/users';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function userSearchWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserOutputDto[]';\n $request = $this->userSearchRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserOutputDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getUsersBySearchWithHttpInfo($first_name = null, $last_name = null, $email = null, $updated_after_utc = null, $skip = null, $top = null, $count_total = null)\n {\n // parse inputs\n $resourcePath = \"/Users/Search\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json'));\n\n // query params\n if ($first_name !== null) {\n $queryParams['first_name'] = $this->apiClient->getSerializer()->toQueryValue($first_name);\n }\n // query params\n if ($last_name !== null) {\n $queryParams['last_name'] = $this->apiClient->getSerializer()->toQueryValue($last_name);\n }\n // query params\n if ($email !== null) {\n $queryParams['email'] = $this->apiClient->getSerializer()->toQueryValue($email);\n }\n // query params\n if ($updated_after_utc !== null) {\n $queryParams['updated_after_utc'] = $this->apiClient->getSerializer()->toQueryValue($updated_after_utc);\n }\n // query params\n if ($skip !== null) {\n $queryParams['skip'] = $this->apiClient->getSerializer()->toQueryValue($skip);\n }\n // query params\n if ($top !== null) {\n $queryParams['top'] = $this->apiClient->getSerializer()->toQueryValue($top);\n }\n // query params\n if ($count_total !== null) {\n $queryParams['count_total'] = $this->apiClient->getSerializer()->toQueryValue($count_total);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\User[]',\n '/Users/Search'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\User[]', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\User[]', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function search(UserSearch $search): array;",
"public function search(UserSearch $search)\n {\n $response = $this->send(new Request('GET', self::INTERCOM_BASE_URL . '/users', $search->format()))->json();\n $users = [];\n\n foreach ($response['users'] as $userData) {\n $user = new UserObject(\n $this->accessor->getValue($userData, '[user_id]'),\n $this->accessor->getValue($userData, '[email]')\n );\n\n $users[] = $this->hydrate($user, $userData);\n }\n\n return new PaginatedResponse($users, $response['pages']['page'], $response['pages']['next'], $response['pages']['total_pages'], $response['total_count']);\n }",
"public function searchUsersAsync($fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $id = null, $first_name = null, $last_name = null, $verified_looker_employee = null, $embed_user = null, $email = null, $is_disabled = null, $filter_or = null, $content_metadata_id = null, $group_id = null)\n {\n return $this->searchUsersAsyncWithHttpInfo($fields, $page, $per_page, $limit, $offset, $sorts, $id, $first_name, $last_name, $verified_looker_employee, $embed_user, $email, $is_disabled, $filter_or, $content_metadata_id, $group_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"protected function userSearchRequest($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n // verify the required parameter 'virtual_operator' is set\n if ($virtual_operator === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $virtual_operator when calling userSearch'\n );\n }\n if (strlen($virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$virtual_operator\" when calling UserApi.userSearch, must be smaller than or equal to 60.');\n }\n\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userSearch, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userSearch, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userSearch, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/{virtualOperator}/users';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n // path params\n if ($virtual_operator !== null) {\n $resourcePath = str_replace(\n '{' . 'virtualOperator' . '}',\n ObjectSerializer::toPathValue($virtual_operator),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"function user_search( $args ){\n\n\t\t// Setup default values\n\t\t$defaults = array(\n\t\t\t'q' \t\t=> false,\n\t\t\t'count' \t=> false\n\t\t);\n\n\t\t// parse arguments\n\t\t$args = wp_parse_args( $args, $defaults );\n\n\t\t// Define endpoint\n\t\t$endpoint = \"{$this->endpoint}users/search?access_token={$this->access_token}\";\n\n\t\treturn $this->get( $endpoint, $args );\n\t}",
"public function search(SearchUserRequest $request)\n {\n $email = $request->email;\n $name = $request->name;\n \n\n $user = User::where('name', $name)\n ->orWhere('email', $email)\n ->get();\n \n \t\n\t return fractal()\n\t ->collection($user)\n\t ->transformWith(new UserTransformer)\n\t ->toArray();\n\n\n }",
"public function userCount_0WithHttpInfo($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCount_0Request($user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userCountAsyncWithHttpInfo($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n $returnType = 'int';\n $request = $this->userCountRequest($virtual_operator, $user_search_criteria_input_dto_id, $user_search_criteria_input_dto_user_name, $user_search_criteria_input_dto_email, $user_search_criteria_input_dto_virtual_operator, $user_search_criteria_input_dto_company_id, $user_search_criteria_input_dto_offset, $user_search_criteria_input_dto_number_of_records, $user_search_criteria_input_dto_sort_field);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function searchUsersNamesAsyncWithHttpInfo($pattern, $fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $id = null, $first_name = null, $last_name = null, $verified_looker_employee = null, $email = null, $is_disabled = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\User[]';\n $request = $this->searchUsersNamesRequest($pattern, $fields, $page, $per_page, $limit, $offset, $sorts, $id, $first_name, $last_name, $verified_looker_employee, $email, $is_disabled);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function searchUsersWithHttpInfo($fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $id = null, $first_name = null, $last_name = null, $verified_looker_employee = null, $embed_user = null, $email = null, $is_disabled = null, $filter_or = null, $content_metadata_id = null, $group_id = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\User[]';\n $request = $this->searchUsersRequest($fields, $page, $per_page, $limit, $offset, $sorts, $id, $first_name, $last_name, $verified_looker_employee, $embed_user, $email, $is_disabled, $filter_or, $content_metadata_id, $group_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\User[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function UserSearch(iterable $query): object\n {\n return $this->apiCall('UserSearch',$query);\n }",
"public function searchAction() {\n\t\t$request = $this->getRequest();\n\n\t\t$userSearch = array();\n\n\n\t\t$data = $request->getQuery('data',false);\n\n\t\tif( $data ) {\n\t\t\t$data=json_decode($data, true);\n\t\t\t//var_dump($data);exit();\n\t\t\tif(!isset($data['data']['value'])) {\n\t\t\t\t$data=false;\n\t\t\t}\n\t\t}\n\n\t\tif ($data) {\n\t\t\t$user = new \\Api\\User\\User();\n\t\t\t$column = 'name';\n\t\t\t$search = array(\n\t\t\t\tarray('column' => $column, 'value' => $data['data']['value'], 'type' => 'like'),\n\t\t\t);\n\t\t\t$userSearch = $user->table(true)->search($search);\n\n\t\t}\n\t\t//sleep(5);\n\n\t\t$jsonp = new JsonModel(array(\n\t\t\t'users' => $userSearch,'data'=>$data\n\t\t));\n\t\t$callback = $request->getQuery('callback',false);\n\t\tif($callback){\n\t\t\t$jsonp->setJsonpCallback($callback);\n\t\t}\n\t\treturn $jsonp;\n\t}",
"public function searchAction() {\r\n\r\n $this->_helper->layout->disableLayout();\r\n $this->_helper->viewRenderer->setNoRender(true);\r\n\r\n $page = $this->_getParam('page', 1);\r\n \r\n $q = $this->_getParam('term');\r\n\r\n $model = new User_Model_UserMapper();\r\n $users = $model->findUserFuzzy($page, $q, Zend_Auth::getInstance()->getIdentity()->user_login);\r\n\r\n $output = array();\r\n foreach ($users as $user) {\r\n $output[] = $user['user_login'];\r\n }\r\n echo json_encode($output);\r\n }",
"public function search(SearchUsersRequest $request) {\n return Searches::searchUsers($request->get('email'));\n }",
"static function searching_users($search){\n $user_type = Log::get_type();\n $user_id = Log::get_id();\n $datas = null;\n $response = array();\n\n if($user_type == 2)\n $datas = PDOQueries::search_users_from_TE($search,$user_id);\n else\n $datas = PDOQueries::search_users($search);\n\n foreach($datas as $user){\n User::init();\n $tmp = new UserDatas();\n ReturnDatas::format_datas($user,$tmp);\n $response[] = $tmp;\n }\n\n if(count($response) == 0)\n throw new \\PersonalizeException(3002,['search'=>$search]);\n\n return $response;\n }",
"protected function searchUsersRequest($fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $id = null, $first_name = null, $last_name = null, $verified_looker_employee = null, $embed_user = null, $email = null, $is_disabled = null, $filter_or = null, $content_metadata_id = null, $group_id = null)\n {\n\n $resourcePath = '/users/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($fields !== null) {\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page);\n }\n // query params\n if ($per_page !== null) {\n $queryParams['per_page'] = ObjectSerializer::toQueryValue($per_page);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($offset !== null) {\n $queryParams['offset'] = ObjectSerializer::toQueryValue($offset);\n }\n // query params\n if ($sorts !== null) {\n $queryParams['sorts'] = ObjectSerializer::toQueryValue($sorts);\n }\n // query params\n if ($id !== null) {\n $queryParams['id'] = ObjectSerializer::toQueryValue($id);\n }\n // query params\n if ($first_name !== null) {\n $queryParams['first_name'] = ObjectSerializer::toQueryValue($first_name);\n }\n // query params\n if ($last_name !== null) {\n $queryParams['last_name'] = ObjectSerializer::toQueryValue($last_name);\n }\n // query params\n if ($verified_looker_employee !== null) {\n $queryParams['verified_looker_employee'] = ObjectSerializer::toQueryValue($verified_looker_employee);\n }\n // query params\n if ($embed_user !== null) {\n $queryParams['embed_user'] = ObjectSerializer::toQueryValue($embed_user);\n }\n // query params\n if ($email !== null) {\n $queryParams['email'] = ObjectSerializer::toQueryValue($email);\n }\n // query params\n if ($is_disabled !== null) {\n $queryParams['is_disabled'] = ObjectSerializer::toQueryValue($is_disabled);\n }\n // query params\n if ($filter_or !== null) {\n $queryParams['filter_or'] = ObjectSerializer::toQueryValue($filter_or);\n }\n // query params\n if ($content_metadata_id !== null) {\n $queryParams['content_metadata_id'] = ObjectSerializer::toQueryValue($content_metadata_id);\n }\n // query params\n if ($group_id !== null) {\n $queryParams['group_id'] = ObjectSerializer::toQueryValue($group_id);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function searchUsers(Request $request)\n {\n return User::select('id as _id', 'display_name as name', 'email', 'has_business', 'created_at as user_since', 'admin')\n ->when($request->has('keywords'), function($q) use ($request){\n return $q->where(function($q) use ($request){\n foreach($request->input('keywords') as $keyword){\n $q->orWhere('display_name', 'like', \"%$keyword%\")\n ->orWhere('email', 'like', \"%$keyword%\");\n }\n });\n })\n ->paginate(15);\n }"
] | [
"0.7383405",
"0.6792398",
"0.6785159",
"0.6749484",
"0.6703871",
"0.6699483",
"0.6601355",
"0.64172286",
"0.6271124",
"0.619604",
"0.609843",
"0.6089255",
"0.5980963",
"0.5966569",
"0.596511",
"0.58498114",
"0.57932895",
"0.57850415",
"0.5784395",
"0.57401615",
"0.57146287",
"0.56290966",
"0.5544787",
"0.55274653",
"0.5516322",
"0.55133295",
"0.55048275",
"0.54891026",
"0.5488438",
"0.54873013"
] | 0.73562443 | 1 |
Create request for operation 'userSearch_0' | protected function userSearch_0Request($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)
{
if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {
throw new \InvalidArgumentException('invalid length for "$user_search_criteria_input_dto_user_name" when calling UserApi.userSearch_0, must be smaller than or equal to 100.');
}
if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {
throw new \InvalidArgumentException('invalid length for "$user_search_criteria_input_dto_email" when calling UserApi.userSearch_0, must be smaller than or equal to 100.');
}
if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {
throw new \InvalidArgumentException('invalid length for "$user_search_criteria_input_dto_virtual_operator" when calling UserApi.userSearch_0, must be smaller than or equal to 60.');
}
$resourcePath = '/api/users';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($user_search_criteria_input_dto_id !== null) {
$queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);
}
// query params
if ($user_search_criteria_input_dto_user_name !== null) {
$queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);
}
// query params
if ($user_search_criteria_input_dto_email !== null) {
$queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);
}
// query params
if ($user_search_criteria_input_dto_virtual_operator !== null) {
$queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);
}
// query params
if ($user_search_criteria_input_dto_company_id !== null) {
$queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);
}
// query params
if ($user_search_criteria_input_dto_offset !== null) {
$queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);
}
// query params
if ($user_search_criteria_input_dto_number_of_records !== null) {
$queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);
}
// query params
if ($user_search_criteria_input_dto_sort_field !== null) {
$queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json', 'text/json', 'application/xml', 'text/xml']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json', 'text/json', 'application/xml', 'text/xml'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
$httpBody = $_tempBody;
// \stdClass has no __toString(), so we should encode it manually
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($httpBody);
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValue
];
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$query = \GuzzleHttp\Psr7\build_query($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function searchUserRequest()\n {\n\n $resourcePath = '/user/search/matrix_vars';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function userSearchRequest($virtual_operator, $user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n // verify the required parameter 'virtual_operator' is set\n if ($virtual_operator === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $virtual_operator when calling userSearch'\n );\n }\n if (strlen($virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$virtual_operator\" when calling UserApi.userSearch, must be smaller than or equal to 60.');\n }\n\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userSearch, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userSearch, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userSearch, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/{virtualOperator}/users';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n // path params\n if ($virtual_operator !== null) {\n $resourcePath = str_replace(\n '{' . 'virtualOperator' . '}',\n ObjectSerializer::toPathValue($virtual_operator),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"function user_search( $args ){\n\n\t\t// Setup default values\n\t\t$defaults = array(\n\t\t\t'q' \t\t=> false,\n\t\t\t'count' \t=> false\n\t\t);\n\n\t\t// parse arguments\n\t\t$args = wp_parse_args( $args, $defaults );\n\n\t\t// Define endpoint\n\t\t$endpoint = \"{$this->endpoint}users/search?access_token={$this->access_token}\";\n\n\t\treturn $this->get( $endpoint, $args );\n\t}",
"public function searchAction() {\n\t\t$request = $this->getRequest();\n\n\t\t$userSearch = array();\n\n\n\t\t$data = $request->getQuery('data',false);\n\n\t\tif( $data ) {\n\t\t\t$data=json_decode($data, true);\n\t\t\t//var_dump($data);exit();\n\t\t\tif(!isset($data['data']['value'])) {\n\t\t\t\t$data=false;\n\t\t\t}\n\t\t}\n\n\t\tif ($data) {\n\t\t\t$user = new \\Api\\User\\User();\n\t\t\t$column = 'name';\n\t\t\t$search = array(\n\t\t\t\tarray('column' => $column, 'value' => $data['data']['value'], 'type' => 'like'),\n\t\t\t);\n\t\t\t$userSearch = $user->table(true)->search($search);\n\n\t\t}\n\t\t//sleep(5);\n\n\t\t$jsonp = new JsonModel(array(\n\t\t\t'users' => $userSearch,'data'=>$data\n\t\t));\n\t\t$callback = $request->getQuery('callback',false);\n\t\tif($callback){\n\t\t\t$jsonp->setJsonpCallback($callback);\n\t\t}\n\t\treturn $jsonp;\n\t}",
"public function search_post() {\n\n $searchFilter = $this->post('filter');\n\n $user = $this->user_model->get(null, $searchFilter);\n\n if (!is_null($user)) {\n $this->response($user, 200);\n } else {\n $this->response(array('error' => 'NO HAY RESULTADOS'), 404);\n }\n }",
"public function search(UserSearch $search): array;",
"function byName($params = array()) {\n \n if(!isset($params['search_name'])){\n echo \"Username or partial username required\";\n die();\n }\n \n $request = 'users/keywords/' . $params['search_name'];\n $request .= $this->createURL($params, array('search_name'));\n \n $result = $this->makeRequest($request);\n \n return $result;\n \n }",
"public function createSearch($query);",
"public function UserSearch(iterable $query): object\n {\n return $this->apiCall('UserSearch',$query);\n }",
"public function searchUser()\n {\n $this->searchUserWithHttpInfo();\n }",
"public function search(SearchUserRequest $request)\n {\n $email = $request->email;\n $name = $request->name;\n \n\n $user = User::where('name', $name)\n ->orWhere('email', $email)\n ->get();\n \n \t\n\t return fractal()\n\t ->collection($user)\n\t ->transformWith(new UserTransformer)\n\t ->toArray();\n\n\n }",
"public function search(){\n\t\t\tif($this->request->is('post')){\n\t\t\t\tif($this->request->data['User']['search']!=null){\n\t\t\t\t\t$search_name=$this->request->data['User']['search'];\n\t\t\t\t\t$this->Paginator->settings = array(\n\t\t \t\t'conditions'=>array('User.name LIKE'=>'%'.$search_name.'%'),\n\t\t \t\t'order' => array('User.datetime' => 'desc'),\n\t\t \t\t'limit' => 10\n\t\t \t\t);\n\n\t\t \t\t$feed = $this->Paginator->paginate('User');\n\t\t \t\t$this->set('search_result',$feed);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\t$this->Session->setFlash(__(\"Cant make an empty search\"));\n\t\t\t\t\treturn $this->redirect(array('action'=>'search'));\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function post_search_users()\n {\n $name=rawurldecode($this->input->post('search_name'));\n //if(!$name)\n \t//$name=rawurldecode($this->input->get('search_name'));\n \t\n $this->result->json($this->_search_users($name));\n\t}",
"public function searchUser(Request $request)\n {\n $user['name']=$request->searchName;\n $user['email']=$request->searchEmail;\n $user['create_to']=$request->searchCreated_at;\n $user['create_from']=$request->searchCreated_from;\n $users = $this->userInterface->searchUser($user);\n if($users->isEmpty()){\n return redirect()->route('users.index')->with('success','Oops! Sorry, nothing was Found...');\n }\n else\n {\n return view('users.index', ['users' => $users],compact('users'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }\n }",
"public function testPostApiUserSearch()\n {\n $token = $this->getAuthToken();\n /* @var TestResponse $response */\n $r = $this->json(\n 'GET',\n '/api/user/search/admin',\n [],\n [\n 'Content-Type: application/x-www-form-urlencoded',\n 'Cache-Control: no-cache',\n 'Authorization' => 'Bearer ' . $token . '',\n ],\n 'Поиск пользователя'\n )->assertStatus(200)\n ->assertJsonStructure(['data' => ['list']]);\n }",
"function GetUserSearchAction()\n {\n return \"UserSearch\";\n }",
"protected function searchUsersRequest($fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $id = null, $first_name = null, $last_name = null, $verified_looker_employee = null, $embed_user = null, $email = null, $is_disabled = null, $filter_or = null, $content_metadata_id = null, $group_id = null)\n {\n\n $resourcePath = '/users/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($fields !== null) {\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page);\n }\n // query params\n if ($per_page !== null) {\n $queryParams['per_page'] = ObjectSerializer::toQueryValue($per_page);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($offset !== null) {\n $queryParams['offset'] = ObjectSerializer::toQueryValue($offset);\n }\n // query params\n if ($sorts !== null) {\n $queryParams['sorts'] = ObjectSerializer::toQueryValue($sorts);\n }\n // query params\n if ($id !== null) {\n $queryParams['id'] = ObjectSerializer::toQueryValue($id);\n }\n // query params\n if ($first_name !== null) {\n $queryParams['first_name'] = ObjectSerializer::toQueryValue($first_name);\n }\n // query params\n if ($last_name !== null) {\n $queryParams['last_name'] = ObjectSerializer::toQueryValue($last_name);\n }\n // query params\n if ($verified_looker_employee !== null) {\n $queryParams['verified_looker_employee'] = ObjectSerializer::toQueryValue($verified_looker_employee);\n }\n // query params\n if ($embed_user !== null) {\n $queryParams['embed_user'] = ObjectSerializer::toQueryValue($embed_user);\n }\n // query params\n if ($email !== null) {\n $queryParams['email'] = ObjectSerializer::toQueryValue($email);\n }\n // query params\n if ($is_disabled !== null) {\n $queryParams['is_disabled'] = ObjectSerializer::toQueryValue($is_disabled);\n }\n // query params\n if ($filter_or !== null) {\n $queryParams['filter_or'] = ObjectSerializer::toQueryValue($filter_or);\n }\n // query params\n if ($content_metadata_id !== null) {\n $queryParams['content_metadata_id'] = ObjectSerializer::toQueryValue($content_metadata_id);\n }\n // query params\n if ($group_id !== null) {\n $queryParams['group_id'] = ObjectSerializer::toQueryValue($group_id);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function executeSearchFieldResult($request)\n {\n \t$this->userType =$this->getUser()->getAttribute(\"credential\");\n \t$this->userName = $this->getUser()->getAttribute('name'); \n \t\n \t$isbn10 = $request->getParameter('isbn10');\n \t$category = $request->getParameter('category');\n $course = $request->getParameter('course');\n \t$title = $request->getParameter('title');\n \t$author = $request->getParameter('title');\n \t\n \t$this->query = array('isbn10'=>$isbn10,'author'=>$author,'title'=>$title,'category'=>$category,'course'=>$course);\n }",
"public function search()\n {\n $user_table = new TblUsers();\n $query = $user_table->search_user($this->input->get('search_bar'), $this->input->get('choice'));\n\n $this->template->content->user = $query;\n }",
"public function search($request, $response);",
"protected function userCount_0Request($user_search_criteria_input_dto_id = null, $user_search_criteria_input_dto_user_name = null, $user_search_criteria_input_dto_email = null, $user_search_criteria_input_dto_virtual_operator = null, $user_search_criteria_input_dto_company_id = null, $user_search_criteria_input_dto_offset = null, $user_search_criteria_input_dto_number_of_records = null, $user_search_criteria_input_dto_sort_field = null)\n {\n if ($user_search_criteria_input_dto_user_name !== null && strlen($user_search_criteria_input_dto_user_name) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_user_name\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_email !== null && strlen($user_search_criteria_input_dto_email) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_email\" when calling UserApi.userCount_0, must be smaller than or equal to 100.');\n }\n\n if ($user_search_criteria_input_dto_virtual_operator !== null && strlen($user_search_criteria_input_dto_virtual_operator) > 60) {\n throw new \\InvalidArgumentException('invalid length for \"$user_search_criteria_input_dto_virtual_operator\" when calling UserApi.userCount_0, must be smaller than or equal to 60.');\n }\n\n\n $resourcePath = '/api/users/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($user_search_criteria_input_dto_id !== null) {\n $queryParams['userSearchCriteriaInputDto.id'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_id);\n }\n // query params\n if ($user_search_criteria_input_dto_user_name !== null) {\n $queryParams['userSearchCriteriaInputDto.userName'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_user_name);\n }\n // query params\n if ($user_search_criteria_input_dto_email !== null) {\n $queryParams['userSearchCriteriaInputDto.email'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_email);\n }\n // query params\n if ($user_search_criteria_input_dto_virtual_operator !== null) {\n $queryParams['userSearchCriteriaInputDto.virtualOperator'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_virtual_operator);\n }\n // query params\n if ($user_search_criteria_input_dto_company_id !== null) {\n $queryParams['userSearchCriteriaInputDto.companyId'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_company_id);\n }\n // query params\n if ($user_search_criteria_input_dto_offset !== null) {\n $queryParams['userSearchCriteriaInputDto.offset'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_offset);\n }\n // query params\n if ($user_search_criteria_input_dto_number_of_records !== null) {\n $queryParams['userSearchCriteriaInputDto.numberOfRecords'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_number_of_records);\n }\n // query params\n if ($user_search_criteria_input_dto_sort_field !== null) {\n $queryParams['userSearchCriteriaInputDto.sortField'] = ObjectSerializer::toQueryValue($user_search_criteria_input_dto_sort_field);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function searchUsers(Request $request)\n {\n return User::select('id as _id', 'display_name as name', 'email', 'has_business', 'created_at as user_since', 'admin')\n ->when($request->has('keywords'), function($q) use ($request){\n return $q->where(function($q) use ($request){\n foreach($request->input('keywords') as $keyword){\n $q->orWhere('display_name', 'like', \"%$keyword%\")\n ->orWhere('email', 'like', \"%$keyword%\");\n }\n });\n })\n ->paginate(15);\n }",
"public function searchAction()\n {\n // $searchForm = $this->createSearchForm();\n $em = $this->getDoctrine()->getManager();\n\n $user = $this->getUser();\n $maincompany = $user->getMaincompany();\n $agency = $user->getAgency();\n if ($agency->getType() == 'MASTER') {\n $entities = $em->getRepository('NvCargaBundle:WHrec')->findBy(array('status' => 'RECIBIDO', 'maincompany' => $maincompany));\n $agencies = $em->getRepository('NvCargaBundle:Agency')->findBy(array('maincompany' => $maincompany));\n } else {\n $entities = $em->getRepository('NvCargaBundle:WHrec')->findBy(array('status' => 'RECIBIDO', 'agency' => $agency));\n $agencies = null;\n }\n $status = array();\n $estados = $em->getRepository('NvCargaBundle:Stepstatus')->findByMaincompany($maincompany);\n foreach ($estados as $estado) {\n $status[] = $estado->getName();\n }\n return array(\n 'entities' => $entities,\n 'agencies'=>$agencies,\n 'status' => $status,\n );\n }",
"public function getSearchPerson(Request $request) {\n\n $queryParams = $request->query->all();\n\n\n return $this->userSchema->userSearch($result);\n }",
"public function searchUser(Request $request) {\n try {\n $return = UserServiceProvider::getSearchUser($request->all());\n return json_encode($return);\n } catch (\\Exception $e) {\n CommonUtility::logException(__METHOD__, $e);\n return $this->responseServerError(trans('messages.error.exception'));\n }\n }",
"public function search(Request $request)\n {\n\n $phone = trim(request()->email);\n $fullName = trim(request()->name);\n $users_builder = User::where('is_deleted', false)\n ->where(function ($query) use ($phone) {\n if ($phone != null) {\n $query->where('email', 'like', '%' . $phone . '%');\n }\n })->where(function ($query) use ($fullName) {\n if ($fullName != null) {\n $query->where(DB::raw('CONCAT(first_name, \" \", last_Name)'), 'like', '%' . $fullName . '%');\n }\n });\n if ($request->per_page == \"all\") {\n $users = $users_builder->get();\n } else {\n $users = $users_builder->paginate(env('PAGE_COUNT'));\n }\n return (new UserCollection($users))->additional([\n 'errors' => null,\n ])->response()->setStatusCode(200);\n }",
"public function search($query = NULL, array $params = array(), $method = 'GET');",
"public function action_search()\n\t{\n\t\t$this->template = null;\n\t\t$this->auto_render = false;\n\t\t\n\t\tif(!isset($_GET['term']))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t$q = $_GET[\"term\"];\n\t\tif (!$q) return;\n\n\t\t$d = Database::instance('default');\n\t\t\n\t\t$sql = \"SELECT DISTINCT CONCAT(first_name, ' ', last_name) as name, email, username, id FROM users\n\t\t\tWHERE ((email LIKE '%$q%') OR (CONCAT(first_name, ' ', last_name) LIKE '%$q%') OR (username LIKE '%$q%')) AND (id <> \".$this->user->id.\" AND ID NOT IN(SELECT friend_id from friends WHERE user_id = \".$this->user->id.\")) LIMIT 20\";\n\n\t\t\n\t\t$users = $d->query(Database::SELECT, $sql);\n\t\t\n\t\t\n\t\t//create arrays, so we can then make json\t\t\n\t\t$return_array = array();\n\t\tforeach($users as $user)\n\t\t{\n\t\t\tif($this->user->id == $user['id'])\n\t\t\t{\n\t\t\t\tcontinue; //don't show them, themself\n\t\t\t}\n\t\t\t$row_array = array();\n\t\t\t$row_array['label'] = $user['name'] . ' ('. $user['email'].')';\n\t\t\t$row_array['value'] = $user['id'];\n\t\t\tarray_push($return_array, $row_array); \n\t\t}\n\t\t\n\t\techo json_encode($return_array);\n\t}",
"public function search(Request $request) {\n $constraints = [\n 'username' => $request['username'],\n 'firstname' => $request['firstname'],\n 'lastname' => $request['lastname'],\n 'department' => $request['department']\n ];\n\n $menus = $this->doSearchingQuery($constraints);\n return view('users-mgmt/index', ['users' => $menus, 'searchingVals' => $constraints]);\n }",
"public function searchUser(Request $request){\n $search = $request->search;\n $userId = Auth::user()->id;\n $blockedList = (array) BlockedList::where('user_id', $userId)->get()->pluck('contect_id');\n\n\n if ($search) {\n $new_contacts = User::where('status', 1)\n ->where('name', 'LIKE', \"%{$search}%\")\n ->orWhere('user_name', 'LIKE', \"%{$search}%\")\n ->orWhere('phone', 'LIKE', \"%{$search}%\")\n ->orWhere('email', 'LIKE', \"%{$search}%\")\n ->whereNotIn('id', [$userId])\n ->paginate(10); \n } else {\n $new_contacts = [];\n }\n\n return ContactResource::collection($new_contacts);\n }"
] | [
"0.7026889",
"0.6850648",
"0.6471694",
"0.64365315",
"0.64275813",
"0.6394212",
"0.63810873",
"0.6333568",
"0.6314053",
"0.62623626",
"0.619779",
"0.6196397",
"0.6133254",
"0.6119764",
"0.6111516",
"0.60928863",
"0.60811406",
"0.60251045",
"0.59999174",
"0.5980737",
"0.59731597",
"0.5940998",
"0.59328943",
"0.5918468",
"0.5903826",
"0.5868999",
"0.5868198",
"0.5859066",
"0.58516294",
"0.58420324"
] | 0.7294378 | 0 |
Operation userSendUserActivationToken Send user activation token | public function userSendUserActivationToken($user_id)
{
list($response) = $this->userSendUserActivationTokenWithHttpInfo($user_id);
return $response;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAndSendUserActivationToken($user)\n {\n $token = md5(str_random(40));\n\n $user->meta()->update([\n 'activation_token' => $token\n ]);\n\n $user->notify(new ActivateUserEmail($token));\n }",
"protected function userSendUserActivationTokenRequest($user_id)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userSendUserActivationToken'\n );\n }\n\n $resourcePath = '/api/users/{userId}/sendactivationtoken';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function sendActivationSms($user, $activation_code)\n {\n $smsSender= $this->addComponent(\n '\\Khelo\\SmsGateway\\Components\\SendSmsService', 'sendSmsService',\n [\n 'activeGateway' => $this->property('smsGateway'),\n 'callCodePrefix' => $this->property('intCallCodePrefix')\n ]\n );\n\n $smsSender->sendMessage($user->mobile_number, $activation_code);\n\n }",
"public function send_activation($user_id)\n {\n // To finish\n }",
"public function userSendUserActivationTokenWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->userSendUserActivationTokenRequest($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function sendActivate(Request $request){\n $user = User::where('email',$request->email)->get()->first();\n // dump($user);\n //generate new token\n $token = str_random(15);\n // dump($token);\n $update = User::where('email',$request->email)->update(['token'=>$token]);\n // dump($update);\n if($update) {\n //write code to send activation email\n //http://localhost.com/register/activate/9TT0e3YmDUV20f8\n $url = url('register/activate/'.$token);\n // dump($url);\n $data=array(\n 'link'=>$url,\n 'name' => $user->name,\n 'email'=>$request->email\n );\n Mail::to($request->email)->send(new RegisterMail($data));\n return back()->with('flash_message_success', 'Account Activation Email Sent');\n }\n }",
"public function send_register_user_token($user) {\n $message = (new Swift_Message('CarMarket | Confirm Registration'))\n ->setFrom([\n '[email protected]' => 'CarMarket No Reply Mail'])\n ->setTo([$user['email']])\n ->setBody(\n 'Confirmation link: https://car-market.live/?confirmation='.\n $user['token'].\"#confirm\");\n $this->mailer->send($message);\n }",
"public function saveActivationToken()\n {\n $this->email_verified = 0;\n $this->email_verified_at = null;\n $this->email_activation_token = static::generateActivationToken();\n $this->email_activation_token_sent_at = now();\n $this->save();\n }",
"public function sendToken();",
"public function sendActivationNotification($token);",
"public function activateUser() {\n $this->verified = true;\n $this->activation_token = null;\n $this->save();\n }",
"public function send_activation_email($user) {\n\t\t$data = array(\n\t\t\t'name'\t\t => $user->name,\n\t\t\t'email' => $user->email,\n\t\t\t'activation' => $user->getActivationCode(),\n\t\t\t'id'\t\t => $user->id,\n\t\t);\n\n\t\t\\Mail::send('emails.auth.activateuser' , $data , function($message) use ($data)\n\t\t{\n\t\t\t$message->to($data['email'] , 'Example')->subject('email signup');\n\t\t});\n\t}",
"public function generateActivationToken()\n {\n $this->activation_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public static function generateActivationToken()\n {\n return hash_hmac('sha256', Str::random(40), config('app.key'));\n }",
"public function created(User $user)\n {\n ActivationToken::generateNewFor($user);\n }",
"public function activateUser($token)\n {\n if ($user = $this->activation_repo->activateUser($token)) {\n return $this->respond([\n 'message' => 'User has been activated!'\n ]);\n }\n \n return $this->setStatusCode(404)->respondWithError('Token does not exist');\n }",
"public function activateAccount(\n $activationToken\n )\n {\n $response = $this->client()->post( $this->authBaseUri . '/v1/users/activate' ,[\n 'body' => [\n 'Token' => $activationToken,\n ]\n ]);\n \n if ($response->getStatusCode() != 204) {\n return $this->log($response, false);\n }\n\n return $this->log($response, true);\n }",
"public function activate(ConfirmationToken $token, string $userToken)\n {\n try {\n $token = $token->token($userToken);\n $user = $token->user;\n $user->is_active = true;\n $user->save();\n $token = JWTAuth::fromUser($user);\n } catch (\\Exception $exception) {\n if($exception->getMessage() !== 'Creating default object from empty value')\n {\n $this->processingError($exception);\n }\n }\n\n return (new UserResource($user))\n ->additional([\n 'success' => 'Congratulations, your account has been activated!',\n 'meta' => [\n 'token' => $token\n ]\n ]);\n }",
"public function userSendUserActivationTokenAsync($user_id)\n {\n return $this->userSendUserActivationTokenAsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function accountActivationAction(Request $request, $token)\n {\n $userManager = $this->container->get('fos_user.user_manager');\n\n $user = $userManager->findUserByConfirmationToken($token);\n\n if (null === $user)\n return $this->redirect($this->generateUrl('bag_login_web_page_not_found'));\n\n $user->setConfirmationToken(null);\n $user->setEnabled(true);\n\n $this->container->get('event_dispatcher')->dispatch(FOSUserEvents::REGISTRATION_CONFIRM, new GetResponseUserEvent($user, $request));\n\n $userManager->updateUser($user);\n\n $this->container->get('event_dispatcher')->dispatch(FOSUserEvents::REGISTRATION_CONFIRMED, new FilterUserResponseEvent($user, $request, null));\n $this->container->get('event_dispatcher')->dispatch(BagLoginEvents::USER_REGISTRATION_CONFIRMED, new UserEvent($user, true, 'web'));\n\n return $this->redirect($this->generateUrl('bag_login_web_registration_done'));\n }",
"public function sendToken(MustVerifyMobile $user): void;",
"public function activate($token)\n\t{\n\n\t\t$user = User::activation($token)->get()->first();\n\n\t\tif ($user)\n\t\t{\n\t\t\t$user->active = 1;\n\t\t\t$user->save();\n\n\t\t\t//create user profile, also in AuthController\n\t\t\tProfile::firstOrCreate([\n\t\t\t\t'user_id' => $user->id\n\t\t\t]);\n\n\t\t\treturn redirect('/login')->withMessage(\"Account activated. Please login to continue.\");\n\n\t\t}\n\n\t\treturn \"Failed to activate account!! Please use the latest sent activation link.\";\n\n\t}",
"public function getUserActivationKey()\n {\n return $this->user_activation_key;\n }",
"public function userSendUserActivationTokenAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->userSendUserActivationTokenRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"private function __sendActivationMail($userId = null, $userData = null) {\n\t\tif(!empty($userId) && !empty($userData)) {\n\t\t\t$code = $this->Token->createActivationCode($userId);\n\t\t\t$this->Email->to = $userData['email'];\n\t\t\t$this->Email->subject = 'Massidea.org account verification';\n\t\t\t$this->Email->from = 'Massidea.org <[email protected]>';\n\t\t\t$this->Email->template = 'activate';\n\t\t\t$this->Email->sendAs = 'html';\n\t\t\t$this->set('name', $userData['username']);\n\t\t\t$this->set('link', 'activate/'.$code);\n\t\t\t\n\t\t\treturn $this->Email->send();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function setUser_activation_code($user_activation_code){\n $this->user_activation_code = $user_activation_code;\n }",
"public static function sendUserActivateMail($user)\n {\n\n $status = '';\n $link = \\Yii::$app->params['frontendURL'] . '#/activate-user?token=' . $user->password_reset_token;\n // get forgot password mail\n $verify_account_mail_template = \\app\\models\\EmailTemplates::find()->where([\n 'template_id' => 2\n ])->One();\n\n if (!empty($verify_account_mail_template)) {\n // removing place holders in mail body\n $firstName = self::getFirstName($user);\n $body = str_replace(\"<<name>>\", $firstName, $verify_account_mail_template->body);\n $response = self::replaceDynamicVariables($body, $user);\n $body = $response['body'];\n $brand = $response['brand'];\n $body = str_replace(\"<<password_btn>>\", '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"mcnButtonBlock\" style=\"min-width:100%;\">\n\t\t\t <tbody class=\"mcnButtonBlockOuter\">\n\t\t\t <tr>\n\t\t\t <td style=\"padding-top:0; padding-right:18px; padding-bottom:18px; padding-left:18px;\" valign=\"top\" align=\"center\" class=\"mcnButtonBlockInner\">\n\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"mcnButtonContentContainer\" style=\"border-collapse: separate !important;border-radius: 3px;background-color: #0076BC;\">\n\t\t\t <tbody>\n\t\t\t <tr>\n\t\t\t <td align=\"center\" valign=\"middle\" class=\"mcnButtonContent\" style=\"font-family: Arial; font-size: 16px; padding: 15px;\">\n\t\t\t <a class=\"mcnButton \" title=\"Verify Your Email\" href=\"' . $link . '\" target=\"_blank\" style=\"font-weight: bold;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;\">Verify Your Email</a>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t </tbody>\n\t\t\t </table>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t </tbody>\n\t\t\t</table>', $body);\n $status = ResourceComponent::sendMail($brand['support_email'], $user->username, $verify_account_mail_template->subject, $body);\n }\n return $status;\n }",
"public function activateAccount()\n {\n $this->set('activationCode', $this->request->getQuery('activation_code'));\n\n if ($this->request->is(['patch', 'post', 'put'])) {\n $token = $this->request->getData('activation_code');\n $result = $this->Users->find('activationCode', ['activation_code' => $token]);\n if ($result->count() == 0) {\n $this->Flash->error(__('Account activation failed. Code not recognised.'));\n return;\n }\n\n /** @var User $user */\n $user = $result->first();\n $this->Users->patchEntity(\n $user,\n [\n 'activation_date' => Time::now(),\n 'is_active' => true\n ],\n ['guard' => false]\n );\n $user->activation_code = null;\n\n if ($this->Users->save($user)) {\n $email = new Email();\n $email\n ->setTo($user->email_address, $user->full_name)\n ->setSubject('Account Activated')\n ->setViewVars(['user' => $user])\n ->setTemplate('activated')\n ->send();\n\n $this->Flash->success(__('Account was successfully activated!'));\n return $this->redirect(Router::url(['_name' => 'login']));\n } else {\n $this->log($user->getErrors());\n $this->Flash->error(__('Account activation failed. A server error occurred.'));\n }\n }\n }",
"public function sendActivationEmail(): void\n {\n $url = 'http://' . $_SERVER['HTTP_HOST']. '/'.Config::APP_NAME. '/accounts/activated/' . $this->activation_token;\n\n $text = View::getTemplate('Accounts/activation_email.txt.twig', ['url' => $url]);\n $html = View::getTemplate('Accounts/activation_email.html.twig', ['url' => $url]);\n\n Mail::send($this->email, 'Account activation', $text, $html);\n }",
"public function sendActivationNotification(User $user)\r\n {\r\n if ($user->getIsActive()) {\r\n $this->deactivateAccount($user);\r\n }\r\n\r\n $notification = array(\r\n 'title' => 'Activate your account',\r\n 'message' => 'Welcome. Activate your account.',\r\n 'link' => array(\r\n 'href' => $this->url->generate(\r\n 'help/reset',\r\n array('token' => $user->getResetToken())\r\n ),\r\n 'text' => 'Reset your password'\r\n )\r\n );\r\n\r\n $this->mailer->sendNotificationEmail($user->getEmail(), $notification);\r\n }"
] | [
"0.7098162",
"0.6994711",
"0.6549906",
"0.6515658",
"0.6485403",
"0.6403142",
"0.62080735",
"0.6155657",
"0.6116523",
"0.61114424",
"0.60154366",
"0.59950155",
"0.58973193",
"0.58806556",
"0.5854224",
"0.58435655",
"0.5806956",
"0.58014935",
"0.5741328",
"0.57401866",
"0.5739495",
"0.5692087",
"0.56846535",
"0.5683527",
"0.56640935",
"0.5663401",
"0.56456697",
"0.5632313",
"0.5631584",
"0.5615853"
] | 0.7313247 | 0 |
Operation userSendUserActivationTokenWithHttpInfo Send user activation token | public function userSendUserActivationTokenWithHttpInfo($user_id)
{
$returnType = 'string';
$request = $this->userSendUserActivationTokenRequest($user_id);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'string',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userSendUserActivationToken($user_id)\n {\n list($response) = $this->userSendUserActivationTokenWithHttpInfo($user_id);\n return $response;\n }",
"protected function userSendUserActivationTokenRequest($user_id)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userSendUserActivationToken'\n );\n }\n\n $resourcePath = '/api/users/{userId}/sendactivationtoken';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function userSendUserActivationTokenAsyncWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->userSendUserActivationTokenRequest($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function sendActivationSms($user, $activation_code)\n {\n $smsSender= $this->addComponent(\n '\\Khelo\\SmsGateway\\Components\\SendSmsService', 'sendSmsService',\n [\n 'activeGateway' => $this->property('smsGateway'),\n 'callCodePrefix' => $this->property('intCallCodePrefix')\n ]\n );\n\n $smsSender->sendMessage($user->mobile_number, $activation_code);\n\n }",
"public function setAndSendUserActivationToken($user)\n {\n $token = md5(str_random(40));\n\n $user->meta()->update([\n 'activation_token' => $token\n ]);\n\n $user->notify(new ActivateUserEmail($token));\n }",
"public function send_activation_email($user) {\n\t\t$data = array(\n\t\t\t'name'\t\t => $user->name,\n\t\t\t'email' => $user->email,\n\t\t\t'activation' => $user->getActivationCode(),\n\t\t\t'id'\t\t => $user->id,\n\t\t);\n\n\t\t\\Mail::send('emails.auth.activateuser' , $data , function($message) use ($data)\n\t\t{\n\t\t\t$message->to($data['email'] , 'Example')->subject('email signup');\n\t\t});\n\t}",
"public function userSendUserActivationTokenAsync($user_id)\n {\n return $this->userSendUserActivationTokenAsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function send_activation($user_id)\n {\n // To finish\n }",
"public function sendActivate(Request $request){\n $user = User::where('email',$request->email)->get()->first();\n // dump($user);\n //generate new token\n $token = str_random(15);\n // dump($token);\n $update = User::where('email',$request->email)->update(['token'=>$token]);\n // dump($update);\n if($update) {\n //write code to send activation email\n //http://localhost.com/register/activate/9TT0e3YmDUV20f8\n $url = url('register/activate/'.$token);\n // dump($url);\n $data=array(\n 'link'=>$url,\n 'name' => $user->name,\n 'email'=>$request->email\n );\n Mail::to($request->email)->send(new RegisterMail($data));\n return back()->with('flash_message_success', 'Account Activation Email Sent');\n }\n }",
"public function activateAccount(\n $activationToken\n )\n {\n $response = $this->client()->post( $this->authBaseUri . '/v1/users/activate' ,[\n 'body' => [\n 'Token' => $activationToken,\n ]\n ]);\n \n if ($response->getStatusCode() != 204) {\n return $this->log($response, false);\n }\n\n return $this->log($response, true);\n }",
"private function __sendActivationMail($userId = null, $userData = null) {\n\t\tif(!empty($userId) && !empty($userData)) {\n\t\t\t$code = $this->Token->createActivationCode($userId);\n\t\t\t$this->Email->to = $userData['email'];\n\t\t\t$this->Email->subject = 'Massidea.org account verification';\n\t\t\t$this->Email->from = 'Massidea.org <[email protected]>';\n\t\t\t$this->Email->template = 'activate';\n\t\t\t$this->Email->sendAs = 'html';\n\t\t\t$this->set('name', $userData['username']);\n\t\t\t$this->set('link', 'activate/'.$code);\n\t\t\t\n\t\t\treturn $this->Email->send();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function sendActivationNotification(User $user)\r\n {\r\n if ($user->getIsActive()) {\r\n $this->deactivateAccount($user);\r\n }\r\n\r\n $notification = array(\r\n 'title' => 'Activate your account',\r\n 'message' => 'Welcome. Activate your account.',\r\n 'link' => array(\r\n 'href' => $this->url->generate(\r\n 'help/reset',\r\n array('token' => $user->getResetToken())\r\n ),\r\n 'text' => 'Reset your password'\r\n )\r\n );\r\n\r\n $this->mailer->sendNotificationEmail($user->getEmail(), $notification);\r\n }",
"public function created(User $user)\n {\n ActivationToken::generateNewFor($user);\n }",
"protected function sendActivationEmail($user)\n {\n $code = implode('!', [$user->id, $user->getActivationCode()]);\n\n $link = $this->makeActivationUrl($code);\n\n $data = [\n 'name' => $user->name,\n 'link' => $link,\n 'code' => $code\n ];\n\n Mail::send('rainlab.user::mail.activate', $data, function($message) use ($user) {\n $message->to($user->email, $user->name);\n });\n }",
"public static function generateActivationToken()\n {\n return hash_hmac('sha256', Str::random(40), config('app.key'));\n }",
"public function getUserActivationKey()\n {\n return $this->user_activation_key;\n }",
"public function activateAccount()\n {\n $this->set('activationCode', $this->request->getQuery('activation_code'));\n\n if ($this->request->is(['patch', 'post', 'put'])) {\n $token = $this->request->getData('activation_code');\n $result = $this->Users->find('activationCode', ['activation_code' => $token]);\n if ($result->count() == 0) {\n $this->Flash->error(__('Account activation failed. Code not recognised.'));\n return;\n }\n\n /** @var User $user */\n $user = $result->first();\n $this->Users->patchEntity(\n $user,\n [\n 'activation_date' => Time::now(),\n 'is_active' => true\n ],\n ['guard' => false]\n );\n $user->activation_code = null;\n\n if ($this->Users->save($user)) {\n $email = new Email();\n $email\n ->setTo($user->email_address, $user->full_name)\n ->setSubject('Account Activated')\n ->setViewVars(['user' => $user])\n ->setTemplate('activated')\n ->send();\n\n $this->Flash->success(__('Account was successfully activated!'));\n return $this->redirect(Router::url(['_name' => 'login']));\n } else {\n $this->log($user->getErrors());\n $this->Flash->error(__('Account activation failed. A server error occurred.'));\n }\n }\n }",
"public function activate(ConfirmationToken $token, string $userToken)\n {\n try {\n $token = $token->token($userToken);\n $user = $token->user;\n $user->is_active = true;\n $user->save();\n $token = JWTAuth::fromUser($user);\n } catch (\\Exception $exception) {\n if($exception->getMessage() !== 'Creating default object from empty value')\n {\n $this->processingError($exception);\n }\n }\n\n return (new UserResource($user))\n ->additional([\n 'success' => 'Congratulations, your account has been activated!',\n 'meta' => [\n 'token' => $token\n ]\n ]);\n }",
"public function signupUserWithHttpInfo($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserSignUpResponseObject';\n $request = $this->signupUserRequest($body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserSignUpResponseObject',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function activation($userId, $dateTime = null, $custom = array())\n {\n $request = array();\n $url = $this->cbconf->getApiUrl() . \"user/\" . urlencode($userId) . \"/activation\";\n if (!empty($dateTime)) {\n $url = $this->appendTo($url, \"dateTime\", $dateTime->format(\\DateTime::ISO8601));\n }\n $url .= $this->implode_encode_assoc($custom);\n $request['url'] = $url;\n $request['method'] = CurlUtil::METHOD_GET;\n $this->queue[] = $request;\n\n if ($this->cbconf->isAutoFlush()) {\n $this->flush();\n }\n }",
"public function activateUser() {\n $this->verified = true;\n $this->activation_token = null;\n $this->save();\n }",
"public function send_register_user_token($user) {\n $message = (new Swift_Message('CarMarket | Confirm Registration'))\n ->setFrom([\n '[email protected]' => 'CarMarket No Reply Mail'])\n ->setTo([$user['email']])\n ->setBody(\n 'Confirmation link: https://car-market.live/?confirmation='.\n $user['token'].\"#confirm\");\n $this->mailer->send($message);\n }",
"private function sendActivationNotification($user_id)\n {\n $email = $this->userGateway->email($user_id);\n \n $body = \"You're bookoceancrest account has now been activated.\\n\\n\n Please login at http://www.bookoceancrest.com/login.php using your email and the password you set up.\\n\\n\n This was an automatically generated email, please do not reply.\\n\\n\n With questions about the website contact Jason Welch at [email protected]\\n\\n\";\n \n $subject = \"Ocean Crest Acount\";\n \n return mail($email, $subject, $body, 'From: [email protected]');\n }",
"public function activate() {\n\n\t\t$this->load->model('activator'); // this takes the url activation and activates the user's account\n\t\t$this->lang->load('usersignup');\n\t\t$this->load->helper('url');\n\t\t // we need this to login the user\n\n\t\t$activationKeyFromURL = $this->uri->segment(3); // this is where the key is stored user/usersignup/key\n\n\t\t// the actual activation; true if succeeds, false if it fails\n\t\tif ($this->activator->activate($activationKeyFromURL)) {\n\t\t\t\n\t\t\t$this->activator->delete();\n\t\t\t\n\t\t\t// log the user in explicitly\n\t\t\t$userEmail = $this->activator->get('email');\n\t\t\t$this->session->set_userdata('email',$userEmail);\n\n\t\t\t// set up messages to pass to response controller\n\t\t\t$title = $this->lang->line('activationTitle');\n\t\t\t$messages[] = $this->lang->line('activationSuccessful');\n\t\t\t\n\t\t\t// store messages in session\n\t\t\t$this->session->set_flashdata('signedUp',TRUE);\n\t\t\t// redirect us to the reponse\n\t\t\tredirect('/user');\n\n\t\t} else {\n\n\t\t\t// set up messages to pass to response controller\n\t\t\t$title = $this->lang->line('activationTitle');\n\t\t\t$errors[] = $this->lang->line('activationFailed');\n\t\t\t$forView = array('errors'=>$errors,'title'=>$title);\n\n\t\t\t// store messages in session\n\t\t\t$this->session->set_userdata('forView',$forView);\n\n\t\t\t// redirect us to the reponse\n\t\t\tredirect('response/fail');\n\t\t}\n\t}",
"public function setActivationInfo(&$var)\n {\n GPBUtil::checkMessage($var, \\Accounts\\V1\\Blame::class);\n $this->activation_info = $var;\n }",
"function user_activation_message($username) {\r\n $query = sprintf(\"SELECT activation_hash, email FROM auth_users WHERE username = %s \",\r\n $this->quote_smart( $username ) );\r\n $result = mysql_query( $query );\r\n $user_data = mysql_fetch_assoc( $result );\r\n\r\n // send a message to the user's email account with a verification link\r\n\t\t$subject = 'Activacion de cuenta en el LIMS de Antek para ' . $username;\r\n \r\n // header of verification email\r\n $header = 'From: [email protected]' . \"\\r\\n\" .\r\n 'Reply-To: [email protected]' . \"\\r\\n\" .\r\n 'X-Mailer: PHP/' . phpversion();\r\n \r\n // verification email body\r\n $verification_message =\r\n \"{$username},\\n\\n\" .\r\n\t\t\"Por favor visite el link a continuacion para activar su cuenta.\\n\\n\" .\r\n \"http://lims.antek.ath.cx/?activation_code=\" . $user_data['activation_hash'] . \"\\n\";\r\n \r\n // send the message\r\n mail( $user_data['email'], $subject, $verification_message, $header );\r\n }",
"public function setUser_activation_code($user_activation_code){\n $this->user_activation_code = $user_activation_code;\n }",
"public static function sendUserActivateMail($user)\n {\n\n $status = '';\n $link = \\Yii::$app->params['frontendURL'] . '#/activate-user?token=' . $user->password_reset_token;\n // get forgot password mail\n $verify_account_mail_template = \\app\\models\\EmailTemplates::find()->where([\n 'template_id' => 2\n ])->One();\n\n if (!empty($verify_account_mail_template)) {\n // removing place holders in mail body\n $firstName = self::getFirstName($user);\n $body = str_replace(\"<<name>>\", $firstName, $verify_account_mail_template->body);\n $response = self::replaceDynamicVariables($body, $user);\n $body = $response['body'];\n $brand = $response['brand'];\n $body = str_replace(\"<<password_btn>>\", '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"mcnButtonBlock\" style=\"min-width:100%;\">\n\t\t\t <tbody class=\"mcnButtonBlockOuter\">\n\t\t\t <tr>\n\t\t\t <td style=\"padding-top:0; padding-right:18px; padding-bottom:18px; padding-left:18px;\" valign=\"top\" align=\"center\" class=\"mcnButtonBlockInner\">\n\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"mcnButtonContentContainer\" style=\"border-collapse: separate !important;border-radius: 3px;background-color: #0076BC;\">\n\t\t\t <tbody>\n\t\t\t <tr>\n\t\t\t <td align=\"center\" valign=\"middle\" class=\"mcnButtonContent\" style=\"font-family: Arial; font-size: 16px; padding: 15px;\">\n\t\t\t <a class=\"mcnButton \" title=\"Verify Your Email\" href=\"' . $link . '\" target=\"_blank\" style=\"font-weight: bold;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;\">Verify Your Email</a>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t </tbody>\n\t\t\t </table>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t </tbody>\n\t\t\t</table>', $body);\n $status = ResourceComponent::sendMail($brand['support_email'], $user->username, $verify_account_mail_template->subject, $body);\n }\n return $status;\n }",
"public function activateUser($token)\n {\n if ($user = $this->activation_repo->activateUser($token)) {\n return $this->respond([\n 'message' => 'User has been activated!'\n ]);\n }\n \n return $this->setStatusCode(404)->respondWithError('Token does not exist');\n }",
"public function generateActivationToken()\n {\n $this->activation_token = Yii::$app->security->generateRandomString() . '_' . time();\n }"
] | [
"0.68936944",
"0.66384596",
"0.6294654",
"0.60281885",
"0.60101724",
"0.54765725",
"0.54579395",
"0.54136467",
"0.52975684",
"0.5140656",
"0.51396084",
"0.5137369",
"0.5097812",
"0.50818986",
"0.5075368",
"0.5042838",
"0.5029629",
"0.5020952",
"0.49797535",
"0.49730963",
"0.4967872",
"0.49304944",
"0.48924014",
"0.48860544",
"0.48548964",
"0.48505533",
"0.48372212",
"0.4826587",
"0.47909284",
"0.47813693"
] | 0.7149147 | 0 |
Operation userSendUserActivationTokenAsyncWithHttpInfo Send user activation token | public function userSendUserActivationTokenAsyncWithHttpInfo($user_id)
{
$returnType = 'string';
$request = $this->userSendUserActivationTokenRequest($user_id);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userSendUserActivationTokenWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->userSendUserActivationTokenRequest($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"protected function userSendUserActivationTokenRequest($user_id)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userSendUserActivationToken'\n );\n }\n\n $resourcePath = '/api/users/{userId}/sendactivationtoken';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function userSendUserActivationTokenAsync($user_id)\n {\n return $this->userSendUserActivationTokenAsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userSendUserActivationToken($user_id)\n {\n list($response) = $this->userSendUserActivationTokenWithHttpInfo($user_id);\n return $response;\n }",
"public function setAndSendUserActivationToken($user)\n {\n $token = md5(str_random(40));\n\n $user->meta()->update([\n 'activation_token' => $token\n ]);\n\n $user->notify(new ActivateUserEmail($token));\n }",
"protected function sendActivationSms($user, $activation_code)\n {\n $smsSender= $this->addComponent(\n '\\Khelo\\SmsGateway\\Components\\SendSmsService', 'sendSmsService',\n [\n 'activeGateway' => $this->property('smsGateway'),\n 'callCodePrefix' => $this->property('intCallCodePrefix')\n ]\n );\n\n $smsSender->sendMessage($user->mobile_number, $activation_code);\n\n }",
"public function signupUserAsyncWithHttpInfo($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserSignUpResponseObject';\n $request = $this->signupUserRequest($body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function siteGetActivationCodeAsyncWithHttpInfo(): \\GuzzleHttp\\Promise\\PromiseInterface\n {\n $returnType = '\\Nlocascio\\Mindbody\\Model\\GetActivationCodeResponse';\n $request = $this->siteGetActivationCodeRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function addUserAsyncWithHttpInfo($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UseridObject';\n $request = $this->addUserRequest($body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"private function __sendActivationMail($userId = null, $userData = null) {\n\t\tif(!empty($userId) && !empty($userData)) {\n\t\t\t$code = $this->Token->createActivationCode($userId);\n\t\t\t$this->Email->to = $userData['email'];\n\t\t\t$this->Email->subject = 'Massidea.org account verification';\n\t\t\t$this->Email->from = 'Massidea.org <[email protected]>';\n\t\t\t$this->Email->template = 'activate';\n\t\t\t$this->Email->sendAs = 'html';\n\t\t\t$this->set('name', $userData['username']);\n\t\t\t$this->set('link', 'activate/'.$code);\n\t\t\t\n\t\t\treturn $this->Email->send();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function sendActivate(Request $request){\n $user = User::where('email',$request->email)->get()->first();\n // dump($user);\n //generate new token\n $token = str_random(15);\n // dump($token);\n $update = User::where('email',$request->email)->update(['token'=>$token]);\n // dump($update);\n if($update) {\n //write code to send activation email\n //http://localhost.com/register/activate/9TT0e3YmDUV20f8\n $url = url('register/activate/'.$token);\n // dump($url);\n $data=array(\n 'link'=>$url,\n 'name' => $user->name,\n 'email'=>$request->email\n );\n Mail::to($request->email)->send(new RegisterMail($data));\n return back()->with('flash_message_success', 'Account Activation Email Sent');\n }\n }",
"public function activateAccount(\n $activationToken\n )\n {\n $response = $this->client()->post( $this->authBaseUri . '/v1/users/activate' ,[\n 'body' => [\n 'Token' => $activationToken,\n ]\n ]);\n \n if ($response->getStatusCode() != 204) {\n return $this->log($response, false);\n }\n\n return $this->log($response, true);\n }",
"public function send_activation($user_id)\n {\n // To finish\n }",
"public function activateAccount()\n {\n $this->set('activationCode', $this->request->getQuery('activation_code'));\n\n if ($this->request->is(['patch', 'post', 'put'])) {\n $token = $this->request->getData('activation_code');\n $result = $this->Users->find('activationCode', ['activation_code' => $token]);\n if ($result->count() == 0) {\n $this->Flash->error(__('Account activation failed. Code not recognised.'));\n return;\n }\n\n /** @var User $user */\n $user = $result->first();\n $this->Users->patchEntity(\n $user,\n [\n 'activation_date' => Time::now(),\n 'is_active' => true\n ],\n ['guard' => false]\n );\n $user->activation_code = null;\n\n if ($this->Users->save($user)) {\n $email = new Email();\n $email\n ->setTo($user->email_address, $user->full_name)\n ->setSubject('Account Activated')\n ->setViewVars(['user' => $user])\n ->setTemplate('activated')\n ->send();\n\n $this->Flash->success(__('Account was successfully activated!'));\n return $this->redirect(Router::url(['_name' => 'login']));\n } else {\n $this->log($user->getErrors());\n $this->Flash->error(__('Account activation failed. A server error occurred.'));\n }\n }\n }",
"public function send_activation_email($user) {\n\t\t$data = array(\n\t\t\t'name'\t\t => $user->name,\n\t\t\t'email' => $user->email,\n\t\t\t'activation' => $user->getActivationCode(),\n\t\t\t'id'\t\t => $user->id,\n\t\t);\n\n\t\t\\Mail::send('emails.auth.activateuser' , $data , function($message) use ($data)\n\t\t{\n\t\t\t$message->to($data['email'] , 'Example')->subject('email signup');\n\t\t});\n\t}",
"public function authenticateUserAsyncWithHttpInfo($body = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\JsonMDNToken';\n $request = $this->authenticateUserRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function activateUser($token)\n {\n if ($user = $this->activation_repo->activateUser($token)) {\n return $this->respond([\n 'message' => 'User has been activated!'\n ]);\n }\n \n return $this->setStatusCode(404)->respondWithError('Token does not exist');\n }",
"public function loginUserAsyncWithHttpInfo($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserTokenObject';\n $request = $this->loginUserRequest($body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public static function generateActivationToken()\n {\n return hash_hmac('sha256', Str::random(40), config('app.key'));\n }",
"public function createDeveloperUserAuthTicketAsync($userAuthInfo, $developerAccountId = null, $responseFields = null)\r\n\t{\r\n\t\t$mozuClient = DeveloperAdminUserAuthTicketClient::createDeveloperUserAuthTicketClient($userAuthInfo, $developerAccountId, $responseFields);\r\n\t\treturn $mozuClient->executeAsync();\r\n\r\n\t}",
"public function activate(ConfirmationToken $token, string $userToken)\n {\n try {\n $token = $token->token($userToken);\n $user = $token->user;\n $user->is_active = true;\n $user->save();\n $token = JWTAuth::fromUser($user);\n } catch (\\Exception $exception) {\n if($exception->getMessage() !== 'Creating default object from empty value')\n {\n $this->processingError($exception);\n }\n }\n\n return (new UserResource($user))\n ->additional([\n 'success' => 'Congratulations, your account has been activated!',\n 'meta' => [\n 'token' => $token\n ]\n ]);\n }",
"public function sendActivationNotification($token);",
"public function createEmbedUserAsyncWithHttpInfo($body)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserPublic';\n $request = $this->createEmbedUserRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getUserActivationKey()\n {\n return $this->user_activation_key;\n }",
"public function activateByToken($token)\n {\n $activationToken = ActivationToken::with('user.status')\n ->where('token', $token)\n ->where('revoked', false)\n ->first();\n\n if (!($activationToken instanceof ActivationToken)) {\n throw new Exception('Invalid activation token.');\n }\n\n $status = UserStatus::where('name', 'Active')->first();\n\n if (!($status instanceof UserStatus)) {\n throw new RuntimeException('Unable to retrieve status.');\n }\n\n $user = $activationToken->user;\n\n // change user status to active\n $user->update(['user_status_id' => $status->id]);\n\n // revoke the token\n $activationToken->revoked = true;\n $activationToken->save();\n\n // retrieve updated user details\n $user = User::with('status')->find($activationToken->user->id);\n\n return $user;\n }",
"public function activateUser() {\n $this->verified = true;\n $this->activation_token = null;\n $this->save();\n }",
"protected function sendActivationEmail($user)\n {\n $code = implode('!', [$user->id, $user->getActivationCode()]);\n\n $link = $this->makeActivationUrl($code);\n\n $data = [\n 'name' => $user->name,\n 'link' => $link,\n 'code' => $code\n ];\n\n Mail::send('rainlab.user::mail.activate', $data, function($message) use ($user) {\n $message->to($user->email, $user->name);\n });\n }",
"public function activate(ActivateAccountRequest $request)\n {\n try {\n if (\n User::where('email', $request->get('email'))\n ->where('activation_code', $request->get('code'))\n ->where('active', 0)\n ->update([\n 'active' => 1,\n 'activation_code' => '',\n 'activated_at' => Carbon::now()\n ])\n ) {\n $response = 'Activated';\n } else {\n $response = 'Activation Failed';\n }\n $statusCode = 200;\n\n } catch (\\PDOException $e) {\n $response = $e->getMessage();\n $statusCode = $e->getCode();\n } catch (\\Exception $e) {\n $response = $e->getMessage();\n $statusCode = $e->getCode();\n }\n\n return response()->json(compact('response'), $statusCode);\n }",
"public function signupUserWithHttpInfo($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserSignUpResponseObject';\n $request = $this->signupUserRequest($body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserSignUpResponseObject',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function activation($userId, $dateTime = null, $custom = array())\n {\n $request = array();\n $url = $this->cbconf->getApiUrl() . \"user/\" . urlencode($userId) . \"/activation\";\n if (!empty($dateTime)) {\n $url = $this->appendTo($url, \"dateTime\", $dateTime->format(\\DateTime::ISO8601));\n }\n $url .= $this->implode_encode_assoc($custom);\n $request['url'] = $url;\n $request['method'] = CurlUtil::METHOD_GET;\n $this->queue[] = $request;\n\n if ($this->cbconf->isAutoFlush()) {\n $this->flush();\n }\n }"
] | [
"0.65504485",
"0.6500086",
"0.6481375",
"0.632109",
"0.58296895",
"0.550811",
"0.5488078",
"0.5482615",
"0.51559895",
"0.51443523",
"0.5116355",
"0.5092441",
"0.5010458",
"0.50022364",
"0.49722466",
"0.492135",
"0.49197936",
"0.4913558",
"0.49129704",
"0.48920837",
"0.48798037",
"0.48444456",
"0.4832484",
"0.47641382",
"0.4748414",
"0.47433367",
"0.47384268",
"0.4724425",
"0.4722649",
"0.47180575"
] | 0.68996996 | 0 |
Create request for operation 'userSendUserActivationToken' | protected function userSendUserActivationTokenRequest($user_id)
{
// verify the required parameter 'user_id' is set
if ($user_id === null) {
throw new \InvalidArgumentException(
'Missing the required parameter $user_id when calling userSendUserActivationToken'
);
}
$resourcePath = '/api/users/{userId}/sendactivationtoken';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($user_id !== null) {
$resourcePath = str_replace(
'{' . 'userId' . '}',
ObjectSerializer::toPathValue($user_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json', 'text/json', 'application/xml', 'text/xml']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json', 'text/json', 'application/xml', 'text/xml'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
$httpBody = $_tempBody;
// \stdClass has no __toString(), so we should encode it manually
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($httpBody);
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValue
];
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$query = \GuzzleHttp\Psr7\build_query($queryParams);
return new Request(
'POST',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function requestRequestToken();",
"public function created(User $user)\n {\n ActivationToken::generateNewFor($user);\n }",
"public function sendActivate(Request $request){\n $user = User::where('email',$request->email)->get()->first();\n // dump($user);\n //generate new token\n $token = str_random(15);\n // dump($token);\n $update = User::where('email',$request->email)->update(['token'=>$token]);\n // dump($update);\n if($update) {\n //write code to send activation email\n //http://localhost.com/register/activate/9TT0e3YmDUV20f8\n $url = url('register/activate/'.$token);\n // dump($url);\n $data=array(\n 'link'=>$url,\n 'name' => $user->name,\n 'email'=>$request->email\n );\n Mail::to($request->email)->send(new RegisterMail($data));\n return back()->with('flash_message_success', 'Account Activation Email Sent');\n }\n }",
"protected function siteGetActivationCodeRequest(): \\GuzzleHttp\\Psr7\\Request\n {\n\n $resourcePath = '/public/v6/site/activationcode';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = Utils::jsonEncode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = Utils::jsonEncode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('authorization');\n if ($apiKey !== null) {\n $headers['authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function sendToken();",
"public function setAndSendUserActivationToken($user)\n {\n $token = md5(str_random(40));\n\n $user->meta()->update([\n 'activation_token' => $token\n ]);\n\n $user->notify(new ActivateUserEmail($token));\n }",
"public function userSendUserActivationTokenWithHttpInfo($user_id)\n {\n $returnType = 'string';\n $request = $this->userSendUserActivationTokenRequest($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public static function generateActivationToken()\n {\n return hash_hmac('sha256', Str::random(40), config('app.key'));\n }",
"public function userSendUserActivationToken($user_id)\n {\n list($response) = $this->userSendUserActivationTokenWithHttpInfo($user_id);\n return $response;\n }",
"public function generateActivationToken()\n {\n $this->activation_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function send_activation($user_id)\n {\n // To finish\n }",
"protected function requestRequestToken() {\n $requestParams = (isset($this->provider->oauthRequestTokenParams)) ? $this->provider->oauthRequestTokenParams : array();\n $requestTokenRequest = OAuthRequest::from_consumer_and_token($this->consumerToken, NULL, \"GET\", $this->provider->requestTokenUrl, $requestParams);\n if(is_array($this->provider->requestTokenParams)){\n foreach($this->provider->requestTokenParams as $key => $value) {\n $requestTokenRequest->set_parameter($key, $value);\n }\n }\n $requestTokenRequest->sign_request($this->signatureMethod, $this->consumerToken, NULL);\n return osapiIO::send($requestTokenRequest, 'GET', $this->provider->httpProvider);\n }",
"public function actionCreate()\n\t{\n\t\t$user = new User('insert');\n\t\t\n\t\t// if it is ajax validation request\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='user-create-form')\n\t\t{\n\t\t\techo CActiveForm::validate($user);\n\t\t\tYii::app()->end();\n\t\t}\n\n\t\tif (isset($_POST['User']))\n\t\t{\n\t\t\t$user->attributes = $_POST['User'];\n\t\t\tif ($user->save())\n\t\t\t{\n\t\t\t\t$token = Token::model()->createForUser($user);\n\t\t\t\tif ($token !== null)\n\t\t\t\t{\n\t\t\t\t\tif ($this->sendEmail($user->email, 'activate', array('user' => $user, 'token' => $token)))\n\t\t\t\t\t{\n\t\t\t\t\t\t// everything is ok\n\t\t\t\t\t\tYii::app()->user->setFlash('success', 'Thanks for joining ! Please check your <b>emails</b>.');\n\t\t\t\t\t\t$this->redirect(Yii::app()->homeUrl); // redirect to home and exit\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// error while sending email\n\t\t\t\t\t\t$token->delete();\n\t\t\t\t\t\t$user->delete();\n\t\t\t\t\t\tYii::app()->user->setFlash('error', 'Internal error while sending your activation email. Please try again.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// error while creating token\n\t\t\t\t\t$user->delete();\n\t\t\t\t\tYii::app()->user->setFlash('error', 'Internal error. Please try again.');\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t// else: error while validating form\n\t\t}\t\t\n\n\t\t// always clear sensitive data\n\t\t$user->password = '';\n\t\t$user->passwordRepeat = '';\n\t\t$user->verifyCode = '';\n\n\t\t$this->render('create', array(\n\t\t\t'model' => $user,\n\t\t));\n\t}",
"public function createToken(CanActivateContract $user)\n {\n return $this->tokens->create($user);\n }",
"public function activate(ConfirmationToken $token, string $userToken)\n {\n try {\n $token = $token->token($userToken);\n $user = $token->user;\n $user->is_active = true;\n $user->save();\n $token = JWTAuth::fromUser($user);\n } catch (\\Exception $exception) {\n if($exception->getMessage() !== 'Creating default object from empty value')\n {\n $this->processingError($exception);\n }\n }\n\n return (new UserResource($user))\n ->additional([\n 'success' => 'Congratulations, your account has been activated!',\n 'meta' => [\n 'token' => $token\n ]\n ]);\n }",
"public function storeUser(Request $request)\n {\n $input = $request->all();\n\n $input['password'] = Hash::make($input['password']);\n //the idea of creation code\n $user = $this->user->create($input);\n\n //type of users\n //...\n\n if ($user) {\n $input['user_id'] = $user->id;\n $token = jwt($user);\n\n //create User Activation token/code\n $userActivation = new UserActivation();\n $userActivation->user_id = $input['user_id'];\n $userActivation->token = str_random(30);\n $userActivation->save();\n\n //Create not completed Personal website\n if($input['userType'] == 'personal_website'){\n $website = new Website();\n $website->user_id = $input['user_id'];\n $website->domain = $input['domain'];\n $website->domain_type = $input['domain_type'];\n $website->save();\n if($website->domain_type == 'premium'){\n $payment = new Payment();\n $payment->user_id = $user->id;\n $payment->amount_of_money = 100;\n $payment->save();\n }\n }\n elseif($input['userType'] == 'organization_website'){\n// dd($input['userType']);\n $website = new OrganizationWebsite();\n $website->user_id = $input['user_id'];\n $website->domain = $input['domain'];\n $website->domain_type = $input['domain_type'];\n $website->save();\n if($website->domain_type == 'premium'){\n $payment = new Payment();\n $payment->user_id = $user->id;\n $payment->amount_of_money = 200;\n $payment->save();\n }\n\n }\n\n $activationToken = $input = $this->userActivation->orderBy('id', 'DESC')->value('token');\n $message = '<p><strong>Welcome Seera</strong> ,please Activate your Account:</p>'.'<a href=\"http://seeraapi.seeraonline.net/auth/user/activation/'.$activationToken.'\">Activate</a>';\n $headers = \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n\n// mail($request->email,\"Seera - Activation Code\", $message, $headers);\n\n //for testing return token if sms code api get make change status to activate\n return $this->apiResponse(['token' => $token,\n 'name_en' => $user->name_en, 'email' => $user->email, 'id' => $user->id], null, 201);\n }\n return $this->unKnowError('error while creating');\n }",
"private function generateUserToken()\n {\n $username = 'wecine';\n $password = 'wecine';\n $I = $this;\n\n $I->haveHttpHeader('Content-Type', 'application/json');\n $I->sendPOST('/login_check', ['username' => $username, 'password' => $password]);\n $response = $I->grabResponse();\n $responseArray = json_decode($response, true);\n\n if (is_array($responseArray) && isset($responseArray['token'])) {\n $this->userToken = $responseArray['token'];\n }\n }",
"public function actionCreateClientSecret()\n {\n $amData = Common::checkRequestType();\n $amResponse = $amReponseParam = [];\n\n // Check required validation for request parameter.\n $amRequiredParams = array('user_id', 'amount_with_tax_discount');\n $amParamsResult = Common::checkRequestParameterKey($amData['request_param'], $amRequiredParams);\n\n // If any getting error in request paramter then set error message.\n if (!empty($amParamsResult['error'])) {\n $amResponse = Common::errorResponse($amParamsResult['error']);\n Common::encodeResponseJSON($amResponse);\n }\n\n $requestParam = $amData['request_param'];\n //Check User Status//\n Common::matchUserStatus($requestParam['user_id']);\n //VERIFY AUTH TOKEN\n $authToken = Common::get_header('auth_token');\n Common::checkAuthentication($authToken);\n $snUserId = $requestParam['user_id'];\n $model = Users::findOne([\"id\" => $snUserId]);\n if (!empty($model)) {\n \\Stripe\\Stripe::setApiKey('sk_test_Riw74aG5a5dBFs873VnuZRl600NA1l75zn');\n\n $intent = \\Stripe\\PaymentIntent::create([\n 'amount' => $requestParam['amount_with_tax_discount'],\n 'currency' => 'usd',\n ]);\n $client_secret = $intent->client_secret;\n // Device Registration\n $ssMessage = 'User Profile Details.';\n\n $amReponseParam['client_secret'] = $client_secret;\n\n $amResponse = Common::successResponse($ssMessage, $amReponseParam);\n } else {\n $ssMessage = 'Invalid User.';\n $amResponse = Common::errorResponse($ssMessage);\n }\n // FOR ENCODE RESPONSE INTO JSON //\n Common::encodeResponseJSON($amResponse);\n }",
"public function getActivateAccount()\n {\n $user_pending = null;\n $token = $_GET['token'];\n\n // look up the unique token value in the users_pending table...\n $user_pending = UserPending::where('token', '=', $token)->first();\n\n // if token found (ie. user_pending NOT null), find user in users table & activate account...\n if (isset($user_pending)) {\n $user_id = $user_pending->user_id;\n $user = User::find($user_id);\n $user->active = 1;\n $user->save();\n\n // activation is one-time only, therefore delete corresponding redundant entry...\n UserPending::where('token', '=', $token)->delete();\n\n header(\"Location: /account_activated\");\n exit();\n\n } else {\n\n header(\"Location: /page_not_found\");\n exit();\n\n }\n\n }",
"public function send_register_user_token($user) {\n $message = (new Swift_Message('CarMarket | Confirm Registration'))\n ->setFrom([\n '[email protected]' => 'CarMarket No Reply Mail'])\n ->setTo([$user['email']])\n ->setBody(\n 'Confirmation link: https://car-market.live/?confirmation='.\n $user['token'].\"#confirm\");\n $this->mailer->send($message);\n }",
"public function createApiUser() {\n try {\n $response = $this->newClient()->post(self::BASE_URL . self::API_USER_URI, [\n 'headers' => ['X-Reference-Id' => $this->xReferenceId],\n 'json' => ['providerCallbackHost' => $this->callbackHost]\n ]);\n return json_encode(['statusCode' => $response->getStatusCode()]);\n } catch (\\Exception $exception) {\n throw new \\Exception($exception->getMessage());\n }\n }",
"protected function signupUserRequest($body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling signupUser'\n );\n }\n\n $resourcePath = '/users/signup';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // header params\n if ($x_embarcadero_application_id !== null) {\n $headerParams['X-Embarcadero-Application-Id'] = ObjectSerializer::toHeaderValue($x_embarcadero_application_id);\n }\n // header params\n if ($x_embarcadero_app_secret !== null) {\n $headerParams['X-Embarcadero-App-Secret'] = ObjectSerializer::toHeaderValue($x_embarcadero_app_secret);\n }\n // header params\n if ($x_embarcadero_master_secret !== null) {\n $headerParams['X-Embarcadero-Master-Secret'] = ObjectSerializer::toHeaderValue($x_embarcadero_master_secret);\n }\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function createToken();",
"public function __construct($user, $activationToken = null)\n\t{\n\t\t$this->user = $user;\n\t\t$this->activationToken = $activationToken;\n\t}",
"protected function sendActivationSms($user, $activation_code)\n {\n $smsSender= $this->addComponent(\n '\\Khelo\\SmsGateway\\Components\\SendSmsService', 'sendSmsService',\n [\n 'activeGateway' => $this->property('smsGateway'),\n 'callCodePrefix' => $this->property('intCallCodePrefix')\n ]\n );\n\n $smsSender->sendMessage($user->mobile_number, $activation_code);\n\n }",
"public function activateAction()\n\t{\n\t\t$error = false;\n\t\t$showPasswords = !self::PASSWORDS_IN_REGISTRATION;\n\t\t$lang = $this->lang;\n\t\t$username = filter_input(INPUT_GET, \"user\");\n\t\t$token = filter_input(INPUT_GET, \"token\");\n\n\t\t// This block can be omitted, but it's more user friendly.\n\t\ttry {\n\t\t\t$this->modelAuth->checkToken($username, $token);\n\t\t} catch (AuthException $e) {\n\t\t\t$error = __(\"The link is either wrong or outdated. Please check you have correctly copied the link and try again.\");\n\t\t\t$title = __(\"Activate Account\");\n\t\t\tinclude APPPATH.\"View/auth/message.php\";\n\t\t\texit;\n\t\t}\n\n\t\tif (!$showPasswords) {\n\t\t\ttry {\n\t\t\t\t$this->modelAuth->activate($username, $token, null, null);\n\t\t\t\t// TODO: do we need a message that says that we have successfully activated account?\n\t\t\t\theader(\"Location: /auth/login\");\n\t\t\t\texit;\n\t\t\t} catch (AuthException $e) {\n\t\t\t\tLogger::notice($e->getLogMessage().\" User: $username, Token: $token\");\n\t\t\t\t$error = __($e->getMessage());\n\t\t\t\t$title = __(\"Activate Account\");\n\t\t\t\t$redirect = \"/auth/login\";\n\t\t\t\tinclude APPPATH.\"View/auth/message.php\";\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Password is needed!\n\t\t//\n\t\tif (Request::getMethod() == \"POST\") {\n\t\t\t$token = filter_input(INPUT_POST, \"token\");\n\t\t\t$username = filter_input(INPUT_POST, \"username\");\n\t\t\t$password = filter_input(INPUT_POST, \"password\");\n\t\t\t$password2 = filter_input(INPUT_POST, \"password2\");\n\t\t\ttry {\n\t\t\t\t$this->modelAuth->activate($username, $token, $password, $password2);\n\t\t\t\theader(\"Location: /auth/login\");\n\t\t\t\texit;\n\t\t\t} catch (AuthException $e) {\n\t\t\t\tLogger::notice($e->getLogMessage().\" User: $username, Token: $token\");\n\t\t\t\t$error = __($e->getMessage());\n\t\t\t}\n\t\t}\n\n\t\tinclude APPPATH.\"View/auth/activate.php\";\n\t}",
"public function activateUser() {\n $this->verified = true;\n $this->activation_token = null;\n $this->save();\n }",
"public function requestAppToken()\n {\n return $this->requestToken([\n 'grant_type' => 'client_credentials',\n ]);\n }",
"public function createTokenAPI()\n {\n try {\n if (isset($_SESSION['USER'])) {\n\n $tokenAPI = hash('md5', uniqid());\n $sqlToken = Bdd::GetInstance()->prepare('UPDATE users SET user_token=:token WHERE user_UId =:id ');\n $sqlToken->execute([\n 'token' => $tokenAPI,\n 'id' => $_SESSION['USER']->getUID()\n ]);\n\n return array(\"result\" => true);\n }\n } catch (\\Exception $e) {\n return array(\"result\" => $tokenAPI, \"message\" => $e->getMessage());\n }\n\n }",
"public function accountActivationAction(Request $request, $token)\n {\n $userManager = $this->container->get('fos_user.user_manager');\n\n $user = $userManager->findUserByConfirmationToken($token);\n\n if (null === $user)\n return $this->redirect($this->generateUrl('bag_login_web_page_not_found'));\n\n $user->setConfirmationToken(null);\n $user->setEnabled(true);\n\n $this->container->get('event_dispatcher')->dispatch(FOSUserEvents::REGISTRATION_CONFIRM, new GetResponseUserEvent($user, $request));\n\n $userManager->updateUser($user);\n\n $this->container->get('event_dispatcher')->dispatch(FOSUserEvents::REGISTRATION_CONFIRMED, new FilterUserResponseEvent($user, $request, null));\n $this->container->get('event_dispatcher')->dispatch(BagLoginEvents::USER_REGISTRATION_CONFIRMED, new UserEvent($user, true, 'web'));\n\n return $this->redirect($this->generateUrl('bag_login_web_registration_done'));\n }"
] | [
"0.5935587",
"0.5836937",
"0.58271873",
"0.5798016",
"0.5728189",
"0.5664488",
"0.56610173",
"0.5640674",
"0.56322896",
"0.5613615",
"0.5570104",
"0.555378",
"0.5474504",
"0.5425245",
"0.54087716",
"0.5401301",
"0.538686",
"0.53603035",
"0.5340451",
"0.53349096",
"0.53326184",
"0.53133905",
"0.5310939",
"0.5304672",
"0.52939165",
"0.5239852",
"0.5222926",
"0.5202797",
"0.5194683",
"0.51537395"
] | 0.7292995 | 0 |
Operation userUpdateRoles update a user roles. | public function userUpdateRoles($user_id, $roles)
{
list($response) = $this->userUpdateRolesWithHttpInfo($user_id, $roles);
return $response;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userUpdateRolesAsync($user_id, $roles)\n {\n return $this->userUpdateRolesAsyncWithHttpInfo($user_id, $roles)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function updateRole($userId, $roles)\n {\n $this->model->find($userId)->roles()->sync([]);\n $this->setRole($userId, $roles);\n }",
"public function setUserRoles($user_id, $body, $fields = null)\n {\n list($response) = $this->setUserRolesWithHttpInfo($user_id, $body, $fields);\n return $response;\n }",
"public function userUpdateRolesAsyncWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRoles($user_id, $virtual_operator)\n {\n list($response) = $this->userRolesWithHttpInfo($user_id, $virtual_operator);\n return $response;\n }",
"public static function updateUserRoles(WP_User|null $user, DirectoryUser|null $dir_user){\n if (!$user && !$dir_user) return;\n\n if (!$user) $user = get_user_by('external_id', $dir_user->external_id);\n if (!$dir_user) $dir_user = DirectoryUser::findByUserID($user->ID);\n\n if ($user && $dir_user){ // make sure we are not editing locally created users by accident\n // first clear existing roles from user\n $user->set_role('');\n\n // add roles to user\n $roles = $dir_user->allRoles();\n foreach($roles as $role) {\n $user->add_role( $role );\n }\n }\n }",
"public function userUpdateRolesWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function updateUserPrivileges(\n int $userId,\n array $roles,\n $active,\n array $roleGroups = [],\n array $locationIds = []\n );",
"public function userRoles_0($user_id)\n {\n list($response) = $this->userRoles_0WithHttpInfo($user_id);\n return $response;\n }",
"public function update(Request $request, User $user)\n {\n $roles = $request['roles']; //Retrieving the roles field\n $roles[] = 3; // Always give Authenticated role to all users\n if ($user->id == 1) {\n $roles[] = 1; // Always give Super Admin role to user with ID = 1\n }\n\n //Checking if a role was selected\n $user_guards = Guard::getNames($user)->toArray();\n if (isset($roles)) {\n $user->syncRoles(null);\n foreach ($roles as $role_id) {\n $role = Role::find($role_id);\n if (in_array($role->guard_name, $user_guards)) {\n $user->assignRole($role);\n }\n }\n } else {\n $user->syncRoles(null);\n }\n\n return redirect()->route('user.list')\n ->with('success', __('User role updated successfully.'));\n }",
"public function update(UpdateUser $request, User $user)\n {\n // Validate and retrieve only the updated fields \n $validatedInput = $request->validated();\n\n // Retreive all roles\n $roles = $request['roles']; \n $user->fill($validatedInput)->save();\n\n if(isset($roles)) \n { \n // If one or more role is selected associate user to roles \n $user->roles()->sync($roles); \n } \n else \n {\n // If no role is selected remove exisiting role associated to a user\n $user->roles()->detach(); \n }\n\n return response()->json([\n 'message' => \"User successfully edited\",\n 'user' => $user,\n ]);\n }",
"public function setRoles(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Iam\\Admin\\V1\\Role::class);\n $this->roles = $arr;\n }",
"public function updateRoles()\n\t{\n\t\t$this->db->select(\"userroles.*\");\n\t\t$this->db->from(\"userroles\");\n\t\t$this->db->where(\"userroles.userID=\",$this->userID);\n\t\t$roles = $this->db->get();\n\t\t\n\t\tif($roles->num_rows())\n\t\t{\n\t\t\tforeach($roles->result() as $role) {\n\t\t\t\t$this->userrole_model->id = $role->id;\n\t\t\t\t$this->userrole_model->deleteRecord();\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->saveRoles();\n\t}",
"protected function userUpdateRolesRequest($user_id, $roles)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userUpdateRoles'\n );\n }\n // verify the required parameter 'roles' is set\n if ($roles === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $roles when calling userUpdateRoles'\n );\n }\n\n $resourcePath = '/api/users/{userId}/roles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($roles)) {\n $_tempBody = $roles;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['application/json', 'text/json', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public static function set(\n\t\t\t\\Scrivo\\Context $context, \\Scrivo\\User $user, array $roles) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tnull, null, null));\n\t\ttry {\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"DELETE FROM user_role WHERE\n\t\t\t\tinstance_id = :instId AND user_id = :userId\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":userId\", $user->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\tif ($roles) {\n\t\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\t\"INSERT INTO user_role\n\t\t\t\t\t (instance_id, role_id, user_id, is_publisher)\n\t\t\t\t\tVALUES (:instId, :roleId, :userId, :publisher)\");\n\n\t\t\t\t$context->connection->bindInstance($sth);\n\t\t\t\t$sth->bindValue(\":userId\", $user->id, \\PDO::PARAM_INT);\n\n\t\t\t\tforeach ($roles as $role) {\n\t\t\t\t\t$sth->bindValue(\":roleId\", $role->id, \\PDO::PARAM_INT);\n\t\t\t\t\t$sth->bindValue(\":publisher\",\n\t\t\t\t\t\t(bool)$role->isPublisher, \\PDO::PARAM_BOOL);\n\n\t\t\t\t\t$sth->execute();\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}",
"protected function _saveUserroles( )\r\n\t{\r\n\t\t$this->debug->guard( );\r\n\r\n\t\tif ( !$this->userrolesLoaded )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'User roles are not loaded for user: no update needed.', 'message' );\r\n\t\t\t$this->messages->setMessage( 'User roles are not loaded for user: no update needed.', 'message' );\r\n\r\n\t\t\t$this->debug->unguard( true );\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$userroles = new zgUserroles( );\r\n\t\t$ret = $userroles->saveUserroles( $this->getUserID( ), $this->userroles );\r\n\t\tif ( !$ret )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem saving the user roles: could not save userroles for user', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem saving the user roles: could not save userroles for user', 'warning' );\r\n\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->debug->unguard( true );\r\n\t\treturn true;\r\n\t}",
"public function setUserRoles(?array $userRoles) : self\n {\n $this->initialized['userRoles'] = true;\n $this->userRoles = $userRoles;\n return $this;\n }",
"private function syncRoles(User $user, array $roles)\n {\n Log::info('UsersController.syncRoles: Start: '.$user->name);\n $user->roles()->sync($this->populateCreateFieldsForSyncWithIDs($roles, true));\n }",
"public function update(Request $request, User $user)\n {\n $roles=$request->only('roles')['roles'];\n $user->roles()->sync($roles);\n $user->syncPermissions();\n\n return redirect('/users')->withStatus('Updated roles for the user');\n }",
"public function userRoles($user_id, $fields = null, $direct_association_only = null)\n {\n list($response) = $this->userRolesWithHttpInfo($user_id, $fields, $direct_association_only);\n return $response;\n }",
"public function update($user, $roles)\n {\n return $this->hasPermission($user, $roles);\n }",
"public function updateRoles($rolesToAdd,User $user)\n {\n $rolesActuel = $user->roles()->pluck('id')->toArray();\n $rolesToDelete = array_diff($rolesActuel,$rolesToAdd);\n\n // Suppression des roles non voulu\n foreach ($rolesToDelete as $roleId) {\n $user->removeRole(Role::findOrFail($roleId));\n }\n\n // Ajout des roles voulu\n foreach ($rolesToAdd as $roleId) {\n $user->assignRole(Role::findOrFail($roleId));\n }\n }",
"public function testUpdateUserRoles()\n {\n /* @var $user User */\n $user = $this->getModule('Yii2')->grabFixture('users', 'activeUser1');\n $this->assertTrue($this->userModule->updateUserRoles($user, []));\n $this->assertEmpty($user->getUserRoles());\n $this->assertTrue($this->userModule->updateUserRoles($user, ['admin']));\n $this->assertContains('admin', $user->getUserRoles());\n\n return $user;\n }",
"public function setUserRolesAsync($user_id, $body, $fields = null)\n {\n return $this->setUserRolesAsyncWithHttpInfo($user_id, $body, $fields)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function update(UpdateRole $request, User $user)\n {\n $user->roles()->sync([$request->get('role')]);\n\n return response()->json();\n }",
"public function update(Request $request, User $user)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'email' => 'email|required'\n ]);\n $user->update($request->all());\n $user->assignRole($request->rolesList);\n session()->flash('flash_success', 'Užívateľ bol úspešne editovaný');\n return redirect('admin/users');\n }",
"public static function profile_update_role( $user_id = 0 ) {\n if ( empty( $user_id ) )\n return;\n\n // Bail if no role\n if ( ! isset( $_POST['erp-hr-role'] ) )\n return;\n\n // HR role we want the user to have\n $new_role = sanitize_text_field( $_POST['erp-hr-role'] );\n $hr_role = erp_hr_get_user_role( $user_id );\n\n // Bail if no role change\n if ( $new_role === $hr_role ) {\n return;\n }\n\n // Bail if current user cannot promote the passing user\n if ( ! current_user_can( 'promote_user', $user_id ) ) {\n return;\n }\n\n // Set the new HR role\n $user = get_user_by( 'id', $user_id );\n\n // Remove the old role\n if ( ! empty( $role ) ) {\n $user->remove_role( $hr_role );\n }\n\n // Add the new role\n if ( !empty( $new_role ) ) {\n $user->add_role( $new_role );\n }\n }",
"public function update(Request $request, User $user)\n {\n $user->roles()->sync([]);\n $roles = $request->request->get(\"role\");\n\n foreach ($roles as $role) {\n $user->roles()->attach($role);\n }\n\n return redirect()->back();\n }",
"public function update(UpdateRolesRequest $request, $id)\n {\n $role = Role::findOrFail($id);\n\n if (!Gate::allows('admin-role-edit', $role)) {\n return abort(401);\n }\n $role->update($request->all());\n\n return redirect()->route('admin.roles.index');\n }",
"public static function removeUsersRole($user_id);"
] | [
"0.7156031",
"0.6557025",
"0.6240079",
"0.6205067",
"0.61990464",
"0.6186498",
"0.61855006",
"0.6175451",
"0.61595017",
"0.61459774",
"0.61372423",
"0.60662407",
"0.60340375",
"0.60103345",
"0.5980522",
"0.58707386",
"0.583382",
"0.5817428",
"0.580549",
"0.5800919",
"0.5783014",
"0.57814544",
"0.57360274",
"0.56503993",
"0.5611145",
"0.5591543",
"0.5545499",
"0.5489082",
"0.54656297",
"0.54636127"
] | 0.7833291 | 0 |
Operation userUpdateRolesWithHttpInfo update a user roles. | public function userUpdateRolesWithHttpInfo($user_id, $roles)
{
$returnType = 'string';
$request = $this->userUpdateRolesRequest($user_id, $roles);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'string',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userUpdateRolesAsyncWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function update(UpdateRole $request, User $user)\n {\n $user->roles()->sync([$request->get('role')]);\n\n return response()->json();\n }",
"protected function userUpdateRolesRequest($user_id, $roles)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userUpdateRoles'\n );\n }\n // verify the required parameter 'roles' is set\n if ($roles === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $roles when calling userUpdateRoles'\n );\n }\n\n $resourcePath = '/api/users/{userId}/roles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($roles)) {\n $_tempBody = $roles;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['application/json', 'text/json', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function update(UpdateRequest $request, UserRole $userRole): JsonResponse\n {\n $request->validated();\n $userRole->name = $request->get('name');\n $userRole->dashboard_access = $request->get('dashboard_access');\n $userRole->permissions = json_encode(str_replace('\\'\"', '\"', $request->get('permissions')), JSON_THROW_ON_ERROR);\n if ($userRole->save()) {\n return response()->json(['message' => 'Data updated correctly', 'userRole' => new UserRoleEditResource($userRole)]);\n }\n return response()->json(['message' => __('An error occurred while saving data')], 500);\n }",
"public function update(UpdateUser $request, User $user)\n {\n // Validate and retrieve only the updated fields \n $validatedInput = $request->validated();\n\n // Retreive all roles\n $roles = $request['roles']; \n $user->fill($validatedInput)->save();\n\n if(isset($roles)) \n { \n // If one or more role is selected associate user to roles \n $user->roles()->sync($roles); \n } \n else \n {\n // If no role is selected remove exisiting role associated to a user\n $user->roles()->detach(); \n }\n\n return response()->json([\n 'message' => \"User successfully edited\",\n 'user' => $user,\n ]);\n }",
"public function roleSkillv1rolesroleIdusers_1WithHttpInfo($role_id, $body = null)\n {\n // verify the required parameter 'role_id' is set\n if ($role_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $role_id when calling roleSkillv1rolesroleIdusers_1');\n }\n // parse inputs\n $resourcePath = \"/skill/v1/roles/{role_id}/users\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($role_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"role_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($role_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleRemoveUserRoleResponse',\n '/skill/v1/roles/{role_id}/users'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleRemoveUserRoleResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleRemoveUserRoleResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function roleSkillv1rolesroleIdusers_0WithHttpInfo($role_id, $body = null)\n {\n // verify the required parameter 'role_id' is set\n if ($role_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $role_id when calling roleSkillv1rolesroleIdusers_0');\n }\n // parse inputs\n $resourcePath = \"/skill/v1/roles/{role_id}/users\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($role_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"role_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($role_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleAddUserRoleResponse',\n '/skill/v1/roles/{role_id}/users'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleAddUserRoleResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleAddUserRoleResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function update(Request $request, User $user)\n {\n $roles = $request['roles']; //Retrieving the roles field\n $roles[] = 3; // Always give Authenticated role to all users\n if ($user->id == 1) {\n $roles[] = 1; // Always give Super Admin role to user with ID = 1\n }\n\n //Checking if a role was selected\n $user_guards = Guard::getNames($user)->toArray();\n if (isset($roles)) {\n $user->syncRoles(null);\n foreach ($roles as $role_id) {\n $role = Role::find($role_id);\n if (in_array($role->guard_name, $user_guards)) {\n $user->assignRole($role);\n }\n }\n } else {\n $user->syncRoles(null);\n }\n\n return redirect()->route('user.list')\n ->with('success', __('User role updated successfully.'));\n }",
"public function userUpdateRoles($user_id, $roles)\n {\n list($response) = $this->userUpdateRolesWithHttpInfo($user_id, $roles);\n return $response;\n }",
"public function updateUserPrivileges(\n int $userId,\n array $roles,\n $active,\n array $roleGroups = [],\n array $locationIds = []\n );",
"public function setUserRolesWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Role[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userRolesWithHttpInfo($user_id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRolesRequest($user_id, $virtual_operator);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserRolesOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function update(Request $request, Role $role)\n {\n $client = $request->user();\n\n if ($client->cannot('edit_role')) {\n return response()->json([\n 'error' => 'Forbidden',\n ], 403);\n }\n\n if ($request->has(['add_users'])) {\n if ($client->cannot('edit_user')) {\n return response()->json([\n 'error' => 'Forbidden',\n ], 403);\n }\n\n $role->users()->syncWithoutDetaching($request->add_users);\n }\n\n if ($request->has(['remove_users'])) {\n if ($client->cannot('edit_user')) {\n return response()->json([\n 'error' => 'Forbidden',\n ], 403);\n }\n \n $role->users()->detach($request->remove_users);\n }\n\n $role->update($request->only([\n 'name',\n 'create_comment',\n 'create_article',\n 'create_role',\n 'create_user',\n 'edit_comment',\n 'edit_article',\n 'edit_role',\n 'edit_user',\n 'delete_comment',\n 'delete_article',\n 'delete_role',\n 'delete_user',\n 'invite_author',\n 'revoke_author',\n 'schedule_article',\n 'run_article',\n 'view_pending',\n 'permalink',\n ]));\n\n return $this->jsonResponse(new RoleResource($role));\n }",
"public function update(Request $request, RoleUser $roleuser)\n {\n //\n }",
"public function updateRoleWithHttpInfo($body, $role_id)\n {\n $returnType = '\\AuthressSdk\\Model\\Role';\n $request = $this->updateRoleRequest($body, $role_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\AuthressSdk\\Model\\Role',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userUpdateRolesAsync($user_id, $roles)\n {\n return $this->userUpdateRolesAsyncWithHttpInfo($user_id, $roles)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function roleSkillv1roles_0WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleCreateResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleCreateResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleCreateResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function update(Request $request, User $user)\n {\n $roles=$request->only('roles')['roles'];\n $user->roles()->sync($roles);\n $user->syncPermissions();\n\n return redirect('/users')->withStatus('Updated roles for the user');\n }",
"public function userRoles_0WithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserRolesOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function updateRole($userId, $roles)\n {\n $this->model->find($userId)->roles()->sync([]);\n $this->setRole($userId, $roles);\n }",
"public function setUserRolesAsyncWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function roleSkillv1roles_1WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function updateRole($role);",
"public function roleSkillv1rolesWithHttpInfo($role_title = null, $role_description = null, $sort_attr = null, $sort_dir = null, $page = null, $page_size = null, $lang = null, $role_status = null, $get_total_count = null, $role_id = null, $skill_id = null, $user_id = null, $branch_id = null, $exclude_role = null, $has_users = null, $has_not_skill = null, $filters = null, $search_text = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // query params\n if (is_array($role_title)) {\n $role_title = $this->apiClient->getSerializer()->serializeCollection($role_title, 'brackets', true);\n }\n if ($role_title !== null) {\n $queryParams['role_title'] = $this->apiClient->getSerializer()->toQueryValue($role_title);\n }\n // query params\n if (is_array($role_description)) {\n $role_description = $this->apiClient->getSerializer()->serializeCollection($role_description, 'brackets', true);\n }\n if ($role_description !== null) {\n $queryParams['role_description'] = $this->apiClient->getSerializer()->toQueryValue($role_description);\n }\n // query params\n if ($sort_attr !== null) {\n $queryParams['sort_attr'] = $this->apiClient->getSerializer()->toQueryValue($sort_attr);\n }\n // query params\n if ($sort_dir !== null) {\n $queryParams['sort_dir'] = $this->apiClient->getSerializer()->toQueryValue($sort_dir);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = $this->apiClient->getSerializer()->toQueryValue($page);\n }\n // query params\n if ($page_size !== null) {\n $queryParams['page_size'] = $this->apiClient->getSerializer()->toQueryValue($page_size);\n }\n // query params\n if ($lang !== null) {\n $queryParams['lang'] = $this->apiClient->getSerializer()->toQueryValue($lang);\n }\n // query params\n if (is_array($role_status)) {\n $role_status = $this->apiClient->getSerializer()->serializeCollection($role_status, 'brackets', true);\n }\n if ($role_status !== null) {\n $queryParams['role_status'] = $this->apiClient->getSerializer()->toQueryValue($role_status);\n }\n // query params\n if ($get_total_count !== null) {\n $queryParams['get_total_count'] = $this->apiClient->getSerializer()->toQueryValue($get_total_count);\n }\n // query params\n if (is_array($role_id)) {\n $role_id = $this->apiClient->getSerializer()->serializeCollection($role_id, 'brackets', true);\n }\n if ($role_id !== null) {\n $queryParams['role_id'] = $this->apiClient->getSerializer()->toQueryValue($role_id);\n }\n // query params\n if (is_array($skill_id)) {\n $skill_id = $this->apiClient->getSerializer()->serializeCollection($skill_id, 'brackets', true);\n }\n if ($skill_id !== null) {\n $queryParams['skill_id'] = $this->apiClient->getSerializer()->toQueryValue($skill_id);\n }\n // query params\n if (is_array($user_id)) {\n $user_id = $this->apiClient->getSerializer()->serializeCollection($user_id, 'brackets', true);\n }\n if ($user_id !== null) {\n $queryParams['user_id'] = $this->apiClient->getSerializer()->toQueryValue($user_id);\n }\n // query params\n if (is_array($branch_id)) {\n $branch_id = $this->apiClient->getSerializer()->serializeCollection($branch_id, 'brackets', true);\n }\n if ($branch_id !== null) {\n $queryParams['branch_id'] = $this->apiClient->getSerializer()->toQueryValue($branch_id);\n }\n // query params\n if ($exclude_role !== null) {\n $queryParams['exclude_role'] = $this->apiClient->getSerializer()->toQueryValue($exclude_role);\n }\n // query params\n if ($has_users !== null) {\n $queryParams['has_users'] = $this->apiClient->getSerializer()->toQueryValue($has_users);\n }\n // query params\n if (is_array($has_not_skill)) {\n $has_not_skill = $this->apiClient->getSerializer()->serializeCollection($has_not_skill, 'brackets', true);\n }\n if ($has_not_skill !== null) {\n $queryParams['has_not_skill'] = $this->apiClient->getSerializer()->toQueryValue($has_not_skill);\n }\n // query params\n if ($filters !== null) {\n $queryParams['filters'] = $this->apiClient->getSerializer()->toQueryValue($filters);\n }\n // query params\n if ($search_text !== null) {\n $queryParams['search_text'] = $this->apiClient->getSerializer()->toQueryValue($search_text);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleListResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleListResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleListResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function update(Request $request, User $user) {\n\t\t$this->authorize('update', [$user, ['users.edit', 'usersown.edit']]);\n\t\t$request->validate([\n\t\t\t'name' => 'required', 'string', 'max:255',\n\t\t\t'email' => 'required', 'email', 'max:255', 'unique:users,email,' . $user->id,\n\t\t]);\n\n\t\t$user->update($request->all());\n\n\t\t$user->roles()->sync($request->roles);\n\t\treturn redirect()->route('user.index')->with('status_success', 'User updated successfully');\n\t}",
"public static function set(\n\t\t\t\\Scrivo\\Context $context, \\Scrivo\\User $user, array $roles) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tnull, null, null));\n\t\ttry {\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"DELETE FROM user_role WHERE\n\t\t\t\tinstance_id = :instId AND user_id = :userId\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":userId\", $user->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\tif ($roles) {\n\t\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\t\"INSERT INTO user_role\n\t\t\t\t\t (instance_id, role_id, user_id, is_publisher)\n\t\t\t\t\tVALUES (:instId, :roleId, :userId, :publisher)\");\n\n\t\t\t\t$context->connection->bindInstance($sth);\n\t\t\t\t$sth->bindValue(\":userId\", $user->id, \\PDO::PARAM_INT);\n\n\t\t\t\tforeach ($roles as $role) {\n\t\t\t\t\t$sth->bindValue(\":roleId\", $role->id, \\PDO::PARAM_INT);\n\t\t\t\t\t$sth->bindValue(\":publisher\",\n\t\t\t\t\t\t(bool)$role->isPublisher, \\PDO::PARAM_BOOL);\n\n\t\t\t\t\t$sth->execute();\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}",
"public function update($user, $roles)\n {\n return $this->hasPermission($user, $roles);\n }",
"public function update(RoleUpdateRequest $request)\n {\n try {\n $id = $request->input('id');\n $role = Role::findOrFail($id);\n $data = $request->only(['name','display_name','type','corp_id']);\n $role->update($data);\n return $this->message('修改成功');\n }catch (\\Exception $e) {\n return $this->failed('修改失败',400);\n }\n }",
"public function update(Request $request, User $user)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'email' => 'email|required'\n ]);\n $user->update($request->all());\n $user->assignRole($request->rolesList);\n session()->flash('flash_success', 'Užívateľ bol úspešne editovaný');\n return redirect('admin/users');\n }",
"public function update(UserRequest $request, $id)\n {\n dd($request->all());\n if(no_permission('editUser')){\n return view(config('program.no_permission_to_view'));\n }\n if($request->password){\n $arr = $request->except('_token','_method','role_id', 'password' ,'repassword');\n //bcrypt\n $arr['password'] = bcrypt('password');\n }else{\n $arr = $request->except('_token','_method','role_id','password','repassword');\n }\n $info = User::where('id',$id)->update($arr);\n\n if(count($request->role_id)>0){\n //删除该用户之前所有的角色\n RoleUser::where(\"user_id\",$id)->delete();\n //添加该用户角色\n foreach ($request->role_id as $k=>$v){\n RoleUser::insert([\"role_id\"=>$v,\"user_id\"=>$id]);\n }\n }\n\n if($info){\n $message = [\n 'code' => 1,\n 'message' => '用户信息修改成功'\n ];\n }else{\n $message = [\n 'code' => 0,\n 'message' => '用户信息修改失败,请稍后重试'\n ];\n }\n return response()->json($message);\n }"
] | [
"0.601014",
"0.59239215",
"0.57904804",
"0.57647765",
"0.57354623",
"0.5409056",
"0.5380428",
"0.5379683",
"0.5368342",
"0.5354116",
"0.5340661",
"0.53088546",
"0.5301131",
"0.5275828",
"0.52687407",
"0.52423155",
"0.51836234",
"0.5183531",
"0.51726115",
"0.5130834",
"0.50631654",
"0.5057452",
"0.5056225",
"0.50464875",
"0.5021605",
"0.49814865",
"0.49671692",
"0.49538755",
"0.49482954",
"0.4925093"
] | 0.6446307 | 0 |
Operation userUpdateRolesAsync update a user roles. | public function userUpdateRolesAsync($user_id, $roles)
{
return $this->userUpdateRolesAsyncWithHttpInfo($user_id, $roles)
->then(
function ($response) {
return $response[0];
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userUpdateRolesAsyncWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function setUserRolesAsync($user_id, $body, $fields = null)\n {\n return $this->setUserRolesAsyncWithHttpInfo($user_id, $body, $fields)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRolesAsync($user_id, $fields = null, $direct_association_only = null)\n {\n return $this->userRolesAsyncWithHttpInfo($user_id, $fields, $direct_association_only)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRoles_0Async($user_id)\n {\n return $this->userRoles_0AsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRolesAsync($user_id, $virtual_operator)\n {\n return $this->userRolesAsyncWithHttpInfo($user_id, $virtual_operator)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRoles_0AsyncWithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function userUpdateRolesRequest($user_id, $roles)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userUpdateRoles'\n );\n }\n // verify the required parameter 'roles' is set\n if ($roles === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $roles when calling userUpdateRoles'\n );\n }\n\n $resourcePath = '/api/users/{userId}/roles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($roles)) {\n $_tempBody = $roles;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['application/json', 'text/json', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function setUserRolesAsyncWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getAllRolesAsync()\n {\n return $this->getAllRolesAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userUpdateRoles($user_id, $roles)\n {\n list($response) = $this->userUpdateRolesWithHttpInfo($user_id, $roles);\n return $response;\n }",
"public function setRoles(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Iam\\Admin\\V1\\Role::class);\n $this->roles = $arr;\n }",
"public function update(UpdateUser $request, User $user)\n {\n // Validate and retrieve only the updated fields \n $validatedInput = $request->validated();\n\n // Retreive all roles\n $roles = $request['roles']; \n $user->fill($validatedInput)->save();\n\n if(isset($roles)) \n { \n // If one or more role is selected associate user to roles \n $user->roles()->sync($roles); \n } \n else \n {\n // If no role is selected remove exisiting role associated to a user\n $user->roles()->detach(); \n }\n\n return response()->json([\n 'message' => \"User successfully edited\",\n 'user' => $user,\n ]);\n }",
"public function update(Request $request, User $user)\n {\n $roles = $request['roles']; //Retrieving the roles field\n $roles[] = 3; // Always give Authenticated role to all users\n if ($user->id == 1) {\n $roles[] = 1; // Always give Super Admin role to user with ID = 1\n }\n\n //Checking if a role was selected\n $user_guards = Guard::getNames($user)->toArray();\n if (isset($roles)) {\n $user->syncRoles(null);\n foreach ($roles as $role_id) {\n $role = Role::find($role_id);\n if (in_array($role->guard_name, $user_guards)) {\n $user->assignRole($role);\n }\n }\n } else {\n $user->syncRoles(null);\n }\n\n return redirect()->route('user.list')\n ->with('success', __('User role updated successfully.'));\n }",
"public function updateRole($userId, $roles)\n {\n $this->model->find($userId)->roles()->sync([]);\n $this->setRole($userId, $roles);\n }",
"public function update(Request $request, User $user)\n {\n $roles=$request->only('roles')['roles'];\n $user->roles()->sync($roles);\n $user->syncPermissions();\n\n return redirect('/users')->withStatus('Updated roles for the user');\n }",
"public function update(UpdateRole $request, User $user)\n {\n $user->roles()->sync([$request->get('role')]);\n\n return response()->json();\n }",
"public function syncRoles($roles = []);",
"protected function _saveUserroles( )\r\n\t{\r\n\t\t$this->debug->guard( );\r\n\r\n\t\tif ( !$this->userrolesLoaded )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'User roles are not loaded for user: no update needed.', 'message' );\r\n\t\t\t$this->messages->setMessage( 'User roles are not loaded for user: no update needed.', 'message' );\r\n\r\n\t\t\t$this->debug->unguard( true );\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$userroles = new zgUserroles( );\r\n\t\t$ret = $userroles->saveUserroles( $this->getUserID( ), $this->userroles );\r\n\t\tif ( !$ret )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem saving the user roles: could not save userroles for user', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem saving the user roles: could not save userroles for user', 'warning' );\r\n\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->debug->unguard( true );\r\n\t\treturn true;\r\n\t}",
"public function testUpdateUserRoles()\n {\n /* @var $user User */\n $user = $this->getModule('Yii2')->grabFixture('users', 'activeUser1');\n $this->assertTrue($this->userModule->updateUserRoles($user, []));\n $this->assertEmpty($user->getUserRoles());\n $this->assertTrue($this->userModule->updateUserRoles($user, ['admin']));\n $this->assertContains('admin', $user->getUserRoles());\n\n return $user;\n }",
"public function setUserRoles(?array $userRoles) : self\n {\n $this->initialized['userRoles'] = true;\n $this->userRoles = $userRoles;\n return $this;\n }",
"public function userRolesAsyncWithHttpInfo($user_id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRolesRequest($user_id, $virtual_operator);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function updateRoles()\n\t{\n\t\t$this->db->select(\"userroles.*\");\n\t\t$this->db->from(\"userroles\");\n\t\t$this->db->where(\"userroles.userID=\",$this->userID);\n\t\t$roles = $this->db->get();\n\t\t\n\t\tif($roles->num_rows())\n\t\t{\n\t\t\tforeach($roles->result() as $role) {\n\t\t\t\t$this->userrole_model->id = $role->id;\n\t\t\t\t$this->userrole_model->deleteRecord();\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->saveRoles();\n\t}",
"public function setRolesAttribute($roles)\n {\n static::saved(function (self $model) use ($roles) {\n $model->roles()->sync($roles);\n });\n }",
"public function getAllRolesAsyncWithHttpInfo()\n {\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse20030';\n $request = $this->getAllRolesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userUpdateRolesWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function setRoles(array $roles);",
"public function setRoles(array $roles);",
"private function syncRoles(User $user, array $roles)\n {\n Log::info('UsersController.syncRoles: Start: '.$user->name);\n $user->roles()->sync($this->populateCreateFieldsForSyncWithIDs($roles, true));\n }",
"public function userRolesAsyncWithHttpInfo($user_id, $fields = null, $direct_association_only = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->userRolesRequest($user_id, $fields, $direct_association_only);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function updateUserAsync($id, $body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n return $this->updateUserAsyncWithHttpInfo($id, $body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }"
] | [
"0.64092326",
"0.6236023",
"0.605099",
"0.6023438",
"0.59052926",
"0.57822436",
"0.5754061",
"0.5719245",
"0.56967044",
"0.5656321",
"0.5630741",
"0.5584149",
"0.5575604",
"0.55233216",
"0.5488532",
"0.54825336",
"0.5470697",
"0.5416018",
"0.53931284",
"0.5389776",
"0.53868043",
"0.53624994",
"0.5321509",
"0.53068936",
"0.5248491",
"0.5236406",
"0.5236406",
"0.52351844",
"0.5182863",
"0.51827645"
] | 0.7353896 | 0 |
Operation userUpdateRolesAsyncWithHttpInfo update a user roles. | public function userUpdateRolesAsyncWithHttpInfo($user_id, $roles)
{
$returnType = 'string';
$request = $this->userUpdateRolesRequest($user_id, $roles);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userUpdateRolesAsync($user_id, $roles)\n {\n return $this->userUpdateRolesAsyncWithHttpInfo($user_id, $roles)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getAllRolesAsyncWithHttpInfo()\n {\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse20030';\n $request = $this->getAllRolesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function setUserRolesAsyncWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userUpdateRolesWithHttpInfo($user_id, $roles)\n {\n $returnType = 'string';\n $request = $this->userUpdateRolesRequest($user_id, $roles);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userRoles_0AsyncWithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRolesAsyncWithHttpInfo($user_id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRolesRequest($user_id, $virtual_operator);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function userUpdateRolesRequest($user_id, $roles)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling userUpdateRoles'\n );\n }\n // verify the required parameter 'roles' is set\n if ($roles === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $roles when calling userUpdateRoles'\n );\n }\n\n $resourcePath = '/api/users/{userId}/roles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($roles)) {\n $_tempBody = $roles;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['application/json', 'text/json', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function setUserRolesAsync($user_id, $body, $fields = null)\n {\n return $this->setUserRolesAsyncWithHttpInfo($user_id, $body, $fields)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRoles_0WithHttpInfo($user_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRoles_0Request($user_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserRolesOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userRolesAsyncWithHttpInfo($user_id, $fields = null, $direct_association_only = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->userRolesRequest($user_id, $fields, $direct_association_only);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function updateUserAsyncWithHttpInfo($id, $body, $x_embarcadero_application_id = null, $x_embarcadero_app_secret = null, $x_embarcadero_master_secret = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\UpdatedObject';\n $request = $this->updateUserRequest($id, $body, $x_embarcadero_application_id, $x_embarcadero_app_secret, $x_embarcadero_master_secret);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function indexSystemUsersAsyncWithHttpInfo()\n {\n $returnType = '\\NodeumSDK\\Client\\Model\\SystemUserCollection';\n $request = $this->indexSystemUsersRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function updateAisleCustomFieldsAsyncWithHttpInfo($body)\n {\n $returnType = '';\n $request = $this->updateAisleCustomFieldsRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function roleSkillv1roles_0WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleCreateResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleCreateResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleCreateResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function apiV11PortfoliosByIdUsersPutAsyncWithHttpInfo($id, $users = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\V11UserRightResponse';\n $request = $this->apiV11PortfoliosByIdUsersPutRequest($id, $users);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userUpdateRoles($user_id, $roles)\n {\n list($response) = $this->userUpdateRolesWithHttpInfo($user_id, $roles);\n return $response;\n }",
"public function roleSkillv1roles_1WithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/skill/v1/roles\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires OAuth (access token)\n if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {\n $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse',\n '/skill/v1/roles'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\SkillRoleDeleteResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function setUserRolesWithHttpInfo($user_id, $body, $fields = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\Role[]';\n $request = $this->setUserRolesRequest($user_id, $body, $fields);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Role[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function userRolesAsync($user_id, $virtual_operator)\n {\n return $this->userRolesAsyncWithHttpInfo($user_id, $virtual_operator)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function updateRoleAsyncWithHttpInfo($body, $role_id)\n {\n $returnType = '\\AuthressSdk\\Model\\Role';\n $request = $this->updateRoleRequest($body, $role_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function updateZoomRoomsLocationStructureAsyncWithHttpInfo($body = null)\n {\n $returnType = 'object';\n $request = $this->updateZoomRoomsLocationStructureRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function createRoleAsyncWithHttpInfo($body)\n {\n $returnType = '\\AuthressSdk\\Model\\Role';\n $request = $this->createRoleRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function userRolesAsync($user_id, $fields = null, $direct_association_only = null)\n {\n return $this->userRolesAsyncWithHttpInfo($user_id, $fields, $direct_association_only)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRoles_0Async($user_id)\n {\n return $this->userRoles_0AsyncWithHttpInfo($user_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function userRolesWithHttpInfo($user_id, $virtual_operator)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserRolesOutputDto';\n $request = $this->userRolesRequest($user_id, $virtual_operator);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserRolesOutputDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function setRoles(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Iam\\Admin\\V1\\Role::class);\n $this->roles = $arr;\n }",
"public function getAllRolesWithHttpInfo()\n {\n $request = $this->getAllRolesRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\TalonOne\\Client\\Model\\InlineResponse20030' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\TalonOne\\Client\\Model\\InlineResponse20030', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\TalonOne\\Client\\Model\\InlineResponse20030';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\TalonOne\\Client\\Model\\InlineResponse20030',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function updateAisleAsyncWithHttpInfo($body)\n {\n $returnType = '';\n $request = $this->updateAisleRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function updateRole($userId, $roles)\n {\n $this->model->find($userId)->roles()->sync([]);\n $this->setRole($userId, $roles);\n }",
"public function renameUserAsyncWithHttpInfo($username = null, $newname = null)\n {\n $returnType = '\\CrowdClient\\Model\\CwdUser';\n $request = $this->renameUserRequest($username, $newname);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }"
] | [
"0.6627097",
"0.63791764",
"0.6310602",
"0.6293682",
"0.6141357",
"0.60618037",
"0.5775134",
"0.56291056",
"0.56095845",
"0.5476857",
"0.5430703",
"0.5407274",
"0.5389947",
"0.5372652",
"0.52069044",
"0.5183",
"0.51821357",
"0.5151734",
"0.5127322",
"0.5101922",
"0.50875014",
"0.50856024",
"0.5071397",
"0.5030242",
"0.5021401",
"0.50070244",
"0.49973282",
"0.4947073",
"0.49162",
"0.49109796"
] | 0.7281972 | 0 |
Create request for operation 'userUpdateRoles' | protected function userUpdateRolesRequest($user_id, $roles)
{
// verify the required parameter 'user_id' is set
if ($user_id === null) {
throw new \InvalidArgumentException(
'Missing the required parameter $user_id when calling userUpdateRoles'
);
}
// verify the required parameter 'roles' is set
if ($roles === null) {
throw new \InvalidArgumentException(
'Missing the required parameter $roles when calling userUpdateRoles'
);
}
$resourcePath = '/api/users/{userId}/roles';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($user_id !== null) {
$resourcePath = str_replace(
'{' . 'userId' . '}',
ObjectSerializer::toPathValue($user_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($roles)) {
$_tempBody = $roles;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json', 'text/json', 'application/xml', 'text/xml']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json', 'text/json', 'application/xml', 'text/xml'],
['application/json', 'text/json', 'application/x-www-form-urlencoded']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
$httpBody = $_tempBody;
// \stdClass has no __toString(), so we should encode it manually
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($httpBody);
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValue
];
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$query = \GuzzleHttp\Psr7\build_query($queryParams);
return new Request(
'PUT',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function AjaxRole(Request $requests){\n\n $user = User::Where('id', $requests->id)->update(\n [\n \n \"user_role\" => $request->user_roles\n ]\n );\n\n }",
"public static function _bulkUserRoleEdit() {\n\t\tif ( ! empty( $_GET[ stripslashes( __CLASS__ ) . '-nonce' ] ) && wp_verify_nonce(\n\t\t\t\tfilter_input( INPUT_GET, stripslashes( __CLASS__ ) . '-nonce', FILTER_SANITIZE_STRING ),\n\t\t\t\t__FILE__ . get_current_user_id() . __CLASS__\n\t\t\t)\n\t\t) {\n\t\t\t$addRole = filter_input( INPUT_GET, stripslashes( __CLASS__ ) . '-add-role', FILTER_SANITIZE_STRING );\n\t\t\t$removeRole = filter_input( INPUT_GET, stripslashes( __CLASS__ ) . '-remove-role', FILTER_SANITIZE_STRING );\n\t\t\t$userIds = array_map( 'absint', (array) filter_input( INPUT_GET, 'users', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ) );\n\n\t\t\tif ( ! empty( $userIds ) && ( ! empty( $addRole ) || ! empty( $removeRole ) ) ) {\n\t\t\t\t// Loop through all selected users and verify current user can edit them.\n\t\t\t\tforeach ( $userIds as $userId ) {\n\t\t\t\t\t// Verify user has permission to promote the user\n\t\t\t\t\tif ( ! current_user_can( 'promote_user', $userId ) ) {\n\t\t\t\t\t\twp_die( sprintf(\n\t\t\t\t\t\t/* Translator note: %d is the user ID that cannot be edited. */\n\t\t\t\t\t\t\tesc_html__( 'You can\\'t edit user with ID %d', 'dfwood-wp-multiple-roles' ),\n\t\t\t\t\t\t\t$userId\n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the user doesn't already belong to the blog, bail.\n\t\t\t\t\tif ( is_multisite() && ! is_user_member_of_blog( $userId ) ) {\n\t\t\t\t\t\twp_die(\n\t\t\t\t\t\t\t'<h1>' . esc_html__( 'Cheatin’ uh?', 'dfwood-wp-multiple-roles' ) . '</h1>' .\n\t\t\t\t\t\t\t'<p>' . esc_html__( 'One of the selected users is not a member of this site.', 'dfwood-wp-multiple-roles' ) . '</p>',\n\t\t\t\t\t\t\t403\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Verify the user isn't trying to promote themselves, prevents accidental loss of privileges.\n\t\t\t\t\tif ( get_current_user_id() === $userId ) {\n\t\t\t\t\t\twp_die( esc_html__( 'You are not allowed to edit your own user role(s)!', 'dfwood-wp-multiple-roles' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If we make it here, then there are no known issues adding/removing requested roles.\n\t\t\t\t// We are doing a second loop to avoid updating any users if we can't update all of them.\n\t\t\t\tforeach ( $userIds as $userId ) {\n\t\t\t\t\t$user = get_userdata( $userId );\n\n\t\t\t\t\tif ( ! empty( $addRole ) ) {\n\t\t\t\t\t\t$user->add_role( $addRole );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! empty( $removeRole ) ) {\n\t\t\t\t\t\t$user->remove_role( $removeRole );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Go back to the users page, ensure our GET args are cleared out and show confirmation message.\n\t\t\t\twp_safe_redirect( add_query_arg( 'update', 'promote', admin_url( 'users.php' ) ) );\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t}",
"protected function setUserRolesRequest($user_id, $body, $fields = null)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null || (is_array($user_id) && count($user_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling setUserRoles'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling setUserRoles'\n );\n }\n\n $resourcePath = '/users/{user_id}/roles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($fields !== null) {\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\n }\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'user_id' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function update(RolesRequest $request)\n {\n $role = UserRole::where('id',$request['roleID'])->first();\n $role->name = $request['name'];\n $role->updated_by = \\Auth::user()->id;\n $role->save();\n \\Session::flash('success', 'well done! User Group '.$request['name'].' has been successfully updated!');\n return redirect()->back();\n }",
"public function updateRoles($payload,$Roles_id, $request,$type='all')\n {\n try {\n $Roleslist = $this->getRolesbyId($Roles_id);\n\n // update Value\n if($type==\"all\")\n {\n /* $RolesImageArray=(!isset( $payload['imageName'])) ? array() : $this->uploadBase64Image( $payload['imageName']);\n $image = (!isset( $RolesImageArray['secure_url'])) ?\"\" : $RolesImageArray['secure_url'];\n \n if(isset($imageArray['secure_url']) && $imageArray['secure_url']) {\n $introgallery->imageName = $imageArray['secure_url'];\n } */\n\n $Roleslist->RoleName = $payload['RoleName'];\n $Roleslist->RoleDesc = $payload['RoleDesc'];\n $Roleslist->ModifiedId = $payload['ModifiedId'];\n }\n if($type==\"active\")\n {\n $Roleslist->IsActive = $payload['IsActive'];\n }\n if($type==\"delete\")\n {\n $Roleslist->IsDelete = $payload['IsDelete'];\n }\n\n $Roleslist->save();\n return $Roleslist;\n\n } catch (Exception $e) {\n \n throw new RoleException('Exception thrown while trying to update Roles', 50001001);\n } \n }",
"public function update(Request $request, RoleUser $roleuser)\n {\n //\n }",
"public function update(UpdateUser $request, User $user)\n {\n // Validate and retrieve only the updated fields \n $validatedInput = $request->validated();\n\n // Retreive all roles\n $roles = $request['roles']; \n $user->fill($validatedInput)->save();\n\n if(isset($roles)) \n { \n // If one or more role is selected associate user to roles \n $user->roles()->sync($roles); \n } \n else \n {\n // If no role is selected remove exisiting role associated to a user\n $user->roles()->detach(); \n }\n\n return response()->json([\n 'message' => \"User successfully edited\",\n 'user' => $user,\n ]);\n }",
"public function update(Request $request, User $user)\n {\n $roles = $request['roles']; //Retrieving the roles field\n $roles[] = 3; // Always give Authenticated role to all users\n if ($user->id == 1) {\n $roles[] = 1; // Always give Super Admin role to user with ID = 1\n }\n\n //Checking if a role was selected\n $user_guards = Guard::getNames($user)->toArray();\n if (isset($roles)) {\n $user->syncRoles(null);\n foreach ($roles as $role_id) {\n $role = Role::find($role_id);\n if (in_array($role->guard_name, $user_guards)) {\n $user->assignRole($role);\n }\n }\n } else {\n $user->syncRoles(null);\n }\n\n return redirect()->route('user.list')\n ->with('success', __('User role updated successfully.'));\n }",
"public function testUpdateUserRoles()\n {\n /* @var $user User */\n $user = $this->getModule('Yii2')->grabFixture('users', 'activeUser1');\n $this->assertTrue($this->userModule->updateUserRoles($user, []));\n $this->assertEmpty($user->getUserRoles());\n $this->assertTrue($this->userModule->updateUserRoles($user, ['admin']));\n $this->assertContains('admin', $user->getUserRoles());\n\n return $user;\n }",
"public function createRoles();",
"public function update(Request $request, User $user)\n {\n $user->roles()->sync($request->roles);\n return redirect()->route('admin.users.index',compact('user'))->with('info2','¡Se le asigno un nuevo role al usuario! ');\n }",
"public function testAlterRoleIdPost()\n {\n $this->utility->impersonate('administrator');\n\n $this->_createTestRole();\n \n $params = array(\n 'id' => 'myrole_altered',\n 'users' => array('joe', 'bob')\n );\n $this->resetRequest()\n ->resetResponse();\n $this->request->setParam('id', 'myrole');\n $this->request->setMethod('POST');\n $this->request->setPost($params);\n $this->dispatch('/user/role/edit');\n\n $this->assertModule('user', \"Expected user module when editing a role 'myrole'.\");\n $this->assertController('role', \"Expected role module when editing a role 'myrole'.\");\n $this->assertAction('edit', \"Expected edit action when editing a role 'myrole'.\");\n\n // ensure that id has not been changed\n $this->assertTrue(\n P4Cms_Acl_Role::exists('myrole'),\n \"Expected myrole has not been deleted.\"\n );\n $this->assertFalse(\n P4Cms_Acl_Role::exists($params['id']),\n \"Expected new role has not been created.\"\n );\n\n // verify that users have been altered\n $roleUsers = P4Cms_Acl_Role::fetch('myrole')->getUsers();\n $this->assertSame(\n 2,\n count($roleUsers),\n 'Expected role has 2 users after edit'\n );\n $this->assertTrue(\n in_array('joe', $roleUsers),\n \"Expected joe has the role\"\n );\n $this->assertTrue(\n in_array('bob', $roleUsers),\n \"Expected bob has the role\"\n );\n }",
"public function updateRole(Request $request)\n {\n $user = User::where('id',$request->user_id)->update(['role_id' => 1]);\n return $user;\n }",
"public function update(Request $request, User $user)\n {\n $user->roles()->sync([]);\n $roles = $request->request->get(\"role\");\n\n foreach ($roles as $role) {\n $user->roles()->attach($role);\n }\n\n return redirect()->back();\n }",
"public function update(Request $request, User $user)\n {\n $roles=$request->only('roles')['roles'];\n $user->roles()->sync($roles);\n $user->syncPermissions();\n\n return redirect('/users')->withStatus('Updated roles for the user');\n }",
"public function actionUpdate()\n {\n\n\n $model = new RoleForm(['scenario' => RoleForm::SCENARIO_UPDATE]);\n $model->load(\\Yii::$app->request->post());\n if (!$model->validate()) {\n $this->setBadRequest();\n return $model->getErrors();\n }\n\n Authorize::checkPermission('updateRole', $model->getRole()->toArray());\n\n $data = $model->update();\n $this->setStatusUpdated();\n return $data;\n }",
"public function updateRoles()\n\t{\n\t\t$this->db->select(\"userroles.*\");\n\t\t$this->db->from(\"userroles\");\n\t\t$this->db->where(\"userroles.userID=\",$this->userID);\n\t\t$roles = $this->db->get();\n\t\t\n\t\tif($roles->num_rows())\n\t\t{\n\t\t\tforeach($roles->result() as $role) {\n\t\t\t\t$this->userrole_model->id = $role->id;\n\t\t\t\t$this->userrole_model->deleteRecord();\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->saveRoles();\n\t}",
"public function saveUserRoles() {\n foreach ($this->input->post() as $k => $v) {\n if (substr($k, 0, 5) == \"role_\") {\n $roleID = str_replace(\"role_\", \"\", $k);\n if ($v == '0' || $v == 'x') {\n $strSQL = sprintf(\"DELETE FROM `employee_roles` WHERE `userID` = %u AND `roleID` = %u\", $_POST['userID'], $roleID);\n } else {\n $strSQL = sprintf(\"REPLACE INTO `employee_roles` SET `userID` = %u, `roleID` = %u, `addDate` = '%s'\", $_POST['userID'], $roleID, date(\"Y-m-d H:i:s\"));\n }\n $this->db->query($strSQL);\n }\n }\n }",
"public function updateRole($id, Request $request)\r\n {\r\n if(\\Auth::user()->can('user.admin')){\r\n /* Check role deleted befor update */\r\n $roleIds = $request->get('roleIds', []);\r\n $countRole = RoleModel::whereIn('id', $roleIds)->count();\r\n if($countRole != count($roleIds)) {\r\n return new JsonResponse(['status' => 0, 'message' => 'One of roles is deleted']);\r\n }\r\n\r\n /* Check has user */\r\n $user = UserModel::find($id);\r\n if(empty($user)){\r\n abort('User not found');\r\n }\r\n\r\n /* Update role of user */\r\n $status = $user->roles()->sync($roleIds);\r\n }\r\n return;\r\n }",
"public function update(Request $request)\n {\n //\n $role = new RbacRole();\n $role->rolename = $request->get('rolename');\n $role->pid = $request->get('pid',0);\n $role->save();\n RbacLog::logIds($role->role_id);\n return $this->success(route('admin.roles'));\n return ['msg'=>'修改成功','error'=>true];\n }",
"public function update(UpdateRequest $request, UserRole $userRole): JsonResponse\n {\n $request->validated();\n $userRole->name = $request->get('name');\n $userRole->dashboard_access = $request->get('dashboard_access');\n $userRole->permissions = json_encode(str_replace('\\'\"', '\"', $request->get('permissions')), JSON_THROW_ON_ERROR);\n if ($userRole->save()) {\n return response()->json(['message' => 'Data updated correctly', 'userRole' => new UserRoleEditResource($userRole)]);\n }\n return response()->json(['message' => __('An error occurred while saving data')], 500);\n }",
"public function add_update_role(Request $request){\n\n //return $request;\n $title = $request->title;\n $level = $request->level;\n $form_type = $request->form_type;\n $form_id = $request->form_id;\n\n if($request->is_new){\n $role = new Role();\n $status = \"created\";\n }\n else{\n \n $role = Role::find($request->id);\n $status = \"updated\";\n }\n\n $role->title = $title;\n $role->level = $level;\n $role->form_type = $form_type;\n $role->form_id = $form_id;\n $role->save();\n\n return $status;\n \n }",
"function changeRole(){\n \n global $REQUEST;\n \n //check if anybody is logged in\n if(!isset($_SESSION['isLogged']) || $_SESSION['isLogged'] === false ) {\n return array(\"success\"=>false,\"message\"=>\"Nobody is Logged In\");\n }\n \n //check if logged user on server is the same as logged user in coockies\n if(!isset($REQUEST['id'],$_SESSION['userId'],$_SESSION['role']) || empty($REQUEST['id']) || \n empty($_SESSION['userId']) || $REQUEST['id'] !== $_SESSION['userId'] ){\n return array(\"success\"=>false,\"message\"=>\"Logged User cannot be determined!\");\n }\n \n //check if logged user is admin\n if($_SESSION['role'] !== 'admin'){\n return array(\"success\"=>false,\"message\"=>\"Only admin can change roles!\");\n }\n \n //check if all required fields was provided from UI\n if(!isset($REQUEST['targetUserId'],$REQUEST['role']) || empty($REQUEST['targetUserId']) || empty($REQUEST['role'])){\n return array(\"success\"=>false,\"message\"=>\"Missing required fileds!\");\n }\n \n //check new role\n if($REQUEST['role'] !== 'admin' && $REQUEST['role'] !== 'user' ){\n return array(\"success\"=>false,\"message\"=>\"New role is not valid!\");\n }\n \n $REQUEST['last_modified'] = $this->currentDate; //create last-modified field and assign current date to it\n $dbResult = $this->userModel->updateRole($REQUEST); //call update role method which provides access to DB\n \n //process DB response\n if($dbResult['rowsAffected'] == 1){\n return array(\"success\"=>true,\"message\"=>\"Role changed successfully!\");\n }else if($dbResult['rowsAffected'] == 0){\n return array(\"success\"=>false,\"message\"=>\"Role could not be changed!\",\"error\"=>$dbResult['error']);\n }else{\n return array(\"success\"=>false,\"message\"=>\"Something bad happend.Probably more than 1 Role changed!\");\n }\n \n }",
"public function update(UserRoleFormRequest $request, $id)\n {\n //\n }",
"public function updateRoles($rolesToAdd,User $user)\n {\n $rolesActuel = $user->roles()->pluck('id')->toArray();\n $rolesToDelete = array_diff($rolesActuel,$rolesToAdd);\n\n // Suppression des roles non voulu\n foreach ($rolesToDelete as $roleId) {\n $user->removeRole(Role::findOrFail($roleId));\n }\n\n // Ajout des roles voulu\n foreach ($rolesToAdd as $roleId) {\n $user->assignRole(Role::findOrFail($roleId));\n }\n }",
"public function update(Request $request)\n {\n\n $user = User::find($request['editid']);\n\n $data = request()->validate([\n 'editid'=>'required',\n 'rolid'=>'required',\n 'password'=>'required',\n 'cargo'=>'required',\n ],[\n 'password.unique'=>'Ingrese otra contraseña',\n 'cargo.unique'=>'Ingrese Otro cargo'\n\n ]);\n\n $user->update([\n 'password'=>$data['password'],\n 'cargo_id'=>$data['cargo'],\n ]);\n //falta asignar roles al usuario\n $rol = Role::find($data['rolid']);\n\n $roles = array($rol->id);\n\n $user->roles()->sync($roles);\n\n $user->save();\n\n\n return response()->json([\n 'mensaje'=> $user->toArray()\n ]);\n\n\n }",
"public function update(UpdateRole $request, User $user)\n {\n $user->roles()->sync([$request->get('role')]);\n\n return response()->json();\n }",
"public function setRolesAttribute($value): void;",
"public function editAction() {\n if ($this->getRequest()->isPost()) {\n $data = $this->getRequestData();\n \n $user = $this->tokenPayload;\n $role = $this->entityManager->getRepository(Role::class)\n ->find($data['id']);\n \n if(isset($data['id']) && $role) {\n //Create New Form Permission\n $form = new RoleForm('update', $this->entityManager, $role);\n $form->setData($data);\n if ($form->isValid()) {\n $data = $form->getData(); \n $this->roleManager->updateRole($role, $data, $user); \n $this->error_code = 1;\n $this->apiResponse['message'] = \"You have modified Role!\";\n } else {\n $this->error_code = 0;\n $this->apiResponse['data'] = $form->getMessages(); \n } \n } else {\n $this->error_code = 0;\n $this->apiResponse['message'] = 'NOT_FOUND'; \n } \n \n } \n \n return $this->createResponse();\n }",
"public function update_user_role()\n {\n $id = $this->input->post('role_id');\n $user_role = $this->input->post('user_type');\n $permissions = $this->input->post('permissions');\n $permissions = implode(',', $permissions);\n $data = array(\n 'user_role' => $user_role,\n 'user_permissions' => $permissions\n );\n $this->User_model->update_user_role($id, $data);\n $this->session->set_flashdata('SUCCESSMSG', 'Update Successfully');\n redirect('userrights/userrights_edit/' . $id);\n }"
] | [
"0.674551",
"0.6483874",
"0.6319605",
"0.62834585",
"0.6253572",
"0.6239083",
"0.62136656",
"0.621199",
"0.61275303",
"0.6115586",
"0.61141014",
"0.60729754",
"0.6055186",
"0.6007366",
"0.60022265",
"0.60010546",
"0.59982663",
"0.5970078",
"0.59681004",
"0.59625363",
"0.594226",
"0.59367204",
"0.5931712",
"0.5922983",
"0.5921711",
"0.59116715",
"0.5911203",
"0.5910523",
"0.58618784",
"0.58375794"
] | 0.7119775 | 0 |
Subsets and Splits