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
Get PSR7 Response factory.
public function getResponseFactory() { if (!$this->responseFactory) { $this->responseFactory = new GuzzleResponseFactory(); } return $this->responseFactory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResponseFactory()\n {\n return $this->responseFactory;\n }", "public function response()\n {\n return app(ResponseFactory::class);\n }", "protected function registerResponseFactory()\n {\n $this->app->singleton('api.response', function ($app) {\n return new ResponseFactory($app['api.transformer']);\n });\n }", "public function getPsr7Response(): ResponseInterface\n {\n $this->trigger(self::EVENT_BEFORE_SEND);\n $this->prepare();\n $this->trigger(self::EVENT_AFTER_PREPARE);\n $stream = $this->getPsr7Content();\n\n // If a session is defined transform it into a `yii\\web\\Cookie` instance then close the session.\n if (($session = Yii::$app->getSession()) !== null) {\n $this->cookies->add(\n new Cookie(\n [\n 'name' => $session->getName(),\n 'value' => $session->id,\n 'path' => ini_get('session.cookie_path')\n ]\n )\n );\n $session->close();\n }\n\n $response = new Response(\n $stream,\n $this->getStatusCode()\n );\n\n // Manually set headers to ensure array headers are added.\n foreach ($this->getPsr7Headers() as $header => $value) {\n if (\\is_array($header)) {\n foreach ($header as $v) {\n $response = $response->withAddedHeader($header, $v);\n }\n } else {\n $response = $response->withHeader($header, $value);\n }\n }\n\n\n $this->trigger(self::EVENT_AFTER_SEND);\n $this->isSent = true;\n\n return $response;\n }", "public function newResponse()\n {\n return new \\Jaxon\\Response\\Response();\n }", "public function setResponseFactory(ResponseFactory $factory);", "public function newResponse()\n {\n return new Response();\n }", "function response($content = '', $status = 200, array $headers = [])\n{\n $factory = new App\\Http\\ResponseFactory;\n\n if (func_num_args() === 0) {\n return $factory;\n }\n\n return $factory->make($content, $status, $headers);\n}", "public function getResponseParser()\n {\n return new ResponseParser();\n }", "public static function httpResponseFactory(): ?object;", "protected function newResponse() {\n return new Response;\n\t}", "public static function createInstance()\n {\n return new WebClientResponse();\n }", "public function getFactory() {}", "public function newResponse(): Response\n {\n return $this->di()->newResponse();\n }", "public function getStreamFactory()\n {\n if (!$this->streamFactory) {\n $this->streamFactory = new GuzzleStreamFactory();\n }\n\n return $this->streamFactory;\n }", "public static function factory()\n {\n return parent::factory(__CLASS__);\n }", "public static function httpResponseFactories(): array;", "public function getNewResponse()\n {\n return new Response();\n }", "public function getFactory()\n {\n return new Factory($this);\n }", "public static function make(){\n return new ApiResponse();\n }", "protected function registerResponseFactories()\n {\n $this->app->singleton( 'responder.success', function () {\n return new SuccessResponseFactory( $this->config->get( 'responder.status_code' ) );\n } );\n\n $this->app->singleton( 'responder.error', function () {\n return new ErrorResponseFactory( $this->config->get( 'responder.status_code' ) );\n } );\n }", "public function getResponse()\n {\n $response = null;\n\n switch ($this->getAcceptHeader()) {\n case 'application/json':\n $response = new ResponseJson();\n break;\n case 'application/xml':\n $response = new ResponseXml();\n break;\n default:\n $response = new ResponseJson();\n break;\n }\n\n return $response;\n }", "private function buildResponse()\n {\n $response = new Response();\n $headers = $this->getMock('Symfony\\Component\\HttpFoundation\\HeaderBag');\n $response->headers = $headers;\n\n return $response;\n }", "public function factory()\n {\n return $this->factory;\n }", "public function getResponseFormatterClass(): SolrResponse\n {\n $responseModel = new SolrNormalResponse();\n foreach (self::$FORMATTER_MAPPING as $mappingItem) {\n [$value, $formatter] = $mappingItem;\n\n if ($value) {\n $responseModel = new $formatter();\n break;\n }\n }\n $responseModel->_response = $this->_response;\n return $responseModel;\n }", "public function getOutputFactory(): OutputFactory;", "protected function createResponseMock()\n {\n return $this->getMock('Ivory\\HttpAdapter\\Message\\ResponseInterface');\n }", "static function getInstance(){\n if(!isset(self::$instance)){\n self::$instance = new Response();\n }\n return self::$instance;\n }", "public function factory()\n {\n return Factory::inst();\n }", "public function buildHttpFactory(): HttpFactory\n {\n return $this->httpFactory = $this->httpFactory ?? new HttpFactory();\n }" ]
[ "0.77050656", "0.7341115", "0.66529614", "0.65916085", "0.6374093", "0.62577206", "0.61928487", "0.61875874", "0.61322975", "0.6094078", "0.6046554", "0.5881671", "0.5873229", "0.5852064", "0.5851518", "0.5837982", "0.5811513", "0.58085316", "0.5776631", "0.5773396", "0.57682234", "0.57657665", "0.57538545", "0.57429785", "0.57404107", "0.57206464", "0.5720178", "0.56970024", "0.5687599", "0.5674655" ]
0.7691964
1
Barcode service. Automatically load the barcode service
public function getBarcodeService() { if (!$this->barcodeService) { $this->setBarcodeService(new BarcodeService($this)); } return $this->barcodeService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBarcodeService(BarcodeServiceInterface $service)\n {\n $this->barcodeService = $service;\n }", "public function getGenerateBarcode();", "public function __construct()\n {\n $this->brandService = new BrandService(Brand::class);\n }", "protected function getFixtureB417Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB417'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB417();\n }", "public function find_product_by_barcode($bar_code){\n\t echo json_encode($this->products->search_product_by_barcode($bar_code));\n\t}", "public function generatebarcodeAction(){\n //read the last barcode value generated\n $lastBC = $this->doctrine->getRepository('Warehouse\\Entity\\Appsettings')->findByReference($this->config['app_settings_entry']['last_barcode_auto_generated']);\n $lastGeneratedBarCode = $lastBC[0]->getSettingvalue() + 1;\n\n //calculated the EAN13 barcode value\n $arrBC = str_split($lastGeneratedBarCode);\n //add odd numbers with weight factor = 1\n $odd = 0;\n for ($i=0;$i<11;$i = $i+2){\n $odd = $odd + $arrBC[$i];\n }\n //add even numbers with weight factor = 3\n $even = 0;\n for ($i=1;$i<12;$i = $i+2){\n $even = $even + ($arrBC[$i] * 3);\n }\n //add odd and even total\n $total = $odd + $even;\n //calculate the rest of the division by 10\n $rest = $total % 10;\n //if the rest is equals to 0, the barcode key is 0\n if ($rest == 0) $newBarCode = $lastGeneratedBarCode . $rest;\n else {\n $key = 10 - $rest;\n $newBarCode = $lastGeneratedBarCode . $key;\n }\n $lastBC[0]->setSettingValue(strval($lastGeneratedBarCode));\n $this->doctrine->persist($lastBC[0]);\n $this->doctrine->flush();\n\n return new JsonModel([\n 'newbarcode' => $newBarCode,\n ]);\n }", "public function service();", "protected function getFixtureB485Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB485'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB485();\n }", "protected function getFixtureB816Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB816'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB816();\n }", "protected function getFixtureB949Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB949'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB949();\n }", "protected function getFixtureB48Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB48'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB48();\n }", "public function barcodeAction(){\n $id = $this->params()->fromRoute('id', 0);\n Barcode::render(\n 'ean13',\n 'image',\n ['text' => substr($id, 0, 12)],\n []\n );\n return true;\n }", "protected function getFixtureB483Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB483'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB483();\n }", "private function setServiceCode()\r\n {\r\n\r\n }", "public function mk_barcode(){\n $path=$this->input->post('path');\n $receive = filter_input(INPUT_POST, 'data');\n $data = json_decode($receive, TRUE); // json object to array\n //echo $this->action->add(\"message\", $data);\n\n\n\n //Bar code generating Start here----------------\n $font = './private/fonts/arialbd.ttf';\n // - -\n\n $fontSize = 12; // GD1 in px ; GD2 in point\n $marge = 10; // between barcode and hri in pixel\n $x = $data[\"x_pos\"]; // barcode center\n $y = $data[\"y_pos\"];; // barcode center\n $height = $data[\"b_height\"]; // barcode height in 1D ; module size in 2D\n $width = $data[\"bar_width\"]; // barcode height in 1D ; not use in 2D\n //$width = 2; // barcode height in 1D ; not use in 2D\n $angle = 0; // rotation in degrees : nb : non horizontable barcode might not be usable because of pixelisation\n\n $code = $data[\"test_data\"]; // barcode, of course ;)\n $type = $data[\"code_type\"];\n\n // -------------------------------------------------- //\n // USEFUL\n // -------------------------------------------------- //\n\n // -------------------------------------------------- //\n // ALLOCATE GD RESSOURCE\n // -------------------------------------------------- //\n $im = imagecreatetruecolor($data[\"im_width\"], $data[\"im_height\"]);\n $black = ImageColorAllocate($im,0x00,0x00,0x00);\n $white = ImageColorAllocate($im,0xff,0xff,0xff);\n $red = ImageColorAllocate($im,0xff,0x00,0x00);\n $blue = ImageColorAllocate($im,0x00,0x00,0xff);\n imagefilledrectangle($im, 0, 0, $data[\"im_width\"], $data[\"im_height\"], $white);\n\n // -------------------------------------------------- //\n // BARCODE\n // -------------------------------------------------- //\n $data = Barcode::gd($im, $black, $x, $y, $angle, $type, array('code'=>$code), $width, $height);\n\n // -------------------------------------------------- //\n // HRI (Human readable Interpretation)\n // -------------------------------------------------- //\n if ( isset($font) ){\n $box = imagettfbbox($fontSize, 0, $font, $data['hri']);\n $len = $box[2] - $box[0];\n Barcode::rotate(-$len / 2, ($data['height'] / 2) + $fontSize + $marge, $angle, $xt, $yt);\n imagettftext($im, $fontSize, $angle, $x + $xt, $y + $yt, $black, $font, $data['hri']);\n }\n\n //imagepng($im);\n //header('Content-type: image/png');\n //header('Content-Disposition: attachment; filename='.$code.'.png');\n //addFile(header('Content-Disposition: attachment; filename='.$code.'.png'));\n $random_num=rand();\n $success=imagepng($im, './public/barcode/'.$random_num.image_type_to_extension(IMAGETYPE_PNG));\n imagedestroy($im);\n // echo $code. image_type_to_extension(IMAGETYPE_PNG);\n echo $random_num.image_type_to_extension(IMAGETYPE_PNG);\n //Bar code generating End here----------------\n }", "function __construct()\n {\n parent::__construct();\n $this->load->library('sap_invoice');\n }", "public function ajax_barcode_gen(){\n\n\t$code = $this->input->post(\"code\");\n $receive = $this->action->read(\"patient_barcode\");\n $data = $receive[0];\n\n //Bar code generating Start here----------------\n $font = './private/fonts/arialbd.ttf';\n // - -\n\n $fontSize = 12; // GD1 in px ; GD2 in point\n $marge = 10; // between barcode and hri in pixel\n $x = $data->pos_x; // barcode center\n $y = $data->pos_y;; // barcode center\n $height = $data->code_height; // barcode height in 1D ; module size in 2D\n $width = $data->code_width; // barcode height in 1D ; not use in 2D\n //$width = 2; // barcode height in 1D ; not use in 2D\n $angle = 0; // rotation in degrees : nb : non horizontable barcode might not be usable because of pixelisation\n\n $code = $code; // barcode, of course ;)\n $type = $data->code_type;\n\n // -------------------------------------------------- //\n // USEFUL\n // -------------------------------------------------- //\n\n // -------------------------------------------------- //\n // ALLOCATE GD RESSOURCE\n // -------------------------------------------------- //\n $im = imagecreatetruecolor($data->img_width, $data->img_height);\n $black = ImageColorAllocate($im,0x00,0x00,0x00);\n $white = ImageColorAllocate($im,0xff,0xff,0xff);\n $red = ImageColorAllocate($im,0xff,0x00,0x00);\n $blue = ImageColorAllocate($im,0x00,0x00,0xff);\n imagefilledrectangle($im, 0, 0, $data->img_width, $data->img_height, $white);\n\n // -------------------------------------------------- //\n // BARCODE\n // -------------------------------------------------- //\n $data = Barcode::gd($im, $black, $x, $y, $angle, $type, array('code'=>$code), $width, $height);\n\n // -------------------------------------------------- //\n // HRI (Human readable Interpretation)\n // -------------------------------------------------- //\n if ( isset($font) ){\n $box = imagettfbbox($fontSize, 0, $font, $code);\n $len = $box[2] - $box[0];\n Barcode::rotate(-$len / 2, ($data['height'] / 2) + $fontSize + $marge, $angle, $xt, $yt);\n imagettftext($im, $fontSize, $angle, $x + $xt, $y + $yt, $black, $font, $code);\n }\n\n $url = './public/uploaded_barcode/'.$code.image_type_to_extension(IMAGETYPE_PNG);\n $success=imagepng($im,$url);\n\t if($success){\n\t \techo $url;\n\t }\n imagedestroy($im);\n // echo $code. image_type_to_extension(IMAGETYPE_PNG);\n // echo $random_num.image_type_to_extension(IMAGETYPE_PNG);\n // Bar code generating End here----------------\n}", "public function save_barcode(){\n $receive = filter_input(INPUT_POST, 'data');\n $data = json_decode($receive, TRUE); // json object to array\n //echo $this->action->add(\"message\", $data);\n\n //Bar code generating Start here----------------\n $font = './private/fonts/arialbd.ttf';\n // - -\n\n $fontSize = 12; // GD1 in px ; GD2 in point\n $marge = 10; // between barcode and hri in pixel\n $x = $data[\"x_pos\"]; // barcode center\n $y = $data[\"y_pos\"];; // barcode center\n $height = $data[\"b_height\"]; // barcode height in 1D ; module size in 2D\n $width = $data[\"bar_width\"]; // barcode height in 1D ; not use in 2D\n //$width = 2; // barcode height in 1D ; not use in 2D\n $angle = 0; // rotation in degrees : nb : non horizontable barcode might not be usable because of pixelisation\n\n $code = $data[\"test_data\"]; // barcode, of course ;)\n $type = $data[\"code_type\"];\n\n // -------------------------------------------------- //\n // USEFUL\n // -------------------------------------------------- //\n\n // -------------------------------------------------- //\n // ALLOCATE GD RESSOURCE\n // -------------------------------------------------- //\n $im = imagecreatetruecolor($data[\"im_width\"], $data[\"im_height\"]);\n $black = ImageColorAllocate($im,0x00,0x00,0x00);\n $white = ImageColorAllocate($im,0xff,0xff,0xff);\n $red = ImageColorAllocate($im,0xff,0x00,0x00);\n $blue = ImageColorAllocate($im,0x00,0x00,0xff);\n imagefilledrectangle($im, 0, 0, $data[\"im_width\"], $data[\"im_height\"], $white);\n\n // -------------------------------------------------- //\n // BARCODE\n // -------------------------------------------------- //\n $data = Barcode::gd($im, $black, $x, $y, $angle, $type, array('code'=>$code), $width, $height);\n\n // -------------------------------------------------- //\n // HRI (Human readable Interpretation)\n // -------------------------------------------------- //\n if ( isset($font) ){\n $box = imagettfbbox($fontSize, 0, $font, $data['hri']);\n $len = $box[2] - $box[0];\n Barcode::rotate(-$len / 2, ($data['height'] / 2) + $fontSize + $marge, $angle, $xt, $yt);\n imagettftext($im, $fontSize, $angle, $x + $xt, $y + $yt, $black, $font, $data['hri']);\n }\n\n //imagepng($im);\n //header('Content-type: image/png');\n //header('Content-Disposition: attachment; filename='.$code.'.png');\n //addFile(header('Content-Disposition: attachment; filename='.$code.'.png'));\n $random_num=rand();\n $success=imagepng($im, './public/uploaded_barcode/'.$data['hri'].image_type_to_extension(IMAGETYPE_PNG));\n imagedestroy($im);\n // echo $code. image_type_to_extension(IMAGETYPE_PNG);\n echo $random_num.image_type_to_extension(IMAGETYPE_PNG);\n //Bar code generating End here----------------\n }", "public function init()\n {\n// $service->handle();\n }", "protected function getFixtureB815Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB815'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB815();\n }", "public static function barcode(): string\n {\n return 'barcode';\n }", "abstract protected function _getService($key);", "protected function getFixtureB479Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB479'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB479();\n }", "protected function getFixtureB939Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB939'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB939();\n }", "public function getService() {}", "protected function getFixtureB159Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB159'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB159();\n }", "public function registerServices() {\n\t\t$this->app->bind('twilio.client.inbound', function ($app, $parameters): SMSReader {\n\t\t\treturn new SMSReader(default_company('sms_sid'), default_company('sms_auth_token'));\n\t\t});\n\t}", "protected function getFixtureB232Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB232'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB232();\n }", "protected function getFixtureB911Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB911'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB911();\n }", "protected function getFixtureB419Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB419'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB419();\n }" ]
[ "0.68090147", "0.5864804", "0.5611011", "0.5569802", "0.5330328", "0.53230506", "0.52937275", "0.52720666", "0.5244297", "0.5233375", "0.52253735", "0.52231765", "0.5221877", "0.521721", "0.5217188", "0.5198426", "0.51969934", "0.5196416", "0.51797676", "0.5168661", "0.5160123", "0.5156383", "0.51480633", "0.51459974", "0.513585", "0.51327795", "0.5120077", "0.5117079", "0.51110023", "0.5108781" ]
0.7149117
0
Set the barcode service.
public function setBarcodeService(BarcodeServiceInterface $service) { $this->barcodeService = $service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setServiceCode()\r\n {\r\n\r\n }", "public function setService( $service )\n {\n $this->service = $service;\n }", "public function setService($service)\n {\n $this->service = $service;\n }", "public function setService($var) {}", "public function getBarcodeService()\n {\n if (!$this->barcodeService) {\n $this->setBarcodeService(new BarcodeService($this));\n }\n\n return $this->barcodeService;\n }", "public function setService($service)\n{\n$this->service = $service;\n}", "public function setServiceCode($serviceCode)\n {\n // Service code must not be empty and must be an integer.\n if (empty($serviceCode) || !is_int($serviceCode))\n {\n echo \"ERROR: Service code must not be empty and must be an integer.\\n\";\n return;\n }\n\n // Length of service code must be of CODE_LENGTH.\n if ($this->getLength($serviceCode) != self::CODE_LENGTH)\n {\n echo \"ERROR: Length of service code must be equal to \" . self::CODE_LENGTH . \"\\n\";\n return;\n }\n\n $this->serviceCode = $serviceCode;\n }", "static public function setBarCode(Product $obj, $barCode){\n\t\t// Code here...\n\t}", "public function setServiceCode(?string $serviceCode): self\n {\n $this->initialized['serviceCode'] = true;\n $this->serviceCode = $serviceCode;\n\n return $this;\n }", "public function set($cartId, $carrierCode, $methodCode, AddressInterface $address = null);", "public function setCode( string $value ) : \\Aimeos\\MShop\\Review\\Item\\Iface;", "protected function setService($service)\n {\n \n $this->service = $service;\n \n return true;\n \n }", "public function setService($value)\n {\n $this->setProperty(\"Service\", $value, true);\n }", "public function set($name, ServiceInterface $service) {}", "public function setService(Service $service): self;", "final public function setContainer(ServiceContainer $app)\n {\n $this->app = $app;\n }", "public function setPyGenericServices($var) {}", "function setServiceContainer(iContainer $container)\n {\n $this->sc = $container;\n }", "public function setPostalCode(?string $value): void {\n $this->getBackingStore()->set('postalCode', $value);\n }", "public function setPostalCode(?string $value): void {\n $this->getBackingStore()->set('postalCode', $value);\n }", "public function setCode( $code );", "function setCode($code);", "public function setService($service)\n {\n $this->values['Service'] = $service;\n return $this;\n }", "public function setDbService($service){ }", "function SetCodePage ($codepage) {\n $this->codePage = $codepage;\n if ($this->rfc)\n @saprfc_set_code_page ($this->rfc,$codepage);\n }", "public function setDbService($service) {}", "public function setService(ServiceInterface $service)\n {\n $this->service = $service;\n return $this;\n }", "public function __construct(PhoneBookService $phoneBookService)\n {\n $this->phoneBookService = $phoneBookService;\n }", "public function setProcess(ProcessInterface $process);", "public function __construct()\n {\n $this->brandService = new BrandService(Brand::class);\n }" ]
[ "0.66910785", "0.62439686", "0.60816544", "0.59845036", "0.5918248", "0.5780454", "0.5724862", "0.56209666", "0.5484215", "0.53857946", "0.53289425", "0.53278035", "0.5313382", "0.5303462", "0.52918893", "0.5269448", "0.51940763", "0.5145439", "0.5116334", "0.5116334", "0.50414246", "0.49956998", "0.49952883", "0.49879077", "0.49831957", "0.49726897", "0.49584475", "0.4943981", "0.494153", "0.49334413" ]
0.7982854
0
Labelling service. Automatically load the labelling service
public function getLabellingService() { if (!$this->labellingService) { $this->setLabellingService(new LabellingService($this)); } return $this->labellingService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLabellingService(LabellingServiceInterface $service)\n {\n $this->labellingService = $service;\n }", "protected function getTranslation_LoaderService()\n {\n $a = ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->get('translation.loader.xliff')) && false ?: '_'};\n\n $this->services['translation.loader'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\TranslationLoader();\n\n $instance->addLoader('php', ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->get('translation.loader.php')) && false ?: '_'});\n $instance->addLoader('yml', ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->get('translation.loader.yml')) && false ?: '_'});\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->get('translation.loader.po')) && false ?: '_'});\n $instance->addLoader('mo', ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->get('translation.loader.mo')) && false ?: '_'});\n $instance->addLoader('ts', ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->get('translation.loader.qt')) && false ?: '_'});\n $instance->addLoader('csv', ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->get('translation.loader.csv')) && false ?: '_'});\n $instance->addLoader('res', ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->get('translation.loader.res')) && false ?: '_'});\n $instance->addLoader('dat', ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->get('translation.loader.dat')) && false ?: '_'});\n $instance->addLoader('ini', ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->get('translation.loader.ini')) && false ?: '_'});\n $instance->addLoader('json', ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->get('translation.loader.json')) && false ?: '_'});\n\n return $instance;\n }", "function translate() {\n $this->load->library('svc_system', NULL, 'svc');\n $this->svc->run();\n exit;\n }", "protected function getTranslation_LoaderService()\n {\n $a = $this->get('translation.loader.xliff');\n\n $this->services['translation.loader'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\TranslationLoader();\n\n $instance->addLoader('php', $this->get('translation.loader.php'));\n $instance->addLoader('yml', $this->get('translation.loader.yml'));\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', $this->get('translation.loader.po'));\n $instance->addLoader('mo', $this->get('translation.loader.mo'));\n $instance->addLoader('ts', $this->get('translation.loader.qt'));\n $instance->addLoader('csv', $this->get('translation.loader.csv'));\n $instance->addLoader('res', $this->get('translation.loader.res'));\n $instance->addLoader('dat', $this->get('translation.loader.dat'));\n $instance->addLoader('ini', $this->get('translation.loader.ini'));\n\n return $instance;\n }", "protected function getTranslation_Loader_XliffService()\n {\n return $this->services['translation.loader.xliff'] = new \\Symfony\\Component\\Translation\\Loader\\XliffFileLoader();\n }", "protected function getTranslation_Loader_XliffService()\n {\n return $this->services['translation.loader.xliff'] = new \\Symfony\\Component\\Translation\\Loader\\XliffFileLoader();\n }", "protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->get('translation.loader.csv')) && false ?: '_'};\n }, 'translation.loader.dat' => function () {\n return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->get('translation.loader.dat')) && false ?: '_'};\n }, 'translation.loader.ini' => function () {\n return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->get('translation.loader.ini')) && false ?: '_'};\n }, 'translation.loader.json' => function () {\n return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->get('translation.loader.json')) && false ?: '_'};\n }, 'translation.loader.mo' => function () {\n return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->get('translation.loader.mo')) && false ?: '_'};\n }, 'translation.loader.php' => function () {\n return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->get('translation.loader.php')) && false ?: '_'};\n }, 'translation.loader.po' => function () {\n return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->get('translation.loader.po')) && false ?: '_'};\n }, 'translation.loader.qt' => function () {\n return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->get('translation.loader.qt')) && false ?: '_'};\n }, 'translation.loader.res' => function () {\n return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->get('translation.loader.res')) && false ?: '_'};\n }, 'translation.loader.xliff' => function () {\n return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->get('translation.loader.xliff')) && false ?: '_'};\n }, 'translation.loader.yml' => function () {\n return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->get('translation.loader.yml')) && false ?: '_'};\n })), new \\Symfony\\Component\\Translation\\MessageSelector(), 'es', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => (__DIR__.'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.af.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.af.yml')), 'ar' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ar.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ar.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ar.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ar.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ar.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ar.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ar.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ar.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.ar.yml'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ar.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.ar.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.ar.yml')), 'az' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.az.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.az.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.az.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.az.xliff')), 'bg' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.bg.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.bg.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.bg.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bg.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bg.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.bg.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.bg.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.bg.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.bg.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.bg.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.bg.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.bg.yml')), 'ca' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ca.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ca.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ca.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ca.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ca.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ca.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ca.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ca.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ca.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ca.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ca.xliff')), 'cs' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.cs.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.cs.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.cs.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.cs.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.cs.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.cs.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.cs.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.cs.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.cs.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.cs.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.cs.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.cs.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.cs.yml')), 'cy' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.da.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.da.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.da.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.da.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.da.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.da.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.da.xliff')), 'de' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.de.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.de.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.de.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.de.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.de.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.de.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.de.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.de.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.de.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.de.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.de.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.de.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.de.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.de.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.de.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.de.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.de.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.de.xliff'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.de.yml'), 19 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.de.yml')), 'el' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.el.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.el.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.el.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.el.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.el.yml')), 'en' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.en.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.en.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.en.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.en.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.en.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.en.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.en.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.en.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.en.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.en.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.en.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.en.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.en.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.en.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.en.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.en.xliff'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.en.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.en.yml'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.en.xliff'), 19 => ($this->targetDirs[3].'\\\\app/Resources/DataDogAuditBundle/translations\\\\DataDogAuditBundle.en.xlf'), 20 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.en.yml'), 21 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.en.yml'), 22 => ($this->targetDirs[3].'\\\\app/Resources/AppBundle/translations\\\\AppBundle.en.xliff')), 'es' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.es.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.es.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.es.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.es.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.es.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.es.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.es.xliff'), 7 => ($this->targetDirs[3].'\\\\app/Resources/SonataUserBundle/translations\\\\SonataUserBundle.es.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.es.xliff'), 9 => ($this->targetDirs[3].'\\\\app/Resources/SonataMediaBundle/translations\\\\SonataMediaBundle.es.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.es.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.es.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.es.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.es.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.es.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.es.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.es.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.es.xliff'), 18 => ($this->targetDirs[3].'\\\\app/Resources/DataDogAuditBundle/translations\\\\DataDogAuditBundle.es.xlf'), 19 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.es.yml'), 20 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.es.yml'), 21 => ($this->targetDirs[3].'\\\\app/Resources/GregwarCaptchaBundle/translations\\\\GregwarCaptchaBundle.es.xliff'), 22 => ($this->targetDirs[3].'\\\\app/Resources/AppBundle/translations\\\\AppBundle.es.xliff'), 23 => ($this->targetDirs[3].'\\\\app/Resources/translations\\\\messages.es.xliff')), 'et' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.et.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.et.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.et.yml')), 'eu' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.eu.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.eu.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.eu.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.eu.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.eu.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.eu.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.eu.xliff')), 'fa' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fa.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fa.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.fa.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.fa.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fa.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fa.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.fa.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.fa.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.fa.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fa.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.fa.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.fa.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.fa.xliff')), 'fi' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fi.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fi.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fi.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fi.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fi.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.fi.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.fi.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fi.xliff')), 'fr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.fr.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.fr.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fr.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fr.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fr.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.fr.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.fr.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.fr.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fr.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.fr.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.fr.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.fr.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.fr.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.fr.xliff'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.fr.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.fr.yml'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.fr.xliff'), 19 => ($this->targetDirs[3].'\\\\app/Resources/DataDogAuditBundle/translations\\\\messages.fr.xlf'), 20 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.fr.yml'), 21 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.fr.yml')), 'gl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.gl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.gl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.gl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.gl.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.gl.xliff')), 'he' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.he.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.he.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.he.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.he.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.he.yml')), 'hr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.hr.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hr.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.hr.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hr.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.hr.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.hr.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.hr.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.hr.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.hr.xliff')), 'hu' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hu.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hu.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.hu.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.hu.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hu.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.hu.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.hu.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.hu.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.hu.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.hu.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.hu.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.hu.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.hu.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.hu.xliff')), 'hy' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hy.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.id.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.id.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.id.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.id.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.id.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.id.yml')), 'it' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.it.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.it.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.it.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.it.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.it.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.it.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.it.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.it.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.it.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.it.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.it.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.it.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.it.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.it.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.it.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.it.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.it.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.it.xliff'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.it.yml'), 19 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.it.yml')), 'ja' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ja.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ja.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ja.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ja.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ja.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ja.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ja.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ja.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ja.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.ja.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.ja.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ja.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.ja.yml')), 'lb' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lb.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lb.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lb.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lb.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lb.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.lb.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.lb.xliff')), 'lt' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lt.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lt.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lt.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.lt.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lt.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.lt.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.lt.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.lt.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lt.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.lt.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.lt.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.lt.yml')), 'lv' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lv.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lv.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lv.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lv.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.lv.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lv.xliff')), 'mn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.mn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.mn.xlf')), 'nb' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nb.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nb.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nb.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.nb.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.nb.yml')), 'nl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.nl.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.nl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.nl.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.nl.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.nl.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.nl.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.nl.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.nl.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.nl.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.nl.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.nl.yml'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.nl.yml'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.nl.xliff'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.nl.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.nl.yml')), 'nn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nn.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.no.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.no.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.no.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.no.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.no.xliff')), 'pl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.pl.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pl.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.pl.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.pl.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pl.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pl.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.pl.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.pl.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.pl.yml'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.pl.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.pl.yml'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.pl.yml')), 'pt' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pt.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pt.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pt.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pt.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.pt.xliff'), 5 => ($this->targetDirs[3].'\\\\app/Resources/SonataUserBundle/translations\\\\SonataUserBundle.pt.xliff'), 6 => ($this->targetDirs[3].'\\\\app/Resources/SonataMediaBundle/translations\\\\SonataMediaBundle.pt.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pt.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pt.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.pt.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.pt.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.pt.xliff'), 12 => ($this->targetDirs[3].'\\\\app/Resources/AppBundle/translations\\\\AppBundle.pt.xliff')), 'pt_BR' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pt_BR.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.pt_BR.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pt_BR.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pt_BR.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.pt_BR.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.pt_BR.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pt_BR.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pt_BR.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.pt_BR.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.pt_BR.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.pt_BR.yml'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.pt_BR.yml'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.pt_BR.yml')), 'ro' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ro.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ro.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ro.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ro.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ro.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ro.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ro.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ro.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ro.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ro.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.ro.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ro.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ro.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.ro.yml'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.ro.yml')), 'ru' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ru.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ru.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ru.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ru.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ru.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ru.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ru.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ru.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ru.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ru.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.ru.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.ru.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.ru.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ru.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.ru.yml'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.ru.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ru.xliff'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.ru.yml'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.ru.yml')), 'sk' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sk.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sk.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sk.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sk.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sk.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.sk.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sk.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.sk.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.sk.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.sk.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.sk.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.sk.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sk.xliff')), 'sl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sl.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.sl.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.sl.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sl.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.sl.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.sl.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.sl.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.sl.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sl.xliff')), 'sq' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sr_Cyrl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sr_Cyrl.xliff')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sr_Latn.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sr_Latn.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sr_Latn.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sr_Latn.xliff')), 'sv' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sv.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sv.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sv.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.sv.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sv.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sv.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.sv.yml')), 'th' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.th.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.th.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.th.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.th.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.th.xliff')), 'tr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.tr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.tr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.tr.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.tr.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.tr.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.tr.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.tr.yml'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.tr.yml')), 'uk' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.uk.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.uk.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.uk.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.uk.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.uk.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.uk.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.uk.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.uk.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.uk.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.uk.yml'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.uk.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.uk.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.uk.yml')), 'vi' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.vi.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.vi.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.vi.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.vi.yml')), 'zh_CN' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.zh_CN.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.zh_CN.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.zh_CN.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.zh_CN.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.zh_CN.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.zh_CN.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.zh_CN.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.zh_CN.yml'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.zh_CN.yml')), 'zh_TW' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.zh_TW.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.zh_TW.xliff')), 'pt_PT' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ua.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.ua.yml')), 'ky' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ky.xliff'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ky.yml'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ky.yml')), 'sw' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.sw.xliff')), 'bn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bn.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bn.yml')), 'bn_BD' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bn_BD.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bn_BD.yml')), 'eo' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.eo.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.eo.yml')), 'sv_SE' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sv_SE.xliff')), 'oc' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.oc.xliff')))));\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->get('config_cache_factory')) && false ?: '_'});\n $instance->setFallbackLocales(array(0 => 'es'));\n\n return $instance;\n }", "protected function getSonata_Admin_Label_Strategy_NativeService()\n {\n return $this->services['sonata.admin.label.strategy.native'] = new \\Sonata\\AdminBundle\\Translator\\NativeLabelTranslatorStrategy();\n }", "function getLabels() {\r\n\t\t$labelMarkers = array(\r\n\t\t\t'CRDATE_LABEL',\r\n\t\t\t'REFERENCE_LABEL',\r\n\t\t\t'JOB_TITLE_LABEL',\r\n\t\t\t'EMPLOYER_LABEL',\r\n\t\t\t'EMPLOYER_DESCRIPTION_LABEL',\r\n\t\t\t'LOCATION_LABEL',\r\n\t\t\t'SHORT_JOB_DESCRIPTION_LABEL',\r\n\t\t\t'JOB_DESCRIPTION_LABEL',\r\n\t\t\t'EXPERIENCE_LABEL',\r\n\t\t\t'JOB_REQUIREMENTS_LABEL',\r\n\t\t\t'JOB_BENEFITS_LABEL',\r\n\t\t\t'APPLY_INFORMATION_LABEL',\r\n\t\t\t'SALARY_LABEL',\r\n\t\t\t'JOB_TYPE_LABEL',\r\n\t\t\t'CONTRACT_TYPE_LABEL',\r\n\t\t\t'REGION_LABEL',\r\n\t\t\t'SECTOR_LABEL',\r\n\t\t\t'CATEGORY_LABEL',\r\n\t\t\t'DISCIPLINE_LABEL',\r\n\t\t\t'EDUCATION_LABEL',\r\n\t\t\t'SEARCH_LABEL',\r\n\t\t\t'RESET_LABEL',\r\n\t\t\t'BACKTOLIST',\r\n\t\t\t'BACKTOJOB',\r\n\t\t\t'KEYWORD_LABEL',\r\n\t\t\t'APPLY_HEADER',\r\n\t\t\t'FULLNAME_LABEL',\r\n\t\t\t'EMAIL_LABEL',\r\n\t\t\t'APPLY_LABEL',\r\n\t\t\t'MOTIVATION_LABEL',\r\n\t\t\t'CV_LABEL',\r\n\t\t\t'LETTER_LABEL',\r\n\t\t\t'APPLY_LINK',\r\n\t\t\t'APPLY_THANKS',\r\n\t\t\t'CONTACT_NAME_LABEL',\r\n\t\t\t'CONTACT_ADDRESS_LABEL',\r\n\t\t\t'CONTACT_PHONE_LABEL',\r\n\t\t\t'CONTACT_EMAIL_LABEL'\r\n\t\t);\r\n\r\n\t\t// Extend $labelMarkers with user function?\r\n\t\tif (isset($this->conf['labelMarkersFunction']) && $this->conf['labelMarkersFunction']) {\r\n\t\t\t$funcConf = $this->conf['labelMarkersFunction.'];\r\n\t\t\t$funcConf['parent'] = & $this;\r\n\t\t\t$labelMarkers = $this->cObj->callUserFunction($this->conf['labelMarkersFunction'], $funcConf, $labelMarkers);\r\n\t\t}\r\n\r\n\t\t// Get the label from the locallang.xml file, and apply the stdWrap configuration\r\n\t\tforeach ($labelMarkers AS $labelMarker) {\r\n\t\t\t$markerArray['###'.$labelMarker.'###'] = $this->cObj->stdWrap($this->pi_getLL(strtolower($labelMarker)), $this->conf[strtolower($labelMarker).'_stdWrap.']);\r\n\t\t}\r\n\r\n\t\t// The labels for required apply form fields get one more stdWrap configuration\r\n\t\tif (!isset($this->piVars['apply_submit'])) {\r\n\t\t\tforeach ($this->requiredFields AS $requiredField) {\r\n\t\t\t\t$markerArray['###'.strtoupper($requiredField).'_LABEL###'] = $this->cObj->stdWrap($markerArray['###'.strtoupper($requiredField).'_LABEL###'], $this->conf['apply_required_stdWrap.']);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Some extra markers that don't come from the locallang.xml file\r\n\t\t$markerArray['###RSS_TITLE###'] = $this->cObj->stdWrap($this->conf['rss.']['title'], $this->conf['rss_title_stdWrap.']);\r\n\t\t$markerArray['###RSS_DESCRIPTION###'] = $this->cObj->stdWrap($this->conf['rss.']['description'], $this->conf['rss_description_stdWrap.']);\r\n\t\t$markerArray['###RSS_IMAGE###'] = $GLOBALS['TSFE']->baseUrlWrap($this->cObj->IMG_RESOURCE(array('file' => $this->conf['rss.']['image'])));\r\n\t\t$markerArray['###LINKTOLIST###'] = $GLOBALS['TSFE']->baseUrlWrap($this->cObj->getTypoLink_URL($this->conf['pid.']['list']?$this->conf['pid.']['list']:$GLOBALS['TSFE']->id));\r\n\t\t$markerArray['###LANGUAGE###'] = $GLOBALS['TSFE']->config['config']['language'];\r\n\r\n\t\treturn $markerArray;\r\n\t}", "private function _loadLabels()\n\t{\n\t\tglobal $context, $txt;\n\n\t\t$userLabels = explode(',', User::$settings['message_labels']);\n\n\t\tforeach ($userLabels as $id_label => $label_name)\n\t\t{\n\t\t\tif (empty($label_name))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$context['labels'][(int) $id_label] = array(\n\t\t\t\t'id' => $id_label,\n\t\t\t\t'name' => trim($label_name),\n\t\t\t\t'messages' => 0,\n\t\t\t\t'unread_messages' => 0,\n\t\t\t);\n\t\t}\n\n\t\t// The default inbox is always available\n\t\t$context['labels'][-1] = array(\n\t\t\t'id' => -1,\n\t\t\t'name' => $txt['pm_msg_label_inbox'],\n\t\t\t'messages' => 0,\n\t\t\t'unread_messages' => 0,\n\t\t);\n\t}", "public function initialize(): void\n {\n $this->_loadServices();\n }", "protected function getSonata_Admin_Label_Strategy_NoopService()\n {\n return $this->services['sonata.admin.label.strategy.noop'] = new \\Sonata\\AdminBundle\\Translator\\NoopLabelTranslatorStrategy();\n }", "protected function getLiipImagine_Binary_Loader_DefaultService()\n {\n return $this->services['liip_imagine.binary.loader.default'] = new \\Liip\\ImagineBundle\\Binary\\Loader\\FileSystemLoader(${($_ = isset($this->services['liip_imagine.mime_type_guesser']) ? $this->services['liip_imagine.mime_type_guesser'] : $this->get('liip_imagine.mime_type_guesser')) && false ?: '_'}, ${($_ = isset($this->services['liip_imagine.extension_guesser']) ? $this->services['liip_imagine.extension_guesser'] : $this->get('liip_imagine.extension_guesser')) && false ?: '_'}, new \\Liip\\ImagineBundle\\Binary\\Locator\\FileSystemLocator(array(0 => ($this->targetDirs[3].'\\\\app/../web'))), '');\n }", "protected function loadServices()\n {\n $serviceConfigDir = new FileLocator(__DIR__ . DIRECTORY_SEPARATOR . 'config');\n\n $loader = new YamlFileLoader($this->container, $serviceConfigDir);\n $loader->load('services.yml');\n }", "protected function getTranslation_Loader_PhpService()\n {\n return $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader();\n }", "protected function getTranslation_Loader_PhpService()\n {\n return $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader();\n }", "protected function getTranslation_Loader_YmlService()\n {\n return $this->services['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader();\n }", "protected function getTranslation_Loader_YmlService()\n {\n return $this->services['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader();\n }", "public function service();", "protected function getTranslation_Loader_PoService()\n {\n return $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader();\n }", "protected function getTranslation_Loader_PoService()\n {\n return $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader();\n }", "public function init()\n {\n// $service->handle();\n }", "protected function getFixtureB821Service()\n {\n return $this->services['DiContainerBenchmarks\\\\Fixture\\\\B\\\\FixtureB821'] = new \\DiContainerBenchmarks\\Fixture\\B\\FixtureB821();\n }", "protected function getTranslation_Loader_DatService()\n {\n return $this->services['translation.loader.dat'] = new \\Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader();\n }", "public function getLabel() {}", "private function getLabelHelper()\n {\n $this->label_helper = new FormLabel();\n }", "protected function getSonata_Admin_Label_Strategy_BcService()\n {\n return $this->services['sonata.admin.label.strategy.bc'] = new \\Sonata\\AdminBundle\\Translator\\BCLabelTranslatorStrategy();\n }", "public function getService();", "protected function getTemplating_LoaderService()\n {\n return $this->services['templating.loader'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\FilesystemLoader(${($_ = isset($this->services['templating.locator']) ? $this->services['templating.locator'] : $this->getTemplating_LocatorService()) && false ?: '_'});\n }", "protected function getTranslation_Loader_DatService()\n {\n return $this->services['translation.loader.dat'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader();\n }" ]
[ "0.737829", "0.6115369", "0.57740694", "0.5738979", "0.57112426", "0.57112426", "0.5709626", "0.5707968", "0.5676766", "0.5601925", "0.55911654", "0.55693036", "0.551049", "0.5381724", "0.5317407", "0.5317407", "0.5288173", "0.5288173", "0.52850527", "0.5266033", "0.5266033", "0.5264191", "0.5261394", "0.5231297", "0.5227705", "0.5227349", "0.51952755", "0.51914334", "0.5178689", "0.51728" ]
0.7355014
1
Set the labelling service.
public function setLabellingService(LabellingServiceInterface $service) { $this->labellingService = $service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setService($var) {}", "public function setService( $service )\n {\n $this->service = $service;\n }", "function setLabel($label) {\n $this->label = $label;\n }", "public function setLabel($var) {}", "function setLabel($label) {\n $this->label = $label;\n }", "public function setService($service)\n {\n $this->service = $service;\n }", "public function setServiceLabel($var)\n {\n GPBUtil::checkString($var, True);\n $this->service_label = $var;\n\n return $this;\n }", "public function setLabel(string $label): void\n {\n }", "function setLabel($label);", "public function setPyGenericServices($var) {}", "public function setLabel( $label );", "public function setLabel($value);", "public function setLabel(?string $value): void {\n $this->getBackingStore()->set('label', $value);\n }", "public function setLabel($label);", "public function set($name, ServiceInterface $service) {}", "public function setService($service)\n{\n$this->service = $service;\n}", "public function setService(Service $service): self;", "public function setService($value)\n {\n $this->setProperty(\"Service\", $value, true);\n }", "public function setLabel($label) {\n $this->label = $label;\n }", "public function setLabel($label) {\n $this->label = $label;\n }", "public function setLabel($label) {\n $this->label = $label;\n }", "public function setServiceName($val)\n {\n $this->_propDict[\"serviceName\"] = $val;\n return $this;\n }", "public function getLabellingService()\n {\n if (!$this->labellingService) {\n $this->setLabellingService(new LabellingService($this));\n }\n\n return $this->labellingService;\n }", "public function set_label ($label) {\n $this->label = $label;\n }", "function setLabel($label=\"\"){\n\t\t\t$this->obj->label = $label;\t\n\t\t}", "public function setLabel($label)\n {\n $this->label = $label;\n }", "public function setLabel($label)\n {\n $this->label = $label;\n }", "function setLabelAttribute($name, $value);", "public function setLabel($label_id, $label, $label_css = null)\n {\n $this->_label = $label;\n $this->_label_id = $label_id;\n $this->_label_css = $label_css;\n }", "public function setLabel($label)\n {\n $this->label = (string) $label;\n }" ]
[ "0.63465405", "0.6228927", "0.6159455", "0.6120993", "0.605764", "0.602375", "0.595406", "0.5948257", "0.5918327", "0.5900537", "0.58906096", "0.58552873", "0.5804852", "0.5798681", "0.5762677", "0.5741243", "0.5734476", "0.5731138", "0.5716556", "0.5716556", "0.5716556", "0.571372", "0.5691472", "0.5687662", "0.56525874", "0.56497145", "0.56497145", "0.5637947", "0.5600134", "0.5586722" ]
0.7612809
0
Confirming service. Automatically load the confirming service
public function getConfirmingService() { if (!$this->confirmingService) { $this->setConfirmingService(new ConfirmingService($this)); } return $this->confirmingService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConfirmingService(ConfirmingServiceInterface $service)\n {\n $this->confirmingService = $service;\n }", "function confirmAddonServices(){\n\n\t\t\t$this->output = $this->build_template($this->get_template(\"confirmAddonServices\"));\n\n\t\t}", "function confirm()\n\t{\n\t\t//import core plugin\n\t\tFvnImporter::corePaymentPlugin();\n\t\tFvnImporter::model('orders');\t\t\n\t\tdo_action('hb_order_process_execute_before');\t\t\n\t\t$plugin = $this->input->getString('method');\n\t\tif(substr($plugin,0,10)=='hbpayment_'){\n\t\t\t$plugin = substr($payment_plugin,10);\n\t\t\t// echo $payment_plugin;die;\n\t\t}\n\t\t$plugin = 'hbpayment_'.$plugin;\n\n\t\t$config = HBFactory::getConfig();\n\t\t//check order da dc thanh toan lan nao chua de add transaction\n\t\t// $original_order = (new FvnModelOrders())->getItem($this->input->get)\n\t\t$payment = new $plugin();\t\n\t\t$payment->config = $config;\n\t\t$payment->order = new FvnModelOrders();\n\t\t$payment->order->load($this->input->get('order_id'));\n\t\t$results = $payment->_postPayment();\n\t\t/// Send email\n\t\t// debug($results);die;\n\t\tif($results){\n\t\t\tif(!isset($results->sendemail)){\n\t\t\t\t//send email\n\t\t\t\tif($config->allow_curl){\n\t\t\t\t\t$url = site_url().'index.php?hbaction=payment&task=urlsendmail&order_id='.$results->id;\n\t\t\t\t\tFvnHelper::pingUrl($url);\n\t\t\t\t}else{\n\t\t\t\t\t$this->sendMail($results->id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\tdo_action('hb_order_process_execute_after',$results);\n\t\t// die;\n\t\t/*\n\t\tif($results->order_status==FvnParamOrderStatus::CONFIRMED['value']){\n\t\t\twp_redirect(FvnHelper::get_order_link($results));\n\t\t}else{\t\t\t\n\t\t\twp_redirect('index.php?view=message');\n\t\t}\t\t\n\t\t*/\n\t\twp_redirect(FvnHelper::get_order_link($results));\n\t\texit;\n\t}", "function confirm() {\n $this->setIsConfirmed(1);\n $newSubscriptionStatus = ($this->getCustomerStatus() == 'AddressPending') ? 'Pending' : 'Active';\n\n foreach ($this->getSubscriptions() as $oSub) {\n $oSub->setStatus($newSubscriptionStatus);\n $oSub->save();\n }\n\n $this->save();\n }", "public function confirmAction()\n {\n $this->container->get('contao.framework')->initialize();\n\n $controller = new BackendConfirm();\n\n return $controller->run();\n }", "public function doconfirm()\n {\n $this->bean->active = 1;\n $this->bean->confirm = 1;\n \\R::store($this->bean);\n }", "public function confirm() {\r\n\t\t$this->status = Users::STATUS_ACTIVE;\r\n\t}", "public function confirmAction()\n {\n $session = $this->_getSession();\n $subAccountMode = false;\n if ($session->isLoggedIn()) {\n $this->_getSession()->logout()->regenerateSessionId();\n }\n try {\n $id = $this->getRequest()->getParam('id', false);\n $key = $this->getRequest()->getParam('key', false);\n $backUrl = $this->getRequest()->getParam('back_url', false);\n if (empty($id) || empty($key)) {\n throw new Exception($this->__('Bad request.'));\n }\n\n // load customer by id (try/catch in case if it throws exceptions)\n try {\n\n if (strpos($key, Cminds_MultiUserAccounts_Model_SubAccount::KEY_SIGN) === FALSE) {\n $account = $this->_getModel('customer/customer')->load($id);\n } else {\n $account = $this->_getModel('cminds_multiuseraccounts/subAccount')->load($id);\n $subAccountMode = true;\n }\n\n } catch (Exception $e) {\n throw new Exception($this->__('Wrong customer account specified.'));\n }\n\n // check if it is inactive\n if ($account->getConfirmation()) {\n if ($account->getConfirmation() !== $key) {\n throw new Exception($this->__('Wrong confirmation key.'));\n }\n\n // activate customer\n try {\n $account->setConfirmation(null);\n $account->save();\n } catch (Exception $e) {\n throw new Exception($this->__('Failed to confirm customer account.'));\n }\n\n $session->renewSession();\n if (!$subAccountMode) {\n $session->setCustomerAsLoggedIn($account);\n } else {\n $customer = $this->_getModel('customer/customer')->load($account->getParentCustomerId());\n $session->setCustomerAsLoggedIn($customer);\n $session->setSubAccount($account);\n }\n\n // log in and send greeting email, then die happy\n $successUrl = $this->_welcomeCustomer($account, true);\n $this->_redirectSuccess($backUrl ? $backUrl : $successUrl);\n return;\n }\n\n // die happy\n $this->_redirectSuccess($this->_getUrl('*/*/index', array('_secure' => true)));\n return;\n } catch (Exception $e) {\n // die unhappy\n $this->_getSession()->addError($e->getMessage());\n $this->_redirectError($this->_getUrl('*/*/index', array('_secure' => true)));\n return;\n }\n }", "public function waitConfirm()\n {\n $datas = Cart::where('status', 1)->whereHas('order', function ($query) {\n $query->where('user_id', Auth::id());\n })->get();\n\n if (count($datas) == 0) {\n return $this->SendResponse('failed', 'Data Order not found', NULL, 404);\n }\n\n $res = ConfirmationResource::collection($datas);\n\n return response([\n 'status' => 'success',\n 'message' => 'Wait for sending',\n 'data' => $res\n ]);\n }", "public function actionConfirm()\n {}", "protected function initServiceTask()\n {\n $this->attachEvent(\n ActivityInterface::EVENT_ACTIVITY_ACTIVATED,\n function ($self, TokenInterface $token) {\n $this->notifyEvent(ServiceTaskInterface::EVENT_SERVICE_TASK_ACTIVATED, $this, $token);\n }\n );\n }", "public function sendConfirmation();", "function confirm ($id_order) {\n\t\t$order = new shp_commande($id_order);\n\t\tif ($order->get_id_statut() == OR_PAY_STD) {\n\t\t\t// update status only if IPN wasn't recieved before success call\n\t\t\t$order->set_id_statut(OR_PAY_RET);\n\t\t\tdbUpdate($order);\n\t\t}\n\t\t//viewArray($_SESSION);\n\n\t\tlogCheckFileExists($_SERVER['DOCUMENT_ROOT'].'/log/payment.log');\n\t\t$f = fopen($_SERVER['DOCUMENT_ROOT'].'/log/payment.log', 'a+');\n\t\tfwrite($f, \"\\n\".'['.date('d/m/Y H:i:s').'] - Commande : '.$id_order.' - Paiement '.$order->get_mode_paiement().' : retour <success>');\n\t\tfclose($f);\n\n\t}", "protected function getFosUser_Listener_EmailConfirmationService()\n {\n return $this->services['fos_user.listener.email_confirmation'] = new \\FOS\\UserBundle\\EventListener\\EmailConfirmationListener(${($_ = isset($this->services['fos_user.mailer']) ? $this->services['fos_user.mailer'] : $this->get('fos_user.mailer')) && false ?: '_'}, ${($_ = isset($this->services['fos_user.util.token_generator']) ? $this->services['fos_user.util.token_generator'] : $this->get('fos_user.util.token_generator')) && false ?: '_'}, ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->get('router')) && false ?: '_'}, ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->get('session')) && false ?: '_'});\n }", "function payment_confirm() {\t\t\t\t\t\t\n\t\t$model = & $this->getModel('Register');\t\t\t\t\n\t\t$model->paymentConfirm();\t\t\t\n\t}", "public function confirmAction(){\n\n $token = $this->params()->fromRoute('token');\n\n if( empty($token) ){\n return new ViewModel( [ 'error'=>'invalid-token' ] );\n }\n\n //---\n\n // Ensure they're not logged in whilst activating a new account.\n $this->getServiceLocator()->get('AuthenticationService')->clearIdentity();\n\n $session = $this->getServiceLocator()->get('SessionManager');\n $session->getStorage()->clear();\n $session->initialise();\n\n //---\n\n /**\n * This returns:\n * TRUE - If the user account exists. The account has been activated, or was already activated.\n * FALSE - If the user account does not exist.\n *\n * Alas no other details are returned.\n */\n $success = $this->getServiceLocator()->get('Register')->activateAccount( $token );\n\n if(isset($this->contentHeader)) {\n $this->layout()->contentHeader = $this->contentHeader;\n }\n\n if( !$success ){\n return new ViewModel( [ 'error'=>'account-missing' ] );\n }\n\n return new ViewModel();\n\n }", "public function load() {\n\t\t$this->pue_checker = new Tribe__PUE__Checker( 'http://tri.be/', $this->slug, array(\n\t\t\t'context' => 'service',\n\t\t\t'plugin_name' => __( 'Promoter', 'tribe-common' ),\n\t\t) );\n\t}", "function confirm() {\n // $this->data->confirmatory_message();\n }", "public function getService() {}", "function fel_invoice_activation() {\n\t$installer = new FelInvoiceInstaller();\n\t$installer->setUp();\n}", "public function confirmSuccess(): void\n {\n $this->success = true;\n }", "public function activateAction() {\n $service = $this->getServiceLocator()->get('service_psp');\n $pspId = $this->params()->fromRoute('id', false);\n $status = (int)$this->params()->fromQuery('status', null);\n $status = !is_null($status) ? (int)$status : null;\n\n if ( $pspId\n \t&& !is_null($status)\n && is_int($status)\n ) {\n $result = $service->changeStatus($pspId, $status);\n $successText = ($status) ? TextConstants::SUCCESS_ACTIVATE : TextConstants::SUCCESS_DEACTIVATE;\n\n if ($result) {\n Helper::setFlashMessage(['success' => $successText]);\n } else {\n Helper::setFlashMessage(['error' => TextConstants::SERVER_ERROR]);\n }\n } else {\n Helper::setFlashMessage(['error' => TextConstants::SERVER_ERROR]);\n }\n\n $this->redirect()->toRoute('finance/psp', ['controller' => 'psp']);\n\t}", "public function testGetSupertackServices()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "protected function serviceReload()\n\t{\n\t\treturn true;\n\t}", "public function notify() {\n\t\tif (empty($this->service)) {\n\t\t\t$this->stop(200, 'No services');\n\t\t}\n\t\tif (!$this->service->validate()) {\n\t\t\t$this->stop(400);\n\t\t}\n\t\t$message = $this->service->message();\n\t\tforeach ($this->notifications as $notification) {\n\t\t\t$notification->notify($message);\n\t\t}\n\t\t$this->stop(200);\n\t}", "function sendConfirmation() {\n\t\t$confirm = new SendEmail($this->email, $this->emailHash, $this->db);\n\t\t$confirm->constructConfirmLink();\n\t}", "public function buyServices()\n\t{\n\t\t//\n\t}", "protected function setConfirmations()\n {\n $this->context->controller->confirmations = $this->_confirmations;\n }", "public function testShowService()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getDefaultService(){\n // default service is never site-specific\n \n }" ]
[ "0.71295583", "0.63964736", "0.5570324", "0.5519492", "0.54996127", "0.5478924", "0.5359751", "0.5344333", "0.5343416", "0.5312275", "0.53084594", "0.5254172", "0.52130765", "0.51947886", "0.5162724", "0.5145107", "0.51448274", "0.51200527", "0.50933504", "0.5052566", "0.4999537", "0.4986298", "0.49567112", "0.49468142", "0.49464953", "0.4935531", "0.4931239", "0.49169707", "0.48991844", "0.48603877" ]
0.6932262
1
Set the confirming service.
public function setConfirmingService(ConfirmingServiceInterface $service) { $this->confirmingService = $service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfirmingService()\n {\n if (!$this->confirmingService) {\n $this->setConfirmingService(new ConfirmingService($this));\n }\n\n return $this->confirmingService;\n }", "protected function setConfirmations()\n {\n $this->context->controller->confirmations = $this->_confirmations;\n }", "public function setConfirm(bool $confirm)\n\t{\n\t\t$this->addKeyValue('confirm', $confirm); \n\n\t}", "public function setConfirmedToNow()\n {\n $this->confirmed = new \\DateTime();\n }", "public function setService( $service )\n {\n $this->service = $service;\n }", "public function setService($value)\n {\n $this->setProperty(\"Service\", $value, true);\n }", "protected function setService($service)\n {\n \n $this->service = $service;\n \n return true;\n \n }", "public function setHasToConfirmAttribute($value)\n {\n $this->attributes['has_to_confirm'] = $value ?? 0;\n\n }", "function confirmAddonServices(){\n\n\t\t\t$this->output = $this->build_template($this->get_template(\"confirmAddonServices\"));\n\n\t\t}", "public function setService($service)\n {\n $this->service = $service;\n }", "function confirm() {\n $this->setIsConfirmed(1);\n $newSubscriptionStatus = ($this->getCustomerStatus() == 'AddressPending') ? 'Pending' : 'Active';\n\n foreach ($this->getSubscriptions() as $oSub) {\n $oSub->setStatus($newSubscriptionStatus);\n $oSub->save();\n }\n\n $this->save();\n }", "public function setService($var) {}", "public function turnOnService($service)\n {\n if (setting(\"use_{$service}\") == 'on') {\n return;\n }\n\n Setting::updateOrCreate(\"use_{$service}\", 'on');\n\n $this->compose();\n\n if ($this->isUp()) {\n $this->start($service);\n }\n }", "public function confirm() {\r\n\t\t$this->status = Users::STATUS_ACTIVE;\r\n\t}", "public function if_argument_in_set_service_method_does_not_exist_set_the_service_by_default()\n {\n $this->mockPushNotification->setService('asdf')->send();\n $this->assertInstanceOf('Edujugon\\PushNotification\\Gcm', $this->mockPushNotification->service);\n $this->mockPushNotification->setService('fcm');\n $this->assertInstanceOf('Edujugon\\PushNotification\\Fcm', $this->mockPushNotification->service);\n }", "protected function setNeedConfirm($need_confirm){\n $this->param['need_confirm'] = $need_confirm;\n }", "public function setActivating()\n {\n $this->update(['status' => static::STATUS_ACTIVATING]);\n }", "public function setConfirmationToken($confirmationToken);", "public function doconfirm()\n {\n $this->bean->active = 1;\n $this->bean->confirm = 1;\n \\R::store($this->bean);\n }", "protected function setDefaultConfirmation()\r\n\t{\r\n\t\tglobal $ilCtrl, $lng, $tpl;\r\n\t\t\r\n\t\t$prtf_id = (int)$_REQUEST[\"prt_id\"];\r\n\t\t\r\n\t\tif($prtf_id && $this->checkAccess(\"write\"))\r\n\t\t{\t\t\t\r\n\t\t\t// if already shared, no need to ask again\r\n\t\t\tif($this->access_handler->hasRegisteredPermission($prtf_id) ||\r\n\t\t\t\t$this->access_handler->hasGlobalPermission($prtf_id))\r\n\t\t\t{\r\n\t\t\t\treturn $this->setDefault($prtf_id);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t$ilCtrl->setParameter($this, \"prt_id\", $prtf_id);\r\n\t\t\t\r\n\t\t\tinclude_once(\"./Services/Utilities/classes/class.ilConfirmationGUI.php\");\r\n\t\t\t$cgui = new ilConfirmationGUI();\r\n\t\t\t$cgui->setFormAction($ilCtrl->getFormAction($this));\r\n\t\t\t$cgui->setHeaderText($lng->txt(\"prtf_set_default_publish_confirmation\"));\r\n\t\t\t$cgui->setCancel($lng->txt(\"yes\"), \"setDefaultGlobal\");\r\n\t\t\t$cgui->setConfirm($lng->txt(\"no\"), \"setDefaultRegistered\");\r\n\r\n\t\t\t$tpl->setContent($cgui->getHTML());\t\t\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$ilCtrl->redirect($this, \"show\");\r\n\t}", "public function setService($service)\n{\n$this->service = $service;\n}", "public function setConfirm($confirm)\r\n {\r\n $this->confirm = $confirm;\r\n\r\n return $this;\r\n }", "public function setConfirmationToken($token);", "public function setService(Service $service): self;", "public function confirmSuccess(): void\n {\n $this->success = true;\n }", "public function configure()\n\t{\n\t\tparent::configure();\n\n\t\t$this->addOption(\n\t\t\tarray('y', 'assume-yes'),\n\t\t\t0,\n\t\t\t'Ignore confirm prompter.',\n\t\t\tOption::IS_GLOBAL\n\t\t);\n\t}", "public function setPending()\n {\n $this->status = self::STATUS_PENDING;\n $this->save();\n }", "public function setConfirm($message, $custom = null)\n\t{\n\t\t$this->confirm = true;\n\t\t$this->confirmMessage = SpoonFilter::htmlentities((string) $message);\n\t\t$this->confirmCustom = (string) $custom;\n\t}", "public function setPayPalCheckoutService($oPayPalCheckoutService)\n {\n $this->_oPayPalCheckoutService = $oPayPalCheckoutService;\n }", "protected function getFosUser_Listener_EmailConfirmationService()\n {\n return $this->services['fos_user.listener.email_confirmation'] = new \\FOS\\UserBundle\\EventListener\\EmailConfirmationListener(${($_ = isset($this->services['fos_user.mailer']) ? $this->services['fos_user.mailer'] : $this->get('fos_user.mailer')) && false ?: '_'}, ${($_ = isset($this->services['fos_user.util.token_generator']) ? $this->services['fos_user.util.token_generator'] : $this->get('fos_user.util.token_generator')) && false ?: '_'}, ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->get('router')) && false ?: '_'}, ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->get('session')) && false ?: '_'});\n }" ]
[ "0.64210457", "0.5960976", "0.5576986", "0.556947", "0.5417724", "0.5417171", "0.5370196", "0.5354794", "0.5329187", "0.530646", "0.528776", "0.52386767", "0.513106", "0.5068065", "0.5014042", "0.4997125", "0.49708134", "0.49212244", "0.49048588", "0.4894189", "0.4889943", "0.48819113", "0.4870627", "0.4869585", "0.4798097", "0.479184", "0.4756126", "0.47294658", "0.46969533", "0.4664536" ]
0.7772517
0
Shipping status service. Automatically load the shipping status service
public function getShippingStatusService() { if (!$this->shippingStatusService) { $this->setShippingStatusService(new ShippingStatusService($this)); } return $this->shippingStatusService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setShippingStatusService(ShippingStatusServiceInterface $service)\n {\n $this->shippingStatusService = $service;\n }", "public function getShippingService()\n {\n return $this->shippingService;\n }", "public function getShippingService()\n {\n if (!$this->shippingService) {\n $this->setShippingService(new ShippingService($this));\n }\n\n return $this->shippingService;\n }", "public function show(ShippingStatus $shippingStatus)\n {\n //\n }", "public function updateShipmentStatus($orderId, $shippingStatus);", "public function getShippingServicePriority()\n {\n return $this->shippingServicePriority;\n }", "public function isShipping();", "protected function buildShippingStatusFields(): void\n {\n $isLogistic = $this->isLogisticMode();\n //====================================================================//\n // Order Shipment Status\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"shipping_status\")\n ->name(\"Shipping Status\")\n ->microData(\n \"http://schema.org/Order\",\n $isLogistic ? \"orderStatus\" : \"shippingStatus\"\n )\n ->addChoice(OrderStatus::CANCELED, \"Cancelled\")\n ->addChoice(OrderStatus::PROCESSING, \"Ready\")\n ->addChoice(OrderStatus::DELIVERED, \"Shipped\")\n ->isReadOnly(!$isLogistic)\n ;\n }", "public function setShippingService(ShippingServiceInterface $service)\n {\n $this->shippingService = $service;\n }", "public function setShipmentStatus($value) \n {\n $this->_fields['ShipmentStatus']['FieldValue'] = $value;\n return $this;\n }", "private static function change_shipping_methods_status( $status = 1 ) {\n\t\tglobal $wpdb;\n\n\t\tforeach ( static::get_shipping_method_map() as $item ) {\n\t\t\t$instance_id = $item->getWoocommerceShippingMethodId();\n\t\t\t$method = new Packlink_Shipping_Method( $instance_id );\n\n\t\t\tif ( $wpdb->update( \"{$wpdb->prefix}woocommerce_shipping_zone_methods\", array( 'is_enabled' => $status ), array( 'instance_id' => absint( $instance_id ) ) ) ) {\n\t\t\t\tdo_action( 'woocommerce_shipping_zone_method_status_toggled', $instance_id, $method->id, $item->getZoneId(), $status );\n\t\t\t}\n\t\t}\n\t}", "function ServiceStatus(&$rServices) {\n\t\tglobal $urchin4Enabled;\n\t\t\n\t\tif (IsHidden(\"apache\"))\n\t\t\t$status = -1;\n\t\telse\n\t\t\t$status = trim(shell_exec(\"ps ax | grep /usr/sbin/httpd | grep -v -c grep\"));\n\t\t$rServices[\"Apache Web Server\"] = $status;\n\t\t\n\t\t$status = trim(shell_exec(\"ps ax | grep /usr/apnscp/sbin/lservice | grep -v -c grep\"));\n\t\t$rServices[\"apnscp\"] = $status;\n\t\t\n\t\tif (IsHidden(\"bind\"))\n\t\t\t$status = -1;\n\t\telse\n\t\t\t$status = trim(shell_exec(\"ps ax | grep named | grep -v -c grep\"));\n\t\t$rServices[\"BIND DNS Server\"] = $status;\n\t\t\n\t\tif (IsHidden(\"mysql\"))\n\t\t\t$status = -1;\n\t\telse\n\t\t\t$status = trim(shell_exec(\"ps ax | grep mysqld | grep -v -c grep\"));\n\t\t$rServices[\"MySQL\"] = $status;\n\t\t\n\t\t$status = trim(shell_exec(\"ps ax | grep /usr/bin/postmaster | grep -v -c grep\"));\n\t\t$rServices[\"PostgreSQL\"] = $status;\n\t\t\n\t\t$status = trim(shell_exec(\"ps ax | grep /usr/sbin/sshd | grep -v -c grep\"));\n\t\t$rServices[\"OpenSSH Secure Shell\"] = $status;\n\t\t\n\t\t/*\n\t\t* because IMAP/POP3 is run under the xinetd process\n\t\t* with Redhat, we must check the file, assuming\n\t\t* an Ensim distribution, which places our required information\n\t\t* in wp_ipop3; given this, scan the file for the disabled\n\t\t* line and check the value. It is slow and ugly, \n\t\t* *but* it works, same ideology behind Telnet\n\t\t*/\n\t\tif (IsHidden(\"imap\"))\n\t\t\t$status = -1;\n\t\telse {\n\t\t\t$status = trim(shell_exec(\"ps ax | grep xinetd | grep -v -c grep\"));\n\t\t\tif ($status) {\n\t\t\t\t$status = ServiceOnOff(\"wp_ipop3\");\n\t\t\t}\n\t\t}\n\t\t$rServices[\"POP3 + Imap Server\"] = $status;\n\t\t\n\t\tif (IsHidden(\"proftpd\"))\n\t\t\t$status = -1;\n\t\telse\n\t\t\t$status = trim(shell_exec(\"ps ax | grep proftpd | grep -v -c grep\"));\n\t\t$rServices[\"ProFTPD FTP Server\"] = $status;\n\t\t\n\t\tif (IsHidden(\"sendmail\"))\n\t\t\t$status = -1;\n\t\telse\n\t\t\t$status = trim(shell_exec(\"ps ax | grep sendmail | grep -v -c grep\"));\n\t\t$rServices[\"Sendmail SMTP Server\"] = $status;\n\t\t\n\t\tif (IsHidden(\"telnet\"))\n\t\t\t$status = -1;\n\t\telse {\n\t\t\t$status = trim(shell_exec(\"ps ax | grep xinetd | grep -v -c grep\"));\n\t\t\tif ($status) {\n\t\t\t\t$status = ServiceOnOff(\"wp_telnet\");\n\t\t\t}\n\t\t}\t\n\t\t$rServices[\"Telnet\"] = $status;\n\t\t\n\t\tif (IsHidden(\"tomcat4\"))\n\t\t\t$status = -1;\n\t\telse\n\t\t\t$status = trim(shell_exec(\"ps ax | grep java.*endorsed.dirs | grep -v -c grep\"));\n\t\t$rServices[\"Tomcat 4\"] = $status;\n\t\t\n\t\tif ($urchin4Enabled) {\n\t\t\t$status = trim(shell_exec(\"ps ax | grep urchinwebd | grep -v -c grep\"));\n\t\t\t$rServices[\"Urchin 5\"] = $status;\n\t\t}\n\t\t// well if we're viewing this page *then*\n\t\t// WEBppliance works.\n\t\t$rServices[\"WEBppliance\"] = 1;\n\t }", "function register_ia_shipped_order_status()\n {\n register_post_status('wc-ia-shipped', array(\n 'label' => 'Shipped',\n 'public' => true,\n 'exclude_from_search' => false,\n 'show_in_admin_all_list' => true,\n 'show_in_admin_status_list' => true,\n 'label_count' => _n_noop('Shipped (%s)', 'Shipped (%s)')\n ));\n }", "public function edit(ShippingStatus $shippingStatus)\n {\n //\n }", "public function setShippingService($shippingService)\n {\n $this->shippingService = $shippingService;\n return $this;\n }", "public function withShipmentStatus($value)\n {\n $this->setShipmentStatus($value);\n return $this;\n }", "public function getShipmentStatus() \n {\n return $this->_fields['ShipmentStatus']['FieldValue'];\n }", "public static function supplyNeedsService()\n {\n return self::getService('inventorysuccess/service_supplyNeedsService');\n }", "public static function initialize_shipping_module() {\n $GLOBALS['shipping_modules'] = new shipping($_SESSION['shipping']);\n }", "public function getShipment()\n {\n $getShipmentBody = file_get_contents(__DIR__\n . '/Mocks/shipment-response-success.xml');\n $getDetailsBody = file_get_contents(__DIR__\n . '/Mocks/shipment-details-success.xml');\n $getReceiptBody = file_get_contents(__DIR__\n . '/Mocks/shipment-receipt-success.xml');\n $mock = new MockHandler([\n new Response(200, [], $getShipmentBody),\n new Response(200, [], $getDetailsBody),\n new Response(200, [], $getReceiptBody),\n ]);\n $handler = HandlerStack::create($mock);\n $shipment = $this->shipmentService->getShipment('0123456789', '', ['handler' => $handler]);\n $details = $this->shipmentService->getShipment('0123456789', '', ['handler' => $handler]);\n $receipt = $this->shipmentService->getShipment('0123456789', '', ['handler' => $handler]);\n\n $this->checkShippingResponse($shipment);\n $this->checkShippingDetails($details);\n $this->checkShippingReceipt($receipt);\n }", "private function updateShippingStatus(string $current, string $new): void\n {\n //====================================================================//\n // Create State Machine\n $stateMachine = $this->stateMachine->get($this->object, OrderShippingTransitions::GRAPH);\n //====================================================================//\n // Cancelled => Ready [FORCED]\n if (OrderStatus::isCanceled($current) && !OrderStatus::isCanceled($new)) {\n //====================================================================//\n // Force Order State to Ready\n $this->object->setShippingState(OrderShippingStates::STATE_READY);\n //================================s====================================//\n // Force Set First Shipment State to Ready\n if ($shipment = $this->getFirstShipment()) {\n $shipment->setState(ShipmentInterface::STATE_READY);\n }\n $current = ShippingStatusIdentifier::toSplash($this->object);\n $this->needUpdate();\n }\n //====================================================================//\n // Ready => Cancelled\n if (OrderStatus::isCanceled($new)) {\n //====================================================================//\n // Move Order State to Ready by State Machine\n $stateMachine->apply(OrderShippingTransitions::TRANSITION_CANCEL);\n //====================================================================//\n // Force Set First Shipment State to Ready\n if ($shipment = $this->getFirstShipment()) {\n $shipment->setState(ShipmentInterface::STATE_CANCELLED);\n }\n $this->needUpdate();\n\n return;\n }\n //====================================================================//\n // Ready => Shipped\n if (OrderStatus::isShipped($new) || OrderStatus::isDelivered($new)) {\n $stateMachine->apply(OrderShippingTransitions::TRANSITION_SHIP);\n //====================================================================//\n // Force Set First Shipment State to Ready\n if ($shipment = $this->getFirstShipment()) {\n $shipment->setState(ShipmentInterface::STATE_SHIPPED);\n $shipment->setShippedAt(new \\DateTime());\n }\n $this->needUpdate();\n }\n }", "public function getShippingTracker()\n {\n return null;\n }", "public function __construct(ShippingServiceInterface $shippingService)\n {\n $this->middleware('auth');\n $this->shippingService = $shippingService;\n }", "public function load()\n {\n $shipment = false;\n $orderId = $this->getOrderId();\n $shipmentId = $this->getShipmentId();\n if ($shipmentId) {\n $shipment = $this->shipmentRepository->get($shipmentId);\n } elseif ($orderId) {\n $vendorOrder = $this->getVendorOrder();\n \n $order = $this->orderRepository->get($orderId);\n \n /**\n * Check order existing\n */\n if (!$order->getId()) {\n $this->messageManager->addError(__('The order no longer exists.'));\n return false;\n }\n /**\n * Check shipment is available to create separate from invoice\n */\n if ($order->getForcedShipmentWithInvoice()) {\n $this->messageManager->addError(__('Cannot do shipment for the order separately from invoice.'));\n return false;\n }\n /**\n * Check shipment create availability\n */\n if (!$vendorOrder->canShip()) {\n $this->messageManager->addError(__('Cannot do shipment for the order.'));\n return false;\n }\n \n $shipment = $this->shipmentFactory->createVendorShipment(\n $vendorOrder,\n $this->getItemQtys(),\n $this->getTracking()\n );\n }\n \n $this->registry->register('current_shipment', $shipment);\n return $shipment;\n }", "public function update(Request $request, ShippingStatus $shippingStatus)\n {\n //\n }", "function update_status() {\n global $order, $db;\n if ($this->enabled && (int)$this->zone > 0) {\n $check_flag = false;\n $sql = \"SELECT zone_id\n FROM \" . TABLE_ZONES_TO_GEO_ZONES . \"\n WHERE geo_zone_id = :zoneId\n AND zone_country_id = :countryId\n ORDER BY zone_id\";\n $sql = $db->bindVars($sql, ':zoneId', $this->zone, 'integer');\n $sql = $db->bindVars($sql, ':countryId', $order->billing['country']['id'], 'integer');\n $check = $db->Execute($sql);\n while (!$check->EOF) {\n if ($check->fields['zone_id'] < 1) {\n $check_flag = true;\n break;\n } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {\n $check_flag = true;\n break;\n }\n $check->MoveNext();\n }\n\n if (!$check_flag) {\n $this->enabled = false;\n }\n\n // module cannot be used for purchase > $10,000 USD\n $order_amount = $this->calc_order_amount($order->info['total'], 'USD');\n if ($order_amount > 10000) $this->enabled = false;\n }\n }", "public function handleShipping() { \n $error = array('status' => false);\n $model = new ShippingInfoForm();\n $model->setAttributeByDefault();\n\n $creditCardModel = new CreditCardForm;\n\n if (isset($_POST['ShippingInfoForm'])) {\n $model->attributes = $_POST['ShippingInfoForm'];\n\n if ($model->validate()) {\n $shipping_id = UserProfile::model()->saveShippingInfo($_POST['ShippingInfoForm']);\n Yii::app()->session['shipping_id'] = $shipping_id; \n $this->redirect($this->createUrl(\"/web/payment/placeOrder\"));\n }\n }\n \n $shipping_country_name = \"\";\n // getting shipping country name on behalf of country_id(region id) to disable the Cash On Delivery option for international customers\n $shipping_country_name = Region::model()->getRegionName($model->shipping_country);\n \n $criteria = new CDbCriteria;\n if ($country_list = Cart::model()->getCartCountryList()) {\n\n $criteria->addInCondition(\"name\", $country_list);\n }\n $criteria->order = \"name ASC\";\n $regionList = CHtml::listData(Region::model()->findAll($criteria), 'id', 'name');\n $this->render('//payment/payment_method', array(\n 'model' => $model,\n 'regionList' => $regionList,\n 'creditCardModel' => $creditCardModel,\n 'country_name' => $shipping_country_name,\n 'error' => $error\n ));\n }", "protected function init_service_status()\n {\n return array(\n \"GET\" => KanojoX::$settings->default_GET_status,\n \"PUT\" => KanojoX::$settings->default_PUT_status,\n \"POST\" => KanojoX::$settings->default_POST_status,\n \"DELETE\" => KanojoX::$settings->default_DELETE_status,\n );\n }", "public function GetServiceStatus(){\n\t\t\t$uri = parent::createMWSUri('GetServiceStatus', $this->api_endpoint, $this->api_version);\n\t\t\treturn parent::mwsCurlRetrieve($uri);\n\t\t}", "public function listEnabledShippingServices(Shop_ShippingOption $shippingOption){\n return $this->list_enabled_options($shippingOption);\n }" ]
[ "0.706052", "0.665739", "0.6304116", "0.6226058", "0.61912304", "0.6045105", "0.6008604", "0.60034806", "0.5838346", "0.58146673", "0.5801621", "0.577501", "0.57186943", "0.56651485", "0.56602937", "0.558267", "0.55705094", "0.5538535", "0.5536911", "0.552607", "0.5459741", "0.54582864", "0.5386694", "0.53811103", "0.53800225", "0.5377158", "0.53682244", "0.53449214", "0.5336042", "0.5306343" ]
0.7688122
0
Set the shipping status service.
public function setShippingStatusService(ShippingStatusServiceInterface $service) { $this->shippingStatusService = $service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShipmentStatus($orderId, $shippingStatus);", "public function setShipmentStatus($value) \n {\n $this->_fields['ShipmentStatus']['FieldValue'] = $value;\n return $this;\n }", "public function getShippingStatusService()\n {\n if (!$this->shippingStatusService) {\n $this->setShippingStatusService(new ShippingStatusService($this));\n }\n\n return $this->shippingStatusService;\n }", "public function setShippingService(ShippingServiceInterface $service)\n {\n $this->shippingService = $service;\n }", "public function withShipmentStatus($value)\n {\n $this->setShipmentStatus($value);\n return $this;\n }", "private static function change_shipping_methods_status( $status = 1 ) {\n\t\tglobal $wpdb;\n\n\t\tforeach ( static::get_shipping_method_map() as $item ) {\n\t\t\t$instance_id = $item->getWoocommerceShippingMethodId();\n\t\t\t$method = new Packlink_Shipping_Method( $instance_id );\n\n\t\t\tif ( $wpdb->update( \"{$wpdb->prefix}woocommerce_shipping_zone_methods\", array( 'is_enabled' => $status ), array( 'instance_id' => absint( $instance_id ) ) ) ) {\n\t\t\t\tdo_action( 'woocommerce_shipping_zone_method_status_toggled', $instance_id, $method->id, $item->getZoneId(), $status );\n\t\t\t}\n\t\t}\n\t}", "public function edit(ShippingStatus $shippingStatus)\n {\n //\n }", "public function setStatus($status);", "public function setStatus($status);", "private function setShippingInformation()\n {\n if ($this->_checkoutSession->getLastRealOrder()->getIsVirtual()) {\n $this->_paymentRequest->setShipping()->setAddressRequired()->withParameters('false');\n } else {\n $this->_paymentRequest->setShipping()->setAddressRequired()->withParameters('true');\n $shipping = $this->_checkoutSession->getLastRealOrder()->getShippingAddress();\n if ($shipping) {\n if (count($shipping->getStreet()) === 4) {\n $this->_paymentRequest->setShipping()->setAddress()->withParameters(\n $shipping->getStreetLine(1),\n $shipping->getStreetLine(2),\n $shipping->getStreetLine(4),\n \\UOL\\PagSeguro\\Helper\\Data::fixPostalCode($shipping->getPostcode()),\n $shipping->getCity(),\n $this->getRegionAbbreviation($shipping),\n $this->getCountryName($shipping['country_id']),\n $shipping->getStreetLine(3)\n );\n } else {\n $address = \\UOL\\PagSeguro\\Helper\\Data::addressConfig($shipping['street']);\n\n $this->_paymentRequest->setShipping()->setAddress()->withParameters(\n $this->getShippingAddress($address[0], $shipping),\n $this->getShippingAddress($address[1]),\n $this->getShippingAddress($address[3]),\n \\UOL\\PagSeguro\\Helper\\Data::fixPostalCode($shipping->getPostcode()),\n $shipping->getCity(),\n $this->getRegionAbbreviation($shipping),\n $this->getCountryName($shipping['country_id']),\n $this->getShippingAddress($address[2])\n );\n }\n\n $this->_paymentRequest->setShipping()->setType()\n ->withParameters(\\PagSeguro\\Enum\\Shipping\\Type::NOT_SPECIFIED); //Shipping Type\n $this->_paymentRequest->setShipping()->setCost()\n ->withParameters(number_format($this->getShippingAmount(), 2, '.', '')); //Shipping Coast\n }\n }\n }", "public function setShippingService($shippingService)\n {\n $this->shippingService = $shippingService;\n return $this;\n }", "public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n }", "public function setStatus($mailingId, $status)\n {\n }", "public function setStatus($status){\n $this->status = $status;\n }", "public function setStatus($status) {\n $this->status = $status;\n }", "public function setStatus($status) {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status) {\n\t\t$this->_status = $status;\n\t}", "public function set_status( $status ) {\n\t\t$this->status = $status;\n\t}", "public function set_status($p_status) {\n $this->status = $p_status;\n }", "public function setStatus($status)\n {\n $this->segment->set('status', $status);\n }", "public function setStatus($status){\r\n\t\t$this->status = $status;\r\n\t}", "public function update(Request $request, ShippingStatus $shippingStatus)\n {\n //\n }", "public function setStatus($status)\r\n\t{\r\n\t\t$this->_status = $status;\r\n\t}", "function set_status($status)\r\n {\r\n $this->set_default_property(self :: PROPERTY_STATUS, $status);\r\n }", "public function setStatus($status) {\n if (!empty($status)) {\n $this->status = $status;\n }\n }", "private function updateShippingStatus(string $current, string $new): void\n {\n //====================================================================//\n // Create State Machine\n $stateMachine = $this->stateMachine->get($this->object, OrderShippingTransitions::GRAPH);\n //====================================================================//\n // Cancelled => Ready [FORCED]\n if (OrderStatus::isCanceled($current) && !OrderStatus::isCanceled($new)) {\n //====================================================================//\n // Force Order State to Ready\n $this->object->setShippingState(OrderShippingStates::STATE_READY);\n //================================s====================================//\n // Force Set First Shipment State to Ready\n if ($shipment = $this->getFirstShipment()) {\n $shipment->setState(ShipmentInterface::STATE_READY);\n }\n $current = ShippingStatusIdentifier::toSplash($this->object);\n $this->needUpdate();\n }\n //====================================================================//\n // Ready => Cancelled\n if (OrderStatus::isCanceled($new)) {\n //====================================================================//\n // Move Order State to Ready by State Machine\n $stateMachine->apply(OrderShippingTransitions::TRANSITION_CANCEL);\n //====================================================================//\n // Force Set First Shipment State to Ready\n if ($shipment = $this->getFirstShipment()) {\n $shipment->setState(ShipmentInterface::STATE_CANCELLED);\n }\n $this->needUpdate();\n\n return;\n }\n //====================================================================//\n // Ready => Shipped\n if (OrderStatus::isShipped($new) || OrderStatus::isDelivered($new)) {\n $stateMachine->apply(OrderShippingTransitions::TRANSITION_SHIP);\n //====================================================================//\n // Force Set First Shipment State to Ready\n if ($shipment = $this->getFirstShipment()) {\n $shipment->setState(ShipmentInterface::STATE_SHIPPED);\n $shipment->setShippedAt(new \\DateTime());\n }\n $this->needUpdate();\n }\n }" ]
[ "0.71531624", "0.7071104", "0.67670166", "0.6733641", "0.6677597", "0.61737555", "0.61483455", "0.60621226", "0.60621226", "0.6016738", "0.5990943", "0.5987869", "0.59868795", "0.5982416", "0.59781617", "0.59781617", "0.5975039", "0.5975039", "0.5975039", "0.5975039", "0.5972156", "0.59459734", "0.5917665", "0.5917112", "0.5903623", "0.58963937", "0.5889755", "0.5858797", "0.5832826", "0.5819312" ]
0.8080425
0
Delivery date service. Automatically load the delivery date service
public function getDeliveryDateService() { if (!$this->deliveryDateService) { $this->setDeliveryDateService(new DeliveryDateService($this)); } return $this->deliveryDateService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDeliveryDateService(DeliveryDateServiceInterface $service)\n {\n $this->deliveryDateService = $service;\n }", "public function mapDeliveryDate()\n {\n if (!$this->helper->isShippitLiveQuote($this->order)) {\n return $this;\n }\n\n $deliveryDate = $this->helper->getShippitLiveQuoteDetail($this->order, 'delivery_date');\n\n if (empty($deliveryDate)) {\n return $this;\n }\n\n return $this->setDeliveryDate($deliveryDate);\n }", "public function getDeliveryDate(): string|null;", "public function getDefaultDeliveryDate(): string|null;", "public function hasDeliveryDate(): bool;", "public function delivery()\n {\n $this->template->write('title', 'Boutique: Shipment Delivery'); \n \n $data['delivery_info'] = '';\n \n $this->template->write_view('home_main_content', 'front_end/site_information/delivery', $data, TRUE);\n $this->template->render();\n }", "public function __construct(Delivery $d)\n {\n //\n $this->delivery = $d;\n }", "private function getFirstDeliveryDate()\n {\n $today = new \\DateTime(date('Y-m-d'));\n $firstDeliveryDate = $this->delivery_startdate->modify('this ' . $this->delivery_weekday); // Make sure it's the correct weekday\n\n // If first date is in the future just return it.\n if ($today <= $firstDeliveryDate) {\n return $firstDeliveryDate;\n }\n\n // If the first date is in the past, calculate the closest date based on the first date and the delivery interval\n while ($today >= $firstDeliveryDate) {\n if ($this->delivery_interval === '+1 month') {\n $deliveryInterval = $this->getDeliveryIntervalFormat() . 'next month';\n } else {\n $deliveryInterval = $this->getDeliveryIntervalFormat() . ' ' . $firstDeliveryDate->format('Y-m-d');\n }\n\n $firstDeliveryDate->modify($deliveryInterval);\n }\n\n return $firstDeliveryDate;\n }", "public function getDeliveryDateConfig()\n {\n $deliveryDate = Mage::getStoreConfig('delivery_date_configuration/general/set_delivery_date');\n\n return (bool) $deliveryDate;\n }", "public function getDeliveryDate(): ?\\DateTime\n {\n return $this->deliveryDate;\n }", "public function getDateFinService() {\n return $this->dateFinService;\n }", "public function setDeliveryDate(\\DateTime $date)\n {\n $this->deliveryDate = $date;\n return $this;\n }", "public function add_checkout_preferred_delivery() {\n\n\t\t\tif ( function_exists( 'get_field' ) ) {\n\t\t\t\t$delivery_field = get_field_object( 'field_5537b78f95074' );\n\t\t\t\t$date_options = null;\n\n\t\t\t\tif ( !class_exists( 'GWIDeliveryEstimates' ) ) require_once( get_template_directory() . '/lib/delivery_estimates.php' );\n\t\t\t\tif ( !function_exists( 'Roots\\Sage\\Extras\\get_visitor_info' ) ) equire_once( get_template_directory() . '/lib/extras.php' );\n\n\t\t\t\t$postcode = Roots\\Sage\\Extras\\get_postcode_from_address(get_current_user_id());\n\t\t\t\tif ( !$postcode ) $postcode = Roots\\Sage\\Extras\\get_cookie_postcode();\n\n\t\t\t\tif ( $postcode ) {\n\t\t\t\t\t$gwi_delivery_estimates = new GWIDeliveryEstimates();\n\t\t\t\t\t$delivery_info = $gwi_delivery_estimates->get_delivery_date( $postcode );\n\n\t\t\t\t\t$start = (int)$delivery_info->format( 'N' );\n\t\t\t\t\t$date_options = array();\n\t\t\t\t\tfor ( $i = 0; $i <= 5 - $start; $i++ ) {\n\t\t\t\t\t\t$date_options[$delivery_info->format( 'Ymd' )] = date_i18n( 'l d.m', $delivery_info->format( 'U' ) );\n\t\t\t\t\t\t$delivery_info->modify( '+1 day' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\n\t\t\t\t<p class=\"form-row form-row-wide gwi-delivery-preference\">\n\t\t\t\t\t<label for=\"preferred_delivery_time\" class=\"\"><?= __('Dein Lieferzeitraum'); ?></label>\n\n\t\t\t\t\t<?php if ( $date_options ) { ?>\n\t\t\t\t\t\t<select name=\"preferred_delivery_date\" id=\"preferred_delivery_date\">\n\t\t\t\t\t\t\t<?php foreach ( $date_options as $k => $d ) { ?>\n\t\t\t\t\t\t\t\t<option value=\"<?php echo $k; ?>\"><?php echo $d; ?></option>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t</select> um\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t<select name=\"preferred_delivery_time\" id=\"preferred_delivery_time\">\n\t\t\t\t\t\t<?php foreach ( $delivery_field['choices'] as $k => $c ) { ?>\n\t\t\t\t\t\t\t<option value=\"<?php echo $k; ?>\"><?php echo $k; ?></option>\n\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t</select>\n\t\t\t\t</p>\n\n\t\t\t\t<?php\n\t\t\t}\n\n\t\t}", "public function __construct (Yourdelivery_Model_Order_Abstract $order) {\n $this->_order = $order;\n $this->_logger = Zend_Registry::get('logger');\n \n // set api url and key\n $service = $order->getService();\n $courier = $service->getCourier($order);\n if (is_object($courier)) {\n switch ($courier->getName()) {\n case \"Prompt\":\n $this->_server = IS_PRODUCTION ? 'http://frankfurt.fahrradkuriere.mobi/api/php' : 'http://test.fahrradkuriere.mobi/api/php';\n $this->_api = IS_PRODUCTION ? 'KW3nm4GOIr5J3Zr6eGFN' : '9J88pHAoCTCQpqP7LzXJ';\n break;\n\n case \"Rotrunner\":\n $this->_server = IS_PRODUCTION ? 'http://rotrunner.fahrradkuriere.mobi/api/php' : 'http://test.rotrunner.fahrradkuriere.mobi/api/php';\n $this->_api = IS_PRODUCTION ? 'shei2ikai0cu1eejooWa' : 'shei2ikai0cu1eejooWa';\n break;\n }\n }\n \n if (empty($this->_server)) {\n throw new Yourdelivery_Exception(\"Prompt API: No url defined\");\n }\n \n if (empty($this->_api)) {\n throw new Yourdelivery_Exception(\"Prompt API: No key defined\");\n }\n \n /**\n * standard delivery options\n */\n $this->_deliveryOpts = array(\n 'person' => true, //deliver in person\n 'postbox' => false, //do not put the delivery in a postbox, yaks\n 'lodge' => false, //do not put the delivery on the doorstep\n 'retry' => false, //do not retry delivery\n 'retrytm' => false, //do not retry delivery\n 'return' => true, //do not return to sender\n );\n\n /**\n * @todo: who is to be alerted\n */\n $this->_alerts = array(\n );\n\n }", "public function deliveryEvent(Order $order){\n $timeToAdd = $this->amPmDecider($order->delivery_time);\n $deliveryTime = explode('-', $order->delivery_time);\n $startTime = $this->getRealtime($deliveryTime[0]) < 12 ? $this->getRealtime($deliveryTime[0]) + $timeToAdd : $this->getRealtime($deliveryTime[0]);\n $endTime = $this->getRealtime($deliveryTime[1]) + $timeToAdd;\n $startDateTime = $this->createCalendarDateTime($order->delivery_date, $startTime);\n $endDatetime = $this->createCalendarDateTime($order->delivery_date, $endTime);\n return new Google_Service_Calendar_Event([\n 'summary' => \"Delivery {$order->order_no}\",\n 'location' => $this->shippingLocationCreater($order),\n 'description' => $this->deliveryNote($order),\n \"extendedProperties\" => [\n \"private\" => [\n \"orderID\" => $order->order_no,\n \"type\" => \"delivery\"\n ]\n ],\n \"start\" => [\n \"dateTime\" => $startDateTime,\n 'timeZone' => \"America/Los_Angeles\"\n ],\n \"end\" => [\n \"dateTime\" => $endDatetime,\n 'timeZone' => \"America/Los_Angeles\"\n ],\n \"colorId\" => 2\n ]);\n }", "public function getDateMiseEnService() {\n return $this->dateMiseEnService;\n }", "protected function getSonata_Admin_Form_Filter_Type_DateService()\n {\n return $this->services['sonata.admin.form.filter.type.date'] = new \\Sonata\\AdminBundle\\Form\\Type\\Filter\\DateType(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'});\n }", "public function getDeliveryDate(GetDeliveryDate $getDeliveryDate)\n {\n return $this->getDeliveryDateService()->getDeliveryDate($getDeliveryDate);\n }", "public function set_shipping_date($date)\n {\n if (is_string($date)) {\n $date = new DateTime($date);\n }\n if (get_class($date) !== 'DateTime') {\n throw new Exception('Method `set_shipping_date` requires DateTime as an argument.');\n }\n $diff = $date->diff(new DateTime('today'));\n $days = $diff->days;\n if ($days < 0) {\n throw new Exception('Method `set_shipping_date` requires DateTime as an argument.');\n }\n $this->set_expected_days_till_shipping($days);\n }", "protected function getForm_Type_DateService()\n {\n @trigger_error('The \"form.type.date\" service is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['form.type.date'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType();\n }", "public static function get_woocommerce_pdf_date( $order_id, $usedate, $sendsomething = false ) {\n\t\t\t\tglobal $woocommerce;\n\t\t\t\t\n\t\t\t\t$woocommerce_pdf_invoice_options = get_option( 'woocommerce_pdf_invoice_settings' );\n\t\t\t\t$date_format = $woocommerce_pdf_invoice_options['pdf_date_format'];\n\n\t\t\t\t// Force a $date_format if one is not set\n\t\t\t\tif ( !isset( $date_format ) || $date_format == '' ) {\n\t\t\t\t\t$date_format = \"j F, Y\";\n\t\t\t\t}\n\n\t\t\t\t$order \t = new WC_Order( $order_id );\n\t\t\n\t\t\t\tif ( $usedate == 'completed' ) {\n\t\t\t\t\t$date = esc_html( get_post_meta( $order_id, '_invoice_date', TRUE ) );\n\n\t\t\t\t\t// Double check $date is set if the order is completed\n\t\t\t\t\t$order_status\t= is_callable( array( $order, 'get_status' ) ) ? $order->get_status() : $order->order_status;\n\t\t\t\t\tif( $order_status == 'completed' && $date == '' ) {\n\t\t\t\t\t\t$date = WC_send_pdf::get_completed_date( $order_id );\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t// WooCommerce 3.0 compatibility\n\t\t\t\t\t$date = is_callable( array( $order, 'get_date_created' ) ) ? $order->get_date_created() : $order->order_date;\n\t\t\t\t}\n\n\t\t\t\t// In some cases $date will be empty so we might want to send the order date\n\t\t\t\tif ( $sendsomething && !$date ) {\n\t\t\t\t\t// WooCommerce 3.0 compatibility\n\t\t\t\t\t$date = is_callable( array( $order, 'get_date_created' ) ) ? $order->get_date_created() : $order->order_date;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $date ) {\n\n\t\t\t\t\t// Make sure the date is formated correctly\n\t\t\t\t\t$date_check = DateTime::createFromFormat( get_option( 'date_format' ), $date );\n\n\t\t\t\t\tif( $date_check ) {\n\t\t\t\t\t\t$date = $date_check->format( $date_format );\n\t\t\t\t\t}\n\n\t\t\t\t\tif( strtotime( $date ) ) {\n\t\t\t\t\t\t$date = date_i18n( $date_format, strtotime( $date ) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Return a date in the format that matches the PDF Ivoice settings.\n\t\t\t\t\treturn $date;\n\n\t\t\t\t} else {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\n\t\t\t}", "private function get_service() {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 12.5' );\n\n\t\treturn null;\n\t}", "public static function serivce_order()\n\t{\n\t\treturn static::makeService('ServiceOrderService');\n\t}", "public function today_delivery_get($user_id = NULL){\n\n if($user_id){\n\n $role_id = $this->db->select(\"role_id\")->get_where(\"users\",\"id = {$user_id}\")->row_array()['role_id'];\n\n $query = \"SELECT\n `clients`.`client_name`,\n `clients`.`contact_person_name_1` AS `contact_person`,\n `clients`.`contact_person_1_phone_1` AS `client_contact`,\n `clients`.`contact_person_1_email` AS `client_email`,\n `client_delivery_addresses`.`title`,\n `client_delivery_addresses`.`address`,\n `zip_codes`.`zip_code`,\n `orders`.`priority`,\n (CASE\n WHEN schemes.gift_mode='cash_benifit' THEN (CASE\n WHEN schemes.discount_mode='amount' THEN orders.payable_amount-schemes.discount_value\n ELSE orders.payable_amount-(orders.payable_amount*schemes.discount_value/100)\n END)\n ELSE orders.payable_amount\n END) AS `payable_amount`,\n date(`delivery`.`expected_delivey_datetime`) AS `expected_delivery_date`,\n `orders`.`order_status`,\n `delivery_config_orders`.`id` AS `dco_id`,\n (CASE\n WHEN {$role_id} = 3 THEN TRUE\n ELSE (CASE\n WHEN `delivery_config`.`delivery_boy_id` IS NULL THEN TRUE\n ELSE FALSE\n END)\n END) AS `show_full_details`,\n `orders`.`id` AS `order_id`,\n `schemes`.`id` AS `scheme_id`,\n 0 AS `manage_stock_needed`,\n 0 AS `inverntory_existing_quantity`,\n 0 AS `inverntory_product_id`,\n '' AS `inverntory_product_name`\n FROM `delivery`\n LEFT JOIN `delivery_config` ON `delivery_config`.`delivery_id` = `delivery`.`id`\n LEFT JOIN `delivery_config_orders` ON `delivery_config_orders`.`delivery_config_id` = `delivery_config`.`id` \n LEFT JOIN `orders` ON `orders`.`id` = `delivery_config_orders`.`order_id`\n LEFT JOIN `schemes` ON `schemes`.`id` = `orders`.`scheme_id`\n LEFT JOIN `clients` ON `clients`.`id` = `orders`.`client_id`\n LEFT JOIN `client_delivery_addresses` ON `client_delivery_addresses`.`id` = `orders`.`delivery_address_id`\n LEFT JOIN `zip_codes` ON `zip_codes`.`id` = `client_delivery_addresses`.`zip_code_id`\n WHERE (`delivery_config`.`delivery_boy_id` = {$user_id} OR `delivery_config`.`driver_id` = {$user_id})\n AND `orders`.`order_status` <> 'Delivered'\n AND date(`delivery`.`expected_delivey_datetime`) = CURDATE()\";\n\n if($deliveries = $this->db->query($query)->result_array()){\n\n \n foreach($deliveries as $k=>$delivery){\n\n if($delivery['scheme_id']){\n\n $products = $this->db->query(\"SELECT\n products.product_name AS product,\n order_items.quantity,\n order_items.effective_price AS price,\n order_items.subtotal AS total\n FROM order_items\n LEFT JOIN products ON products.id = order_items.product_id\n WHERE order_items.order_id = {$delivery['order_id']}\n \n UNION\n\n SELECT\n `products`.`product_name` AS `product`,\n `schemes`.`free_product_qty` AS `quantity`,\n 0 AS `price`,\n 0 AS `total`\n FROM `schemes`\n LEFT JOIN `products` ON `products`.`id` = `schemes`.`free_product_id`\n WHERE `schemes`.`gift_mode` = 'free_product'\n AND `schemes`.`id` = {$delivery['scheme_id']}\")\n ->result_array();\n }else{\n $products = $this->db->query(\"SELECT\n products.product_name AS product,\n order_items.quantity,\n order_items.effective_price AS price,\n order_items.subtotal AS total\n FROM order_items\n LEFT JOIN products ON products.id = order_items.product_id\n WHERE order_items.order_id = {$delivery['order_id']}\")\n ->result_array();\n }\n \n \n $deliveries[$k]['products'] = $products;\n\n $existing_inv = $this->db->query(\"SELECT \n order_items.product_id,\n products.product_name,\n (\n IFNULL(client_product_inventory.existing_quentity,0) +\n IFNULL(client_product_inventory.new_delivered,0) -\n IFNULL(client_product_inventory.empty_collected,0)\n ) AS existing_quentity\n FROM orders \n LEFT JOIN order_items ON order_items.order_id = orders.id\n LEFT JOIN products ON products.id = order_items.product_id\n LEFT JOIN client_product_inventory ON client_product_inventory.product_id = products.id \n AND client_product_inventory.client_id = orders.client_id \n WHERE order_items.order_id = {$delivery['order_id']} \n AND products.manage_stock_needed=1\n ORDER BY client_product_inventory.id DESC\n LIMIT 1\")\n ->row_array(); \n \n if($existing_inv){ \n $deliveries[$k]['inverntory_existing_quantity'] = $existing_inv['existing_quentity'];\n $deliveries[$k]['inverntory_product_id'] = $existing_inv['product_id'];\n $deliveries[$k]['inverntory_product_name'] = $existing_inv['product_name'];\n $deliveries[$k]['manage_stock_needed'] = 1;\n }\n\n }\n\n $this->response(\n array(\n 'status' => TRUE,\n 'message' => \"Delivery found.\",\n 'today_delivery'=>count($deliveries),\n 'today_delivery_data'=>$deliveries\n ),REST_Controller::HTTP_OK\n );\n }else{\n $this->response(\n array(\n 'status' => FALSE,\n 'message' => \"Delivery not found.\",\n 'today_delivery'=>0,\n 'today_delivery_data'=>[]\n ),REST_Controller::HTTP_OK\n );\n }\n\n }else{\n $this->response(\n array(\n 'status' => FALSE,\n 'message' => \"Please provide user_id.\",\n 'today_delivery'=>0\n ),\n REST_Controller::HTTP_BAD_REQUEST\n );\n } \n }", "public function __construct(DayOneService $service)\n {\n parent::__construct();\n $this->service = $service;\n }", "private function _getServicePaymentModeCostService()\n {\n $service = PaymentModeCostServiceFactory::build();\n $service->setUpdatedBy($this->getUpdatedBy());\n $service->setIpAddress($this->getIpAddress());\n return $service;\n }", "public static function services() {\n return [\n // Domestic services.\n 'AUS_SERVICE_OPTION_STANDARD' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Standard Post - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_PARCEL_REGULAR,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'AUS_SERVICE_OPTION_SIGNATURE' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Standard Post, Signature required - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_PARCEL_REGULAR,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_SIGNATURE_ON_DELIVERY,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'AUS_SERVICE_OPTION_INS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Standard Post (Insured) - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_PARCEL_REGULAR,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => ServiceOptions::AUS_SERVICE_OPTION_EXTRA_COVER,\n 'extra_cover' => 300,\n ],\n 'AUS_SERVICE_OPTION_SIG_INS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Standard Post (Insured), Signature required - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_PARCEL_REGULAR,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_SIGNATURE_ON_DELIVERY,\n 'sub_opt_code' => ServiceOptions::AUS_SERVICE_OPTION_EXTRA_COVER,\n 'extra_cover' => 5000,\n ],\n 'AUS_PARCEL_EXPRESS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Express Post - 1-3 Days'),\n 'service_code' => ServiceCodes::AUS_PARCEL_EXPRESS,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'AUS_PARCEL_EXPRESS_SIGNATURE' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Express Post, Signature required - 1-3 Days'),\n 'service_code' => ServiceCodes::AUS_PARCEL_EXPRESS,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_SIGNATURE_ON_DELIVERY,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'AUS_PARCEL_EXPRESS_INS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Express Post (Insured) - 1-3 Days'),\n 'service_code' => ServiceCodes::AUS_PARCEL_EXPRESS,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => ServiceOptions::AUS_SERVICE_OPTION_EXTRA_COVER,\n 'extra_cover' => 300,\n ],\n 'AUS_PARCEL_EXPRESS_SIG_INS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Express Post (Insured), Signature required - 1-3 Days'),\n 'service_code' => ServiceCodes::AUS_PARCEL_EXPRESS,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_SIGNATURE_ON_DELIVERY,\n 'sub_opt_code' => ServiceOptions::AUS_SERVICE_OPTION_EXTRA_COVER,\n 'extra_cover' => 5000,\n ],\n 'AUS_PARCEL_COURIER' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Courier Post - Same Day Delivery'),\n 'service_code' => ServiceCodes::AUS_PARCEL_COURIER,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'AUS_PARCEL_COUR_INS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Courier Post (Insured) - Same Day Delivery'),\n 'service_code' => ServiceCodes::AUS_PARCEL_COURIER,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => ServiceOptions::AUS_SERVICE_OPTION_EXTRA_COVER,\n 'extra_cover' => 5000,\n ],\n // International services.\n 'INT_PARCEL_SEA_OWN_PACKAGING' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Economy Sea - 30+ Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_SEA_OWN_PACKAGING,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'INT_PARCEL_SEA_OWN_PACK_SIG' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Economy Sea, Signature required - 30+ Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_SEA_OWN_PACKAGING,\n 'option_code' => ServiceOptions::INT_SIGNATURE_ON_DELIVERY,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'INT_PARCEL_SEA_OWN_PACK_INS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Economy Sea (Insured) - 30+ Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_SEA_OWN_PACKAGING,\n 'option_code' => ServiceOptions::INT_EXTRA_COVER,\n 'sub_opt_code' => '',\n 'extra_cover' => 5000,\n ],\n // @codingStandardsIgnoreStart\n // Not working due to issues with AusPost.\n // 'INT_PAR_SEA_OWN_PACK_SIG_INS' => [\n // 'type' => ServiceTypes::self::PARCEL,\n // 'destination' => ServiceDestinations::INTERNATIONAL,\n // 'description' => t('Australia Post International Economy Sea (Insured), Signature required - 30+ Days'),\n // 'service_code' => ServiceCodes::INT_PARCEL_SEA_OWN_PACKAGING,\n // 'option_code' => [\n // '0' => ServiceOptions::INT_SIGNATURE_ON_DELIVERY,\n // '1' => ServiceOptions::INT_EXTRA_COVER,\n // ],\n // 'sub_opt_code' => '',\n // 'extra_cover' => 5000,\n // ],\n // @codingStandardsIgnoreEnd\n 'INT_PARCEL_AIR_OWN_PACKAGING' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Economy Air - 10+ Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_AIR_OWN_PACKAGING,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'INT_PARCEL_AIR_OWN_PACK_SIG' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Economy Air, Signature required - 10+ Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_AIR_OWN_PACKAGING,\n 'option_code' => ServiceOptions::INT_SIGNATURE_ON_DELIVERY,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'INT_PARCEL_AIR_OWN_PACK_INS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Economy Air (Insured) - 10+ Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_AIR_OWN_PACKAGING,\n 'option_code' => ServiceOptions::INT_EXTRA_COVER,\n 'sub_opt_code' => '',\n 'extra_cover' => 5000,\n ],\n // @codingStandardsIgnoreStart\n // Not working due to issues with AusPost.\n // 'INT_PAR_AIR_OWN_PACK_SIG_INS' => [\n // 'type' => ServiceTypes::self::PARCEL,\n // 'destination' => ServiceDestinations::INTERNATIONAL,\n // 'description' => t('Australia Post International Economy Air (Insured), Signature required - 10+ Days'),\n // 'service_code' => ServiceCodes::INT_PARCEL_AIR_OWN_PACKAGING,\n // 'option_code' => [\n // '0' => ServiceOptions::INT_SIGNATURE_ON_DELIVERY,\n // '1' => ServiceOptions::INT_EXTRA_COVER,\n // ],\n // 'sub_opt_code' => '',\n // 'extra_cover' => 5000,\n // ],\n // @codingStandardsIgnoreEnd\n 'INT_PARCEL_STD_OWN_PACKAGING' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Standard - 6+ Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_STD_OWN_PACKAGING,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'INT_PARCEL_STD_OWN_PACK_SIG' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Standard, Signature required - 6+ Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_STD_OWN_PACKAGING,\n 'option_code' => ServiceOptions::INT_SIGNATURE_ON_DELIVERY,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'INT_PARCEL_STD_OWN_PACK_INS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Standard (Insured) - 6+ Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_STD_OWN_PACKAGING,\n 'option_code' => ServiceOptions::INT_EXTRA_COVER,\n 'sub_opt_code' => '',\n 'extra_cover' => 5000,\n ],\n // @codingStandardsIgnoreStart\n // Not working due to issues with AusPost.\n // 'INT_PAR_STD_OWN_PACK_SIG_INS' => [\n // 'type' => ServiceTypes::self::PARCEL,\n // 'destination' => ServiceDestinations::INTERNATIONAL,\n // 'description' => t('Australia Post International Standard (Insured), Signature Required - 6+ Days'),\n // 'service_code' => ServiceCodes::INT_PARCEL_STD_OWN_PACKAGING,\n // 'option_code' => [\n // '0' => ServiceOptions::INT_SIGNATURE_ON_DELIVERY,\n // '1' => ServiceOptions::INT_EXTRA_COVER,\n // ],\n // 'sub_opt_code' => '',\n // 'extra_cover' => 5000,\n // ],\n // @codingStandardsIgnoreEnd\n 'INT_PARCEL_EXP_OWN_PACKAGING' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Express - 2-4 Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_EXP_OWN_PACKAGING,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'INT_PARCEL_EXP_OWN_PACK_INS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Express (Insured) - 2-4 Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_EXP_OWN_PACKAGING,\n 'option_code' => ServiceOptions::INT_EXTRA_COVER,\n 'sub_opt_code' => '',\n 'extra_cover' => 5000,\n ],\n 'INT_PARCEL_COR_OWN_PACKAGING' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Courier - 1-2 Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_COR_OWN_PACKAGING,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n ],\n 'INT_PARCEL_COR_OWN_PACK_INS' => [\n 'type' => ServiceTypes::PARCEL,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Courier (Insured) - 1-2 Days'),\n 'service_code' => ServiceCodes::INT_PARCEL_COR_OWN_PACKAGING,\n 'option_code' => ServiceOptions::INT_EXTRA_COVER,\n 'sub_opt_code' => '',\n 'extra_cover' => 5000,\n ],\n // Domestic Letter services.\n 'L_AUS_LETTER_SM' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Standard Letter - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_REGULAR_SMALL,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 240,\n 'width' => 130,\n 'height' => 5,\n 'weight' => 250,\n ],\n ],\n 'L_AUS_LETTER_SM_PRIORITY' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Standard Letter Priority - 1-4 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_PRIORITY_SMALL,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 240,\n 'width' => 130,\n 'height' => 5,\n 'weight' => 250,\n ],\n ],\n 'L_AUS_LETTER_LG' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Standard Letter - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_REGULAR_LARGE,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_LG_PRIORITY' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Standard Letter Priority - 1-4 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_PRIORITY_LARGE_500,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_SM_REG_POST' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Registered Post Letter - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_REGULAR_SMALL,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_REGISTERED_POST,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 240,\n 'width' => 130,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_SM_REG_CONF' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Registered Post Letter - Confirmation - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_REGULAR_SMALL,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_REGISTERED_POST,\n 'sub_opt_code' => ServiceOptions::AUS_SERVICE_OPTION_DELIVERY_CONFIRMATION,\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 240,\n 'width' => 130,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_SM_REG_P2P' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Registered Post Letter - Person to Person - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_REGULAR_SMALL,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_REGISTERED_POST,\n 'sub_opt_code' => ServiceOptions::AUS_SERVICE_OPTION_PERSON_TO_PERSON,\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 240,\n 'width' => 130,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n // @codingStandardsIgnoreStart\n // Not working due to issues with AusPost.\n // 'L_AUS_LET_SM_REG_CONF_P2P' => [\n // 'type' => ServiceTypes::LETTER,\n // 'destination' => static::self::SERVICE_DEST_DOMESTIC,\n // 'description' => t('Australia Post Registered Post Letter - Person to Person - Confirmation - 2-6 Days'),\n // 'service_code' => ServiceCodes::AUS_LETTER_REGULAR_SMALL,\n // 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_REGISTERED_POST,\n // 'sub_opt_code' => [\n // '0' => ServiceOptions::AUS_SERVICE_OPTION_DELIVERY_CONFIRMATION,\n // '1' => ServiceOptions::AUS_SERVICE_OPTION_PERSON_TO_PERSON,\n // ],\n // 'extra_cover' => 0,\n // 'max_dimensions' => [\n // 'length' => 240,\n // 'width' => 130,\n // 'height' => 20,\n // 'weight' => 500,\n // ],\n // ],\n // @codingStandardsIgnoreEnd\n 'L_AUS_LETTER_LG_REG_POST' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Registered Post Letter Large - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_REGULAR_LARGE,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_REGISTERED_POST,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_LG_REG_POST_CONF' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Registered Post Letter Large - Confirmation - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_REGULAR_LARGE,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_REGISTERED_POST,\n 'sub_opt_code' => ServiceOptions::AUS_SERVICE_OPTION_DELIVERY_CONFIRMATION,\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_LG_REG_P2P' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Registered Post Letter - Person to Person - 2-6 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_REGULAR_LARGE,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_REGISTERED_POST,\n 'sub_opt_code' => ServiceOptions::AUS_SERVICE_OPTION_PERSON_TO_PERSON,\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n // @codingStandardsIgnoreStart\n // Not working due to issues with AusPost.\n // 'L_AUS_LET_LG_REG_CONF_P2P' => [\n // 'type' => ServiceTypes::LETTER,\n // 'destination' => static::self::SERVICE_DEST_DOMESTIC,\n // 'description' => t('Australia Post Registered Post Letter - Person to Person - Confirmation - 2-6 Days'),\n // 'service_code' => ServiceCodes::AUS_LETTER_REGULAR_LARGE,\n // 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_REGISTERED_POST,\n // 'sub_opt_code' => [\n // '0' => ServiceOptions::AUS_SERVICE_OPTION_DELIVERY_CONFIRMATION,\n // '1' => ServiceOptions::AUS_SERVICE_OPTION_PERSON_TO_PERSON,\n // ],\n // 'extra_cover' => 0,\n // 'max_dimensions' => [\n // 'length' => 360,\n // 'width' => 260,\n // 'height' => 20,\n // 'weight' => 500,\n // ],\n // ],\n // @codingStandardsIgnoreEnds\n 'L_AUS_LETTER_SM_EXP_POST' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Express Post Envelope Small - 1-3 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_EXPRESS_SMALL,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 220,\n 'width' => 110,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_SM_EXP_SIG' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Express Post Envelope Small - Signature - 1-3 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_EXPRESS_SMALL,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_SIGNATURE_ON_DELIVERY,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 220,\n 'width' => 110,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_MD_EXP' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Express Post Envelope Medium - 1-3 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_EXPRESS_MEDIUM,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 229,\n 'width' => 162,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_MD_EXP_SIG' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Express Post Envelope Medium - Signature - 1-3 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_EXPRESS_MEDIUM,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_SIGNATURE_ON_DELIVERY,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 229,\n 'width' => 162,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_LG_EXPRESS_POST' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Express Post Envelope Large - 1-3 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_EXPRESS_LARGE,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_STANDARD,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 353,\n 'width' => 250,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_AUS_LETTER_LG_EXP_POST_SIG' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::DOMESTIC,\n 'description' => t('Australia Post Express Post Envelope Large - Signature - 1-3 Days'),\n 'service_code' => ServiceCodes::AUS_LETTER_EXPRESS_LARGE,\n 'option_code' => ServiceOptions::AUS_SERVICE_OPTION_SIGNATURE_ON_DELIVERY,\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 353,\n 'width' => 250,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n // International Letter services.\n 'L_INTL_SERVICE_AIR_MAIL_LGT' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post Air Mail Light - 6+ Days'),\n 'service_code' => ServiceCodes::INT_LETTER_AIR_OWN_PACKAGING_LIGHT,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 50,\n ],\n ],\n 'L_INTL_SERVICE_AIR_MAIL_MED' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post Air Mail Medium - 6+ Days'),\n 'service_code' => ServiceCodes::INT_LETTER_AIR_OWN_PACKAGING_MEDIUM,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 250,\n ],\n ],\n 'L_INTL_SERVICE_AIR_MAIL_HVY' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post Air Mail Heavy - 6+ Days'),\n 'service_code' => ServiceCodes::INT_LETTER_AIR_OWN_PACKAGING_HEAVY,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_INT_LETTER_REG_SMALL' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Registered Prepaid DL Envelope - 6+ Days'),\n 'service_code' => ServiceCodes::INT_LETTER_REG_SMALL_ENVELOPE,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 240,\n 'width' => 130,\n 'height' => 5,\n 'weight' => 500,\n ],\n ],\n 'L_INT_LETTER_REG_LARGE' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Registered Prepaid B4 Envelope - 6+ Days'),\n 'service_code' => ServiceCodes::INT_LETTER_REG_LARGE_ENVELOPE,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 265,\n 'width' => 250,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_INT_LET_EXP_OWN_PKG' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Express Letter - 2+ Days'),\n 'service_code' => ServiceCodes::INT_LETTER_EXP_OWN_PACKAGING,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_INT_LET_EXP_OWN_PKG_INS' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Express Letter (Insured) - 2+ Days'),\n 'service_code' => ServiceCodes::INT_LETTER_EXP_OWN_PACKAGING,\n 'option_code' => ServiceOptions::INT_EXTRA_COVER,\n 'sub_opt_code' => '',\n 'extra_cover' => 5000,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_INT_LET_COR_OWN_PKG' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Courier Letter - 2+ Days'),\n 'service_code' => ServiceCodes::INT_LETTER_COR_OWN_PACKAGING,\n 'option_code' => '',\n 'sub_opt_code' => '',\n 'extra_cover' => 0,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n 'L_INT_LET_COR_OWN_PKG_INS' => [\n 'type' => ServiceTypes::LETTER,\n 'destination' => ServiceDestinations::INTERNATIONAL,\n 'description' => t('Australia Post International Courier Letter (Insured) - 2+ Days'),\n 'service_code' => ServiceCodes::INT_LETTER_COR_OWN_PACKAGING,\n 'option_code' => ServiceOptions::INT_EXTRA_COVER,\n 'sub_opt_code' => '',\n 'extra_cover' => 5000,\n 'max_dimensions' => [\n 'length' => 360,\n 'width' => 260,\n 'height' => 20,\n 'weight' => 500,\n ],\n ],\n ];\n }", "public function service() {\n\n $customer = $this->sessionManager->getUser();\n $userLevel = $customer->getLevel();\n $userId = $customer->getId();\n\n\n $companyManager = CompanyManager::getInstance();\n $serviceCompanyManager = ServiceCompanyManager::getInstance();\n\n if ($this->args[0] == \"last_price\") {\n $companyId = $this->args[1];\n if ($userLevel == UserGroups::$USER) {\n $companyDealersManager = CompanyDealersManager::getInstance();\n $dto = $companyDealersManager->getByCompanyIdAndUserId($userId, $companyId);\n if (!isset($dto)) {\n return false;\n }\n }\n $company = $companyManager->selectByPK($companyId);\n assert($company);\n $companiesPriceListManager = CompaniesPriceListManager::getInstance();\n $companyLastPrices = $companiesPriceListManager->getCompanyLastPrices($companyId);\n if (!empty($companyLastPrices)) {\n if (count($companyLastPrices) === 1) {\n $pricePath = DATA_DIR . \"/companies_prices/\" . $companyId . '/' . $companyLastPrices[0]->getFileName() . '.' . $companyLastPrices[0]->getFileExt();\n if (file_exists($pricePath)) {\n $companiesPriceListManager->downloadFile($pricePath, $company->getShortName() . \"_\" . $companyLastPrices[0]->getFileName());\n } else {\n echo \"file not exists!\";\n }\n } else {\n $filesPaths = array();\n foreach ($companyLastPrices as $key => $clp) {\n $fileName = $clp->getFileName() . '.' . $clp->getFileExt();\n $filesPaths[] = array(DATA_DIR . \"/companies_prices/\" . $company->getId() . '/' . $fileName, $company->getShortName() . '_' . ($key + 1) . '_' . $fileName);\n }\n $uid = uniqid();\n $this->createZip($filesPaths, DATA_DIR . \"/temp/\" . $uid . '.zip');\n $companiesPriceListManager->downloadFile(DATA_DIR . \"/temp/\" . $uid . '.zip', $company->getShortName() . '_price');\n unlink(DATA_DIR . \"/temp/\" . $uid . '.zip');\n }\n } else {\n echo \"file not exists!\";\n }\n }\n if ($this->args[0] == \"service_last_price\") {\n $companyId = $this->args[1];\n if ($userLevel == UserGroups::$USER) {\n $serviceCompanyDealersManager = ServiceCompanyDealersManager::getInstance();\n $dto = $serviceCompanyDealersManager->getByCompanyIdAndUserId($userId, $companyId);\n if (!isset($dto)) {\n return false;\n }\n }\n $company = $serviceCompanyManager->selectByPK($companyId);\n assert($company);\n $companiesPriceListManager = ServiceCompaniesPriceListManager::getInstance();\n $companyLastPrices = $companiesPriceListManager->getCompanyLastPrices($companyId);\n if (!empty($companyLastPrices)) {\n if (count($companyLastPrices) === 1) {\n $pricePath = DATA_DIR . \"/service_companies_prices/\" . $companyId . '/' . $companyLastPrices[0]->getFileName() . '.' . $companyLastPrices[0]->getFileExt();\n if (file_exists($pricePath)) {\n $companiesPriceListManager->downloadFile($pricePath, $company->getShortName() . \"_\" . $companyLastPrices[0]->getFileName());\n } else {\n echo \"file not exists!\";\n }\n } else {\n $filesPaths = array();\n foreach ($companyLastPrices as $key => $clp) {\n $fileName = $clp->getFileName() . '.' . $clp->getFileExt();\n $filesPaths[] = array(DATA_DIR . \"/service_companies_prices/\" . $company->getId() . '/' . $fileName, $company->getShortName() . '_' . ($key + 1) . '_' . $fileName);\n }\n $uid = uniqid();\n $this->createZip($filesPaths, DATA_DIR . \"/temp/\" . $uid . '.zip');\n $companiesPriceListManager->downloadFile(DATA_DIR . \"/temp/\" . $uid . '.zip', $company->getShortName() . '_price');\n unlink(DATA_DIR . \"/temp/\" . $uid . '.zip');\n }\n } else {\n echo \"file not exists!\";\n }\n }\n if ($this->args[0] == \"zipped_price\") {\n $zippedPriceId = $this->args[1];\n $companiesPriceListManager = CompaniesPriceListManager::getInstance();\n $price = $companiesPriceListManager->selectByPK($zippedPriceId);\n $company_id = $price->getCompanyId();\n if ($userLevel == UserGroups::$USER) {\n $companyDealersManager = CompanyDealersManager::getInstance();\n $dto = $companyDealersManager->getByCompanyIdAndUserId($userId, $company_id);\n if (!isset($dto)) {\n return false;\n }\n }\n $company = $companyManager->selectByPK($company_id);\n assert($company);\n if ($price) {\n $pricePath = DATA_DIR . \"/companies_prices/\" . $price->getCompanyId() . '/' . $price->getFileName() . '.' . $price->getFileExt();\n if (file_exists($pricePath)) {\n $companiesPriceListManager->downloadFile($pricePath, $company->getShortName() . \"_\" . $price->getFileName());\n } else {\n echo \"file not exists!\";\n }\n } else {\n echo \"file not exists!\";\n }\n }\n if ($this->args[0] == \"zipped_price_unzipped\") {\n $zippedPriceId = $this->args[1];\n $companiesPriceListManager = CompaniesPriceListManager::getInstance();\n $price = $companiesPriceListManager->selectByPK($zippedPriceId);\n $company_id = $price->getCompanyId();\n if ($userLevel == UserGroups::$USER) {\n $companyDealersManager = CompanyDealersManager::getInstance();\n $dto = $companyDealersManager->getByCompanyIdAndUserId($userId, $company_id);\n if (!isset($dto)) {\n return false;\n }\n }\n $company = $companyManager->selectByPK($company_id);\n assert($company);\n if ($price) {\n $pricePath = DATA_DIR . \"/companies_prices/\" . $price->getCompanyId() . '/' . $price->getFileName() . '.' . $price->getFileExt();\n if (file_exists($pricePath)) {\n $unzipPriceFile = $companiesPriceListManager->unzipFile($pricePath);\n if (count($unzipPriceFile) === 1) {\n $companiesPriceListManager->downloadFile($unzipPriceFile[0], $company->getShortName() . \"_\" . $price->getFileName());\n } else {\n\n $companiesPriceListManager->downloadFile($pricePath, $company->getShortName() . \"_\" . $price->getFileName());\n }\n } else {\n echo \"file not exists!\";\n }\n } else {\n echo \"file not exists!\";\n }\n }\n if ($this->args[0] == \"service_zipped_price_unzipped\") {\n $zippedPriceId = $this->args[1];\n $companiesPriceListManager = ServiceCompaniesPriceListManager::getInstance();\n $price = $companiesPriceListManager->selectByPK($zippedPriceId);\n $company_id = $price->getServiceCompanyId();\n if ($userLevel == UserGroups::$USER) {\n $serviceCompanyDealersManager = ServiceCompanyDealersManager::getInstance();\n $dto = $serviceCompanyDealersManager->getByCompanyIdAndUserId($userId, $company_id);\n if (!isset($dto)) {\n return false;\n }\n }\n $company = $serviceCompanyManager->selectByPK($company_id);\n assert($company);\n if ($price) {\n $pricePath = DATA_DIR . \"/service_companies_prices/\" . $price->getServiceCompanyId() . '/' . $price->getFileName() . '.' . $price->getFileExt();\n if (file_exists($pricePath)) {\n $unzipPriceFile = $companiesPriceListManager->unzipFile($pricePath);\n if (count($unzipPriceFile) === 1) {\n $companiesPriceListManager->downloadFile($unzipPriceFile[0], $company->getShortName() . \"_\" . $price->getFileName());\n } else {\n $companiesPriceListManager->downloadFile($pricePath, $company->getShortName() . \"_\" . $price->getFileName());\n }\n } else {\n echo \"file not exists!\";\n }\n } else {\n echo \"file not exists!\";\n }\n }\n if ($this->args[0] == \"all_zipped_prices\") {\n $companiesList = array();\n if ($userLevel == UserGroups::$COMPANY) {\n $companiesList = $companyManager->getAllCompaniesByPriceHours();\n }\n if ($userLevel == UserGroups::$USER) {\n $companiesList = $companyManager->getUserCompaniesJoindWithFullInfo($userId);\n }\n if ($userLevel == UserGroups::$ADMIN) {\n $companiesList = $companyManager->getAllCompaniesByPriceHours(0, \"\", true, true);\n }\n $filesPaths = array();\n $companiesPriceListManager = CompaniesPriceListManager::getInstance();\n foreach ($companiesList as $company) {\n $companyLastPrices = $companiesPriceListManager->getCompanyLastPrices($company->getId());\n foreach ($companyLastPrices as $key => $companyLastPrice) {\n $fileName = $companyLastPrice->getFileName() . '.' . $companyLastPrice->getFileExt();\n $filesPaths[] = array(DATA_DIR . \"/companies_prices/\" . $company->getId() . '/' . $fileName, $company->getShortName() . '_' . $fileName . '_' . ($key + 1));\n }\n }\n $uid = uniqid();\n $dir = DATA_DIR . \"/temp\";\n if (!is_dir($dir)) {\n mkdir($dir, 0777);\n }\n $this->createZip($filesPaths, $dir . \"/\" . $uid . '.zip');\n $companiesPriceListManager->downloadFile($dir . \"/\" . $uid . '.zip', 'all');\n //unlink($dir . \"/\" . $uid . '.zip');\n }\n }", "public static function notifyDeliveryDetails()\n {\n }", "function getDeliveryAddress() {\n\t\tif (!$this->validateAddress('billing')) return $this->getBillingAddress();\n\t\t\n\t\t$template = $this->cObj->getSubpart($this->templateCode, '###ADDRESS_CONTAINER###');\n\t\t\n\t\t// fill some standard markers\n\t\t$markerArray['###ADDRESS_TITLE###'] = $this->pi_getLL('delivery_title');\n\t\t$markerArray['###ADDRESS_DESCRIPTION###'] = $this->pi_getLL('delivery_description');\n\t\t\n\t\t// get the form\n\t\t$deliveryForm = '<form name=\"addressForm\" action=\"\" method=\"post\">';\n\t\t$deliveryForm .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[step]\" value=\"payment\" />';\n\t\t$deliveryForm .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[check]\" value=\"delivery\" />';\n\n\t\t// if a user is logged in, get the form from the address management\n\t\tif (!empty($GLOBALS['TSFE']->fe_user->user)) {\n\t\t\t// make an instance of pi4 (address management)\n\t\t\t$addressMgm = t3lib_div::makeInstance('tx_commerce_pi4');\n\t\t\t$addressMgm->cObj = $this->cObj;\n\t\t\t$addressMgm->templateCode = $this->templateCode;\n\t\t\t\n\t\t\t$amConf = $this->conf;\n\t\t\t$amConf['formFields.'] = $this->conf['delivery.']['sourceFields.'];\n\t\t\t$amConf['addressPid'] = $this->conf['address_pid'];\n\t\t\t\n\t\t\t$addressMgm->init($amConf, false);\n\t\t\t$addressMgm->addresses = $addressMgm->getAddresses($GLOBALS['TSFE']->fe_user->user['uid'], $this->conf['delivery.']['addressType']);\n\n\t\t\t$addressMgm->piVars['backpid'] = $GLOBALS['TSFE']->id;\n\t\t\t\n\t\t\t$deliveryForm .= $addressMgm->getListing($this->conf['delivery.']['addressType'], true, $this->prefixId);\n\t\t} else {\n\t\t\t$deliveryForm .= $this->getInputForm($this->conf['delivery.'], 'delivery');\n\t\t}\n\n\t\t$markerArray['###ADDRESS_FORM_FIELDS###'] = $deliveryForm;\n\t\t$markerArray['###ADDRESS_FORM_SUBMIT###'] = '<input type=\"submit\" value=\"' .$this->pi_getLL('delivery_submit') .'\" /></form>';\n\t\t$markerArray['###ADDRESS_DISCLAIMER###'] = $this->pi_getLL('general_disclaimer');\n\t\t\n\t\t/**\n\t\t * Hook for processing Marker Array\n\t\t * Inspired by tt_news\n\t\t * @since 21.01.2006\n\t\t * \n\t\t */\n\t\t$hookObjectsArr = array();\n\t\tif (is_array ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi5/class.tx_commerce_pi5.php']['getDeliveryAddress'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi5/class.tx_commerce_pi5.php']['getDeliveryAddress'] as $classRef) {\n\t\t\t\t\t$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);\n\t\t\t}\n\t\t}\n\t\tforeach($hookObjectsArr as $hookObj)\t{\n\t\t\tif (method_exists($hookObj, 'ProcessMarker')) {\n\t\t\t\t$markerArray=$hookObj->ProcessMarker($markerArray,$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->cObj->substituteMarkerArray($template, $markerArray);\n\t}" ]
[ "0.6810989", "0.6157027", "0.6090342", "0.6078217", "0.59559965", "0.5690784", "0.56349784", "0.56167734", "0.55357164", "0.54742473", "0.54578924", "0.5457265", "0.54430866", "0.5372349", "0.53649396", "0.5354201", "0.53396255", "0.5282999", "0.52637184", "0.525092", "0.5241741", "0.52382225", "0.5231934", "0.52236134", "0.51963025", "0.5165514", "0.51594925", "0.51416796", "0.5131536", "0.51144004" ]
0.7205795
0
Set the delivery date service.
public function setDeliveryDateService(DeliveryDateServiceInterface $service) { $this->deliveryDateService = $service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_shipping_date($date)\n {\n if (is_string($date)) {\n $date = new DateTime($date);\n }\n if (get_class($date) !== 'DateTime') {\n throw new Exception('Method `set_shipping_date` requires DateTime as an argument.');\n }\n $diff = $date->diff(new DateTime('today'));\n $days = $diff->days;\n if ($days < 0) {\n throw new Exception('Method `set_shipping_date` requires DateTime as an argument.');\n }\n $this->set_expected_days_till_shipping($days);\n }", "public function setServiceDate($serviceDate)\n {\n // Make sure the service date is not empty.\n if (empty($serviceDate))\n {\n echo \"ERROR: Service date must not be empty.\\n\";\n return;\n }\n\n $this->serviceDate = $this->formatDate($serviceDate);\n }", "public function setDeliveryDate(\\DateTime $date)\n {\n $this->deliveryDate = $date;\n return $this;\n }", "function setDate($date)\r\n {\r\n $this->_date = $date;\r\n }", "public function mapDeliveryDate()\n {\n if (!$this->helper->isShippitLiveQuote($this->order)) {\n return $this;\n }\n\n $deliveryDate = $this->helper->getShippitLiveQuoteDetail($this->order, 'delivery_date');\n\n if (empty($deliveryDate)) {\n return $this;\n }\n\n return $this->setDeliveryDate($deliveryDate);\n }", "public function setDate($date)\n {\n $this->date = $date;\n }", "public function setDate($date): void\r\n {\r\n $this->_date = $date;\r\n }", "public function setDate($date)\n {\n if (isset($date)) {\n $this->date = $date;\n }\n }", "public function getDeliveryDateService()\n {\n if (!$this->deliveryDateService) {\n $this->setDeliveryDateService(new DeliveryDateService($this));\n }\n\n return $this->deliveryDateService;\n }", "public function setDate($date)\n {\n CultureFeed_Cdb_Data_Calendar::validateDate($date);\n $this->date = $date;\n }", "function setDate($date){\n $this->date=$date;\n }", "public function setDate($date) {\n $this->date = $date;\n }", "public function setDate($date) {\n $this->date = $date;\n }", "public function setDate($date) {\n $this->date = $date;\n }", "public function setdate($date)\n {\n $this->date = $date;\n }", "public function set_date($date)\n {\n $this->set_default_property(self::PROPERTY_DATE, $date);\n }", "public function setDate( $date ) {\n $this->date = $date;\n }", "function set_date ($valor)\n {\n $this->date = $valor;\n }", "public function setOrderDate($orderDate);", "public function setShippedDateAttribute($value){\n $this->attributes['shipped_date'] = Carbon::parse($value)->format('Y-m-d');\n }", "function setDate($f = NULL) {\n\t\t$rval = parent::set_date($f);\n\t\tif (!is_a($oPer,'Periodo')) $oPer = &Periodo::factoryActivePeriod();\n\t\tif (is_a($oPer,'Periodo')) $aTmp = $oPer->getAssignments(array('fecha' => $this->getDate()),'Pedidos',false);\n\t\tif (is_array($aTmp) and sizeof($aTmp)) foreach ($aTmp as $fld => $val) $this->_aPedido[$fld] = $val;\n\t\treturn $fval;\n\t}", "public function setFecha($fecha){\n $this->fecha = $fecha;\n }", "function setProductDate($newProductDate = null) : void {\n\tif($newProductDate === null) {\n\t\t$this->productDate = new \\DateTime();\n\t\treturn;\n\t}\n\t// store the like date using the ValidateDate trait\n\ttry {\n\t\t$newProductDate = self::validateDateTime($newProductDate);\n\t} catch(\\InvalidArgumentException | \\RangeException $exception) {\n\t\t$exceptionType = get_class($exception);\n\t\tthrow(new $exceptionType($exception->getMessage(), 0, $exception));\n\t}\n\t$this->productDate = $newProductDate;\n}", "public function setFecha($fecha){\n\t\t$this->fecha = $fecha;\n\t}", "public function setDay() {\n\t\t$this->_billingPeriod = self::DAY;\n\t\treturn $this;\n\t}", "public function setDate($date)\n {\n if (is_null($date)) {\n $date = new DateTime();\n }\n\n $this->date = $date;\n }", "function setToDate($toDate)\n {\n $this->set_default_property(self::PROPERTY_TO_DATE, $toDate);\n }", "public function setService( $service )\n {\n $this->service = $service;\n }", "public function setPaidDate($paidDate);", "public function setScheduledDeliveryStartDate($value)\n {\n $this->_fields['ScheduledDeliveryStartDate']['FieldValue'] = $value;\n return $this;\n }" ]
[ "0.67879313", "0.65685713", "0.6406174", "0.63196766", "0.6312964", "0.6191786", "0.61885965", "0.6152801", "0.61486727", "0.61453384", "0.6141227", "0.6123284", "0.6123284", "0.6123284", "0.6115675", "0.6110587", "0.610069", "0.6095438", "0.59835327", "0.5979347", "0.59074605", "0.5904448", "0.58904696", "0.5821707", "0.57837266", "0.57687867", "0.5757489", "0.5728643", "0.5702344", "0.569131" ]
0.7921093
0
Timeframe service. Automatically load the timeframe service
public function getTimeframeService() { if (!$this->timeframeService) { $this->setTimeframeService(new TimeframeService($this)); } return $this->timeframeService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTimeframeService(TimeframeServiceInterface $service)\n {\n $this->timeframeService = $service;\n }", "public function __construct(TimetableScheduleService $service)\n {\n $this->service = $service;\n }", "protected function getMopaBootstrap_Form_TypeExtension_TimeService()\n {\n return $this->services['mopa_bootstrap.form.type_extension.time'] = new \\Mopa\\Bundle\\BootstrapBundle\\Form\\Extension\\TimeTypeExtension();\n }", "protected function getForm_Type_TimeService()\n {\n @trigger_error('The \"form.type.time\" service is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['form.type.time'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\TimeType();\n }", "public function __construct()\n {\n $this->situacaoService = new SituacaoService();\n }", "private function _findFrames()\n {\n $result = array();\n $service_id = $this->service->get( 'id' );\n $date_Ymd = $this->date->format( 'Y-m-d' );\n $date_md = $this->date->format( 'm-d' );\n $day_of_week = (int) $this->date->format( 'w' ) + 1; // 1-7\n $time_from = $this->time_from;\n $time_to = $this->time_to;\n\n $service_breaks = array();\n if ( Config::isServiceScheduleEnabled() ) {\n if ( isset ( $this->service_schedule['daily'][ $date_Ymd ] ) ) {\n $time_from = max( $time_from, $this->service_schedule['daily'][ $date_Ymd ]['start_time'] );\n $time_to = min( $time_to, $this->service_schedule['daily'][ $date_Ymd ]['end_time'] );\n $service_breaks = $this->service_schedule['daily'][ $date_Ymd ]['breaks'];\n } elseif ( isset ( $this->service_schedule['weekly'][ $day_of_week ] ) ) {\n $time_from = max( $time_from, $this->service_schedule['weekly'][ $day_of_week ]['start_time'] );\n $time_to = min( $time_to, $this->service_schedule['weekly'][ $day_of_week ]['end_time'] );\n $service_breaks = $this->service_schedule['weekly'][ $day_of_week ]['breaks'];\n } else {\n if ( $this->at->params['exclude_staff_with_day_off'] && $this->date == $this->at->start_date ) {\n // Stop the search if the starting day is off due to service schedule.\n $this->excluded_staff = array_keys( $this->at->staff_data );\n }\n return $result;\n }\n }\n\n foreach ( $this->at->staff_data as $staff_id => $staff ) {\n if ( $this->at->params['exclude_staff_with_day_off'] && in_array( $staff_id, $this->excluded_staff ) ) {\n // Skip this staff if he or she has been excluded from the search.\n continue;\n }\n\n if ( ! isset ( $staff['services'][ $service_id ] ) ||\n $staff['services'][ $service_id ]['capacity'] < $this->number_of_persons ) {\n continue;\n }\n\n // Find schedule for this day.\n $schedule = null;\n if ( isset ( $staff['special_days'][ $date_Ymd ] ) ) {\n $schedule = $staff['special_days'][ $date_Ymd ];\n }\n if (\n ! $schedule &&\n isset ( $staff['working_hours'][ $day_of_week ] ) && // working day\n ! isset ( $staff['holidays'][ $date_Ymd ] ) && // no holiday\n ! isset ( $staff['holidays'][ $date_md ] ) // no repeating holiday\n ) {\n $schedule = $staff['working_hours'][ $day_of_week ];\n }\n\n if ( $schedule ) {\n if ( $this->srv_duration_days ) {\n // For whole day services do not check staff working hours.\n $intersection = array(\n 'start' => 0,\n 'end' => DAY_IN_SECONDS,\n );\n } else {\n // Find intersection between staff schedule, service schedule and requested hours.\n $intersection = $this->_findIntersection( $schedule['start_time'], $schedule['end_time'], $time_from, $time_to );\n }\n\n if ( $intersection ) {\n if ( $intersection['end'] - $intersection['start'] >= $this->srv_duration ) {\n // Initialize time frames.\n $frames = array( array(\n 'start' => $intersection['start'],\n 'end' => $intersection['end'],\n 'staff_id' => $staff_id,\n ) );\n if ( ! $this->srv_duration_days ) {\n // Remove breaks from time frames for non all day services only.\n foreach ( array_merge( $schedule['breaks'], $service_breaks ) as $break ) {\n $frames = $this->_removeTimePeriod( $frames, $break['start'], $break['end'], false );\n }\n }\n // Remove bookings from time frames.\n foreach ( $staff['bookings'] as $booking ) {\n // Work with bookings which intersect with intersection.\n $start_time = $booking['start_time'] - $this->date->getTimestamp();\n $end_time = $booking['end_time'] - $this->date->getTimestamp();\n if ( $end_time > $intersection['start'] && $start_time < $intersection['end'] ) {\n $frames = $this->_removeTimePeriod(\n $frames,\n $start_time - $booking['padding_left'] - $this->service->get( 'padding_right' ),\n $end_time + $booking['padding_right'] + $this->service->get( 'padding_left' ),\n true,\n $removed\n );\n\n if ( $removed ) {\n // Handle not full bookings (when number of bookings is less than capacity).\n if (\n $booking['from_google'] == false &&\n $booking['service_id'] == $this->service->get( 'id' ) &&\n $start_time >= $intersection['start'] &&\n $staff['services'][ $service_id ]['capacity'] - $booking['number_of_bookings'] >= $this->number_of_persons\n ) {\n if ( $booking['extras_duration'] >= $this->extras_duration ) {\n // Show the first slot as available.\n $frames[] = array(\n 'start' => $start_time,\n 'end' => $start_time + $this->time_slot_length,\n 'staff_id' => $staff_id,\n 'not_full' => true,\n );\n }\n }\n if ( $this->srv_duration_days ) {\n // For all day services we break the loop since there can be\n // just 1 booking per day for such services.\n break;\n }\n }\n }\n }\n $result = array_merge( $result, $frames );\n }\n }\n }\n else if ( $this->at->params['exclude_staff_with_day_off'] && $this->date == $this->at->start_date ) {\n // Exclude staff from the search if his or her starting day is off.\n $this->excluded_staff[] = $staff_id;\n }\n }\n\n return $result;\n }", "public function __construct() \n { \n $this->startTimer();\n }", "public function startTimer()\n {\n }", "public function __construct(GamesDayService $service)\n {\n\n $this->middleware('jwt.auth');\n $this->service = $service;\n }", "private function convertTimeframeParam($timeframe = \"\") {\n\n if (strlen($timeframe) > 0) {\n if ($timeframe == \"lastday\") $time = mktime(date(\"H\") , date(\"i\"), date(\"s\"), date(\"m\") , date(\"d\") - 1, date(\"Y\"));\n elseif ($timeframe == \"last2day\") $time = mktime(date(\"H\") , date(\"i\"), date(\"s\"), date(\"m\") , date(\"d\") - 2, date(\"Y\"));\n elseif ($timeframe == \"lasthour\") $time = mktime(date(\"H\") - 1 , date(\"i\"), date(\"s\"), date(\"m\") , date(\"d\"), date(\"Y\"));\n elseif ($timeframe == \"last4hour\") $time = mktime(date(\"H\") - 4 , date(\"i\"), date(\"s\"), date(\"m\") , date(\"d\"), date(\"Y\"));\n elseif ($timeframe == \"last3day\") $time = mktime(date(\"H\") , date(\"i\"), date(\"s\"), date(\"m\") , date(\"d\") - 3, date(\"Y\")); \n elseif ($timeframe == \"lastweek\") $time = mktime(date(\"H\") , date(\"i\"), date(\"s\"), date(\"m\") , date(\"d\") - 7, date(\"Y\"));\n elseif ($timeframe == \"lastmonth\") $time = mktime(date(\"H\") , date(\"i\"), date(\"s\"), date(\"m\") - 1, date(\"d\") , date(\"Y\"));\n elseif ($timeframe == \"last3month\") $time = mktime(date(\"H\") , date(\"i\"), date(\"s\"), date(\"m\") - 3, date(\"d\") , date(\"Y\"));\n elseif ($timeframe == \"last12hour\") $time = mktime(date(\"H\") - 12, date(\"i\"), date(\"s\"), date(\"m\") - 3, date(\"d\") , date(\"Y\")); \n elseif ($timeframe == \"last15min\") $time = mktime(date(\"H\") , date(\"i\") - 15 , date(\"s\"), date(\"m\") , date(\"d\"), date(\"Y\"));\n elseif ($timeframe == \"last30min\") $time = mktime(date(\"H\") , date(\"i\") - 30 , date(\"s\"), date(\"m\") , date(\"d\"), date(\"Y\")); \n\n else $time = 0; \n }\n else $time = 0;\n\n return $time;\n }", "public function service();", "function SUNRAIL_API_Schedule()\n {\n do_action(\"sunrail_api_{$this->type}_constructor\", $this);\n }", "protected function getSonata_Admin_Orm_Filter_Type_TimeService()\n {\n return new \\Sonata\\DoctrineORMAdminBundle\\Filter\\TimeFilter();\n }", "public function startService()\n {\n $db = \\OMV\\Config\\Database::getInstance();\n $object = $db->get(\"conf.service.teamspeak3\");\n if (TRUE !== $object->get(\"enable\"))\n return;\n // Start this service and enable the unit file.\n $systemCtl = new \\OMV\\System\\SystemCtl(\"teamspeak3\");\n $systemCtl->enable(TRUE);\n }", "public function __construct(DayOneService $service)\n {\n parent::__construct();\n $this->service = $service;\n }", "public function service() {\n #Get the code stub that executes individual crons\n $stub = file_get_contents(__DIR__.'/stub.txt');\n\n #Force UTC\n date_default_timezone_set('UTC');\n\n $this->printInfo(\"Starting Cron Service\");\n #Loop until killed or heat death of the universe\n while (true) {\n if (extension_loaded ('newrelic')) {\n /* send the transaction data up to newrelic. Start fresh for this service loop. */\n newrelic_end_transaction();\n\n newrelic_start_transaction(ini_get('newrelic.appname'), ini_get('newrelic.license'));\n newrelic_name_transaction ('magemojo_cron_service');\n newrelic_background_job();\n }\n\n\n $this->getRuntimeParameters();\n if ($this->cronenabled == 0) {\n $this->printWarn(\"Stopped Cron Service by maintenance is enabled\");\n exit;\n }\n\n #Checking if new jobs need to be scheduled\n if ($this->lastJobTime < time()) {\n $this->printInfo(\"Creating schedule\");\n $this->createSchedule($this->lastJobTime, $this->lastJobTime + 3600);\n $this->lastJobTime = $this->resource->getLastJobTime();\n $this->pendingjobs = $this->resource->getAllPendingJobs();\n }\n\n #Checking running jobs\n $jobcount = $this->checkRunningJobs();\n\n #Get pending jobs\n $pending = $this->resource->getPendingJobs();\n $maxConsumerMessages = intval($this->deploymentConfig->get('cron_consumers_runner/max_messages', 10000));\n $consumersTimeout = intval($this->resource->getConfigValue('magemojo/cron/consumers_timeout',0,'default'));\n $exportersTimeout = intval($this->resource->getConfigValue('magemojo/cron/exporters_timeout',0,'default'));\n if (!$consumersTimeout) {\n $consumersTimeout = 0;\n }\n if (!$exportersTimeout) {\n $exportersTimeout = 0;\n }\n\n while (count($pending) && $this->canRunJobs($jobcount, $pending)) {\n $job = array_shift($pending);\n $runcheck = $this->resource->getJobByStatus($job[\"job_code\"],'running');\n if (count($runcheck) == 0) {\n $jobconfig = $this->getJobConfig($job[\"job_code\"]);\n if ($jobconfig == false) {\n continue;\n }\n #if this is a consumers job use a different runtime cmd\n if (isset($jobconfig[\"consumers\"]) && $jobconfig[\"consumers\"]) {\n $consumerName = str_replace(\"mm_consumer_\",\"\",(string)$jobconfig[\"name\"]);\n if (!$this->canExecuteConsumer($consumerName)) {\n continue;\n }\n $runtime = \"bin/magento queue:consumers:start \" . escapeshellarg($consumerName);\n if ($maxConsumerMessages) {\n $runtime .= ' --max-messages=' . $maxConsumerMessages;\n }\n $runtime = escapeshellcmd($this->phpproc).\" \".$runtime;\n if ($consumerName == 'exportProcessor') {\n if ($exportersTimeout != 0) {\n $runtime = \"timeout -s 9 \" . $exportersTimeout . \" \" . $runtime;\n }\n } elseif ($consumersTimeout != 0) {\n $runtime = \"timeout -s 9 \".$consumersTimeout.\" \".$runtime;\n }\n $cmd = $runtime;\n if ($this->governor) {\n $cmd = 'strace '.$cmd;\n }\n } else {\n $runtime = $this->prepareStub($jobconfig,$stub,$job[\"schedule_id\"]);\n if ($runtime) {\n $cmd = escapeshellcmd($this->phpproc) . \" -r \" . escapeshellarg($runtime);\n } else {\n $this->setJobStatus($job[\"schedule_id\"],'error','Incorrect config of cron job');\n continue;\n }\n }\n $exec = sprintf(\"%s; %s > %s 2>&1 & echo $!\",\n 'cd ' . escapeshellarg($this->basedir),\n $cmd,\n escapeshellarg($this->basedir . \"/var/cron/schedule.\" . $job[\"schedule_id\"])\n );\n $pid = exec($exec);\n\n #If the output is not numeric then it errored due to syntax\n if (is_numeric($pid)) {\n $this->setPid($this->getPidFileName($pid),$job[\"schedule_id\"]);\n $this->setJobStatus($job[\"schedule_id\"],'running',NULL, $this->hostname);\n $jobcount++;\n } else {\n #Error output from command line\n $this->setJobStatus($job[\"schedule_id\"],'error',$pid, $this->hostname);\n $this->unsetPid('schedule.'.$job[\"schedule_id\"]);\n }\n\n #If more than one job of the same code was returned mark one as missed\n if ($job[\"job_count\"] > 1) {\n $this->resource->setMissedJobs($job[\"job_code\"]);\n }\n }\n }\n\n #Sanity check processes and look for escaped inmates\n $this->asylum();\n if (extension_loaded ('newrelic')) {\n /* stop timing the current transaction, but continue instrumenting it */\n newrelic_end_of_transaction();\n }\n\n #Take a break\n sleep(5);\n }\n }", "public function __construct()\n {\n $this->timeStart = $this->getCurrentTime();\n }", "public function schedule() {\n\n }", "public static function frameInitialize(): void\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "abstract public function startTimer();", "public static function create(ContainerInterface $container) {\n // ContainerInterface is step 1 when your controller needs to access services from the container\n \n // Create a $entityQuery variable, set it to $container->get(''); and pass it the name of the service: \n //entity.query\n //$loggerFactory = $container->get('logger.factory');\n\n return new static($container->get('entity.query'), $container->get('timezone_service.has_word'), $container->get('user.private_tempstore')); // Create a new instance of TimeslotPeriodController and return it\n }", "public function getService() {}", "public function getEventTimeStart()\n {\n }", "protected function getSonata_Core_Form_Type_DatetimeRangeService()\n {\n return $this->services['sonata.core.form.type.datetime_range'] = new \\Sonata\\CoreBundle\\Form\\Type\\DateTimeRangeType(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'});\n }", "public function __construct()\n {\n $this->currentDateTime = $this->currentDateTime(); \n\n }", "protected function getMopaBootstrap_Form_TypeExtension_DatetimeService()\n {\n return $this->services['mopa_bootstrap.form.type_extension.datetime'] = new \\Mopa\\Bundle\\BootstrapBundle\\Form\\Extension\\DatetimeTypeExtension();\n }", "public function getService();", "public function getSchedule() { }", "protected function getDebug_StopwatchService()\n {\n return $this->services['debug.stopwatch'] = new \\Symfony\\Component\\Stopwatch\\Stopwatch();\n }", "protected function getDebug_StopwatchService()\n {\n return $this->services['debug.stopwatch'] = new \\Symfony\\Component\\Stopwatch\\Stopwatch();\n }" ]
[ "0.69322276", "0.589196", "0.58581406", "0.54832315", "0.5185536", "0.51447314", "0.5120416", "0.5073444", "0.5033159", "0.501139", "0.4986272", "0.4966617", "0.49582034", "0.4949812", "0.4945813", "0.4942048", "0.49398562", "0.49166968", "0.4856388", "0.48492622", "0.48414576", "0.48386958", "0.48345333", "0.4828686", "0.47920486", "0.47905138", "0.47832605", "0.47787234", "0.4748189", "0.4748189" ]
0.7123549
0
Set the timeframe service.
public function setTimeframeService(TimeframeServiceInterface $service) { $this->timeframeService = $service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setService( $service )\n {\n $this->service = $service;\n }", "public function setService($service)\n {\n $this->service = $service;\n }", "function setTimeStart($time_start);", "public function __construct(TimetableScheduleService $service)\n {\n $this->service = $service;\n }", "public function setService(Service $service): self;", "public function setTimeDomain(ContextInterface $ctx, SetTimeDomainRequest $request): void;", "public function setTimeframe($hours){\n\t\t$this->timeframe = $hours;\n\t}", "public function setCurrentTime($time)\n {\n $this->time = $time;\n }", "function setTime($date){\r\n\r\n\t}", "public function getTimeframeService()\n {\n if (!$this->timeframeService) {\n $this->setTimeframeService(new TimeframeService($this));\n }\n\n return $this->timeframeService;\n }", "function setSchedule()\r\n {\r\n\r\n }", "public function setTime()\n {\n $this->send(\"SETT,\".date(\"H,i\"));\n }", "function swoole_timer_set(array $settings) {}", "public function setServiceDuration(?int $serviceDuration): void\n {\n $this->serviceDuration['value'] = $serviceDuration;\n }", "public function setService($var) {}", "public function setTime($value = null)\r\n {\r\n switch ($value) {\r\n case 'today':\r\n $this->_params['time'] = 'today';\r\n break;\r\n case 'this_week':\r\n $this->_params['time'] = 'this_week';\r\n break;\r\n case 'this_month':\r\n $this->_params['time'] = 'this_month';\r\n break;\r\n case 'all_time':\r\n $this->_params['time'] = 'all_time';\r\n break;\r\n case null:\r\n unsert($this->_params['time']);\r\n default:\r\n require_once 'Zend/Gdata/App/Exception.php';\r\n throw new Zend_Gdata_App_Exception('Unknown time value');\r\n break;\r\n }\r\n return $this;\r\n }", "protected function setTimezone()\n {\n $setter = new TimezoneSetter();\n $setter->register();\n }", "public function setSeconds($var) {}", "public function setSeconds($var) {}", "public function set(DateTimeImmutable $now): void\n {\n $this->now = $now;\n }", "public function setService($service)\n{\n$this->service = $service;\n}", "public function set_lifespan_period($value)\n {\n\n // Sanitize and validate value\n $value = $this->sanitize_lifespan_period($value);\n\n // Set property\n $this->set_property('lifespan_period', $value);\n }", "public function setServiceDate($serviceDate)\n {\n // Make sure the service date is not empty.\n if (empty($serviceDate))\n {\n echo \"ERROR: Service date must not be empty.\\n\";\n return;\n }\n\n $this->serviceDate = $this->formatDate($serviceDate);\n }", "public function setTimeStart($timeStart)\n\t{\n\t\t$this->timeStart = $timeStart;\n\t}", "public function setScheduledDate($ts);", "public function setTimezone($value);", "function setTime($h = 0, $m = 0, $s = 0) {\n\t\t$this->setHour ( $h );\n\t\t$this->setMinute ( $m );\n\t\t$this->setSecond ( $s );\n\t}", "public function setService($service)\n {\n $this->values['Service'] = $service;\n return $this;\n }", "public function setLifetime(int $future) : void\n {\n if (! $future) {\n return;\n }\n\n $interval = $future-$this->now;\n\n if ($interval <= 0 || $interval >= $this->getLifetime()) {\n return;\n }\n\n $this->lifetime = $interval;\n }", "public function setYouTubeService($youtube_service)\n {\n # Check if the passed value is empty and an object.\n if (!empty($youtube_service) && is_object($youtube_service)) {\n $this->youtube_service = $youtube_service;\n } else {\n # Explicitly set the data member to NULL.\n $this->youtube_service = null;\n }\n }" ]
[ "0.5812147", "0.5681739", "0.5668863", "0.5660727", "0.5605081", "0.5602708", "0.55975837", "0.55850506", "0.5580005", "0.55299455", "0.5465278", "0.54632246", "0.5430337", "0.5389409", "0.5330667", "0.5301207", "0.52677923", "0.5265706", "0.5265706", "0.5243632", "0.5237441", "0.5217926", "0.51782197", "0.5082467", "0.5063638", "0.50374043", "0.5035222", "0.50329673", "0.50282353", "0.5017465" ]
0.80399543
0
Location service. Automatically load the location service
public function getLocationService() { if (!$this->locationService) { $this->setLocationService(new LocationService($this)); } return $this->locationService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLocationService();", "public function setLocationService(LocationServiceInterface $service)\n {\n $this->locationService = $service;\n }", "public function getServiceLocation()\n {\n if (array_key_exists(\"serviceLocation\", $this->_propDict)) {\n if (is_a($this->_propDict[\"serviceLocation\"], \"\\Microsoft\\Graph\\Model\\Location\") || is_null($this->_propDict[\"serviceLocation\"])) {\n return $this->_propDict[\"serviceLocation\"];\n } else {\n $this->_propDict[\"serviceLocation\"] = new Location($this->_propDict[\"serviceLocation\"]);\n return $this->_propDict[\"serviceLocation\"];\n }\n }\n return null;\n }", "public function createServiceofLocation()\n {\n $entityClass = 'MU\\\\YourCityModule\\\\Entity\\\\ServiceofLocationEntity';\n\n $entity = new $entityClass();\n\n $this->entityInitialiser->initServiceofLocation($entity);\n\n return $entity;\n }", "public function setServiceLocation($val)\n {\n $this->_propDict[\"serviceLocation\"] = $val;\n return $this;\n }", "public function process_location_manager() {\n\t SLP_AJAX_Location_Manager::get_instance();\n }", "function wc_product_locations_loader() {\n\tnew WC_Product_Location();\n}", "private static function loadLocations()\n\t{\n\t\tself::$locations = json_decode(file_get_contents('locations.json'));\n\t}", "public function getLocation();", "public function getLocation();", "public function testGetFromService()\n {\n $em = $this->getEntityManager();\n\n $client = $this->getMock('Tasuk\\GuessWhereBundle\\Factory\\LocationServiceInterface');\n $client->expects($this->once())\n ->method('getCountryCode')\n ->with(666)\n ->will($this->returnValue('HL'));\n\n $factory = new LocationFactory($em, $client);\n $location = $factory->get(666);\n\n // check returned location\n $this->assertEquals(666, $location->getWoeid());\n $this->assertEquals('HL', $location->getCountry());\n\n // check that location was saved\n $locationFromDb = $em\n ->getRepository('TasukGuessWhereBundle:Location')\n ->find(666);\n $this->assertEquals($location, $locationFromDb);\n }", "public function load($location);", "public static function loadLocation()\n {\n if (session()->has('location.country')) {\n return;\n }\n\n $position = IPLocation::get();\n if (!$position) {\n session()->put('location.country', 'none');\n return;\n }\n\n $country = $position->countryCode;\n session()->put('location.country', $country);\n\n self::setTaxByCountry($country);\n }", "public function loadLocation($id)\n {\n return $this->locationService->load($id);\n }", "public function location(): Location\n {\n return new Location($this->client);\n }", "public function getPricedOffLocService()\n {\n return $this->pricedOffLocService;\n }", "function getLocation()\n {\n\n }", "public function installLocationData() {\n // Create the default settings.\n $this->setLocationSettings();\n\n update_option('gssi_location_version', GSSI_LOCATION_VERSION_NUM);\n }", "public function __construct(\n LocationService $locationService,\n TideService $tideService,\n BuoyService $buoyService,\n WeatherService $weatherService\n )\n {\n $this->locationService = $locationService;\n $this->tideService = $tideService;\n $this->buoyService = $buoyService;\n $this->weatherService = $weatherService;\n }", "public function getLocation($id);", "public function __construct()\n {\n $this->locationModel = new Location();\n \n }", "public function __construct()\n {\n $this->lngSvc = app(LngService::class);\n }", "public function __construct(Location $location)\n {\n $this->location = $location;\n }", "public function isLocationProvided(): bool;", "public function __construct(LocationService $locationService, LocationTransformer $locationTransformer)\n {\n $this->service = $locationService;\n $this->transformer = $locationTransformer;\n $this->relation = 'locations';\n }", "public function get_location($id);", "protected function getTemplating_LocatorService()\n {\n return $this->services['templating.locator'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocator(${($_ = isset($this->services['file_locator']) ? $this->services['file_locator'] : $this->get('file_locator')) && false ?: '_'}, __DIR__);\n }", "public function addLocation($location);", "public function addLocation($location);", "public function setLocationData()\n\t{\n\t\t$location = Locations::where('id', '=', $this->location_id)->first();\n\t\t$this->location = $location;\n\t}" ]
[ "0.78795743", "0.6437273", "0.6333494", "0.6263623", "0.6167989", "0.6086426", "0.608448", "0.60495853", "0.6010192", "0.6010192", "0.5884049", "0.5883744", "0.58597505", "0.58133775", "0.5751812", "0.5741781", "0.57371897", "0.5736045", "0.5722802", "0.57198787", "0.5699723", "0.56891495", "0.5606525", "0.55808115", "0.55785656", "0.5562205", "0.5541641", "0.55326444", "0.55326444", "0.5488419" ]
0.7424364
1
Set the location service.
public function setLocationService(LocationServiceInterface $service) { $this->locationService = $service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setServiceLocation($val)\n {\n $this->_propDict[\"serviceLocation\"] = $val;\n return $this;\n }", "public function setLocation($location) {\r\n\t$this->location = $location;\r\n }", "public function setLocation($location){\n\t\t$this->location = $location;\n\t}", "public function setLocation($location){\n\t\t$this->location = $location;\n\t}", "public function set_location($location)\n {\n $this->location = $location;\n }", "public function setService( $service )\n {\n $this->service = $service;\n }", "protected function setLocation($location) {\r\n $this->location = $this->create($location);\r\n }", "public function setLocationData()\n\t{\n\t\t$location = Locations::where('id', '=', $this->location_id)->first();\n\t\t$this->location = $location;\n\t}", "public function setLocation($location) {\n\t\t$this->location = $location;\n\t}", "public function setLocation($location) {\n\t\t$this->location = $location;\n\t}", "public function setLocation($location) {\n\t\t$this->location = $location;\n\t}", "public function setLocation($location) {\n $this->location = $location;\n }", "public function setService($service)\n {\n $this->service = $service;\n }", "private function setLocation(string $location): void\n {\n $this->location = $location;\n }", "public function set_location($value)\n {\n $this->set_default_property(self::PROPERTY_LOCATION, $value);\n }", "public function setService($var) {}", "public function getLocationService();", "public function setLocation($value)\n {\n $this->setProperty(\"Location\", $value, true);\n }", "public function getLocationService()\n {\n if (!$this->locationService) {\n $this->setLocationService(new LocationService($this));\n }\n\n return $this->locationService;\n }", "public function setLocation($location=null) {\n\t\tif($location == null) return;\n\t\tif(!($location instanceOf Intra_Object_Gis_Point)) {\n\t\t\t$location = Intra_Object_Gis::fromWKB($location);\n\t\t}\n\t\t$this->_set('c_location', $location);\n\t}", "public function setLocation(Location $location)\n {\n $this->location = $location;\n }", "public function setLocation(Location $location)\n {\n $this->location = $location;\n }", "public function setService($service)\n{\n$this->service = $service;\n}", "public function setService($value)\n {\n $this->setProperty(\"Service\", $value, true);\n }", "public function setService(Service $service): self;", "public function setLocation($args) {}", "public function setOfficeLocation(?string $value): void {\n $this->getBackingStore()->set('officeLocation', $value);\n }", "public function setLocationAttribute($value)\n {\n $location_lat = round(object_get($value, 'latitude'), 7);\n $location_lng = round(object_get($value, 'longitude'), 7);\n $this->attributes['location_lat'] = $location_lat;\n $this->attributes['location_lng'] = $location_lng;\n }", "public function __construct(\n LocationService $locationService,\n TideService $tideService,\n BuoyService $buoyService,\n WeatherService $weatherService\n )\n {\n $this->locationService = $locationService;\n $this->tideService = $tideService;\n $this->buoyService = $buoyService;\n $this->weatherService = $weatherService;\n }", "public function setServiceLocator($serviceLocator)\n {\n $this->serviceLocator = $serviceLocator;\n }" ]
[ "0.7399563", "0.6569251", "0.65362984", "0.65362984", "0.6519325", "0.65126586", "0.64282095", "0.6415447", "0.63666326", "0.63666326", "0.63666326", "0.63218343", "0.6312962", "0.629978", "0.6288958", "0.62668276", "0.6225149", "0.61967677", "0.6182103", "0.6094697", "0.60861784", "0.60861784", "0.60027224", "0.5988889", "0.5953747", "0.5927297", "0.5922129", "0.5881027", "0.58086723", "0.5738666" ]
0.7637096
0
Shipping service. Automatically load the shipping service
public function getShippingService() { if (!$this->shippingService) { $this->setShippingService(new ShippingService($this)); } return $this->shippingService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShippingService()\n {\n return $this->shippingService;\n }", "public function setShippingService(ShippingServiceInterface $service)\n {\n $this->shippingService = $service;\n }", "public function isShipping();", "public function setShippingService($shippingService)\n {\n $this->shippingService = $shippingService;\n return $this;\n }", "public static function initialize_shipping_module() {\n $GLOBALS['shipping_modules'] = new shipping($_SESSION['shipping']);\n }", "public function __construct(ShippingServiceInterface $shippingService)\n {\n $this->middleware('auth');\n $this->shippingService = $shippingService;\n }", "public function getShippingStatusService()\n {\n if (!$this->shippingStatusService) {\n $this->setShippingStatusService(new ShippingStatusService($this));\n }\n\n return $this->shippingStatusService;\n }", "protected function registerShippingOption(): void\n {\n $shipping = new FixedRate();\n Shipping::put($shipping);\n }", "public function setShipping()\n {\n $weight = (\\Session::has('noShipping') ? null : $this->orderWeight);\n\n $this->orderShipping = $this->shipping->getShipping($weight);\n\n return $this;\n }", "private function setShippingInformation()\n {\n if ($this->_checkoutSession->getLastRealOrder()->getIsVirtual()) {\n $this->_paymentRequest->setShipping()->setAddressRequired()->withParameters('false');\n } else {\n $this->_paymentRequest->setShipping()->setAddressRequired()->withParameters('true');\n $shipping = $this->_checkoutSession->getLastRealOrder()->getShippingAddress();\n if ($shipping) {\n if (count($shipping->getStreet()) === 4) {\n $this->_paymentRequest->setShipping()->setAddress()->withParameters(\n $shipping->getStreetLine(1),\n $shipping->getStreetLine(2),\n $shipping->getStreetLine(4),\n \\UOL\\PagSeguro\\Helper\\Data::fixPostalCode($shipping->getPostcode()),\n $shipping->getCity(),\n $this->getRegionAbbreviation($shipping),\n $this->getCountryName($shipping['country_id']),\n $shipping->getStreetLine(3)\n );\n } else {\n $address = \\UOL\\PagSeguro\\Helper\\Data::addressConfig($shipping['street']);\n\n $this->_paymentRequest->setShipping()->setAddress()->withParameters(\n $this->getShippingAddress($address[0], $shipping),\n $this->getShippingAddress($address[1]),\n $this->getShippingAddress($address[3]),\n \\UOL\\PagSeguro\\Helper\\Data::fixPostalCode($shipping->getPostcode()),\n $shipping->getCity(),\n $this->getRegionAbbreviation($shipping),\n $this->getCountryName($shipping['country_id']),\n $this->getShippingAddress($address[2])\n );\n }\n\n $this->_paymentRequest->setShipping()->setType()\n ->withParameters(\\PagSeguro\\Enum\\Shipping\\Type::NOT_SPECIFIED); //Shipping Type\n $this->_paymentRequest->setShipping()->setCost()\n ->withParameters(number_format($this->getShippingAmount(), 2, '.', '')); //Shipping Coast\n }\n }\n }", "public function getShippingMethod();", "public function getShippingMethod();", "public function getShipping()\n {\n $shipping = $this->shipping->getShipping($this->orderWeight);\n\n return $shipping;\n }", "public function getShippingServicePriority()\n {\n return $this->shippingServicePriority;\n }", "function setShippingMethod() {\n global $total_count, $total_weight;\n // ensure that cart contents is calculated properly for weight and value\n if (!isset($total_weight)) $total_weight = $_SESSION['cart']->show_weight();\n if (!isset($total_count)) $total_count = $_SESSION['cart']->count_contents();\n // set the shipping method if one is not already set\n // defaults to the cheapest shipping method\n if ( !$_SESSION['shipping'] || ( $_SESSION['shipping'] && ($_SESSION['shipping'] == false) && (zen_count_shipping_modules() > 1) ) ) {\n require_once(DIR_WS_CLASSES . 'http_client.php');\n require_once(DIR_WS_CLASSES . 'shipping.php');\n $shipping_Obj = new shipping;\n\n // generate the quotes\n $shipping_Obj->quote();\n\n // set the cheapest one\n $_SESSION['shipping'] = $shipping_Obj->cheapest();\n }\n }", "public function isDefaultShipping()\r\n {\r\n\t\treturn false;\r\n }", "public function handleShipping() { \n $error = array('status' => false);\n $model = new ShippingInfoForm();\n $model->setAttributeByDefault();\n\n $creditCardModel = new CreditCardForm;\n\n if (isset($_POST['ShippingInfoForm'])) {\n $model->attributes = $_POST['ShippingInfoForm'];\n\n if ($model->validate()) {\n $shipping_id = UserProfile::model()->saveShippingInfo($_POST['ShippingInfoForm']);\n Yii::app()->session['shipping_id'] = $shipping_id; \n $this->redirect($this->createUrl(\"/web/payment/placeOrder\"));\n }\n }\n \n $shipping_country_name = \"\";\n // getting shipping country name on behalf of country_id(region id) to disable the Cash On Delivery option for international customers\n $shipping_country_name = Region::model()->getRegionName($model->shipping_country);\n \n $criteria = new CDbCriteria;\n if ($country_list = Cart::model()->getCartCountryList()) {\n\n $criteria->addInCondition(\"name\", $country_list);\n }\n $criteria->order = \"name ASC\";\n $regionList = CHtml::listData(Region::model()->findAll($criteria), 'id', 'name');\n $this->render('//payment/payment_method', array(\n 'model' => $model,\n 'regionList' => $regionList,\n 'creditCardModel' => $creditCardModel,\n 'country_name' => $shipping_country_name,\n 'error' => $error\n ));\n }", "public function getShipping()\n {\n return view('site.shipping');\n\n }", "public function shipping(): MorphOne\n {\n return $this->morphOne(Shipping::getProxiedClass(), 'shippable')->withDefault([\n 'driver' => ShippingManager::getDefaultDriver(),\n ]);\n }", "public function shipping()\n {\n return $this->hasOne('App\\Sippingaddr');\n }", "public function getShippingAttribute(): Shipping;", "protected function _getShippingObject()\n {\n $shipping = $this->_order->getShippingAddress();\n $shippingAddressObj = new WirecardCEE_Client_QPay_Request_Initiation_ConsumerData_Address(WirecardCEE_Client_QPay_Request_Initiation_ConsumerData_Address::TYPE_SHIPPING);\n\n $shippingAddressObj->setFirstname($shipping->getFirstname());\n $shippingAddressObj->setLastname($shipping->getLastname());\n $shippingAddressObj->setAddress1($shipping->getStreet1());\n $shippingAddressObj->setAddress2($shipping->getStreet2());\n $shippingAddressObj->setCity($shipping->getCity());\n $shippingAddressObj->setCountry($shipping->getCountry());\n $shippingAddressObj->setState($shipping->getRegionCode());\n $shippingAddressObj->setZipCode($shipping->getPostcode());\n $shippingAddressObj->setFax($shipping->getFax());\n $shippingAddressObj->setPhone($shipping->getTelephone());\n\n return $shippingAddressObj;\n }", "public function shipping($clear_cache = FALSE)\n\t{\n\t\tif ($clear_cache === TRUE)\n\t\t{\n\t\t\t$this->cache(__FUNCTION__, NULL);\n\t\t}\n\t\t\n\t\t$cache = $this->cache(__FUNCTION__);\n\t\t\n\t\tif ($this->calculation_caching === FALSE || is_null($cache))\n\t\t{\n\t\t\tif ( ! is_null($this->shipping))\n\t\t\t{\n\t\t\t\t$cache = $this->shipping;\n\t\t\t}\n\t\t\telse if ( ! $this->shippable_items())\n\t\t\t{\n\t\t\t\t$cache = 0;\n\t\t\t}\n\t\t\telse if ($this->core->hooks->set_hook('cart_shipping_start')->run() && $this->core->hooks->end())\n\t\t\t{\n\t\t\t\t$cache = $this->core->hooks->value();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cache = 0;\n\t\t\t\t\n\t\t\t\tif ($this->core->store->config('shipping_plugin'))\n\t\t\t\t{\n\t\t\t\t\t$plugin = $this->core->create_child($this->core, $this->core->store->config('shipping_plugin'));\n\t\t\t\t\t\n\t\t\t\t\tif (method_exists($plugin, 'get_shipping'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$cache = $this->core->round($plugin->get_shipping());\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\tforeach ($this->core->cart->items() as $item)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cache += $item->shipping();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($this->core->hooks->set_hook('cart_shipping_end')->run($this->shipping) && $this->core->hooks->end())\n\t\t\t\t{\n\t\t\t\t\t$cache = $this->core->hooks->value();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->set_shipping_before_discount($cache); \n\t\t\t\n\t\t\t$this->cache(__FUNCTION__, $cache);\n\t\t}\n\t\t\n \t\tif ( $this->discounted_shipping() !== NULL)\n\t\t{\n \t\t\t$this->cache(__FUNCTION__, $this->discounted_shipping() );\n\t\t\treturn $this->core->round( $this->discounted_shipping() );\n\t\t}\n\t\t\n\t\treturn $this->core->round($cache);\n\t}", "public function getShippingTracker()\n {\n return null;\n }", "private function getShippingMethod($id)\n {\n $this->data = $this->loader->getData();\n\n $hydrator = new \\Hydrator('Larium\\Shop\\\\Shipment\\\\ShippingMethod');\n\n return $hydrator->hydrate($this->data[$id], $id);\n }", "public function getShippingPricing();", "public function getShippingData()\n {\n return $this->data['shipping'];\n }", "public function setShippingAmount($amount);", "public function findShippingMethod($id)\n\t{\n\t\treturn $this->shipping->findOrFail($id);\n\t}", "public function setShippingStatusService(ShippingStatusServiceInterface $service)\n {\n $this->shippingStatusService = $service;\n }" ]
[ "0.7737335", "0.6835235", "0.66310465", "0.6571952", "0.6503173", "0.6484483", "0.6436719", "0.63202417", "0.626014", "0.62421954", "0.62379646", "0.62379646", "0.6230444", "0.61278677", "0.6122165", "0.60316986", "0.59937733", "0.5991326", "0.59811646", "0.5960901", "0.5953911", "0.595069", "0.5933796", "0.5894459", "0.58452195", "0.58429533", "0.584191", "0.58330214", "0.5829765", "0.5810749" ]
0.73373586
1
Set the shipping service.
public function setShippingService(ShippingServiceInterface $service) { $this->shippingService = $service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setShippingService($shippingService)\n {\n $this->shippingService = $shippingService;\n return $this;\n }", "public function getShippingService()\n {\n return $this->shippingService;\n }", "private function setShippingInformation()\n {\n if ($this->_checkoutSession->getLastRealOrder()->getIsVirtual()) {\n $this->_paymentRequest->setShipping()->setAddressRequired()->withParameters('false');\n } else {\n $this->_paymentRequest->setShipping()->setAddressRequired()->withParameters('true');\n $shipping = $this->_checkoutSession->getLastRealOrder()->getShippingAddress();\n if ($shipping) {\n if (count($shipping->getStreet()) === 4) {\n $this->_paymentRequest->setShipping()->setAddress()->withParameters(\n $shipping->getStreetLine(1),\n $shipping->getStreetLine(2),\n $shipping->getStreetLine(4),\n \\UOL\\PagSeguro\\Helper\\Data::fixPostalCode($shipping->getPostcode()),\n $shipping->getCity(),\n $this->getRegionAbbreviation($shipping),\n $this->getCountryName($shipping['country_id']),\n $shipping->getStreetLine(3)\n );\n } else {\n $address = \\UOL\\PagSeguro\\Helper\\Data::addressConfig($shipping['street']);\n\n $this->_paymentRequest->setShipping()->setAddress()->withParameters(\n $this->getShippingAddress($address[0], $shipping),\n $this->getShippingAddress($address[1]),\n $this->getShippingAddress($address[3]),\n \\UOL\\PagSeguro\\Helper\\Data::fixPostalCode($shipping->getPostcode()),\n $shipping->getCity(),\n $this->getRegionAbbreviation($shipping),\n $this->getCountryName($shipping['country_id']),\n $this->getShippingAddress($address[2])\n );\n }\n\n $this->_paymentRequest->setShipping()->setType()\n ->withParameters(\\PagSeguro\\Enum\\Shipping\\Type::NOT_SPECIFIED); //Shipping Type\n $this->_paymentRequest->setShipping()->setCost()\n ->withParameters(number_format($this->getShippingAmount(), 2, '.', '')); //Shipping Coast\n }\n }\n }", "public function setShipping()\n {\n $weight = (\\Session::has('noShipping') ? null : $this->orderWeight);\n\n $this->orderShipping = $this->shipping->getShipping($weight);\n\n return $this;\n }", "public function setShippingStatusService(ShippingStatusServiceInterface $service)\n {\n $this->shippingStatusService = $service;\n }", "public function setShippingAddress($address) {\n\t\t$this->shipping_address = $address;\n\t}", "protected function registerShippingOption(): void\n {\n $shipping = new FixedRate();\n Shipping::put($shipping);\n }", "public function setShippingAmount($amount);", "function setShippingMethod() {\n global $total_count, $total_weight;\n // ensure that cart contents is calculated properly for weight and value\n if (!isset($total_weight)) $total_weight = $_SESSION['cart']->show_weight();\n if (!isset($total_count)) $total_count = $_SESSION['cart']->count_contents();\n // set the shipping method if one is not already set\n // defaults to the cheapest shipping method\n if ( !$_SESSION['shipping'] || ( $_SESSION['shipping'] && ($_SESSION['shipping'] == false) && (zen_count_shipping_modules() > 1) ) ) {\n require_once(DIR_WS_CLASSES . 'http_client.php');\n require_once(DIR_WS_CLASSES . 'shipping.php');\n $shipping_Obj = new shipping;\n\n // generate the quotes\n $shipping_Obj->quote();\n\n // set the cheapest one\n $_SESSION['shipping'] = $shipping_Obj->cheapest();\n }\n }", "public function setShippingAddress($address) {\n $this->shippingAddress = $address;\n }", "public function set_shipping($shipping)\n\t{\n\t\t$this->shipping = $shipping;\n\t\t\n\t\t$this->cache('shipping', NULL);\n\t\t\n\t\treturn $this;\n\t}", "public function setShippingAddress($address)\n {\n $this->data['shipping']['x_ship_to_address'] = $address;\n }", "public function testSetShippingMethodException() {\n\t\t$this->{$this->modelClass}->setShippingMethod('fake-shipping-method');\n\t}", "public function getShippingService()\n {\n if (!$this->shippingService) {\n $this->setShippingService(new ShippingService($this));\n }\n\n return $this->shippingService;\n }", "public function setShippingMethod(Order $order, Orderable $shipping)\n\t{\n\t\t$this->deleteExistingShippingItem($order, $shipping);\n\n\t\t$order->addItem($shipping);\n\t}", "public function setService( $service )\n {\n $this->service = $service;\n }", "public function __construct(ShippingServiceInterface $shippingService)\n {\n $this->middleware('auth');\n $this->shippingService = $shippingService;\n }", "public function setService($service)\n {\n $this->service = $service;\n }", "public function setShippingAddress(array $shipping): Transaction\n {\n throw_if(\n !array_key_exists('shipping', $this->requestBody['purchase_units'][0]),\n new \\BadMethodCallException('You must provide a shipping method!')\n );\n\n throw_if(\n !isset($shipping['address'], $shipping['city'], $shipping['state'], $shipping['postal_code'], $shipping['country']),\n new \\InvalidArgumentException('Missing required parameter for shipping!')\n );\n\n $this->requestBody['purchase_units'][0]['shipping'] = [\n 'address_line_1' => $shipping['address'],\n 'address_line_2' => $shipping['address_2'] ?? '',\n 'admin_area_2' => $shipping['city'],\n 'admin_area_1' => $shipping['state'],\n 'postal_code' => $shipping['postal_code'],\n 'country_code' => $shipping['country'],\n ];\n\n return $this;\n }", "public function setShippingMethod($shipping_method)\n {\n $this->shipping_method = $shipping_method;\n return $this;\n }", "function setShipping($price, $info) {\n\t\t$this->setShipRate($price);\n\t\t$this->setShipInfo($info);\n\t}", "public function setShippingMethod(ShippingMethod $option) {\n\t\t$package = $this->owner->createShippingPackage();\n\t\tif(!$package){\n\t\t\treturn $this->error(\n\t\t\t\t_t(\"OrderShippingExtension.NoPackage\", \"Shipping package information not available\")\n\t\t\t);\n\t\t}\n\t\t$address = $this->owner->getShippingAddress();\n\t\tif(!$address || !$address->exists()){\n\t\t\treturn $this->error(\n\t\t\t\t_t(\"OrderShippingExtension.NoAddress\", \"No address has been set\")\n\t\t\t);\n\t\t}\n\t\t$this->owner->ShippingTotal = $option->calculateRate($package, $address);\n\t\t$this->owner->ShippingMethodID = $option->ID;\n\t\t$this->owner->write();\n\t\treturn true;\n\t}", "public function setShippingPrice($value)\n {\n $this->_fields['ShippingPrice']['FieldValue'] = $value;\n return $this;\n }", "public function setService($value)\n {\n $this->setProperty(\"Service\", $value, true);\n }", "public function setShipper()\n {\n $session = JFactory::getSession();\n $settings = $session->get('settings', array(), 'ketshop'); \n\n //If cart is shippable we search for the id of both shipper plugin\n //and shipping selected by the user.\n if(ShopHelper::isShippable()) {\n //Get the shippers session variables.\n $shippers = $session->get('shippers', array(), 'ketshop'); \n\n //Get all of the POST data and get the selected shipper and shipping id.\n $post = $this->input->post->getArray();\n $shipperId = (int)$post['shipper_id'];\n $shippingId = (int)$post['shipping_id'];\n\n foreach($shippers as &$shipper) {\n\t//Initialize each flag in case user return back to \n\t//choose another shipping.\n\t$shipper['selected'] = false;\n\n\t//Identify first the selected shipper and set it to true.\n\tif($shipperId === (int)$shipper['id']) {\n\t $shipper['selected'] = true;\n\n\t //Identify the selected shipping and set it to true.\n\t foreach($shipper['shippings'] as &$shipping) {\n\t //Initialize each flag in case user return back to \n\t //choose another shipping.\n\t $shipping['selected'] = false;\n\n\t if($shippingId === (int)$shipping['id']) {\n\t $shipping['selected'] = true;\n\t }\n\t }\n\t}\n }\n\n $session->set('shippers', $shippers, 'ketshop'); \n }\n\n //Reset submit flag in case cart has been previously saved.\n $session->set('submit', 0, 'ketshop'); \n\n $this->setRedirect(JRoute::_('index.php?option='.$this->option.'&view=summary', false));\n return;\n }", "public function setShippingInvoiced($shippingInvoiced);", "public function setShippingPostalCode($postal_code)\n {\n $this->data['shipping']['x_ship_to_zip'] = $postal_code;\n }", "public function setService($var) {}", "public function withShippingPrice($value)\n {\n $this->setShippingPrice($value);\n return $this;\n }", "public function set_shipping_info($key, $value = FALSE)\n\t{\n\t\tif ( ! is_array($key))\n\t\t{\n\t\t\t$key = array($key => $value);\n\t\t}\n\t\t\n\t\t$this->shipping_info = array_merge($this->shipping_info, $key);\n\t\t\n\t\treturn $this;\n\t}" ]
[ "0.7367224", "0.71141976", "0.7049211", "0.69131726", "0.6850174", "0.6787635", "0.67795897", "0.6642929", "0.66319203", "0.6541421", "0.6497236", "0.6495577", "0.64667815", "0.6455176", "0.64205503", "0.64104545", "0.64054304", "0.63392794", "0.6202665", "0.61925787", "0.6185152", "0.6091896", "0.607564", "0.6033628", "0.60183436", "0.58745325", "0.5860648", "0.5854571", "0.5854299", "0.58537287" ]
0.8141789
0
Confirm a single shipment.
public function confirmShipment(Shipment $shipment) { return $this->getConfirmingService()->confirmShipment(new Confirming([$shipment], $this->customer)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ship() {\n // Get the UPS Access Request XML.\n $request = $this->getAccessRequest();\n\n // Compose the Shipment Confirm Request XML.\n $xml = new XMLWriter();\n // Use memory for string output.\n $xml->openMemory();\n $xml->startDocument();\n $xml->startElement('ShipmentConfirmRequest');\n $xml->writeAttribute('xml:lang', 'en-US');\n\n $xml->startElement('Request');\n $xml->startElement('TransactionReference');\n $xml->writeElement('CustomerContext', 'ShipConfirm');\n $xml->writeElement('XpciVersion', '1.0001');\n $xml->endElement();\n $xml->writeElement('RequestAction', 'ShipConfirm');\n $xml->writeElement('RequestOption', 'nonvalidate');\n $xml->endElement();\n\n $xml->startElement('LabelSpecification');\n $xml->startElement('LabelPrintMethod');\n $xml->writeElement('Code', 'GIF');\n $xml->endElement();\n $xml->writeElement('HTTPUserAgent', 'Mozilla/5.0');\n $xml->startElement('LabelImageFormat');\n $xml->writeElement('Code', 'GIF');\n $xml->endElement();\n $xml->startElement('LabelStockSize');\n $xml->writeElement('Height', '4');\n $xml->writeElement('Width', '6');\n $xml->endElement();\n $xml->endElement();\n\n $xml->startElement('Shipment');\n $xml->startElement('Shipper');\n $xml->writeElement('Name', $this->fromAddress->getContact());\n $xml->writeElement('ShipperNumber', $this->getShipperNumber());\n $xml->startElement('Address');\n $xml->writeElement('AddressLine1', $this->fromAddress->getAddress1());\n $xml->writeElement('AddressLine2', $this->fromAddress->getAddress2());\n $xml->writeElement('City', $this->fromAddress->getCity());\n $xml->writeElement('StateProvinceCode', $this->fromAddress->getStateCode());\n $xml->writeElement('PostalCode', $this->fromAddress->getPostalCode());\n $xml->writeElement('CountryCode', $this->fromAddress->getCountryCode());\n $xml->endElement();\n $xml->endElement();\n $xml->startElement('ShipFrom');\n $this->getAddressXML($xml, $this->fromAddress);\n $xml->endElement();\n $xml->startElement('ShipTo');\n $this->getAddressXML($xml, $this->shippingAddress);\n $xml->endElement();\n $xml->startElement('PaymentInformation');\n $xml->startElement('Prepaid');\n $xml->startElement('BillShipper');\n $xml->writeElement('AccountNumber', $this->getShipperNumber());\n $xml->endElement();\n $xml->endElement();\n $xml->endElement();\n $xml->startElement('Service');\n $xml->writeElement('Code', $this->serviceType);\n $xml->endElement();\n $xml->startElement('Package');\n $xml->startElement('PackagingType');\n $xml->writeElement('Code', $this->packageType);\n $xml->endElement();\n $xml->startElement('PackageWeight');\n $xml->startElement('UnitOfMeasurement');\n $xml->writeElement('Code', $this->getWeightUnit());\n $xml->endElement();\n $xml->writeElement('Weight', number_format($this->weight, 2, '.', ''));\n $xml->endElement();\n // If any of the dimensions is unknown, don't send dimensions information.\n if ($this->length && $this->width && $this->height) {\n $xml->startElement('Dimensions');\n $xml->startElement('UnitOfMeasurement');\n $xml->writeElement('Code', $this->getDimensionUnit());\n $xml->endElement();\n $xml->writeElement('Length', $this->length);\n $xml->writeElement('Width', $this->width);\n $xml->writeElement('Height', $this->height);\n $xml->endElement();\n }\n $xml->endElement();\n $xml->endElement();\n $xml->endElement();\n $xml->endDocument();\n $request .= $xml->outputMemory();\n\n // Call the Shipment Confirm API.\n $url = $this->isDemoMode() ? self::URL_CONFIRM_DEMO : self::URL_CONFIRM_LIVE;\n $response = $this->callApi($url, $request);\n\n // Parse the API response.\n $confirmHandler = new UpsConfirmXmlHandler();\n $this->parseResponse($response, $confirmHandler);\n $shipmentDigest = $confirmHandler->getShipmentDigest();\n\n // Compose the Shipment Accept Request XML.\n $xml->startDocument();\n $xml->startElement('ShipmentAcceptRequest');\n $xml->writeAttribute('xml:lang', 'en-US');\n $xml->startElement('Request');\n $xml->startElement('TransactionReference');\n $xml->writeElement('CustomerContext', 'ShipAccept');\n $xml->writeElement('XpciVersion', '1.0001');\n $xml->endElement();\n $xml->writeElement('RequestAction', 'ShipAccept');\n $xml->writeElement('RequestOption', '01');\n $xml->endElement();\n $xml->writeElement('ShipmentDigest', $shipmentDigest);\n $xml->endElement();\n $xml->endDocument();\n\n $request = $this->getAccessRequest() . $xml->outputMemory();\n\n // Call the Shipment Accept API.\n $url = $this->isDemoMode() ? self::URL_ACCEPT_DEMO : self::URL_ACCEPT_LIVE;\n $response = $this->callApi($url, $request);\n\n // Parse the acceptance response.\n $acceptHandler = new UpsAcceptXmlHandler();\n $this->parseResponse($response, $acceptHandler);\n\n // Get and save the shipping label as PNG.\n $label = $this->encodePng($acceptHandler->getLabel());\n if ($label !== false) {\n // Create a directory if not exists.\n if (!file_exists(LABEL_DIRECTORY)) {\n @mkdir(LABEL_DIRECTORY, 0777, true);\n }\n\n $fp = fopen(LABEL_DIRECTORY . '/' . $confirmHandler->getTrackingNumber() . '.png', 'w');\n if (!$fp) {\n throw new UpsException('Could not open file for write.');\n }\n\n $written = fwrite($fp, $label);\n if (!$written) {\n throw new UpsException('Could not save the label.');\n }\n fclose($fp);\n }\n\n return array(\n 'trackingNumber' => $confirmHandler->getTrackingNumber(),\n 'totalCharge' => $acceptHandler->getTotalCharge()\n );\n }", "public function actionConfirm()\n {}", "public function readytoship($id){\n\t\t$orderId=$this->security->xss_clean($id);\n\t\t$this->admin_model->Readytoship($id);\n\n\t\techo \"<script>alert('Order Move To Ready To Ship');</script>\";\n\t\techo \"<script>window.open('\".base_url().\"admin/order/Confirmed','_self');</script>\";\n\t}", "function confirm ($id_order) {\n\t\t$order = new shp_commande($id_order);\n\t\tif ($order->get_id_statut() == OR_PAY_STD) {\n\t\t\t// update status only if IPN wasn't recieved before success call\n\t\t\t$order->set_id_statut(OR_PAY_RET);\n\t\t\tdbUpdate($order);\n\t\t}\n\t\t//viewArray($_SESSION);\n\n\t\tlogCheckFileExists($_SERVER['DOCUMENT_ROOT'].'/log/payment.log');\n\t\t$f = fopen($_SERVER['DOCUMENT_ROOT'].'/log/payment.log', 'a+');\n\t\tfwrite($f, \"\\n\".'['.date('d/m/Y H:i:s').'] - Commande : '.$id_order.' - Paiement '.$order->get_mode_paiement().' : retour <success>');\n\t\tfclose($f);\n\n\t}", "public function sendConfirmation()\n {\n Mail::to($this->getEmail())->send(new OrderConfirmed($this));\n }", "public function sendConfirmation();", "public function confirmPaymentShipping(Request $request)\n\t{\n\t\t$general = new General;\n\t\t$member = new Member;\n\t\t$all = $general->getAll($request);\n\t\tif($all->member == null) return redirect('/');\n\n\t\treturn view('member/confirm_exchange', ['general'=>$all, 'banks'=>$member->getAllPublishBanks()]);\n\t}", "public function confirm()\n {\n $this->exitWith('1');\n }", "public function actionConfirm()\r\n {\r\n try {\r\n // if (Yii::$app->session['isLogin'] != 1) {\r\n // return $this->redirect(['member/auth']);\r\n // }\r\n if (!Yii::$app->request->isPost) {\r\n throw new \\Exception();\r\n }\r\n $post = Yii::$app->request->post();\r\n $loginname = Yii::$app->session['loginname'];\r\n $usermodel = User::find()->where('username = :name or useremail = :email', [':name' => $loginname, ':email' => $loginname])->one();\r\n if (empty($usermodel)) {\r\n throw new \\Exception();\r\n }\r\n $userid = $usermodel->userid;\r\n $model = ShopOrder::find()->where('orderid = :oid and userid = :uid', [':oid' => $post['orderid'], ':uid' => $userid])->one();\r\n if (empty($model)) {\r\n throw new \\Exception();\r\n }\r\n $model->scenario = \"update\";\r\n $post['status'] = ShopOrder::CHECKORDER;\r\n $details = ShopOrderDetail::find()->where('orderid = :oid', [':oid' => $post['orderid']])->all();\r\n $amount = 0;\r\n foreach($details as $detail) {\r\n $amount += $detail->productnum*$detail->price;\r\n }\r\n if ($amount <= 0) {\r\n throw new \\Exception();\r\n }\r\n $express = Yii::$app->params['expressPrice'][$post['expressid']];\r\n if ($express < 0) {\r\n throw new \\Exception();\r\n }\r\n $amount += $express;\r\n $post['amount'] = $amount;\r\n $data['ShopOrder'] = $post;\r\n if (empty($post['addressid'])) {\r\n return $this->redirect(['order/pay', 'orderid' => $post['orderid'], 'paymethod' => $post['paymethod']]);\r\n }\r\n if ($model->load($data) && $model->save()) {\r\n return $this->redirect(['order/pay', 'orderid' => $post['orderid'], 'paymethod' => $post['paymethod']]);\r\n }\r\n }catch(\\Exception $e) {\r\n return $this->redirect(['index/index']);\r\n }\r\n }", "public function void_arrived($id)\n {\n if(!Auth::user()->hasRole('admin'))\n return redirect()->route('index');\n \n $tracking = new ShipmentTracking();\n $tracking->shipment_id = $id;\n $shipment = Shipment::find($id);\n $shipment->status = \"Arrived\";\n $tracking->description = \"Shipment arrived at ZIPPY office\";\n\n $notification = new Alert();\n $notification->notification_text = \"Your shipment# \".$shipment->consignment_no.\" is arrived at ZIPPY office.\";\n $notification->to = $shipment->user_id;\n $notification->from = \"Support\";\n $notification->link = \"/customer-shipments\";\n $notification->save();\n $tracking->save();\n $shipment->save();\n\n $success = \"Shipment status changed\";\n return back()->with('success', $success);\n }", "function confirm() {\n // $this->data->confirmatory_message();\n }", "public function confirm($uid)\n {\n try {\n $options = array(\n 'cluster' => env('PUSHER_CLUSTER'),\n 'useTLS' => env('PUSHER_USETLS')\n );\n $pusher = new Pusher(\n env('PUSHER_APP_KEY'),\n env('PUSHER_APP_SECRET'),\n env('PUSHER_APP_ID'),\n $options\n );\n $data['message'] = 'Confirm order-'.$uid;\n $pusher->trigger(env('PUSHER_CHANNEL'), env('PUSHER_EVENT'), $data);\n } catch (PusherException $e) {\n }\n\n $deliverys = DeliveryInCart::where('uid', $uid);\n $deliverys->update(['state' => 3]);\n $mail_headers = \"From: \".env('APP_NAME') . \" - \". env('APP_TITLE').\"<\".env('MAIL_FROM_ADDRESS').\">\";\n $subject = 'Alert: Bullet - Delivery Confirmed';\n \n $new_orders = $deliverys->get()->toArray();\n $total_price = 0;\n $total_payable = 0;\n $total_tax = 0;\n $total_discount = 0;\n $delivery_price = $new_orders[0]['delivery_price']; \n foreach($new_orders as $new_order)\n {\n $total_price += $new_order['sub_total'];\n $total_discount += $new_order['discount'] * $new_order['product_quantity'];\n $total_tax += $new_order['tax'] * $new_order['product_quantity'];\n }\n $total_tax += $new_orders[0]['delivery_tax'];\n $total_payable = $total_price + $delivery_price + $total_tax - $total_discount;\n\n ////////// increase points when cash pay//////////\n if($new_orders[0]['payment_method'] == 'Cash') {\n $this->transactionUtil->increasePointsFromDelivery($new_orders, $uid);\n }\n /////////////////////////////\n\n $message = \"Hi \" . $new_orders[0]['user_name'] . \",\\r\\n\" .\n \"Your delivery confirmed. \\r\\n\" .\n env('APP_NAME') . \" - \". env('APP_TITLE');\n DataHelper::send_mail($new_orders[0]['user_email'], $subject, $message, $mail_headers);\n return back()\n ->with('status', ['success' => 1,\n 'msg' => __('messages.delivery_confirm')]);\n }", "public function orderShipment(Varien_Event_Observer $observer)\n {\n $service = $this->_getService();\n $isShipConfActive = $service->getRuleset('shipmentConfirm');\n\n if (! $isShipConfActive) {\n return;\n }\n\n $shipment = $observer->getEvent()->getShipment();\n $order = $shipment->getOrder();\n\n $smsbody = $service->replacePlaceholders($order, $isShipConfActive['temp_body']);\n\n $address = $order->getShippingAddress();\n $mobile = is_object($address) ? trim($address->getTelephone()) : '';\n\n $mobilenumber = $mobile;\n $text = $smsbody;\n $senderid = $isShipConfActive['senderid'];\n $smslabel = $isShipConfActive['label'];\n $source = '23000';\n\n $sendSms = Mage::getModel('smsservice/sms');\n $sendSms->setLabel($smslabel);\n $sendSms->setSenderId($senderid);\n $sendSms->setSource($source);\n $sendSms->setNumber($mobilenumber);\n $sendSms->setText($text);\n\n if ($service->send($sendSms)) {\n Mage::log('Shipement Confirmation : MOBILE : ' . $mobilenumber . ' SENDER ID : ' . $senderid . ' Label : ' . $smslabel . ' SOURCE : ' . $source . ' MESSAGE BODY : ' . $text, null, 'smsservice.log');\n }\n }", "function confirm()\n\t{\n\t\t//import core plugin\n\t\tFvnImporter::corePaymentPlugin();\n\t\tFvnImporter::model('orders');\t\t\n\t\tdo_action('hb_order_process_execute_before');\t\t\n\t\t$plugin = $this->input->getString('method');\n\t\tif(substr($plugin,0,10)=='hbpayment_'){\n\t\t\t$plugin = substr($payment_plugin,10);\n\t\t\t// echo $payment_plugin;die;\n\t\t}\n\t\t$plugin = 'hbpayment_'.$plugin;\n\n\t\t$config = HBFactory::getConfig();\n\t\t//check order da dc thanh toan lan nao chua de add transaction\n\t\t// $original_order = (new FvnModelOrders())->getItem($this->input->get)\n\t\t$payment = new $plugin();\t\n\t\t$payment->config = $config;\n\t\t$payment->order = new FvnModelOrders();\n\t\t$payment->order->load($this->input->get('order_id'));\n\t\t$results = $payment->_postPayment();\n\t\t/// Send email\n\t\t// debug($results);die;\n\t\tif($results){\n\t\t\tif(!isset($results->sendemail)){\n\t\t\t\t//send email\n\t\t\t\tif($config->allow_curl){\n\t\t\t\t\t$url = site_url().'index.php?hbaction=payment&task=urlsendmail&order_id='.$results->id;\n\t\t\t\t\tFvnHelper::pingUrl($url);\n\t\t\t\t}else{\n\t\t\t\t\t$this->sendMail($results->id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\tdo_action('hb_order_process_execute_after',$results);\n\t\t// die;\n\t\t/*\n\t\tif($results->order_status==FvnParamOrderStatus::CONFIRMED['value']){\n\t\t\twp_redirect(FvnHelper::get_order_link($results));\n\t\t}else{\t\t\t\n\t\t\twp_redirect('index.php?view=message');\n\t\t}\t\t\n\t\t*/\n\t\twp_redirect(FvnHelper::get_order_link($results));\n\t\texit;\n\t}", "public function update(Request $request, Shipment $shipment)\n\t{\n\t\t$this->authorize('update', $shipment);\n\n\t\t$request->validate([\n\t\t\t'arrival_date' => 'nullable|date',\n\t\t\t'expected_date' => 'required|date',\n\t\t\t'quantity' => 'nullable|numeric|max:' . ($shipment->order->quantity - $shipment->order->shipmentTotalQuantity()),\n\t\t\t'shipment_status' => [\n\t\t\t\t'required',\n\t\t\t\tRule::in(['on_hold', 'moving', 'cancelled', 'arrived', 'delayed'])\n\t\t\t],\n\t\t\t'invoice' => 'required|numeric',\n\t\t]);\n\n\t\t$relatedOrder = Order::where('id', $shipment->order_id)->first();\n\n\t\tif ($relatedOrder->approval_date >= Carbon::createFromFormat('Y-m-d H:i', $request->expected_date)){\n\t\t\tAlert::flash('The expected date for \"'.$shipment->order->item->name.'\" on pending exceeds the order approval date', 'warning');\n\n\t\t\treturn back();\n\t\t}\n \n\n\t\tif ($request->has('quantity'))\n\t\t{\n\t\t\tif ((int) $request->quantity < ($shipment->order->quantity - $shipment->order->shipmentTotalQuantity()))\n\t\t\t{\n\t\t\t\tShipment::create([\n\t\t\t\t\t'order_id' => $shipment->order->id,\n\t\t\t\t\t'user_id' => $shipment->user->id,\n\t\t\t\t\t'category_id' => $shipment->category_id,\n\t\t\t\t\t'partial' => 1,\n\t\t\t\t\t'expected_date' => Carbon::createFromFormat('Y-m-d H:i', $request->expected_date),\n\t\t\t\t\t'arrival_date' => $request->arrival_date ? Carbon::createFromFormat('Y-m-d H:i', $request->arrival_date) : null,\n\t\t\t\t\t'invoice' => $request->invoice,\n\t\t\t\t\t'quantity' => $request->quantity,\n\t\t\t\t\t'shipment_status' => $request->shipment_status,\n\t\t\t\t\t'date' => Carbon::now()->timestamp\n\t\t\t\t]);\n\n\t\t\t\t$shipment->update([\n\t\t\t\t\t'partial' => 1,\n\t\t\t\t]);\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$shipment->update([\n\t\t\t\t\t'expected_date' => Carbon::createFromFormat('Y-m-d H:i', $request->expected_date),\n\t\t\t\t\t'arrival_date' => $request->arrival_date ? Carbon::createFromFormat('Y-m-d H:i', $request->arrival_date) : null,\n\t\t\t\t\t'invoice' => $request->invoice,\n\t\t\t\t\t'quantity' => $request->quantity,\n\t\t\t\t\t'shipment_status' => $request->shipment_status,\n\t\t\t\t]);\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\t$shipment->update([\n\t\t\t\t'expected_date' => Carbon::createFromFormat('Y-m-d H:i', $request->expected_date),\n\t\t\t\t'arrival_date' => $request->arrival_date ? Carbon::createFromFormat('Y-m-d H:i', $request->arrival_date) : null,\n\t\t\t\t'invoice' => $request->invoice,\n\t\t\t\t'shipment_status' => $request->shipment_status,\n\t\t\t]);\n\t\t}\n\n\t\tif ($request->shipment_status == 'arrived')\n\t\t{\n\t\t\tInventory::create([\n\t\t\t\t'category_id' => $shipment->category_id,\n\t\t\t\t'item_id' => $shipment->order->item->id,\n\t\t\t\t'shipment_id' => $shipment->id,\n\t\t\t\t'transaction_type' => 'on_hold',\n\t\t\t\t'quantity' => $shipment->quantity,\n\t\t\t\t'arrival_status' => 0,\n\t\t\t]);\n\t\t}\n\n\t\tAlert::flash('The shipment has been updated', 'success');\n\n\t\treturn redirect('/shipments_status');\n\t}", "static function delete_shipment()\n {\n if (empty($_GET['delete_shipment_id'])) return null;\n return self::_delete_shipment(intval($_GET['delete_shipment_id']));\n }", "public function confirmScreeningItem( $obj ) {\n putLog(\"USER:: \".$obj[0]->getFkUserId().\" | MESSAGE:: PaypalWPPOrders confirmScreeningItem is: \" . $obj[0]->getAudienceInviteCode());\n $obj[0]->setAudiencePaidStatus( 2 );\n $obj[0] -> save();\n \n //$this -> order -> sendOrderNotification( $obj[0] );\n }", "public function confirm() {\n\t\t\tif($_SERVER[\"REQUEST_METHOD\"] == \"POST\" && isset($_POST[\"confirm\"])) {\n\n\n\t\t\t\t//get customer array from model\n\t\t\t\t//$mycust = $this->model->getCustomer();\n\n\n\t\t\t\t$name = $_POST['name'];\n\t\t\t\t$phone = $_POST['phone'];\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$carrier = $_POST['carrier'];\n\t\t\t\t$date = $_POST['timestamp'];\n\n\t\t\t\t$timedrop = $_POST['timeDrop'];\n\t\t\t\t$email_text_orboth = $_POST['confirmtype'];\n\n\t\t\t\t//DB actions, add to db\n\t\t\t\t$this->model->addAlltoDb($name, $phone, $email, $carrier,\n\t\t\t\t\t\t $timedrop);\n\n\n\t\t\t\n\t\t\t\t// form has been confirmed, send order to employee\n\t\t\t\t//email customer\n\t\t\t\t$this->mail->sendMail($email, $phone, $carrier, $email_text_orboth, $timedrop);\n\t\t\t\t//store customer/order/drink info in db\n\t\t\t\t//echo \"redirecting...\";\n\t\t\t\t$this->view->renderConfirmation();\n\t\t\t\t//$this->view->renderConfirmation(\"view/confirmation.php\");\n\t\t\t\t//echo \"redirected...\";\n\n\t\t\t\t//clear the cart\n\t\t\t\t$this->model->clearCart();\n\t\t\t}\n\t\t}", "public function orderSuccess()\n {\n $service = $this->_getService();\n $isOrderConfActive = $service->getRuleset('orderConfirm');\n if (! $isOrderConfActive) {\n return;\n }\n\n $order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());\n\n $smsbody = $service->replacePlaceholders($order, $isOrderConfActive['temp_body']);\n\n $address = $order->getShippingAddress();\n $mobile = is_object($address) ? trim($address->getTelephone()) : '';\n\n $mobilenumber = $mobile;\n $text = $smsbody;\n $senderid = $isOrderConfActive['senderid'];\n $smslabel = $isOrderConfActive['label'];\n $source = '23000';\n\n $sendSms = Mage::getModel('smsservice/sms');\n $sendSms->setLabel($smslabel);\n $sendSms->setSenderId($senderid);\n $sendSms->setSource($source);\n $sendSms->setNumber($mobilenumber);\n $sendSms->setText($text);\n\n if ($service->send($sendSms)) {\n Mage::log('Order Confirmation : MOBILE : ' . $mobilenumber . ' SENDER ID : ' . $senderid . ' Label : ' . $smslabel . ' SOURCE : ' . $source . ' MESSAGE BODY : ' . $text, null, 'smsservice.log');\n }\n\n $orderedItems = $order->getAllVisibleItems();\n foreach ($orderedItems as $item) {\n $pid = $item->getData('product_id');\n $this->processOutofStock($pid);\n }\n }", "public function confirmUpgradeAction()\n {\n $this->permissionsCheck(true);\n\n $this->view->pageTitle = \"Confirm Upgrade\";\n $this->view->orderId = $this->orderId;\n $this->view->order = $order = $this->orderRepository->getOneById($this->orderId);\n $this->view->instructor = $this->userContext->isInstructor();\n $this->view->is_staff = $this->userContext->getUser()->isStaff();\n\n $warning = $this->_getParam('warning', false);\n if ($warning) {\n $this->view->warningText = $warning;\n }\n\n if ($this->user->isStaff()) {\n $this->view->enableInstantOrderCompletion = true;\n } else {\n $this->view->enableInstantOrderCompletion = false;\n }\n }", "public function confirmPayment($orderUuid);", "public function confirm(Request $request): \\Illuminate\\Http\\JsonResponse\n {\n $invitation = Invitation::where('token', $request['token'])->firstOrFail();\n $updated = (new UpdateInvitation())($invitation);\n if ($updated){\n return $this->successResponse();\n }\n return $this->failResponse();\n }", "public function confirmWorkplan(Request $request)\n {\n $wp = Workplanning::find($request->input('id'));\n if (!$wp) return response('Unknown workplan', 400);\n\n if ($wp->user->id != Auth::user()->id) return response('None of your business', 401);\n\n $val = intval($request->input('confirmation'));\n if ($val < 0 || $val > 1) return response('Bad value', 400);\n\n $reason = $request->input('reason');\n if ($val ==0) {\n if (strlen($reason) < 10) { // reason is too short to be acceptable\n return response('Invalid reason', 400);\n } else {\n $wp->reason = $reason;\n }\n } else {\n $wp->reason = null; // don't keep a reason that is unrelated to the OK status\n }\n\n $wp->confirmation = $val;\n $wp->save();\n\n return response('Ok');\n }", "public function confirmPending($uid)\n {\n try {\n $options = array(\n 'cluster' => env('PUSHER_CLUSTER'),\n 'useTLS' => env('PUSHER_USETLS')\n );\n $pusher = new Pusher(\n env('PUSHER_APP_KEY'),\n env('PUSHER_APP_SECRET'),\n env('PUSHER_APP_ID'),\n $options\n );\n $data['message'] = 'Confirm pending order-'.$uid;\n $pusher->trigger(env('PUSHER_CHANNEL'), env('PUSHER_EVENT'), $data);\n } catch (PusherException $e) {\n }\n\n $deliverys = DeliveryInCart::where('uid', $uid);\n $deliverys->update(['state' => 1]);\n\n $new_orders = $deliverys->get()->toArray();\n $total_price = 0;\n $total_payable = 0;\n $total_tax = 0;\n $total_discount = 0;\n $delivery_price = $new_orders[0]['delivery_price']; \n foreach($new_orders as $new_order)\n {\n $total_price += $new_order['sub_total'];\n $total_discount += $new_order['discount'] * $new_order['product_quantity'];\n $total_tax += $new_order['tax'] * $new_order['product_quantity'];\n }\n $total_tax += $new_orders[0]['delivery_tax'];\n $total_payable = $total_price + $delivery_price + $total_tax - $total_discount;\n\n ////////////////////////In the case of cash payment, add this delivery to transaction automatically///////////////////////////////////////\n\t\t$this->transactionUtil->createTransactionFromDelivery($new_orders, $uid);\n ///////////////////////////////////////////////////////////////\n\n $mail_headers = \"From: \".env('APP_NAME') . \" - \". env('APP_TITLE').\"<\".env('MAIL_FROM_ADDRESS').\">\";\n $subject = 'Alert: Bullet - Delivery Completed';\n\n $message = \"Hi \" . $new_orders[0]['user_name'] . \",\\r\\n\" .\n \"Your order has been delivered to you \\r\\n\" .\n env('APP_NAME') . \" - \". env('APP_TITLE');\n DataHelper::send_mail($new_orders[0]['user_email'], $subject, $message, $mail_headers);\n return back()\n ->with('status', ['success' => 1,\n 'msg' => __('messages.delivery_complete')]);\n }", "public function confirmPayment()\n {\n if(!isset($_REQUEST['checkout'])) {\n throw new \\Exception(\"invalid return url, parameter `checkout` is required\");\n }\n $checkoutId = $_REQUEST['checkout'];\n if (empty($checkoutId)) {\n throw new \\Exception(\"invalid return url, parameter `checkout` is required\");\n }\n\n try {\n $response = $this->pointCheckout->getCheckoutDetails($checkoutId);\n $failed = false;\n if ($response) {\n $response_info = json_decode($response);\n }\n\n $quote = $this->getQuote();\n\n if ($response_info && $response_info->success && $response_info->result->status == 'PAID') {\n $this->_logger->info(\"Order confirmed\");\n $this->orderPaid($response_info, $quote);\n } else if (!$response_info) {\n $this->_logger->info(\"Failed to confirm order : failed to decode response [\" . $response . \"]\");\n $failed = true;\n } else {\n // NOT PAID\n $failed = true;\n }\n\n if ($failed) {\n // see Magento\\Quote\\Model\\Quote::reserveOrderId()\n $quote->setReservedOrderId($this->quoteResourceModel->getReservedOrderId($quote))->save();\n }\n } catch (\\Exception $e) {\n $debugData['http_error'] = ['error' => $e->getMessage(), 'code' => $e->getCode()];\n $this->_logger->info(\"confirm error : \" . $e->getMessage());\n throw $e;\n }\n\n return $response_info;\n }", "public function doconfirm()\n {\n $this->bean->active = 1;\n $this->bean->confirm = 1;\n \\R::store($this->bean);\n }", "public function postDeleteShipmentDetail(Request $request) {\n try {\n //get data from client\n $data = $request->all();\n $data['cre_user_cd'] = \\GetUserInfo::getInfo('user_cd');\n $data['cre_prg_cd'] = '007_provisional-shipment-detail';\n $data['cre_ip'] = \\GetUserInfo::getInfo('user_ip');\n\n //call stored\n $sql = \"SPC_007_PROVISIONAL_SHIPMENT_DETAIL_ACT2\";\n $result = Dao::call_stored_procedure($sql, $data);\n //return result to client\n if (!isset($result[0])) {\n return response()->json(array(\n 'response' => true,\n 'error_cd' => $result[1][0]['error_cd'],\n 'fwd_no' => $result[1][0]['fwd_no'],\n 'inv_no' => $result[1][0]['inv_no'],\n ));\n } else {\n return response()->json(array(\n 'response' => false,\n 'error' => $result[0][0]['Message'],\n 'error_cd' => $result[1][0]['error_cd']\n ));\n }\n } catch(\\Exception $e) {\n return response()->json(array(\n 'response'=> $e->getMessage()\n ));\n }\n }", "public function confirmAction()\n {\n $this->container->get('contao.framework')->initialize();\n\n $controller = new BackendConfirm();\n\n return $controller->run();\n }", "public function destroy($id)\n {\n $shipment = Shipment::findOrFail($id);\n $title = $shipment->title;\n $shipment->delete();\n\n return redirect()->route('shipments.index', [\n 'flash_message' => \"Страница {$title} удаленна\"\n ]);\n }", "public function ship(Request $request, $orderId) {\n $order = Order::findOrFail($orderId);\n\n // Ship order...\n\n Mail::to($request->user())->send(new OrderShipped($order));\n }" ]
[ "0.64252764", "0.6351178", "0.6344722", "0.6301621", "0.6298564", "0.62276304", "0.6186051", "0.6158983", "0.6101016", "0.60774827", "0.6075933", "0.6022746", "0.60042113", "0.59623814", "0.5946913", "0.59380805", "0.5903246", "0.58632344", "0.57873625", "0.57683337", "0.5750665", "0.57466555", "0.57442933", "0.5735646", "0.57067734", "0.57059556", "0.56869733", "0.56705177", "0.56641376", "0.5656632" ]
0.6622207
0
Get the current status of a shipment. This is a combifunction, supporting the following: CurrentStatus (by barcode): Fill the Shipment>Barcode property. Leave the rest empty. CurrentStatusByReference: Fill the Shipment>Reference property. Leave the rest empty.
#[Deprecated] public function getCurrentStatus($currentStatus) { static::triggerDeprecation( 'firstred/postnl-api-php', '1.2.0', 'Use the dedicated methods (get by phase and status are no longer working)' ); if (null !== $currentStatus->getShipment()->getPhaseCode()) { throw new NotSupportedException('Getting the current status by phase code is no longer supported.'); } if (null !== $currentStatus->getShipment()->getStatusCode()) { throw new NotSupportedException('Getting the current status by status code is no longer supported.'); } $fullCustomer = $this->getCustomer(); $currentStatus->setCustomer((new Customer()) ->setCustomerCode($fullCustomer->getCustomerCode()) ->setCustomerNumber($fullCustomer->getCustomerNumber()) ); if (!$currentStatus->getMessage()) { $currentStatus->setMessage(new Message()); } return $this->getShippingStatusService()->currentStatus($currentStatus); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShipmentStatus() \n {\n return $this->_fields['ShipmentStatus']['FieldValue'];\n }", "public function currentStatus()\n {\n $this->update();\n return $this->status( $this->attribute('current_status_id' ) );\n }", "public static function getStatus($shipmentStatus)\n {\n switch ($shipmentStatus) {\n case 'DELIVERED':\n case 'RETURNED_TO_SENDER':\n return self::STATUS_DELIVERED;\n case 'IN_TRANSIT':\n return self::STATUS_IN_TRANSIT;\n case 'READY_TO_PRINT':\n case 'READY_FOR_COLLECTION':\n case 'COMPLETED':\n case 'CARRIER_OK':\n return self::STATUS_READY;\n case 'CARRIER_KO':\n case 'LABELS_KO':\n case 'INTEGRATION_KO':\n case 'PURCHASE_SUCCESS':\n case 'CARRIER_PENDING':\n case 'RETRY':\n return self::STATUS_ACCEPTED;\n case 'CANCELED':\n return self::STATUS_CANCELLED;\n case 'OUT_FOR_DELIVERY':\n return self::OUT_FOR_DELIVERY;\n case 'INCIDENT' :\n return self::INCIDENT;\n case 'AWAITING_COMPLETION':\n case 'READY_TO_PURCHASE':\n default:\n return self::STATUS_PENDING;\n }\n }", "public function getCurrentStatus(){\n \t\treturn $this->nextLvl->status;\n \t}", "public function getShipment()\n {\n return $this->_coreRegistry->registry('current_shipment');\n }", "public function getStatus() {\n\t\tif (!isset($this->_status)) {\n\t\t\treturn $this->_getStatus();\n\t\t} else {\n\t\t\treturn $this->_status;\n\t\t}\n\t}", "public function getShippingStatusByReference($reference, $complete = false)\n {\n if ($complete) {\n $statusRequest = new CompleteStatus((new Shipment())->setReference($reference));\n } else {\n $statusRequest = new CurrentStatus((new Shipment())->setReference($reference));\n }\n\n if (!$statusRequest->getMessage()) {\n $statusRequest->setMessage(new Message());\n }\n\n if ($complete) {\n $shipments = $this->getShippingStatusService()->completeStatus($statusRequest)->getShipments();\n } else {\n $shipments = $this->getShippingStatusService()->currentStatus($statusRequest)->getShipments();\n }\n\n if (empty($shipments) || !is_array($shipments)) {\n throw new ShipmentNotFoundException($reference);\n }\n\n return $shipments[0];\n }", "public function status()\n {\n return $this->status->get($this->entity->status);\n }", "public function status()\n {\n return $this->status->get($this->entity->status);\n }", "public function getStatus()\n {\n return $this->data['status'] ?? null;\n }", "public function getStatus()\n {\n return $this->get(self::STATUS);\n }", "function getStatus() {\n\t\treturn $this->_Status;\n\t}", "function getStatus() {\n\t\treturn $this->_Status;\n\t}", "public function getStatus() {\n return $this->data['status'];\n }", "public function getStatus() {\n return $this->iStatus;\n }", "public function get_Status() {\n return $this->status;\n }", "public function getCurrentStatus()\n {\n return $this->statuses->last();\n }", "public function getStockStatusObj() {\r\n\t\treturn $this->stockStatusObj;\r\n\t}", "function getStatus() {\n\t\treturn $this->getData('status');\t\n\t}", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus() {\n return $this->fetch('status');\n }", "public function fetchStatus()\n {\n if ($this->_orderItem->getParentItem()) {\n return $this->_orderItem->getParentItem()->getStatus();\n } else {\n return $this->_orderItem->getStatus();\n }\n }", "public function setShipmentStatus($value) \n {\n $this->_fields['ShipmentStatus']['FieldValue'] = $value;\n return $this;\n }", "public function getStatus()\n {\n \treturn $this->getLastStatusChange()->getStatus();\n }", "public function getShipmentState()\n {\n return $this->shipmentState;\n }", "public function getStatus()\n {\n return $this->Status;\n }", "public function getStatus()\n {\n return $this->Status;\n }" ]
[ "0.7342534", "0.6860891", "0.64340466", "0.6311972", "0.6276642", "0.6271062", "0.6265809", "0.6201801", "0.6201801", "0.61733395", "0.61573434", "0.61143386", "0.61143386", "0.61015296", "0.608449", "0.60838914", "0.6071042", "0.6069525", "0.6062931", "0.60548055", "0.60548055", "0.60548055", "0.60548055", "0.6054358", "0.6054194", "0.60351866", "0.6033525", "0.60310835", "0.60286915", "0.60286915" ]
0.6932816
1
Get the current status of the given shipment by barcode.
public function getShippingStatusByBarcode($barcode, $complete = false) { if ($complete) { $statusRequest = new CompleteStatus((new Shipment())->setBarcode($barcode)); } else { $statusRequest = new CurrentStatus((new Shipment())->setBarcode($barcode)); } if (!$statusRequest->getMessage()) { $statusRequest->setMessage(new Message()); } if ($complete) { $shipments = $this->getShippingStatusService()->completeStatus($statusRequest)->getShipments(); } else { $shipments = $this->getShippingStatusService()->currentStatus($statusRequest)->getShipments(); } if (empty($shipments) || !is_array($shipments)) { throw new ShipmentNotFoundException($barcode); } return $shipments[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShipmentStatus() \n {\n return $this->_fields['ShipmentStatus']['FieldValue'];\n }", "public function getStatus()\n {\n return $this->get('code');\n }", "protected function getOrderStatusFromProcessor() {\n\t\treturn $this->do_transaction( 'getHostedPaymentStatus' );\n\t}", "public static function getStatus($shipmentStatus)\n {\n switch ($shipmentStatus) {\n case 'DELIVERED':\n case 'RETURNED_TO_SENDER':\n return self::STATUS_DELIVERED;\n case 'IN_TRANSIT':\n return self::STATUS_IN_TRANSIT;\n case 'READY_TO_PRINT':\n case 'READY_FOR_COLLECTION':\n case 'COMPLETED':\n case 'CARRIER_OK':\n return self::STATUS_READY;\n case 'CARRIER_KO':\n case 'LABELS_KO':\n case 'INTEGRATION_KO':\n case 'PURCHASE_SUCCESS':\n case 'CARRIER_PENDING':\n case 'RETRY':\n return self::STATUS_ACCEPTED;\n case 'CANCELED':\n return self::STATUS_CANCELLED;\n case 'OUT_FOR_DELIVERY':\n return self::OUT_FOR_DELIVERY;\n case 'INCIDENT' :\n return self::INCIDENT;\n case 'AWAITING_COMPLETION':\n case 'READY_TO_PURCHASE':\n default:\n return self::STATUS_PENDING;\n }\n }", "function getStatus() {\n\t\treturn $this->getData('status');\t\n\t}", "public function getStatus() {\n return $this->data['status'];\n }", "public function getOrderStatus ($RefNo);", "abstract public function get_status();", "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}", "function getStatus() {\n return $this->getFieldValue('status');\n }", "public function getStatus() {\n return $this->fetch('status');\n }", "public function getStatus()\n {\n return $this->data['status'] ?? null;\n }", "public function test_get_status_by_code()\n {\n $this->assertEquals(OrderStatus::getStatus(0),'PENDING');\n $this->assertEquals(OrderStatus::getStatus(1),'DELIVERING');\n $this->assertEquals(OrderStatus::getStatus(2),'COMPLETED');\n $this->assertEquals(OrderStatus::getStatus(-1),'CANCELLED');\n }", "public function getStatus()\n\t{\n\t\treturn $this->getKeyValue('status'); \n\n\t}", "public function getStatus()\n {\n return $this->segment->get('status', Status::ANON);\n }", "public function getStatusStr() {\n $arr = self::getStatusArr();\n return $arr[$this->status];\n }", "public function getStatus()\n {\n return $this->get(self::STATUS);\n }", "#[Deprecated]\n public function getCurrentStatus($currentStatus)\n {\n static::triggerDeprecation(\n 'firstred/postnl-api-php',\n '1.2.0',\n 'Use the dedicated methods (get by phase and status are no longer working)'\n );\n\n if (null !== $currentStatus->getShipment()->getPhaseCode()) {\n throw new NotSupportedException('Getting the current status by phase code is no longer supported.');\n }\n if (null !== $currentStatus->getShipment()->getStatusCode()) {\n throw new NotSupportedException('Getting the current status by status code is no longer supported.');\n }\n\n $fullCustomer = $this->getCustomer();\n $currentStatus->setCustomer((new Customer())\n ->setCustomerCode($fullCustomer->getCustomerCode())\n ->setCustomerNumber($fullCustomer->getCustomerNumber())\n );\n if (!$currentStatus->getMessage()) {\n $currentStatus->setMessage(new Message());\n }\n\n return $this->getShippingStatusService()->currentStatus($currentStatus);\n }", "public function status() {\n return $this->code;\n }", "public function getStatus() {\n return $this->iStatus;\n }", "public function getStatus(){\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->getField('status');\n\t}", "public function getStatus(): string\n {\n return $this->_data['status'];\n }", "function fn_2lm_bm_transaction_status_info($key = '')\r\n{\r\n $statuses = [\r\n 'PENDING' => __('2lm_bm_transaction_status_pending'),\r\n 'SUCCESS' => __('2lm_bm_transaction_status_success'), // Serwis Partnera otrzyma środki za transakcje - można wydać towar/usługę\r\n 'FAILURE' => __('2lm_bm_transaction_status_failure'),\r\n ];\r\n\r\n return (!empty($key) && array_key_exists($key, $statuses)) ? $statuses[$key] : null;\r\n}", "public function getStatus() {\n return $this->status_codes[$this->getStatusCode()];\n }", "public function get_status()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function get_status()\n {\n return $this->status;\n }", "public function getStatus()\n\t {\n\t\t return $this->status;\n\t }", "public function get_status() {\n\t\treturn $this->status;\n\t}" ]
[ "0.61818045", "0.5872643", "0.5797718", "0.5786664", "0.57782936", "0.5773513", "0.57698876", "0.576691", "0.5687431", "0.565681", "0.5605194", "0.5603513", "0.56025124", "0.55997", "0.5583103", "0.5563867", "0.5559291", "0.554899", "0.554625", "0.55361825", "0.55227005", "0.5521301", "0.55200386", "0.55099577", "0.5508018", "0.5493217", "0.5480059", "0.5475585", "0.54750025", "0.5473895" ]
0.6973221
0
Get the current statuses of the given shipments by barcodes.
public function getShippingStatusesByBarcodes(array $barcodes, $complete = false) { $shipments = []; if ($complete) { $shipmentResponses = $this->getShippingStatusService()->completeStatuses(array_map( function ($barcode) { return (new CompleteStatus())->setShipment((new Shipment())->setBarcode($barcode)); }, $barcodes )); } else { $shipmentResponses = $this->getShippingStatusService()->currentStatuses(array_map( function ($barcode) { return (new CurrentStatus())->setShipment((new Shipment())->setBarcode($barcode)); }, $barcodes )); } foreach ($shipmentResponses as $shipmentResponse) { foreach ($shipmentResponse->getShipments() as $shipment) { $shipments[$shipment->getBarcode()] = $shipment; } } return $shipments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShippingStatusByBarcode($barcode, $complete = false)\n {\n if ($complete) {\n $statusRequest = new CompleteStatus((new Shipment())->setBarcode($barcode));\n } else {\n $statusRequest = new CurrentStatus((new Shipment())->setBarcode($barcode));\n }\n\n if (!$statusRequest->getMessage()) {\n $statusRequest->setMessage(new Message());\n }\n\n if ($complete) {\n $shipments = $this->getShippingStatusService()->completeStatus($statusRequest)->getShipments();\n } else {\n $shipments = $this->getShippingStatusService()->currentStatus($statusRequest)->getShipments();\n }\n\n if (empty($shipments) || !is_array($shipments)) {\n throw new ShipmentNotFoundException($barcode);\n }\n\n return $shipments[0];\n }", "public function getStatuses()\n {\n $statusesArray = array(\n 0 => \"-- Apartment Statuses --\",\n Objects::PRODUCT_STATUS_SANDBOX => \"Sandbox\",\n Objects::PRODUCT_STATUS_REGISTRATION => \"Registration\",\n Objects::PRODUCT_STATUS_REVIEW => \"Review\",\n Objects::PRODUCT_STATUS_SELLING => \"Selling\",\n Objects::PRODUCT_STATUS_LIVEANDSELLIG => \"Live and Selling\",\n Objects::PRODUCT_STATUS_SELLINGNOTSEARCHABLE => \"Selling Not Searchable\",\n Objects::PRODUCT_STATUS_SUSPENDED => \"Suspended\",\n Objects::PRODUCT_STATUS_LIVE_IN_UNIT => \"Live-in Unit\",\n Objects::PRODUCT_STATUS_DISABLED => \"Disabled\"\n );\n\n return $statusesArray;\n }", "public function test_get_status_by_code()\n {\n $this->assertEquals(OrderStatus::getStatus(0),'PENDING');\n $this->assertEquals(OrderStatus::getStatus(1),'DELIVERING');\n $this->assertEquals(OrderStatus::getStatus(2),'COMPLETED');\n $this->assertEquals(OrderStatus::getStatus(-1),'CANCELLED');\n }", "public function getStatuses() {\n $hiddenStatuses = [Reports::ALERT, Reports::CALLED_PH, Reports::SENT, Reports::INSPECTION_COMPLETED,\n Reports::PRE_INVOICE, Reports::INVOICED];\n $statuses = WorkorderStatuses::whereNotIn('id', $hiddenStatuses)\n ->orderBy('display_order')\n ->get();\n return response()->json(compact('statuses'));\n }", "public function getStatuses(){\n \treturn $this->statusesController->getAllStatuses();\n }", "public function listStatuses();", "public function getStatuses()\n {\n $statusesArray = array(\n 0 => \"-- All Statuses --\",\n Objects::PRODUCT_STATUS_SANDBOX => \"Sandbox\",\n Objects::PRODUCT_STATUS_REGISTRATION => \"Registration\",\n Objects::PRODUCT_STATUS_REVIEW => \"Review\",\n Objects::PRODUCT_STATUS_SELLING => \"Selling\",\n Objects::PRODUCT_STATUS_LIVEANDSELLIG => \"Live and Selling\",\n Objects::PRODUCT_STATUS_SELLINGNOTSEARCHABLE => \"Selling Not Searchable\",\n Objects::PRODUCT_STATUS_SUSPENDED => \"Suspended\",\n Objects::PRODUCT_STATUS_LIVE_IN_UNIT => \"Live-in Unit\",\n Objects::PRODUCT_STATUS_DISABLED => \"Disabled\"\n );\n\n return $statusesArray;\n }", "private function _get_closed_statuses(){\r\n $inbounds = $this->Contact->query(\"SELECT * FROM lead_statuses WHERE header in ( 'Dead Lead (Closed)', 'Sold FollowUp In (Closed)','Sold FollowUp Out (Closed)','Sold Pick-Up (Closed)' ) \");\r\n $statuses = array();\r\n foreach($inbounds as $inbound){\r\n if($inbound['lead_statuses']['name'] == 'Duplicate-Closed'){\r\n continue;\r\n }\r\n $statuses[] = $inbound['lead_statuses']['name'];\r\n }\r\n return $statuses;\r\n }", "public static function statuses()\n\t{\n\t\treturn [\n\t\t\tself::ACTIVE_STATUS => self::ACTIVE_STATUS,\n\t\t\tself::INACTIVE_STATUS => self::INACTIVE_STATUS,\n\t\t\tself::ARCHIVED_STATUS => self::ARCHIVED_STATUS,\n\t\t\tself::COMING_SOON_STATUS => self::COMING_SOON_STATUS,\n\t\t\tself::SOLD_OUT_STATUS => self::SOLD_OUT_STATUS,\n\t\t];\n\t}", "public function getStatusList()\n {\n $statuses = Shop::getStatusesLabels();\n //not show status Failed at form\n unset($statuses[Shop::STATUS_FAILED]);\n unset($statuses[Shop::STATUS_INDEXING]);\n //if products has NOT already imported for shop...\n if ($this->model && !$this->model->getShopProducts()->exists()) {\n //remove status for shop with products\n unset($statuses[Shop::STATUS_INDEXED]);\n } else {\n //remove status for shop with products\n unset($statuses[Shop::STATUS_NEW]);\n }\n //return stuses are avaialbel for form\n return $statuses;\n }", "public function getStatuses()\n {\n return $this->statuses;\n }", "function ciniki_wineproduction_statusMaps($ciniki) {\n \n $status_maps = array(\n '10'=>'Ordered',\n '20'=>'Started',\n '25'=>'SG Ready',\n '30'=>'Racked',\n '40'=>'Filtered',\n '50'=>'Shared',\n '60'=>'Bottled',\n '100'=>'Removed',\n );\n \n return array('stat'=>'ok', 'maps'=>$status_maps);\n}", "public function getStatuses()\n {\n \n if (isset($this->xml->StatusData) === true) {\n $this->setStatus();\n }\n \n return $this->statuses;\n }", "public static function get_statuses() {\n return array(\n self::PENDING,\n self::PROCESSING,\n self::READY,\n self::COMPLETED,\n self::ONHOLD,\n self::CANCELLED,\n self::REFUNDED\n );\n }", "public function getStatus() {\n return $this->status_codes[$this->getStatusCode()];\n }", "function get_bus_by_running_status($running_satus)\n {\n return $this->db->get_where('Bus',array('bus_running_satus'=>$running_satus))->result_array();\n }", "public static function availableStatuses()\n\t{\n\t\treturn [\n\t\t\tself::ACTIVE_STATUS => self::ACTIVE_STATUS,\n\t\t\tself::COMING_SOON_STATUS => self::COMING_SOON_STATUS,\n\t\t\tself::SOLD_OUT_STATUS => self::SOLD_OUT_STATUS,\n\t\t];\n\t}", "public static function retrieveStatuses() {\n\t\treturn array(\n\t\t\t\tself::FLOW_STATUS_ACTIVE => 'Active',\n\t\t\t\tself::FLOW_STATUS_INACTIVE => 'Inactive',\n\t\t\t\tself::FLOW_STATUS_DELETED => 'Deleted'\n\t\t);\n\t}", "public function getShipmentsStatusChanges($data = array()) {\n $dom = $this->createRequestDom('getShipmentsStatusChangeRequest', true, '1045');\n $root = $dom->documentElement;\n if (isset($data['lastRequestDatetime'])) {\n $filters = $dom->createElement('filters');\n $filters->appendChild($dom->createElement('lastRequestDatetime', $this->convertDateFromMagento($data['lastRequestDatetime'])));\n $root->appendChild($filters);\n }\n $xml = $dom->saveXML();\n $response = $this->toSimpleXMLElement($this->send('getShipmentsStatusChange', $xml));\n if (isset($response->errors)) {\n throw new Exception('The response XML structure is wrong');\n }\n $results = array();\n if (isset($response->shipments) && isset($response->shipments->shipment)) {\n foreach ($response->shipments->shipment as $shipment) {\n if (isset($shipment->externalOrderId) && isset($shipment->statusHistory) && isset($shipment->statusHistory->status)) {\n $order_id = (string) $shipment->externalOrderId;\n $results[$order_id] = array();\n foreach ($shipment->statusHistory->status as $status) {\n if (isset($status->statusId) && isset($status->statusChangeId) && isset($status->statusChangedDatetime)) {\n $status_change = array(\n 'status_id' => (int) $status->statusId,\n 'status_change_id' => (int) $status->statusChangeId,\n 'datetime' => $this->convertDateToMagento((string) $status->statusChangedDatetime)\n );\n if (!empty($status->subStatusId)) {\n $status_change['substatus_id'] = (int) $status->subStatusId;\n }\n $results[$order_id][$status_change['status_change_id']] = $status_change;\n }\n }\n }\n }\n }\n return $results;\n }", "public static function selectStatuses(){\n\n // establishes the DB connection.\n $pdo = DbConnect::getConnection();\n \n $list = [];\n\n // builds the query string.\n $sql = \"SELECT ass_req_status_id, ass_req_status_name FROM assistance_request_status WHERE 1\";\n\n // prepares the query.\n $stmt = $pdo->prepare($sql);\n\n // executes the query.\n if ($stmt->execute()) {\n\n // set result to be an associative array.\n $rs = $stmt->setFetchMode(PDO::FETCH_ASSOC); \n\n // returns records as associative array.\n $data = $stmt->fetchAll();\n \n // if records found, return an associative array, otherwise return an empty array.\n if (count($data) > 0) {\n foreach ($data as $k => $v) {\n $list[$v[\"ass_req_status_id\"]] = $v[\"ass_req_status_name\"];\n }\n }\n }\n\n return $list;\n }", "public function getShipments() {\n\t\t$results = Shipment::where('company_id', Auth::user()->company_id)->get();\n\t\treturn json_decode(json_encode($results), true);\n\t}", "public function get_mapped_status($status)\r\n\t{\r\n\t\tif ($status == self::SHIPPING_STATUS_NO_STATUS)\r\n\t\t{\r\n\t\t\treturn 99999;\r\n\t\t}\r\n\t\telseif (($status == self::SHIPPING_STATUS_NEW)\r\n\t\t\t|| ($status == self::SHIPPING_STATUS_COUIER_WAITING_FOR_ITEMS))\r\n\t\t{\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telseif ($status == self::SHIPPING_STATUS_IN_WAREHOUSE)\r\n\t\t{\r\n\t\t\treturn 2;\r\n\t\t}\r\n\t\telseif ($status == self::SHIPPING_STATUS_PACKED_FOR_SHIPPING)\r\n\t\t{\r\n\t\t\treturn 3;\r\n\t\t}\r\n\t\telseif ($status == self::SHIPPING_STATUS_SHIPPED_FROM_COURIER)\r\n\t\t{\r\n\t\t\treturn 4;\r\n\t\t}\r\n\t\telseif ($status == self::SHIPPING_STATUS_SHIPPED_TO_RUSSIA)\r\n\t\t{\r\n\t\t\treturn 5;\r\n\t\t}\r\n\t\telseif ($status == self::SHIPPING_STATUS_SHIPPED_TO_CUSTOMER)\r\n\t\t{\r\n\t\t\treturn 7;\r\n\t\t}\r\n\t\telseif ($status == self::SHIPPING_STATUS_LOST)\r\n\t\t{\r\n\t\t\treturn 99998;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn 99997;\r\n\t}", "function fn_2lm_bm_get_bluemedia_payment_statuses_details($status)\r\n{\r\n $statuses = [\r\n // Statusy ogólne (niezależne od Kanału Płatności)\r\n 'AUTHORIZED' => 'transakcja zautoryzowana przez Kanał Płatności',\r\n 'ACCEPTED' => 'transakcja zatwierdzona przez Call Center (np. w wyniku pozytywnie rozpatrzonej reklamacji)',\r\n 'REJECTED' => 'transakcja przerwana przez Kanał Płatności (bank/agenta rozliczeniowego)',\r\n 'REJECTED_BY_USER' => 'transakcja przerwana przez Klienta',\r\n 'INCORRECT_AMOUNT' => 'zautoryzowana kwota różna od kwoty podanej przy starcie transakcji',\r\n 'EXPIRED' => 'transakcja przeterminowana',\r\n 'CANCELLED' => 'transakcja anulowana przez Serwis Partnera lub Call Center (np. na prośbę Klienta)',\r\n 'RECURSION_INACTIVE' => 'błąd aktywności płatności cyklicznej',\r\n 'ANOTHER_ERROR' => 'wystąpił inny błąd przy przetwarzaniu transakcji',\r\n // Statusy kartowe (specyficzne dla płatności kartowych);\r\n 'CONNECTION_ERROR' => 'błąd z połączeniem do banku wystawcy karty płatniczej',\r\n 'CARD_LIMIT_EXCEEDED' => 'błąd limitów na karcie płatniczej',\r\n 'SECURITY_ERROR' => 'błąd bezpieczeństwa (np. nieprawidłowy cvv)',\r\n 'DO_NOT_HONOR' => 'odmowa autoryzacji w banku; sugerowany kontakt klienta z wystawcą karty',\r\n 'CARD_EXPIRED' => 'karta nieważna',\r\n 'INCORRECT_CARD_NUMBER' => 'nieprawidłowy numer karty',\r\n 'FRAUD_SUSPECT' => 'podejrzenie fraudu (np. zagubiona karta itp)',\r\n 'STOP_RECURRING' => 'rekurencja niemożliwa z powodu anulowania dyspozycji klienta',\r\n 'VOID' => 'transakcja nieudana w systemie 3DS lub błąd komunikacyjny',\r\n 'UNCLASSIFIED' => 'błąd nieopisany',\r\n ];\r\n\r\n return isset($statuses[$status]) ? $statuses[$status] : $status;\r\n}", "public function performStatusesLookup()\n {\n return $this->performRequest(self::API_FETCH_URL . 'statuses/lookup.json');\n }", "public static function getStatusList() \n {\n return [\n self::STATUS_INSCRIT=> 'INSCRIT(E)',\n self::STATUS_ACTIF => 'ACTIF(VE)',\n self::STATUS_ADMIS => 'ADMIS(E)',\n self::STATUS_TERMINE => 'TERMINE(E)',\n self::STATUS_EXPULSE => 'EXPULSE(E)'\n ];\n }", "public function getAllStatuses(){\n $sql_select = \"SELECT os.* from order_status as os \"; \n\n $select_query = $this->db->query($sql_select);\n $statuses = $select_query->result_array();\n\n if($statuses) {\n return $statuses;\n }\n else {\n return 0;\n }\n }", "public function getStatuses(): array\n {\n $nodes = $this->get('//epp:epp/epp:response/epp:resData/domain:infData/domain:status');\n\n return array_map(static fn (\\DOMNode $node): string => $node->getAttribute('s'), iterator_to_array($nodes));\n }", "public function getBarcodesByEntries($barcs) {\n\treturn Model::getInstance()->getBarcodesByEntries($barcs);\n}", "public function getStatuses()\n\t{\n\t\t$statuses = array(\n\t\t\t'' => 'None/Unknown',\n\t\t\t'Spec' => 'To be specified',\n\t\t\t'Devel' => 'To be developed',\n\t\t\t'Test' => 'Ready for test',\n\t\t\t'Done' => 'Completed',\n\t\t\t'Reject' => 'Rejected',\n\t\t);\n\t\treturn $statuses;\n\t}", "public function getStatuses()\n\t{\n\t\treturn $this->component->getStatuses();\n\t}" ]
[ "0.61175084", "0.5696565", "0.5689579", "0.56789637", "0.55713373", "0.5459937", "0.545105", "0.54295635", "0.54185426", "0.54033697", "0.5397167", "0.5388567", "0.5385318", "0.53736144", "0.5318428", "0.5287212", "0.5282347", "0.52701277", "0.5267919", "0.526241", "0.5254924", "0.5217903", "0.5216007", "0.52155924", "0.5199427", "0.5181622", "0.515398", "0.51500076", "0.51366246", "0.51204234" ]
0.7140831
0
Get the current status of the given shipment by reference.
public function getShippingStatusByReference($reference, $complete = false) { if ($complete) { $statusRequest = new CompleteStatus((new Shipment())->setReference($reference)); } else { $statusRequest = new CurrentStatus((new Shipment())->setReference($reference)); } if (!$statusRequest->getMessage()) { $statusRequest->setMessage(new Message()); } if ($complete) { $shipments = $this->getShippingStatusService()->completeStatus($statusRequest)->getShipments(); } else { $shipments = $this->getShippingStatusService()->currentStatus($statusRequest)->getShipments(); } if (empty($shipments) || !is_array($shipments)) { throw new ShipmentNotFoundException($reference); } return $shipments[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShipmentStatus() \n {\n return $this->_fields['ShipmentStatus']['FieldValue'];\n }", "public function getOrderStatus ($RefNo);", "public function getShipment()\n {\n return $this->_coreRegistry->registry('current_shipment');\n }", "public function currentStatus()\n {\n $this->update();\n return $this->status( $this->attribute('current_status_id' ) );\n }", "public static function getStatus($shipmentStatus)\n {\n switch ($shipmentStatus) {\n case 'DELIVERED':\n case 'RETURNED_TO_SENDER':\n return self::STATUS_DELIVERED;\n case 'IN_TRANSIT':\n return self::STATUS_IN_TRANSIT;\n case 'READY_TO_PRINT':\n case 'READY_FOR_COLLECTION':\n case 'COMPLETED':\n case 'CARRIER_OK':\n return self::STATUS_READY;\n case 'CARRIER_KO':\n case 'LABELS_KO':\n case 'INTEGRATION_KO':\n case 'PURCHASE_SUCCESS':\n case 'CARRIER_PENDING':\n case 'RETRY':\n return self::STATUS_ACCEPTED;\n case 'CANCELED':\n return self::STATUS_CANCELLED;\n case 'OUT_FOR_DELIVERY':\n return self::OUT_FOR_DELIVERY;\n case 'INCIDENT' :\n return self::INCIDENT;\n case 'AWAITING_COMPLETION':\n case 'READY_TO_PURCHASE':\n default:\n return self::STATUS_PENDING;\n }\n }", "public function getStatus() {\n\t\tif (!isset($this->_status)) {\n\t\t\treturn $this->_getStatus();\n\t\t} else {\n\t\t\treturn $this->_status;\n\t\t}\n\t}", "public function status()\n {\n return $this->status->get($this->entity->status);\n }", "public function status()\n {\n return $this->status->get($this->entity->status);\n }", "public function fetchStatus()\n {\n if ($this->_orderItem->getParentItem()) {\n return $this->_orderItem->getParentItem()->getStatus();\n } else {\n return $this->_orderItem->getStatus();\n }\n }", "public function get_status()\n {\n return $this->status;\n }", "public function getStatusByReference($reference)\r\n {\r\n\r\n return $this->getStatus('sms/reference/' . $reference);\r\n\r\n }", "public function getCurrentStatus(){\n \t\treturn $this->nextLvl->status;\n \t}", "public function getShipment()\n {\n return Mage::registry('current_shipment');\n }", "public function getShipment()\n {\n return Mage::registry('current_shipment');\n }", "public function getShipmentStatusText()\n {\n return $this->_status->getOptionLabel($this->getShipment()->getStatus());\n }", "public function getStatus()\n {\n \treturn $this->getLastStatusChange()->getStatus();\n }", "public function get_status() {\n\t\treturn $this->status;\n\t}", "public function get_status()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->get(self::STATUS);\n }", "#[Deprecated]\n public function getCurrentStatus($currentStatus)\n {\n static::triggerDeprecation(\n 'firstred/postnl-api-php',\n '1.2.0',\n 'Use the dedicated methods (get by phase and status are no longer working)'\n );\n\n if (null !== $currentStatus->getShipment()->getPhaseCode()) {\n throw new NotSupportedException('Getting the current status by phase code is no longer supported.');\n }\n if (null !== $currentStatus->getShipment()->getStatusCode()) {\n throw new NotSupportedException('Getting the current status by status code is no longer supported.');\n }\n\n $fullCustomer = $this->getCustomer();\n $currentStatus->setCustomer((new Customer())\n ->setCustomerCode($fullCustomer->getCustomerCode())\n ->setCustomerNumber($fullCustomer->getCustomerNumber())\n );\n if (!$currentStatus->getMessage()) {\n $currentStatus->setMessage(new Message());\n }\n\n return $this->getShippingStatusService()->currentStatus($currentStatus);\n }", "public function get_Status() {\n return $this->status;\n }", "function getStatus() {\n\t\treturn $this->_Status;\n\t}", "function getStatus() {\n\t\treturn $this->_Status;\n\t}", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function get_status()\n {\n // loads the associated object\n if (empty($this->status))\n $this->status = new Status($this->status_id);\n \n // returns the associated object\n return $this->status;\n }", "public function getStatus() {\n return $this->iStatus;\n }", "function getStatus() {\n\t\treturn $this->getData('status');\t\n\t}" ]
[ "0.7250493", "0.6529964", "0.64258385", "0.6293276", "0.6236986", "0.6173323", "0.61592215", "0.61592215", "0.6154546", "0.6124061", "0.6109338", "0.61047065", "0.60949177", "0.60949177", "0.60851145", "0.60742915", "0.6070611", "0.6066912", "0.60645616", "0.6047918", "0.60451466", "0.60438836", "0.60438836", "0.6038354", "0.6038354", "0.6038354", "0.6038354", "0.60349685", "0.603476", "0.60293126" ]
0.6785175
1
Get the current statuses of the given shipments by references.
public function getShippingStatusesByReferences(array $references, $complete = false) { $shipments = []; if ($complete) { $shipmentResponses = $this->getShippingStatusService()->completeStatuses(array_map( function ($reference) { return (new CompleteStatus())->setShipment((new Shipment())->setReference($reference)); }, $references )); } else { $shipmentResponses = $this->getShippingStatusService()->currentStatuses(array_map( function ($reference) { return (new CurrentStatus())->setShipment((new Shipment())->setReference($reference)); }, $references )); } foreach ($shipmentResponses as $shipmentResponse) { foreach ($shipmentResponse->getShipments() as $shipment) { $shipments[$shipment->getReference()] = $shipment; } } return $shipments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShippingStatusByReference($reference, $complete = false)\n {\n if ($complete) {\n $statusRequest = new CompleteStatus((new Shipment())->setReference($reference));\n } else {\n $statusRequest = new CurrentStatus((new Shipment())->setReference($reference));\n }\n\n if (!$statusRequest->getMessage()) {\n $statusRequest->setMessage(new Message());\n }\n\n if ($complete) {\n $shipments = $this->getShippingStatusService()->completeStatus($statusRequest)->getShipments();\n } else {\n $shipments = $this->getShippingStatusService()->currentStatus($statusRequest)->getShipments();\n }\n\n if (empty($shipments) || !is_array($shipments)) {\n throw new ShipmentNotFoundException($reference);\n }\n\n return $shipments[0];\n }", "public function getShipments()\n {\n $body = file_get_contents(__DIR__\n . '/Mocks/ncshipments-response-success.xml');\n $mock = new MockHandler([\n new Response(200, [], $body),\n ]);\n $handler = HandlerStack::create($mock);\n $shipments = $this->shipmentService->getShipments(\n '201808282359',\n '201808282359',\n '',\n ['handler' => $handler]\n );\n\n // Check response.\n $this->assertTrue(is_array($shipments['non-contract-shipments']));\n\n // Test the shipments.\n $links = $shipments['non-contract-shipments']['link'];\n\n $this->assertEquals('https://ct.soa-gw.canadapost.ca/rs/0007023211/ncshipment/406951321983787234',\n $links[0]['@attributes']['href']);\n\n $this->assertEquals('https://ct.soa-gw.canadapost.ca/rs/0007023211/ncshipment/406951321983787352',\n $links[1]['@attributes']['href']);\n\n $this->assertEquals('https://ct.soa-gw.canadapost.ca/rs/0007023211/ncshipment/406951321983787123',\n $links[2]['@attributes']['href']);\n }", "public function getOrderStatus ($RefNo);", "public function getShipments() {\n\t\t$results = Shipment::where('company_id', Auth::user()->company_id)->get();\n\t\treturn json_decode(json_encode($results), true);\n\t}", "public function getShipmentsStatusChanges($data = array()) {\n $dom = $this->createRequestDom('getShipmentsStatusChangeRequest', true, '1045');\n $root = $dom->documentElement;\n if (isset($data['lastRequestDatetime'])) {\n $filters = $dom->createElement('filters');\n $filters->appendChild($dom->createElement('lastRequestDatetime', $this->convertDateFromMagento($data['lastRequestDatetime'])));\n $root->appendChild($filters);\n }\n $xml = $dom->saveXML();\n $response = $this->toSimpleXMLElement($this->send('getShipmentsStatusChange', $xml));\n if (isset($response->errors)) {\n throw new Exception('The response XML structure is wrong');\n }\n $results = array();\n if (isset($response->shipments) && isset($response->shipments->shipment)) {\n foreach ($response->shipments->shipment as $shipment) {\n if (isset($shipment->externalOrderId) && isset($shipment->statusHistory) && isset($shipment->statusHistory->status)) {\n $order_id = (string) $shipment->externalOrderId;\n $results[$order_id] = array();\n foreach ($shipment->statusHistory->status as $status) {\n if (isset($status->statusId) && isset($status->statusChangeId) && isset($status->statusChangedDatetime)) {\n $status_change = array(\n 'status_id' => (int) $status->statusId,\n 'status_change_id' => (int) $status->statusChangeId,\n 'datetime' => $this->convertDateToMagento((string) $status->statusChangedDatetime)\n );\n if (!empty($status->subStatusId)) {\n $status_change['substatus_id'] = (int) $status->subStatusId;\n }\n $results[$order_id][$status_change['status_change_id']] = $status_change;\n }\n }\n }\n }\n }\n return $results;\n }", "public function getShipmentStatus() \n {\n return $this->_fields['ShipmentStatus']['FieldValue'];\n }", "public function getStatusByReference($reference)\r\n {\r\n\r\n return $this->getStatus('sms/reference/' . $reference);\r\n\r\n }", "public function getStatuses() {\n $hiddenStatuses = [Reports::ALERT, Reports::CALLED_PH, Reports::SENT, Reports::INSPECTION_COMPLETED,\n Reports::PRE_INVOICE, Reports::INVOICED];\n $statuses = WorkorderStatuses::whereNotIn('id', $hiddenStatuses)\n ->orderBy('display_order')\n ->get();\n return response()->json(compact('statuses'));\n }", "public function getStatuses()\n\t{\n\t\treturn $this->component->getStatuses();\n\t}", "public function getStatuses()\n {\n return $this->statuses;\n }", "public function getStatuses(){\n \treturn $this->statusesController->getAllStatuses();\n }", "public function performStatusesLookup()\n {\n return $this->performRequest(self::API_FETCH_URL . 'statuses/lookup.json');\n }", "public function getStatuses($type = 'link.status'){\n\t\t$statuses = Lookup::where('lookup.type', $type)->get();\n\t\treturn $statuses;\n\t}", "public static function getOrdersByStatus($id_shop, $dateReference, $timezones, $nbDays, $idStatus, $justCount = false) {\r\n if (class_exists('ShopymindClient_CallbackOverride', false) && method_exists('ShopymindClient_CallbackOverride', __FUNCTION__))\r\n return call_user_func_array(array (\r\n 'ShopymindClient_CallbackOverride',\r\n __FUNCTION__\r\n ), func_get_args());\r\n $return = array ();\r\n $tablePrefix = Mage::getConfig()->getTablePrefix();\r\n $resource = Mage::getSingleton('core/resource');\r\n $readConnection = $resource->getConnection('core_read');\r\n $scope = SPM_ShopyMind_Model_Scope::fromShopymindId($id_shop);\r\n\r\n $timezonesWhere = self::generateTimezonesWhere($timezones, 'order_address', 'country_id');\r\n if (! $timezonesWhere)\r\n return false;\r\n $query = '\r\n SELECT\r\n `order_primary`.`store_id`,\r\n `order_primary`.`entity_id`,\r\n `order_primary`.`order_currency_code`,\r\n `order_primary`.`base_grand_total`,\r\n `order_primary`.`customer_id`,\r\n `order_primary`.`created_at`,\r\n `order_primary`.`customer_email`,\r\n `order_primary`.`quote_id`\r\n FROM `' . $tablePrefix . 'sales_flat_order` AS `order_primary`\r\n LEFT JOIN `' . $tablePrefix . 'sales_flat_order` AS `order_last` ON (\r\n (\r\n (\r\n `order_last`.`customer_id` IS NOT NULL\r\n AND `order_last`.`customer_id` = `order_primary`.`customer_id`\r\n )\r\n OR (\r\n (`order_last`.`customer_id` IS NULL OR `order_last`.`customer_id` = 0)\r\n AND `order_last`.`customer_email` = `order_primary`.`customer_email`\r\n )\r\n )\r\n AND `order_last`.`created_at` > `order_primary`.`created_at`\r\n )\r\n LEFT JOIN `' . $tablePrefix . 'sales_flat_order_status_history` AS `order_status` ON (\r\n `order_status`.`status` = `order_primary`.`status`\r\n AND `order_status`.`parent_id` = `order_primary`.`entity_id`\r\n )\r\n LEFT JOIN `' . $tablePrefix . 'sales_flat_order_address` AS `order_address` ON (\r\n `order_address`.`parent_id` = `order_primary`.`entity_id`\r\n ) AND (`order_address`.`address_type` = \"billing\")\r\n LEFT JOIN `' . $tablePrefix . 'directory_country_region` AS `customer_default_billing_state` ON (\r\n `customer_default_billing_state`.`region_id` = `order_address`.`region_id`\r\n )\r\n WHERE `order_primary`.status = \"' . $idStatus . '\"\r\n AND DATE_FORMAT(`order_primary`.`created_at`,\"%Y-%m-%d\") >= DATE_FORMAT(DATE_SUB(\"' . $dateReference . '\", INTERVAL ' . ($nbDays + 14) . ' DAY),\"%Y-%m-%d\")\r\n AND DATE_FORMAT(`order_status`.`created_at`,\"%Y-%m-%d\") = DATE_FORMAT(DATE_SUB(\"' . $dateReference . '\", INTERVAL ' . ($nbDays) . ' DAY),\"%Y-%m-%d\")\r\n AND ' . $timezonesWhere . '\r\n AND `order_last`.`entity_id` IS NULL\r\n AND `order_primary`.`store_id` IN (\"' . implode('\",\"', $scope->storeIds()) . '\")\r\n GROUP BY `order_primary`.`customer_email`';\r\n\r\n $results = $readConnection->fetchAll($query);\r\n\r\n if ($results && is_array($results) && sizeof($results)) {\r\n foreach ( $results as $row ) {\r\n self::startLangEmulationByStoreId($row ['store_id']);\r\n $orderedProducts = self::productsOfCart($row['quote_id']);\r\n $shippingNumbers = self::getShippingNumbersForOrderId($row['entity_id']);\r\n\r\n if (sizeof($orderedProducts)) {\r\n $return [] = array(\r\n 'currency' => $row ['order_currency_code'],\r\n 'total_amount' => $row ['base_grand_total'],\r\n 'articles' => $orderedProducts,\r\n 'date_order' => $row['created_at'],\r\n 'id_order' => $row ['entity_id'],\r\n 'customer' => self::getUser(($row ['customer_id'] ? $row ['customer_id'] : $row ['customer_email'])),\r\n 'shipping_number' => $shippingNumbers,\r\n );\r\n }\r\n\r\n self::stopLangEmulation();\r\n }\r\n }\r\n return ($justCount ? array (\r\n 'count' => sizeof($return)\r\n ) : $return);\r\n }", "public function shipments()\n {\n $shipments = DB::select()\n ->from('orders_ordershipments')\n ->where('order_id', '=', $this->id)\n ->order_by('created', 'DESC')\n ->execute()\n ->as_array();\n if (!$shipments)\n {\n return $shipments;\n }\n\n // get items information for each shipment record\n foreach ($shipments as &$shipment)\n {\n $shipment['items'] = DB::select()\n ->from('orders_ordershipmentitems')\n ->where('shipment_id', '=', $shipment['id'])\n ->execute()\n ->as_array();\n }\n\n return $shipments;\n }", "public function getStatuses()\n {\n \n if (isset($this->xml->StatusData) === true) {\n $this->setStatus();\n }\n \n return $this->statuses;\n }", "public function listStatuses();", "public function getListByStatus($status, $relations = null);", "public function getShippingRefunded();", "public function getShipmentCharges() {\n\t\t$rated_shipment = $this->xpath->query(\n\t\t\tself::NODE_NAME_RATED_SHIPMENT, $this->root_node)->item(0);\n\t\t\n\t\t$return_value = array(\n\t\t\t'currency_code' => $this->xpath->query(\n\t\t\t\t'TotalCharges/CurrencyCode',\n\t\t\t\t$rated_shipment)->item(0)->nodeValue,\n\t\t\t'transportation' => $this->xpath->query(\n\t\t\t\t'TransportationCharges/'.self::NODE_NAME_MONETARY_VALUE,\n\t\t\t\t$rated_shipment)->item(0)->nodeValue,\n\t\t\t'service_options' => $this->xpath->query(\n\t\t\t\t'ServiceOptionsCharges/'.self::NODE_NAME_MONETARY_VALUE,\n\t\t\t\t$rated_shipment)->item(0)->nodeValue,\n\t\t\t'total' => $this->xpath->query(\n\t\t\t\t'TotalCharges/'.self::NODE_NAME_MONETARY_VALUE,\n\t\t\t\t$rated_shipment)->item(0)->nodeValue,\n\t\t); // end $return_value\n\t\t\n\t\treturn $return_value;\n\t}", "function Any_Lines_On_A_Shipment(){\n\t\tif (count($this->LineItems)>0){\n\t\t foreach ($this->LineItems as $OrderedItems) {\n\t\t\tif ($OrderedItems->ShiptRef !=''){\n\t\t\t\treturn $OrderedItems->ShiptRef;\n\t\t\t}\n\t\t }\n\t\t}\n\t\treturn 0;\n\t}", "public function getShipToLocations()\n {\n return $this->shipToLocations;\n }", "public function getShipment()\n {\n $getShipmentBody = file_get_contents(__DIR__\n . '/Mocks/shipment-response-success.xml');\n $getDetailsBody = file_get_contents(__DIR__\n . '/Mocks/shipment-details-success.xml');\n $getReceiptBody = file_get_contents(__DIR__\n . '/Mocks/shipment-receipt-success.xml');\n $mock = new MockHandler([\n new Response(200, [], $getShipmentBody),\n new Response(200, [], $getDetailsBody),\n new Response(200, [], $getReceiptBody),\n ]);\n $handler = HandlerStack::create($mock);\n $shipment = $this->shipmentService->getShipment('0123456789', '', ['handler' => $handler]);\n $details = $this->shipmentService->getShipment('0123456789', '', ['handler' => $handler]);\n $receipt = $this->shipmentService->getShipment('0123456789', '', ['handler' => $handler]);\n\n $this->checkShippingResponse($shipment);\n $this->checkShippingDetails($details);\n $this->checkShippingReceipt($receipt);\n }", "public function getContractActive($idShip = null, $idContract = [])\n {\n // Query get contract\n $contract = DB::table('m_contract')\n ->join('m_ship', function($join) {\n $join->on('m_ship.id', '=', 'm_contract.ship_id')\n ->where('m_ship.del_flag', Constant::DELETE_FLAG_FALSE);\n })\n ->join('m_service', function($join) {\n $join->on('m_service.id', '=', 'm_contract.service_id')\n ->where('m_service.del_flag', Constant::DELETE_FLAG_FALSE);\n })\n ->select([\n \"m_contract.id as contract_id\",\n \"m_contract.revision_number as contract_revision_number\",\n \"m_contract.start_date as contract_date_start\",\n \"m_contract.end_date as contract_date_end\",\n \"m_contract.status as contract_status\",\n \"m_contract.approved_flag as contract_approved_flag\",\n \"m_contract.reason_reject as contract_reason_reject\",\n \"m_contract.created_at as contract_created_at\",\n \"m_contract.updated_at as contract_updated_at\",\n \"m_contract.approved_flag as contract_approved_flag\",\n \"m_contract.start_pending_date as contract_start_pending_date\",\n \"m_contract.end_pending_date as contract_end_pending_date\",\n \"m_contract.remark as contract_remark\",\n \"m_service.id as service_id\",\n \"m_service.name_jp as service_name\",\n \"m_service.del_flag as contract_del_flag\",\n \"m_ship.id as contract_ship_id\"\n ])\n ->whereIn('approved_flag', [Constant::STATUS_APPROVED, Constant::STATUS_WAITING_APPROVE, Constant::STATUS_REJECT_APPROVE])\n ->whereIn('status', [Constant::STATUS_CONTRACT_ACTIVE, Constant::STATUS_CONTRACT_PENDING]);\n\n // Check if get all contract inside all ship\n if (empty($idShip) || is_null($idShip)) {\n if (!empty($idContract) && !is_null($idContract)) {\n return $contract\n ->whereIn('m_contract.id', $idContract)\n ->get();\n }\n\n return $contract->get();\n }\n\n // If get contract inside a ship\n if (!empty($idContract) && !is_null($idContract)) {\n return $contract\n ->whereIn('m_contract.id', $idContract)\n ->where('m_ship.id', $idShip)\n ->get();\n }\n\n return $contract\n ->where('m_ship.id', $idShip)\n ->get();\n }", "public function showShipmentsStatus()\n\t{\n\t\tGate::authorize('admin||manager||employee');\n\n//\t\tvar_dump($userCategoryId);\n\n\t\tif(auth()->user()->isAdmin()){\n $onHold = Shipment::with(['user', 'order.item'])->where('shipment_status', 'on_hold')\n ->where('expected_date', '!=', null)->get();\n $moving = Shipment::with(['user', 'order.item'])->where('shipment_status', 'moving')\n ->where('expected_date', '!=', null)->get();\n $cancelled = Shipment::with(['user', 'order.item'])->where('shipment_status', 'cancelled')\n ->where('expected_date', '!=', null)->get();\n $delayed = Shipment::with(['user', 'order.item'])->where('shipment_status', 'delayed')\n ->where('expected_date', '!=', null)->get();\n $arrived = Shipment::with(['user', 'order.item'])->where('shipment_status', 'arrived')\n ->where('expected_date', '!=', null)->get();\n }\n else{\n $userCategoryId = auth()->user()->getCategoryId();\n $onHold = Shipment::with(['user', 'order.item'])->where('category_id', $userCategoryId)->where('shipment_status', 'on_hold')\n ->where('expected_date', '!=', null)->get();\n $moving = Shipment::with(['user', 'order.item'])->where('category_id', $userCategoryId)->where('shipment_status', 'moving')\n ->where('expected_date', '!=', null)->get();\n $cancelled = Shipment::with(['user', 'order.item'])->where('category_id', $userCategoryId)->where('shipment_status', 'cancelled')\n ->where('expected_date', '!=', null)->get();\n $delayed = Shipment::with(['user', 'order.item'])->where('category_id', $userCategoryId)->where('shipment_status', 'delayed')\n ->where('expected_date', '!=', null)->get();\n $arrived = Shipment::with(['user', 'order.item'])->where('category_id', $userCategoryId)->where('shipment_status', 'arrived')\n ->where('expected_date', '!=', null)->get();\n }\n\n\n\t\treturn view('shipments_status', compact('onHold', 'moving', 'cancelled', 'delayed', 'arrived'));\n\t}", "public function orderStatusUpdates($order_ref = null)\n {\n try {\n $customer = new IOPNController();\n $result = $customer->orderStatus($order_ref);\n return json_decode($result->getContent(), true);\n //code...\n } catch (\\Throwable $th) {\n throw $th;\n }\n }", "public function getAnnouncementStatuses()\n {\n return craft()->plugins->getPlugin('maintenance')->announcementStatuses;\n }", "public function getFulfillmentShipmentStatusAllowableValues()\n {\n return [\n self::FULFILLMENT_SHIPMENT_STATUS_PENDING,\n self::FULFILLMENT_SHIPMENT_STATUS_SHIPPED,\n self::FULFILLMENT_SHIPMENT_STATUS_CANCELLED_BY_FULFILLER,\n self::FULFILLMENT_SHIPMENT_STATUS_CANCELLED_BY_SELLER,\n ];\n }", "public static function getStatus($shipmentStatus)\n {\n switch ($shipmentStatus) {\n case 'DELIVERED':\n case 'RETURNED_TO_SENDER':\n return self::STATUS_DELIVERED;\n case 'IN_TRANSIT':\n return self::STATUS_IN_TRANSIT;\n case 'READY_TO_PRINT':\n case 'READY_FOR_COLLECTION':\n case 'COMPLETED':\n case 'CARRIER_OK':\n return self::STATUS_READY;\n case 'CARRIER_KO':\n case 'LABELS_KO':\n case 'INTEGRATION_KO':\n case 'PURCHASE_SUCCESS':\n case 'CARRIER_PENDING':\n case 'RETRY':\n return self::STATUS_ACCEPTED;\n case 'CANCELED':\n return self::STATUS_CANCELLED;\n case 'OUT_FOR_DELIVERY':\n return self::OUT_FOR_DELIVERY;\n case 'INCIDENT' :\n return self::INCIDENT;\n case 'AWAITING_COMPLETION':\n case 'READY_TO_PURCHASE':\n default:\n return self::STATUS_PENDING;\n }\n }", "public function getRefNumber()\n\t{\n\t\t$LeadDetails = LeadDetails::where('active', 1)->whereNotNull('deliveryStatus')->get();\n\t\t$refNumber1 = [];\n\t\tforeach ($LeadDetails as $lead) {\n\t\t\tif (isset($lead->deliveryStatus)) {\n\t\t\t\tforeach ($lead->deliveryStatus as $status) {\n\t\t\t\t\tif ((isset($status['upload_sign']) && $status['upload_sign'] != \"\" && isset($status['status']) && $status['status'] == \"Delivered\")\n\t\t\t\t\t\t|| (isset($status['upload_sign']) && $status['upload_sign'] != \"\" && !isset($status['status']))\n\t\t\t\t\t) {\n\t\t\t\t\t\t$refNumber1[] = $lead->referenceNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdd(array_unique($refNumber1));\n\t}" ]
[ "0.6176501", "0.5850689", "0.56840265", "0.5572789", "0.542535", "0.5389115", "0.5321039", "0.5255649", "0.52237976", "0.52049214", "0.517022", "0.5161352", "0.5156065", "0.5113542", "0.5108743", "0.5095256", "0.50553155", "0.50311935", "0.5020688", "0.49896702", "0.4982042", "0.49596342", "0.495166", "0.49262112", "0.49051568", "0.4887434", "0.48691764", "0.48548123", "0.48365545", "0.48190588" ]
0.7193965
0
Get the complete status of a shipment. This is a combifunction, supporting the following: CurrentStatus (by barcode): Fill the Shipment>Barcode property. Leave the rest empty. CurrentStatusByReference: Fill the Shipment>Reference property. Leave the rest empty. CurrentStatusByPhase: Fill the Shipment>PhaseCode property, do not pass Barcode or Reference. Optionally add DateFrom and/or DateTo. CurrentStatusByStatus: Fill the Shipment>StatusCode property. Leave the rest empty.
#[Deprecated] public function getCompleteStatus($completeStatus) { static::triggerDeprecation( 'firstred/postnl-api-php', '1.2.0', 'Use the dedicated getShippingStatus* methods (get by phase and status are no longer working)' ); if (null !== $completeStatus->getShipment()->getPhaseCode()) { throw new NotSupportedException('Getting the complete status by phase code is no longer supported.'); } if (null !== $completeStatus->getShipment()->getStatusCode()) { throw new NotSupportedException('Getting the complete status by status code is no longer supported.'); } $fullCustomer = $this->getCustomer(); $completeStatus->setCustomer((new Customer()) ->setCustomerCode($fullCustomer->getCustomerCode()) ->setCustomerNumber($fullCustomer->getCustomerNumber()) ); if (!$completeStatus->getMessage()) { $completeStatus->setMessage(new Message()); } return $this->getShippingStatusService()->completeStatus($completeStatus); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShipmentStatus() \n {\n return $this->_fields['ShipmentStatus']['FieldValue'];\n }", "public function getShippingStatusByReference($reference, $complete = false)\n {\n if ($complete) {\n $statusRequest = new CompleteStatus((new Shipment())->setReference($reference));\n } else {\n $statusRequest = new CurrentStatus((new Shipment())->setReference($reference));\n }\n\n if (!$statusRequest->getMessage()) {\n $statusRequest->setMessage(new Message());\n }\n\n if ($complete) {\n $shipments = $this->getShippingStatusService()->completeStatus($statusRequest)->getShipments();\n } else {\n $shipments = $this->getShippingStatusService()->currentStatus($statusRequest)->getShipments();\n }\n\n if (empty($shipments) || !is_array($shipments)) {\n throw new ShipmentNotFoundException($reference);\n }\n\n return $shipments[0];\n }", "#[Deprecated]\n public function getCurrentStatus($currentStatus)\n {\n static::triggerDeprecation(\n 'firstred/postnl-api-php',\n '1.2.0',\n 'Use the dedicated methods (get by phase and status are no longer working)'\n );\n\n if (null !== $currentStatus->getShipment()->getPhaseCode()) {\n throw new NotSupportedException('Getting the current status by phase code is no longer supported.');\n }\n if (null !== $currentStatus->getShipment()->getStatusCode()) {\n throw new NotSupportedException('Getting the current status by status code is no longer supported.');\n }\n\n $fullCustomer = $this->getCustomer();\n $currentStatus->setCustomer((new Customer())\n ->setCustomerCode($fullCustomer->getCustomerCode())\n ->setCustomerNumber($fullCustomer->getCustomerNumber())\n );\n if (!$currentStatus->getMessage()) {\n $currentStatus->setMessage(new Message());\n }\n\n return $this->getShippingStatusService()->currentStatus($currentStatus);\n }", "public static function getStatus($shipmentStatus)\n {\n switch ($shipmentStatus) {\n case 'DELIVERED':\n case 'RETURNED_TO_SENDER':\n return self::STATUS_DELIVERED;\n case 'IN_TRANSIT':\n return self::STATUS_IN_TRANSIT;\n case 'READY_TO_PRINT':\n case 'READY_FOR_COLLECTION':\n case 'COMPLETED':\n case 'CARRIER_OK':\n return self::STATUS_READY;\n case 'CARRIER_KO':\n case 'LABELS_KO':\n case 'INTEGRATION_KO':\n case 'PURCHASE_SUCCESS':\n case 'CARRIER_PENDING':\n case 'RETRY':\n return self::STATUS_ACCEPTED;\n case 'CANCELED':\n return self::STATUS_CANCELLED;\n case 'OUT_FOR_DELIVERY':\n return self::OUT_FOR_DELIVERY;\n case 'INCIDENT' :\n return self::INCIDENT;\n case 'AWAITING_COMPLETION':\n case 'READY_TO_PURCHASE':\n default:\n return self::STATUS_PENDING;\n }\n }", "public function setShipmentStatus($value) \n {\n $this->_fields['ShipmentStatus']['FieldValue'] = $value;\n return $this;\n }", "public function getShippingStatusByBarcode($barcode, $complete = false)\n {\n if ($complete) {\n $statusRequest = new CompleteStatus((new Shipment())->setBarcode($barcode));\n } else {\n $statusRequest = new CurrentStatus((new Shipment())->setBarcode($barcode));\n }\n\n if (!$statusRequest->getMessage()) {\n $statusRequest->setMessage(new Message());\n }\n\n if ($complete) {\n $shipments = $this->getShippingStatusService()->completeStatus($statusRequest)->getShipments();\n } else {\n $shipments = $this->getShippingStatusService()->currentStatus($statusRequest)->getShipments();\n }\n\n if (empty($shipments) || !is_array($shipments)) {\n throw new ShipmentNotFoundException($barcode);\n }\n\n return $shipments[0];\n }", "public function withShipmentStatus($value)\n {\n $this->setShipmentStatus($value);\n return $this;\n }", "public function getShippingStatusesByReferences(array $references, $complete = false)\n {\n $shipments = [];\n if ($complete) {\n $shipmentResponses = $this->getShippingStatusService()->completeStatuses(array_map(\n function ($reference) {\n return (new CompleteStatus())->setShipment((new Shipment())->setReference($reference));\n },\n $references\n ));\n } else {\n $shipmentResponses = $this->getShippingStatusService()->currentStatuses(array_map(\n function ($reference) {\n return (new CurrentStatus())->setShipment((new Shipment())->setReference($reference));\n },\n $references\n ));\n }\n\n foreach ($shipmentResponses as $shipmentResponse) {\n foreach ($shipmentResponse->getShipments() as $shipment) {\n $shipments[$shipment->getReference()] = $shipment;\n }\n }\n\n return $shipments;\n }", "public function getOrderStatus ($RefNo);", "public function getStatus()\n {\n /** @noinspection PhpIncompatibleReturnTypeInspection */\n return FrontDtoFactory::get(\n DashboardStatus::CLASS_KEY,\n array(\n 'isParcelSet' => $this->configuration->getDefaultParcel() !== null,\n 'isWarehouseSet' => $this->configuration->getDefaultWarehouse() !== null,\n 'isShippingMethodSet' => $this->shippingMethodService->isAnyMethodActive(),\n )\n );\n }", "public function updateShipmentStatus($orderId, $shippingStatus);", "public function get_status()\n {\n $keys = array_keys($this->services_status);\n $status = array();\n foreach ($keys as &$key)\n $status[$key] = ServiceStatus::getName($this->get_service_status($key));\n\n return (object)array(\n \"Status\" => $status,\n \"Content\" => $this->request_data,\n \"Connection\" => $this->urabe->get_connection_data(),\n \"Table\" => array(\n \"name\" => $this->table_name,\n \"primary_key\" => $this->primary_key,\n \"columns\" => $this->table_fields,\n \"selection_filter\" => $this->selection_filter\n ),\n \"Actions\" => $this->get_available_actions(),\n \"Filter\" => $this->selection_filter,\n );\n }", "public function updateStatus(Request $request, Shipment $shipment, $id) {\n\t\t$shipment = Shipment::find($request->id);\n\t\tif ($request->address) {\n\t\t\t$coordinates = serialize($request->address);\n\t\t\t$latitude = $request->address['latitude'];\n\t\t\t$longitude = $request->address['longitude'];\n\t\t\t$coords = array('lat' => $latitude, 'lng' => $longitude);\n\t\t\t$shipment->coordinates = $coordinates;\n\t\t\t$shipment->longitude = $longitude;\n\t\t\t$shipment->latitude = $latitude;\n\t\t}\n\t\t$shipment->status = $request->formobg['status'];\n\t\t// var_dump($request->formobg['status']); die;\n\t\t$shipment->remark = $request->formobg['remark'];\n\t\t$shipment->save();\n\t\treturn $shipment;\n\t}", "public function currentStatus()\n {\n $this->update();\n return $this->status( $this->attribute('current_status_id' ) );\n }", "public function getOrderStatus();", "public function getOrderStatus();", "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}", "public function status($status = null);", "public function get_status()\n {\n // loads the associated object\n if (empty($this->status))\n $this->status = new Status($this->status_id);\n \n // returns the associated object\n return $this->status;\n }", "public abstract function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();" ]
[ "0.6446027", "0.62016153", "0.6192284", "0.5983095", "0.59205455", "0.5884498", "0.5813651", "0.5767619", "0.56823987", "0.5637082", "0.553045", "0.55302864", "0.5517509", "0.55152506", "0.5468963", "0.5468963", "0.5393568", "0.5347693", "0.5307974", "0.52845293", "0.5258199", "0.5258199", "0.5258199", "0.5258199", "0.5258199", "0.5258199", "0.5258199", "0.5258199", "0.5258199", "0.5258199" ]
0.63545614
1
Find a suitable serie for the barcode.
public function findBarcodeSerie( $type, $range, /** @deprecated 1.4.0 */ #[Deprecated] $eps = null ) { if (!is_bool($eps)) { $eps = false; } else { static::triggerDeprecation( 'firstred/postnl-api-php', '1.4.0', 'EPS is no longer supported. Please avoid.' ); } switch ($type) { case '2S': $serie = '0000000-9999999'; break; case '3S': if ($eps) { switch (strlen($range)) { case 4: $serie = '0000000-9999999'; break 2; case 3: $serie = '10000000-20000000'; break 2; case 1: $serie = '5210500000-5210600000'; break 2; default: throw new InvalidBarcodeException('Invalid range'); } } // Regular domestic codes $serie = (4 === strlen($range) ? '987000000-987600000' : '0000000-9999999'); break; case 'LA': case 'UE': case 'RI': $serie = '00000000-99999999'; break; default: // GlobalPack $serie = '0000-9999'; break; } return $serie; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find_product_by_barcode($bar_code){\n\t echo json_encode($this->products->search_product_by_barcode($bar_code));\n\t}", "public function scan(string $sku);", "public function findByBarcode(string $barcode): Product\n {\n return Product::whereBarcode($barcode)->first();\n }", "public function search($ser){\n\t\t\t$pos = array_search($ser, $name);\n\t\t\treturn $pos;\n\t\t}", "public function getGenerateBarcode();", "public static function barcode(): string\n {\n return 'barcode';\n }", "abstract public function find($code);", "public function CreateBuildRecord_FromBarcode()\r {\r \r if (!$this->Barcode) {\r $error = \"No barcode\";\r $this->AddError($this->Classname, __FUNCTION__, $error);\r $this->EchoError($this->Classname, __FUNCTION__, $error, true);\r exit();\r }\r \r // ----- get the default build record ID\r $record = $this->SQL->GetRecord(array(\r 'table' => 'inventory_products',\r 'keys' => 'inventory_assemblies_id',\r 'where' => \"barcode='{$this->Barcode}' AND active=1\",\r ));\r $this->EchoQuery();\r \r // ----- get the actual build record\r if ($record['inventory_assemblies_id']) {\r $build_record_array = $this->CreateBuildRecord_FromInventoryAssembliesId($record['inventory_assemblies_id']);\r } else {\r $build_record_array = array('ERROR' => \"NO BUILD RECORD FOUND FOR BARCODE #{$this->Barcode}. You may not have set barcode to use assembly pricing.\");\r }\r \r // ----- return complete build record\r return $build_record_array;\r }", "public function getSerieSlug(): ?string\n {\n return $this->serieSlug;\n }", "private static function findIconFromCode($sCode) {\n // TODO : Find night icons\n $aIconsMap = [\n '01d' => 'sunny',\n '02d' => 'sunny_s_cloudy',\n '03d' => 'partly_cloudy',\n '04d' => 'cloudy',\n '09d' => 'rain',\n '10d' => 'sunny_s_rain',\n '11d' => 'thunderstorms',\n '13d' => 'snow',\n '50d' => 'fog',\n '01n' => 'sunny',\n '02n' => 'sunny_s_cloudy',\n '03n' => 'partly_cloudy',\n '04n' => 'cloudy',\n '09n' => 'rain',\n '10n' => 'sunny_s_rain',\n '11n' => 'thunderstorms',\n '13n' => 'snow',\n '50n' => 'fog',\n ];\n\n if (!array_key_exists($sCode, $aIconsMap)) {\n throw new Exception('OpenWeatherMapAPI : Could not find a matching icon for \"' . $sCode . '\"');\n }\n\n return $aIconsMap[$sCode];\n }", "function ticker($barcode, $eid)\n\t{\n\t\n\t\t\n\t}", "function detect_group_barcode($barcode,$PREFIX_GROUP_STICKER) //first compares barcode if this is a group prefix\r\n{\r\n echo \"detecting group0\";\r\n echo $group=strtoupper(substr($barcode,0,3));\r\n if(strcmp($PREFIX_GROUP_STICKER,$group)==0){\r\n echo \"detected group sticker \".$group;\r\n return 1;}\r\n else\r\n return 0;\r\n \r\n}", "public function get_seri_meter()\n {\n $project_id = $GLOBALS['project']->id;\n $unit_id = $this->input->post('unit_id');\n $id_transaksi = $this->input->post('id');\n $tipe = $this->input->post('tipe');\n if ($tipe == 'jenis_transaksi')\n {\n $where = '';\n $barcode = '';\n if($id_transaksi==1 OR $id_transaksi==2)\n {\n $where = \"AND status_meter = '1' \";\n\n $sql = \"SELECT * FROM m_meter_air WHERE 1=1 $where AND project_id = '$project_id' \";\n $sql = $this->db->query($sql);\n $option = \"<option value=''>Pilih Seri Meter</option>\";\n if ($sql->num_rows() > 0) {\n foreach ($sql->result() as $q) {\n $option .= \"<option value='\".$q->id.\"'>\".$q->no_seri_meter.\"</option>\";\n }\n }\n }\n if($id_transaksi==3 OR $id_transaksi==4)\n {\n $where = \"AND status_meter = '2' \";\n\n // get barcode and no.meter\n $get_meter = $this->db->where('unit_id', $unit_id)->limit(1)->get('unit_air');\n if ($get_meter->num_rows() > 0) {\n $row = $get_meter->row();\n $barcode = $row->barcode_meter;\n $option = \"<option value='\".$row->m_meter_air_id.\"'>\".$row->no_seri_meter.\"</option>\";\n }\n }\n echo json_encode([\n 'option' => $option,\n 'barcode' => $barcode\n ]);\n }\n\n if ($tipe == 'm_meter_air_id') \n {\n $id = $this->input->post('id');\n $sql = \"SELECT barcode FROM m_meter_air WHERE id = '\".$id.\"'\";\n $sql = $this->db->query($sql);\n $barcode = '';\n if ($sql->num_rows() > 0) {\n $barcode = $sql->row()->barcode;\n }\n echo json_encode($barcode);\n }\n }", "public function find( string $code, string $type ) : \\Aimeos\\MShop\\Slider\\Item\\Iface;", "public static function searchSlot($slotArray,$value){\r\n //echo 'called me';\r\n// for($i=0; $i< count($slotArray);$i++){\r\n// $findRec = array_search($value, $slotArray[$i]['slot']);\r\n// if($findRec){\r\n// return 1;\r\n// }else{\r\n// return 0;\r\n// }\r\n// }\r\n \r\n foreach($slotArray as $slot){\r\n $findRec = array_search($value, $slot['slot']);\r\n if($findRec){\r\n echo $findRec;\r\n //return 1;\r\n }else{\r\n return 0;\r\n }\r\n }\r\n \r\n echo 'now';\r\n //echo '<pre>';\r\n //print_r($slotArray);\r\n //echo '</pre>';\r\n //print_r($slotArray[0]['slot']);\r\n /*for($i=0; $i< count($slotArray);$i++){\r\n if (in_array($value, $slotArray[$i]['slot'])) {\r\n //echo \"Got it\";\r\n $output = $slotArray[$i]['slot']['time'];\r\n }else{\r\n $output = null;\r\n }\r\n }*/\r\n //echo $output;\r\n //return $output;\r\n //echo count($slotArray);\r\n }", "public function getBarcodeService()\n {\n if (!$this->barcodeService) {\n $this->setBarcodeService(new BarcodeService($this));\n }\n\n return $this->barcodeService;\n }", "public function getProductByBarcode($barcode)\n {\n return $this->sendRequest('product?barcode=' . $barcode);\n }", "public function getProductInfo($barcode, $store_id = null);", "function retrieveBarcodeInfo($barcode)\n {\n\n $xml_barcode_result = false;\n $barcode = urlencode($barcode);\n //Remove encoded data received when processing CSV\n $barcode = str_replace(array(\"%0D%0A\"), '', $barcode);\n // BUILD REST REQUEST URL\n $url = \"https://api-na.hosted.exlibrisgroup.com/almaws/v1/items?item_barcode=\" . $barcode . \"&apikey=\" . ALMA_SHELFLIST_API_KEY;\n if (isset($_GET['debug']))\n print(\"URL:\" . $barcode . \" $url<br>\\n\");\n\n if (strcmp(CACHE_FREQUENCY, \"None\")) {\n // check cache for barcode\n if (file_exists(\"cache/barcodes/\" . $barcode . \".xml\")) {\n // check last modified datestamp\n $cache_expired = false;\n switch (CACHE_FREQUENCY) {\n case 'Hourly':\n if (filemtime(\"cache/barcodes/\" . $barcode . \".xml\") < strtotime(date(\"Y-m-d H:00:00\", strtotime(\"now\")))) $cache_expired = true;\n case 'Daily':\n if (filemtime(\"cache/barcodes/\" . $barcode . \".xml\") < strtotime(date(\"Y-m-d 00:00:00\", strtotime(\"now\")))) $cache_expired = true;\n default: if(filemtime(\"cache/barcodes/\". $barcode .\".xml\") < strtotime(date(\"Y-m-d 00:00:00\",strtotime(\"now\")))) $cache_expired = true;\n }\n //$cache_expired = true;\n if (!$cache_expired) {\n $xml = file_get_contents(\"cache/barcodes/\" . $barcode . \".xml\");\n if (trim($xml) == '') {\n //barcode file empty, reload from api\n $xml_barcode_result = false;\n }\n else {\n $xml_barcode_result = simplexml_load_string($xml);\n if (isset($_GET['debug'])) print(\"loaded data from cache file: cache/barcodes/\" . $barcode . \".xml<br>\\n\");\n }\n }\n else {\n $xml_barcode_result = false;\n }\n }\n }\n\n // if no cache data available, query the Alma API\n if (!$xml_barcode_result) {\n // use curl to make the API request\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //Was critical option setting for this, as API redirects response\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_URL, $url);\n $result = curl_exec($ch);\n\n if (isset($_GET['debug'])) {\n print(\"xml result from API<br>\\n\");\n print(\"<pre>\" . htmlspecialchars($result) . \"</pre>\");\n }\n\n // save result to cache\n if (strcmp(CACHE_FREQUENCY, \"None\") && is_writable(\"cache/barcodes/\")) {\n file_put_contents(\"cache/barcodes/\" . $barcode . \".xml\", $result);\n if (isset($_GET['debug'])) {\n print(\"Barcode File written to cache\\n\");\n }\n }\n\n $xml_barcode_result = simplexml_load_string($result);\n curl_close($ch);\n }\n\n // PARSE RESULTS\n $item_obj = new stdClass();\n $item_obj->title = (string)$xml_barcode_result->bib_data->title;\n $item_obj->item_link = (string)$xml_barcode_result['link'].\"?apikey=\" . ALMA_SHELFLIST_API_KEY;\n $item_obj->mms_id = (string)$xml_barcode_result->bib_data->mms_id;\n $item_obj->bib_link = (string)$xml_barcode_result->bib_data['link'].\"?apikey=\" . ALMA_SHELFLIST_API_KEY;\n $item_obj->holding_id = (string)$xml_barcode_result->holding_data->holding_id;\n $item_obj->holding_link = (string)$xml_barcode_result->holding_data['link'].\"?apikey=\" . ALMA_SHELFLIST_API_KEY;\n $item_obj->item_pid = (string)$xml_barcode_result->item_data->pid;\n $item_obj->item_barcode = (string)$xml_barcode_result->item_data->barcode;\n $item_obj->call_number = (string)$xml_barcode_result->holding_data->call_number. \" \" . (string)$xml_barcode_result->item_data->enumeration_a. \" \" . (string)$xml_barcode_result->item_data->chronology_i;\n $item_obj->in_temp_location = (string)$xml_barcode_result->holding_data->in_temp_location;\n $item_obj->call_number_type = (string)$xml_barcode_result->holding_data->call_number_type;\n $item_obj->status = (string)$xml_barcode_result->item_data->base_status;\n $item_obj->status_desc = (string)$xml_barcode_result->item_data->base_status['desc'];\n $item_obj->process_type = (string)$xml_barcode_result->item_data->process_type;\n $item_obj->library = (string)$xml_barcode_result->item_data->library;\n $item_obj->location = (string)$xml_barcode_result->item_data->location;\n $item_obj->physical_material_type = (string)$xml_barcode_result->item_data->physical_material_type;\n $item_obj->item_note3 = (string)$xml_barcode_result->item_data->internal_note_3;\n $item_obj->requested = (string)$xml_barcode_result->item_data->requested;\n $item_obj->policy = (string)$xml_barcode_result->item_data->policy;\n\n //Add this item to the array of items using the read order as the index value\n return $item_obj;\n\n\n\n //\tif(isset($_GET['debug']))\n {\n print(\"<pre>\\n\");\n print_r($xml_barcode_result);\n print(\"</pre>\\n\");\n }\n $xml_barcode_result = false;\n\n\n }", "public function detailsFromSlug(string $slug): array\n {\n if (empty(static::$namedCodesBySlug[$slug])) {\n throw new NotFoundException('Barcode slug not found: ' . $slug);\n }\n return static::$namedCodesBySlug[$slug];\n }", "public function find_card($code, $serial)\n\t{\n\t\tif (strlen($code) != $this->config('code_length'))\n\t\t{\n\t\t\treturn [false, 'code_invalid'];\n\t\t}\n\t\t\n\t\tif (strlen($serial) != $this->config('serial_length'))\n\t\t{\n\t\t\treturn [false, 'serial_invalid'];\n\t\t}\n\t\t\n\t\t$card = $this->_model()->get_info_rule([\n\t\t\t'code_encode'\t=> md5($code),\n\t\t\t'serial'\t\t=> $serial,\n\t\t]);\n\t\t\n\t\tif ( ! $card)\n\t\t{\n\t\t\treturn [false, 'card_not_exist'];\n\t\t}\n\t\t\n\t\tif ( ! $card->status)\n\t\t{\n\t\t\treturn [false, 'card_used'];\n\t\t}\n\t\t\n\t\tif ($card->expire < now())\n\t\t{\n\t\t\treturn [false, 'card_expired'];\n\t\t}\n\t\t\n\t\t$card = $this->add_info($card);\n\t\t\n\t\treturn [true, compact('card')];\n\t}", "static public function select_one_value_2param($oc_cod='',$sku=''){\n $sql = \" SELECT * FROM \" . static::$table_name . \" \";\n $sql .= \" WHERE orden_corte = '\". self::$database->escape_string($oc_cod) .\"' AND sku = '\". self::$database->escape_string($sku) .\"' \";\n //ChromePhp::log('consulta error: '.$sql);\n return static::find_by_sql($sql);\n }", "function series_by_id($id){\n\n\t\t$return = $this->get_limited(\"code\", $id);\n\n\t\treturn $return;\n\t}", "protected function _prepareBarcode()\n {\n $barcodeTable = [];\n $height = ($this->_drawText) ? 1.1 : 1;\n\n // Start character (101)\n $barcodeTable[] = [1 , $this->_barThinWidth , 0 , $height];\n $barcodeTable[] = [0 , $this->_barThinWidth , 0 , $height];\n $barcodeTable[] = [1 , $this->_barThinWidth , 0 , $height];\n\n $textTable = str_split($this->getText());\n $system = 0;\n\n if ($textTable[0] == 1) {\n $system = 1;\n }\n\n $checksum = $textTable[7];\n $parity = $this->_parities[$system][$checksum];\n\n for ($i = 1; $i < 7; $i++) {\n $bars = str_split($this->_codingMap[$parity[$i - 1]][$textTable[$i]]);\n foreach ($bars as $b) {\n $barcodeTable[] = [$b , $this->_barThinWidth , 0 , 1];\n }\n }\n\n // Stop character (10101)\n $barcodeTable[] = [0 , $this->_barThinWidth , 0 , $height];\n $barcodeTable[] = [1 , $this->_barThinWidth , 0 , $height];\n $barcodeTable[] = [0 , $this->_barThinWidth , 0 , $height];\n $barcodeTable[] = [1 , $this->_barThinWidth , 0 , $height];\n $barcodeTable[] = [0 , $this->_barThinWidth , 0 , $height];\n $barcodeTable[] = [1 , $this->_barThinWidth , 0 , $height];\n return $barcodeTable;\n }", "function Barcode($barcode, $system = 'UPC-A', $n_chars = '0'){\n if($this -> handle == false) return false;\n if($this -> pcp_barcode != true) return false;\n $system = strtoupper($system);\n \n switch($system){\n case 'UPC-A':\n $m = kbyte(65);\n if($n_chars > 12) $n = kbyte(12);\n elseif($n_chars < 11) $n = kbyte(11);\n else $n = kbyte($n_chars);\n break;\n \n case 'UPC-E':\n $m = kbyte(66);\n if($n_chars > 12) $n = kbyte(12);\n elseif($n_chars < 11) $n = kbyte(11);\n else $n = kbyte($n_chars);\n break;\n \n case 'JAN13':\n case 'EAN13':\n $m = kbyte(67);\n if($n_chars > 13) $n = kbyte(13);\n elseif($n_chars < 12) $n = kbyte(12);\n else $n = kbyte($n_chars);\n break;\n \n case 'JAN8':\n case 'EAN8':\n $m = kbyte(68);\n if($n_chars > 8) $n = kbyte(8);\n elseif($n_chars < 7) $n = kbyte(7);\n else $n = kbyte($n_chars);\n break;\n \n case 'CODE39':\n $m = kbyte(69);\n if($n_chars > 255) $n = kbyte(255);\n elseif($n_chars < 1) $n = kbyte(1);\n else $n = kbyte($n_chars);\n break;\n \n case 'ITF':\n $m = kbyte(70);\n if($n_chars > 255) $n = kbyte(255);\n elseif($n_chars < 1) $n = kbyte(1);\n else $n = kbyte($n_chars);\n break;\n \n case 'CODABAR':\n case 'NW7':\n $m = kbyte(71);\n if($n_chars > 255) $n = kbyte(255);\n elseif($n_chars < 1) $n = kbyte(1);\n else $n = kbyte($n_chars);\n break;\n \n case 'CODE93':\n $m = kbyte(72);\n if($n_chars > 255) $n = kbyte(255);\n elseif($n_chars < 1) $n = kbyte(1);\n else $n = kbyte($n_chars);\n break;\n \n case 'CODE128':\n $m = kbyte(72);\n if($n_chars > 255) $n = kbyte(255);\n elseif($n_chars < 2) $n = kbyte(2);\n else $n = kbyte($n_chars);\n break;\n \n default:\n $this -> error('Unknown barcode system.');\n return false;\n }\n \n $this -> Append(kbyte(29) . \"k\" . $m . $n . $barcode);\n \n return true;\n }", "protected function findItem(ResourceInterface $resource, $identifier)\n {\n $classMetadata = $resource->getMetadata()->getClassMetadata();\n $identifierNames = $classMetadata->getIdentifierFieldNames();\n\n if (count($identifierNames) > 1) {\n throw new RuntimeException(get_class($this) . ' does not support composite identifiers');\n }\n\n $data = $resource->getData();\n\n if (!$data instanceof Selectable && $data instanceof Traversable) {\n $data = new ArrayCollection(iterator_to_array($data));\n }\n\n $criteria = new Criteria();\n $criteria->where($criteria->expr()->eq(reset($identifierNames), $identifier));\n\n $found = $data->matching($criteria);\n\n return $found->isEmpty() ? null : $found->first();\n }", "public function getCodigoDesdeBibliotecaYSerial($idBiblioteca,$serial)\n {\n $biblioteca=Biblioteca::find($idBiblioteca);\n if($biblioteca!=null)\n {\n $codigo=DB::table('codigos')->select()->where([['id_biblioteca','=',$idBiblioteca],['serial_identificador','=',$serial]])->get()->first();\n if($codigo!=null)\n {\n return response()->json(['codigo'=>$codigo],200);\n }\n else {\n return response()->json(['Error'=>'No se encontró el codigo'],404);\n }\n }\n else {\n return response()->json(['Error'=>'No se encontró la biblioteca'],404);\n }\n }", "public function findSPKService($nomorFaktur){\n $hasil = $this->db->query(\"SELECT * FROM spkservice a LEFT JOIN customer c ON a.idCustomer=c.idCustomer LEFT JOIN purchaseorderservice d ON a.nomorPO = d.nomorPO LEFT JOIN user e ON d.idSalesPerson=e.idUser WHERE nomorFaktur=$nomorFaktur LIMIT 1\");\n if($hasil->num_rows() > 0){\n return $hasil->result();\n } else{\n return array();\n }\n }", "function obtenerSeries($idUnidad)\n{\n $sql = new Query(\"SG\");\n $sql->sql = \"SELECT id_serie_aer as id \n FROM serie_aer \n WHERE id_unidad = \".$idUnidad.\" and status = 1\n \";\n \n return $sql->select('obj');\n}", "function LisSerie() {\n $ocado = new cado();\n $sql = \"select s.id,t.descripcion,s.tipo_doc,s.serie\n\t\t from conf_serie s inner join conf_tipo_documento t on s.cod_sunat=t.cod_sunat\n\t\t order by s.cod_sunat asc\";\n $ejecutar = $ocado->ejecutar($sql);\n return $ejecutar;\n }" ]
[ "0.57253766", "0.5400716", "0.5228945", "0.504446", "0.4991648", "0.4881759", "0.4874667", "0.47614354", "0.47579685", "0.47484353", "0.4742181", "0.4717107", "0.46887565", "0.46341884", "0.46336666", "0.45864582", "0.4580276", "0.4553859", "0.45535168", "0.45269275", "0.45061693", "0.44980934", "0.4489291", "0.4451941", "0.4449346", "0.4439034", "0.44255906", "0.44128644", "0.439068", "0.43778956" ]
0.59571743
0
Setup authentication based on returned server variables from the IdP.
public function idpAuthenticate() { if (empty(config('shibboleth.user'))) { ConfigurationBackwardsCompatabilityMapper::map(); } foreach (config('shibboleth.user') as $local => $server) { $map[$local] = $this->getServerVariable($server); } if (empty($map[config('shibboleth.authfield')])) { return abort(403, 'Unauthorized'); } $userClass = config('auth.providers.users.model', 'App\User'); // Attempt to login with the email, if success, update the user model // with data from the Shibboleth headers (if present) if (Auth::attempt(array(config('shibboleth.authfield') => $map[config('shibboleth.authfield')]), true)) { $user = $userClass::where(config('shibboleth.authfield'), '=', $map[config('shibboleth.authfield')])->first(); // Update the model as necessary $user->update($map); } // Add user and send through auth. elseif (config('shibboleth.add_new_users', true)) { $map['password'] = 'shibboleth'; $user = $userClass::create($map); Auth::attempt(array(config('shibboleth.authfield') => $map[config('shibboleth.authfield')]), true); } else { return abort(403, 'Unauthorized'); } Session::regenerate(); // $entitlementString = $this->getServerVariable(config('shibboleth.entitlement')); // if (!empty($entitlementString)) { // $entitlements = Entitlement::findInString($entitlementString); // $user->entitlements()->sync($entitlements); // } $route = config('shibboleth.authenticated'); if (config('jwtauth') === true) { $route .= $this->tokenizeRedirect($user, ['auth_type' => 'idp']); } return redirect()->intended($route); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authenticate()\n {\n if ($this->serverHelper->getServerId() != false) {\n $this->binding->getSsoBinding()->request('AuthnRequest');\n }\n }", "protected function setAuth()\n\t{\n\t\tif ($this->username !== null && $this->password !== null) {\n\t\t\tcurl_setopt($this->curlHandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);\n\t\t\tcurl_setopt($this->curlHandle, CURLOPT_USERPWD, $this->username . ':' . $this->password);\n\t\t}\n\t}", "function doHTTPAUTH()\n{\n if ( preg_match( \"#(.*)\\\\\\\\(.*)$#\", $_SERVER['PHP_AUTH_USER'], $matches ) )\n {\n $_SERVER['PHP_AUTH_USER'] = $matches[2];\n }\n\n $user = false;\n $ini = eZINI::instance();\n\n eZDebug::writeDebug( $_SERVER['PHP_AUTH_USER'], \"HTTP USER\");\n eZDebug::writeDebug( $_SERVER['PHP_AUTH_PW'], \"HTTP PASS\");\n if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) )\n {\n include_once( 'kernel/classes/datatypes/ezuser/ezuserloginhandler.php' );\n\n if ( $ini->hasVariable( 'UserSettings', 'LoginHandler' ) )\n {\n $loginHandlers = $ini->variable( 'UserSettings', 'LoginHandler' );\n }\n else\n {\n $loginHandlers = array( 'standard' );\n }\n\n foreach ( array_keys ( $loginHandlers ) as $key )\n {\n $loginHandler = $loginHandlers[$key];\n $userClass =& eZUserLoginHandler::instance( $loginHandler );\n $user = $userClass->loginUser( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'] );\n if ( get_class( $user ) == 'ezuser' )\n break;\n }\n }\n if ( !isset( $user ) )\n {\n $user = eZUser::currentUser();\n }\n}", "function api_ldapauthmanager()\n\t{\n\t\t$this->auth_server\t= $_SESSION[\"auth_server\"];\n\t\t$this->auth_online\t= $_SESSION[\"auth_online\"];\n\t}", "function __configureAuthCookie() {\r\n \r\n }", "public function initFromRequest()\n\t{\n\t\t$this->getLogger()->dump($_SERVER, ilLogLevel::DEBUG);\n\t\t$this->getLogger()->debug($this->getSettings()->get('apache_auth_username_direct_mapping_fieldname', ''));\n\n\t\tinclude_once './Services/AuthApache/classes/class.ilAuthProviderApache.php';\n\n\t\tswitch($this->getSettings()->get('apache_auth_username_config_type'))\n\t\t{\n\t\t\tcase ilAuthProviderApache::APACHE_AUTH_TYPE_DIRECT_MAPPING:\n\t\t\t\tif(array_key_exists($this->getSettings()->get('apache_auth_username_direct_mapping_fieldname'), $_SERVER))\n\t\t\t\t{\n\t\t\t\t\t$this->setUsername($_SERVER[$this->getSettings()->get('apache_auth_username_direct_mapping_fieldname', '')]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase ilAuthProviderApache::APACHE_AUTH_TYPE_BY_FUNCTION:\n\t\t\t\tinclude_once 'Services/AuthApache/classes/custom_username_func.php';\n\t\t\t\t$this->setUsername(ApacheCustom::getUsername());\n\t\t\t\tbreak;\n\t\t}\n\t}", "abstract public function authenticate();", "public function authenticateByClientLogin()\r\n\t{\r\n\t}", "public static function fallback_populate_username_password() {\n\t\t// If we don't have anything to pull from, return early.\n\t\tif ( ! isset( $_SERVER['REMOTE_USER'] ) && ! isset( $_SERVER['REDIRECT_REMOTE_USER'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If either PHP_AUTH key is already set, do nothing.\n\t\tif ( isset( $_SERVER['PHP_AUTH_USER'] ) || isset( $_SERVER['PHP_AUTH_PW'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// From our prior conditional, one of these must be set.\n\t\t$header = isset( $_SERVER['REMOTE_USER'] ) ? $_SERVER['REMOTE_USER'] : $_SERVER['REDIRECT_REMOTE_USER'];\n\n\t\t// Test to make sure the pattern matches expected.\n\t\tif ( ! preg_match( '%^Basic [a-z\\d/+]*={0,2}$%i', $header ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Removing `Bearer ` the token would start six characters in.\n\t\t$token = substr( $header, 6 );\n\t\t$userpass = base64_decode( $token );\n\t\tlist( $user, $pass ) = explode( ':', $userpass );\n\n\t\t// Now shove them in the proper keys where we're expecting later on.\n\t\t$_SERVER['PHP_AUTH_USER'] = $user;\n\t\t$_SERVER['PHP_AUTH_PW'] = $pass;\n\n\t\treturn;\n\t}", "abstract protected function authenticate();", "function authenticate(\\Sabre\\DAV\\Server $server,$realm);", "public function authenticate();", "public function authenticate();", "public function authenticate();", "public function authenticate();", "private function _auth()\n\t{\n\t\t// prepair auth username & password\n\t\t$data['username'] = $this->username;\n\t\t$data['password'] = sha1($this->password);\n\n\t\t// fetch auth session data\n\t\t$content = $this->_fetch_process($this->openapi_url_login, $data);\n\n\t\t// convert xml data to array object\n\t\t$object = @simplexml_load_string($content);\n\n\t\tif ($object->attributes()->status !== 'ok')\n {\n if (isset($object->err))\n $this->error[] = ['status' => 'failed', 'message' => (string) $object->err->attributes()->desc];\n }\n\n\n\t\t// return auth data\n\t\treturn (is_object($object) && isset($object->sessionid)) ? (string) $object->sessionid : null;\n\t}", "function authentication();", "public function authentication()\n {\n }", "protected function _authenticate()\n {\n $enabled = (int)Mage::getStoreConfig('eyehubspot/settings/active');\n $key1 = Mage::getStoreConfig('eyehubspot/settings/userkey');\n $key2 = Mage::getStoreConfig('eyehubspot/settings/passcode');\n\n if (!$enabled) {\n $this->_outputError(\n self::ERROR_CODE_SYSTEM_CONFIG_DISABLED,\n 'Magento System Configuration has disabled access to this resource.\n To re-enable, please go to Magento Admin > System > Configuration >\n Services > HubSpot Integration.'\n );\n return false;\n\n } elseif ($enabled && !empty($key1) && !empty($key2)) {\n if ((strcasecmp($key1, $this->getRequest()->getParam('ukey')) == 0)\n && (strcasecmp($key2, $this->getRequest()->getParam('code')) == 0)\n ) {\n return true;\n }\n }\n\n $this->_outputError(self::ERROR_CODE_INVALID_CREDENTIALS, 'Invalid user key and/or access code');\n\n return false;\n }", "private function authenticate() {\n\t\t$url = \"https://fmipmobile.icloud.com/fmipservice/device/\".$this->username.\"/initClient\";\n\t\tlist($headers, $body) = $this->curlPOST($url, \"\", $this->username.\":\".$this->password);\n\t\t\n\t\tif ($headers[\"http_code\"] == 401) {\n\t\t\tthrow new Exception('Your iCloud username and/or password are invalid');\n\t\t}\n\t}", "public function auth(): void\n {\n $auth = new AUTH;\n $auth->setArguments(['manononetool']); /** TODO: password to convert **/\n \n $this->executeCommand($auth);\n }", "private static function set_auth(){\n self::$auth = 'test';\n }", "public function auth($credentials) {}", "private function setCredentials() {\n $this->Credentials = $this->getJsonToArray(getenv(self::FACEBOOK_ENV));\n }", "function assignAuth() {\n $panelarr = array('users', 'super', 'stores', 'hq', 'hqusers');\n if (in_array($this->params['controller'], $panelarr)) {\n $func = 'Auth_' . $this->params['controller'];\n $this->$func();\n } else {\n $this->autoParam();\n }\n }", "public function __construct() \n {\n $this->AuthHost = \"auth.clarktesting.com\"; # The hostname of the STAR Auth server\n $this->AuthURL = \"https://\". $this->AuthHost .\"/api/1.0/server\"; # STAR Auth API server URL\n $this->LoginURL = \"https://\". $this->AuthHost .\"/login\"; # STAR Auth client login page\n $this->ClientHost = $_SERVER['HTTP_HOST'];\n }", "private function mod_get_credentials(){\r\n $cnf = parse_ini_file(\"/data/project/orwell01/replica.my.cnf\");\r\n $this->mod_dbuser = $cnf[\"user\"];\r\n $this->mod_dbpass = $cnf[\"password\"];\r\n }", "public function setAuthMode()\n {\n $this->authMode = true;\n }", "public function auth( );", "public function init()\n {\n if (!Vfr_Auth_Advertiser::getInstance()->hasIdentity()) {\n $this->_helper->redirector->gotoSimple(\n 'login',\n 'account',\n 'controlpanel'\n );\n }\n\n $this->identity = Vfr_Auth_Advertiser::getInstance()->getIdentity();\n }" ]
[ "0.6762521", "0.6171132", "0.6137713", "0.6109283", "0.6108349", "0.6020783", "0.6008985", "0.6006221", "0.60038155", "0.5997327", "0.5961785", "0.5959752", "0.5959752", "0.5959752", "0.5959752", "0.59156936", "0.58715343", "0.5863831", "0.5855504", "0.58336693", "0.5813088", "0.57982683", "0.57928586", "0.5775758", "0.5773396", "0.5773106", "0.5772277", "0.5758866", "0.57492065", "0.5710312" ]
0.63003534
1
Function to get an attribute store for Shibalike
private function getAttrStore() { return new \Shibalike\Attr\Store\ArrayStore(config('shibboleth.emulate_idp_users')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStore();", "public function getStore();", "public abstract function getAttributeManager();", "public function getStore()\n {\n }", "public function store()\r\n {\r\n // Object UUID, meta_type, and type are used as keys in all storage systems\r\n \r\n // Loop through attributes\r\n // Storage is based on attribute and attribute_group\r\n // By default the full attribute values are stored in the object based storage systems.\r\n\r\n ///////////////////////////////////////////////////////////////////////\r\n // Storing Attributes in object storage systems\r\n //\r\n // The attributes will already be in the proper format.\r\n // ['attributes']\r\n // ['name'] = array\r\n // ['common_name'][1] = ['John Doe']\r\n // ['biometric'] = array\r\n // ['height']['inches'][1] = '72',\r\n // ['weight']['pounds'][1] = '200'\r\n // ['social'] = array\r\n // ['sports']['played'][1] = array('golf','darts','pool'),\r\n // ['sports']['watched'][1] = array('football','ufc'),\r\n //\r\n // VS\r\n //\r\n // ['social'] = array\r\n // ['sports']['played'][1] = 'golf',\r\n // ['sports']['played'][2] = 'darts',\r\n // ['sports']['played'][3] = 'pool',\r\n // ['sports']['watched'][1] = 'football'\r\n // ['sports']['watched'][2] = 'ufc',\r\n // ['favorite']['movies'][1] = 'Blue Velvet',\r\n // ['favorite']['movies'][2] = 'Princess Bride',\r\n //\r\n\r\n\r\n \r\n ///////////////////////////////////////////////////////////////////////\r\n // Storing Attributes in relational storage systems\r\n // \r\n // The Object UUID maps to object.uuid\r\n // Attribute group maps to attribute_group.code\r\n // Attribute maps to attribute.code\r\n //\r\n // Attributes belong to one attribute_group.\r\n // Attribute groups belong to one object meta_type.\r\n // This means a \"name\" attribute for a party is NOT the same as a \"name\" attribute for an item.\r\n //\r\n // An objects attribute values are assigned in sequence in the object_attribute_value table.\r\n // This allows any attribute to have multiple values.\r\n // The presentation layer needs to agree with the backend on what duplicate sequence values mean.\r\n // \r\n // The actual UTF8 string that represents the value assignment is through reference to a row in the \"data\" table.\r\n // This allows the application level logic to decide if it wants to share data assignments between objects and attributes.\r\n //\r\n // ['social'] = array\r\n // ['sports']['played'][1] = array('golf','darts','pool'),\r\n // ['sports']['watched'][1] = array('football','ufc'),\r\n //\r\n // There needs to be a \"social\" attribute_group.code\r\n // The sub-typed attribute names are appended with double underscores to create a flattened variable name.\r\n // ['sports']['played'] and ['sports']['watched'] become 'sports__played' and 'sports__watched'.\r\n // Which means you can't use double undercores in attribute names.\r\n // Those attribute names are persisted in attribute.code.\r\n //\r\n // So...\r\n //\r\n // Loop through attributes\r\n // For each meta_type create attribute_group.code record, then loop through types.\r\n // For each type create attribute.code record.\r\n // Create object_attribute record for object and attribute\r\n // Create object_attribute_value records as needed\r\n //\r\n //\r\n // \r\n \r\n \r\n // Loop through relations\r\n // Storage is based on relation type\r\n // By default the relations and relation attributes are stored in the relational storage systems.\r\n \r\n ///////////////////////////////////////////////////////////////////////\r\n // Storing Relations \r\n // \r\n // The Object UUID maps to object.uuid\r\n // Relation type code maps to relation_type.code\r\n // Related object UUID maps to a object.uuid\r\n // The \"relation\" table maps a related_object to a an object using a relation_type.\r\n //\r\n // \r\n \r\n \r\n }", "public function getStore()\n {\n return $this->get(self::store);\n }", "public function getStore()\n {\n\n\n }", "function acf_get_store( $name = '' ) {\n\treturn acf_instances()->get( \"ACF_Store_$name\" );\n}", "private function getStore()\n {\n return $this->getData('store');\n }", "protected function _getAttributeSet () {\n return Mage::registry('current_attribute_set');\n }", "public static function attributeMap();", "public static function attributeMap();", "public static function attributeMap();", "public static function attributeMap();", "public static function attributeMap();", "public static function attributeMap();", "public function getMagentoAttributes();", "public static function getStore()\n {\n return \\Cache::getStore();\n }", "private function getCacheAttributes ()\n\t{\n\t\t\n\t\t$attributes\t= array ();\n\n\t\tforeach (array_keys (self::$attributes) as $name)\n\t\t{\n\t\t\t$attributes[$name]\t= $this->iget ($name);\n\t\t}\n\t\t\n\t\treturn $attributes;\n\t\t\n\t}", "public function getAttributeObject()\n {\n return Mage::registry('entity_attribute');\n }", "public function getMagentoAttributesByType();", "public function getStore()\n {\n return $this->get('store');\n }", "abstract public function getAttributes();", "public function getStore()\n {\n return $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store;\n }", "abstract public function attributes(): array;", "public function getStore()\n {\n return Mage::app()->getStore($this->getStoreId());\n }", "public function getStores();", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;" ]
[ "0.6375054", "0.6375054", "0.6103795", "0.6096516", "0.6035029", "0.60244787", "0.5982013", "0.5965987", "0.57996726", "0.57732844", "0.5765966", "0.5765966", "0.5765966", "0.5765966", "0.5765966", "0.5765966", "0.57604307", "0.5731201", "0.57163185", "0.5708582", "0.57018036", "0.5664292", "0.5648189", "0.5561918", "0.5531349", "0.54955214", "0.5488922", "0.5481866", "0.5481866", "0.5481866" ]
0.7308285
0
Gets a state manager for Shibalike
private function getStateManager() { $session = \UserlandSession\SessionBuilder::instance() ->setSavePath(sys_get_temp_dir()) ->setName('SHIBALIKE_BASIC') ->build(); return new \Shibalike\StateManager\UserlandSession($session); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStateMachine()\n {\n return $this->stateMachine;\n }", "public static function create(): IStateMachine;", "function sp()\n{\n return Yii::app()->getStatePersister();\n}", "abstract protected function getMediator(): StateMediator;", "protected function _getState()\n {\n return $this->_objectManager->get(\\Magento\\Multishipping\\Model\\Checkout\\Type\\Multishipping\\State::class);\n }", "final public function get_state(/* ... */)\n {\n return $this->_state;\n }", "public function getCurrentState(): State;", "protected function getSecurity_Authentication_ManagerService()\n {\n $this->privates['security.authentication.manager'] = $instance = new \\Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationProviderManager(new RewindableGenerator(function () {\n yield 0 => ($this->privates['security.authentication.provider.dao.admin'] ?? $this->load('getSecurity_Authentication_Provider_Dao_AdminService.php'));\n yield 1 => ($this->privates['security.authentication.provider.anonymous.admin'] ?? $this->privates['security.authentication.provider.anonymous.admin'] = new \\Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AnonymousAuthenticationProvider($this->getParameter('container.build_hash')));\n yield 2 => ($this->privates['security.authentication.provider.anonymous.main'] ?? $this->privates['security.authentication.provider.anonymous.main'] = new \\Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AnonymousAuthenticationProvider($this->getParameter('container.build_hash')));\n }, 3), true);\n\n $instance->setEventDispatcher(($this->services['event_dispatcher'] ?? $this->getEventDispatcherService()));\n\n return $instance;\n }", "function getManager();", "public function webState()\n\t\t{\n\t\t\treturn \\pficl\\Web\\State::inst();\n\t\t}", "abstract protected function getApplicationState();", "public function getShopManager() {\n\t\treturn $this -> shopManager;\n\t}", "public function state();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "abstract public function getCurrentState();", "protected function getManager()\n {\n return $this->get('app.unavailability.manager');\n }", "abstract public function state();", "function hasher(): HashManager {\n return app(HashManager::class);\n }", "function workflow_get_state($name) {\n $states = workflow_get_states();\n\n return $states[$name];\n}", "public static function generateManager(): LaramoreManager;", "public function getSessionManager(){\n if(!isset($this->_instances['session']) || !is_a($this->_instances['session'], 'ISessionManager')){\n $this->_instances['session'] = new Session();\n }\n return $this->_instances['session'];\n }", "private function getManager()\n {\n return $this->container->get(\"aisel.config.manager\");\n }", "protected function _getState()\n {\n return Mage::getSingleton('ketai/type_checkout_state');\n }", "protected function getObjectManager()\n {\n if (null == $this->objectManager) {\n $area = FrontNameResolver::AREA_CODE;\n $this->objectManager = $this->objectManagerFactory->create($_SERVER);\n /** @var State $appState */\n $appState = $this->objectManager->get('Magento\\Framework\\App\\State');\n $appState->setAreaCode($area);\n $configLoader = $this->objectManager->get('Magento\\Framework\\ObjectManager\\ConfigLoaderInterface');\n $this->objectManager->configure($configLoader->load($area));\n }\n return $this->objectManager;\n }", "private function getSm() {\r\n return $this->getEvent()->getApplication()->getServiceManager();\r\n }", "protected function getManagerInContext() {\n return new SimplesamlphpAuthManager(\n $this->configFactory,\n $this->currentUser,\n $this->adminContext,\n $this->moduleHandler,\n $this->requestStack,\n $this->messenger,\n $this->instance,\n $this->simplesamlConfig\n );\n }", "public static function buildSessionManager() {\n\t\t$sessionService = new SessionService(self::$apiKey, self::$secretKey);\n\t\treturn $sessionService;\n\t}" ]
[ "0.57291895", "0.56633604", "0.5663227", "0.5605825", "0.5587845", "0.54588866", "0.54424405", "0.54363847", "0.54053813", "0.53435385", "0.53291655", "0.5327126", "0.53144133", "0.52832794", "0.52832794", "0.52832794", "0.52832794", "0.527542", "0.52553445", "0.52438295", "0.5234262", "0.52018315", "0.5198345", "0.5173592", "0.5172631", "0.5167174", "0.51551896", "0.51388747", "0.51384664", "0.5112451" ]
0.80054516
0
Uses JWTAuth to tokenize the user and returns a URL query string.
private function tokenizeRedirect($user, $customClaims) { // This is where we used to setup a session. Now we will setup a token. $token = JWTAuth::fromUser($user, $customClaims); // We need to pass the token... how? // Let's try this. return "?token=$token"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setJwtQuery()\n {\n $jwt = $this->jwTokenManager->getJwtFromResources($this->getRequestInstance());\n\n return $jwt == null ?: 'token=' . $jwt;\n }", "public function getQuery() : string {\n switch ($this->authType) {\n case self::CREDENTIAL:\n return sprintf('credentialToken=%s', $this->getCredentialToken());\n case self::HANDLER:\n return sprintf('handlerToken=%s', $this->getHandlerToken());\n case self::IDENTITY:\n return sprintf('identityToken=%s', $this->getIdentityToken());\n }\n }", "public function getQueryString();", "public function getQueryString();", "function getUserUrl() {\n\t$url = getParam('url');\n\tif (isset($url)) {\n\t\treturn $url;\n\t}\n\treturn '';\n}", "protected function get_query_string() {\n\n\t\t$param = $this->request_parameter;\n\t\t$param[ 'oauth_signature' ] = $this->get_signature();\n\n\t\tforeach ( $param as $name => $value ) {\n\t\t\t$param[] =\n\t\t\t\t oAuth_urlencode( $name )\n\t\t\t\t. '='\n\t\t\t\t. oAuth_urlencode( $value )\n\t\t\t;\n\t\t\tunset( $param[ $name ] );\n\t\t}\n\n\t\treturn implode( '&', $param );\n\t}", "public static function getAuthUrl() {\n $queryString = http_build_query(\n array( 'client_id' => self::CLIENT_ID,\n 'response_type' => 'code',\n 'redirect_uri' => self::getAbsoluteUrl(array(\n 'controller' => 'oauth',\n 'action' => 'callback',\n 'service' => self::TYPE\n )),\n 'scope' => 'user_about_me,user_checkins,friends_checkins,publish_checkins,offline_access'\n ));\n $url = self::OAUTH_URL . '?' . $queryString;\n return $url;\n }", "public function get() {\n return $this->getAuthUrl($this->redirect_uri,$this->state);\n }", "public function user() {\n return $this->parsedUrl['user'] ?? '';\n }", "public function getAuthCallbackUrl();", "public function getSimpleAuthenticationUrl() {\r\n $config = $this->config;\r\n $params = $this->params;\r\n\r\n $channel = $this->getChannel($params, $config);\r\n if ($channel != '') {\r\n $params['channel'] = $channel;\r\n }\r\n\r\n $ts = time() . '000'; //milliseconds needed but won't be considered\r\n $authParams = \"timestamp=$ts&username=\".$config->getAuthUser()\r\n . '&password=' . md5($config->getAuthPasswort());\r\n\r\n $url = $config->getRequestProtocol() . '://'\r\n . $config->getServerAddress() . ':' . $config->getServerPort() . '/'\r\n . $config->getContext() . '/'.$this->action.'?' . http_build_query($params, '', '&')\r\n . (count($params)?'&':'') . $authParams;\r\n\r\n // The following line removes all []-indices from array parameters, because tomcat doesn't need them\r\n $url = preg_replace(\"/%5B[A-Za-z0-9]*%5D/\", \"\", $url);\r\n $this->log->info(\"Request Url: \".$url);\r\n return $url;\r\n }", "public function getAuthUrl()\n {\n $params = array(\n 'client_id' => $this->apiKey,\n 'response_type' => 'code',\n 'scope' => implode('|', $this->permissions)\n );\n\n // Only append a redirectURI if one was explicitly specified\n if ($this->redirectUri) {\n $params['redirect_uri'] = $this->redirectUri;\n }\n\n $url = 'https://www.dwolla.com/oauth/v2/authenticate?' . http_build_query($params);\n\n return $url;\n }", "public function getAuthTokenUrl();", "public function get_authentication_link() {\n\t\t$link = add_query_arg(\n\t\t\t[\n\t\t\t\t'client_id' => $this->client_id,\n\t\t\t\t'redirect_uri' => rawurlencode( $this->redirect_uri ),\n\t\t\t\t'response_type' => 'code',\n\t\t\t\t'scope' => rawurlencode( $this->scope ),\n\t\t\t],\n\t\t\tself::AUTH_URI\n\t\t);\n\n\t\treturn esc_url( $link );\n\t}", "public function getLoginUrl() {\n // Prepare data\n $data = [\n \"client_id\" => $this->clientID,\n \"redirect_uri\" => $this->redirectUri,\n \"response_type\" => \"code\",\n \"scope\" => \"user_profile,user_media\"\n ];\n \n // Buld query\n $query = http_build_query($data);\n \n // Build full URL\n $link = $this->apiBaseURI.$this->endpoints['oauth_authorize'].\"?\".$query;\n return $link;\n }", "function get () {\n $user = JWTAuth::parseToken()->authenticate();\n return $user;\n }", "public function get_username_from_querystring_or_cookie() {\n if ($this->authplugins[0]->authtype !== 'shibboleth') { // See bug 5184\n if (!empty($_GET[\"username\"])) {\n return clean_param($_GET[\"username\"], PARAM_RAW); // we do not want data from _POST here\n } else {\n return get_moodle_cookie();\n }\n }\n return '';\n }", "abstract public function getAccessTokenUrl();", "public function getRequestTokenURI();", "function oauth_str() {\r\n\t$chr = curl_init ( OAUTH_CALLBACK_URL );\r\n\tcurl_setopt ( $chr, CURLOPT_POST, TRUE );\r\n\tcurl_setopt ( $chr, CURLOPT_POSTFIELDS, user_pw () );\r\n\tcurl_setopt ( $chr, CURLOPT_RETURNTRANSFER, TRUE );\r\n\tcurl_setopt ( $chr, CURLOPT_FOLLOWLOCATION, TRUE );\r\n\t$oauthStr = curl_exec ( $chr );\r\n\tcurl_close ( $chr );\r\n\treturn trim ( strip_tags ( $oauthStr ) );\r\n}", "public function getLoginUrl($scope = ['basic']);", "public function create_auth_url() {\r\n\t\t$params = array(\r\n\t\t\t'response_type' => 'code',\r\n\t\t\t'redirect_uri' => $this->get_redirect_uri(),\r\n\t\t\t'client_id' => urlencode( $this->config['client_id'] ),\r\n\t\t\t'scope' => implode( \" \", $this->config['scopes'] ),\r\n\t\t\t'access_type' => urlencode( $this->config['access_type'] ),\r\n\t\t\t'approval_prompt' => urlencode( $this->config['approval_prompt'] )\r\n\t\t);\r\n\r\n\t\treturn self::OAUTH2_AUTH_ENDPOINT . \"?\" . http_build_query( $params );\r\n\t}", "public function getLoginUrl()\n {\n $url = $this->getBaseUrl() . Definition::PLATFORM_WOTANKS;\n $authEndpoint = '/auth/login/';\n\n $params = [\n 'application_id' => $this->applicationId,\n 'redirect_uri' =>$this->redirectUri\n ];\n return $url. $authEndpoint .'?'. http_build_query($params);\n \n }", "private function _getUserRedirect() {\n $redirects = new LoginRedirect();\n $redirect = $redirects->getConfig();\n $clean = array_flip($redirect);\n $uri = array_values($clean);\n return $uri[0];\n }", "public function getQueryString()\n\t{\n\t\treturn http_build_query($this->query);\n\t}", "public function getHttpAuthenticationUrl() {\r\n $config = $this->config;\r\n $params = $this->params;\r\n\r\n $channel = $this->getChannel($params, $config);\r\n if ($channel != '') {\r\n $params['channel'] = $channel;\r\n }\r\n\r\n $auth = $config->getAuthUser() . ':' . $config->getAuthPasswort() . '@';\r\n if ($auth == ':@') $auth = '';\r\n\r\n $url = $config->getRequestProtocol() . '://' . $auth\r\n . $config->getServerAddress() . ':' . $config->getServerPort() . '/'\r\n . $config->getContext() . '/' . $this->action . (count($params)?'?':'')\r\n . http_build_query($params, '', '&');\r\n\r\n // The following line removes all []-indices from array parameters, because tomcat doesn't need them\r\n $url = preg_replace(\"/%5B[A-Za-z0-9]*%5D/\", \"\", $url);\r\n $this->log->info(\"Request Url: \".$url);\r\n return $url;\r\n }", "public /*String*/ function getLoginUrl();", "public static function getQuery(): string;", "protected function get_redirect_query() {\n\t\t$redirect = urldecode(cl4::get_param('redirect'));\n\n\t\tif ( ! empty($redirect)) {\n\t\t\treturn URL::array_to_query(array('redirect' => $redirect), '&');\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "public function get(): string\n {\n $nonce_value = $this->nonce->get();\n $url = str_replace( '&amp;', '&', $this->url );\n $has_query_parameters = parse_url( $url, PHP_URL_QUERY );\n\n if ( $has_query_parameters ) {\n return $url.=\"&{$this->nonce_name}=$nonce_value\";\n } else {\n return $url.\"?{$this->nonce_name}=$nonce_value\";\n }\n }" ]
[ "0.57475334", "0.57202953", "0.5702298", "0.5702298", "0.56216484", "0.55941784", "0.5563356", "0.5497016", "0.54506063", "0.5433308", "0.54207635", "0.5335494", "0.532754", "0.53032863", "0.5293033", "0.52655697", "0.5230813", "0.519275", "0.51925874", "0.5190281", "0.51898277", "0.5173088", "0.5161959", "0.51462036", "0.51355696", "0.5131854", "0.5124626", "0.5114618", "0.5102851", "0.50957507" ]
0.5735566
1
Imports doctors via csv Does not make any checks, TODO check logged in
function importDoctorsCsv() { $this->load->model('doctors_model'); $this->load->model('unimodel'); $campaignID = $this->unimodel->getRunningCampaign(); $this->load->library('csvimport'); $config['upload_path'] = './uploads/'; $config['allowed_types'] = '*'; $config['max_size'] = '8000000'; $this->load->library('upload', $config); // If upload failed, display error if (!$this->upload->do_upload("userfile")) { echo $this->upload->display_errors(); } else { $file_data = $this->upload->data(); $file_path = './uploads/' . $file_data['file_name']; if ($this->csvimport->get_array($file_path)) { $csv_array = $this->csvimport->get_array($file_path); foreach ($csv_array as $row) { $insert_data = array( 'hospital' => $row['hospital'], 'name' => $row['name'], 'campaignid' => $campaignID ); //$ech = $this->Families_model->addMemberToInstituteWithData($insert_data); $id = $this->doctors_model->addDoctorToCampaign($insert_data); } } else { $passdata = array( 'Name' => 'Doctors', 'Error' => "Could not import doctors. Contact System Admin." ); //$this->load->module('Template'); //$this->Template->loadView("Home","HomeView",$passdata); $module = Modules::load('Template'); $module->loadView("Doctors", "doctors_view", $passdata); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n // Need PM course to create PM class.\n course::TABLE => elispm::file('tests/fixtures/pmcourse.csv'),\n // Need PM user to create enrolment.\n user::TABLE => elispm::file('tests/fixtures/pmusers.csv'),\n // Needed to prevent messaging errors.\n 'user' => elispm::file('tests/fixtures/mdlusers.csv'),\n // Need PM classes to create associations.\n pmclass::TABLE => elispm::file('tests/fixtures/pmclass.csv'),\n ));\n $this->loadDataSet($dataset);\n }", "protected function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n curriculum::TABLE => elispm::file('tests/fixtures/track_curriculum_available_users.csv'),\n track::TABLE => elispm::file('tests/fixtures/track_trackassignment_available_users.csv'),\n usertrack::TABLE => elispm::file('tests/fixtures/usertrack_trackassignment_available_users.csv'),\n user::TABLE => elispm::file('tests/fixtures/user_trackassignment_available_users.csv'),\n ));\n $this->loadDataSet($dataset);\n }", "protected function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n course::TABLE => elispm::file('tests/fixtures/duplicatecourse.csv'),\n pmclass::TABLE => elispm::file('tests/fixtures/duplicateclass.csv'),\n curriculum::TABLE => elispm::file('tests/fixtures/duplicatecurriculum.csv'),\n curriculumcourse::TABLE => elispm::file('tests/fixtures/duplicatecurriculum_course.csv'),\n track::TABLE => elispm::file('tests/fixtures/duplicatetrack.csv'),\n ));\n $this->loadDataSet($dataset);\n }", "protected function load_csv_data() {\n $csvloc = dirname(__FILE__).'/fixtures';\n $dataset = $this->createCsvDataSet(array(\n course::TABLE => $csvloc.'/pmcourse.csv',\n pmclass::TABLE => $csvloc.'/pmclass.csv',\n student::TABLE => $csvloc.'/student.csv',\n user::TABLE => $csvloc.'/pmuser.csv',\n ));\n $this->loadDataSet($dataset);\n }", "protected function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n curriculumcourse::TABLE => elispm::file('tests/fixtures/curriculum_course.csv'),\n track::TABLE => elispm::file('tests/fixtures/track.csv'),\n trackassignment::TABLE => elispm::file('tests/fixtures/track_assign_count_track_class.csv'),\n pmclass::TABLE => elispm::file('tests/fixtures/track_assign_count_pmclass.csv'),\n ));\n $this->loadDataSet($dataset);\n }", "public static function load_table_with_csv()\n\t{\n\t\t//GET DIRECTORY OF CSV FILES\n\t\t$path_to_cities_csv = OT_FLIGHTS_DIR . 'tables-csv/flight_cities.csv';\n\t\t$path_to_airports_csv = OT_FLIGHTS_DIR . 'tables-csv/airports.csv'; \n\n\t\t//ESCAPE SLASHES\n\t\t$path_to_cities_csv = str_replace( '/', '\\/', $path_to_cities_csv );\n\t\t$path_to_airports_csv = str_replace( '/', '\\/', $path_to_airports_csv );\n\n\t\t//CHANGE USING SED PATH IN SQL COMMAND\n\t\texec(\"sed -i -e \\\"s/.\\+flight_cities.\\+/'\".$path_to_cities_csv.\"'/g\\\" /var/www/omnia/wp-content/plugins/ot-flights/tables-csv/import.sql\");\n\t\texec(\"sed -i -e \\\"s/.\\+\\/airports.\\+/'\".$path_to_airports_csv.\"'/g\\\" /var/www/omnia/wp-content/plugins/ot-flights/tables-csv/import.sql\");\n\n\t\texec(\"mysql -u'\" . DB_USER . \"' --password='\" . DB_PASSWORD . \"' '\" . DB_NAME . \"' < \" . __DIR__ . \"/../tables-csv/import.sql\");\n\t}", "public function transferCSVFile() {\r\n TempImportRecord::finder()->deleteAll('user_name = ?',$this->user->Name);\r\n //laden des Wertearrays\r\n $this->loadCSVFile();\r\n foreach($this->ImportedValues As $row) {\r\n $NewTIRow = new TempImportRecord;\r\n $NewTIRow->user_name = $this->user->Name;\r\n $NewTIRow->ti_name = $this->MappingName->Text;\r\n foreach($this->MyMapping AS $key=>$value) {\r\n $NewTIRow->{$value} = $row[$key];\r\n }\r\n $NewTIRow->save();\r\n }\r\n $this->CopyTempImport();\r\n }", "function getServices() {\n return lireCSV(\"services.csv\");\n}", "public function globo_exim_csv_load() {\n\t\tset_time_limit(0);\n\t\t\n\t\t//no more cache\n\t\twp_suspend_cache_invalidation ( true );\n\n\t\t//disable term counting\n\t\twp_defer_term_counting( true ) ;\n\t\t$post_data = $_POST;\n\t\t \t\n \t$filename = $post_data['filename'];\n\n \trequire_once( GEI_DIR . '/includes/parsecsv.lib.php' );\n \t$csv = new parseCSV($filename);\n \t\n\n \t$company_items = array(\n \t\tarray(\n\t\t\t\t'title' => 'Profile',\n\t\t\t\t'type' => 'profile'\n\t \t),\n\t \tarray(\n\t\t\t\t'title' => 'Contact',\n\t\t\t\t'type' => 'contact'\n\t \t),\n \t);\n\t\t\n \t$count = 0;\n\t\tforeach ($csv->data as $company) {\n\t\t\t\n\t\t\t$industry_id = '';\n\t\t\tif( isset( $company['industry'] ) && !empty( $company['industry'] ) ){\n\t\t\t\t$parent_term = term_exists( $company['industry'], 'industry' ); // find parent term\n\n\t\t\t\tif( !empty($parent_term)) {\n\t\t\t\t\t$industry_id = $parent_term['term_id'];\n\t\t\t\t} else {\n\t\t\t\t\t$industry_term = wp_insert_term( $company['industry'], 'industry' );\n\t\t\t\t\t$industry_id = $industry_term['term_id'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$company_address = '';\n\n\t\t\tif( isset( $company['company_address'] ) && !empty( $company['company_address'] ) ){\n\t\t\t\t$company_address = $company['company_address'];\n\t\t\t}\n\n\t\t\t$post_title = '';\n\t\t\t\n\t\t\tif( isset( $company['post_title'] ) && !empty( $company['post_title'] ) ){\n\t\t\t\t$post_title = $company['post_title'];\n\t\t\t}\n\n\t\t\t$company_lattitude = '';\n\n\t\t\tif( isset( $company['company_lattitude'] ) && !empty( $company['company_lattitude'] ) ){\n\t\t\t\t$company_lattitude = $company['company_lattitude'];\n\t\t\t}\n\n\t\t\t$company_longitude = '';\n\n\t\t\tif( isset( $company['company_longitude'] ) && !empty( $company['company_longitude'] ) ){\n\t\t\t\t$company_longitude = $company['company_longitude'];\n\t\t\t}\n\n\t\t\t$company_city = '';\n\n\t\t\tif( isset( $company['company_city'] ) && !empty( $company['company_city'] ) ){\n\t\t\t\t$company_city = $company['company_city'];\n\t\t\t}\n\n\t\t\t$company_country = '';\n\n\t\t\tif( isset( $company['company_country'] ) && !empty( $company['company_city'] ) ){\n\t\t\t\t$company_country = $company['company_country'];\n\t\t\t}\n\n\t\t\t$post_content = '';\n\n\t\t\tif( isset( $company['post_content'] ) && !empty( $company['post_content'] ) ){\n\t\t\t\t$post_content = $company['post_content'];\n\t\t\t}\n\n\t\t\t$company_slogan = '';\n\n\t\t\tif( isset( $comapny['company_slogan'] ) && !empty( $comapny['company_slogan'] ) ){\n\t\t\t\t$company_slogan = $comapny['company_slogan'];\n\t\t\t}\n\n\t\t\t$company_founded = '';\n\n\t\t\tif( isset( $company['company_founded'] ) && !empty( $company['company_founded'] ) ){\n\t\t\t\t$company_founded = $company['company_founded'];\n\t\t\t}\n\n\t\t\t$legal_entity = '';\n\n\t\t\tif( isset( $company['legal_entity'] ) && !empty( $company['legal_entity'] ) ){\n\t\t\t\t$legal_entity = $company['legal_entity'];\n\t\t\t}\n\n\t\t\t$turnover = '';\n\n\t\t\tif( isset( $company['turnover'] ) && !empty( $company['turnover'] ) ){\n\t\t\t\t$turnover = $company['turnover'];\n\t\t\t}\n\n\t\t\t$employs = '';\n\n\t\t\tif( isset( $company['employs'] ) && !empty( $company['employs'] ) ){\n\t\t\t\t$employs = $company['employs'];\n\t\t\t}\n\n\t\t\t$post_status = 'draft';\n\n\t\t\tif( isset( $company['post_status'] ) && !empty( $company['post_status'] ) ){\n\t\t\t\t$post_status = $company['post_status'];\n\t\t\t}\n\n\t\t\t$comment_status = 'open';\n\n\t\t\tif( isset( $company['comment_status'] ) && !empty( $company['comment_status'] ) ){\n\t\t\t\t$comment_status = $company['comment_status'];\n\t\t\t}\n\n\t\t\t// Create new post\n\t\t\t$new_post = array(\n\t\t\t\t'post_title' => $post_title,\n\t\t\t\t'post_content' => $post_content,\n\t\t\t\t'post_status' => $post_status,\n\t\t\t\t'post_date' => date('Y-m-d H:i:s'),\n\t\t\t\t// 'post_author' => $company['post_author'],\n\t\t\t\t'post_type' => 'company',\n\t\t\t\t'comment_status' => $comment_status,\n\t );\n\n\t $post_id = wp_insert_post($new_post);\n\n\t\t\t$company_logo = '';\n\t\t\t\n\t\t\tif( isset( $company['company_logo'] ) && !empty( $company['company_logo'] ) ){\n\n\t\t\t\t$company_logo = $this->gei_image_ulpoad( $post_id, $company['company_logo'] );\n\t\t\t}\n\n\n\t\t\t$company_cover = '';\n\n\t\t\tif( isset( $company['company_cover'] ) && !empty( $company['company_cover'] ) ){\n\t\t\t\t\n\t\t\t\t$company_cover = $this->gei_image_ulpoad( $post_id, $company['company_cover'] );\n\n\t\t\t}\n\n\t\t\t$company_for_edit = array(\n\t\t\t\t'main' => array(\n\n\t\t\t\t\t'company_name' => $post_title,\n\t\t\t\t\t'industry' => $industry_id,\n\t\t\t\t\t'company_address' => $company_address,\n\t\t\t\t\t'company_lattitude' => $company_lattitude,\n\t\t\t\t\t'company_longitude' => $company_longitude,\n\t\t\t\t\t'company_city' => $company_city,\n\t\t\t\t\t'company_country' => $company_country,\n\t\t\t\t\t'company_description' => $post_content,\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t),\n\t\t\t\t'items' => $company_items,\n\t\t\t\t'company' => array(\n\t\t\t\t\t'company_slogan' => $company_slogan,\n\t\t\t\t\t'company_founded' => $company_founded,\n\t\t\t\t\t'legal_entity' => $legal_entity,\n\t\t\t\t\t'turnover' => $turnover,\n\t\t\t\t\t'employs' => $employs,\n\t\t\t\t\t'company_logo' => $company_logo,\n\t\t\t\t\t'company_cover' => $company_cover,\n\t\t\t\t)\n\t\t\t);\n\n\t if( !empty( $post_title ) ) {\n\t \tupdate_post_meta($post_id, 'company_name', $post_title);\t\n\t }\n \t\n \tif( !empty( $company_slogan ) ) {\n \t\tupdate_post_meta($post_id, 'company_slogan', $company_slogan);\t\n \t}\n\n \tif( !empty( $post_content ) ) {\n \t\tupdate_post_meta($post_id, 'company_description', $post_content);\t\n \t}\n\n \tif( !empty( $industry_id ) ){\n \t\tupdate_post_meta($post_id, 'industry', $industry_id);\n \t\twp_set_post_terms( $post_id, $industry_id, 'industry', true );\n \t}\n \t\n \t\n \tif( !empty( $company_logo ) ) {\n \t\t\n \t\n \t\tupdate_post_meta($post_id, 'company_logo', $company_logo);\n \t}\n \t\n \tif( !empty( $company_cover ) ) {\n \t\n \t\tupdate_post_meta($post_id, 'company_cover', $company_cover);\n \t}\n \t\n\n \tif( !empty( $employs ) ) {\n \t\tupdate_post_meta($post_id, 'employs', $employs);\n \t}\n \tif( !empty( $company_address ) ) {\n \t\tupdate_post_meta($post_id, 'company_address', $company_address);\n \t}\n \t\n \tif( !empty( $company_city ) ) {\n \t\tupdate_post_meta($post_id, 'company_city', $company_city);\n \t}\n \t\n \tif( !empty( $company_country ) ) {\n \t\tupdate_post_meta($post_id, 'company_country', $company_country);\n \t}\n \t\n \tif( !empty( $company_founded ) ) {\n \t\tupdate_post_meta($post_id, 'company_founded', $company_founded);\n \t}\n \t\n \tif( !empty( $company_lattitude ) ) {\n \t\tupdate_post_meta($post_id, 'company_lattitude', $company_lattitude);\n \t}\n \t\n \tif( !empty( $company_longitude ) ) {\n \t\tupdate_post_meta($post_id, 'company_longitude', $company_longitude);\n \t}\n \t\n \tif( !empty( $legal_entity ) ) {\n \t\tupdate_post_meta($post_id, 'legal_entity', $legal_entity);\n \t}\n \t\n \tif( !empty( $turnover ) ) {\n \t\tupdate_post_meta($post_id, 'turnover', $turnover);\t\n \t}\n \t\n \tupdate_post_meta($post_id, 'company_items', $company_items);\n \tupdate_post_meta($post_id, 'company_for_edit', $company_for_edit);\n\n\t\t\t$count++;\n\t\t}\n\n\n\n\t\techo $count . \" Rows imported\";\n\n \twp_die();\n }", "function importCsv($csv_name, $id_reqs, $regfid, $validateOverride)\n{\n\tglobal $errors;\n \n\n\t//set_time_limit(0);\n \n\t// Initialize import rules for Activity Booking System\n\t$importSet = array();\n\t//$importSet[] = \"../import/$csv_name.csv\";\n\t$importSet[] = $csv_name;\n\n\timportCsvSetup($importSet, $id_reqs); // will be false on blank templates and user profile templates\n\n\n\n\tif((is_array($id_reqs) AND !isset($importSet[7]['idreqs'])) OR ($regfid == $importSet[4] AND !is_array($id_reqs) AND (!isset($importSet[7]['username']) OR !isset($importSet[7]['fullname']) OR !isset($importSet[7]['password']) OR !isset($importSet[7]['email']) OR !isset($importSet[7]['regcode'])))) {\n\t\t// necessary metadata columns not present in file\n\t\techo \"<br><b>csv not imported!</b><br>Required metadata columns (ie: user who made entry, ID numbers, or account information) not present in the file.\";\n\t} else {\n\n\tif(IMPORT_DEBUG)\n {\n\t\timportCsvDebug($importSet);\n }\n\n if(importCsvValidate($importSet, $id_reqs, $regfid, $validateOverride))\n {\n\n\t\t\t\n importCsvProcess($importSet, $id_reqs, $regfid, $validateOverride);\n\n\t\techo \"<script type=\\\"text/javascript\\\">\\n\";\n\t\techo \"window.opener.document.controls.forcequery.value = 1;\\n\";\n\t\techo \"window.opener.showLoading();\\n\";\n\t\techo \"</script>\\n\";\n }\n else\n {\n echo \"<br><b>csv not imported!</b>\"; \n if(!empty($errors))\n {\n echo \"<ol>\"; \n foreach($errors as $error)\n {\n echo $error; \n } \n echo \"</ol>\"; \n }\n }\n }// end of if metadata columns not present\n \n //importCsvCleanup($importSet);\n\n echo \"<br><br>\";\n\techo \"<b><a href=\\\"\\\" onclick=\\\"javascript:history.back(-1);return false;\\\">\" . _formulize_DE_IMPORT_BACK . \"</a></b></div>\"; \n}", "protected function loadCsv() {\n\t\tif (file_exists($this->csvPath)) {\n\t\t\t$this->csvContent = file_get_contents($this->csvPath);\n\t\t}\n\t}", "public function __construct()\n {\n parent::__construct('../data/Accessories.csv', 'id');\n }", "private function bulkImportUserData()\n {\n\n \n \n $csvFile = dirname(__DIR__, 4) . \"\\public\\demo_documents\\bulkimport.csv\";\n $str = file_get_contents($csvFile);\n $str = str_replace(\"<accountId>\", $GLOBALS['DS_CONFIG']['account_id'], $str);\n file_put_contents($csvFile, $str);\n \n # Step 3 start\n $bulkImport = $this->clientService->bulkImportsApi();\n $result = $bulkImport->createBulkImportAddUsersRequest(\n $this->clientService->getOrgAdminId($this->args),\n new SplFileObject($csvFile)\n );\n # Step 3 end\n\n $str = str_replace($GLOBALS['DS_CONFIG']['account_id'], \"<accountId>\", $str);\n file_put_contents($csvFile, $str);\n\n $_SESSION['import_id'] = strval($result->getId());\n\n return json_decode($result->__toString());\n }", "public function runImport()\n {\n $csv = file_get_contents($this->getCsvPath());\n $this->parseData($csv);\n }", "public function doctorsList()\r\n {\r\n // List all Doctors registered into database to display them into a select list (app\\views\\patients\\rdvPatientStep1.php)\r\n $this->praticienManager->getSubbedPraticien();\r\n }", "public function upload_csv() {\n \n // Verify if CSV import is enabled\n if ( get_option('app_planner_enable_csv_import') ) {\n \n // Save a post\n (new MidrubBaseUserAppsCollectionPlannerHelpers\\Csv)->upload_csv();\n \n }\n \n }", "public function csv_import(Request $request)\n {\n// ->withOutput($this->output).\n// (new CsvImport)->withOutput($this->output)->import('domicilios.csv');\n\n\t\t(new CsvImport)->import($request->file('file'));\n \n return redirect('/')->with('success', 'All good!');\n }", "public function run()\n {\n \t$csv= new CsvFile(base_path().'/database/seeds/csv/cat_entidad.csv', ',');\n foreach($csv AS $row) {\n \t\t$establecimiento= new Entidad;\n $establecimiento->create([\n \t\t'entidad'=> $row[0],\n\t\t\t'clave'=> $row[1],\n\t\t\t'clave_elector'=> (int)$row[2],\n\t\t\t\n \t ]);\n } //\n }", "public function globo_exim_industry_import_csv() {\n\t\tset_time_limit(0);\n\t\t\n\t\t//no more cache\n\t\twp_suspend_cache_invalidation ( true );\n\n\t\t//disable term counting\n\t\twp_defer_term_counting( true ) ;\n\t\t$post_data = $_POST;\n\t\t \t\n \t$filename = $post_data['filename'];\n\n \trequire_once( GEI_DIR . '/includes/parsecsv.lib.php' );\n \t$csv = new parseCSV($filename);\n\n \t$count = 0;\n \tforeach ($csv->data as $industry) {\n \t\t\n \t\t$pieces = explode(\">\", $industry['name']);\n\n \t\tif( count($pieces) == 1 ) {\n \t\t\t$parent_term = term_exists( $pieces[0], 'industry' ); // find parent term\n \t\t\t\n \t\t\tif( empty( $parent_term['term_id']) ) {\n \t\t\t\t\n\t\t\t\t\twp_insert_term(\n\t\t\t\t\t $pieces[0], // the term \n\t\t\t\t\t 'industry', // the taxonomy\n\t\t\t\t\t array(\n\t\t\t\t\t 'description'=> $industry['description'],\n\t\t\t\t\t 'slug' => $industry['slug'], // what to use in the url for term archive\n\t\t\t\t\t 'parent'=> 0\n\t\t\t\t\t )\n\t\t\t\t\t);\n \t\t\t}\n\n \t\t} elseif ( count($pieces) == 2 ) {\n \t\t\t$parent_term = term_exists( $pieces[0], 'industry' ); // find parent term\n\n \t\t\tif( empty( $parent_term['term_id'] ) ) {\n \t\t\t\t\n \t\t\t\t$parent_term_id = wp_insert_term($pieces[0], 'industry');\n \t\t\t\t\n\t\t\t\t\twp_insert_term(\n\t\t\t\t\t $pieces[1], // the term \n\t\t\t\t\t 'industry', // the taxonomy\n\t\t\t\t\t array(\n\t\t\t\t\t 'description'=> $industry['description'],\n\t\t\t\t\t 'slug' => $industry['slug'], // what to use in the url for term archive\n\t\t\t\t\t 'parent'=> $parent_term_id['term_id']\n\t\t\t\t\t )\n\t\t\t\t\t);\n\t\t\t\t\t\n \t\t\t} else {\n \t\t\t\t$parent_term_id = $parent_term['term_id']; // get numeric term id\t\n\n \t\t\t\twp_insert_term(\n\t\t\t\t\t $pieces[1], // the term \n\t\t\t\t\t 'industry', // the taxonomy\n\t\t\t\t\t array(\n\t\t\t\t\t 'description'=> $industry['description'],\n\t\t\t\t\t 'slug' => $industry['slug'], // what to use in the url for term archive\n\t\t\t\t\t 'parent'=> $parent_term_id\n\t\t\t\t\t )\n\t\t\t\t\t);\n \t\t\t}\n\n \t\t}\n\n \t\t$count++;\n \t}\n\n \techo $count . \" Rows imported\";\n\n \twp_die();\n }", "function command_member_import () {\n global $config_org_name;\n \n if (!user_access('contact_edit')) {\n error_register('User does not have permission: contact_edit');\n return 'index.php';\n }\n if (!user_access('member_edit')) {\n error_register('User does not have permission: member_edit');\n return 'index.php';\n }\n \n if (!array_key_exists('member-file', $_FILES)) {\n error_register('No member file uploaded');\n return 'index.php?q=members&tab=import';\n }\n \n $csv = file_get_contents($_FILES['member-file']['tmp_name']);\n \n $data = csv_parse($csv);\n \n foreach ($data as $row) {\n \n // Convert row keys to lowercase and remove spaces\n foreach ($row as $key => $value) {\n $new_key = str_replace(' ', '', strtolower($key));\n unset($row[$key]);\n $row[$new_key] = $value;\n }\n \n // Add contact\n $firstName = mysql_real_escape_string($row['firstname']);\n $middleName = mysql_real_escape_string($row['middlename']);\n $lastName = mysql_real_escape_string($row['lastname']);\n $email = mysql_real_escape_string($row['email']);\n $phone = mysql_real_escape_string($row['phone']);\n $emergencyName = mysql_real_escape_string($row['emergencyname']);\n $emergencyPhone = mysql_real_escape_string($row['emergencyphone']);\n $sql = \"\n INSERT INTO `contact`\n (`firstName`,`middleName`,`lastName`,`email`,`phone`,`emergencyName`,`emergencyPhone`)\n VALUES\n ('$firstName','$middleName','$lastName','$email','$phone','$emergencyName','$emergencyPhone')\";\n $res = mysql_query($sql);\n if (!$res) die(mysql_error());\n $cid = mysql_insert_id();\n $esc_cid = mysql_real_escape_string($cid);\n \n // Add member\n $sql = \"\n INSERT INTO `member`\n (`cid`)\n VALUES\n ('$esc_cid')\";\n $res = mysql_query($sql);\n if (!$res) die(mysql_error());\n \n // Find Username\n \n $username = $row['username'];\n $n = 0;\n while (empty($username) && $n < 100) {\n \n // Contruct test username\n $test_username = strtolower($row['firstname']{0} . $row['lastName']);\n if ($n > 0) {\n $test_username .= $n;\n }\n \n // Check whether username is taken\n $esc_test_name = mysql_real_escape_string($test_username);\n $sql = \"SELECT * FROM `user` WHERE `username`='$esc_test_name'\";\n $res = mysql_query($sql);\n if (!$res) die(mysql_error());\n $user_row = mysql_fetch_assoc($res);\n if (!$user_row) {\n $username = $test_username;\n }\n $n++;\n }\n if (empty($username)) {\n error_register('Please specify a username');\n return 'index.php?q=members&tab=import';\n }\n \n // Add user\n $user = array();\n $user['username'] = $username;\n $user['cid'] = $cid;\n user_save($user);\n \n // Add role entry\n $sql = \"SELECT `rid` FROM `role` WHERE `name`='member'\";\n $res = mysql_query($sql);\n if (!$res) die(mysql_error());\n $role_row = mysql_fetch_assoc($res);\n $esc_rid = mysql_real_escape_string($role_row['rid']);\n \n if ($role_row) {\n $sql = \"\n INSERT INTO `user_role`\n (`cid`, `rid`)\n VALUES\n ('$esc_cid', '$esc_rid')\";\n $res = mysql_query($sql);\n if (!$res) die(mysql_error());\n }\n \n // Add plan if necessary\n $esc_plan_name = mysql_real_escape_string($row['plan']);\n $sql = \"SELECT `pid` FROM `plan` WHERE `name`='$esc_plan_name'\";\n $res = mysql_query($sql);\n if (!$res) die(mysql_error());\n if (mysql_num_rows($res) < 1) {\n $sql = \"\n INSERT INTO `plan`\n (`name`, `active`)\n VALUES\n ('$esc_plan_name', '1')\n \";\n $res = mysql_query($sql);\n if (!$res) die(mysql_error());\n $pid = mysql_insert_id();\n } else {\n $plan_row = mysql_fetch_assoc($res);\n $pid = $plan_row['pid'];\n }\n \n // Add membership\n $esc_start = mysql_real_escape_string($row['startdate']);\n $esc_pid = mysql_real_escape_string($pid);\n \n $sql = \"\n INSERT INTO `membership`\n (`cid`, `pid`, `start`)\n VALUES\n ('$esc_cid', '$esc_pid', '$esc_start')\n \";\n $res = mysql_query($sql);\n if (!$res) die(mysql_error());\n \n // Notify admins\n $from = \"\\\"$config_org_name\\\" <$config_email_from>\";\n $headers = \"From: $from\\r\\nContent-Type: text/html; charset=ISO-8859-1\\r\\n\";\n if (!empty($config_email_to)) {\n $name = member_name($_POST['firstName'], $_POST['middleName'], $_POST['lastName']);\n $content = theme('member_created_email', $user['cid']);\n mail($config_email_to, \"New Member: $name\", $content, $headers);\n }\n \n // Notify user\n $confirm_url = user_reset_password_url($user['username']);\n $content = theme('member_welcome_email', $user['cid'], $confirm_url);\n mail($email, \"Welcome to $config_org_name\", $content, $headers);\n }\n \n return 'index.php?q=members';\n}", "function csv()\n {\n }", "function csv()\n {\n }", "public function importcsv()\n\n { \n return view ('admin.pages.import');\n }", "public function admin_addCSV() {\n\t\t\tadmin::addCSV();\n\t\t}", "public function run()\n {\n $csvPath = base_path() . '/' . config('app.ccvo_members_csv.file_name');\n\n $csv = fopen($csvPath , 'r');\n\n $row = 0;\n\n $organizations = [];\n\n while (($data = fgetcsv($csv, 1000, \",\")) !== FALSE) {\n $numberOfColumns = count($data);\n\n // skip reading first row\n if($row == 0) {\n $row++;\n continue;\n }\n\n for ($column = 0; $column < $numberOfColumns; $column++) {\n $dbColumn = config(\"app.ccvo_members_csv.columns.$column.name\");\n\n if($dbColumn == 'subsector_id') {\n $subsector = Subsector::where('name', $data[$column])->first();\n\n if(!isset($subsector->id))\n $subsector = Subsector::where('name', config('app.unknown_subsector.name'))->first();\n\n $organizations[$row][$dbColumn] = $subsector->id;\n\n continue;\n }\n\n $organizations[$row][$dbColumn] = $data[$column];\n }\n\n $row++;\n }\n\n fclose($csv);\n\n DB::table('organizations')->insert($organizations);\n }", "public function export(){\n\n // Create filter from contacts selected\n if(App::request()->getParams('contacts')) {\n $filter = new DBExample(array(\n 'userId' => App::session()->getUser()->id,\n 'id' => array(\n '$in' => explode(',', App::request()->getParams('contacts'))\n )\n ));\n }\n else {\n $filter = new DBExample(array(\n 'userId' => App::session()->getUser()->id,\n ));\n }\n\n // Get contacts from db\n $listContacts = HContact::getListByExample($filter, 'id', array(), array('firstName' => DB::SORT_ASC));\n\n // Create temporary file\n $tempFileName = 'contacts_' . uniqid() . '.csv';\n $file = fopen( Plugin::get('h-connect')->getPublicUserfilesDir() . $tempFileName, \"w\");\n\n $questions = HContactQuestion::getAll();\n $dataTitle = array(\n 'lastName', \n 'firstName', \n 'job', \n 'company',\n 'phoneNumber',\n 'cellNumber',\n 'personalNumber',\n 'email',\n 'address',\n 'city',\n 'postcode',\n 'country'\n );\n\n foreach ($questions as $key => $q) {\n if($q->type == 'file'){\n unset($questions[$key]);\n }\n else{\n $dataTitle[] = $q->name; \n } \n }\n\n // Write title in first line\n fputcsv($file, $dataTitle, ',');\n\n // For each contacts add data on one line\n foreach ($listContacts as $contact){\n $data = array(\n $contact->lastName, \n $contact->firstName, \n $contact->job, \n $contact->company,\n $contact->phoneNumber,\n $contact->cellNumber,\n $contact->personalNumber,\n $contact->email,\n $contact->address,\n $contact->city,\n $contact->postcode,\n $contact->country\n );\n\n foreach ($questions as $q) {\n $data[] = HContactValue::getValueByName($q->name, $contact->id);\n }\n\n fputcsv($file, $data, ',');\n }\n\n // Close file\n fclose($file);\n\n // Read data\n $data = file_get_contents(Plugin::get('h-connect')->getPublicUserfilesDir() . $tempFileName);\n\n // Remove remporaray file\n shell_exec('rm ' . Plugin::get('h-connect')->getPublicUserfilesDir() . $tempFileName);\n\n // Create response\n $response = App::response();\n $response->setContentType('text');\n $response->header('Content-Disposition', 'attachment; filename=\"contacts.csv\"');\n\n return $data;\n }", "public function _add_csv_incident_info()\n\t{\n\t\t$incident = Event::$data['incident'];\n\t\t$report_csv = \"\";\n\t\t\n\t\t//get group name incident\t\t\n\t\tif(isset($this->incident_to_groups[$incident->id]))\n\t\t{\n\t\t\t$report_csv .= \",\\\"\". $this->incident_to_groups[$incident->id] . \"\\\",\\\"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$report_csv .= \",,\\\"\";\n\t\t\t//if they aren't part of a group then don't bother\n\t\t\t//looking for group categories\n\t\t\t$report_csv .= \"\\\"\";\n\t\t\tEvent::$data['report_csv'] = $report_csv;\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//get group categories/////////////////////////////////////////////////////////////\n\t\tif(isset($this->incident_to_group_categories[$incident->id]))\n\t\t{\n\t\t\t$i = 0;\n\t\t\tforeach($this->incident_to_group_categories[$incident->id] as $title)\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\tif($i > 1){$report_csv .= \",\";}\n\t\t\t\t$report_csv .= $title;\n\t\t\t}\n\t\t}\n\n\t\t$report_csv .= \"\\\"\";\n\t\tEvent::$data['report_csv'] = $report_csv;\n\t\t\n\t}", "public function run()\n {\n\n $fdata = 'property-data.csv';\n if ( file_exists($fdata))\n $h = file_get_contents($fdata);\n else exit('Не найден файл' . realpath (__FILE__));\n $file = fopen('php://memory', 'w+');\n fwrite($file, $h);\n rewind($file);\n $dt = fgetcsv($file,1000,$this->delimetr); // first line as table header\n while(($dt = fgetcsv($file,1000,$this->delimetr)) !== FALSE) {\n DB::table('houses')->insert([\n 'name' => $dt[0],\n 'price' =>floatval($dt[1]),\n 'bedrooms' =>(int) $dt[2],\n 'bathrooms' => (int) $dt[3],\n 'storeys' =>(int) $dt[4],\n 'garages' => (int) $dt[5],\n 'created_at' => Carbon::now(),\n ]);\n\n }\n }", "public function csvsupport()\n {\n if ($this->session->userdata('email') != \"\" || NULL != $this->session->userdata('email'))\n {\n $this->load->view('member/Support/CSV/csvsupport');\n }\n else\n {\n redirect('home/');\n\t\t}\n }", "function __construct(){\n\t\t$this->data = \\Helper::loadCSVFile(\"../assets/tabular.csv\");\n\t}" ]
[ "0.65435904", "0.63726276", "0.62770474", "0.6257702", "0.62183785", "0.59987026", "0.5872678", "0.58674854", "0.5865287", "0.5840082", "0.5701049", "0.56866074", "0.56743383", "0.5651044", "0.5626522", "0.56166816", "0.5603598", "0.5560306", "0.55468965", "0.5537433", "0.5530172", "0.5530172", "0.5468915", "0.54601365", "0.5436052", "0.5385736", "0.5369972", "0.5353947", "0.53494173", "0.53470415" ]
0.69893795
0
Filter the query on the rccode column Example usage: $query>filterByRccode('fooValue'); // WHERE rccode = 'fooValue' $query>filterByRccode('%fooValue%', Criteria::LIKE); // WHERE rccode LIKE '%fooValue%'
public function filterByRccode($rccode = null, $comparison = null) { if (null === $comparison) { if (is_array($rccode)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(AliRccodeTableMap::COL_RCCODE, $rccode, $comparison); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByRccode($rccode = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($rccode)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliStockcardSTableMap::COL_RCCODE, $rccode, $comparison);\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RCountriesCallingCodesPeer::R_COUNTRY_CALLING_CODE_ID, $key, Criteria::EQUAL);\n }", "public function filterByRcode($rcode = null, $comparison = null)\n {\n if (is_array($rcode)) {\n $useMinMax = false;\n if (isset($rcode['min'])) {\n $this->addUsingAlias(AliPcTableMap::COL_RCODE, $rcode['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($rcode['max'])) {\n $this->addUsingAlias(AliPcTableMap::COL_RCODE, $rcode['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliPcTableMap::COL_RCODE, $rcode, $comparison);\n }", "public function filterByRcode($rcode = null, $comparison = null)\n {\n if (is_array($rcode)) {\n $useMinMax = false;\n if (isset($rcode['min'])) {\n $this->addUsingAlias(AliCalcPoschange2TableMap::COL_RCODE, $rcode['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($rcode['max'])) {\n $this->addUsingAlias(AliCalcPoschange2TableMap::COL_RCODE, $rcode['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliCalcPoschange2TableMap::COL_RCODE, $rcode, $comparison);\n }", "public function loadModel($id,$c)\n{\n\n$criteria = new CDbCriteria();\n$criteria->condition = \"id_perusahaan=\".$id.\" AND Substring(code_id,6,10)=\".\"'$c'\";\n$model=DataPerusahaan::model()->find($criteria);\n//$model=DataPerusahaan::model()->findByPk($id);\nif($model===null)\nthrow new CHttpException(404,'The requested page does not exist.');\nreturn $model;\n}", "public function code() {\n if(!is_null($this->code)) return $this->code;\n return $this->filterBy('type', 'code');\n }", "public function filterByCurrencyCode($value, $operator = Rule::OP_EQ)\n\t{\n\t\treturn $this->filterBy('currency_code', $value, $operator);\n\t}", "public function filterByRcode($rcode = null, $comparison = null)\n {\n if (is_array($rcode)) {\n $useMinMax = false;\n if (isset($rcode['min'])) {\n $this->addUsingAlias(AliAcTableMap::COL_RCODE, $rcode['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($rcode['max'])) {\n $this->addUsingAlias(AliAcTableMap::COL_RCODE, $rcode['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliAcTableMap::COL_RCODE, $rcode, $comparison);\n }", "public function filterByCardcode($cardcode = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($cardcode)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $cardcode)) {\n\t\t\t\t$cardcode = str_replace('*', '%', $cardcode);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(CardabilitiesPeer::CARDCODE, $cardcode, $comparison);\n\t}", "public function filterByRcode($rcode = null, $comparison = null)\n {\n if (is_array($rcode)) {\n $useMinMax = false;\n if (isset($rcode['min'])) {\n $this->addUsingAlias(AliPpvTableMap::COL_RCODE, $rcode['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($rcode['max'])) {\n $this->addUsingAlias(AliPpvTableMap::COL_RCODE, $rcode['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliPpvTableMap::COL_RCODE, $rcode, $comparison);\n }", "public function filterByRuc($ruc = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($ruc)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $ruc)) {\n\t\t\t\t$ruc = str_replace('*', '%', $ruc);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(ClientePeer::RUC, $ruc, $comparison);\n\t}", "public function setCode($value){\n return $this->setParameter('code', $value);\n }", "public function setCode($value){\n return $this->setParameter('code', $value);\n }", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('codnotafiscalprodutobarra', $this->codnotafiscalprodutobarra, false);\n $criteria->compare('codnotafiscal', $this->codnotafiscal, false);\n $criteria->compare('codprodutobarra', $this->codprodutobarra, false);\n $criteria->compare('codcfop', $this->codcfop, false);\n $criteria->compare('descricaoalternativa', $this->descricaoalternativa, true);\n $criteria->compare('quantidade', $this->quantidade, false);\n $criteria->compare('valorunitario', $this->valorunitario, false);\n $criteria->compare('valortotal', $this->valortotal, false);\n $criteria->compare('icmsbase', $this->icmsbase, false);\n $criteria->compare('icmspercentual', $this->icmspercentual, false);\n $criteria->compare('icmsvalor', $this->icmsvalor, false);\n $criteria->compare('ipibase', $this->ipibase, false);\n $criteria->compare('ipipercentual', $this->ipipercentual, false);\n $criteria->compare('ipivalor', $this->ipivalor, false);\n $criteria->compare('icmsstbase', $this->icmsstbase, false);\n $criteria->compare('icmsstpercentual', $this->icmsstpercentual, false);\n $criteria->compare('icmsstvalor', $this->icmsstvalor, false);\n $criteria->compare('csosn', $this->csosn, false);\n $criteria->compare('codnegocioprodutobarra', $this->codnegocioprodutobarra, false);\n $criteria->compare('alteracao', $this->alteracao, false);\n $criteria->compare('codusuarioalteracao', $this->codusuarioalteracao, false);\n $criteria->compare('criacao', $this->criacao, false);\n $criteria->compare('codusuariocriacao', $this->codusuariocriacao, false);\n\n if (!empty($this->codproduto)) {\n $criteria->compare('\"ProdutoBarra\".codproduto', $this->codproduto);\n $criteria->with[] = 'ProdutoBarra';\n }\n\n $criteria->with[] = 'NotaFiscal';\n $criteria->order = '\"NotaFiscal\".saida DESC, \"NotaFiscal\".codfilial ASC, \"NotaFiscal\".numero DESC';\n\n $criteria->compare('\"NotaFiscal\".codfilial', $this->codfilial);\n $criteria->compare('\"NotaFiscal\".codpessoa', $this->codpessoa);\n $criteria->compare('\"NotaFiscal\".codnaturezaoperacao', $this->codnaturezaoperacao);\n if ($saida_de = DateTime::createFromFormat(\"d/m/y\", $this->saida_de)) {\n $criteria->addCondition('\"NotaFiscal\".saida >= :saida_de');\n $criteria->params = array_merge($criteria->params, array(':saida_de' => $saida_de->format('Y-m-d')));\n }\n if ($saida_ate = DateTime::createFromFormat(\"d/m/y\", $this->saida_ate)) {\n $criteria->addCondition('\"NotaFiscal\".saida <= :saida_ate');\n $criteria->params = array_merge($criteria->params, array(':saida_ate' => $saida_ate->format('Y-m-d')));\n }\n\n\n $criteria->compare('icmscst', $this->icmscst, false);\n $criteria->compare('ipicst', $this->ipicst, false);\n $criteria->compare('piscst', $this->piscst, false);\n $criteria->compare('cofinscst', $this->cofinscst, false);\n $criteria->compare('pispercentual', $this->pispercentual, false);\n $criteria->compare('cofinspercentual', $this->cofinspercentual, false);\n $criteria->compare('csllpercentual', $this->csllpercentual, false);\n $criteria->compare('irpjpercentual', $this->irpjpercentual, false);\n $criteria->compare('pisbase', $this->pisbase, false);\n $criteria->compare('pisvalor', $this->pisvalor, false);\n $criteria->compare('cofinsbase', $this->cofinsbase, false);\n $criteria->compare('cofinsvalor', $this->cofinsvalor, false);\n $criteria->compare('csllbase', $this->csllbase, false);\n $criteria->compare('csllvalor', $this->csllvalor, false);\n $criteria->compare('irpjbase', $this->irpjbase, false);\n $criteria->compare('irpjvalor', $this->irpjvalor, false);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>array('pageSize'=>15),\n ));\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ArShiptoUserCodeTableMap::COL_ARTBSUSRCODE, $key, Criteria::EQUAL);\n }", "public function filterByCode($code, $comparison = null) {\n\t\treturn $this->filterByIntbbinacode($code, $comparison);\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('codboletoretorno',$this->codboletoretorno,true);\n\t\t$criteria->compare('codboletomotivoocorrencia',$this->codboletomotivoocorrencia,true);\n\t\t$criteria->compare('codportador',$this->codportador,true);\n\t\t$criteria->compare('dataretorno',$this->dataretorno,true);\n\t\t$criteria->compare('linha',$this->linha,true);\n\t\t$criteria->compare('nossonumero',$this->nossonumero,true);\n\t\t$criteria->compare('numero',$this->numero,true);\n\t\t$criteria->compare('valor',$this->valor,true);\n\t\t$criteria->compare('codbancocobrador',$this->codbancocobrador,true);\n\t\t$criteria->compare('agenciacobradora',$this->agenciacobradora,true);\n\t\t$criteria->compare('despesas',$this->despesas,true);\n\t\t$criteria->compare('outrasdespesas',$this->outrasdespesas,true);\n\t\t$criteria->compare('jurosatraso',$this->jurosatraso,true);\n\t\t$criteria->compare('abatimento',$this->abatimento,true);\n\t\t$criteria->compare('desconto',$this->desconto,true);\n\t\t$criteria->compare('pagamento',$this->pagamento,true);\n\t\t$criteria->compare('jurosmora',$this->jurosmora,true);\n\t\t$criteria->compare('protesto',$this->protesto,true);\n\t\t$criteria->compare('codtitulo',$this->codtitulo,true);\n\t\t$criteria->compare('arquivo',$this->arquivo,true);\n\t\t$criteria->compare('alteracao',$this->alteracao,true);\n\t\t$criteria->compare('codusuarioalteracao',$this->codusuarioalteracao,true);\n\t\t$criteria->compare('criacao',$this->criacao,true);\n\t\t$criteria->compare('codusuariocriacao',$this->codusuariocriacao,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RegcodeTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "public function searchByFilter()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->programkerja_id)){\n\t\t\t$criteria->addCondition('programkerja_id = '.$this->programkerja_id);\n\t\t}\n\t\t$criteria->compare('LOWER(programkerja_kode)',strtolower($this->programkerja_kode),true);\n\t\t$criteria->compare('LOWER(programkerja_nama)',strtolower($this->programkerja_nama),true);\n\t\t$criteria->compare('LOWER(programkerja_ket)',strtolower($this->programkerja_ket),true);\n\t\tif(!empty($this->programkerja_nourut)){\n\t\t\t$criteria->addCondition('programkerja_nourut = '.$this->programkerja_nourut);\n\t\t}\n\t\tif(!empty($this->subprogramkerja_id)){\n\t\t\t$criteria->addCondition('subprogramkerja_id = '.$this->subprogramkerja_id);\n\t\t}\n\t\t$criteria->compare('LOWER(subprogramkerja_kode)',strtolower($this->subprogramkerja_kode),true);\n\t\t$criteria->compare('LOWER(subprogramkerja_nama)',strtolower($this->subprogramkerja_nama),true);\n\t\t$criteria->compare('LOWER(subprogramkerja_ket)',strtolower($this->subprogramkerja_ket),true);\n\t\tif(!empty($this->subprogramkerja_nourut)){\n\t\t\t$criteria->addCondition('subprogramkerja_nourut = '.$this->subprogramkerja_nourut);\n\t\t}\n\t\tif(!empty($this->kegiatanprogram_id)){\n\t\t\t$criteria->addCondition('kegiatanprogram_id = '.$this->kegiatanprogram_id);\n\t\t}\n\t\t$criteria->compare('LOWER(kegiatanprogram_kode)',strtolower($this->kegiatanprogram_kode),true);\n\t\t$criteria->compare('LOWER(kegiatanprogram_nama)',strtolower($this->kegiatanprogram_nama),true);\n\t\t$criteria->compare('LOWER(kegiatanprogram_ket)',strtolower($this->kegiatanprogram_ket),true);\n\t\tif(!empty($this->kegiatanprogram_nourut)){\n\t\t\t$criteria->addCondition('kegiatanprogram_nourut = '.$this->kegiatanprogram_nourut);\n\t\t}\n\t\tif(!empty($this->subkegiatanprogram_id)){\n\t\t\t$criteria->addCondition('subkegiatanprogram_id = '.$this->subkegiatanprogram_id);\n\t\t}\n\t\t$criteria->compare('LOWER(subkegiatanprogram_kode)',strtolower($this->subkegiatanprogram_kode),true);\n\t\t$criteria->compare('LOWER(subkegiatanprogram_nama)',strtolower($this->subkegiatanprogram_nama),true);\n\t\t$criteria->compare('LOWER(subkegiatanprogram_ket)',strtolower($this->subkegiatanprogram_ket),true);\n\t\tif(!empty($this->subkegiatanprogram_nourut)){\n\t\t\t$criteria->addCondition('subkegiatanprogram_nourut = '.$this->subkegiatanprogram_nourut);\n\t\t}\n\t\tif(!empty($this->rekening1debit_id)){\n\t\t\t$criteria->addCondition('rekening1debit_id = '.$this->rekening1debit_id);\n\t\t}\n\t\t$criteria->compare('LOWER(rekening1debit_kode)',strtolower($this->rekening1debit_kode),true);\n\t\t$criteria->compare('LOWER(rekening1debit_nama)',strtolower($this->rekening1debit_nama),true);\n\t\tif(!empty($this->rekening2debit_id)){\n\t\t\t$criteria->addCondition('rekening2debit_id = '.$this->rekening2debit_id);\n\t\t}\n\t\t$criteria->compare('LOWER(rekening2debit_kode)',strtolower($this->rekening2debit_kode),true);\n\t\t$criteria->compare('LOWER(rekening2debit_nama)',strtolower($this->rekening2debit_nama),true);\n\t\tif(!empty($this->rekening3debit_id)){\n\t\t\t$criteria->addCondition('rekening3debit_id = '.$this->rekening3debit_id);\n\t\t}\n\t\t$criteria->compare('LOWER(rekening3debit_kode)',strtolower($this->rekening3debit_kode),true);\n\t\t$criteria->compare('LOWER(rekening3debit_nama)',strtolower($this->rekening3debit_nama),true);\n\t\tif(!empty($this->rekening4debit_id)){\n\t\t\t$criteria->addCondition('rekening4debit_id = '.$this->rekening4debit_id);\n\t\t}\n\t\t$criteria->compare('LOWER(rekening4debit_kode)',strtolower($this->rekening4debit_kode),true);\n\t\t$criteria->compare('LOWER(rekening4debit_nama)',strtolower($this->rekening4debit_nama),true);\n\t\tif(!empty($this->rekening5debit_id)){\n\t\t\t$criteria->addCondition('rekening5debit_id = '.$this->rekening5debit_id);\n\t\t}\n\t\t$criteria->compare('LOWER(rekening5debit_kode)',strtolower($this->rekening5debit_kode),true);\n\t\t$criteria->compare('LOWER(rekening5debit_nama)',strtolower($this->rekening5debit_nama),true);\n\t\tif(!empty($this->rekening1kredit_id)){\n\t\t\t$criteria->addCondition('rekening1kredit_id = '.$this->rekening1kredit_id);\n\t\t}\n\t\t$criteria->compare('LOWER(rekening1kredit_kode)',strtolower($this->rekening1kredit_kode),true);\n\t\t$criteria->compare('LOWER(rekening1kredit_nama)',strtolower($this->rekening1kredit_nama),true);\n\t\tif(!empty($this->rekening2kredit_id)){\n\t\t\t$criteria->addCondition('rekening2kredit_id = '.$this->rekening2kredit_id);\n\t\t}\n\t\t$criteria->compare('LOWER(rekening2kredit_kode)',strtolower($this->rekening2kredit_kode),true);\n\t\t$criteria->compare('LOWER(rekening2kredit_nama)',strtolower($this->rekening2kredit_nama),true);\n\t\tif(!empty($this->rekening3kredit_id)){\n\t\t\t$criteria->addCondition('rekening3kredit_id = '.$this->rekening3kredit_id);\n\t\t}\n\t\t$criteria->compare('LOWER(rekening3kredit_kode)',strtolower($this->rekening3kredit_kode),true);\n\t\t$criteria->compare('LOWER(rekening3kredit_nama)',strtolower($this->rekening3kredit_nama),true);\n\t\tif(!empty($this->rekening4kredit_id)){\n\t\t\t$criteria->addCondition('rekening4kredit_id = '.$this->rekening4kredit_id);\n\t\t}\n\t\t$criteria->compare('LOWER(rekening4kredit_kode)',strtolower($this->rekening4kredit_kode),true);\n\t\t$criteria->compare('LOWER(rekening4kredit_nama)',strtolower($this->rekening4kredit_nama),true);\n\t\tif(!empty($this->rekening5kredit_id)){\n\t\t\t$criteria->addCondition('rekening5kredit_id = '.$this->rekening5kredit_id);\n\t\t}\n\t\t$criteria->compare('LOWER(rekening5kredit_kode)',strtolower($this->rekening5kredit_kode),true);\n\t\t$criteria->compare('LOWER(rekening5kredit_nama)',strtolower($this->rekening5kredit_nama),true);\n\t\t\n $criteria->compare('subkegiatanprogram_aktif', $this->subkegiatanprogram_aktif);\n $criteria->compare('programkerja_aktif', $this->programkerja_aktif);\n $criteria->compare('subprogramkerja_aktif', $this->subprogramkerja_aktif);\n $criteria->compare('kegiatanprogram_aktif', $this->kegiatanprogram_aktif);\n//$criteria->order = 'programkerja_id,subprogramkerja_id,kegiatanprogram_id,subkegiatanprogram_id';\n\t\t\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n\t}", "public function code($query = \"\")\n {\n return $this->builder->where('code', 'like', '%'.$query.'%');\n }", "public function filterByPrimaryKey($key)\n {\n throw new LogicException('The AliRccode object has no primary key');\n }", "public function searchByCode(string $code): void {\n $this->requestParams['code'] = $code;\n }", "public function getRegNoFilter($value) {\n $studentRegNoQuery = \"SELECT p.es_preadmissionid FROM dlvry_preadmission p WHERE p.status!='inactive' AND p.pre_status='active' and p.es_preadmissionid LIKE '%$value%' \";\n $studentRegNoData = $this->db->query($studentRegNoQuery);\n $studentRegNoResult = $studentRegNoData->result_array();\n return $studentRegNoResult;\n }", "protected function code($value)\n {\n if ($value) {\n return $this->builder->where('code', 'like', \"%$value%\");\n }\n\n return $this->builder;\n }", "public function setCode($value)\n {\n return $this->setParameter('code', $value);\n }", "public function filterByClienteRfc($clienteRfc = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($clienteRfc)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $clienteRfc)) {\n $clienteRfc = str_replace('*', '%', $clienteRfc);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(ClientePeer::CLIENTE_RFC, $clienteRfc, $comparison);\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('code_name',$this->code_name,true);\n\t\t$criteria->compare('display_name',$this->display_name,true);\n\t\t$criteria->compare('display_name_ascii',$this->display_name_ascii,true);\n\t\t$criteria->compare('original_title',$this->original_title,true);\n\t\t$criteria->compare('tags',$this->tags,true);\n\t\t$criteria->compare('short_description',$this->short_description,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('view_count',$this->view_count);\n\t\t$criteria->compare('like_count',$this->like_count);\n\t\t$criteria->compare('dislike_count',$this->dislike_count);\n\t\t$criteria->compare('rating',$this->rating);\n\t\t$criteria->compare('rating_count',$this->rating_count);\n\t\t$criteria->compare('comment_count',$this->comment_count);\n\t\t$criteria->compare('favorite_count',$this->favorite_count);\n\t\t$criteria->compare('is_series',$this->is_series);\n\t\t$criteria->compare('episode_count',$this->episode_count);\n\t\t$criteria->compare('duration',$this->duration);\n\t\t$criteria->compare('is_multibitrate',$this->is_multibitrate);\n\t\t$criteria->compare('vod_stream_count',$this->vod_stream_count);\n\t\t$criteria->compare('is_free',$this->is_free);\n\t\t$criteria->compare('price',$this->price);\n\t\t$criteria->compare('price_download',$this->price_download);\n\t\t$criteria->compare('price_gift',$this->price_gift);\n\t\t$criteria->compare('image_count',$this->image_count);\n\t\t$criteria->compare('expiry_date',$this->expiry_date,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('modify_date',$this->modify_date,true);\n\t\t$criteria->compare('create_user_id',$this->create_user_id,true);\n\t\t$criteria->compare('modify_user_id',$this->modify_user_id,true);\n\t\t$criteria->compare('honor',$this->honor);\n\t\t$criteria->compare('min_app_version_platform_id',$this->min_app_version_platform_id);\n\t\t$criteria->compare('content_provider_id',$this->content_provider_id);\n\t\t$criteria->compare('using_duration',$this->using_duration);\n\t\t$criteria->compare('approve_date',$this->approve_date,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->pengirimanrm_id)){\n\t\t\t$criteria->addCondition('pengirimanrm_id = '.$this->pengirimanrm_id);\n\t\t}\n\t\tif(!empty($this->peminjamanrm_id)){\n\t\t\t$criteria->addCondition('peminjamanrm_id = '.$this->peminjamanrm_id);\n\t\t}\n\t\tif(!empty($this->pasien_id)){\n\t\t\t$criteria->addCondition('pasien_id = '.$this->pasien_id);\n\t\t}\n\t\t$criteria->compare('LOWER(no_rekam_medik)',strtolower($this->no_rekam_medik),true);\n\t\t$criteria->compare('LOWER(tgl_rekam_medik)',strtolower($this->tgl_rekam_medik),true);\n\t\t$criteria->compare('LOWER(namadepan)',strtolower($this->namadepan),true);\n\t\t$criteria->compare('LOWER(nama_pasien)',strtolower($this->nama_pasien),true);\n\t\t$criteria->compare('LOWER(nama_bin)',strtolower($this->nama_bin),true);\n\t\t$criteria->compare('LOWER(jeniskelamin)',strtolower($this->jeniskelamin),true);\n\t\t$criteria->compare('LOWER(tempat_lahir)',strtolower($this->tempat_lahir),true);\n\t\t$criteria->compare('LOWER(tanggal_lahir)',strtolower($this->tanggal_lahir),true);\n\t\t$criteria->compare('LOWER(alamat_pasien)',strtolower($this->alamat_pasien),true);\n\t\tif(!empty($this->pendaftaran_id)){\n\t\t\t$criteria->addCondition('pendaftaran_id = '.$this->pendaftaran_id);\n\t\t}\n\t\tif(!empty($this->dokrekammedis_id)){\n\t\t\t$criteria->addCondition('dokrekammedis_id = '.$this->dokrekammedis_id);\n\t\t}\n\t\tif(!empty($this->ruangantujuan_id)){\n\t\t\t$criteria->addCondition('ruangantujuan_id = '.$this->ruangantujuan_id);\n\t\t}\n\t\t$criteria->compare('LOWER(ruangantujuan_nama)',strtolower($this->ruangantujuan_nama),true);\n\t\tif(!empty($this->instalasitujuan_id)){\n\t\t\t$criteria->addCondition('instalasitujuan_id = '.$this->instalasitujuan_id);\n\t\t}\n\t\t$criteria->compare('LOWER(instalasitujuan_nama)',strtolower($this->instalasitujuan_nama),true);\n\t\t$criteria->compare('LOWER(nourut_keluar)',strtolower($this->nourut_keluar),true);\n\t\t$criteria->compare('LOWER(tglpengirimanrm)',strtolower($this->tglpengirimanrm),true);\n\t\t$criteria->compare('kelengkapandokumen',$this->kelengkapandokumen);\n\t\t$criteria->compare('LOWER(petugaspengirim)',strtolower($this->petugaspengirim),true);\n\t\t$criteria->compare('printpengiriman',$this->printpengiriman);\n\t\tif(!empty($this->ruanganpengirim_id)){\n\t\t\t$criteria->addCondition('ruanganpengirim_id = '.$this->ruanganpengirim_id);\n\t\t}\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\t$criteria->compare('LOWER(create_loginpemakai_id)',strtolower($this->create_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(update_loginpemakai_id)',strtolower($this->update_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(create_ruangan)',strtolower($this->create_ruangan),true);\n\t\tif(!empty($this->kembalirm_id)){\n\t\t\t$criteria->addCondition('kembalirm_id = '.$this->kembalirm_id);\n\t\t}\n\t\t$criteria->compare('LOWER(tglkembali)',strtolower($this->tglkembali),true);\n\t\t$criteria->compare('LOWER(no_pendaftaran)',strtolower($this->no_pendaftaran),true);\n\t\t$criteria->compare('LOWER(tgl_pendaftaran)',strtolower($this->tgl_pendaftaran),true);\n\t\t$criteria->compare('LOWER(statusdokrm)',strtolower($this->statusdokrm),true);\n\n\t\treturn $criteria;\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cp_id',$this->cp_id);\n\n\t\t$criteria->compare('cp_name',$this->cp_name,true);\n/*\n\t\t$criteria->compare('cp_englishname',$this->cp_englishname,true);\n\n\t\t$criteria->compare('cp_pinyinshortname',$this->cp_pinyinshortname,true);\n\n\t\t$criteria->compare('cp_pinyinlongname',$this->cp_pinyinlongname,true);\n\n\t\t$criteria->compare('cp_district',$this->cp_district);\n\n\t\t$criteria->compare('cp_address',$this->cp_address,true);\n\n\t\t$criteria->compare('cp_avgrentprice',$this->cp_avgrentprice);\n\n\t\t$criteria->compare('cp_developer',$this->cp_developer,true);\n\n\t\t$criteria->compare('cp_propertyprice',$this->cp_propertyprice);\n\n\t\t$criteria->compare('cp_propertyname',$this->cp_propertyname,true);\n\n\t\t$criteria->compare('cp_openingtime',$this->cp_openingtime);\n\n\t\t$criteria->compare('cp_defanglv',$this->cp_defanglv);\n\n\t\t$criteria->compare('cp_area',$this->cp_area);\n\n\t\t$criteria->compare('cp_fengearea',$this->cp_fengearea,true);\n\n\t\t$criteria->compare('cp_floorheight',$this->cp_floorheight,true);\n\n\t\t$criteria->compare('cp_form',$this->cp_form,true);\n\n\t\t$criteria->compare('cp_introduce',$this->cp_introduce,true);\n\n\t\t$criteria->compare('cp_traffic',$this->cp_traffic,true);\n\n\t\t$criteria->compare('cp_carport',$this->cp_carport,true);\n\n\t\t$criteria->compare('cp_propertyserver',$this->cp_propertyserver,true);\n\n\t\t$criteria->compare('cp_roommating',$this->cp_roommating,true);\n\n\t\t$criteria->compare('cp_peripheral',$this->cp_peripheral,true);\n\n\t\t$criteria->compare('cp_x',$this->cp_x,true);\n\n\t\t$criteria->compare('cp_y',$this->cp_y,true);\n*/\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function filterById($code, $comparison = null) {\n\t\treturn $this->filterByCode($code, $comparison);\n\t}" ]
[ "0.60913455", "0.5689312", "0.56145597", "0.5380978", "0.53392273", "0.5334856", "0.5287633", "0.5260686", "0.522443", "0.5189119", "0.51731807", "0.5110227", "0.5110227", "0.5101571", "0.50991565", "0.50873286", "0.5056335", "0.50391", "0.49888638", "0.49711564", "0.48819426", "0.48658574", "0.4842331", "0.48321095", "0.4824463", "0.48136032", "0.47978324", "0.4793077", "0.47902212", "0.4765291" ]
0.59673154
1
Filter the query on the rccode_desc column Example usage: $query>filterByRccodeDesc('fooValue'); // WHERE rccode_desc = 'fooValue' $query>filterByRccodeDesc('%fooValue%', Criteria::LIKE); // WHERE rccode_desc LIKE '%fooValue%'
public function filterByRccodeDesc($rccodeDesc = null, $comparison = null) { if (null === $comparison) { if (is_array($rccodeDesc)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(AliRccodeTableMap::COL_RCCODE_DESC, $rccodeDesc, $comparison); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByTermcodedesc($termcodedesc = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($termcodedesc)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(OrdrhedTableMap::COL_TERMCODEDESC, $termcodedesc, $comparison);\n }", "public function filterByPricecodedesc($pricecodedesc = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($pricecodedesc)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(OrdrhedTableMap::COL_PRICECODEDESC, $pricecodedesc, $comparison);\n }", "public function searchPoItemDescAction($desc, $minDate, $maxDate)\n {\n\t$filterDate = PoManagerControllerUtility::convertDateFilter($minDate, $maxDate);\n\n\t$repository = $this->getDoctrine()\n\t ->getManager()\n\t\t\t ->getRepository('AchPoManagerBundle:PoItem');\n\t$poItems = $repository->findDescription($desc, $filterDate);\n\t\n\t$request = $this->getRequest();\n\n\treturn $this->generateResponse($request, $poItems);\n\t\n }", "public function core_filter_geoFilter_listingDescription($desc)\n {\n //If you wanted to filter the description before it is displayed on\n //category browsing pages, this is the way to do it.\n\n //FILTER the desc here..\n\n return $desc;\n }", "public function filterByDescription($description = null)\n\t{\n\t\tif(preg_match('/[\\%\\*]/', $description)) {\n\t\t\treturn $this->addUsingAlias(cre8ContentTypePeer::DESCRIPTION, str_replace('*', '%', $description), Criteria::LIKE);\n\t\t} else {\n\t\t\treturn $this->addUsingAlias(cre8ContentTypePeer::DESCRIPTION, $description, Criteria::EQUAL);\n\t\t}\n\t}", "protected function applyDescriptionFilter(string $value)\n {\n $this->excludeKeyWords('description',$value);\n }", "public function filterByDescricao($descricao = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($descricao)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $descricao)) {\n $descricao = str_replace('*', '%', $descricao);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TabRamo2Peer::DESCRICAO, $descricao, $comparison);\n }", "public function filterByDescricao($descricao = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($descricao)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $descricao)) {\n\t\t\t\t$descricao = str_replace('*', '%', $descricao);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(VideoPeer::DESCRICAO, $descricao, $comparison);\n\t}", "public function filterByDescrip($descrip = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($descrip)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $descrip)) {\n\t\t\t\t$descrip = str_replace('*', '%', $descrip);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(FormsPeer::DESCRIP, $descrip, $comparison);\n\t}", "function getStatusDescription($code = 0) {\n\n $text = '';\n $parameters = 'STATUS';\n\n // Configuration Table\n $parms = new Application_Model_DbTable_Configuration ();\n\n $row = $parms->fetchRow(Array(\n \"PARAMETERS = ?\" => $parameters,\n \"PARM_VALUE = ?\" => $code\n ));\n\n if ($row) {\n $text = $row [\"PARM_TEXT\"];\n }\n\n return $text;\n}", "private function getCatalogWhereTerms () {\n\t\tif (is_null($this->catalogId) || $this->catalogId->isEqual($this->getCombinedCatalogId()))\n\t\t\treturn 'TRUE';\n\t\telse\n\t\t\treturn '\n\tcatalog_id = :catalog_id \n\tAND SCBCRSE_COLL_CODE IN (\n\t\tSELECT\n\t\t\tcoll_code\n\t\tFROM\n\t\t\tcourse_catalog_college\n\t\tWHERE\n\t\t\tcatalog_id = :catalog_id2\n\t)\t';\n\t}", "public function filterByTaxcodedesc($taxcodedesc = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($taxcodedesc)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(OrdrhedTableMap::COL_TAXCODEDESC, $taxcodedesc, $comparison);\n }", "public function getDesc($code)\n {\n $url = config('app.roctech_endpoint') . \"?action=c&code=$code\";\n $output = self::getContent($url);\n $template = array(\n 'desc' => $output\n );\n $output = json_encode($template);\n return $output;\n }", "public function findProductWhereDescLorem(){\n $q = $this->createQueryBuilder('prod')\n ->where('prod.description = :lorem')\n ->setParameter('lorem','lorem')\n ->getQuery();\n\n return $q->getResult();\n }", "public function getFilterDescription()\n {\n $items = [];\n\n $list = $this->PaginatedList();\n $currentPage = $list->CurrentPage();\n\n if ($currentPage > 1) {\n $items[] = _t(\n 'SilverStripe\\\\Blog\\\\Model\\\\Blog.FILTERDESCRIPTION_PAGE',\n 'Page {page}',\n null,\n [\n 'page' => $currentPage\n ]\n );\n }\n\n if ($author = $this->getCurrentProfile()) {\n $items[] = _t(\n 'SilverStripe\\\\Blog\\\\Model\\\\Blog.FILTERDESCRIPTION_AUTHOR',\n 'By {author}',\n null,\n [\n 'author' => $author->Title\n ]\n );\n }\n\n if ($tag = $this->getCurrentTag()) {\n $items[] = _t(\n 'SilverStripe\\\\Blog\\\\Model\\\\Blog.FILTERDESCRIPTION_TAG',\n 'Tagged with {tag}',\n null,\n [\n 'tag' => $tag->Title\n ]\n );\n }\n\n if ($category = $this->getCurrentCategory()) {\n $items[] = _t(\n 'SilverStripe\\\\Blog\\\\Model\\\\Blog.FILTERDESCRIPTION_CATEGORY',\n 'In category {category}',\n null,\n [\n 'category' => $category->Title\n ]\n );\n }\n\n if ($this->getArchiveYear()) {\n if ($this->getArchiveDay()) {\n $date = $this->getArchiveDate()->Nice();\n } elseif ($this->getArchiveMonth()) {\n $date = $this->getArchiveDate()->format('MMMM, y');\n } else {\n $date = $this->getArchiveDate()->format('y');\n }\n\n $items[] = _t(\n 'SilverStripe\\\\Blog\\\\Model\\\\Blog.FILTERDESCRIPTION_DATE',\n 'In {date}',\n null,\n [\n 'date' => $date,\n ]\n );\n }\n\n $result = '';\n\n if ($items) {\n $result = implode(', ', $items);\n }\n\n $this->extend('updateFilterDescription', $result);\n\n return $result;\n }", "public function filterByDescricao($descricao = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($descricao)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $descricao)) {\n $descricao = str_replace('*', '%', $descricao);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TbpaisPeer::DESCRICAO, $descricao, $comparison);\n }", "public function core_filter_geoFilter_listingShortenDescription($desc)\n {\n //If you wanted to filter the description before it is displayed on\n //category browsing pages, this is the way to do it.\n\n //FILTER the desc here..\n\n //NOTE: If this is being called, you know that listingDescription was\n //probably already called for the same text.\n\n return $desc;\n }", "public function filterByPdesc($pdesc = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($pdesc)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliStockcardSTableMap::COL_PDESC, $pdesc, $comparison);\n }", "public function testSearchOnDescription()\r\n {\r\n // create a new Repository to be used later\r\n $repo = $this->em->getRepository(Communication::class);\r\n\r\n // create an array with values to search with\r\n $cleanQuery = array();\r\n $cleanQuery[] = \"Its a bin\";\r\n\r\n // query the database\r\n $results = $repo->CommunicationSearch($cleanQuery);\r\n\r\n // Assert that size of the query returns the expected number of results\r\n $this->assertEquals(3, sizeof($results));\r\n }", "public function filterByDescription($description = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($description)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $description)) {\n\t\t\t\t$description = str_replace('*', '%', $description);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(IntentFormsPeer::DESCRIPTION, $description, $comparison);\n\t}", "public function filterByMobileDesc($mobileDesc = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($mobileDesc)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliSmsTableMap::COL_MOBILE_DESC, $mobileDesc, $comparison);\n }", "public function filterByCodRamo2($codRamo2 = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($codRamo2)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $codRamo2)) {\n $codRamo2 = str_replace('*', '%', $codRamo2);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TabRamo2Peer::COD_RAMO2, $codRamo2, $comparison);\n }", "public static function getDesc($cat, $code, $field = '') {\n $ref = Ref::find()->where(\"cat='$cat' AND code='$code'\")->one();\n if (!is_null($ref)) {\n if ($field)\n return $ref->$field;\n else\n return $ref->descr;\n } else {\n return '';\n }\n }", "public function filterByDescription($description = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($description)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $description)) {\n $description = str_replace('*', '%', $description);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(CanonTableMap::COL_DESCRIPTION, $description, $comparison);\n }", "public function Caordcom_Bieregactmued() {\n $this->c = new Criteria;\n $filpar404 = H::getConfApp2('filpar404', 'bienes', 'bieregactmued');\n if ($filpar404=='S'){\n $this->c->add(CaartordPeer::CODPAR, '404%', Criteria :: LIKE);\n $this->c->addJoin(CaordcomPeer::ORDCOM, CaartordPeer::ORDCOM);\n }\n $this->c->addJoin(CaordcomPeer :: CODPRO, CaproveePeer :: CODPRO);\n $this->c->add(CaproveePeer::ESTPRO, 'A');\n // $this->c->addAscendingOrderByColumn(CaordcomPeer::ORDCOM);\n $this->columnas = array(\n CaordcomPeer :: ORDCOM => 'Codigo',\n CaordcomPeer :: CODPRO => 'Código Proveedor',\n CaordcomPeer :: FECORD => 'Fecha',\n CaproveePeer :: NOMPRO => 'Nombre Proveedor'\n );\n }", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('codnotafiscalprodutobarra', $this->codnotafiscalprodutobarra, false);\n $criteria->compare('codnotafiscal', $this->codnotafiscal, false);\n $criteria->compare('codprodutobarra', $this->codprodutobarra, false);\n $criteria->compare('codcfop', $this->codcfop, false);\n $criteria->compare('descricaoalternativa', $this->descricaoalternativa, true);\n $criteria->compare('quantidade', $this->quantidade, false);\n $criteria->compare('valorunitario', $this->valorunitario, false);\n $criteria->compare('valortotal', $this->valortotal, false);\n $criteria->compare('icmsbase', $this->icmsbase, false);\n $criteria->compare('icmspercentual', $this->icmspercentual, false);\n $criteria->compare('icmsvalor', $this->icmsvalor, false);\n $criteria->compare('ipibase', $this->ipibase, false);\n $criteria->compare('ipipercentual', $this->ipipercentual, false);\n $criteria->compare('ipivalor', $this->ipivalor, false);\n $criteria->compare('icmsstbase', $this->icmsstbase, false);\n $criteria->compare('icmsstpercentual', $this->icmsstpercentual, false);\n $criteria->compare('icmsstvalor', $this->icmsstvalor, false);\n $criteria->compare('csosn', $this->csosn, false);\n $criteria->compare('codnegocioprodutobarra', $this->codnegocioprodutobarra, false);\n $criteria->compare('alteracao', $this->alteracao, false);\n $criteria->compare('codusuarioalteracao', $this->codusuarioalteracao, false);\n $criteria->compare('criacao', $this->criacao, false);\n $criteria->compare('codusuariocriacao', $this->codusuariocriacao, false);\n\n if (!empty($this->codproduto)) {\n $criteria->compare('\"ProdutoBarra\".codproduto', $this->codproduto);\n $criteria->with[] = 'ProdutoBarra';\n }\n\n $criteria->with[] = 'NotaFiscal';\n $criteria->order = '\"NotaFiscal\".saida DESC, \"NotaFiscal\".codfilial ASC, \"NotaFiscal\".numero DESC';\n\n $criteria->compare('\"NotaFiscal\".codfilial', $this->codfilial);\n $criteria->compare('\"NotaFiscal\".codpessoa', $this->codpessoa);\n $criteria->compare('\"NotaFiscal\".codnaturezaoperacao', $this->codnaturezaoperacao);\n if ($saida_de = DateTime::createFromFormat(\"d/m/y\", $this->saida_de)) {\n $criteria->addCondition('\"NotaFiscal\".saida >= :saida_de');\n $criteria->params = array_merge($criteria->params, array(':saida_de' => $saida_de->format('Y-m-d')));\n }\n if ($saida_ate = DateTime::createFromFormat(\"d/m/y\", $this->saida_ate)) {\n $criteria->addCondition('\"NotaFiscal\".saida <= :saida_ate');\n $criteria->params = array_merge($criteria->params, array(':saida_ate' => $saida_ate->format('Y-m-d')));\n }\n\n\n $criteria->compare('icmscst', $this->icmscst, false);\n $criteria->compare('ipicst', $this->ipicst, false);\n $criteria->compare('piscst', $this->piscst, false);\n $criteria->compare('cofinscst', $this->cofinscst, false);\n $criteria->compare('pispercentual', $this->pispercentual, false);\n $criteria->compare('cofinspercentual', $this->cofinspercentual, false);\n $criteria->compare('csllpercentual', $this->csllpercentual, false);\n $criteria->compare('irpjpercentual', $this->irpjpercentual, false);\n $criteria->compare('pisbase', $this->pisbase, false);\n $criteria->compare('pisvalor', $this->pisvalor, false);\n $criteria->compare('cofinsbase', $this->cofinsbase, false);\n $criteria->compare('cofinsvalor', $this->cofinsvalor, false);\n $criteria->compare('csllbase', $this->csllbase, false);\n $criteria->compare('csllvalor', $this->csllvalor, false);\n $criteria->compare('irpjbase', $this->irpjbase, false);\n $criteria->compare('irpjvalor', $this->irpjvalor, false);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>array('pageSize'=>15),\n ));\n }", "public function filterByDescription($description)\n {\n $this->filter[] = $this->field('description').' = '.$this->quote($description);\n return $this;\n }", "public function filterByDescription($description = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($description)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $description)) {\n $description = str_replace('*', '%', $description);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(CodeSnippetVariablePeer::DESCRIPTION, $description, $comparison);\n }", "public function setCircDesc($circ_desc)\n {\n $this->circ_desc = $circ_desc;\n\n return $this;\n }", "public function loadModel($id,$c)\n{\n\n$criteria = new CDbCriteria();\n$criteria->condition = \"id_perusahaan=\".$id.\" AND Substring(code_id,6,10)=\".\"'$c'\";\n$model=DataPerusahaan::model()->find($criteria);\n//$model=DataPerusahaan::model()->findByPk($id);\nif($model===null)\nthrow new CHttpException(404,'The requested page does not exist.');\nreturn $model;\n}" ]
[ "0.5682791", "0.55768764", "0.53695655", "0.5332902", "0.5264248", "0.5178318", "0.5074118", "0.49958315", "0.4957206", "0.49554884", "0.48519406", "0.48168385", "0.4742873", "0.47279614", "0.4725442", "0.47249493", "0.47238034", "0.46596116", "0.46226117", "0.46181267", "0.45993024", "0.45914713", "0.45639142", "0.4553322", "0.45506564", "0.45433396", "0.45369074", "0.45258868", "0.44904", "0.44730374" ]
0.642891
0
Filter the query on the mapping_code column Example usage: $query>filterByMappingCode('fooValue'); // WHERE mapping_code = 'fooValue' $query>filterByMappingCode('%fooValue%', Criteria::LIKE); // WHERE mapping_code LIKE '%fooValue%'
public function filterByMappingCode($mappingCode = null, $comparison = null) { if (null === $comparison) { if (is_array($mappingCode)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(AliRccodeTableMap::COL_MAPPING_CODE, $mappingCode, $comparison); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByCode($code, $comparison = null) {\n\t\treturn $this->filterByIntbbinacode($code, $comparison);\n\t}", "public function filterByCode($code = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($code)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $code)) {\n $code = str_replace('*', '%', $code);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(BannersPeer::CODE, $code, $comparison);\n }", "public function setCode($value){\n return $this->setParameter('code', $value);\n }", "public function setCode($value){\n return $this->setParameter('code', $value);\n }", "public function code() {\n if(!is_null($this->code)) return $this->code;\n return $this->filterBy('type', 'code');\n }", "public function filterById($code, $comparison = null) {\n\t\treturn $this->filterByCode($code, $comparison);\n\t}", "public function searchByCode(string $code): void {\n $this->requestParams['code'] = $code;\n }", "public function filterByMapString($mapString = null, $comparison = Criteria::EQUAL)\n\t{\n\t\tif (is_array($mapString)) {\n\t\t\tif ($comparison == Criteria::EQUAL) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t}\n\t\t} elseif (preg_match('/[\\%\\*]/', $mapString)) {\n\t\t\t$mapString = str_replace('*', '%', $mapString);\n\t\t\tif ($comparison == Criteria::EQUAL) {\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(MapPeer::MAP_STRING, $mapString, $comparison);\n\t}", "protected function code($value)\n {\n if ($value) {\n return $this->builder->where('code', 'like', \"%$value%\");\n }\n\n return $this->builder;\n }", "public function setCode($value)\n {\n return $this->setParameter('code', $value);\n }", "public function addAttributeInConditionFilter($attributeCode)\n {\n $match = sprintf('%%%s%%', substr($this->serializer->serialize(['attribute' => $attributeCode]), 1, -1));\n $this->addFieldToFilter('conditions_serialized', ['like' => $match]);\n\n return $this;\n }", "public function filterByCurrencyCode($value, $operator = Rule::OP_EQ)\n\t{\n\t\treturn $this->filterBy('currency_code', $value, $operator);\n\t}", "public function filterByMcode($mcode = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($mcode)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliAcTableMap::COL_MCODE, $mcode, $comparison);\n }", "public function filterByCardcode($cardcode = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($cardcode)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $cardcode)) {\n\t\t\t\t$cardcode = str_replace('*', '%', $cardcode);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(CardabilitiesPeer::CARDCODE, $cardcode, $comparison);\n\t}", "function setCode($value) {\n $this->_code = trim($value);\n }", "public function code($query = \"\")\n {\n return $this->builder->where('code', 'like', '%'.$query.'%');\n }", "public function filterByMcode($mcode = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($mcode)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliTsalehTableMap::COL_MCODE, $mcode, $comparison);\n }", "public function filterByMcode($mcode = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($mcode)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliPcTableMap::COL_MCODE, $mcode, $comparison);\n }", "public function setCodeAttribute($code)\n {\n $this->attributes['code'] = strtoupper(str_replace(' ', '', $code));\n }", "protected function personalCode($personalCode)\n {\n return $this->builder->where('personal_code','like',$personalCode.'%');\n }", "public function setCodeAttribute($value)\n {\n $this->attributes['code'] = strtoupper($value);\n }", "public function filterByStateCode($stateCode = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($stateCode)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $stateCode)) {\n\t\t\t\t$stateCode = str_replace('*', '%', $stateCode);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(StatePeer::STATE_CODE, $stateCode, $comparison);\n\t}", "protected function filter(&$map)\n {\n\n\n //不查询管理员\n $map['id'] = [\"gt\", 1];\n\n if ($this->request->param('realname')) {\n $map['realname'] = [\"like\", \"%\" . $this->request->param('realname') . \"%\"];\n }\n if ($this->request->param('account')) {\n $map['account'] = [\"like\", \"%\" . $this->request->param('account') . \"%\"];\n }\n if ($this->request->param('email')) {\n $map['email'] = [\"like\", \"%\" . $this->request->param('email') . \"%\"];\n }\n if ($this->request->param('mobile')) {\n $map['mobile'] = [\"like\", \"%\" . $this->request->param('mobile') . \"%\"];\n }\n //echo \"123\";\n }", "public function filterByCode($code = null, $comparison = null)\n {\n if (is_array($code)) {\n $useMinMax = false;\n if (isset($code['min'])) {\n $this->addUsingAlias(RegcodeTableMap::COL_CODE, $code['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($code['max'])) {\n $this->addUsingAlias(RegcodeTableMap::COL_CODE, $code['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(RegcodeTableMap::COL_CODE, $code, $comparison);\n }", "public function filterByShortCode($code)\n {\n $this->where($this->expr()->eq('short_code',':short_code'))->setParameter('short_code',$code,$this->getGateway()->getMetaData()->getColumn('short_code')->getType());\n \n return $this;\n }", "public function filterByMcode($mcode = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($mcode)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliStockcardSTableMap::COL_MCODE, $mcode, $comparison);\n }", "public function filterByCode($code = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($code)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(LiveEventTableMap::COL_CODE, $code, $comparison);\n }", "public function filterByMcode($mcode = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($mcode)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliCalcPoschange2TableMap::COL_MCODE, $mcode, $comparison);\n }", "public function filterByUsercode($usercode = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($usercode)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliTsalehTableMap::COL_USERCODE, $usercode, $comparison);\n }", "public function restrictToCode(QueryBuilder $qb, $code)\n {\n $qb->andWhere('ug.code = :code')\n ->setParameter('code', $code);\n }" ]
[ "0.5689", "0.5562933", "0.5418962", "0.5418962", "0.5376274", "0.5308078", "0.52627426", "0.52563936", "0.5145797", "0.5125704", "0.51203376", "0.51004034", "0.5086595", "0.5073385", "0.50711745", "0.5064325", "0.50635564", "0.5056446", "0.5041783", "0.50388896", "0.50381464", "0.50319105", "0.50104976", "0.5005711", "0.49817404", "0.49772853", "0.49410653", "0.49372435", "0.49333045", "0.49023566" ]
0.64599025
0
Returns true if Docker Toolbox is installed (by checking environment variables). Note that in some messed up installation scenarios, this might return a false positive.
public function isDockerToolbox() { return (bool) getenv('DOCKER_TOOLBOX_INSTALL_PATH'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function installed(): bool;", "public function isDockerEnvSet()\n {\n return (bool) getenv('DOCKER_HOST');\n }", "public function isInstalled();", "public function isInstalled();", "public function packagesInstalled(): bool\n {\n return file_exists($this->rootPath . '/node_modules/') ? true : false;\n }", "protected function installed(): bool\n {\n return $this->cli->powershell('Get-Service -Name \"AcrylicDNSProxySvc\"')->isSuccessful();\n }", "public function isInstalled()\n\t{\n\t\t$installed = false;\n\t\t// check configuration options\n\t\tif (!$this->testParentMetadataConfig()) {\n\t\t\t$installed = true;\n\t\t}\n\t\t\n\t\treturn $installed;\n\t}", "public function isInstalled()\r\n\t{\r\n\t\t$installed = false;\r\n\t\t// load config\r\n\t\trequire_once dirname(__FILE__) . '/config.php';\r\n\t\t// check configuration options\r\n\t\tif (!$this->testMyMadeToPrintConfigServer()) {\r\n\t\t\t$installed = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn $installed;\r\n\t}", "public function isInstalled()\n {\n return $this->exists();\n }", "private function isInstalled()\n {\n return file_exists('App/Config/installation.cfg');\n }", "public function installed()\n {\n if (! realpath(lit_base_path())) {\n return false;\n }\n\n if (! config()->has('lit')) {\n return false;\n }\n\n if (! class_exists(\\Lit\\Kernel::class)) {\n return false;\n }\n\n return true;\n }", "public function isInstalled()\n {\n return false;\n }", "public function alreadyInstalled()\n {\n if (file_exists($this->getEnvPath())) {\n return true;\n }\n if (!file_exists($this->getConfigPath())) {\n return false;\n }\n $configContents = file_get_contents($this->getConfigPath());\n if (strstr($configContents, '$databaseConfig')) {\n return true;\n }\n if (strstr($configContents, '$database')) {\n return true;\n }\n return false;\n }", "public function is_installed() {\n return true;\n }", "protected function isDotbInstalled()\n {\n global $dotb_config;\n\n // During installation, the `installing` variable is set, so if this is\n // not empty, then we are in the middle of installation, or not installed\n if (!empty($GLOBALS['installing'])) {\n return false;\n }\n\n // When installed, dotb sets `installer_locked` in the config to true,\n // so if `installer_locked` is not empty then we are installed\n return !empty($dotb_config['installer_locked']);\n }", "public function isCurlInstalled()\n {\n if (in_array('curl', get_loaded_extensions())) {\n return true;\n } else {\n return false;\n }\n }", "private function isWordpressInstalled(): bool\n {\n return $this->runWpCliCommand('core', 'is-installed', [], $output, $error);\n }", "function is_installed() {\n\t\t\t\n\t\t\tglobal $CONFIG;\n\t\t\treturn datalist_get('installed');\n\t\t\t\n\t\t}", "public function isInstalled()\n {\n return file_exists(dirname(\\pm_Context::getPlibDir()) . '/' . $this->extensionId);\n }", "private function isPortalInstalled()\n {\n $packageList = json_decode(\\File::get(base_path('vendor/composer/installed.json')));\n\n $package = array_first($packageList, function ($key, $package) {\n\n return preg_match(\"/^elms\\/[a-z0-9]+-fe$/\", $package->name);\n\n });\n\n $this->portalPackage = $package;\n\n return !is_null($package);\n }", "function _is_curl_installed() {\n if (in_array ('curl', get_loaded_extensions())) {\n return true;\n }\n else {\n return false;\n }\n }", "function _is_curl_installed() {\n if (in_array ('curl', get_loaded_extensions())) {\n return true;\n }\n else {\n return false;\n }\n }", "public function isInstalled()\n {\n return $this->filesystem()->exists($this->licensePath());\n }", "private function curlInstalled() {\n return in_array('curl', get_loaded_extensions()) && function_exists('curl_version');\n }", "public function displayIsInstalled();", "public function packagesExists(): bool\n {\n return file_exists($this->rootPath . '/package.json') ? true : false;\n }", "public function isInstalled()\n {\n return (bool)$this->isInstalled;\n }", "function checkGitInstalled(){\n if(strlen(exec(\"git\")) === 0){\n echo \"Git is not installed!\";\n return false;\n }\n return true;\n}", "public static function hasInstalledPhp()\n {\n return static::installed('php70') || static::installed('php56');\n }", "protected function checkTools()\n {\n return $this->commandExist(self::PNG_TOOL) && $this->commandExist(self::JPEG_TOOL);\n }" ]
[ "0.6718522", "0.6717187", "0.6705536", "0.6705536", "0.6692628", "0.6691967", "0.6679544", "0.66097885", "0.66035104", "0.6591553", "0.6582996", "0.6581317", "0.6571022", "0.65629715", "0.65516645", "0.65083116", "0.6506508", "0.64511687", "0.641128", "0.6406548", "0.6363984", "0.6363984", "0.6356633", "0.6313387", "0.6281181", "0.6265848", "0.61935985", "0.61931723", "0.6123074", "0.60956275" ]
0.82178724
0
Checks if Docker environment variables are set, in particular DOCKER_HOST.
public function isDockerEnvSet() { return (bool) getenv('DOCKER_HOST'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkEnv()\n {\n $requiredKeys = $this->_commandConfig['env']['required-keys'];\n foreach ($requiredKeys as $value) {\n $this->envKeyExist($value);\n }\n }", "protected function checkForEnvironmentVariable($variable)\n {\n return isset($_SERVER[$variable]) && (bool)$_SERVER[$variable];\n }", "protected function is_api_integration_var_set() {\n\n\t\tforeach ( $this->api_integration_env_vars as $var ) {\n\t\t\tif ( getenv( $var ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\n\t}", "private function checkEnvironment()\n {\n // Check access to `ini_get` function && check OPCache save_comments setting\n if (function_exists('ini_get')\n && (php_sapi_name() === 'cli' && ini_get('opcache.enable_cli')\n || php_sapi_name() !== 'cli' && ini_get('opcache.enable')\n )\n && !ini_get('opcache.save_comments')\n ) {\n trigger_error(\n 'OPCache has been enabled, but comments are removed from the cache. Please set `opcache.save_comments` to `1` in order to use the PostNL library.',\n E_USER_WARNING\n );\n }\n }", "public function environmentIsAllowed()\n {\n // Not enabled, so skip anyway\n if (!static::isEnabled()) {\n return false;\n }\n\n // If the module is enabled, check for dev by config only\n\n // Copied from Director::isDev(), so we can bypass the session checking\n // Check config\n if (Config::inst()->get('Director', 'environment_type') === 'dev') {\n return true;\n }\n\n // Check if we are running on one of the test servers\n $devServers = (array)Config::inst()->get('Director', 'dev_servers');\n $httpHost = Controller::curr()->getRequest()->getHeader('Host');\n\n return (null !== $httpHost && in_array($httpHost, $devServers, null));\n }", "public function isDockerToolbox()\n {\n return (bool) getenv('DOCKER_TOOLBOX_INSTALL_PATH');\n }", "public function validateEnvironment()\n {\n $envs = [\n 'ARTIFACTS_S3_BUCKET',\n 'ARTIFACTS_AWS_REGION', //us-east-1\n 'ARTIFACTS_AWS_ACCESS_KEY_ID',\n 'ARTIFACTS_AWS_SECRET_ACCESS_KEY',\n ];\n\n foreach ($envs as $env) {\n if (false === getenv($env)) {\n if ('ARTIFACTS_AWS_REGION' === $env) {\n continue;\n }\n throw new LogicException(\"$env environment variable is not set, but required.\");\n }\n }\n }", "public function hasCFCredentials()\n {\n if (!getenv('TRAVIS') && (!defined('CLOUDFLARE_AUTH_EMAIL') || !defined('CLOUDFLARE_AUTH_KEY'))) {\n return false;\n }\n\n return true;\n }", "public function check(): bool\n {\n return $this->filesystem->exists(base_path('.env'));\n }", "private function checkEnvironmentArguments()\n {\n if (!isset($_SERVER['argc']) || !isset($_SERVER['argv']) || (int)$_SERVER['argc'] !== (int)sizeof($_SERVER['argv']))\n throw new ArgvParserException(\"Environment arguments not found\");\n }", "function getEnvironment() {\n if($file = getFilePath(PROJECT_DIR . '.env')) {\n (String) $env = file_get_contents($file);\n (Array) $env = explode(\"\\n\", $env);\n\n foreach($env as $index => $variable) {\n if($variable) {\n putenv( (String) $variable);\n }\n }\n } else {\n return (Bool) false;\n }\n\n return (Bool) true;\n}", "function test_host(): string {\n return getenv(\"LDAP_TEST_HOST\") ?: \"localhost\";\n}", "function check_env() {\n if ( 'cli' !== php_sapi_name() && $_SERVER['REMOTE_ADDR'] !== $_SERVER['SERVER_ADDR'] ) {\n header( 'Status: 403 Forbidden' );\n header( 'HTTP/1.1 403 Forbidden', true, 403 );\n header( 'Connection: Close' );\n\n exit;\n }\n\n // Remove cached version of this file\n if ( function_exists( 'opcache_invalidate' ) ) {\n @opcache_invalidate( __FILE__ );\n }\n\n // Check environment\n $check = new CheckEnv();\n $status = empty( $check->diffs );\n\n // Display differences and exit\n print json_encode( $check->diffs );\n\n exit( $status ? 0 : 1 );\n}", "public function environment()\n {\n $env = $this['config']->get('core.environment');\n\n if (func_num_args() > 0) {\n $patterns = is_array(func_get_arg(0)) ? func_get_arg(0) : func_get_args();\n foreach ($patterns as $pattern) {\n if (Str::is($pattern, $env)) {\n return true;\n }\n }\n return false;\n }\n\n return $env;\n }", "protected function isConfigured() {\n return !empty($this->host) && $this->port >= 0 && $this->port <= 65535;\n }", "protected function isRunningOnDevelopmentVM()\n {\n return !$this->checkForEnvironmentVariable('TAGCADE_PROD') && $this->checkForEnvironmentVariable('TAGCADE_DEV');\n }", "protected function useEnvironment(): bool { return true; }", "protected function canLoginAs(): bool\n {\n\n if (! app()->environment('local')) {\n return false;\n }\n\n if (! ends_with(request()->getHost(), '.dev')) {\n return false;\n }\n\n if (! in_array(env('DB_USERNAME'), ['homestead', 'root'])) {\n return false;\n }\n\n return true;\n }", "public function check_environment(array $errors = array()) {\n return $errors;\n }", "public static function anyOf()\n {\n $args = func_get_args();\n foreach ($args as $key) {\n if (self::env($key) !== null) {\n return self::env($key);\n }\n if (self::iniValue($key) !== null) {\n return self::iniValue($key);\n }\n }\n throw new InvalidConfigException(\"No environment variable or ini setting with the key(s) \" . implode(\",\", $args));\n }", "public function environment()\n {\n if (func_num_args() > 0) {\n $patterns = is_array(func_get_arg(0)) ? func_get_arg(0) : func_get_args();\n\n foreach ($patterns as $pattern) {\n if (Str::is($pattern, $this['env'])) {\n return true;\n }\n }\n\n return false;\n }\n\n return $this['env'];\n }", "public function hasHost()\n {\n return isset($this->host);\n }", "abstract public function checkRADIUSHostandConfigDaemon();", "function isSystem(): bool {\n $host = request()->getHost();\n if($host === env('APP_BASE_URL')){\n return true;\n }\n\n return false;\n }", "public function check_environment(array $errors = array()) {\n if (! $this->daemon instanceof Daemon)\n $errors[] = \"Invalid reference to Application Object\";\n\n return $errors;\n }", "static function checkEnvironment( ) {\n if ( !isset( $config ) ) {\n $config = CRM_Core_Config::singleton( );\n }\n if ( $config->userFrameworkBaseURL === \"http://insitetest2/\" ) {\n $environment = \"test\";\n } else {\n $environment = \"prod\";\n }\n return $environment;\n }", "private function getEnvAllow() : string\n {\n return $this->envAllowXdebug . '=' . \\getenv($this->envAllowXdebug);\n }", "public function _checkEnvironment( ) {\n\n\t\tif ( !Registry::has( 'cache' )) {\n\t\t\tRegistry::register( 'cache', new Volatile( ));\n\t\t}\n\n\t\tif ( !Registry::has( 'dom' )) {\n\t\t\tRegistry::register( 'dom', new DomDocument( ));\n\t\t}\n\n\t\tif ( !Registry::has( 'http' )) {\n\t\t\tRegistry::register( 'http', new Curl( ));\n\t\t}\n\t}", "public function alreadyInstalled()\n {\n if (file_exists($this->getEnvPath())) {\n return true;\n }\n if (!file_exists($this->getConfigPath())) {\n return false;\n }\n $configContents = file_get_contents($this->getConfigPath());\n if (strstr($configContents, '$databaseConfig')) {\n return true;\n }\n if (strstr($configContents, '$database')) {\n return true;\n }\n return false;\n }", "function is_dev() {\n if ($_SERVER['HTTP_HOST'] === 'localhost') {\n return true;\n }\n return false;\n}" ]
[ "0.675276", "0.63917685", "0.6138836", "0.5856784", "0.58553106", "0.57868856", "0.5700573", "0.5672003", "0.5649556", "0.5554435", "0.5518751", "0.5495501", "0.53371674", "0.5336794", "0.52936494", "0.5263141", "0.52620715", "0.52432114", "0.52325314", "0.52320683", "0.5215257", "0.52131605", "0.5185433", "0.5171464", "0.5168654", "0.51672846", "0.51478034", "0.51433766", "0.5121667", "0.51175565" ]
0.81933683
0
Cette fonction permet de distribuer la cagnotte aux dix premiers du championnat.
function distrib_cagnotte() { global $db,$arcade_config; $cagnotte_win = $arcade_config['cagnotte']; if($arcade_config['cat_use'] == 1) { $sql = "SELECT c.* FROM " . GAMES_TABLE . " g LEFT JOIN " . ARCADE_CHAMPIONNAT_TABLE . " c ON g.game_id = c.game_id WHERE g.arcade_catid = '" . $arcade_config['championnat_cat'] . "'"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'acceder à la table du championnat ou à la table des jeux", '', __LINE__, __FILE__, $sql); } } else { $sql = "SELECT * FROM " . ARCADE_CHAMPIONNAT_TABLE . ""; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'acceder à la table du championnat", '', __LINE__, __FILE__, $sql); } } $tabtri = array(); $tabusers = array(); $tabscore = array(); $i = 0; $nbpointsone = $arcade_config['championnat_points_one']; $nbpointstwo = $arcade_config['championnat_points_two']; $nbpointsthree = $arcade_config['championnat_points_three']; $nbpointsfour = $arcade_config['championnat_points_four']; $nbpointsfive = $arcade_config['championnat_points_five']; $nbpointssix = $arcade_config['championnat_points_six']; $nbpointsseven = $arcade_config['championnat_points_seven']; $nbpointseight = $arcade_config['championnat_points_eight']; $nbpointsnine = $arcade_config['championnat_points_nine']; $nbpointsten = $arcade_config['championnat_points_ten']; $nbpointseleven = $arcade_config['championnat_points_eleven']; $nbpointstwelve = $arcade_config['championnat_points_twelve']; $nbpointsthirteen = $arcade_config['championnat_points_thirteen']; $nbpointsfourteen = $arcade_config['championnat_points_fourteen']; $nbpointsfiveteen = $arcade_config['championnat_points_fiveteen']; $nbpointssixteen = $arcade_config['championnat_points_sixteen']; $nbpointsseventeen = $arcade_config['championnat_points_seventeen']; $nbpointseighteen = $arcade_config['championnat_points_eighteen']; $nbpointsnineteen = $arcade_config['championnat_points_nineteen']; $nbpointstwenty = $arcade_config['championnat_points_twenty']; while($row = $db->sql_fetchrow($result)) { if ($row['one_userid']>0) { if (!isset($tabscore[$row['one_userid']])) { $tabscore[$row['one_userid']] = $nbpointsone ; $tabtri[$row['one_userid']] = $row['one_userid'] ; } else { $tabscore[$row['one_userid']] += $nbpointsone ; } } if ($row['two_userid']>0) { if (!isset($tabscore[$row['two_userid']])) { $tabscore[$row['two_userid']] = $nbpointstwo ; $tabtri[$row['two_userid']] = $row['two_userid']; } else { $tabscore[$row['two_userid']]+= $nbpointstwo ; } } if ($row['three_userid']>0) { if (!isset($tabscore[$row['three_userid']])) { $tabscore[$row['three_userid']] = $nbpointsthree ; $tabtri[$row['three_userid']] = $row['three_userid'] ; } else { $tabscore[$row['three_userid']] += $nbpointsthree ; } } if ($row['four_userid']>0) { if (!isset($tabscore[$row['four_userid']])) { $tabscore[$row['four_userid']] = $nbpointsfour ; $tabtri[$row['four_userid']] = $row['four_userid'] ; } else { $tabscore[$row['four_userid']] += $nbpointsfour ; } } if ($row['five_userid']>0) { if (!isset($tabscore[$row['five_userid']])) { $tabscore[$row['five_userid']] = $nbpointsfive ; $tabtri[$row['five_userid']] = $row['five_userid'] ; } else { $tabscore[$row['five_userid']] += $nbpointsfive ; } } if ($row['six_userid']>0) { if (!isset($tabscore[$row['six_userid']])) { $tabscore[$row['six_userid']] = $nbpointssix ; $tabtri[$row['six_userid']] = $row['six_userid'] ; } else { $tabscore[$row['six_userid']] += $nbpointssix ; } } if ($row['seven_userid']>0) { if (!isset($tabscore[$row['seven_userid']])) { $tabscore[$row['seven_userid']] = $nbpointsseven ; $tabtri[$row['seven_userid']] = $row['seven_userid'] ; } else { $tabscore[$row['seven_userid']] += $nbpointsseven ; } } if ($row['eight_userid']>0) { if (!isset($tabscore[$row['eight_userid']])) { $tabscore[$row['eight_userid']] = $nbpointseight ; $tabtri[$row['eight_userid']] = $row['eight_userid'] ; } else { $tabscore[$row['eight_userid']] += $nbpointseight ; } } if ($row['nine_userid']>0) { if (!isset($tabscore[$row['nine_userid']])) { $tabscore[$row['nine_userid']] = $nbpointsnine ; $tabtri[$row['nine_userid']] = $row['nine_userid'] ; } else { $tabscore[$row['nine_userid']] += $nbpointsnine ; } } if ($row['ten_userid']>0) { if (!isset($tabscore[$row['ten_userid']])) { $tabscore[$row['ten_userid']] = $nbpointsten ; $tabtri[$row['ten_userid']] = $row['ten_userid'] ; } else { $tabscore[$row['ten_userid']] += $nbpointsten ; } } } $liste_userid = ''; foreach ( $tabtri as $key => $val) { $liste_userid = ( $liste_userid == '') ? $key : $liste_userid . ' ,' . $key; } if ($liste_userid!='') { $sql = "SELECT user_id,username FROM " . USERS_TABLE . " WHERE user_id IN ($liste_userid)"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'acceder à la table des utilisateurs", '', __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result)) { $tabusers[$row['user_id']] = $row['username']; } } array_multisort($tabscore, SORT_DESC, $tabtri); $cagnotte_un = $tabusers[ $tabtri[0] ]; $cagnotte_deux = $tabusers[ $tabtri[1] ]; $cagnotte_trois = $tabusers[ $tabtri[2] ]; $cagnotte_quatre = $tabusers[ $tabtri[3] ]; $cagnotte_cinq = $tabusers[ $tabtri[4] ]; $cagnotte_six = $tabusers[ $tabtri[5] ]; $cagnotte_sept = $tabusers[ $tabtri[6] ]; $cagnotte_huit = $tabusers[ $tabtri[7] ]; $cagnotte_neuf = $tabusers[ $tabtri[8] ]; $cagnotte_dix = $tabusers[ $tabtri[9] ]; $tauxun = $arcade_config['championnat_taux_un']; $tauxdeux = $arcade_config['championnat_taux_deux']; $tauxtrois = $arcade_config['championnat_taux_trois']; $tauxquatre = $arcade_config['championnat_taux_quatre']; $tauxcinq = $arcade_config['championnat_taux_cinq']; $tauxsix = $arcade_config['championnat_taux_six']; $tauxsept = $arcade_config['championnat_taux_sept']; $tauxhuit = $arcade_config['championnat_taux_huit']; $tauxneuf = $arcade_config['championnat_taux_neuf']; $tauxdix = $arcade_config['championnat_taux_dix']; $nbpoints1 = $cagnotte_win * ($tauxun / 100); $nbpoints2 = $cagnotte_win * ($tauxdeux / 100); $nbpoints3 = $cagnotte_win * ($tauxtrois / 100); $nbpoints4 = $cagnotte_win * ($tauxquatre / 100); $nbpoints5 = $cagnotte_win * ($tauxcinq / 100); $nbpoints6 = $cagnotte_win * ($tauxsix / 100); $nbpoints7 = $cagnotte_win * ($tauxsept / 100); $nbpoints8 = $cagnotte_win * ($tauxhuit / 100); $nbpoints9 = $cagnotte_win * ($tauxneuf / 100); $nbpoints10 = $cagnotte_win * ($tauxdix / 100); if( isset($tabusers[ $tabtri[0] ])) { $sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + '$nbpoints1' WHERE username = '$cagnotte_un' "; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table des utilisateurs", "", __LINE__, __FILE__, $sql); } } if( isset($tabusers[ $tabtri[1] ])) { $sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + '$nbpoints2' WHERE username = '$cagnotte_deux' "; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table des utilisateurs", "", __LINE__, __FILE__, $sql); } } if( isset($tabusers[ $tabtri[2] ])) { $sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + '$nbpoints3' WHERE username = '$cagnotte_trois' "; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table des utilisateurs", "", __LINE__, __FILE__, $sql); } } if( isset($tabusers[ $tabtri[3] ])) { $sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + '$nbpoints4' WHERE username = '$cagnotte_quatre' "; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table des utilisateurs", "", __LINE__, __FILE__, $sql); } } if( isset($tabusers[ $tabtri[4] ])) { $sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + '$nbpoints5' WHERE username = '$cagnotte_cinq' "; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table des utilisateurs", "", __LINE__, __FILE__, $sql); } } if( isset($tabusers[ $tabtri[5] ])) { $sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + '$nbpoints6' WHERE username = '$cagnotte_six' "; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table des utilisateurs", "", __LINE__, __FILE__, $sql); } } if( isset($tabusers[ $tabtri[6] ])) { $sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + '$nbpoints7' WHERE username = '$cagnotte_sept' "; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table des utilisateurs", "", __LINE__, __FILE__, $sql); } } if( isset($tabusers[ $tabtri[7] ])) { $sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + '$nbpoints8' WHERE username = '$cagnotte_huit' "; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table des utilisateurs", "", __LINE__, __FILE__, $sql); } } if( isset($tabusers[ $tabtri[8] ])) { $sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + '$nbpoints9' WHERE username = '$cagnotte_neuf' "; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table des utilisateurs", "", __LINE__, __FILE__, $sql); } } if( isset($tabusers[ $tabtri[9] ])) { $sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points + '$nbpoints10' WHERE username = '$cagnotte_dix' "; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table des utilisateurs", "", __LINE__, __FILE__, $sql); } } $sql = "UPDATE " . ARCADE_TABLE . " SET arcade_value = '0' WHERE arcade_name = 'cagnotte'"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table de configuration arcade", "", __LINE__, __FILE__, $sql); } $sql = "UPDATE " . ARCADE_TABLE . " SET arcade_value = '' WHERE arcade_name = 'day_distrib'"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table de configuration arcade", "", __LINE__, __FILE__, $sql); } $sql = "UPDATE " . ARCADE_TABLE . " SET arcade_value = '' WHERE arcade_name = 'date_distribcagnotte'"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table de configuration arcade", "", __LINE__, __FILE__, $sql); } $sql = "UPDATE " . ARCADE_TABLE . " SET arcade_value = '0' WHERE arcade_name = 'use_auto_distrib'"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Impossible d'accéder à la table de configuration arcade", "", __LINE__, __FILE__, $sql); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function balise_APROPOS_dist($p) {\n\t//recupere un eventuel argument \n\t$premier = interprete_argument_balise(1, $p);\n\t//s'il y en a 1, on traite la chose\n\tif ($premier != ''){\n\t$p->code = 'calcul_info_apropos(' . $premier . ')';\n\t}else{\n\t//si pas d\\'argument, on affiche la liste des plugins\n\t$p->code = 'calcul_info_apropos(\"liste\")';\n\t}\n\t$p->interdire_scripts = false;\n\treturn $p;\n}", "private function _preciosServs()\r\n {\r\n $fox = \"$ 150.-\"; $futbol = \"$ 300.-\"; $adultos = \"$ 80.-\";\r\n\r\n // hacer un case para si tiene contratado el servicio le pongo 'contratado'\r\n\r\n # Permanencia minima 3 meses para fox y adultos | 1 año para futbol\r\n\r\n }", "function produits_autoriser() {\n}", "function formulaires_configurer_identite_charger_dist(){\n\tinclude_spip('inc/meta');\n\tlire_metas();\n\t\n\t$valeurs = array();\n\tforeach(array('nom_site','adresse_site','slogan_site','descriptif_site','email_webmaster','adresses_secondaires') as $k)\n\t\t$valeurs[$k] = isset($GLOBALS['meta'][$k])?$GLOBALS['meta'][$k]:'';\n\t\t\n\treturn $valeurs;\n}", "function pornpipit_scripts() {\n\t\n\t/*****************/\n\t/**** STYLES ****/\n\t/****************/\n\n\t/**\n\t * Google Font\n\t */\n\t// Mitr font for Title\n\t// Pridi font for paragraph\n\twp_enqueue_style( 'mitr-font', '//fonts.googleapis.com/css?family=Mitr:200,300,400,500,600,700|Pridi');\n\n\n\n\t/*****************/\n\t/**** SCRIPTS ****/\n\t/****************/\n\t/**\n\t * Change jQuery to CDN\n\t */\n\twp_deregister_script('jquery');\n wp_register_script('jquery', \"//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js\", false, null, false);\n wp_enqueue_script('jquery');\n\n}", "function presensi($uc_classroom = NULL, $uc_diklat_class = NULL){\n\n\t}", "function TRINITY_install($lang, $critical = true, $extraPackages = \"\")\n{\n\tinclude(\"/m23/inc/i18n/\".I18N_m23instLanguage($lang).\"/m23inst.php\");\n\n\t$lV = I18N_getLangVars($lang);\n\n\tCLCFG_dialogInfoBox($I18N_client_installation, $I18N_client_status, $I18N_installing_trinity);\n\n\t$logFile=\"/tmp/m23Trinity.log\";\n\n\n\t//DebConf setting\n\tCLCFG_aptGet(\"install\",\"debconf-utils\");\n\techo(\"\n\t\trm /tmp/debconfTrinity 2> /dev/null\n\n#write debconf data\ncat >> /tmp/debconfTrinity << \\\"EOF\\\"\nkdm-trinity kdm-trinity/stop_running_server_with_children boolean false\nkdm-trinity shared/default-x-display-manager select kdm-trinity\nkdm-trinity kdm-trinity/daemon_name string /opt/trinity/bin/kdm\nxdm shared/default-x-display-manager select kdm-trinity\ngdm shared/default-x-display-manager select kdm-trinity\nEOF\n\n\t\tdebconf-set-selections /tmp/debconfTrinity\n\t\");\n\n\n\n\t//Import the GPG key for the packages.\n\techo(\"\n\t\twget -T1 -t1 -q http://m23.sourceforge.net/trinity.asc -O - | apt-key add -\n\t\");\n\n\n\n\t//Install Trinity\n\tCLCFG_aptGet(\"install\",\"$extraPackages kdm-trinity kdebase-trinity kdelibs4c2a-trinity desktop-base-trinity kde-i18n-$lV[packagelang]-trinity kdepasswd-trinity kmix-trinity kate-trinity gtk-qt-engine-trinity language-pack-gnome-$lV[packagelang]\");\n\n\t//Adjust the pathes from kde to trinity\n\techo('\n\tfind /home/ -maxdepth 1 -mindepth 1 | while read dir\n\tdo\n\t\tcd \"$dir\"\n\t\tmv .kde .trinity\n\tdone\n\t\n\tmv /etc/skel/.kde /etc/skel/.trinity\n\t');\n\n\n\n\t//Check the installation\necho(\"\nif [ -f /opt/trinity/bin/kdm ]\nthen\n\t\".sendClientLogStatus(\"Trinity installed\",true,$critical).\"\nelse\n\t\");\n\tMSR_logCommand(\"/tmp/m23sourceupdate.log\");\n\tMSR_logCommand($logFile);\n\techo(\"\n\t\".sendClientLogStatus(\"Trinity installed\",false,$critical).\"\nfi\n\n\");\n\n}", "function vistaPrenomina(){\n\t\t$nominasPeriodo \t\t= $this->CatalogosModel->periodoactualPrenomina();\n\t\t$conceptosConfig = $this->CatalogosModel->conceptosPrenominaExiste();\n\t\t$numconceptosConf = $conceptosConfig->num_rows;\n\t\trequire(\"views/prenomina/prenomina.php\");\n\t}", "public function run()\n {\n $aantal_producten = 11;\n $beschrijving_pd1 = \"Met de Poly Voyager Focus B825-M Bluetooth Office Headset met Basisstation ga je altijd en overal het gesprek aan. Je koppelt deze headset namelijk via bluetooth aan je smartphone, pc, laptop en bluetooth deskphone. Of je nou in de trein zit of aan je bureau werkt, de accu van deze Poly headset gaat tot 12 uur mee.\";\n $beschrijving_pd2 = \"RSI klachten in de toekomst voorkom je door een juiste zithouding. De positie van je benen en voeten is hierin ook van belang. Met de Fellowes Voetensteun zorg je ervoor dat je benen in de juiste houding komen te staan, wanneer je plaats neemt achter je bureau.\";\n $beschrijving_pd3 = \"Als jij je laptop of pc wilt uitbreiden met 4 USB A poorten, is deze hub precies wat je nodig hebt. Dit model beschikt over USB 3.0 poorten die een snelle dataoverdracht garanderen. \";\n $beschrijving_pd4 = \"Met de zwarte HP 953 (L0S58AE) inktcartridge produceert uw printer afdrukken van hoge kwaliteit. De inkt droogt snel, waardoor geen vlekken ontstaan en tekst geschikt is voor het gebruik van markeerstiften.\";\n $beschrijving_pd5 = \"Met de HP Cartridge 301 in huis weet je zeker dat je op belangrijke momenten nooit in de steek wordt gelaten. De documenten die uit je printer rollen zijn namelijk keer op keer voorzien met letters van laserkwaliteit.\";\n $beschrijving_pd6 = \"De HP OfficeJet 6950 e-all-in-One is een uitgebreide kleuren inkjet printer voor kantoren. Voer meerdere taken uit zoals scannen, kopiëren en printen op een hoge printresolutie van 4.800 bij 1.200 dpi. Bovendien verstuur je via wifi een printopdracht vanaf je telefoon of tablet.\";\n $beschrijving_pd7 = \"De HP EliteDisplay E243i is een 24 inch monitor waarmee je een ergonomische werkplek creëert op kantoor of thuis. Deze monitor is namelijk kantelbaar, roteerbaar en in hoogte verstelbaar. Zo pas je hem volledig aan jouw werkhouding aan en verminder de kans op klachten aan je nek en schouders.\";\n $beschrijving_pd8 = \"De Logitech MX Master 3 is de opvolger van de succesvolle MX Master 2S. Het MagSpeed scrollwiel is nu nog sneller en stiller dan eerder. Zo scroll je weer in no-time door al je Excelregels heen. Ook is Logitech Flow weer terug, dus gebruik de muis op meerdere apparaten op hetzelfde moment en wissel tussen deze apparaten met een druk op de knop.\";\n $beschrijving_pd9 = \"Met de HP Draadloze Muis 200 Zwart is dankzij zijn vorm grootte comfortabel in gebruik en ontlast hierdoor de pols. Doordat de muis draadloos is, zit je niet in de knoop met draden die op je bureau liggen. En dankzij de draadloze connectiviteit van 2,4 Ghz heb je een bereik tot 10 meter en een hoek van 360 graden.\";\n $beschrijving_pd10 = \"De toetsenbordindeling van dit toetsenbord is QWERTY en de taalindeling is US International.\";\n $beschrijving_pd11 = \"Plaats gemakkelijk je monitoren en andere werkspullen op het werkblad. Je verbetert de productiviteit als je zittend en staand werken afwisselt. Deze afwisseling is ook goed voor de ergonomie. Hiermee verminder je de kans op lichamelijke klachten.\";\n $category_array=[\"Communicatie\",\"Ergonomie\",\"Kabels\", \"Print apparatuur\", \"Print apparatuur\", \"Print apparatuur\", \"Rand apparatuur\",\"Rand apparatuur\",\"Rand apparatuur\",\"Rand apparatuur\",\"Ergonomie\"];\n $description_array=[$beschrijving_pd1,$beschrijving_pd2,$beschrijving_pd3,$beschrijving_pd4,$beschrijving_pd5,$beschrijving_pd6,$beschrijving_pd7,$beschrijving_pd8,$beschrijving_pd9,$beschrijving_pd10,$beschrijving_pd11];\n $name_array=[\"Headset\",\"Voetensteun\",\"USB\",\"Cartridge\",\"Cartridge\",\"Printer\",\"Beeldscherm\",\"Muis\",\"Muis\",\"Toetsenbord\",\"Bureau\"];\n $brand_array=[\"Poly\",\"Fellowes\",\"X\",\"HP\",\"HP\",\"HP\",\"HP\",\"Logitech\",\"HP\",\"HP\",\"Bureau\"];\n $model_array=[\"B825-m\",\"159719\",\"USB-A to USB-C 2.0 BLACK\",\"953XL \",\"301XL\",\"Officejet 6950\",\"Elitedisplay 24\",\"MX Master 3\",\"200\",\"450\",\"Groot\"];\n $price_array=[\"216\",\"41\",\"5.99\",\"24.99\",\"24.99\",\"99.99\",\"129.99\",\"89.99\",\"22.99\",\"24.99\",\"400\"];\n $max_orders_array=[\"1\",\"1\",\"1\",\"10\",\"10\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\"];\n $condition_array=[\"none\",\"per persoon, goedkeuring nodig van manager\",\"none\",\"per jaar\",\"per year\",\"none\",\"per jaar, geen goedkeuring nodig\",\"none\",\"per jaar\",\"per jaar\",\"none\"];\n $approval_array=[true, true, false, false, false, true, false, true, false, false, true];\n $image_array=[\"/img/headset.jpg\",\"/img/voetensteun.jpg\",\"/img/usb.jpg\",\"/img/cartridge301xl.jpg\",\"/img/cartridge953xl.jpg\",\"/img/printer.jpg\",\"/img/beeldscherm.jpg\",\"/img/muislogitech.jpg\",\"/img/muishp.jpg\",\"/img/toetsenbord.jpg\",\"/img/bureau.jpg\",];\n for($i = 0; $i < $aantal_producten; $i++){\n DB::table('products')->insert([\n 'category'=> $category_array[$i],\n 'productname'=> $name_array[$i],\n 'description'=> $description_array[$i],\n 'brand'=> $brand_array[$i],\n 'model'=> $model_array[$i],\n 'price'=> $price_array[$i],\n 'maxorders'=> $max_orders_array[$i],\n 'condition'=> $condition_array[$i],\n 'approval'=> $approval_array[$i],\n 'image' => $image_array[$i],\n ]);\n\n }\n\n\n\n //\n }", "public function getDistributor();", "public function imprimeCaracteristicas()\n\t{\n\t\techo \"<br />--------------------------------\\n\";\n\t\techo \"<br />Pelicula en VHS:\\n\";\n\t\t//ejecutamos la funciona \"imprimeCaracteristicas()\" de la clase\n\t\t// extendida \"soporte\"\n\t\tparent::imprimeCaracteristicas();\n\t\techo \"<br />Duracion: \".$this->duracion.\"\\n\";\n\t\techo \"<br />--------------------------------\\n\";\n\t}", "function cargagasto(){\n\n\t}", "function exec_veille_tous_dist(){\n\n\t// -- Si pas autorise : message d'erreur\n\tif (!autoriser('voir', 'veille_tous')) {\n\t\tinclude_spip('inc/minipres');\n\t\techo minipres();\n\t\texit;\n\t}\n\n\n\tpipeline('exec_init', array('args'=>array('exec'=>'veille_tous'),'data'=>'')); \t// pipeline d'initialisation\n\t$commencer_page = charger_fonction('commencer_page', 'inc'); \t\t\t// entetes de la page\n\techo $commencer_page(_T('vu:html_title'), \"editer\", \"editer\");\t\t\t\n\t\n\n//\n// Colonne de gauche\n//\n\n\techo debut_gauche('', true);\n\techo pipeline('affiche_gauche', array('args'=>array('exec'=>'veille_tous'),'data'=>''));\n\n\t\t// Affichage du bloc d'information 'Navigation' (fonction definie au-dessus)\n\t\techo cadre_veille_tous_infos();\n\n\t\t// D'abord un 'bloc des raccourcis' pour les boutons de creation de nouveaux objets\n\t\techo bloc_des_raccourcis(icone_horizontale(_T('vu:raccourcis_annonce'), generer_url_ecrire(\"veille_edit\",\"type=annonce&new=oui\"), _DIR_VU_IMG_PACK.\"annonce-24.gif\", \"creer.gif\", false)\n\t\t\t. icone_horizontale(_T('vu:raccourcis_evenement'), generer_url_ecrire(\"veille_edit\",\"type=evenement&new=oui\"), _DIR_VU_IMG_PACK.\"evenement-24.gif\", \"creer.gif\", false)\n\t\t\t. icone_horizontale(_T('vu:raccourcis_publication'), generer_url_ecrire(\"veille_edit\",\"type=publication&new=oui\"), _DIR_VU_IMG_PACK.\"publication-24.gif\", \"creer.gif\", false)\n\t\t);\n\n\t\n//\t\n// Contenu central\n//\n\n\techo debut_droite('', true);\n\techo pipeline('affiche_milieu', array('args'=>array('exec'=>'veille_tous'),'data'=>''));\n\n\t// Liste des annonces\n\techo afficher_objets('annonce',_T('vu:liste_annonces'), array(\"SELECT\" => 'id_annonce, date, titre, statut', \"FROM\" => 'spip_vu_annonces AS annonces', 'WHERE' => \"statut='publie' OR statut='refuse' OR statut='prop'\", 'ORDER BY' => \"date DESC\"),'',true);\n\t// Liste des evenements\n\techo afficher_objets('evenement',_T('vu:liste_evenements'), array(\"SELECT\" => 'id_evenement, date, titre, statut', \"FROM\" => 'spip_vu_evenements AS evenements', 'WHERE' => \"statut='publie' OR statut='refuse' OR statut='prop'\", 'ORDER BY' => \"date DESC\"),'',true);\n\t// Liste des publications\n\techo afficher_objets('publication',_T('vu:liste_publications'),\tarray(\"SELECT\" => 'id_publication, date, titre, statut', \"FROM\" => 'spip_vu_publications AS publications', 'WHERE' => \"statut='publie' OR statut='refuse' OR statut='prop'\", 'ORDER BY' => \"date DESC\"),'',true);\n\n\t\n\n\n\techo fin_gauche(), fin_page();\n}", "function deliciae_copyright() {\nglobal $wpdb;\n$copyright_dates = $wpdb->get_results(\"\n\tSELECT YEAR(min(post_date_gmt)) AS firstdate, YEAR(max(post_date_gmt)) AS lastdate FROM\n\t$wpdb->posts WHERE post_status = 'publish' \");\n$output = '';\n\tif($copyright_dates) {\n\t\t$copyright = \"&copy; \" . $copyright_dates[0]->firstdate;\n\tif($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {\n\t\t$copyright .= '-' . $copyright_dates[0]->lastdate;\n\t}\n\t$output = $copyright;\n\t}\n\treturn $output;\n}", "function dfd_kadabra_scripts() {\n\t\tglobal $dfd_ronneby;\n\t\t\n\t\t$dfd_multisite_file_option = dfd_get_multisite_option();\n\n\t\t/*\n\t\t * Css styles\n\t\t */\n\t\twp_register_script('dfd_queryloader2', get_template_directory_uri() . '/assets/js/jquery.queryloader2.min.js', array('jquery'), '2', false, true);\n\t\t\n\t\t//wp_register_style('dfd_preloader_style', get_template_directory_uri() . '/assets/css/preloader'.$dfd_multisite_file_option.'.css', false, null);\n\t\twp_register_style('dfd_site_style', get_template_directory_uri() . '/assets/css/app'.$dfd_multisite_file_option.'.css', false, null);\n\t\t\n\t\tif ( class_exists( 'Vc_Manager', false ) ) {\n\t\t\twp_register_style('dfd_vc_custom_style', get_template_directory_uri() . '/assets/css/visual-composer'.$dfd_multisite_file_option.'.css', false, null);\t\t\t\n\t\t\twp_enqueue_style('dfd_vc_custom_style');\n\t\t}\n\t\t\n\t\twp_register_style('dfd_mobile_responsive', get_template_directory_uri() . '/assets/css/mobile-responsive.css', false, null);\n\t\twp_register_style('dfd-multislider-css', get_template_directory_uri() . '/assets/css/multislider.css', false, null);\n\t\t\n\t\t//wp_enqueue_style('dfd_preloader_style');\n\t\twp_enqueue_style('dfd_site_style');\n\t\t\n\t\t/**\n\t\t * Check if WooCommerce is active\n\t\t * */\n\t\tif (is_plugin_active('woocommerce/woocommerce.php')) {\n\t\t\t$woocommerce_css_file = get_template_directory_uri() . '/assets/css/woocommerce'.$dfd_multisite_file_option.'.css';\n\t\t\t\n\t\t\tif(isset($dfd_ronneby['dfd_woocommerce_templates_path']) && $dfd_ronneby['dfd_woocommerce_templates_path'] == '_old')\n\t\t\t\t$woocommerce_css_file = get_template_directory_uri() . '/assets/css/woocommerce_old'.$dfd_multisite_file_option.'.css';\n\t\t\t\n\t\t\twp_register_style('dfd_wocommerce_style', $woocommerce_css_file, false, null);\n\t\t\twp_enqueue_style('dfd_wocommerce_style');\n\n\t\t\t/*global $woocommerce;\n\t\t\tif (intval($woocommerce->version) >= 2) {\n\t\t\t\twp_deregister_script('wc-add-to-cart');\n\t\t\t\twp_deregister_script('wc-add-to-cart-variation');\n\t\t\t\twp_register_script('wc-add-to-cart', get_template_directory_uri() . '/assets/js/woocommerce/add-to-cart.js', array( 'jquery' ), $woocommerce->version, true, true);\n\t\t\t\twp_register_script('wc-add-to-cart-variation', get_template_directory_uri() . '/assets/js/woocommerce/add-to-cart-variation.js', array( 'jquery' ), $woocommerce->version, true, true);\n\t\t\t}*/\n\t\t}\n\t\t\n\t\t/**\n\t\t * Check if Go Pricing is active\n\t\t * */\n\t\tif (is_plugin_active('go_pricing/go_pricing.php')) { // go_pricing_skin\n\t\t\twp_register_style('dfd_go_pricing_skin', get_template_directory_uri() . '/assets/css/go_pricing_skin'.$dfd_multisite_file_option.'.css', false, null);\n\t\t\twp_enqueue_style('dfd_go_pricing_skin');\n\t\t}\n\t\t\n\t\t/**\n\t\t * Check if MasterSlider is not active\n\t\t * */\n\t\t/*\n\t\tif (is_plugin_active('masterslider/masterslider.php') === false ) { // enable masterslider default styles for jquery plugin\n\t\t\twp_register_style('dfd_masterslider_default', get_template_directory_uri() . '/assets/css/masterslider.css', false, null);\n\t\t\twp_enqueue_style('dfd_masterslider_default');\n\t\t}\n\t\t*/\n\t\t/**\n\t\t * mobile responsive\n\t\t */\n\t\tif (isset($dfd_ronneby['mobile_responsive']) && strcmp($dfd_ronneby['mobile_responsive'],'1') === 0) {\n\t\t\twp_enqueue_style('dfd_mobile_responsive');\n\t\t}\n\n\t\t//wp_enqueue_style('crum_effects', get_template_directory_uri() . '/assets/css/animate-custom.css', false, null);\n\t\t/* Bbpress styles */\n\t\tif(is_plugin_active('bbpress/bbpress.php')) {\n\t\t\twp_enqueue_style('crum_bbpress', get_template_directory_uri() . '/assets/css/bbpress'.$dfd_multisite_file_option.'.css', false, null);\n\t\t}\n\t\tif(class_exists('BuddyPress')) {\n\t\t\twp_enqueue_style('dfd_buddypress', get_template_directory_uri() . '/assets/css/bbpress'.$dfd_multisite_file_option.'.css', false, null);\n\t\t}\n\t\twp_enqueue_style('isotope_style', get_template_directory_uri() . '/assets/css/jquery.isotope.css', false, null);\n\t\twp_deregister_style('prettyphoto');\n\t\twp_deregister_style('woocommerce_prettyPhoto_css');\n\t\twp_enqueue_style('prettyphoto_style', get_template_directory_uri() . '/assets/css/prettyPhoto.css', false, null);\n\t\t/*********** ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ *********/\n\t\t//wp_enqueue_style('flexslider_style', get_template_directory_uri() . '/assets/css/flexslider.css', false, null);\n\t\t\n\t\t//wp_enqueue_style('dfd_options_values', get_template_directory_uri() . '/assets/css/custom-styles.css', false, null);\n\n\t\twp_enqueue_style( 'main-style', get_stylesheet_uri(), false, null );\n\t\t\n\t\tif(is_multisite()) {\n\t\t\t$uploads = wp_upload_dir();\n\t\t\t$aq_uploads_dir = trailingslashit($uploads['baseurl']);\n\t\t\twp_enqueue_style('dfd_theme_options', $aq_uploads_dir . 'options.css', false, null);\n\t\t} else {\n\t\t\twp_enqueue_style('dfd_theme_options', get_template_directory_uri() . '/css/options.css', false, null);\n\t\t}\n\t\t\n\t\t/* RTL support */\n\t\tif(is_rtl()) {\n\t\t\twp_enqueue_style('dfd_rtl', get_template_directory_uri() . '/assets/css/rtl.css', false, null);\n\t\t}\n\n\t\t/*\n\t\t * JS register\n\t\t */\n\t\t//wp_register_script('headroom', get_template_directory_uri() . '/assets/js/headroom.min.js', false, null, true);\n\t\twp_register_script('dfd_slide_parallax', get_template_directory_uri() . '/assets/js/jquery.slide_parallax.js', false, null, true);\n\n\t\twp_register_script('smooth-scroll', get_template_directory_uri() . '/assets/js/jquery.smoothscroll.js', false, null, true);\n\t\twp_deregister_script('isotope');\n\t\twp_register_script('isotope', get_template_directory_uri() . '/assets/js/jquery.isotope.min.js', false, null, true);\n\t\twp_register_script('isotope_recenworks', get_template_directory_uri() . '/assets/js/jquery.isotope.recentworks.js', false, null, true);\n\t\twp_register_script('isotope-run-2col', get_template_directory_uri() . '/assets/js/jquery.isotope.2col.run.js', false, null, true);\n\t\twp_register_script('isotope-run-3col', get_template_directory_uri() . '/assets/js/jquery.isotope.3col.run.js', false, null, true);\n\t\twp_register_script('isotope-run-4col', get_template_directory_uri() . '/assets/js/jquery.isotope.4col.run.js', false, null, true);\n\t\twp_register_script('masonry', get_template_directory_uri() . '/assets/js/jquery.masonry.min.js', true, null, true);\n\t\t//wp_deregister_script('flexslider');\n\t\t//wp_register_script('flexslider', get_template_directory_uri() . '/assets/js/jquery.flexslider-min.js', false, null, false);\n\t\t//wp_register_script('jcarousel', get_template_directory_uri() . '/assets/js/jquery.jcarousel.min.js', false, null, false);\n\t\tif (!wp_script_is('themepunchtools') && !wp_script_is('revslider-jquery.themepunch.plugins.min')) {\n\t\t\twp_register_script('hammer', get_template_directory_uri() . '/assets/js/hammer.min.js', false, null, true);\n\t\t}\n\t\t//wp_register_script('jCarouselSwipe', get_template_directory_uri() . '/assets/js/jCarouselSwipe.min.js', array('jcarousel', 'crum_foundation'), null, false);\n\t\t\n\t\t/*Gallery post type scripts*/\n\t\twp_register_script('dfd-isotope-gallery', get_template_directory_uri() . '/assets/js/jquery.isotope.gallery.js', false, null, true);\n\t\twp_register_script('dfd-carousel-gallery', get_template_directory_uri() . '/assets/js/jquery.carousel.gallery.js', false, null, true);\n\t\twp_register_script('dfd-gallery-module-isotope', get_template_directory_uri() . '/assets/js/jquery.isotope.gallery-module.js', false, null, true);\n\t\t\n\t\twp_register_script('gmaps', '//maps.googleapis.com/maps/api/js?key=AIzaSyAdY8R5lQPdDO_ffF9WADgbYVsYmpfv3Vw', false, null, false, true);\n\t\t//wp_register_script('gmaps', '//maps.googleapis.com/maps/api/js?key=AIzaSyD4Eo5QyWFHRsNeCo8fOw-gS2fT0joxu8k', false, null, false, true);\n\t\twp_register_script('gmap3', get_template_directory_uri() . '/assets/js/gmap3.min.js', false, null, true, true);\n\t\twp_deregister_script('prettyphoto');\n\t\twp_deregister_script('prettyPhoto');\n\n\t\t//wp_register_script('feature-image-box-transform', get_template_directory_uri() . '/assets/js/jquery.feature-image-box-transform.js', false, null, true);\n\n\t\twp_register_script('woocommerce_hack', get_template_directory_uri() . '/assets/js/woocommerce_hack.js', false, null, true);\n\n\t\twp_register_script('dropdown', get_template_directory_uri() . '/assets/js/dropdown.js', false, null, true);\n\n//\t\twp_register_script('colpick', get_template_directory_uri() . '/stylechanges/colpick/js/colpick.js', false, null, true);\n\n\t\t// Audioplayer\n\t\twp_register_script('js-audio', get_template_directory_uri().'/assets/js/audioplayer.min.js', false, null, true);\n\t\t//wp_register_script('js-audio-run', get_template_directory_uri().'/assets/js/audioplayer.run.js', false, null, true);\n\t\t\n\t\t// Video Player\n\t\t//wp_register_script('dfd_self_hosted_videos_js', '//vjs.zencdn.net/c/video.js');\n\t\t//wp_register_style('dfd_self_hosted_videos_css', '//vjs.zencdn.net/c/video-js.css');\n\t\twp_register_style('dfd_zencdn_video_css', '//vjs.zencdn.net/c/video-js.css', false, null);\n\t\twp_register_script('dfd_zencdn_video_js', '//vjs.zencdn.net/c/video.js', false, null);\n\t\t\n\t\t// Facebook Widget\n\t\twp_register_script('dfd_facebook_widget_script', get_template_directory_uri().'/assets/js/widget-facebook.js', false, null, true);\n\n\t\twp_register_script('mega_menu', get_template_directory_uri().'/assets/js/jquery.mega-menu.min.js', false, null, true);\n\t\tif(is_rtl()) {\n\t\t\twp_register_script('mega_menu_run', get_template_directory_uri().'/assets/js/jquery.mega-menu.run.rtl.min.js', false, null, true);\n\t\t} else {\n\t\t\twp_register_script('mega_menu_run', get_template_directory_uri().'/assets/js/jquery.mega-menu.run.js', false, null, true);\n\t\t}\n\t\t//wp_register_script('dl_menu', get_template_directory_uri().'/assets/js/jquery.dlmenu.min.js', false, '1.0.1', true, true);\n\t\t\n\t\t// keyframe\n\t\t\n\t\t// ajax pagination\n\t\twp_register_script('ajax-pagination', get_template_directory_uri().'/assets/js/ajax-pagination.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-lazy-load', get_template_directory_uri().'/assets/js/ajax-lazy-load.js', array('jquery'), null, true);\n\t\t\n\t\t//slick slider\n\t\twp_deregister_script('ult-slick');\n\t\twp_register_script('jquery.knob', get_template_directory_uri().'/assets/js/jquery.knob.js', array('jquery'), null, true);\n\t\twp_register_script('dfd.onepagescroll', get_template_directory_uri().'/assets/js/jquery.onepagescroll.js', array('jquery'), null, true);\n\t\twp_register_script('fullscreenvideo', get_template_directory_uri().'/assets/js/full-screen-video.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-tweenlite', get_template_directory_uri().'/assets/js/TweenLite.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-easepack', get_template_directory_uri().'/assets/js/EasePack.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-rAF', get_template_directory_uri().'/assets/js/rAF.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-particleground', get_template_directory_uri().'/assets/js/jquery.particleground.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-particleground-old', get_template_directory_uri().'/assets/js/jquery.particleground.old.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-three', get_template_directory_uri().'/assets/js/three.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-projector', get_template_directory_uri().'/assets/js/projector.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-canvas-renderer', get_template_directory_uri().'/assets/js/canvas-renderer.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-multislider', get_template_directory_uri().'/assets/js/jquery.multiscroll.min.js', array('jquery'), null, false);\n\t\twp_register_script('dfd-sly', get_template_directory_uri().'/assets/js/sly.min.js', array('jquery'), null, false);\n\t\twp_register_script('dfd-tween-max', get_template_directory_uri().'/assets/js/TweenMax.min.js', array('jquery'), null, true);\n\t\twp_register_script('dfd-panr', get_template_directory_uri().'/assets/js/jquery.panr.min.js', array('jquery'), null, false);\n\t\twp_register_script('dfd-scrolling-news', get_template_directory_uri().'/assets/js/jquery.slick.news.js', array('jquery'), null, false);\n\t\twp_register_script('dfd-jparallax', get_template_directory_uri().'/assets/js/jquery.parallax.js', array('jquery'), null, false);\n\t\twp_register_script('dfd-typed', get_template_directory_uri().'/assets/js/typed.min.js', array('jquery'), null, false);\n\t\t//wp_register_script('masterslider', get_template_directory_uri().'/assets/js/masterslider.min.js', array('jquery'), null, true);\n\t\t//wp_register_script('vague', get_template_directory_uri().'/assets/js/vague.js', array('jquery'), null, true);\n\t\t//wp_register_script('htmltocanvas', get_template_directory_uri().'/assets/js/html2canvas.js', array('jquery'), null, true);\n\t\t//wp_register_script('pixastic', get_template_directory_uri().'/assets/js/pixastic.custom.js', array('jquery'), null, true);\n\n\t\t/**\n\t\t * Enqueue Preloader\n\t\t */\n\t\t\n\t\t/*\n\t\t * JS enquene\n\t\t */\n\t\twp_enqueue_script('jquery');\n\t\tif (isset($dfd_ronneby['site_preloader_enabled']) && strcmp($dfd_ronneby['site_preloader_enabled'],'1')===0) {\n\t\t\twp_enqueue_style( 'dfd_preloader_indicator', get_template_directory_uri() . '/assets/css/site-preloader'.$dfd_multisite_file_option.'.css', false, null );\n\t\t\twp_enqueue_script('dfd_queryloader2');\n\t\t}\n\t\tif(!isset($dfd_ronneby['dev_mode']) || $dfd_ronneby['dev_mode'] != 'on') {\n\t\t\twp_register_script('dfd_js_plugins', get_template_directory_uri() . '/assets/js/plugins.min.js', false, null, true);\n\t\t\twp_enqueue_script('dfd_js_plugins');\n\t\t} else {\n\t\t\twp_register_script('crum_foundation', get_template_directory_uri() . '/assets/js/foundation.min.js', false, null, true);\n\t\t\twp_register_script('crum_effects', get_template_directory_uri() . '/assets/js/animation.js', false, null, true);\n\t\t\twp_register_script('mmenu', get_template_directory_uri().'/assets/js/jquery.sidr.min.js', false, null, true);\n\t\t\twp_register_script('keyframes', get_template_directory_uri().'/assets/js/jquery.keyframes.min.js', array('jquery'), null, true);\n\t\t\t//wp_register_script('jquery-migrate', get_template_directory_uri().'/assets/js/jquery.migrate.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('slick', get_template_directory_uri().'/assets/js/jquery.slick.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd_scrollTo', get_template_directory_uri().'/assets/js/jquery.scrollTo.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('jquery.easing', get_template_directory_uri().'/assets/js/jquery.easing.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-folio-hover', get_template_directory_uri().'/assets/js/jquery.hoverdir.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-folio-hover-init', get_template_directory_uri().'/assets/js/jquery.hoverdir.init.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('dfd-chaffle', get_template_directory_uri().'/assets/js/jquery.chaffle.js', array('jquery'), null, true);\n\t\t\twp_register_script('prettyphoto', get_template_directory_uri() . '/assets/js/jquery.prettyPhoto.js', false, null, true, true);\n\t\t\twp_register_script('qr_code', get_template_directory_uri() . '/assets/js/qrcode.min.js', false, null, true);\n\t\t\t//wp_register_script('custom-share', get_template_directory_uri() . '/assets/js/jquery.sharrre-1.3.5.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('custom-share', get_template_directory_uri() . '/assets/js/rrssb.js', array('jquery'), null, true);\n\t\t\twp_register_script('vertical_js', get_template_directory_uri() . '/assets/js/vertical.min.js', false, null, true);\n\t\t\twp_register_script('dropkick', get_template_directory_uri() . '/assets/js/jquery.dropkick-min.js', false, null, true);\n\t\t\twp_register_script('crum_main', get_template_directory_uri() . '/assets/js/app.js', false, null, true);\n\t\t\t\n\t\t\twp_enqueue_script('crum_foundation');\n\t\t\twp_enqueue_script('keyframes');\n\n\t\t\twp_enqueue_script('crum_effects');\n\n\t\t\t//wp_enqueue_script('jquery-migrate');\n\t\t\twp_enqueue_script('slick');\n\t\t\twp_enqueue_script('dfd_scrollTo');\n\t\t\twp_enqueue_script('jquery.easing');\n\t\t\twp_enqueue_script('custom-share');\n\t\t\twp_enqueue_script('vertical_js');\n\t\t\twp_enqueue_script('dropkick');\n\t\t\twp_enqueue_script('prettyphoto');\n\n\t\t\t//wp_enqueue_script('dl_menu');\n\t\t\twp_enqueue_script('mmenu');\n\n\t\t\twp_enqueue_script('dfd-folio-hover');\n\n\t\t\twp_enqueue_script('dfd-folio-hover-init');\n\n\t\t\twp_enqueue_script('dfd-chaffle');\n\n\t\t\twp_enqueue_script('crum_main');\n\t\t}\n\t\t\n\t\t//wp_enqueue_script('headroom');\n\n\t\t//wp_enqueue_script('flexslider');\n\t\t//wp_enqueue_script('jcarousel');\n\t\twp_enqueue_script('hammer');\n\t\t//wp_enqueue_script('jCarouselSwipe');\n\t\t\n\t\t\n\t\t//wp_enqueue_script('masterslider');\n\t\t//wp_enqueue_script('vague');\n\t\t//wp_enqueue_script('htmltocanvas');\n\t\t//wp_enqueue_script('pixastic');\n\n\n\n\t\tif (!isset($dfd_ronneby['scroll_animation']) || strcmp($dfd_ronneby['scroll_animation'],'off')!==0) {\n\t\t\twp_enqueue_script('smooth-scroll');\n\t\t}\n\n\t\t\n\n\t\tif (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {\n\t\t\twp_enqueue_script('dropdown');\n\t\t\twp_enqueue_script('woocommerce_hack');\n\t\t}\n\t\t\n\t\twp_register_script('dfd-masonry-2cols-run', get_template_directory_uri() . '/assets/js/jquery.masonry.2cols.run.js', true, null, true);\n\t\twp_register_script('dfd-masonry-3cols-run', get_template_directory_uri() . '/assets/js/jquery.masonry.3cols.run.js', true, null, true);\n\t\twp_register_script('dfd-masonry-4cols-run', get_template_directory_uri() . '/assets/js/jquery.masonry.4cols.run.js', true, null, true);\n\t\twp_register_script('dfd-grid-2cols-run', get_template_directory_uri() . '/assets/js/jquery.grid.2cols.run.js', true, null, true);\n\t\twp_register_script('dfd-grid-3cols-run', get_template_directory_uri() . '/assets/js/jquery.grid.3cols.run.js', true, null, true);\n\t\twp_register_script('dfd-grid-4cols-run', get_template_directory_uri() . '/assets/js/jquery.grid.4cols.run.js', true, null, true);\n\t\twp_register_script('dfd-masonry-4cols-fw-run', get_template_directory_uri() . '/assets/js/jquery.masonry.4cols-fw.run', true, null, true);\n\t\twp_register_script('dfd-masonry-mini-3cols-run', get_template_directory_uri() . '/assets/js/jquery.masonry.mini.3cols.run.js', true, null, true);\n\t\twp_register_script('dfd-masonry-mini-4cols-run', get_template_directory_uri() . '/assets/js/jquery.masonry.mini.4cols.run.js', true, null, true);\n\t\twp_register_script('dfd-isotope-enable', get_template_directory_uri() . '/assets/js/jquery.isotope.enable.js', true, null, true);\n\t\twp_register_script('dfd-isotope-1col-enable', get_template_directory_uri() . '/assets/js/jquery.isotope.1col.enable.js', true, null, true);\n\t\twp_register_script('dfd-isotope-4cols-enable', get_template_directory_uri() . '/assets/js/jquery.isotope-4cols.enable.js', true, null, true);\n\t\twp_register_script('dfd-isotope-porfolio-inside', get_template_directory_uri() . '/assets/js/jquery.isotope.porfolio-inside.js', true, null, true);\n\t\twp_register_script('dfd-isotope-portfolio', get_template_directory_uri() . '/assets/js/jquery.isotope.porfolio.js', true, null, true);\n\t\twp_register_script('dfd-isotope-news-module', get_template_directory_uri() . '/assets/js/jquery.isotope.news-module.js', true, null, true);\n\t\twp_register_script('dfd-isotope-blog', get_template_directory_uri() . '/assets/js/jquery.isotope.blog.js', true, null, true);\n\t\t//wp_register_script('dfd-columns-isotope', get_template_directory_uri() . '/assets/js/jquery.isotope.columns.js', true, null, true);\n\t\t\n\t\t\n\t\twp_register_script('dfd-isotope-news-carousel', get_template_directory_uri() . '/assets/js/jquery.carousel.news-module.js', true, null, true);\n\t\t\n\t\t// deprecated\n\t\twp_register_script('dfd-masonry-enable', get_template_directory_uri() . '/assets/js/jquery.masonry.enable.js', true, null, true);\n\t\t\n\t\tif (is_singular('my-product')) {\n\t\t\twp_enqueue_script('isotope');\n\t\t\twp_enqueue_script('dfd-isotope-porfolio-inside');\n\t\t}\n\t\t\n\t\t# Load script/styles for page templates\n\t\tif (is_page()) {\n\t\t\t$curr_page_template = basename(get_page_template());\n\n\t\t\tswitch($curr_page_template) {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tcase 'page-contacts.php':\n\t\t\t\t\twp_enqueue_script('gmaps');\n\t\t\t\t\twp_enqueue_script('gmap3');\n\t\t\t\t\t//wp_enqueue_script('qr_code');\n\t\t\t\t\tbreak;\n\t\t\t\t*/\n\n\t\t\t\tcase 'tmp-posts-masonry-2.php':\n\t\t\t\tcase 'tmp-posts-masonry-2-left-side.php':\n\t\t\t\tcase 'tmp-posts-masonry-2-side.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-masonry-2cols-run');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'tmp-posts-grid-2.php':\n\t\t\t\tcase 'tmp-posts-grid-2-left-side.php':\n\t\t\t\tcase 'tmp-posts-grid-2-right-sidebar.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-grid-2cols-run');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tmp-posts-masonry-3-left-sidebar.php':\n\t\t\t\tcase 'tmp-posts-masonry-3-left-sidebar-fullwidth.php':\n\t\t\t\tcase 'tmp-posts-masonry-3-right-sidebar.php':\n\t\t\t\tcase 'tmp-posts-masonry-3-right-sidebar-fullwidth.php':\n\t\t\t\tcase 'tmp-posts-masonry-3.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-masonry-3cols-run');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'tmp-posts-grid-3.php':\n\t\t\t\tcase 'tmp-posts-grid-3-left-sidebar.php':\n\t\t\t\tcase 'tmp-posts-grid-3-right-sidebar.php':\n\t\t\t\tcase 'tmp-posts-grid-3-left-sidebar-fullwidth.php':\n\t\t\t\tcase 'tmp-posts-grid-3-right-sidebar-fullwidth.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-grid-3cols-run');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'tmp-posts-masonry-4.php':\n\t\t\t\tcase 'tmp-posts-masonry-4-fullwidth.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-masonry-4cols-run');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'tmp-posts-grid-4.php':\n\t\t\t\tcase 'tmp-posts-grid-4-fullwidth.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-grid-4cols-run');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tmp-portfolio-masonry-full-width-bordered-title.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-full-width.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-full-width-bordered.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-1.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-1-bordered.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-isotope-enable');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'tmp-portfolio-template-1-sorting.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-isotope-1col-enable');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tmp-portfolio-masonry-full-width-4-cols.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-full-width-bordered-4-cols.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-full-width-bordered-4-cols-title.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-isotope-4cols-enable');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tmp-portfolio-template-2mini-left-sidebar.php':\n\t\t\t\tcase 'tmp-portfolio-template-2mini.php':\n\t\t\t\tcase 'tmp-portfolio-template-2excerpt.php':\n\t\t\t\tcase 'tmp-portfolio-template-2.php':\n\t\t\t\tcase 'tmp-portfolio-grid-2-mini.php':\n\t\t\t\tcase 'tmp-portfolio-template-2-left-sidebar.php':\n\t\t\t\tcase 'tmp-portfolio-template-2-right-sidebar.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-template-2.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-template-2-left-sidebar.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-template-2-right-sidebar.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('isotope-run-2col');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tmp-portfolio-template-3excerpt.php':\n\t\t\t\tcase 'tmp-portfolio-template-3.php':\n\t\t\t\tcase 'tmp-portfolio-template-3-left-sidebar.php':\n\t\t\t\tcase 'tmp-portfolio-template-3-right-sidebar.php':\n\t\t\t\tcase 'tmp-portfolio-template-3mini-left-sidebar.php':\n\t\t\t\tcase 'tmp-portfolio-template-3mini.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('isotope-run-3col');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tmp-portfolio-template-4mini.php':\n\t\t\t\tcase 'tmp-portfolio-template-4excerpt.php':\n\t\t\t\tcase 'tmp-portfolio-template-4.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('isotope-run-4col');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tmp-portfolio-masonry_mini.php':\n\t\t\t\tcase 'tmp-portfolio-masonry_excerpt.php':\n\t\t\t\tcase 'tmp-portfolio-masonry.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-sidebar_mini.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-left-sidebar_mini.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-sidebar_excerpt.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-left-sidebar_excerpt.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-sidebar.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-left-sidebar.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-masonry-mini-3cols-run');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tmp-portfolio-masonry-4mini.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-4excerpt.php':\n\t\t\t\tcase 'tmp-portfolio-masonry-4.php':\n\t\t\t\t\twp_enqueue_script('isotope');\n\t\t\t\t\twp_enqueue_script('dfd-masonry-mini-4cols-run');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tmp-one-page-scroll.php':\n\t\t\t\t\twp_enqueue_script('dfd.onepagescroll');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (function_exists('post_like_scripts')) {\n\t\t\tpost_like_scripts();\n\t\t}\n\t\t\n\t\tif(isset($dfd_ronneby['enable_wordpress_heartbeat']) && $dfd_ronneby['enable_wordpress_heartbeat'] == 'off') {\n\t\t\twp_deregister_script('heartbeat');\n\t\t}\n\n\n\t}", "function cv_upgrade($nom_meta_base_version, $version_cible){\n\t$maj = array();\n\t\n\t// Première installation\n\t$maj['create'] = array(\n\t);\n\t\n\tinclude_spip('base/upgrade');\n\tmaj_plugin($nom_meta_base_version, $version_cible, $maj);\n}", "private static function installCustomized() {\n\t\t// customized install script goes here\n\t}", "function POOL_prepare($poolName,$release,$distr,$arch=\"i386\")\t// -> OOP\n{\n\t$confDir=POOL_getDir($poolName).\"/conf\";\n\t\n\tif (!is_dir($confDir))\n\t\tmkdir($confDir);\n\n\t$version = DISTR_releaseVersionTranslator($release);\n\n\t$confFile=fopen(\"$confDir/distributions\",\"w\");\n\tfwrite($confFile,\"Origin: $distr\nLabel: $poolName\nSuite: $release\nCodename: $release\nVersion: $version\nArchitectures: $arch source\nComponents: main non-free contrib\nDescription: m23 pool\n\");\n\n\tPOOL_setProperty($poolName,\"release\",$release);\n}", "function enqueue_scripts ()\n{\n $handle = 'cap-collation-front';\n\n lib\\enqueue_from_manifest (\"$handle.js\", ['cap-theme-front.js']);\n\n lib\\enqueue_from_manifest (\"$handle.css\");\n\n lib\\wp_set_script_translations (\"$handle.js\", DOMAIN);\n}", "function installer_champs_extras($champs, $nom_meta_base_version, $version_cible, $creer_meta=true) {\n\t$current_version = 0.0;\n\t$ok = true;\n\tif ((!isset($GLOBALS['meta'][$nom_meta_base_version]))\n\t|| (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){\n\t\t// cas d'une installation\n\t\t$ok = creer_champs_extras($champs);\n\t\tif ($ok and $creer_meta) {\n\t\t\tecrire_meta($nom_meta_base_version,$current_version=$version_cible,'non');\n\t\t}\n\t}\n\treturn $ok;\n}", "function cs_propre($texte) {\r\n\tinclude_spip('inc/texte');\r\n\t$mem = $GLOBALS['toujours_paragrapher'];\r\n\t$GLOBALS['toujours_paragrapher'] = false;\r\n\t$texte = propre($texte);\r\n\t$GLOBALS['toujours_paragrapher'] = $mem;\r\n\treturn $texte;\r\n}", "function kfp_fman_provincias_add() {\n\t$provincias = array(\n\t\t'Álava',\n\t\t'Albacete',\n\t\t'Alicante',\n\t\t'Almería',\n\t\t'Asturias',\n\t\t'Ávila',\n\t\t'Badajoz',\n\t\t'Barcelona',\n\t\t'Burgos',\n\t\t'Cáceres',\n\t\t'Cádiz',\n\t\t'Cantabria',\n\t\t'Castellón',\n\t\t'Ciudad Real',\n\t\t'Córdoba',\n\t\t'La Coruña',\n\t\t'Cuenca',\n\t\t'Gerona',\n\t\t'Granada',\n\t\t'Guadalajara',\n\t\t'Guipúzcoa',\n\t\t'Huelva',\n\t\t'Huesca',\n\t\t'Islas Baleares',\n\t\t'Jaén',\n\t\t'León',\n\t\t'Lérida',\n\t\t'Lugo',\n\t\t'Madrid',\n\t\t'Málaga',\n\t\t'Murcia',\n\t\t'Navarra',\n\t\t'Orense',\n\t\t'Palencia',\n\t\t'Las Palmas',\n\t\t'Pontevedra',\n\t\t'La Rioja',\n\t\t'Salamanca',\n\t\t'Segovia',\n\t\t'Sevilla',\n\t\t'Soria',\n\t\t'Tarragona',\n\t\t'Santa Cruz de Tenerife',\n\t\t'Teruel',\n\t\t'Toledo',\n\t\t'Valencia',\n\t\t'Valladolid',\n\t\t'Vizcaya',\n\t\t'Zamora',\n\t\t'Zaragoza',\n\t);\n\tforeach ( $provincias as $provincia ) {\n\t\twp_insert_term( $provincia, 'kfp_fman_provincias' );\n\t}\n}", "function opcion__compilar()\n\t{\n\t\t$this->get_nucleo()->compilar();\t\t\n\t}", "function formulaires_produire_icones_charger_dist() {\n\t$dirs = find_dirs_in_path('prive/themes/spip/images');\n\tsort($dirs);\n\t// on crée une liste tel que :\n\t// cle => valeur\n\t// plugins/toto => ../plugins/toto/prive/themes/spip/images\n\t$liste = array();\n\tforeach ($dirs as $d) {\n\t\t// on enleve ../ et prive/themes/spip/images\n\t\t$nom = explode('/', $d);\n\t\t$nom = array_slice($nom, 1, -4);\n\t\t$nom = implode('/', $nom);\n\t\t$liste['./'.$nom] = $d;\n\t}\n\n\t$images = array();\n\t$repertoire_destination = '';\n\t$erreur = '';\n\n\t// on recupere toutes les images du repertoire demandé.\n\t// et on verifie que le répertoire est écrivable\n\tif ($source = _request('repertoire_racine')) {\n\t\tif ($img = preg_files($source, '.*(png|gif)$')) {\n\t\t\t// on ne prend pas en compte les del/add/edit/new deja existantes\n\t\t\t$variantes = preg_files($source, '.*-(del|add|edit|new)-.*(png|gif)$');\n\t\t\t$img = array_diff($img, $variantes);\n\t\t\tforeach ($img as $i) {\n\t\t\t\t$nom = basename($i);\n\t\t\t\t$images[$nom] = $i;\n\t\t\t}\n\t\t}\n\n\t\tif (is_writable($source)) {\n\t\t\t$repertoire_destination = $source;\n\t\t} else {\n\t\t\t$erreur = '\n\t\t\t\tCe répertoire source n\\'est pas accessible en écriture.\n\t\t\t\tLes images calculées seront placées dans tmp/cache/icones\n\t\t\t\tet non dans le répertoire source.\n\t\t\t';\n\t\t\t$repertoire_destination = sous_repertoire(_DIR_CACHE, 'icones');\n\t\t}\n\t}\n\t\n\t$valeurs = array(\n\t\t'images' => '',\n\t\t'repertoire_racine' => '',\n\t\t'repertoire_racine_old' => '',\n\t\t'repertoire_destination' => $repertoire_destination,\n\t\t'liste_repertoires' => $liste,\n\t\t'liste_images' => $images,\n\t);\n\n\tif ($erreur) {\n\t\t$valeurs['message_info'] = $erreur;\n\t}\n\treturn $valeurs;\n}", "function buscar_distribuidor ($distribuidor, $campoBusqueda) {\n\tglobal $modulos, $db;\n\t\n\t$select = procesaSql(\"SELECT * FROM #_distribuidores WHERE $campoBusqueda = ?\");\n\t$resultados = $modulos->db->query($select, $distribuidor);\n\tif (PEAR::isError($resultados))\n\t\treturn false;\n\telse {\n\t\t$filas = Array();\n\t\twhile ($fila = $resultados->fetchRow())\n\t\t\t$filas[] = $fila;\n\t\t\t\n\t\treturn $filas;\n\t}\n}", "function autoriser_evenement_voirorphelin_dist($faire, $quoi, $id, $qui)\n{\n return lire_config('agenda/autoriser_orphelins');\n}", "public function getNewestComic();", "public function getNom_distribuidor()\n {\n return $this->nom_distribuidor;\n }", "public function admin_pregled(){\n\t\t$this->pozovi('admin/pregled', []);\n\t}", "function cp_dergister_scripts($hook)\n {\n $data = get_option('convert_plug_settings');\n $psval = isset($data['cp-plugin-support']) ? $data['cp-plugin-support'] : 1;\n\n if ($psval) {\n $page_hooks = array(\n CP_PLUS_SLUG . '_page_smile-modal-designer',\n CP_PLUS_SLUG . '_page_smile-info_bar-designer',\n CP_PLUS_SLUG . '_page_smile-slide_in-designer',\n 'admin_page_cp_customizer',\n );\n\n if (in_array($hook, $page_hooks)) {\n if (( isset($_GET['style-view']) && ( 'edit' === $_GET['style-view'] || 'variant' === $_GET['style-view'] ) ) || isset($_GET['hidemenubar'])) {\n global $wp_scripts;\n $scripts = $wp_scripts->registered;\n $deregistered_scripts = array();\n\n if (is_array($scripts)) {\n foreach ($scripts as $key => $script) {\n $source = $script->src;\n\n // if script is registered by plugin other than ConvertPlg OR by Theme.\n if (( strpos($source, 'wp-content/plugins') && ! strpos($source, 'wp-content/plugins/' . CP_DIR_NAME) ) || strpos($source, 'wp-content/themes')) {\n if (isset($script->handle)) {\n $handle = $script->handle;\n $source = $script->src;\n\n $deregistered_scripts[ $source ] = $handle;\n\n // deregister script handle.\n wp_deregister_script($handle);\n }\n }\n }\n }\n\n if (! empty($deregistered_scripts)) {\n update_option('cp_scripts_debug_info', $deregistered_scripts);\n }\n }\n }\n }\n }" ]
[ "0.5834868", "0.5614363", "0.54211473", "0.53907204", "0.5318877", "0.53005254", "0.52342576", "0.52063024", "0.5188662", "0.5156355", "0.51386404", "0.5124029", "0.511205", "0.5109777", "0.5107281", "0.5099449", "0.5085827", "0.5082927", "0.5077286", "0.50705594", "0.5034697", "0.50253016", "0.5018032", "0.5015779", "0.5014689", "0.50121385", "0.4999145", "0.49953303", "0.4985081", "0.49742508" ]
0.6237775
0
Sets the consumer information for the order
public function setConsumer(Icepay_Order_Consumer $obj) { $this->setData("consumer", $obj); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($consumer)\r\n\t{\r\n\t\t$this->consumer = $consumer;\r\n\t}", "public function updateConsumer ( Auth_OAuth_Store_Consumer $consumer );", "public function setCredentials($consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret);", "public function __construct(OrderService $orderService, ConsumerService $consumerService)\n {\n $this->orderService = $orderService;\n $this->consumerService = $consumerService;\n }", "protected function setCustomer()\n {\n $this->quoteCustomer->setEntity($this->quote);\n $this->quoteCustomer->setAddress($this->quote);\n $this->quoteCustomer->resetGuest($this->quote);\n }", "public function set_customer_info(){\n\t}", "public function setOAuth(HTTP_OAuth_Consumer $oauth)\n {\n $this->oauth = $oauth;\n }", "public function setConsumerData(WirecardCEE_Stdlib_ConsumerData $consumerData) {\n $this->oConsumerData = $consumerData;\n foreach($consumerData->getData() as $key => $value) {\n $this->_setField($key, $value);\n }\n return $this;\n }", "public function addOrderDetailsToSCICQueue($observer)\n {\n if (!Mage::getStoreConfigFlag('factfinder/export/track_checkout')) {\n return;\n }\n\n $order = $observer->getOrder();\n $customerId = $order->getCustomerId();\n if ($customerId) {\n $customerId = md5('customer_' . $customerId);\n }\n\n $searchHelper = Mage::helper('factfinder/search');\n $idFieldName = $searchHelper->getIdFieldName();\n\t\tif ($idFieldName == 'entity_id') {\n\t\t\t$idFieldName = 'product_id'; // sales_order_item does not contain a entity_id\n\t\t}\n\n foreach ($order->getAllItems() as $item) {\n if ($item->getParentItem() != null) {\n continue;\n }\n\n try {\n Mage::getModel('factfinder/scic_queue')\n ->setProductId($item->getData($idFieldName))\n ->setSid(md5(Mage::getSingleton('core/session')->getSessionId()))\n ->setUserid($customerId)\n ->setPrice($item->getPrice())\n ->setCount($item->getQtyOrdered())\n ->setStoreId(Mage::app()->getStore()->getId())\n ->save();\n }\n catch (Exception $e) {\n Mage::logException($e);\n }\n }\n }", "protected function setDistributionsParams() : void\n {\n $random = new Random();\n $this->channel = ChannelsModel::findFirstOrCreate(\n [\n 'conditions' => 'is_deleted = 0'\n ],\n [\n 'name' => 'Channel-Test',\n ]\n );\n\n $user = Users::findFirst(1);\n $app = new App();\n\n $this->message = Messages::findFirstOrCreate([\n 'conditions' => 'is_deleted = 0',\n 'order' => 'id desc'\n ], [\n 'uuid' => $random->uuid(),\n 'apps_id' => $app->getId(),\n 'companies_id' => $user->getDefaultCompany(),\n 'users_id' => $user->getId(),\n 'message_types_id' => 1,\n 'message' => 'Test for distribution',\n ]);\n }", "public function __construct(Yourdelivery_Model_Customer_Abstract $customer) {\n parent::__construct();\n $this->setCustomer($customer);\n $this->_orders = new SplObjectStorage();\n }", "public function updateConsumerToken ( Auth_OAuth_Token $token );", "public function __construct($consumer, $token, $parameters)\n {\n $this->consumer = $consumer;\n $this->token = $token;\n $this->parameters = array();\n foreach ($parameters as $key => $value)\n if ($value !== null)\n $this->parameters[$key] = $value;\n }", "public function setOrderId($orderId) {\n\n $this->orderId = $orderId;\n }", "public function actionCreateConsumer()\n\t{\n\t // Initialise tool consumer record if it does not already exist\n\t Yii::app()->lti->createConsumer('moodlekey');\n\t}", "private function setOrderAsProcessing()\n {\n if (\n $this->isOrderInPaymentReview()\n ) {\n $this->order->setState(\n self::MAGENTO_DESIRED_STATUS,\n true,\n Mage::helper('pagarme_core')\n ->__('Paid'),\n true\n );\n }\n }", "public function getConsumer()\n {\n return Mage::getSingleton('liljscart/consumer');\n }", "public function consumer() {\n return $this->belongsTo('oval\\LtiConsumer', 'consumer_pk', 'consumer_id');\n }", "public function __construct()\n {\n $this->brokers = [\n 'VIVO' => 1,\n 'TIM' => 1,\n 'CLARO' => 2,\n 'OI' => 2,\n 'NEXTEL' => 3\n ];\n }", "public function __construct($order)\n {\n $this->stockOrder = $order;\n }", "public function setConsumer(ServiceConsumer $consumer): ConsumerService;", "public function test_order_has_consumer_orders()\n {\n $consumer_orders = \\App\\Order::findOrFail(1)->consumer_orders;\n $this->assertContainsOnlyInstancesOf(\\App\\ConsumerOrder::class, $consumer_orders);\n $this->assertCount(2, $consumer_orders);\n\n $consumer_orders = \\App\\Order::findOrFail(2)->consumer_orders;\n $this->assertCount(0, $consumer_orders);\n }", "public function __construct()\n {\n $this->order = $order;\n \n }", "protected function setupQosOptions()\n {\n }", "public function setOrderId($orderId){\n\t\t$this->_orderId = $orderId;\n\t}", "public static function add_gconsumer_settings_field($param_name) {\n add_settings_field(Embpicamoto_Oauth_Util_Constants::consumerId($param_name), \"Consumer \" . ucfirst($param_name), self::gconsumer_field_renderer_func_name($param_name), __FILE__, Embpicamoto_Oauth_Util_Constants::GSectionId);\n }", "public function withAutoGeneratedConsumerTag(): self\n {\n $self = clone $this;\n $self->consumerTag = null;\n\n return $self;\n }", "public function getConsumer ( $consumer_key );", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function setCustomer(OrderCustomerInterface $customer);" ]
[ "0.61791354", "0.60196614", "0.54995733", "0.54735374", "0.5423449", "0.54183894", "0.5400575", "0.5307756", "0.5244225", "0.50794095", "0.5074296", "0.50489074", "0.5015709", "0.50061595", "0.49899507", "0.49561468", "0.49481693", "0.4915558", "0.49081728", "0.49045897", "0.48885122", "0.48760265", "0.48503095", "0.4843836", "0.48337966", "0.48284826", "0.48232695", "0.48230675", "0.4775716", "0.4766248" ]
0.6500763
0
Sets the billing address for the order
public function setBillingAddress(Icepay_Order_Address $obj) { $this->setData("billingAddress", $obj); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBillingAddress(Mage_Sales_Model_Order_Address $address) {\n $old = $this->getBillingAddress ();\n if (! empty ( $old )) {\n $address->setId ( $old->getId () );\n }\n $this->addAddress ( $address->setAddressType ( 'billing' ) );\n return $this;\n }", "public function updateBillingAddress()\n {\n if (!$this->billingAddress instanceof Address) {\n return;\n }\n\n $this->billingCity = $this->billingAddress->getCity();\n $this->billingCountry = $this->billingAddress->getCountry();\n $this->billingLatitude = $this->billingAddress->getLatitude();\n $this->billingLongitude = $this->billingAddress->getLongitude();\n $this->billingPostalCode = $this->billingAddress->getPostalCode();\n $this->billingState = $this->billingAddress->getState();\n $this->billingStreet = $this->billingAddress->getStreet();\n }", "private static function setBillingAddressToOrder($wcOrder, $address)\n {\n $wcOrder->set_billing_state(self::arrayValue($address, 'region', ''));\n $wcOrder->set_billing_postcode(self::arrayValue($address, 'index', ''));\n $wcOrder->set_billing_country(self::arrayValue($address, 'country', ''));\n $wcOrder->set_billing_city(self::arrayValue($address, 'city', ''));\n $wcOrder->set_billing_address_1(self::arrayValue($address, 'text', ''));\n }", "public function billingAddress(?Address $value): self\n {\n $this->instance->setBillingAddress($value);\n return $this;\n }", "function setBillTo(Address $address) {\r\n\t\t$this->billTo = $address;\r\n\t}", "public function setAddress($value)\n\t{\n\t\t$this->address = $value;\n\t}", "public function setBilling($firstname, $lastname, $company, $address1, $address2, $city, $state, $zip, $country, $phone, $fax, $email, $website) {\n\t\t$this->billing['firstname'] = $firstname;\n\t\t$this->billing['lastname'] = $lastname;\n\t\t$this->billing['company'] = $company;\n\t\t$this->billing['address1'] = $address1;\n\t\t$this->billing['address2'] = $address2;\n\t\t$this->billing['city'] = $city;\n\t\t$this->billing['state'] = $state;\n\t\t$this->billing['zip'] = $zip;\n\t\t$this->billing['country'] = $country;\n\t\t$this->billing['phone'] = $phone;\n\t\t$this->billing['fax'] = $fax;\n\t\t$this->billing['email'] = $email;\n\t\t$this->billing['website'] = $website;\n\t}", "public function setBillingAddress(Address $billingAddress)\n {\n $this->billingAddress = $billingAddress;\n return $this;\n }", "public function setBillingAddress(AddressObject $billingObject){\n\t\t$this->billing_address = $billingObject;\n\t\treturn $this;\n\t}", "protected function setAddress(Address $address) {\n\t\t\t$this->_Address = $address;\n\t\t}", "public function setAddress($address)\n {\n $this->addParameter('address', (string)$address);\n }", "function setCompanyAddress($value) {\n return $this->setFieldValue('company_address', $value);\n }", "public function setAddress($address)\n {\n }", "public function setAddress($address) {\n $this->address = $address;\n }", "public function setAddress(?PostalAddressType $value): void {\n $this->getBackingStore()->set('address', $value);\n }", "public function setAddress($address) {\n\t\t$this->address = $address;\n\t}", "function setAddress($value);", "public function setAddress(?Address $address): void\n {\n $this->address = $address;\n }", "public function setBillingAddress(BillingAddressEntity $billingAddress)\n {\n $this->billingAddress = $billingAddress;\n return $this;\n }", "public function getBillingAddress()\n {\n return $this->billingAddress;\n }", "public function getBillingAddress()\n {\n return $this->billingAddress;\n }", "public function setShippingAddress(Icepay_Order_Address $obj) {\n $this->setData(\"shippingAddress\", $obj);\n return $this;\n }", "public function setBillingStreet($billingStreet);", "public function setBillingEmail($email)\n {\n $this->data['billing']['x_email'] = $email;\n }", "public function setAddress(&$var)\n {\n GPBUtil::checkMessage($var, \\Orderpb\\Shipping_Address::class);\n $this->address = $var;\n }", "public function setBilling($billing)\n {\n $this->billing = Model::modelize('Billing', $billing);\n }", "public function setShippingAddress($address)\n {\n $this->data['shipping']['x_ship_to_address'] = $address;\n }", "protected function prepareBillingAddress($order, $row)\n {\n $billingAddress = $this->prepareAddress($order, $row, 'billing', array('billing_address_id'));\n if ($billingAddress) $order->setBillingAddress($billingAddress);\n return $billingAddress;\n }", "public function setDeliveryAddress($street, $number, $complement, $zipCode, $city, $state, $country = 'BRA') {\n\n $this->jsonData['Customer']['DeliveryAddress'] = array(\n 'Street' => $this->validateString($street, 255),\n 'Number' => $this->validateNumber($number, 15),\n 'Complement' => $this->validateString($complement, 50),\n 'ZipCode' => $this->validateNumber($zipCode, 9),\n 'City' => $this->validateString($city, 50),\n 'State' => $this->validateString($state, 2),\n 'Country' => $this->validateString($country, 35)\n );\n }", "private static function setShippingAddressToOrder($wcOrder, $address)\n {\n $wcOrder->set_shipping_state(self::arrayValue($address, 'region', ''));\n $wcOrder->set_shipping_postcode(self::arrayValue($address, 'index', ''));\n $wcOrder->set_shipping_country(self::arrayValue($address, 'country', ''));\n $wcOrder->set_shipping_city(self::arrayValue($address, 'city', ''));\n $wcOrder->set_shipping_address_1(self::arrayValue($address, 'text', ''));\n }" ]
[ "0.7739269", "0.7570601", "0.7531122", "0.7284584", "0.7034085", "0.6947116", "0.6922099", "0.68582135", "0.6844421", "0.67904955", "0.67587787", "0.67549765", "0.67225856", "0.6707034", "0.6668481", "0.6657238", "0.6655495", "0.6604889", "0.65610063", "0.6532826", "0.6532826", "0.6518417", "0.6496231", "0.6490443", "0.64580816", "0.64511925", "0.6438595", "0.641165", "0.6401147", "0.6400352" ]
0.80065745
0
Search for Student objects where $query is in the value of $property. It does not look for an exact match.
public static function searchField($property, $query, $dupCheck = array()) { global $mysql; $query = real_escape_string($query); $result = $mysql->query("SELECT * FROM students WHERE ".$property." LIKE '%".$query."%'"); if ( !$result || mysqli_num_rows($result) == 0 ) return array(); $output = array(); while ( $d = mysqli_fetch_array($result) ) { if ( !empty($d) ) { $dup = false; foreach ( $dupCheck as $row ) { if ( $row->getID() == $d['sid'] ) $dup = true; } if ( !$dup ) $output[] = new Student($d['sid']); } } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function search($query)\n\t{\n\t\t$output = array();\n\t\t$output = array_merge(Student::searchField(PROPERTY_SID, $query, $output), $output);\n\t\t$output = array_merge(Student::searchField(PROPERTY_NAME, $query, $output), $output);\n\t\treturn $output;\n\t}", "function matchesSearch($object, $search_value) {}", "public function __invoke(Builder $query, $value, string $property): Builder\n {\n return $query->where(function($inner) use($value, $property){\n $isFirstField = true;\n\n if(is_array($value)){\n $value = implode(config('repository.filters.search.separator', ','), $value);\n }\n foreach ($this->searchColumns as $columnName) {\n try {\n $value = \"%{$value}%\";\n $this->addToQuery($inner, ($isFirstField || $this->forceAnd), $columnName, $value);\n $isFirstField = false;\n }catch (\\Exception $e) {\n }\n }\n return $inner;\n });\n }", "public static function getByProperty($property, $value)\n\t{\n\t\tglobal $mysql;\n\t\tif ( $property == PROPERTY_ID )\n\t\t\t$property = PROPERTY_SID;\n\t\t\n\t\t$value = real_escape_string($value);\n\t\t$result = $mysql->query(\"SELECT sid FROM students WHERE `\".$property.\"` = '\".$value.\"'\");\n\t\tif ( !$result || mysqli_num_rows($result) == 0 )\n\t\t\treturn false;\n\t\treturn new Student(mysqli_result($result, 0, \"sid\"));\n\t}", "public function testSearchOnProperty()\r\n {\r\n // create a new Repository to be used later\r\n $repo = $this->em->getRepository(Communication::class);\r\n\r\n // create an array with values to search with\r\n $cleanQuery = array();\r\n $cleanQuery[] = 'Cosmo';\r\n\r\n // query the database\r\n $results = $repo->CommunicationSearch($cleanQuery);\r\n\r\n // Assert that size of the query returns the expected number of results\r\n $this->assertEquals(3, sizeof($results));\r\n }", "function search($query) {\n\t\t$this->_searchString = $query;\n\t}", "function testObjectListSearchEq()\r\n\t{\r\n\t\t$this->runTestObjectListSearch(\"entityquery\");\r\n\t}", "public function searchBy($key, $value);", "public function find($query)\n {\n\n $query = strtolower((string)$query);\n $search = [];\n\n $find = $this->isSelected();\n\n foreach ($find as $object) {\n $data = $object->getData();\n $data = implode(' ', $data);\n if (strpos($data, $query)) {\n $search[] = $object;\n }\n } // endfor\n\n $this->selected = $search;\n\n return $this;\n\n }", "public function exactMatch($propertyName, $value) {\n\t\tif ($value instanceof NodeInterface) {\n\t\t\t$value = $value->getIdentifier();\n\t\t}\n\t\treturn $this->queryFilter('term', array($propertyName => $value));\n\t}", "public function matchThisPropertyAndCustomersSearch($real_property_id)\n {\n \t$a = array();\n \t$o = Doctrine_Query::create()->from('OperationRealProperty')->where(\"real_property_id = $real_property_id\")->execute();\n\n \t$ope_filter = 'sp.operation_id IS NULL';\n \t$cur_filter = 'sp.currency_id IS NULL';\n \t$min_filter = 'sp.min_price = 0';\n \t$max_filter = 'sp.max_price = 0';\n\n \tforeach ($o as $value) {\n \t\t$ope_filter .= ' OR sp.operation_id = '.$value->getOperationId();\n \t\t$cur_filter .= ' OR sp.currency_id = '.$value->getCurrencyId();\n \t\t$min_filter .= ' OR sp.min_price <= '.$value->getPrice();\n \t\t$max_filter .= ' OR sp.max_price >= '.$value->getPrice();\n \t}\n \t$rProperty = RealPropertyTable::getInstance()->find($real_property_id);\n \t\n \tif ($rProperty) {\n \t\t$vendor_id = $rProperty->getAppUserId();\n \t\t$bedroom_id = $rProperty->getBedroomId();\n \t\t$pro_type_id = $rProperty->getPropertyTypeId();\n \t\t$geo_zone_id = $rProperty->getGeoZoneId();\n \t\t$city_id = $rProperty->getCityId();\n \t\t$neighbor_id = $rProperty->getNeighborhoodId();\n \t\t\n \t\t$f = \"(sp.bedroom_id IS NULL OR sp.bedroom_id = $bedroom_id) AND \".\n \t\t\t\t \"(sp.property_type_id IS NULL OR sp.property_type_id = $pro_type_id) AND \".\n \t\t\t\t \"(sp.geo_zone_id IS NULL OR sp.geo_zone_id = $geo_zone_id) AND \".\n \t\t\t\t \"(sp.city_id IS NULL OR sp.city_id = $city_id) AND \".\n \t\t\t\t \"(sp.neighborhood_id IS NULL OR sp.neighborhood_id = $neighbor_id) AND \".\n \t\t\t\t \"($ope_filter) AND \".\n \t\t\t\t \"($cur_filter) AND \".\n \t\t\t\t \"($min_filter) AND \".\n \t\t\t\t \"($max_filter)\";\n\n \t\t$q = Doctrine_Query::create()->from('SearchProfile sp')->leftJoin('sp.AppUser u')->where($f);\n \t\t\n \t\tif ($q->count() > 0) {\n \t\t\t$d = $q->execute();\n \t\t\t\n \t\t\tforeach ($d as $res) {\n \t\t\t\t// upd search_match\n \t\t\t\tself::updSearchMatchOnRealPropertyReg($res->getId(), $vendor_id, $neighbor_id);\n\n \t\t\t\t// customer emails\n \t\t\t\t$a[$res->AppUser->getEmail()] = $res->AppUser->getName().' '.$res->AppUser->getLastName();\n \t\t\t}\n \t\t}\n \t}\n \treturn $a;\n }", "public function search($query)\n {\n // Set query then fetch data from the provider\n $this->provider->setQuery($query);\n $result = $this->provider->fetch();\n\n // Parse result and fill the aggregator with objects\n $this->parseResult($result);\n // Store total records count\n $this->total_count = $this->provider->totalCount();\n\n return $this->count() > 0;\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('studentID',$this->studentID,true);\n\t\t$criteria->compare('personID',$this->personID);\n\t\t$criteria->compare('stu_academicTerm',$this->stu_academicTerm,true);\n\t\t$criteria->compare('stu_academicYear',$this->stu_academicYear);\n\t\t$criteria->compare('stu_testDate',$this->stu_testDate,true);\n\t\t$criteria->compare('stu_totalScore',$this->stu_totalScore);\n\t\t$criteria->compare('stu_optainedScore',$this->stu_optainedScore);\n\t\t$criteria->compare('stu_conditions',$this->stu_conditions,true);\n\t\t$criteria->compare('stu_previousID',$this->stu_previousID,true);\n\t\t$criteria->compare('stu_previousDegree',$this->stu_previousDegree,true);\n\t\t$criteria->compare('stu_guardiansName',$this->stu_guardiansName,true);\n\t\t$criteria->compare('stu_guardiansPostcode',$this->stu_guardiansPostcode,true);\n\t\t$criteria->compare('stu_guardiansTelephone',$this->stu_guardiansTelephone,true);\n\t\t$criteria->compare('stu_guardiansMobile',$this->stu_guardiansMobile,true);\n\t\t$criteria->compare('stu_guardiansEmail',$this->stu_guardiansEmail,true);\n\t\t$criteria->compare('stu_financialSource',$this->stu_financialSource,true);\n\t\t$criteria->compare('stu_financialSourceDescription',$this->stu_financialSourceDescription,true);\n\t\t$criteria->compare('employeeID',$this->employeeID);\n\t\t$criteria->compare('programmeCode',$this->programmeCode,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "function setSearchFilter($alias=null,$prop_name=null,$prop_value=null,\n $search_type='=') {\n\tif (!($this->_searchEnabled === true)) { return false; }\n\tif (!$this->isProperty($alias,$prop_name)) {\n\t\treturn $this->_searchDisable();\n\t\t}\n\tif (!is_array($this->_searchFilters)) {\n\t\treturn $this->_searchDisable();\n\t\t}\n\t$q = $this->getPropertyQuoted($alias,$prop_name);\n\tif (!is_bool($q)) { return $this->_searchDisable(); }\n\tif ($this->getPropertyIsDate($alias,$prop_name) === true) {\n\t\tif ($prop_value == 'now()') { $q = false; }\n\t\t}\n\t($q) ? $d = '\"' : $d = '';\n\tswitch($search_type) {\n\t\tcase '!=':\n\t\tcase '=':\n\t\tcase '>':\n\t\tcase '<':\n\t\tbreak;\n\t\tcase 'not in':\n\t\tcase 'in':\n\t\t\tif (!is_array($prop_value) or count($prop_value) < 1) {\n\t\t\t\treturn $this->_searchDisable();\n\t\t\t\t}\n\t\tbreak;\n\t\tcase 'not like':\n\t\tcase 'like':\n\t\t\tif (!$q) { return $this->_searchDisable(); }\n\t\tbreak;\n\t\t}\n\tif ($search_type == 'in' or $search_type == 'not in') {\n\t\tfor($j=0; $j < count($prop_value); $j++) {\n\t\t\t$prop_value[$j] = $d . addslashes($prop_value[$j]) . $d;\n\t\t\t}\n\t\t$this->_searchFilters[] = $alias . '.'\n\t\t. $this->getPropertyField($alias,$prop_name)\n\t\t. ' ' . $search_type . '(' . $d . implode(',',$prop_value) . $d . ')';\n\t\t} else {\n\t\t$this->_searchFilters[] = $alias . '.'\n\t\t. $this->getPropertyField($alias,$prop_name)\n\t\t. ' ' . $search_type . ' ' . $d . addslashes($prop_value) . $d;\n\t\t}\n\treturn true;\n\t}", "public function scopeSearch($query, $field, $value)\n {\n\n if (in_array($field, ['name', 'oneline', 'description'])) {\n\n return $query->where($field, 'LIKE', \"%$value%\");\n\n }\n\n return false;\n\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('stu_id',$this->stu_id);\n\t\t$criteria->compare('stu_number',$this->stu_number,true);\n\t\t$criteria->compare('stu_name',$this->stu_name,true);\n\t\t$criteria->compare('stu_sex',$this->stu_sex,true);\n\t\t$criteria->compare('stu_born',$this->stu_born,true);\n\t\t$criteria->compare('stu_base',$this->stu_base,true);\n\t\t$criteria->compare('stu_add',$this->stu_add,true);\n\t\t$criteria->compare('stu_school',$this->stu_school,true);\n\t\t$criteria->compare('stu_imag',$this->stu_imag,true);\n\t\t$criteria->compare('stu_grade',$this->stu_grade,true);\n\t\t$criteria->compare('stu_class',$this->stu_class,true);\n\t\t$criteria->compare('stu_offer_wait',$this->stu_offer_wait,true);\n\t\t$criteria->compare('stu_inq',$this->stu_inq,true);\n\t\t$criteria->compare('stu_offer_name',$this->stu_offer_name,true);\n\t\t$criteria->compare('stu_offer_time',$this->stu_offer_time,true);\n\t\t$criteria->compare('stu_offer_mail_time',$this->stu_offer_mail_time,true);\n\t\t$criteria->compare('stu_offer_showname',$this->stu_offer_showname,true);\n\t\t$criteria->compare('stu_offer_mode',$this->stu_offer_mode,true);\n\t\t$criteria->compare('stu_offer_email',$this->stu_offer_email,true);\n\t\t$criteria->compare('stu_offer_tel',$this->stu_offer_tel,true);\n\t\t$criteria->compare('stu_offer_city',$this->stu_offer_city,true);\n\t\t$criteria->compare('stu_offer_add',$this->stu_offer_add,true);\n\t\t$criteria->compare('stu_maney',$this->stu_maney,true);\n\t\t$criteria->compare('stu_integer',$this->stu_integer,true);\n\t\t$criteria->compare('stu_1',$this->stu_1,true);\n\t\t$criteria->compare('stu_2',$this->stu_2,true);\n\t\t$criteria->compare('stu_3',$this->stu_3,true);\n\t\t$criteria->compare('stu_4',$this->stu_4,true);\n\t\t$criteria->compare('stu_5',$this->stu_5,true);\n\t\t$criteria->compare('stu_6',$this->stu_6,true);\n\t\t$criteria->compare('stu_7',$this->stu_7,true);\n\t\t$criteria->compare('stu_8',$this->stu_8,true);\n\t\t$criteria->compare('stu_9',$this->stu_9,true);\n\t\t$criteria->compare('stu_10',$this->stu_10,true);\n\t\t$criteria->compare('stu_11',$this->stu_11,true);\n\t\t$criteria->compare('stu_12',$this->stu_12,true);\n\t\t$criteria->compare('stu_work_process',$this->stu_work_process);\n\t\t$criteria->compare('stu_timenow',$this->stu_timenow,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function createSearch($query);", "function &__searchObjects(&$query_parser)\n\t{\n\t\tinclude_once 'Services/Search/classes/class.ilObjectSearchFactory.php';\n\n\t\t$obj_search =& ilObjectSearchFactory::_getObjectSearchInstance($query_parser);\n\t\tif($this->getType() == SEARCH_DETAILS)\n\t\t{\n\t\t\t$obj_search->setFilter($this->__getFilter());\n\t\t}\n\t\treturn $obj_search->performSearch();\n\t}", "protected function _search($query)\n {\n if ($this->_search) {\n $str = '';\n foreach ($this->_searchable as $col => $isSearchable) {\n if ($isSearchable) {\n switch ($col) {\n default:\n $str .= '\"'.$col.'\" LIKE \\'%'.$this->_search.'%\\' OR';\n break;\n }\n }\n }\n $str = trim($str,' OR');\n $query->Where($str);\n }\n }", "public function search(SearchQuery $searchQuery);", "public function search($query) {\n $ldap = ldap_connect(Configure::read('Ldap.host'));\n \n if($ldap) {\n ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, Configure::read('Ldap.protocol'));\n \n if(ldap_bind($ldap)) {\n $result = ldap_search($ldap,\n Configure::read('Ldap.searchbase'),\n \"(&(objectclass=\". Configure::read('Ldap.objectclass') .\")(cn=*\" . $query . \"*))\");\n \n $entries = ldap_get_entries($ldap, $result);\n \n $this->set('people', $entries);\n \n ldap_unbind($ldap);\n } else {\n $this->Session->setFlash(\"Could not find directory server\", '', array(), 'error');\n }\n }\n }", "public function exactMatch($propertyName, $propertyValue);", "public function search(Search $query): array;", "public function search_for_person($query) {\n\t\t$params = array('query' => $query);\n\t\treturn $this->send_request('/search/person', $params);\n\t}", "public function getProperty($property)\n\t{\n\t\tglobal $mysql;\n\t\t$property = real_escape_string($property);\n\t\t\n\t\t$result = $mysql->query(\"SELECT `\".$property.\"` FROM `students` WHERE `sid` = '\".$this->getID().\"'\");\n\t\tif ( !$result || mysqli_num_rows($result) == 0 )\n\t\t\treturn false;\n\t\treturn mysqli_result($result, 0, $property);\n\t}", "public function searchStudent(Request $request){\n $name = $request->get('name');\n $studentdata = Students::where('status',config('constants.ACTIVE'))->where('student_name','like','%'.$name.'%')->with('classSec')->get();\n return view('Admin.student.search',compact('studentdata'));\n }", "public function queryExisting(array $lessons, array $students);", "public function search($requestArray)\n {\n $sql = \"SELECT * FROM `properties` WHERE `name` LIKE '%\".$requestArray['search'].\"%' OR `address` LIKE '%\".$requestArray['search'].\"%'\";\n $STH = $this->databaseHandler->query($sql);\n $STH->setFetchMode(PDO::FETCH_OBJ);\n $allData = $STH->fetchAll();\n\n return $allData;\n }", "protected function _applySearchToQuery() {\n\t\tif (!isset($this->_searchString) || empty($this->_searchString)) return;\n\t\t\n\t\t// join on any necessary relations.\n\t\t// make sure fields are searched.\n\t\t$search_like = array();\n\t\tforeach ($this->_searchFields as $alias => $fields) {\n\t\t\tforeach ($fields as $field) {\n\t\t\t\t$search_like[] = $alias . '.' . $field . ' LIKE \"%' . $this->_searchString . '%\"';\n\t\t\t}\n\t\t}\n\t\t$where = '(' . implode(' OR ', $search_like) . ')';\n\t\t$this->query()->addWhere($where);\n\t}", "public function search(array $sample);" ]
[ "0.6681229", "0.5762224", "0.5757683", "0.5728566", "0.5657101", "0.55383366", "0.55222696", "0.54917747", "0.54100424", "0.5390316", "0.52670264", "0.52646524", "0.52442807", "0.52399963", "0.5233615", "0.51952505", "0.51426494", "0.51369727", "0.511721", "0.50951314", "0.5089369", "0.50547975", "0.5008328", "0.49931148", "0.49850172", "0.4977808", "0.49754104", "0.49661037", "0.49636552", "0.49595258" ]
0.68866223
0
Find all Students in the database
public static function getAll() { global $mysql; $output = array(); $result = $mysql->query("SELECT `sid` FROM `students`"); while ( $d = mysqli_fetch_array($result) ) { if ( !empty($d) ) $output[] = new Student($d['sid']); } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAll()\n {\n $sql = \"SELECT * FROM cruddb.students\";\n global $conn;\n $result = $conn->query($sql);\n\n return $result;\n }", "static function getAllStudentR() {\n global $db;\n $req = $db->prepare('SELECT * FROM students ORDER BY nom ASC');\n\n $req->execute([]);\n return $req->fetchAll();\n }", "public function getStudent()\n {\n $this->db->query(\"SELECT * FROM `student` \");\n //execution de la query / fetch all \n $result = $this->db->resultSet();\n return $result;\n }", "function getStudentList()\n {\n $results = $GLOBALS['DB']->query(\n \"SELECT students.id FROM\n students JOIN courses_students ON (students.id = courses_students.student_id)\n JOIN courses ON (courses_students.course_id = courses.id)\n WHERE courses.id = {$this->id};\"\n );\n $student_list = array();\n foreach($results as $result) {\n $new_student = Student::findById($result['id']);\n array_push($student_list, $new_student);\n }\n return $student_list;\n }", "function getAllStudents()\n {\n return $this->students;\n }", "function getStudents()\n {\n $query = $GLOBALS['DB']->query(\"SELECT students.* FROM\n courses JOIN students_courses ON (courses.id = students_courses.course_id)\n JOIN students ON (students_courses.student_id = students.id) WHERE courses.id = {$this->getId()};\");\n\n\n\n\n // $student_id = $query->fetchAll(PDO::FETCH_ASSOC);\n $student_array = array();\n foreach ($query as $student) {\n //pull out its value with the key 'student_id' and store it in variable $student_id\n // $student_id = $id['student_id'];\n //get all students matching the current student id out of the students table (including their name, id, course_number ).\n // $student = $GLOBALS['DB']->query(\"SELECT * FROM students WHERE id= {$student_id};\");\n // $returned_students = $student->fetchAll(PDO::FETCH_ASSOC);\n\n\n $name = $student['name'];\n $id = $student['id'];\n $date = $student['enroll_date'];\n $new_student = new Student($name, $id, $date);\n array_push($student_array, $new_student);\n\n\n }\n return $student_array;\n }", "public function getStudents(){\n\t\t$db = new database;\n\t\t\n\t\t//$csv = new csv;\n\t\t//$users = $csv->read('users.csv');\n\t\t//echo '<pre>'.print_r($users,true).'</pre>';\n\n\t\t$query = \"SELECT 'add' \\\"operation\\\", 'student' \\\"role\\\", e.username \\\"idnumber\\\", i.NO_CLASSE \\\"idcourse\\\"\";\n\t\t$query .= \"FROM INSCRIPTIONS i \";\n\t\t$query .= \"INNER JOIN etudiants e on e.mat_etud = i.mat_etud \";\n\t\t$query .= \"WHERE i.CODE_MOTIF_TRANSF is Null AND e.username is not null \";\n \t$query .= \"ORDER BY e.username, i.NO_CLASSE ASC \";\n\t\t//$query .= \"ROWS 1 TO 2000 \";\n\t\t\n\t\t//echo $query;\n\t\t$db->sql = $query;\n\t\tif(!$db->query()){\n\t\t\tthrow new Exception($db->errorMsg);\n\t\t\treturn false;\n\t\t}\n\t\t$rows = $db->loadAssocList();\n\t\t//echo '<pre>'.print_r($rows,true).'</pre>';\n\t\treturn $rows;\n\t}", "public function fetchAllStudentDetail(){\n $sql = \"SELECT courses.id, courses.courseCode, courses.courseName, courses.courseUnit, courses.created_at, students.surname, students.reg_number, students.name FROM courses INNER JOIN students ON courses.reg_number = student.id\";\n \n $stmt = $this->conn->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n return $result;\n \n }", "function read_student(){\n\t\t// select all query:get all students\n\t\t$query = \"SELECT * FROM student WHERE studentId = ?\";\n\t\t// prepare query statement\n\t\t$stmt = $this->conn->prepare($query);\n\t\t//bind studentId of the student we are fetching\n\t\t$stmt->bindParam(1, $this->studentId);\n\t\t//executequery\n\t\t$stmt->execute();\n\t\treturn $stmt;\n\t}", "public function getStudents() {\n if(!$this->connection) {\n throw new \\RuntimeException('LDAP not available.');\n }\n $results = @ldap_search($this->connection, self::DN, 'insapopulation~=etudiant');\n $results = ldap_get_entries($this->connection, $results);\n if($results['count'] < 1) {\n return null;\n }\n $students = array();\n unset($results['count']);\n foreach($results as $result) {\n $studentID = $result['uidnumber'][0];\n $lastName = $result['sn'][0];\n $firstName = $result['givenname'][0];\n $mail = $result['mail'][0];\n $login = $result['uid'][0];\n $promotion = $result['insaclasseetu'][0];\n // Parses the department, year and class.\n $class = '';\n if($promotion == 'DOCT') {\n $department = 'Doctorant';\n $year = '';\n } else if($promotion=='MAST' || $promotion=='MS') {\n $department = 'Master';\n $year = '';\n } else if($promotion == 'SPIR') {\n $department = $promotion;\n $year = '';\n } else if($promotion == 'REPOR') {\n continue;\n } else if(strlen($promotion) == 2) {\n $department = 'STPI';\n $year = $promotion[0];\n } else if(strlen($promotion) > 3) {\n $department = substr($promotion, 1);\n $year = $promotion[0];\n }\n $s = new Student($this->app);\n $s->loadFromNothing($studentID, $firstName, $lastName, $class, $mail, $department, $year, $login);\n $s->save();\n }\n return $students;\n }", "public function students()\n {\n return $this->morphedByMany('App\\Student', 'assigned');\n }", "function getAllStudents(){\n\tglobal $conn;\n\t\n\t$sql = \"SELECT COUNT(*) FROM `\".DB_PREFIX.\"students`\";\n\t$res = db_query($sql,DB_NAME,$conn);\n\t$row = db_fetch_array($res);\n\treset($row);\n\treturn current($row);\n}", "public function getstudent (){\n $studentsList = $this -> restfullDAO -> getstudents ();\n return $studentsList ;\n }", "function getAllStudents()\n {\n $finalList = array();\n\n //connecting to db\n $dbConnection = connectToDB();\n if(!$dbConnection)\n {\n // print \"Unable to connect to MySQL.\".PHP_EOL;\n return 0;\n }\n\n //getting all registered staff\n $query = \"SELECT * FROM students\";\n $result = mysqli_query($dbConnection, $query);\n\n $totalRows = mysqli_num_rows($result);\n if($totalRows > 0)\n {\n while( $registeredStaffResults = mysqli_fetch_array( $result, MYSQLI_ASSOC ) )\n {\n //adding current user\n array_push($finalList, $registeredStaffResults);\n }//eowl\n }\n\n return $finalList;\n }", "public function getStudents() {\n return $this->belongsToMany(Student::class);\n }", "public function show(){\n return Student::all();\n }", "function selectAllStudents(){\r\n $listOfStudents = $this->getAllStudents();\r\n echo \"<br/>\";\r\n echo \"---------List Of Students---------\";\r\n foreach($listOfStudents as $student){\r\n echo \"<br/>\";\r\n echo $student['student_ID'].\" \";\r\n echo $student['studentUserID'].\" \";\r\n echo $student['studentPassword'].\" \";\r\n echo $student['first_Name'].\" \";\r\n echo $student['middle_Name'].\" \";\r\n echo $student['last_Name'].\" \";\r\n echo $student['schoolName'].\" \";\r\n echo $student['email'].\" \";\r\n echo $student['marks'].\" \";\r\n echo $student['role'].\" \";\r\n echo \"<br/>\";\r\n }// end foreach\r\n }", "public function getSubjects() {\n $ds = \\dibi::dataSource(\"\n SELECT s.*, (SELECT COUNT(*) FROM students_in_subjects WHERE id = s.id) students\n FROM subjects s\n \");\n\n return $ds;\n }", "public static function getStudents($cid) {\n\t\treturn dibi::fetchAll('SELECT * FROM user RIGHT JOIN (SELECT User_id FROM (course JOIN student ON Course_id=id) WHERE Course_id=%i) AS user2 ON user.id=user2.User_id', $cid);\n\t}", "public function getStudents()\n {\n $result = Student::all()->where('inforce',1);\n\n return response()->json(['success'=>1,'data'=>$result],200,[],JSON_NUMERIC_CHECK);\n\n }", "public function GetStudents($schoolID)\r\n {\r\n $esns = new db($this->returnType);\r\n return $esns->Get(\"select * from students where schoolID=$schoolID\");\r\n }", "public function m_get_student(){\n /**\n * #to get student that belong to a tutor\n select u.Id, concat(u.FirstName,' ',u.LastName) as 'Stdent name' from users u \n inner join students st on u.Id = st.UsersId\n where st.TutorsId = 26;\n */\n $this->db->select('*');\n $this->db->from('students st','u.Id = st.UsersId','inner');\n $this->db->where('');\n }", "public function studentsListing() {\n $students = Student::all();\n if(count($students) > 0) {\n return response()->json([\"status\" => $this->status, \"success\" => true, \"count\" => count($students), \"data\" => $students]);\n }\n else {\n return response()->json([\"status\" => \"failed\", \"success\" => false, \"message\" => \"Whoops! no record found\"]);\n }\n }", "public function all_students($class_id) {\n $data = array();\n $query = $this->db->query(\"SELECT student_id FROM class_students WHERE class_id=$class_id\");\n foreach ($query->result_array() as $row) {\n $data[] = $row;\n }return $data;\n }", "public function students()\n {\n $students = new Collection;\n\n foreach ($this->programs() as $program) {\n $students->push($program->students);\n }\n\n\n return $students->collapse();\n }", "function read(){\n\t\t// select all query:get all students\n\t\t$query = \" SELECT * FROM student\";\n\t\t// prepare query statement\n\t\t$stmt = $this->conn->prepare($query);\n\t\t//executequery\n\t\t$stmt->execute();\n\t\treturn $stmt;\n\t}", "public function index()\n {\n return $this->studentRepository->index();\n }", "public function findstudentsByString ( $str ){\n $studentsList = $this -> restfullDAO -> findstudentsByString (\n$str );\n return $studentsList ;\n }", "public function get_students($id = NULL) {\n \n if(!is_null($id)) { \n //if id is not null get the specific student\n $this->db->where('id', $id);\n $results = $this->db->get('students');\n $result = $results->row_array();\n \n return $result;\n } else {\n //else get all student records\n $result = $this->db->get(\"students\");\n }\n return $result->result_array();\n }", "public function selectAllUserData2()\n {\n $sql = \"SELECT * FROM Student ORDER BY StudID DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }" ]
[ "0.77308774", "0.7424839", "0.73734283", "0.7342849", "0.71828586", "0.71473247", "0.6912992", "0.676543", "0.6752693", "0.67176175", "0.6664728", "0.6648257", "0.6624065", "0.6579167", "0.65378976", "0.652266", "0.6515306", "0.6494652", "0.64667296", "0.64463645", "0.6366182", "0.63624513", "0.6358238", "0.63533425", "0.63201183", "0.6299237", "0.6261272", "0.6240499", "0.6225554", "0.6220776" ]
0.7622298
1
Find all Students in the database with a laptop assigned
public static function getAllWithLaptop() { global $mysql; $output = array(); $result = $mysql->query("SELECT `sid` FROM `students` WHERE `laptop` <> 0"); while ( $d = mysqli_fetch_array($result) ) { if ( !empty($d) ) $output[] = new Student($d['sid']); } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function students()\n {\n return $this->morphedByMany('App\\Student', 'assigned');\n }", "function getStudentList()\n {\n $results = $GLOBALS['DB']->query(\n \"SELECT students.id FROM\n students JOIN courses_students ON (students.id = courses_students.student_id)\n JOIN courses ON (courses_students.course_id = courses.id)\n WHERE courses.id = {$this->id};\"\n );\n $student_list = array();\n foreach($results as $result) {\n $new_student = Student::findById($result['id']);\n array_push($student_list, $new_student);\n }\n return $student_list;\n }", "public function getStudent()\n {\n $this->db->query(\"SELECT * FROM `student` \");\n //execution de la query / fetch all \n $result = $this->db->resultSet();\n return $result;\n }", "public function student() {\n\t\treturn $this->_get_related( __FUNCTION__, '\\PSU\\TeacherCert\\Student', $this->pidm );\n\t}", "function availableStudents($data){\n\t\t$query = $this->freeStudents($data);\n\t\treturn $query->result_array();\t\n\t}", "public function queryExisting(array $lessons, array $students);", "function get_all_parks(){\n\t\t$query = 'SELECT * FROM parks';\n\t\treturn perform_sql_query($query, null);\n\t}", "public function getStudents() {\n if(!$this->connection) {\n throw new \\RuntimeException('LDAP not available.');\n }\n $results = @ldap_search($this->connection, self::DN, 'insapopulation~=etudiant');\n $results = ldap_get_entries($this->connection, $results);\n if($results['count'] < 1) {\n return null;\n }\n $students = array();\n unset($results['count']);\n foreach($results as $result) {\n $studentID = $result['uidnumber'][0];\n $lastName = $result['sn'][0];\n $firstName = $result['givenname'][0];\n $mail = $result['mail'][0];\n $login = $result['uid'][0];\n $promotion = $result['insaclasseetu'][0];\n // Parses the department, year and class.\n $class = '';\n if($promotion == 'DOCT') {\n $department = 'Doctorant';\n $year = '';\n } else if($promotion=='MAST' || $promotion=='MS') {\n $department = 'Master';\n $year = '';\n } else if($promotion == 'SPIR') {\n $department = $promotion;\n $year = '';\n } else if($promotion == 'REPOR') {\n continue;\n } else if(strlen($promotion) == 2) {\n $department = 'STPI';\n $year = $promotion[0];\n } else if(strlen($promotion) > 3) {\n $department = substr($promotion, 1);\n $year = $promotion[0];\n }\n $s = new Student($this->app);\n $s->loadFromNothing($studentID, $firstName, $lastName, $class, $mail, $department, $year, $login);\n $s->save();\n }\n return $students;\n }", "public static function getEmployed()\n {\n $db = new DatabaseManager();\n $connection = $db->getDbh();\n\n $sql = 'SELECT * FROM studentlogin WHERE isEmployed=:yes';\n\n $statement = $connection->prepare($sql);\n $statement->setFetchMode(\\PDO::FETCH_CLASS, __CLASS__);\n $statement->execute();\n\n $employ = $statement->fetchAll();\n\n return $employ;\n }", "public function m_get_student(){\n /**\n * #to get student that belong to a tutor\n select u.Id, concat(u.FirstName,' ',u.LastName) as 'Stdent name' from users u \n inner join students st on u.Id = st.UsersId\n where st.TutorsId = 26;\n */\n $this->db->select('*');\n $this->db->from('students st','u.Id = st.UsersId','inner');\n $this->db->where('');\n }", "function rptEmployeesComputers() {\r\n\r\n\t\treturn ($this->query('SELECT \r\n\t\t\t\t\t\t\t\t\tusers.last_name, users.first_name, users.middle_name, users.username, users.email, users.network_port,\r\n\t\t\t\t\t\t\t\t\tcomputers.name, computers.serial_number, computers.hdd_space, computers.processor, computers.memory,\r\n\t\t\t\t\t\t\t\t\tlocations.name\r\n\t\t\t\t\t\t\t FROM \r\n\t\t\t\t\t\t\t\t\tcomputers\r\n\t\t\t\t\t\t\t\t\tINNER JOIN users ON users.computer_id = computers.id\r\n\t\t\t\t\t\t\t\t\tINNER JOIN locations ON users.location_id = locations.id\r\n\t\t\t\t\t\t\t WHERE \r\n\t\t\t\t\t\t\t\t\tusers.enabled = 1\r\n\t\t\t\t\t\t\t ORDER BY \r\n\t\t\t\t\t\t\t\t\tusers.last_name ASC;'));\r\n\r\n\t}", "public function students()\n {\n $students = new Collection;\n\n foreach ($this->programs() as $program) {\n $students->push($program->students);\n }\n\n\n return $students->collapse();\n }", "public function retrieveStudents()\n {\n // Find everyone signed up\n $people = PersonSlot::with([\n 'person',\n 'person.person_position:person_id,position_id'\n ])->where('slot_id', $this->id)->get();\n\n $personIds = $people->pluck('person_id')->toArray();\n $people = $people->sortBy(function ($p) {\n return $p->person->callsign;\n }, SORT_NATURAL | SORT_FLAG_CASE)->values();\n\n $isDirtTraining = ($this->position_id == Position::TRAINING);\n\n $peopleYearsRangered = Timesheet::yearsRangeredCountForIds($personIds);\n if (!$isDirtTraining) {\n $artAlphaIds = Training::findArtAlphas($this->position_id, $personIds);\n }\n\n // Next, find the trainee status if any.\n $traineeStatusByIds = TraineeStatus::where('slot_id', $this->id)->get()->keyBy('person_id');\n $traineeNotesByIds = TraineeNote::where('slot_id', $this->id)\n ->orderBy('created_at')\n ->with('person_source:id,callsign')\n ->get()\n ->groupBy('person_id');\n\n // Find the status of the person at the time\n $peopleStatus = PersonStatus::findStatusForIdsTime($personIds, $this->ends);\n\n // Yarrr! Here be personnel issues matey..\n $personnelIssues = PersonIntake::retrievePersonnelIssueForIdsYear($personIds, $this->ends->year);\n\n $students = [];\n\n foreach ($people as $row) {\n $traineeStatus = $traineeStatusByIds[$row->person_id] ?? null;\n $person = $row->person;\n\n // Find the status at the time of training.\n if ($peopleStatus->has($row->person_id)) {\n $status = $peopleStatus[$row->person_id]->new_status;\n } else {\n $status = 'unknown';\n }\n\n $info = [\n 'id' => $person->id,\n 'callsign' => $person->callsign,\n 'first_name' => $person->first_name,\n 'last_name' => $person->last_name,\n 'status' => $status,\n 'current_status' => $person->status,\n 'photo_url' => PersonPhoto::retrieveImageUrlForPerson($person->id),\n 'email' => $person->email,\n 'years' => $peopleYearsRangered[$person->id] ?? 0,\n 'position_ids' => $person->person_position->pluck('position_id'),\n 'notes' => $traineeNotesByIds[$person->id] ?? [],\n 'fkas' => $person->formerlyKnownAsArray(true)\n ];\n\n if (in_array($person->id, $personnelIssues)) {\n $info['personnel_issue'] = true;\n }\n\n // Does the person need ranking?\n if ($isDirtTraining) {\n if ($status != Person::ACTIVE && $status != 'unknown') {\n $info['need_ranking'] = true;\n }\n } else {\n // Session is an ART training module, is the person an ART alpha?\n if (in_array($person->id, $artAlphaIds)) {\n $info['is_art_prospective'] = true;\n }\n }\n\n if ($status == Person::INACTIVE || $status == Person::INACTIVE_EXTENSION) {\n $info['is_inactive'] = true;\n } else if ($status == Person::RETIRED) {\n $info['is_retired'] = true;\n }\n\n // Provide the trainee status (notes, rankning, passed)\n // if the record exists\n if ($traineeStatus) {\n $info['scored'] = true;\n $info['rank'] = $traineeStatus->rank;\n $info['passed'] = $traineeStatus->passed;\n $info['feedback_delivered'] = $traineeStatus->feedback_delivered;\n } else {\n $info['scored'] = false;\n $info['feedback_delivered'] = false;\n }\n\n $students[] = $info;\n }\n\n return $students;\n }", "public function getAll()\n {\n $sql = \"SELECT * FROM cruddb.students\";\n global $conn;\n $result = $conn->query($sql);\n\n return $result;\n }", "function getStudents()\n {\n $query = $GLOBALS['DB']->query(\"SELECT students.* FROM\n courses JOIN students_courses ON (courses.id = students_courses.course_id)\n JOIN students ON (students_courses.student_id = students.id) WHERE courses.id = {$this->getId()};\");\n\n\n\n\n // $student_id = $query->fetchAll(PDO::FETCH_ASSOC);\n $student_array = array();\n foreach ($query as $student) {\n //pull out its value with the key 'student_id' and store it in variable $student_id\n // $student_id = $id['student_id'];\n //get all students matching the current student id out of the students table (including their name, id, course_number ).\n // $student = $GLOBALS['DB']->query(\"SELECT * FROM students WHERE id= {$student_id};\");\n // $returned_students = $student->fetchAll(PDO::FETCH_ASSOC);\n\n\n $name = $student['name'];\n $id = $student['id'];\n $date = $student['enroll_date'];\n $new_student = new Student($name, $id, $date);\n array_push($student_array, $new_student);\n\n\n }\n return $student_array;\n }", "function getUnassignedStudentList()\n {\n $rs = $this->dbQuery(\n \"SELECT st.* \" .\n \"FROM stud_lec AS sl \" .\n \"LEFT JOIN stud_group AS sp ON sl.student_id=sp.student_id AND sp.cancel_stamp IS NULL \" .\n \"LEFT JOIN studentgroup AS sg ON sp.group_id=sg.id \" .\n \"LEFT JOIN student AS st ON st.id=sl.student_id \" .\n \"WHERE sl.lecture_id=\" . $this->lecture_id . \" \" .\n \"AND sl.year=\" . $this->schoolyear . \" \" .\n \"AND sp.group_id IS NULL\");\n\n return $rs;\n }", "function getAllStudents()\n {\n return $this->students;\n }", "public function getAllStudentsOrientador($perfil_id){\n $id= $this->getUserId($perfil_id);\n $get = new AccessDB(\"SELECT id,utilizador_id FROM projeto WHERE orientador_id=\".$id);//.\" OR coorientador_id=\".$id\n $response=$get->procurar();\n return $response;\n}", "public function get_by_ps_id(){\n\t\t$sql=\"\n\t\t\t\tSELECT *\n\t\t\t\tFROM swm_user\n\t\t\t\tWHERE su_ps_id=?\t\t \n\t\t\t \";\n\t\t$query = $this->swm->query($sql,array($this->su_ps_id)); \n\t return $query;\n\t }", "public function getShifts(){\n $this->db->query(\"\n SELECT DISTINCT Shift \n FROM Parking_Lot_Employee e, Officer o\n WHERE e.Employee_ID = o.Employee_ID;\n \");\n\n // ASSIGN RESULT SET\n $results = $this->db->resultSet();\n return $results;\n }", "public function getSailorRecords() {\n return DB::getAll(DB::T(DB::SAILOR), new DBCond('student_profile', $this));\n }", "public function getLaptop()\n\t{\n\t\tglobal $mysql;\n\t\t$laptop = $mysql->query(\"SELECT * FROM `students` WHERE `sid` = '\".$this->getID().\"'\");\n\t\tif ( !$laptop || mysqli_num_rows($laptop) == 0 )\n\t\t\treturn false;\n\t\t\n\t\t$laptop = mysqli_result($laptop, 0, \"laptop\");\n\t\tif ( $laptop == 0 )\n\t\t\treturn false;\n\t\t\n\t\treturn new Laptop($laptop);\n\t}", "public function getStartedStudents() {\n $query = (new \\yii\\db\\Query())\n ->select([\n 'alumno.id', 'COUNT(alumno_examen.fecha_realizacion) as examenes_terminados',\n 'COUNT(alumno_examen.id) as examenes',\n 'COUNT(alumno_examen.use_used_time) as useTime',\n 'COUNT(alumno_examen.listening_used_time) as listeningTime',\n 'COUNT(alumno_examen.reading_used_time) as readingTime'\n ])\n ->from('alumno')\n ->where([\n 'instituto.status' => $this->instituteStatus,\n 'instituto.borrado' => 0,\n 'instituto.pruebas' => 0,\n 'grupo.status' => 1,\n 'grupo.ciclo_escolar_id' => $this->schoolYear,\n 'alumno.status' => 1,\n 'tipo_examen.id' => $this->examType,\n ])\n ->leftJoin('alumno_examen', 'alumno_examen.alumno_id = alumno.id')\n ->leftJoin('tipo_examen', 'tipo_examen.id = alumno_examen.tipo_examen_id')\n ->leftJoin('grupo' , 'alumno.grupo_id = grupo.id')\n ->leftJoin('instituto', 'grupo.instituto_id = instituto.id')\n ->groupBy(['alumno.id'])\n ->having('examenes_terminados < examenes')\n ->andHaving('examenes_terminados > 0')\n ->andHaving([\n 'or',\n ['>=', 'useTime', 1],\n ['>=', 'readingTime', 1],\n ['>=', 'listeningTime', 1],\n ]);\n if (isset($this->program)) {\n $query->andWhere(['instituto.programa_id' => $this->program]);\n }\n return $query->count();\n }", "public function students() {\n\t\t$query = new Population\\GateStudents( $this->id );\n\t\t$factory = new Population\\StudentFactory;\n\t\t$population = new \\PSU_Population( $query, $factory );\n\t\t$population->query();\n\n\t\treturn $population;\n\t}", "function getPetugas()\n {\n return $this->db->get_where('userapp', ['roles' => 3]);\n }", "function chemistryMsc2P2A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=308\";\n $data= $this->db->query($data);\n return $data->result();\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM courseware_xmodulestudentprefsfield';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function findTeamMates() {\n global $database;\n $groupID = $database->escapeValue($this->groupID);\n $studentID = $database->escapeValue($this->studentID);\n $sql = \"SELECT * FROM \" .self::$tableName;\n $sql .= \" WHERE groupID=\".$groupID;\n $sql .= \" AND studentID!=\".$studentID;\n return self::findBySQL($sql);\n }", "function get_occupations(){\n $str_query=\"SELECT `application_occupation_id`, `name`, `description`\n FROM application_occupation\";\n\n if(!$this->sql_query($str_query)){\n $this->log_error(LOG_LEVEL_DB_FAIL, 14, \"error while getting occupation. see {$this->error} for detail\");\n return false;\n }\n return true;\n }", "public function getTeacherAssignList()\n {\n $sql = \"SELECT sa.*, c.name as class_name, s.name as section_name, sb.name as subject_name, t.name as teacher_name, t.department, sd.name as department_name FROM subject_assign as sa LEFT JOIN class as c ON c.id = sa.class_id LEFT JOIN section as s ON s.id = sa.section_id LEFT JOIN subject as sb ON sb.id = sa.subject_id LEFT JOIN staff as t ON t.id = sa.teacher_id LEFT JOIN staff_department as sd ON sd.id = t.department WHERE sa.teacher_id != 0\";\n if (!is_superadmin_loggedin()) {\n $sql .= \" AND sa.branch_id = \" . $this->db->escape(get_loggedin_branch_id());\n }\n $sql .= \" ORDER BY sa.id ASC\";\n $result = $this->db->query($sql)->result();\n return $result;\n }" ]
[ "0.5968312", "0.5602035", "0.55921817", "0.5564266", "0.55582905", "0.54216415", "0.54052365", "0.5357276", "0.530449", "0.5298699", "0.52590454", "0.52464926", "0.5233008", "0.52240074", "0.5216094", "0.52077883", "0.51998967", "0.5198289", "0.51909715", "0.5190914", "0.51640534", "0.515288", "0.5128201", "0.50977224", "0.5097603", "0.50971365", "0.50434273", "0.50409454", "0.5026618", "0.50228447" ]
0.62584835
0
Find all Student objects in the database where the value of $property matches $value
public static function getByProperty($property, $value) { global $mysql; if ( $property == PROPERTY_ID ) $property = PROPERTY_SID; $value = real_escape_string($value); $result = $mysql->query("SELECT sid FROM students WHERE `".$property."` = '".$value."'"); if ( !$result || mysqli_num_rows($result) == 0 ) return false; return new Student(mysqli_result($result, 0, "sid")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function searchField($property, $query, $dupCheck = array())\n\t{\n\t\tglobal $mysql;\n\t\t$query = real_escape_string($query);\n\t\t$result = $mysql->query(\"SELECT * FROM students WHERE \".$property.\" LIKE '%\".$query.\"%'\");\n\t\tif ( !$result || mysqli_num_rows($result) == 0 )\n\t\t\treturn array();\n\t\t$output = array();\n\t\t\n\t\twhile ( $d = mysqli_fetch_array($result) )\n\t\t{\n\t\t\tif ( !empty($d) )\n\t\t\t{\n\t\t\t\t$dup = false;\n\t\t\t\tforeach ( $dupCheck as $row )\n\t\t\t\t{\n\t\t\t\t\tif ( $row->getID() == $d['sid'] )\n\t\t\t\t\t\t$dup = true;\n\t\t\t\t}\n\t\t\t\tif ( !$dup )\n\t\t\t\t\t$output[] = new Student($d['sid']);\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "public function getProperty($property)\n\t{\n\t\tglobal $mysql;\n\t\t$property = real_escape_string($property);\n\t\t\n\t\t$result = $mysql->query(\"SELECT `\".$property.\"` FROM `students` WHERE `sid` = '\".$this->getID().\"'\");\n\t\tif ( !$result || mysqli_num_rows($result) == 0 )\n\t\t\treturn false;\n\t\treturn mysqli_result($result, 0, $property);\n\t}", "public function find($field, $value) {\n\t\t$stmt = $this->pdo->prepare('SELECT * FROM ' . $this->table . ' WHERE ' . $field . ' = :value');\n\t\t$stmt->setFetchMode(\\PDO::FETCH_CLASS, $this->entityClass, $this->entityConstructor);\n\t\t$criteria = [\n\t\t\t'value' => $value\n\t\t];\n\t\t$stmt->execute($criteria);\n\t\treturn $stmt->fetchAll();\n\t}", "public function findBy($property, $value, $all = false)\r\n {\r\n if ($all) {\r\n return $this->findAllBy($property, $value);\r\n } else {\r\n return $this->findOneBy($property, $value);\r\n }\r\n }", "public function where($property, $value = null, $strict = null)\n {\n if (empty($value) || !is_string($value)) {\n throw new ApplicationException('You must provide a string value to compare with when executing a \"where\" '\n . 'query for CMS object collections.');\n }\n\n if (!isset($strict) || !is_bool($strict)) {\n $strict = true;\n }\n\n return $this->filter(function ($object) use ($property, $value, $strict) {\n if (!array_key_exists($property, $object->settings)) {\n return false;\n }\n\n return $strict\n ? $object->settings[$property] === $value\n : $object->settings[$property] == $value;\n });\n }", "public function whereComponent($components, $property, $value, $strict = false)\n {\n return $this->filter(function ($object) use ($components, $property, $value, $strict) {\n\n $hasComponent = false;\n\n foreach ((array) $components as $componentName) {\n if (!$componentAlias = $object->hasComponent($componentName)) {\n continue;\n }\n\n $componentSettings = array_get($object->settings, 'components', []);\n\n if (!array_key_exists($componentAlias, $componentSettings)) {\n continue;\n }\n\n $settings = $componentSettings[$componentAlias];\n\n if (!array_key_exists($property, $settings)) {\n continue;\n }\n\n if (\n ($strict && $settings[$property] === $value) ||\n (!$strict && $settings[$property] == $value)\n ) {\n $hasComponent = true;\n }\n }\n\n return $hasComponent;\n });\n }", "public function findAllBy($property, $value)\r\n {\r\n $found = array();\r\n\r\n if (!is_string($property) || empty($property)) {\r\n throw new InvalidArgumentException('Invalid property specified.');\r\n }\r\n\r\n $this->_index($property);\r\n if (isset($this->_indexes[$property][$value])) {\r\n $found = $this->_indexes[$property][$value];\r\n }\r\n\r\n $class = get_class();\r\n return new $class(\r\n $found,\r\n $this->_domainObjectClass,\r\n $this->_factory,\r\n $this->_factoryMethod\r\n );\r\n }", "public static function search($query)\n\t{\n\t\t$output = array();\n\t\t$output = array_merge(Student::searchField(PROPERTY_SID, $query, $output), $output);\n\t\t$output = array_merge(Student::searchField(PROPERTY_NAME, $query, $output), $output);\n\t\treturn $output;\n\t}", "public function findBy($field, $value, $columns = array('*'));", "protected function find(string $attribute, string $value)\n {\n $filter = [\n $attribute => $value,\n \"guard_name\" => $this->guard\n ];\n\n return $this->model()::where($filter);\n }", "public function setProperty($property, $value)\n\t{\n\t\tglobal $mysql;\n\t\t$property = real_escape_string($property);\n\t\t$value = real_escape_string($value);\n\t\t\n\t\treturn $mysql->query(\"UPDATE students SET `\".$property.\"` = '\".$value.\"' WHERE `sid` = \".$this->getID());\n\t}", "public function findBy($field, $value, $columns = ['*']);", "public function findBy($field, $value, $columns = ['*']);", "public static function findBy(string $field, $value)\n {\n $instance = new static();\n\n return App::get('db')->query(\"\n SELECT * FROM {$instance->table}\n WHERE {$field} = :{$field}\n \")\n ->bind(':' . $field, $value)\n ->single($instance->className);\n }", "public function find($field, $value) {\n\t\t\t$stmt = $this->pdo->prepare('SELECT * FROM ' . $this->table . ' WHERE ' . $field . ' = :value'); \n\t\t\t$criteria = [\n\t\t\t'value' => $value\n\t\t\t];\n\t \t$stmt->execute($criteria);\n\t \treturn $stmt;\n\t\t}", "public function searchBy($key, $value);", "public function where_propertyEquals($propertyName, $propertyValue) {\r\n\t\t$collection = new tx_tcaobjects_objectCollection();\r\n\t\tforeach ($this as $key => $item) {\r\n\t\t\tif ($item[$propertyName] == $propertyValue) {\r\n\t\t\t\t$collection->addItem($item, $key);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $collection;\r\n\t}", "protected static function s_getFieldNamesByPropertyValue($class, $property, $value)\n\t{\n\t\t$out = array();\n\t\t\n\t\tforeach(self::s_getFields($class) as $fieldName => $info)\n\t\t{\n\t\t\tif(isset($info[$property]))\n\t\t\t{\n\t\t\t\tif(is_array($info[$property]) && in_array($value, $info[$property]))\n\t\t\t\t{\n\t\t\t\t\t$out[] = $fieldName;\n\t\t\t\t}\n\t\t\t\telseif($info[$property] == $value)\n\t\t\t\t{\n\t\t\t\t\t$out[] = $fieldName;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\treturn $out;\n\t}", "public function findBy($columnName,$value,$relationshipNames=[],$trashed = false);", "public function resourcesMatching($property, $value)\n {\n $matched = array();\n foreach ($this->_resources as $resource) {\n if ($resource->matches($property, $value)) {\n array_push($matched, $resource);\n }\n }\n return $matched;\n }", "public function findAllBy($key, $value, $operator = '=');", "public function passes($attribute, $value)\n {\n return $this->modelObject->find($value);\n }", "public function exactMatch($propertyName, $value) {\n\t\tif ($value instanceof NodeInterface) {\n\t\t\t$value = $value->getIdentifier();\n\t\t}\n\t\treturn $this->queryFilter('term', array($propertyName => $value));\n\t}", "public function passes($attribute, $value)\n {\n return $this->repo->find($value);\n }", "public function find($field, $value) {\n\n $sql = \"SELECT * FROM {$this->table} WHERE {$field} = ?\";\n\n $stmt = $this->conn->prepare($sql);\n $stmt->bindValue(1, $value);\n $stmt->execute();\n\n return $stmt->fetchAll();\n }", "function get_students($obj)\n {\n if (!is_object($obj)) {\n return false;\n }\n\n return $obj->students;\n }", "public function testSearchOnProperty()\r\n {\r\n // create a new Repository to be used later\r\n $repo = $this->em->getRepository(Communication::class);\r\n\r\n // create an array with values to search with\r\n $cleanQuery = array();\r\n $cleanQuery[] = 'Cosmo';\r\n\r\n // query the database\r\n $results = $repo->CommunicationSearch($cleanQuery);\r\n\r\n // Assert that size of the query returns the expected number of results\r\n $this->assertEquals(3, sizeof($results));\r\n }", "public function __invoke(Builder $query, $value, string $property): Builder\n {\n return $query->where(function($inner) use($value, $property){\n $isFirstField = true;\n\n if(is_array($value)){\n $value = implode(config('repository.filters.search.separator', ','), $value);\n }\n foreach ($this->searchColumns as $columnName) {\n try {\n $value = \"%{$value}%\";\n $this->addToQuery($inner, ($isFirstField || $this->forceAnd), $columnName, $value);\n $isFirstField = false;\n }catch (\\Exception $e) {\n }\n }\n return $inner;\n });\n }", "public function findByField($field, $value, $columns = ['*']);", "public function findByField($field, $value, $columns = ['*']);" ]
[ "0.6333863", "0.60700315", "0.6052327", "0.5909926", "0.57542145", "0.5748092", "0.57226664", "0.5593669", "0.5570036", "0.55596167", "0.5548029", "0.55303264", "0.55303264", "0.5477043", "0.54445624", "0.5443299", "0.5439837", "0.54328835", "0.5418614", "0.5380675", "0.53227454", "0.52991", "0.52978295", "0.52976435", "0.5296376", "0.5253508", "0.52266884", "0.522263", "0.5216584", "0.5216584" ]
0.7224732
0
Get the Laptop object that this Student owns
public function getLaptop() { global $mysql; $laptop = $mysql->query("SELECT * FROM `students` WHERE `sid` = '".$this->getID()."'"); if ( !$laptop || mysqli_num_rows($laptop) == 0 ) return false; $laptop = mysqli_result($laptop, 0, "laptop"); if ( $laptop == 0 ) return false; return new Laptop($laptop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function student() {\n\t\treturn $this->_get_related( __FUNCTION__, '\\PSU\\TeacherCert\\Student', $this->pidm );\n\t}", "public function GetStudent()\n\t\t{\n\t\t\treturn Student::Get($this->GetAttribute('student_id'));\n\t\t}", "public function getStudent()\n {\n return $this->student;\n }", "public function getStudent() {\n return $this->student; \n }", "public function object()\n {\n return $this->belongsTo(ModelRepository::get(LdapObject::class), 'object_id');\n }", "public function Lecture()\n {\n return $this->hasOne('App\\User');\n }", "public static function getAllWithLaptop()\n\t{\n\t\tglobal $mysql;\n\t\t$output = array();\n\t\t\n\t\t$result = $mysql->query(\"SELECT `sid` FROM `students` WHERE `laptop` <> 0\");\n\t\twhile ( $d = mysqli_fetch_array($result) )\n\t\t{\n\t\t\tif ( !empty($d) )\n\t\t\t\t$output[] = new Student($d['sid']);\n\t\t}\n\t\treturn $output;\n\t}", "public function student()\n {\n $student = $this->hasOne('App\\Student', 'id', 'stu_id');\n\n return $student;\n }", "public function getParent() {\r\n return $this->getParentAL();\r\n }", "public function location()\n {\n return $this->hasOne('App\\Location');\n }", "public function student()\n {\n return $this->hasOne('App\\Student', 'student_id', 'id');\n }", "public function get_professor()\n {\n //$criteria->add(new TFilter('controle_aula_id', '=', $this->id));\n //return materia::getObjects( $criteria );\n // loads the associated object\n if (empty($this->professor))\n $this->professor = new professor($this->professor_id);\n \n // returns the associated object\n return $this->professor;\n }", "public function getSkladInstance(){\n return MoySklad::findInstanceByHash($this->skladHashCode);\n }", "public function lender()\n {\n return $this->hasOne('App\\Debt\\Lender');\n }", "public function student()\n {\n return $this->hasOne('App\\User', 'id', 'student_id');\n }", "public function student()\n {\n return $this->hasOne('App\\Models\\Account\\Student');\n }", "public function location()\n {\n return $this->belongsTo('Location');\n }", "public function location()\n {\n return $this->hasOne(Location::class);\n }", "public function get_user()\n\t{\n\t\t$this->require_state(\"saved\");\n\n\t\t$users = new object_list(array(\n\t\t\t\"class_id\" => CL_USER,\n\t\t\t\"person\" => $this->brother_of()\n\t\t));\n\n\t\tif ($users->count())\n\t\t{\n\t\t\t$user = $users->begin()->get_original();\n\t\t\t$oids = array_unique($users->brother_ofs());\n\t\t\tif (1 !== count($oids))\n\t\t\t{\n\t\t\t\ttrigger_error(sprintf(\"Person %s has more than one user (%s)\", $this->brother_of(), implode(\", \", $oids)), E_USER_WARNING);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$user = null;\n\t\t}\n\n\t\treturn $user;\n\t}", "public function getClub()\r\n\t{\r\n\t\tif (!isset($this->club))\r\n\t\t{\r\n\t\t\t$this->club = $this->getClubManager()->getClub();\r\n\t\t}\r\n\t\treturn $this->club;\r\n\t}", "public function get_melhoria()\n {\n // loads the associated object\n if (empty($this->melhoria))\n $this->melhoria = new Melhoria($this->melhoria_id);\n \n // returns the associated object\n return $this->melhoria;\n }", "public function loser()\n\t{\n\t\treturn $this->belongsTo('App\\User', 'loser', 'id');\n\t}", "public function getLecturer()\n\t{\n\t return $this->lecturer;\n\t}", "public function getLecturer()\n\t{\n\t\treturn $this->lecturer;\n\t}", "public function owner() : ?object\n {\n return $this->bean->user;\n }", "public function getLocation()\n {\n return $this->hasOne(Location::className(), ['location_id' => 'location_id']);\n }", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('UserPracticeAreaLocation');\r\n }", "public function student()\n\t{\n\t\treturn $this->belongsTo('App\\Student');\n\t}", "public function owner()\n {\n return $this->belongsTo('TypiCMS\\Modules\\Menus\\Shells\\Models\\Menu', 'menu_id')->withoutGlobalScopes();\n }", "public function getLokale()\n {\n if (!$this->isLoaded())\n {\n return false;\n }\n return $this->createEntity('Lokaler')->findById($this->lokale_id);\n }" ]
[ "0.5560673", "0.55017585", "0.5467349", "0.5456272", "0.5385336", "0.53476024", "0.53435713", "0.5337969", "0.52829456", "0.5281445", "0.52660364", "0.52589905", "0.52571785", "0.52462155", "0.5217268", "0.5199645", "0.5189467", "0.5186245", "0.51848805", "0.5183808", "0.51822454", "0.5148432", "0.5137205", "0.51279885", "0.50760794", "0.5059126", "0.5053739", "0.50429416", "0.503978", "0.5035157" ]
0.7690678
0
Unassign the Student's Laptop
public function clearLaptop() { global $mysql; $laptop = false; if ( !($laptop = $this->getLaptop()) ) return false; addHistoryItem($laptop, $this, HISTORYEVENT_UNASSIGN); return $mysql->query("UPDATE students SET `laptop` = 0 WHERE `sid` = '".$this->getID()."'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unassignTask()\n\t{\n\t\tRequest::setVar('hidemainmenu', 1);\n\n\t\t$ids = Request::getArray('id', array());\n\t\t$ids = (!is_array($ids) ? array($ids) : $ids);\n\t\t$gid = Request::getString('gid', '');\n\t\t$roleid = Request::getInt('roleid', 0);\n\n\t\tif (!$gid)\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=' . $this->_option, false),\n\t\t\t\tLang::txt('COM_GROUPS_MISSING_ID'),\n\t\t\t\t'error'\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$model = \\Components\\Groups\\Models\\Member\\Role::oneByUserAndRole((int)$id, $roleid);\n\n\t\t\tif ($model->get('id'))\n\t\t\t{\n\t\t\t\t$model->destroy();\n\t\t\t}\n\t\t}\n\n\t\tif ($rtrn = Request::getString('return'))\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $rtrn . '&gid=' . $gid, false)\n\t\t\t);\n\t\t}\n\n\t\t// Output the HTML\n\t\t$this->cancelTask();\n\t}", "public function restored(Student $student)\n {\n //\n }", "public function unshare($classNameOrInstance);", "public function destroy(student $student)\n {\n //\n }", "public function destroy(student $student)\n {\n //\n }", "public function unassignUserFaculty(Request $request)\n {\n $faculty = UserFaculty::where('user_id',$request->user_id)->where('faculty_id',$request->faculty_id)->delete();\n \n \n return back()->with('success', 'User Faculty deleted successfully!');\n }", "public function remove_student_from_classroom()\n {\n // $query = $this->db->get\n $username = $this->input->post('username');\n $student_id = $this->check_username_exists($username);\n $classroom_id = $this->input->post('classroom_id');\n return $this->db->delete('enrolled_students', array('classroom_id' => $classroom_id, 'student_id' => $student_id));\n }", "function deleteStudent(Student $student)\n {\n foreach ($this->students as $key => $stu){\n if($stu->getRollNo() == $student->getRollNo())\n {\n unset($this->students[$key]);\n }\n }\n }", "public function down()\n\t{\n\t\tSchema::drop('students');\n\t}", "public function destroy(AssignmentStudent $assignmentStudent)\n {\n //\n }", "function unstore ($sess_nm)\r\n\t{\r\n\t\t$_SESSION[$sess_nm] == null;\r\n\r\n\t\tsession_destroy();\r\n\r\n\t\theader(\"Location: \".$this->root);\r\n\t}", "public function destroy(user $student)\n {\n //\n }", "public function actionRemoveStudent()\n\t\t{\n\t\t\t//echo \"Remove Student Action!!<br />\";\t\n\t\t\t$studentId = $_GET['student_id'];\n\t\t\t$classId = $_GET['class_id'];\n\t\t\t//echo \"Student ID is: \" . $studentId . \"<br />\";\n\t\t\t//echo \"Class ID is: \" . $classId . \"<br />\";\n\t\t\tStudentClass::model()->deleteAll('student_id=:studentId AND class_id=:classId', array(':studentId'=>$studentId, ':classId'=>$classId));\n\t\t\t//$this->render('view',array('model'=>$this->loadModel($classId),true));\n\t\t\t$this->redirect(array('view','id'=>$classId));\n\t\t\t\n\t\t}", "public function unAssign()\n {\n $this->fileHandle = null;\n $this->columns = null;\n $this->isInitialized = false;\n }", "public function destroy(Student $Student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "public function destroy(Student $student)\n {\n //\n }", "static function UnsetSessVar($name)\n\t\t{\n\t\t\tunset($_SESSION[$name]) ;\n\t\t}" ]
[ "0.58855623", "0.57289237", "0.56120116", "0.5588143", "0.5588143", "0.5556124", "0.55233544", "0.5474304", "0.5465819", "0.5453388", "0.5445191", "0.54374236", "0.5435807", "0.54173756", "0.54062736", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5401595", "0.5360464" ]
0.678414
0
Set the Student's Laptop
public function setLaptop($laptop) { global $mysql; if ( $this->getLaptop() ) return false; if ( @get_class($laptop) == "Laptop" ) $this->laptop = $laptop; else { if ( ($laptop = intval($laptop)) == 0 ) return false; $this->laptop = Laptop::getByProperty(PROPERTY_ID, $laptop); } if ( $this->laptop ) { addHistoryItem($this->laptop, $this, HISTORYEVENT_ASSIGNMENT); return $mysql->query("UPDATE students SET `laptop` = ".$this->laptop->getID()." WHERE `sid` = '".$this->getID()."'"); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLaptop()\n\t{\n\t\tglobal $mysql;\n\t\t$laptop = $mysql->query(\"SELECT * FROM `students` WHERE `sid` = '\".$this->getID().\"'\");\n\t\tif ( !$laptop || mysqli_num_rows($laptop) == 0 )\n\t\t\treturn false;\n\t\t\n\t\t$laptop = mysqli_result($laptop, 0, \"laptop\");\n\t\tif ( $laptop == 0 )\n\t\t\treturn false;\n\t\t\n\t\treturn new Laptop($laptop);\n\t}", "public function setLname($lname){\n$this->lastname=$lname;\n}", "public function setLname(string $lname): void\n {\n\n $this->_lname = $lname;\n }", "function setLambert($easting, $northing)\r\n\t{\r\n\t\t$this->lccNorthing = $northing;\r\n\t\t$this->lccEasting = $easting;\r\n\t}", "public function setStudent( $student ) { // throws RDException;\n if(!isset($student)) {\n throw new RDException('Student can not be null');\n } \n\n /* if ($this->homeTeam == null || $this->awayTeam == null) {\n throw new RDException('Teams involved in the report can not be null');\n }\n\n if ($student->getId() != $this->homeTeam->getCaptain()->getId() &&\n $student->getId() != $this->awayTeam->getCaptain()->getId())\n {\n throw new RDException('Student has to be a Team Captain'); \n }*/\n \n $this->student = $student;\n }", "protected function setSchool($school) {\r\n $this->school = $this->create($school);\r\n }", "public function setlName($lastName)\n {\n $this->lastName = $lastName;\n }", "public function __construct($student)\n {\n $this->student = $student;\n }", "public function setLid($value)\n {\n return $this->set(self::LID, $value);\n }", "public function setLocationData()\n\t{\n\t\t$location = Locations::where('id', '=', $this->location_id)->first();\n\t\t$this->location = $location;\n\t}", "public function setAllergyDetail(?string $allergyDetail){\n $this->allergyDetail = $allergyDetail;\n }", "function setSwimmerId($id)\n {\n $this->__swimmerid = $id ;\n }", "function setMedPoolFolder()\n\t{\n\t\t$_SESSION[\"il_link_mep_obj\"] = $_GET[\"mep_fold\"];\n\t\t$this->showLinkHelp();\n\t}", "public function setLname(string $lname = null) {\n $this->lname = $lname;\n return $this;\n }", "function setSwimmerId($id)\n {\n $this->__swimmer_id = $id ;\n }", "public function setSchools(?array $value): void {\n $this->getBackingStore()->set('schools', $value);\n }", "function setId($new_id){\n $this->student_id = (int) $new_id;\n }", "public function setLatLong()\n {\n $state = model('state');\n $state_id = (int)user()->preference('state_id') ?? user()->city ?? null;\n if (in_array($state_id, $state->pluck('id')->toArray())) {\n $state = $state->where('id', $state_id)->first();\n $this->latitude = $state->latitude;\n $this->longitude = $state->longitude;\n $this->state_id = $state_id;\n } else {\n $state = model('state')->where('id', 81)->first();\n $this->latitude = $state->latitude;\n $this->longitude = $state->longitude;\n $this->state_id = $state->id;\n user()->setPreference('state_id', $state->id);\n }\n }", "protected function setHometown($hometown) {\r\n $this->hometown = $this->create($hometown);\r\n }", "public function setHome($home) {\n\t\t$this->home = $home;\n\t}", "public function setShelf($shelf)\n {\n $this->values['is_shelf'] = $shelf;\n }", "public function clearLaptop()\n\t{\n\t\tglobal $mysql;\n\t\t$laptop = false;\n\t\tif ( !($laptop = $this->getLaptop()) )\n\t\t\treturn false;\n\t\t\n\t\taddHistoryItem($laptop, $this, HISTORYEVENT_UNASSIGN);\n\t\treturn $mysql->query(\"UPDATE students SET `laptop` = 0 WHERE `sid` = '\".$this->getID().\"'\");\n\t}", "function setSalary($salary) {\n //$this->setSalary($salary);\n }", "function setNom($snom = '')\n {\n $this->snom = $snom;\n }", "public function setLieu($lieu)\n{\n$this->lieu = $lieu;\n\n}", "public function setLocation($location) {\r\n\t$this->location = $location;\r\n }", "public function setLocation($location){\n\t\t$this->location = $location;\n\t}", "public function setLocation($location){\n\t\t$this->location = $location;\n\t}", "public function setStudent($student)\n {\n $this->student = $student;\n\n return $this;\n }", "function setLandscape() {\r\n\t\t$this->landscape = true;\r\n\t}" ]
[ "0.57779765", "0.5646581", "0.5623827", "0.5501425", "0.54169345", "0.51775956", "0.5110893", "0.5068432", "0.50377834", "0.5013169", "0.4984747", "0.49806195", "0.49785227", "0.49781787", "0.49708137", "0.4968818", "0.494562", "0.49342668", "0.4926381", "0.49022266", "0.49018198", "0.48957008", "0.48855668", "0.48820755", "0.48820728", "0.48773214", "0.48679903", "0.48679903", "0.4856433", "0.48435786" ]
0.69427633
0
Check if this Student is a Helper
public function isHelper() { global $helpers; foreach ($helpers as $helper) { if ( $helper == $this->getID() ) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function include_helper() {\n\n\t\t$type = $this->get_type();\n\n\t\t$helper_file_name = HELPER_PATH.$type.'_helper.php';\n\n\t\tif (!file_exists($helper_file_name)) {\n\t\t\t$type = 'application';\n\t\t\t$helper_file_name = HELPER_PATH.$type.'_helper.php';\n\t\t}\n\n\t\tif (!file_exists($helper_file_name)) {\n\t\t\treturn false;\t\n\t\t}\t\t\n\n\t\trequire_once($helper_file_name);\t\n\n\t\t$helper_class_name = Inflector::camelize($type).'Helper';\n\n\t\tif (!class_exists($helper_class_name)) {\n\t\t\treturn false;\t\n\t\t}\n\n\t\t$this->template->helper = new $helper_class_name($this->template);\n\n\t\t$this->template->helper->template = & $this->template;\n\n\t\treturn true;\n\t}", "public function __isset(string $helper): bool\n {\n if (isset($this->_loaded[$helper])) {\n return true;\n }\n\n try {\n $this->load($helper);\n } catch (MissingHelperException $exception) {\n $plugin = $this->_View->getPlugin();\n if (!empty($plugin)) {\n $this->load($plugin . '.' . $helper);\n\n return true;\n }\n }\n\n if (!empty($exception)) {\n throw $exception;\n }\n\n return true;\n }", "public static function loadHelper($helper)\n {\n if (is_array($helper) && count($helper) > 0) {\n \n $results = false;\n\n foreach ($helper as $item)\n $results = static::loadHelper($item);\n\n return $results;\n }\n\n if( !is_string($helper) )\n return false;\n\n if( strlen($helper) < 1 )\n return false;\n\n if( is_array(static::$helpers) && in_array($helper, static::$helpers) )\n return true;\n\n if( !file_exists(COREPATH. '/helpers/' .$helper .'.php') )\n return false;\n\n require_once(COREPATH. '/helpers/' .$helper .'.php');\n\n if (!isset(static::$helpers))\n static::$helpers = array();\n\n static::$helpers[] = $helper;\n\n App::$log->debug('Loaded Helper: '.$helper);\n\n }", "public function helper($helper) {\n\t\tforeach ( $this->exts as $ext ) {\n\t\t\tif (file_exists ( W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . W2P::getInstance()->configuration()->helper_path . '/' . $helper . $ext )) {\n\t\t\t\tinclude W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . W2P::getInstance()->configuration()->helper_path . '/' . $helper . $ext;\n\t\n\t\t\t\tW2P::getInstance()->debug()->_debug_add_content ( \"File {$helper} successfully started, helpers path\" );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t$this->_debug_add_content ( \"Error: File {$helper} not exist on helpers path\", true );\n\t\treturn false;\n\t}", "protected function helper($helper = null)\r\n {\r\n if (file_exists(CORE_HELPERS_FOLDER.$helper.'.php')) {\r\n include(CORE_HELPERS_FOLDER.$helper.'.php');\r\n } elseif (file_exists(HELPERS_FOLDER.$helper.'.php')) {\r\n include(HELPERS_FOLDER.$helper.'.php');\r\n } else {\r\n echo 'Helper file not found: '.$helper.'.php';\r\n }\r\n }", "public function helper($helper)\n {\n include_once HELPER_PATH . \"{$helper}_helper.php\";\n }", "function useHelper($name)\n{\n $aname = dirname(__FILE__).\"/Yamw/Lib/Helpers/{$name}Helpers.php\";\n return (@include_once $aname) ? true : false;\n}", "public function view(User $user, Helper $helper)\n {\n return $user->can('view helper', $helper);\n }", "public static function hasHelper($name)\n {\n $name = self::_normalizeHelperName($name);\n return isset(self::getStack()->{$name});\n }", "public function helper( $helper ){\n\t\t\n\t\t$file = BASE_DIR . \"/system/helpers/{$helper}.php\";\n\t\tif( file_exists($file) ){\n\t\t\tinclude_once( $file );\n\t\t}\n\t\t\n\t\t$file = BASE_DIR . \"/application/helpers/{$helper}.php\";\n\t\tif( file_exists($file) ){\n\t\t\tinclude_once( $file );\n\t\t} \n\t\t\n\t}", "function load_helper($helper)\n{\n\tif (file_exists(SITE_LIB . 'helpers/' . $helper . '.php'))// check if such a helper exists\n\t{\n\t\trequire_once(SITE_LIB . 'helpers/' . $helper . '.php'); // include class\n\t}\n}", "public function getHelper() {\n\t\treturn $this->helper;\n\t}", "public function getHelper()\n {\n return $this->helper;\n }", "public function testAdminHelperService()\n {\n $container = wprss_wp_container();\n $subject = $container->get(sprintf('%1$sadmin_helper', \\WPRSS_SERVICE_ID_PREFIX));\n $this->assertTrue($subject instanceof \\Aventura\\Wprss\\Core\\Plugin\\ComponentInterface, 'Not a valid component');\n $this->assertTrue($subject instanceof \\Aventura\\Wprss\\Core\\Component\\AdminHelper, 'Not the right admin helper');\n }", "public function helper($helper){\n\t\t$route = \"helpers/\".$helper.\"Helper.php\";\n\t\trequire_once $route;\n\t}", "public function delete(User $user, Helper $helper)\n {\n return $user->can('delete helper', $helper);\n }", "public function isCourseInstructorInTool();", "public function helper($helper)\n {\n return $this->_koriko->helper($helper);\n }", "private function getHelper($helper = '')\n {\n if (empty($helper)) {\n return Mage::helper('ecomprocessing');\n } else {\n return Mage::helper($helper);\n }\n }", "public function isForAdmin()\n {\n return $this->tokenable_type == Users_model::make()->getMorphClass();\n }", "public function helper(HelperContract $helper);", "function helper( $helper_name )\n {\n // check for existance\n if( !file_exists('app/helpers/'.$helper_name.'.php')){\n return null;\n }\n \n require_once( 'app/helpers/'.$helper_name.'.php');\n \n // helper name \n $helper_class = 'GarageSale\\\\'.$helper_name.'_helper';\n \n \n return new $helper_class($this);\n }", "public function viewAny(User $user)\n {\n return $user->can('view any helper');\n }", "public function getHelper()\n {\n return $this->get(self::HELPER);\n }", "public function helper($helpers = array())\n\t{\n\t\tforeach ($this->_ci_prep_filename($helpers, '_helper') as $helper)\n\t\t{\n\t\t\tif (isset($this->_ci_helpers[$helper]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Try to load the helper\n\t\t\tforeach( $this->_ci_helper_paths as $path )\n\t\t\t{\n\t\t\t\tif( file_exists($path.'helpers/'.$helper.'.php') )\n\t\t\t\t{\n\t\t\t\t\t$base_helper = $path.'helpers/'.$helper.'.php';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( isset($base_helper) )\n\t\t\t{\n\t\t\t\t$ext_helper = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php';\n\t\t\t\t// Is this a helper extension request?\n\t\t\t\tif (file_exists($ext_helper))\n\t\t\t\t{\n\t\t\t\t\tinclude_once($ext_helper);\n\t\t\t\t\tinclude_once($base_helper);\n\n\t\t\t\t\tunset($base_helper);\n\n\t\t\t\t\t$this->_ci_helpers[$helper] = TRUE;\n\t\t\t\t\tlog_message('debug', 'Helper loaded: '.$helper);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// only load base helper\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tinclude_once($base_helper);\n\t\t\t\t\tunset($base_helper);\n\t\t\t\t\t$this->_ci_helpers[$helper] = TRUE;\n\t\t\t\t\tlog_message('debug', 'Helper loaded: '.$helper);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// unable to load the helper\n\t\t\tif ( ! isset($this->_ci_helpers[$helper]))\n\t\t\t{\n\t\t\t\tshow_error('Unable to load the requested file: helpers/'.$helper.'.php');\n\t\t\t}\n\t\t}\n\t}", "public function loadHelper($helperName)\r\n {\r\n $helperPath = Config::get(\"HELPERS_PATH\") . $helperName . '_helper.php';\r\n\r\n if(!file_exists($helperPath))\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n include $helperPath;\r\n }\r\n\r\n return true;\r\n\r\n }", "public function helper($helper)\n {\n\n if (file_exists(HELPER_PATH . \"{$helper}_helper.php\")) {\n include_once HELPER_PATH . \"{$helper}_helper.php\";\n } else {\n include_once HELPER_PATH . \"{$helper}.php\";\n }\n\n return $this;\n\n }", "public function getHelper(): Helper\n {\n return new Helper();\n }", "public function update(User $user, Helper $helper)\n {\n return $user->can('update helper', $helper);\n }", "public function isAdmin() \n {\n return Auth::check() && optional($this)->type == Type::ADMIN;\n }" ]
[ "0.6165216", "0.6096277", "0.59657145", "0.5953287", "0.5861618", "0.5827354", "0.57907", "0.56553745", "0.5602039", "0.557739", "0.55359024", "0.5476368", "0.54282165", "0.5423778", "0.5407998", "0.537752", "0.5373221", "0.53366655", "0.53259003", "0.52592224", "0.5236496", "0.52291703", "0.52121854", "0.51964504", "0.5167005", "0.5151894", "0.51371264", "0.5125569", "0.5104369", "0.51041436" ]
0.77555066
0
Utility function for converting the history array returned by Student's getHistory() to viewable HTML
public static function getHTMLForHistory($history) { global $issueTypes; $output = ""; foreach ($history as $row) { $laptop = new Laptop($row['laptop']); $recorded_by = new Student($row['initiated_by']); $recorded_by_string = ""; if ( !empty($row['initiated_by']) && $recorded_by ) $recorded_by_string = "- Recorded by ".$recorded_by->getProperty("name"); if ( $row['type'] == ACTION_UNASSIGN ) { $output .= "<div class=\"alert\"><strong>Returned</strong><br>"; $output .= "<a href=\"../laptops/laptop.php?id=".$laptop->getID()."\">".$laptop->getProperty(PROPERTY_HOSTNAME)."</a> was returned.<br>"; $output .= "<small>Recorded on ".date("M d, Y", $row['timestamp'])." at ".date("g:i A", $row['timestamp'])." ".$recorded_by_string."</small>"; $output .= "</div>"; } else if ( $row['type'] == ACTION_ASSIGN ) { $output .= "<div class=\"alert alert-success\"><strong>Assigned</strong><br>"; $output .= "<a href=\"../laptops/laptop.php?id=".$laptop->getID()."\">".$laptop->getProperty(PROPERTY_HOSTNAME)."</a> was assigned to ".$row['student']."<br>"; $output .= "<small>Recorded on ".date("M d, Y", $row['timestamp'])." at ".date("g:i A", $row['timestamp'])." ".$recorded_by_string."</small>"; $output .= "</div>"; } else if ( $row['type'] == HISTORYEVENT_TICKET_STATECHANGE ) { $output .= "<div class=\"alert alert-info\"><strong>Ticket Change</strong><br>"; $output .= $row['student']." ".$row['body']." a <a href=\"../tickets/ticket.php?id=".$row['ticket']."\">ticket</a>.<br>"; $output .= "<small>Recorded on ".date("M d, Y", $row['timestamp'])." at ".date("g:i A", $row['timestamp'])." ".$recorded_by_string."</small>"; $output .= "</div>"; } else if ( $row['type'] == HISTORYEVENT_SERVICE ) { $output .= "<div class=\"alert alert-info\"><strong>Service - ".$issueTypes[$row['subtype']]."</strong><br>"; $output .= stripcslashes(nl_fix($row['body']))."<br>"; $output .= "<small>Recorded on ".date("M d, Y", $row['timestamp'])." at ".date("g:i A", $row['timestamp'])." ".$recorded_by_string."</small>"; $output .= "</div>"; } } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHistory(): string\n {\n $scrollback = '';\n $last_attr = $this->base_attr_cell;\n for ($i = 0; $i < count($this->history); $i++) {\n for ($j = 0; $j <= $this->max_x + 1; $j++) {\n $cur_attr = $this->history_attrs[$i][$j];\n $scrollback .= $this->processCoordinate($last_attr, $cur_attr, $this->history[$i][$j] ?? '');\n $last_attr = $this->history_attrs[$i][$j];\n }\n $scrollback .= \"\\r\\n\";\n }\n $base_attr_cell = $this->base_attr_cell;\n $this->base_attr_cell = $last_attr;\n $scrollback .= $this->getScreen();\n $this->base_attr_cell = $base_attr_cell;\n\n return '<pre width=\"' . ($this->max_x + 1) . '\" style=\"color: white; background: black\">' . $scrollback . '</span></pre>';\n }", "public function history()\n {\n $userFriendlyHistory = [];\n \n $boardHistory = $this->board->getHistory();\n \n foreach ($boardHistory as $entry) { \n $userFriendlyHistory[] = (object) [\n 'pgn' => $entry->move->pgn,\n 'color' => $entry->move->color,\n 'identity' => $entry->move->identity,\n 'position' => $entry->position,\n 'isCapture' => $entry->move->isCapture,\n 'isCheck' => $entry->move->isCheck\n ]; \n }\n \n return $userFriendlyHistory;\n }", "function DISPLAY_LOG_INFO($arrayLogInfo)\n {\n echo '<div id=\"documentHistory\" class=\"ui-widget-content\" style=\"text-align: center;max-height:350px;overflow:auto\">';\n echo \"<p>Document History</p><table><thead><tr><th>Action</th><th>Username</th> <th>Timestamp</th></tr></thead><tbody>\";\n\n $user = [];\n $length = count($arrayLogInfo);\n for ($x = 0; $x < $length; $x++) {\n $action[$x] = $arrayLogInfo[$x][0];\n $user[$x] = $arrayLogInfo[$x][1];\n $time[$x] = $arrayLogInfo[$x][2];\n echo \"<tr><td>$action[$x]</td><td>$user[$x]</td><td id='timeStamp'>$time[$x]</td></tr>\";\n }\n echo \"</tbody></table></div>\";\n }", "abstract public function toHTMLList();", "public function history()\n {\n return view('partials.history-table', ['record' => $this->entity]);\n }", "function generateRevisionList() {\n\t\t$content = '';\n\t\tif($this->piVars['uid']) {\n\t\t\tif($this->piVars['table']) {\n\t\t\t\t$table = $this->piVars['table'];\n\t\t\t} else {\n\t\t\t\t$table = 'tt_content';\n\t\t\t}\n\t\t\t$history = $this->createRecordHistory(intval($this->piVars['uid']), $table);\n\t\t} else {\n\t\t\t$history = $this->createPageHistory($this->cObj->data['uid']);\n\t\t}\n\n\t\t$content = $this->formatHistory($history);\n\t\treturn $content;\n\t}", "function array_to_html_list($arr)\n{\n //print_r($arr);\n $r=\"<ul style='list-style-type:none'>\";\n foreach($arr as $k=>$v)\n {\n $r.=\"<li><span style='font-weight: bold;'>\".$k.\"</span>: \".(is_array($v) ? array_to_html_list($v) : htmlspecialchars(html_entity_decode($v,ENT_QUOTES,'UTF-8'), ENT_NOQUOTES)).\"<li>\";\n }\n $r.=\"</ul>\";\n return $r;\n}", "function render() {\n\t\tforeach ( $this->history as $debug )\n\t\t\techo \"<pre>$debug</pre>\";\n\t}", "public function history(){\n $history = $this->Modelfriday->get_history($_SESSION['patient']->id_patient);\n\n $chat_message_list = '';\n foreach ($history as $key => $message) {\n\n $dt = date_format(new DateTime($message->update_date), 'd-m H:i:s');\n\n $chat_message_list .= '\n <div class=\"message-row you-message\">\n <div class=\"message-content\">\n <div class=\"message-text\"> '.$message->message.' </div>\n <div class=\"message-time\">'.$dt.'</div>\n </div>\n </div>\n <div class=\"message-row other-message\">\n <div class=\"message-content\"><img src=\"img/viernes.png\">\n <div class=\"message-text\">'. $message->answer.'</div>\n <div class=\"message-time\">'.$dt.'</div>\n </div>\n </div>\n ';\n \n }\n\n echo $chat_message_list;\n \n }", "public function getHistoryContent()\n {\n $history = $this->_wiki->historyLatest;\n return $history ? $history->content : '';\n }", "function render_approvals_history() {\n global $session;\n $s = \"\";\n $this->get_approvals();\n if (count($this->approvals_history) > 0) {\n $s .= \"<table cellspacing=\\\"2\\\" cellpadding=\\\"0\\\" width=\\\"100%\\\">\\n\";\n\n // Some headings..\n $s .= \"<tr>\";\n $s .= \"<th width=\\\"25%\\\" class=\\\"cols\\\">Type of approval</th>\";\n $s .= \"<th width=\\\"25%\\\" class=\\\"cols\\\">Assigned to</th>\";\n $s .= \"<th width=\\\"34%\\\" class=\\\"cols\\\">Approval</th>\";\n $s .= \"<th width=\\\"16%\\\" class=\\\"cols\\\">Status</th>\";\n $s .= \"</tr>\\n\";\n\n foreach ($this->approvals_history as $approvals) {\n $appcnt = count($approvals);\n $cnt = 0;\n foreach ($approvals as $ap_type_id => $approval) {\n $cnt += 1;\n $status = $approval->approval_status;\n $rowclass = ($cnt == $appcnt) ? \"row1\" : \"row0\";\n $s .= \"<tr class=\\\"$rowclass\\\">\";\n\n // Description..\n $s .= \"<td valign=\\\"top\\\" style=\\\"border-top:dotted lightgrey 1px\\\">\";\n $s .= $approval->qa_approval_type_desc;\n if ($cnt == $appcnt) {\n $s .= \"<br>(current status)\";\n }\n $s .= \"</td>\";\n\n // Assignment..\n if ($approval->assigned_datetime != \"\") {\n $ass = $approval->assigned_fullname . \"<br>\";\n $ass .= $session->FormattedDate($approval->assigned_datetime, 'timestamp');\n }\n else {\n $ass = \"&nbsp;\";\n }\n $s .= \"<td valign=\\\"top\\\" style=\\\"border-top:dotted lightgrey 1px\\\">$ass</td>\";\n\n // Approval..\n $app = \"\";\n if ($approval->approval_datetime != \"\") {\n if ($approval->assigned_username != $approval->approval_username) {\n $app .= \"<span style=\\\"color:red\\\" title=\\\"Approval by override\\\">\";\n $app .= $approval->approval_fullname . \"</span>\";\n }\n else {\n $app .= $approval->approval_fullname;\n }\n $app .= \"<br>\";\n $app .= $session->FormattedDate($approval->approval_datetime,'timestamp');\n if ($approval->comment != \"\") {\n $app .= \"<br>$approval->comment\";\n }\n }\n elseif ($approval->assigned_datetime != \"\") {\n $app = \"<span style=\\\"color:orange\\\">Awaiting approval.</span>\";\n }\n else {\n $app = \"&nbsp;\";\n }\n $s .= \"<td valign=\\\"top\\\" style=\\\"border-top:dotted lightgrey 1px\\\">$app</td>\";\n\n // Status..\n $s .= \"<td valign=\\\"top\\\" style=\\\"border-top:dotted lightgrey 1px\\\">\" . qa_status_coloured($status) . \"</td>\";\n $s .= \"</tr>\\n\";\n } // foreach\n\n } // foreach\n\n $s .= \"</table>\\n\";\n }\n return $s;\n\n }", "function formatHistory($inputData) {\n\n\t\t$this->templateCode = $this->cObj->fileResource($this->conf[\"templateFile\"]);\n\n\t\t// get subparts from template\n\t\t$t = array();\n\t\t$t['total'] = $this->cObj->getSubpart($this->templateCode,'###REVISION###');\n\t\t$t['tableline'] = $this->cObj->getSubpart($this->templateCode,'###TABLELINE###');\n\t\t$content_row = '';\n\n\t\tforeach($inputData as $singleRecord) {\n\t\t\tif(empty($singleRecord['time'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$markerArray['###TIME###'] = strftime($this->pi_getLL('timeFormat'), $singleRecord['time']);\n\t\t\t$markerArray['###ACTION###'] = $this->pi_getLL('action_'.$singleRecord['action']);\n\t\t\t$markerArray['###IP###'] = $singleRecord['ip'];\n\n\t\t\tif($singleRecord['table'] == 'pages') {\n\t\t\t\t$id = $singleRecord['uid'];\n\t\t\t\t$params = array('wikiLogin' => 1);\n\n\t\t\t} else {\n\t\t\t\t$id = $GLOBALS['TSFE']->id;\n\t\t\t\t$params = array(\n\t\t\t\t\t'ADMCMD_vPrev['.$singleRecord['table'].'%3a'.$singleRecord['oid'].']' => $singleRecord['uid'],\n\t\t\t\t\t'wikiLogin' => 1\n\t\t\t\t);\n\t\t\t}\n\t\t\t$markerArray['###SHOW###'] = $this->pi_linkToPage($this->pi_getLL('showVersion'),$id, '',$params);\n\t\t\t$content_row .=\n\t\t\t$this->cObj->substituteMarkerArrayCached($t['tableline'],\n\t\t\t$markerArray, array(), array());\n\t\t}\n\n\t\t$output = $this->cObj->substituteMarkerArrayCached($t['total'], Array(), Array('###TABLELINE###' => $content_row), Array() );\n\n\n\t\treturn $output;\n\t}", "public function history()\n\t{\n\t\t$db = \\Config\\Database::connect();\n\t\t$all = $db->table('history')->get()->getResultArray();\n\t\t$data = [\n\t\t\t'title' \t=> 'Laporan',\n\t\t\t'history' \t=> $all,\n\t\t\t'user' \t\t=> $this->session->get(),\n\t\t];\n\t\treturn view('admin/history', $data);\n\t}", "public static function render_history_description() {\n ?>\n <p>This section allows you to configure chat history collection feature.</p>\n <p>You can store chat messages from both Watson Assistant and your site's users for further review.<br>\n Also this feature provides data for e-mail notificator (please refer to Notification tab)</p>\n\n <?php\n }", "public function indexHistory()\n {\n // if(!Auth::guard('web')->check()){\n // return redirect('/');\n // }\n $history = BorrowedBook::where('user_id', Auth::user()->id)->get();\n\n return view('history', compact('history'));\n }", "function getHtml()\n {\n foreach($this->arrTarget as $sTarget => $sValue)\n {\n if(!is_array($sValue))\n {\n $this->sHtml = str_replace('{'.$sTarget.'}', $sValue, $this->sHtml);\n unset($this->arrTarget[$sTarget]);\n }\n }\n\n $arrHtml = explode(\"\\n\", $this->sHtml);\n\n // Wow, foreach, foreach, foreach, foreach... Developers, developers, developers...\n foreach($arrHtml as $iLine => $sHtml)\n {\n $sReturn = '';\n foreach($this->arrTarget as $sTarget => $arrValue)\n {\n if(is_array($arrValue))\n {\n foreach($arrValue as $sValue)\n {\n if(preg_match('/\\{' . $sTarget . '\\}/i', $sHtml))\n {\n $sReturn .= str_replace('{'.$sTarget.'}', $sValue, $sHtml);\n $arrHtml[$iLine] = $sReturn;\n }\n }\n }\n }\n }\n\n return $this->sHtml = implode('',$arrHtml);\n }", "public function history()\n\t{\n\t\t// Get infor from database\n\t\t$users = user::all();\n\t\t// Get infor from database\n\t\t$histories = history::all();\n\t\treturn view('history', compact('users', 'histories'));\n\t}", "function getHistory($raid_id,$source = false)\n {\n \t$html = '';\n\n\t\t$db = JFactory::getDBO();\n\t\t$query = \"SELECT history FROM #__raidplanner_history WHERE raid_id=\".intval($raid_id);\n\t\t$db->setQuery($query);\n\t\t$string = $db->loadResult();\n\t\tif ($source) {\n\t\t\t$html = $string;\n\t\t} elseif ($string!='') {\n\t\t\t$xml = json_decode($string);\n\t\t\tif (json_last_error()===JSON_ERROR_NONE) {\n\t\t\t\t$html .= '<style>th.table-th-sort{text-decoration:underline}</style>';\n\t\t\t\t$html .= '<table style=\"margin-bottom:0\">';\n\t\t\t\t$html .= '<tr><th colspan=\"4\">Roster</th></tr>';\n\t\t\t\t$html .= '</table>';\n\t\t\t\t$html .= '<table class=\"sortable\">';\n\t\t\t\t$html .= '<thead>';\n\t\t\t\t$html .= '<tr><th>' . JText::_( 'COM_RAIDPLANNER_CHARACTER_NAME') . '</th><th>EP</th><th>GP</th><th>PR</th></tr>';\n\t\t\t\t$html .= '</thead>';\n\t\t\t\t$html .= '<tbody>';\n\t\t\t\tforeach ($xml->roster as $char) {\n\t\t\t\t\t$html .= '<tr>';\n\t\t\t\t\t$html .= '<td>' . $char[0] . '</td><td>' . $char[1] . '</td><td>' . $char[2] . '</td><td>' . round($char[1]/$char[2],3) . '</td>';\n\t\t\t\t\t$html .= '</tr>';\n\t\t\t\t}\n\t\t\t\t$html .= '</tbody>';\n\t\t\t\t$html .= '</table>';\n\t\t\t\t$html .= '<table style=\"margin-bottom:0\">';\n\t\t\t\t$html .= '<tr><th colspan=\"4\">Loot</th></tr>';\n\t\t\t\t$html .= '</table>';\n\t\t\t\t$html .= '<table class=\"sortable\">';\n\t\t\t\t$html .= '<thead>';\n\t\t\t\t$html .= '<tr><th>' . JText::_( 'COM_RAIDPLANNER_CHARACTER_NAME') . '</th><th>' . JText::_( 'TIME') . '</td><th>Item</th><th>GP Price</th></tr>';\n\t\t\t\t$html .= '</thead>';\n\t\t\t\t$html .= '<tbody>';\n\t\t\t\tforeach ($xml->loot as $loot) {\n\t\t\t\t\t$html .= '<tr>';\n\t\t\t\t\t// process item\n\t\t\t\t\t$item = explode(\":\",$loot[2]);\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<td>' . $loot[1] . '</td><td>' . date('m/d H:i', $loot[0]) . '</td><td><a href=\"http://www.wowhead.com/item=' . $item[1] . '&bonus=' . $item[14] .':' . $item[15] .'\" target=\"_blank\" class=\"__rename_this\" data-itemid=\"' .$item[1]. '\">ITEM</a></td><td>' . $loot[3] . '</td>';\n\t\t\t\t\t$html .= '</tr>';\n\t\t\t\t}\n\t\t\t\t$html .= '</tbody>';\n\t\t\t\t$html .= '</table>';\n\t\t\t\t$html .= '<script>\n\tfunction itemNameCallback(itemData) {\n\t\tjQuery(\"table.sortable\").each(function(idx,el){\n\t\t\trpMakeSortable(el);\n\t\t});\n\t\tjQuery(\"a[data-itemid=\" + itemData.id + \"]\").each(function(idx,el) {\n\t\t\tel = jQuery(el);\n\t\t\tif (el.hasClass(\"__rename_this\")) {\n\t\t\t\tif (itemData.name) {\n\t\t\t\t\tel.text( itemData.name );\n\t\t\t\t\tel.removeClass(\"__rename_this\");\n\t\t\t\t} else {\n\t\t\t\t\tif (itemData.availableContexts[0] != \"\") {\n\t\t\t\t\t\tjQuery.ajax({\n\t\t\t\t\t\t\turl: \"http://eu.battle.net/api/wow/item/\" + el.data(\"itemid\") + \"/\" + itemData.availableContexts[0] + \"?locale=en_GB&jsonp=itemNameCallback\",\n\t\t\t\t\t\t\tdataType: \"jsonp\",\n\t\t\t\t\t\t\tsuccess: function(response) {\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\tjQuery(\"a.__rename_this\").each(function(idx,el){\n\t\tel = jQuery(el);\n\t\tif (el.hasClass(\"__rename_this\")) {\n\t\t\tjQuery.ajax({\n\t\t\t url: \"http://eu.battle.net/api/wow/item/\" + el.data(\"itemid\") + \"?locale=en_GB&jsonp=itemNameCallback\",\n\t\t\t dataType: \"jsonp\",\n\t\t\t success: function(response) {\n\t\t\t }\n\t\t\t})\n\t\t}\n\t})\n\t</script>';\n\t\t\t} else {\t// json not works, maybe XML\n\t\t\t\t$xml = @simplexml_load_string(str_replace(\"&\",\"&amp;\",$string));\n\t\t\t\t$html .= \"Start: \".$xml->start.\"<br />\";\n\t\t\t\t$html .= \"End: \".$xml->end.\"<br />\";\n\t\t\t\t$html .= \"Zone: \".$xml->zone.\"<br />\";\n\t\t\t\t$html .= '<fieldset class=\"rp_history_block\"><legend>Bosskills</legend><div>';\n\t\t\t\tif ($xml->BossKills) {\n\t\t\t\t\tforeach ($xml->BossKills->children() as $bosskill) {\n\t\t\t\t\t\t$html .= $bosskill->time . \" : \" . $bosskill->name . \"<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$html .= '</div></fieldset>';\n\t\t\t\t$html .= '<fieldset class=\"rp_history_block\"><legend>Loot</legend><div>';\n\t\t\t\tif ($xml->Loot) {\n\t\t\t\t\tforeach ($xml->Loot->children() as $loot) {\n\t\t\t\t\t\t$html .= $loot->Player . \" : <a href=\\\"http://www.wowhead.com/item=\" . $loot->ItemID . \"\\\">\" . $loot->ItemName . \"</a> (\" . $loot->Boss . \")<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$html .= '</div></fieldset>';\n\t\t\t\t$html .= '<fieldset class=\"rp_history_block\"><legend>Character join</legend><div>';\n\t\t\t\tif ($xml->Join) {\n\t\t\t\t\tforeach ($xml->Join->children() as $Join) {\n\t\t\t\t\t\t$html .= $Join->player . \" : \" . $Join->time . \"<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$html .= '</div></fieldset>';\n\t\t\t\t$html .= '<fieldset class=\"rp_history_block\"><legend>Character leave</legend><div>';\n\t\t\t\tif ($xml->Leave) {\n\t\t\t\t\tforeach ($xml->Leave->children() as $Leave) {\n\t\t\t\t\t\t$html .= $Leave->player . \" : \" . $Leave->time . \"<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$html .= '</div></fieldset>';\n\t\t\t}\n\t\t}\n\t\t$html .= '';\n\t\treturn ($html);\n }", "private function get_history($event){\n\t\t$noteID = $event->get_arg(1);\n\t\t$pageNumber = $event->get_arg(2);\n if(is_null($pageNumber) || !is_numeric($pageNumber))\n $pageNumber = 0;\n else if ($pageNumber <= 0)\n $pageNumber = 0;\n else\n $pageNumber--;\n\n global $config;\n \n\t\t$histiriesPerPage = $config->get_int('notesHistoriesPerPage');\n\t\t\n\t\tglobal $database;\n\t\t$histories = $database->get_all(\"SELECT h.note_id, h.review_id, h.image_id, h.date, h.note, u.name AS user_name \".\n\t\t\t\t\t\t\t\t\t\t\"FROM note_histories AS h \".\n\t\t\t\t\t\t\t\t\t\t\"INNER JOIN users AS u \".\n\t\t\t\t\t\t\t\t\t\t\"ON u.id = h.user_id \".\n\t\t\t\t\t\t\t\t\t\t\"WHERE note_id = ? \".\n\t\t\t\t\t\t\t\t\t\t\"ORDER BY date DESC LIMIT ?, ?\",\n\t\t\t\t\t\t\t\t\t\tarray($noteID, $pageNumber * $histiriesPerPage, $histiriesPerPage));\n\t\t\t\t\t\n\t\t$totalPages = ceil($database->get_one(\"SELECT COUNT(*) FROM note_histories WHERE note_id = ?\", array($noteID)) / $histiriesPerPage);\n\t\t\n\t\t$this->theme->display_history($histories, $pageNumber + 1, $totalPages);\n\t}", "public function __toString() {\n $output = array();\n foreach($this->toArray() as $key => $lang) {\n $output[] = '<a href=\"' . $lang->url() . '\">' . $lang->url() . '</a><br />'; \n } \n return implode(PHP_EOL, $output);\n }", "public function historyPagerRowTags()\n {\n $tags = array();\n $tags['COMPLETION_DATE'] = HMS_Util::get_long_date_time($this->getCompletedTimestamp());\n \n // Get the HTML view, if available\n if(!is_null($this->html_output_filename)){\n $htmlCmd = CommandFactory::getCommand('ShowReportHtml');\n $htmlCmd->setReportId($this->getId());\n $tags['HTML'] = $htmlCmd->getURI();\n }\n \n if(!is_null($this->pdf_output_filename)){\n $pdfCmd = CommandFactory::getCommand('ShowReportPdf');\n $pdfCmd->setReportId($this->getId());\n $tags['PDF'] = $pdfCmd->getURI();\n }\n \n if(!is_null($this->csv_output_filename)){\n $csvCmd = CommandFactory::getCommand('ShowReportCsv');\n $csvCmd->setReportId($this->id);\n $tags['CSV'] = $csvCmd->getURI();\n }\n \n $tags['ACTIONS'] = '';\n\n return $tags;\n }", "public function to_html() /*: string*/ {}", "public function getLogs(): string\n {\n $html = '<ul>';\n\n foreach ($_SESSION['ALOGGER'] as $line) {\n $html .= \"<li>{$line->date} : {$line->type} | {$line->text}</li>\";\n }\n\n $html .= '</ul>';\n unset($_SESSION['ALOGGER']);\n return $html;\n }", "public function render_assign_attempt_history(assign_attempt_history $history) {\r\n $o = '';\r\n\r\n $submittedstr = get_string('submitted', 'assign');\r\n $gradestr = get_string('grade');\r\n $gradedonstr = get_string('gradedon', 'assign');\r\n $gradedbystr = get_string('gradedby', 'assign');\r\n\r\n // Don't show the last one because it is the current submission.\r\n array_pop($history->submissions);\r\n\r\n // Show newest to oldest.\r\n $history->submissions = array_reverse($history->submissions);\r\n\r\n if (empty($history->submissions)) {\r\n return '';\r\n }\r\n\r\n $containerid = 'attempthistory' . uniqid();\r\n $o .= $this->output->heading(get_string('attempthistory', 'assign'), 3);\r\n $o .= $this->box_start('attempthistory', $containerid);\r\n\r\n foreach ($history->submissions as $i => $submission) {\r\n $grade = null;\r\n foreach ($history->grades as $onegrade) {\r\n if ($onegrade->attemptnumber == $submission->attemptnumber) {\r\n if ($onegrade->grade != ASSIGN_GRADE_NOT_SET) {\r\n $grade = $onegrade;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n $editbtn = '';\r\n\r\n if ($submission) {\r\n// SU_AMEND START - Assignment: Show seconds for submission time\r\n //$submissionsummary = userdate($submission->timemodified);\r\n $submissionsummary = userdate($submission->timemodified, '%d %B %Y, %I:%M:%S %p');\r\n// SU_AMEND END\r\n } else {\r\n $submissionsummary = get_string('nosubmission', 'assign');\r\n }\r\n\r\n $attemptsummaryparams = array('attemptnumber'=>$submission->attemptnumber+1,\r\n 'submissionsummary'=>$submissionsummary);\r\n $o .= $this->heading(get_string('attemptheading', 'assign', $attemptsummaryparams), 4);\r\n\r\n $t = new html_table();\r\n\r\n if ($submission) {\r\n $cell1 = new html_table_cell(get_string('submissionstatus', 'assign'));\r\n $cell2 = new html_table_cell(get_string('submissionstatus_' . $submission->status, 'assign'));\r\n $t->data[] = new html_table_row(array($cell1, $cell2));\r\n\r\n foreach ($history->submissionplugins as $plugin) {\r\n $pluginshowsummary = !$plugin->is_empty($submission) || !$plugin->allow_submissions();\r\n if ($plugin->is_enabled() &&\r\n $plugin->is_visible() &&\r\n $plugin->has_user_summary() &&\r\n $pluginshowsummary) {\r\n\r\n $cell1 = new html_table_cell($plugin->get_name());\r\n $pluginsubmission = new assign_submission_plugin_submission($plugin,\r\n $submission,\r\n assign_submission_plugin_submission::SUMMARY,\r\n $history->coursemoduleid,\r\n $history->returnaction,\r\n $history->returnparams);\r\n $cell2 = new html_table_cell($this->render($pluginsubmission));\r\n\r\n $t->data[] = new html_table_row(array($cell1, $cell2));\r\n }\r\n }\r\n }\r\n\r\n if ($grade) {\r\n // Heading 'feedback'.\r\n $title = get_string('feedback', 'assign', $i);\r\n $title .= $this->output->spacer(array('width'=>10));\r\n if ($history->cangrade) {\r\n // Edit previous feedback.\r\n $returnparams = http_build_query($history->returnparams);\r\n $urlparams = array('id' => $history->coursemoduleid,\r\n 'rownum'=>$history->rownum,\r\n 'useridlistid'=>$history->useridlistid,\r\n 'attemptnumber'=>$grade->attemptnumber,\r\n 'action'=>'grade',\r\n 'returnaction'=>$history->returnaction,\r\n 'returnparams'=>$returnparams);\r\n $url = new moodle_url('/mod/assign/view.php', $urlparams);\r\n $icon = new pix_icon('gradefeedback',\r\n get_string('editattemptfeedback', 'assign', $grade->attemptnumber+1),\r\n 'mod_assign');\r\n $title .= $this->output->action_icon($url, $icon);\r\n }\r\n $cell = new html_table_cell($title);\r\n $cell->attributes['class'] = 'feedbacktitle';\r\n $cell->colspan = 2;\r\n $t->data[] = new html_table_row(array($cell));\r\n\r\n // Grade.\r\n $cell1 = new html_table_cell($gradestr);\r\n $cell2 = $grade->gradefordisplay;\r\n $t->data[] = new html_table_row(array($cell1, $cell2));\r\n\r\n // Graded on.\r\n $cell1 = new html_table_cell($gradedonstr);\r\n $cell2 = new html_table_cell(userdate($grade->timemodified));\r\n $t->data[] = new html_table_row(array($cell1, $cell2));\r\n\r\n // Graded by set to a real user. Not set can be empty or -1.\r\n if (!empty($grade->grader) && is_object($grade->grader)) {\r\n $cell1 = new html_table_cell($gradedbystr);\r\n $cell2 = new html_table_cell($this->output->user_picture($grade->grader) .\r\n $this->output->spacer(array('width' => 30)) . fullname($grade->grader));\r\n $t->data[] = new html_table_row(array($cell1, $cell2));\r\n }\r\n\r\n // Feedback from plugins.\r\n foreach ($history->feedbackplugins as $plugin) {\r\n if ($plugin->is_enabled() &&\r\n $plugin->is_visible() &&\r\n $plugin->has_user_summary() &&\r\n !$plugin->is_empty($grade)) {\r\n\r\n $cell1 = new html_table_cell($plugin->get_name());\r\n $pluginfeedback = new assign_feedback_plugin_feedback(\r\n $plugin, $grade, assign_feedback_plugin_feedback::SUMMARY, $history->coursemoduleid,\r\n $history->returnaction, $history->returnparams\r\n );\r\n $cell2 = new html_table_cell($this->render($pluginfeedback));\r\n $t->data[] = new html_table_row(array($cell1, $cell2));\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n $o .= html_writer::table($t);\r\n }\r\n $o .= $this->box_end();\r\n $jsparams = array($containerid);\r\n\r\n $this->page->requires->yui_module('moodle-mod_assign-history', 'Y.one(\"#' . $containerid . '\").history');\r\n\r\n return $o;\r\n }", "private function get_history(string $eventid): string\n {\n $join = new JoinRSVPsMembersUsers();\n $join->loopRecentOptionalEvent($eventid);\n $participants = [];\n while ($join->fetch()) {\n $participants[] = [\n 'name' => $join->fullname,\n 'time' => $join->modtime,\n 'rsvp' => $join->rsvp\n ];\n }\n return twig_render('event_history', [\n 'participants' => $participants,\n 'images' => url_images()]);\n }", "function Render()\n\t{\n\t\t$intAccountId = DBO()->Account->Id->Value;\n\t\t$intUserRoleId = $_SESSION['User']['user_role_id'];\n\t\t\n\t\t// Retrieve the CustomerStatusAssignment for this account, for the last self::MAX_INVOICE_RUNS invoice runs\n\t\t$arrStatusHistory = Customer_Status_Assignment::getForAccount($intAccountId, self::MAX_INVOICE_RUNS);\n\t\t\n\t\tif (count($arrStatusHistory) == 0)\n\t\t{\n\t\t\t// There are no records in the customer_status_history table relating to this account\n\t\t\techo \"\n<h2 class='CustomerStatus'>Customer Status History</h2>\n<div class='GroupedContent'>\n\tThere is no history for this account\n</div>\n<div class='SmallSeparator'></div>\n\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$arrHistoryDetails = array();\n\t\t$strStatuses = \"\";\n\t\tforeach ($arrStatusHistory as $i=>$objStatusAssignment)\n\t\t{\n\t\t\t$objInvoiceRun\t\t= Invoice_Run::getForId($objStatusAssignment->invoiceRunId);\n\t\t\t$objCustomerStatus\t= $objStatusAssignment->getCustomerStatus();\n\t\t\t\n\t\t\t$strStatuses .= \"<td align='center' class='{$objCustomerStatus->cssClass}'>\". date(\"jS M\", strtotime($objInvoiceRun->billingDate)) .\"<br />{$objCustomerStatus->name}</td>\";\n\n\t\t\t$arrHistoryDetails[] = array(\t\"name\"\t\t\t=> htmlspecialchars($objCustomerStatus->name),\n\t\t\t\t\t\t\t\t\t\t\t\"description\"\t=> htmlspecialchars($objCustomerStatus->description),\n\t\t\t\t\t\t\t\t\t\t\t\"action\"\t\t=> htmlspecialchars($objStatusAssignment->getActionDescription($intUserRoleId)),\n\t\t\t\t\t\t\t\t\t\t\t\"lastUpdated\"\t=> date(\"jS M, Y g:i:s a\", strtotime($objStatusAssignment->lastUpdated)),\n\t\t\t\t\t\t\t\t\t\t\t\"cssClass\"\t\t=> $objCustomerStatus->cssClass\n\t\t\t\t\t\t\t\t\t\t);\n\t\t}\n\t\t$arrFirst = $arrHistoryDetails[0];\n\t\t\n\t\t$jsonHistoryDetails = Json()->encode($arrHistoryDetails);\n\t\t\n\t\techo \"\n<h2 class='CustomerStatus'>Customer Status History</h2>\n<table class='customer-status-history' id='CustomerStatusHistory' cellpadding='0' cellspacing='0'>\n\t<tr>$strStatuses</tr>\n</table>\n<div class='TinySeparator'></div>\n<table id='CustomerStatusDetails' class='{$arrFirst['cssClass']}'>\n\t<tr valign='top'>\n\t\t<td>Action</td>\n\t\t<td id='CustomerStatusDetails.Action'>{$arrFirst['action']}</td>\n\t</tr>\n\t<tr valign='top'>\n\t\t<td id='CustomerStatusDetails.Name'>{$arrFirst['name']}</td>\n\t\t<td id='CustomerStatusDetails.Description'>{$arrFirst['description']}</td>\n\t</tr>\n\t<tr valign='top'>\n\t\t<td>Updated</td>\n\t\t<td id='CustomerStatusDetails.LastUpdated'>{$arrFirst['lastUpdated']}</td>\n\t</tr>\n</table>\n<div class='SmallSeparator'></div>\n<script type='text/javascript'>Vixen.CustomerStatusHistory.Initialise($jsonHistoryDetails)</script>\n\";\n\t}", "protected function _toHtml()\n {\n return $this->robots->getData() . PHP_EOL;\n }", "function showHistory()\n{\n}", "public function __toString()\n {\n return $this->create_links();\n }", "function history() {\r\n\r\n\r\n $app =& JFactory::getApplication('site');\r\n $document =& JFactory::getDocument();\r\n $pManager =& getPluginManager();\r\n\r\n $wid = JRequest::getInt( 'wid', 0 );\r\n $iid = JRequest::getInt( 'iid', 0 );\r\n\r\n $workflowModel =& $this->getModel('workflow');\r\n $workflow = $workflowModel->get( $wid );\r\n\r\n if( !$workflow )\r\n JError::raiseError( 404, JText::_(\"Workflow not found\"));\r\n\r\n\r\n /* Authorization */\r\n $pManager->loadPlugins('acl');\r\n $response = $pManager->invokeMethod( 'acl', 'getMyGroupId', array($workflow->acl),null );\r\n $userGroups = $response[$workflow->acl];\r\n $user =& JFactory::getUser();\r\n\r\n if( $user->guest )\r\n JError::raiseError( 403, JText::_(\"Access Forbidden\") );\r\n\r\n if(\t!canManageWorkflows() && !in_array($workflow->admin_gid,array_keys($userGroups)))\r\n JError::raiseError( 403, JText::_(\"Access Forbidden\"));\r\n /* User is autorized */\r\n\r\n $historyModel =& $this->getModel('history');\r\n $itemHistory = $historyModel->get( $wid, $iid );\r\n\r\n if( !$itemHistory )\r\n JError::raiseError( 404, JText::_(\"Item not found or No history stored for this item\"));\r\n\r\n\r\n\r\n /* Prepare and display the view */\r\n $viewType\t= $document->getType();\r\n $viewName\t= 'history';\r\n $viewLayout\t= 'default';\r\n\r\n $view = & $this->getView( $viewName, $viewType, '', array( 'base_path'=>$this->_basePath));\r\n\r\n\r\n // Set the layout\r\n $view->setLayout($viewLayout);\r\n\r\n //Display the view\r\n $view->display($itemHistory, $workflow);\r\n\r\n }" ]
[ "0.678587", "0.63874286", "0.6113749", "0.60118765", "0.5920713", "0.5874191", "0.5872737", "0.5870962", "0.58564883", "0.5679817", "0.5641618", "0.5633751", "0.55702674", "0.5531906", "0.5521969", "0.5510605", "0.5493517", "0.5440948", "0.54172033", "0.5404795", "0.5403591", "0.53905654", "0.53608495", "0.5352292", "0.5351823", "0.5332475", "0.5316296", "0.53023934", "0.52882653", "0.52760285" ]
0.69967496
0
Get a new user model instance.
public static function user() { return new static::$userModel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function newUserModel()\n {\n $model = static::userModel();\n\n return new $model;\n }", "public function getModel()\n {\n return new User();\n }", "private function _getUserModel() {\n if ($this->_userModel == NULL) {\n $this->_userModel = new User();\n }\n return $this->_userModel;\n }", "public function createUser()\n {\n $class = $this->modelClass;\n $user = new $class();\n\n return $this->proxyfy($user);\n }", "private function createModel()\n\t{\n\t\treturn new Users();\t\t\n\t}", "public function getModel()\n {\n return new PharmacistUser();\n }", "private function getUser(){\n\n return new User();\n }", "public function getModel($id = 0)\n {\n $model = new User();\n if ($id) {\n $model = $model->findOne($id);\n }\n return $model;\n }", "function getObject(){\n\t\t\treturn new Core_Model_User(array(\n\t\t\t\t'id' => $this->id->getValue(),\n\t\t\t\t'name' => $this->name->getValue(),\t\t\t\t\n\t\t\t\t'email' => $this->email->getValue(),\n\t\t\t\t'birthday' => $this->password->getValue(),\n\t\t\t\t'category' => $this->category->getValue(),\n\t\t\t\t'updated' => date(\"Y-m-d h:i:s\", time())\n\t\t\t));\n\t\t}", "public function user() {\n return $this->_model('user', $this->vars['user_id'], 'Neoform\\User\\Model');\n }", "public function makeUser() {\n $user = factory(\\App\\Models\\User::class)->make();\n return $user;\n }", "public function aclUserModelInstance(): Model|Authenticatable\n {\n // NOTE: We cannot rely on the \"make()\" method being available\n // for the user model. So we create a new instance the old\n // fashion way...\n $class = $this->aclUserModel();\n return new $class();\n }", "protected function _getUserModel()\r\n {\r\n return $this->getModelFromCache('XenForo_Model_User');\r\n }", "protected function createModel()\n {\n return new LoginModel();\n }", "function loadUser()\r\n {\r\n if ( $this->_model === null ) {\r\n $this->_model = User::model()->findByPk( $this->id );\r\n }\r\n return $this->_model;\r\n }", "public static function userModel(){\n\t\t$class = Yii::app()->getModule('user')->userClass;\n\t\treturn NActiveRecord::model($class);\n\t}", "public function getModel() {\n if (!$this->_user_model && $this->id)\n $this->_user_model = User::model()->findByPk($this->id);\n return $this->_user_model ;\n }", "public function create()\n {\n return $this->edit(new User());\n }", "public static function get() {\n if(isset($_SESSION['uid'])) {\n $user = self::byFacebookId($_SESSION['uid']);\n } else {\n $user = new User();\n }\n\n if ($user->dry()) { //User is dry, create new user\n $profile = self::get_fb_user();\n\n $user->facebook_id = $profile->id;\n $user->first_name = $profile->first_name;\n $user->last_name = $profile->last_name;\n $user->username = $profile->username;\n $user->gender = $profile->gender;\n $user->timezone = $profile->timezone;\n\n $user->save();\n }\n\n return $user;\n }", "public function getUserInstance()\n {\n $class = $this->getUserClass();\n\n return new $class;\n }", "protected function newUserModel($username, $password, array $options = [])\n {\n $user = new User();\n $user->username = $username;\n $user->password = $password;\n\n foreach ($options as $key => $value) {\n $user->{$key} = $value;\n }\n\n return $user;\n }", "public function newUser()\n\t{\n\t\ttry \n\t\t{\n\t\t\treturn User::where('created_at', '>=', \\Carbon\\Carbon::now()->startOfMonth())->get();\n\t\t}catch (\\Exception $e){\n \treturn 'Sorry something went worng. Please try again.';\n \t\t}\n\t}", "public function user () {\n\t\treturn new \\User ($this->user);\n\t}", "public function loadUser()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(Yii::app()->user->id)\n\t\t\t\t$this->_model=Yii::app()->controller->module->user();\n\t\t\tif($this->_model===null)\n\t\t\t\t$this->redirect(Yii::app()->controller->module->loginUrl);\n\t\t}\n\t\treturn $this->_model;\n\t}", "public static function getUserInstance() {\n $vm = new self();\n \n $vm->user = $vm->userDAM->readUser($vm->userId);\n\n return $vm;\n }", "public function loadUser()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n if(Yii::app()->user->id)\n $this->_model=Yii::app()->controller->module->user();\n if($this->_model===null)\n $this->redirect(Yii::app()->controller->module->loginUrl);\n\t\t}\n\t\treturn $this->_model;\n\t}", "protected function createUserModel($username, $password, array $options = [])\n {\n $user = $this->newUserModel($username, $password, $options);\n $user->save();\n\n return $user;\n }", "public static function useUserModel(string $model)\n {\n static::$userModel = $model;\n\n return new static;\n }", "protected function getUser() {\n if (!Yii::$app->user->isGuest) return Yii::$app->user->identity;\n\n $user = new User;\n $user->name = Yii::$app->request->post('name');\n\n if ($user->save()) return $user;\n return null;\n }", "private function create()\n {\n return User::create(['email' => $this->email]);\n }" ]
[ "0.85683507", "0.7969827", "0.78776", "0.7864148", "0.7729204", "0.7604435", "0.74750173", "0.7451429", "0.7405275", "0.7330545", "0.7310639", "0.7276848", "0.72304714", "0.71932536", "0.71723473", "0.7168975", "0.7092932", "0.7041507", "0.6990301", "0.6927415", "0.6917947", "0.6895594", "0.687331", "0.68692756", "0.68569386", "0.67931867", "0.67849046", "0.6780028", "0.6729767", "0.67164147" ]
0.82434434
1
Determine if the application offers support for teams.
public static function usesTeams() { return in_array(CanJoinTeams::class, class_uses_recursive(static::userModel())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHasTeam ()\r\n {\r\n return $this->hasTeam;\r\n }", "public function hasTeams()\n {\n return count($this->teams) > 0;\n }", "public function isU20Teams()\n {\n return $this->getXml()->getElementsByTagName('LeagueOfficeTypeID')->item(0)->nodeValue == 4;\n }", "public function hasTeam()\n {\n return $this->team !== null;\n }", "function teams_user_can_join(&$config, $team) {\n global $USER, $COURSE, $DB;\n\n $coursecontext = context_course::instance($COURSE->id);\n\n if (!$team->openteam || !has_capability('block/teams:apply', $coursecontext) || empty($config->allowrequests)) {\n return false;\n }\n\n // If already has a request here go out.\n if ($DB->get_record('block_teams_requests', array('userid' => $USER->id, 'groupid' => $team->groupid))) {\n return false;\n }\n\n if ($config->allowmultipleteams) {\n return true;\n }\n\n // Fetch any course membership in groups associated to teams.\n $sql = \"\n SELECT\n COUNT(*)\n FROM\n {groups_members} gm,\n {groups} g,\n {block_teams} t\n WHERE\n g.id = gm.groupid AND\n gm.userid = ? AND\n t.groupid = g.groupid AND\n t.courseid = ?\n \";\n\n if (!$DB->count_records_sql($sql, array($USER->id, $COURSE->id))) {\n return true;\n }\n\n return false;\n}", "public function getTeamsWithStuffToReview()\n {\n $this->ensureAuthed();\n\n $allTeams = TeamStatus::listAllTeams();\n $teams = array_filter($allTeams, function($team) {\n $status = new TeamStatus($team);\n return $status->needsReview('image');\n });\n\n $output = Output::getInstance();\n\n $teams = array_values($teams);\n $output->setOutput('teams', $teams);\n return true;\n }", "public function hasTeamid(){\n return $this->_has(15);\n }", "public function hasTeamallfree(){\n return $this->_has(4);\n }", "public function getProjectTeam();", "public function check_availability() {\n \n if ( !get_option('app_facebook_ads_enable') || !plan_feature('app_facebook_ads') || !team_role_permission('facebook_ads') ) {\n return false;\n } else {\n return true;\n }\n\n }", "public function team()\n {\n $team = request()->user()->team;\n\n if($team) {\n return $team->team_name;\n }\n else {\n return \"no_team\";\n }\n }", "public function canLookupCourseOfferings() {\n \treturn true;\n }", "public static function isSupport()\n {\n return isset($_SESSION['support_user']);\n }", "public function approvedTeams()\n {\n return $this->hasMany('App\\Team')->where('status', 'approved');\n }", "public function getTeams()\n {\n return Team::get();\n }", "public function getTeam()\n {\n return $this->team;\n }", "function testTeamUpdate() {\n //========================================= \n \n // To verify update Parlay Team is valid\n //========================================= \n }", "public function getTeams()\n {\n return $this->hasMany(Team::className(), ['id' => 'team_id'])\n ->viaTable('team_has_player', ['player_id' => 'id'])\n ->select('*, (SELECT is_capitan FROM team_has_player WHERE player_id='.$this->id.' AND team_id=teams.id LIMIT 1) as is_capitan');\n }", "public function isOffer(){\n $offers = $this->getAppliedOffers();\n if($offers == NULL){\n return 0;\n }\n \n return count($offers) > 0 ;\n }", "public function isProfessional() : bool\n {\n return $this->is_professional;\n }", "public function isAdmin() {\n return $this->getDatabaseValue('team_admin') == '1';\n }", "public function getTeam()\n {\n if ($this->type == Config\\Config::SENIOR) {\n $url = Network\\Request::buildUrl(array('file' => 'teamdetails', 'teamID' => $this->getId(), 'version' => Config\\Version::TEAMDETAILS));\n return new Xml\\Team\\Senior(Network\\Request::fetchUrl($url), $this->getId());\n } elseif ($this->type == Config\\Config::YOUTH) {\n $url = Network\\Request::buildUrl(array('file' => 'youthteamdetails', 'youthTeamId' => $this->getId(), 'version' => Config\\Version::YOUTHTEAMDETAILS));\n return new Xml\\Team\\Youth(Network\\Request::fetchUrl($url));\n }\n return null;\n }", "function isTypeLeague() {\r\n\t\treturn $this->record['type'] == 1;\r\n\t}", "public function testViewTeams()\n {\n $this->visit('/teams')\n ->see('All Teams');\n }", "function checkteam($team) {\n\t$result = $team->list_members();\n\tif (count($result) < 3) {\n\t\tprint <<<EOT\n<h1>Edit Match</h1>\n<p>\nSorry but there are not enough members in {$team->display_name()} yet to\nmake up a match with.\n</p>\n<p>Please <a href=\"javascript:history.back()\">click here</a> to go back\nor <a href=\"teamsupd.php\">here</a> to update teams.</p>\n\nEOT;\n\t\tlg_html_footer();\n\t\texit(0);\n\t}\n\tforeach ($result as $p) {\n\t\t$p->fetchdets();\n\t}\n\treturn $result;\n}", "protected function ensureCurrentTeamIsSet()\n {\n $teams = $this->vapor->ownedTeams();\n\n Config::set('team', collect($teams)->first(function ($team) {\n return $team['personal_team'] ?? false;\n })['id']);\n }", "public function allowedTeamsOf(TeamInterface $model, Authenticatable $user): Collection\n {\n }", "public static function isFrameworkEnabled()\n\t{\n\t\treturn JPluginHelper::isEnabled('system', 'regularlabs');\n\t}", "public function teamCheck($value)\n\t{\n\t\t$team1 = $this->input->post(\"team1\");\n\t\t$team2 = $this->input->post(\"team2\");\n\t\t\n\t\tfor ($i = 0; $i < count($team1); $i++)\n\t\t{\n\t\t\tif ($team1[$i] != -1 && $team2[$i] != -1)\n\t\t\t{\n\t\t\t\tif ($team1[$i] == $team2[$i])\n\t\t\t\t{\n\t\t\t\t\t$this->form_validation->set_message('teamCheck', \"A team can't play themselves.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "protected function getTeamsOptions()\n {\n $mainframe = Factory::getApplication();\n $db = Factory::getDbo();\n $query = $db->getQuery(true);\n\n if (empty($this->_teamoptions)) {\n if (!$this->_project_id) {\n return false;\n }\n\n $query->select('t.id AS value, t.name AS text');\n $query->from('#__sportsmanagement_project_team AS pt');\n $query->join('INNER', '#__sportsmanagement_season_team_id as st ON st.id = pt.team_id ');\n $query->join('INNER', '#__sportsmanagement_team AS t ON st.team_id = t.id ');\n\n $query->where('pt.project_id = ' . intval($this->_project_id));\n if ($this->_division_id) {\n $query->where('pt.division_id = ' . intval($this->_division_id));\n }\n $query->order('t.name ASC');\n\n\n $db->setQuery($query);\n $res = $db->loadObjectList();\n\n if (!$res) {\n Jerror::raiseWarning(0, $db->getErrorMsg());\n }\n $this->_teamoptions = $res;\n }\n return $this->_teamoptions;\n }" ]
[ "0.675032", "0.6685263", "0.6487913", "0.6477652", "0.6404406", "0.58470577", "0.5794646", "0.5782338", "0.5556785", "0.54734087", "0.53945386", "0.53592646", "0.5354736", "0.53454435", "0.53166324", "0.5296918", "0.52915186", "0.52866215", "0.5279849", "0.52493846", "0.52429765", "0.52406996", "0.52387166", "0.522303", "0.5215707", "0.5207119", "0.5205422", "0.52014875", "0.5197503", "0.5170203" ]
0.73493016
0
Get the team model class name.
public static function teamModel() { return static::$teamModel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName(): string\n {\n /** @noinspection ReturnFalseInspection */\n $class = substr(strrchr($this->getModelClass(), \"\\\\\"), 1);\n\n $snakeCasedName = '';\n\n $len = strlen($class);\n for ($i = 0; $i < $len; ++$i) {\n if ($i !== 0 && ctype_upper($class[$i])) {\n $snakeCasedName .= '_'.strtolower($class[$i]);\n } else {\n $snakeCasedName .= strtolower($class[$i]);\n }\n }\n\n return $snakeCasedName;\n }", "public function getModelName()\n {\n $className = get_class($this);\n\n if ($this->_factoryPostfix != '') {\n $result = substr($className, strlen($this->_factoryNamespace) + 1, strlen($this->_factoryPostfix) * -1);\n } else {\n $result = substr($className, strlen($this->_factoryNamespace) + 1);\n }\n\n return $result;\n }", "protected function getModelClass(): string\n {\n return $this->model;\n }", "public function modelName() {\n return self::$_name;\n }", "public function modelName() {\n return self::$_name;\n }", "public function modelName() {\n return self::$_name;\n }", "public function modelName() {\n return self::$_name;\n }", "public function modelName() {\n return self::$_name;\n }", "public function getClassName(): string\n {\n return $this->vo->class_name;\n }", "function className($model)\n {\n if( $model == NULL)\n return \"\";\n return (new ReflectionClass($model))->getShortName();\n }", "protected function getModelName(): string\n {\n return Model::class;\n }", "static public function getClass() {\n return self::getMetadata()->name;\n }", "public function getClassName()\n {\n return $this->getClass();\n }", "public function getModelClass()\n {\n return $this->getSimpleClassName($this->getVariable('model'));\n }", "public function getModelName()\n\t{\n\t\tif ($this->_modelName === NULL) {\n\t\t\t$arr = explode('_', get_class($this));\n\t\t\t$this->_modelName = array_pop($arr);\n\t\t}\n\t\treturn $this->_modelName;\n\t}", "public static function getClassName() {\n return self::$className;\n }", "public static function getClassName() {\n return self::$className;\n }", "public function model()\n {\n return ClientPreferredTeam::class;\n }", "public static function getModelClassName()\n {\n return self::$_modelClassName;\n }", "public function className()\n {\n return $this->className;\n }", "public function getModelName()\n {\n $tableName = $this->getRawTableName();\n // check if table name is plural --> convert to singular\n\n if (\n !$this->getDocument()->getConfig()->get(FormatterInterface::CFG_SKIP_PLURAL) &&\n ($tableName == ($singular = Inflector::singularize($tableName)))\n ) {\n $tableName = $singular;\n }\n\n if ($this->parseComment('className')) {\n $tableName = $this->parseComment('className');\n }\n\n // camleCase under scores for model names\n return $this->underscoreToCamelCase($tableName, true);\n }", "protected function getClass(): string\n {\n return strtolower($this->handleBackslashes(\n get_class($this->manager->getModel())\n ));\n }", "public function modelName()\n {\n return ltrim(get_class($this->model()), '\\\\');\n }", "protected function className() {\n return get_class($this);\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "private function getModelName()\n {\n return get_class($this);\n }", "public function getName() {\n return $this->getDatabaseValue('team_name');\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName(): string\n {\n return $this->className;\n }" ]
[ "0.71385175", "0.70735526", "0.70623314", "0.69791037", "0.69791037", "0.69791037", "0.69791037", "0.69791037", "0.6936906", "0.6883834", "0.6867469", "0.6856292", "0.6851007", "0.6833466", "0.68168104", "0.68113554", "0.68113554", "0.6809319", "0.6801363", "0.67880917", "0.6786298", "0.67814326", "0.6781341", "0.6775213", "0.6773629", "0.6773629", "0.6768952", "0.67580056", "0.6746853", "0.6746853" ]
0.7392626
0
Get a new team model instance.
public static function team() { return new static::$teamModel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTeam() {\n return new Team($this->getDatabaseValue('occupation_team_id'));\n }", "public function team()\n {\n return $this->hasOne(\\App\\Models\\Team::class, 'id', 'team_id');\n }", "public function team()\n {\n return $this->hasOne(\\App\\Models\\Team::class, 'id', 'team_id');\n }", "public function team() {\n return $this->hasOne('App\\Models\\Team', 'id', 'team_id')->withTrashed();\n }", "public function team()\n\t{\n\t\treturn $this->hasOne('App\\Team');\n\t}", "public static function teamModel()\n {\n return static::$teamModel;\n }", "public function getTeam()\n {\n if ($this->type == Config\\Config::SENIOR) {\n $url = Network\\Request::buildUrl(array('file' => 'teamdetails', 'teamID' => $this->getId(), 'version' => Config\\Version::TEAMDETAILS));\n return new Xml\\Team\\Senior(Network\\Request::fetchUrl($url), $this->getId());\n } elseif ($this->type == Config\\Config::YOUTH) {\n $url = Network\\Request::buildUrl(array('file' => 'youthteamdetails', 'youthTeamId' => $this->getId(), 'version' => Config\\Version::YOUTHTEAMDETAILS));\n return new Xml\\Team\\Youth(Network\\Request::fetchUrl($url));\n }\n return null;\n }", "public function create()\n {\n //\n return view('team');\n }", "public function store(TeamRequest $request)\n {\n return $this->team->create($request->validated());\n }", "public function team()\n {\n return $this->belongsTo('App\\Team');\n }", "public function team()\n {\n return $this->belongsTo(Team::class);\n }", "public function team()\n {\n return $this->belongsTo(Team::class);\n }", "public function team()\n {\n return $this->belongsTo(Team::class)->withDefault();\n }", "public function team()\n {\n return $this->belongsTo(Team::class, 'team_id', 'id');\n }", "public function create(array $data)\n {\n $team = $this->getInstance($data);\n if ($team->save()) {\n return $team;\n }\n //@todo write this with trans() for languages support in future;\n throw new SaveFailureException('An error occurs before save the team. Try again or call to a administrator.', 500);\n }", "public function team()\n {\n return $this->belongsTo(Team::class, 'team_id');\n }", "public function getLoanTeam()\n {\n return $this->hasOne(Team::class, ['id' => 'loan_to']);\n }", "public function create()\n {\n return view('backend.team.create');\n }", "public function create()\n {\n return view('admin.team.create');\n }", "public function getTeam()\n {\n return $this->team;\n }", "public function create()\n {\n $teams = Team::all();\n return view('team.create')->withTeams($teams);\n }", "public function create()\n {\n\n return view('backend.team.create');\n }", "public function create()\n {\n return view('backend.admin.team.create');\n }", "public function getTeam()\n {\n return Wrapper\\Team\\Senior::team($this->getTeamId());\n }", "public function show(Team $team)\n {\n return new TeamResource($team);\n }", "public function create()\n\t{\n\t\treturn View::make('teams.create');\n\t}", "public function create()\n\t{\n\t\treturn View::make('teams.create');\n\t}", "public function create()\n {\n return view('createTeam');\n }", "public function create()\n {\n //\n return view('admin.teams.create');\n }", "public function create()\n {\n return view('admin.teams.create');\n }" ]
[ "0.7070814", "0.70202315", "0.70202315", "0.6984265", "0.6935582", "0.6736469", "0.6403159", "0.6394436", "0.63855547", "0.6331783", "0.63288385", "0.63288385", "0.6271066", "0.6240709", "0.62116265", "0.6175763", "0.6171727", "0.6137652", "0.6129085", "0.6123607", "0.61048454", "0.61048007", "0.60971117", "0.6085947", "0.60789764", "0.607234", "0.607234", "0.6068441", "0.6047303", "0.6023581" ]
0.8497739
0
menghilangkan aray yg memiliki unique_key yg sama gunakan ini karena array_unique tidak dapat mengunique kan array yang berisi object/array
function get_unique_array($aray = array(), $unique_key=false,$isobject=true){ $unique_key = ($unique_key) ? $unique_key : if_empty($this->unique_key,'id'); $unique_value = array(); // save unique value $unique = array(); // dump data unique // cari unique value foreach ($aray as $var=>$val) { $value = $isobject ? $val->$unique_key : $val[$unique_key]; // jika sudah ada di unique value -> remove if(!in_array($value, $unique_value)){ $unique_value[] = $value; // update dulu $unique[] = $val; } } return $unique; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function arrayUnique($array)\n {\n }", "private function getUnique(){\n\t\t$uniqueArray = array();\n\t\tforeach( $this->getData() as $id=>$row )\n\t\tforeach( $row as $key=>$value ) {\n\t\t\tif(!array_key_exists( $key,$uniqueArray ))\n\t\t\t$uniqueArray[$key] = array();\n\n\t\t\tif( !in_array( $value, $uniqueArray[$key] ) )\n\t\t\tarray_push($uniqueArray[$key], $value);\n\t\t}\n\t\treturn $uniqueArray;\n\t}", "public function test_arrayzy_unique()\n {\n $manager = $this->getManager(['one' => ['two' => ['a', 'b', 'b', 'c']]]);\n\n $actual = $manager->unique('one.two');\n\n $this->assertEquals([0=>'a', 1=>'b', 3=>'c'], $actual, \"failed to unique array\");\n }", "function bbp_get_unique_array_values($array = array())\n{\n}", "public function unique();", "function super_unique($array,$key) {\n $temp_array = array();\n foreach ($array as &$v) {\n\t //CLEAR THE ARRAY FOR 0 Byte Log entries\n\t if ( (!isset($temp_array[$v[$key]]) == \"0 Bytes\") || (!isset($temp_array[$v[$key]]) == \"1 Bytes\") ) \n\t $temp_array[$v[$key]] =& $v;\n\t}\n\t$array = array_values($temp_array);\n\treturn $array;\n}", "function super_unique($array,$key){\r\n $temp_array = [];\r\n foreach ($array as &$v) {\r\n if (!isset($temp_array[$v[$key]]))\r\n $temp_array[$v[$key]] =& $v;\r\n }\r\n $array = array_values($temp_array);\r\n return $array;\r\n\r\n}", "function super_unique($array,$key) {\n $temp_array = [];\n foreach ($array as &$v) {\n if (!isset($temp_array[$v[$key]]))\n $temp_array[$v[$key]] =& $v;\n }\n $array = array_values($temp_array);\n // order array by confidence\n usort($array, function($a, $b) {\n return $b['Confidence'] <=> $a['Confidence'];\n });\n return $array;\n }", "private static function unique($array)\n\t{\n\t\treturn array_intersect_key($array, array_unique(array_map('serialize', $array)));\n\t}", "public function getUniqueKeys();", "function unique_multidimensional_array( $array, $key ) {\n\t\t$temp_array = array();\n\t\t$i = 0;\n\t\t$key_array = array();\n\n\t\tforeach ( $array as $val ) {\n\t\t\tif ( ! in_array( $val->$key, $key_array ) ) {\n\t\t\t\t$key_array[ $i ] = $val->$key;\n\t\t\t\t$temp_array[ $i ] = $val;\n\t\t\t}\n\n\t\t\t$i ++;\n\t\t}\n\n\t\treturn $temp_array;\n\t}", "function array_unique (array $array, $sort_flags = 'SORT_STRING') {}", "function load_uniqueid_array() {\n unset($this->uniqueid_array); // delete any values held in $uniqueid_array\n $this->uniqueid_array = array(); // assign a new empty array\n $current_date = date('Ymd', strval($this->uniqueid_array_update_time));\n\n // set up SQL statements to load uniqueid data:\n $uniqueid_sql = $this->load_uniqueid_sql();\n\n // Execute SQL and fetch results into an array indexed by column name:\n $uniqueid_result = $this->execute_sql($uniqueid_sql)\n\t\t\t ->fetchAll(PDO::FETCH_ASSOC);\n\n // save values into uniqueid array\n if($uniqueid_result) { // false if no values returned\n foreach($uniqueid_result as $key => $value) { \n $uniqueid = $value['uniqueid'];\n $tripid_reg = strval($value['tripid']).$value['registrationnumber'];\n $this->uniqueid_array[$tripid_reg] = $uniqueid;\n if(substr($uniqueid,0,8) == $current_date) {\n $this->journey_daycount++;\n }\n }\n }\n }", "function unique($arr)\n{\n $map = array();\n $result = array();\n\n foreach (array_reverse($arr) as $x){\n if(!array_key_exists($x, $map)){\n $map[$x] = true;\n $result[] = $x;\n }\n }\n\n return array_reverse($result);\n}", "public function isUnique()\r\n\t{\r\n\t\treturn true;\r\n\t\t\r\n\t}", "protected function _array_unique($arr) {\n return array_map(\n 'unserialize',\n array_unique(array_map('serialize', $arr))\n );\n }", "function validates_uniqueness_of($attr, $array, $class, $field_name=FALSE)\r\n{\r\n\tglobal $FIELDS;\r\n\tglobal $MSG;\r\n\t$dao = new DAO();\r\n\tif ($dao->Retrieve($class, array($attr=>$array[$attr]), TRUE, TRUE))\r\n\t{\r\n\t\t$field_name = $field_name ? $field_name : $attr;\r\n\t\t$FIELDS[] = $attr;\r\n\t\t$MSG->error[] = \"<strong>$field_name</strong> already registered\";\r\n\t}\r\n\treturn false;\r\n}", "function array2d_unique1d($arr, $unique_key) {\n\n\tif(is_array($arr) && count($arr) > 0) {\n\n\t\t$return_arr = array();\n\t\t\n\t\tforeach($arr as $sub_arr) {\n\t\t\t$found_flag = false;\n\t\t\tforeach($return_arr as $value) {\n\t\t\t\tif($sub_arr[$unique_key] == $value) \n\t\t\t\t$found_flag = true;\n\t\t\t\t}\n\t\t\tif(!$found_flag)\n\t\t\t\t$return_arr[] = $sub_arr[$unique_key];\n\t\t\t}\n\t\t\n\t\treturn $return_arr;\n\t\t}\n\t\n\tdebug_text_print(\"passed value not an array for array2d_sort()\");\n\treturn 0;\n\t}", "public function unique(): ISeq;", "public function testUniq() {\n $uniqs = [];\n if (!$this->_runUniqTest) {\n $this->assertCount(0, $uniqs);\n return;\n }\n for ($i = 0; $i < $this->_countUniqModels; $i++) {\n $model = [];\n NestedModel::updateModelUnique($model);\n $uniqs[] = $model['unique_id'];\n $this->assertEquals(count($uniqs), count(array_unique($uniqs)));\n $this->assertInternalType('int', $uniqs[count($uniqs) - 1]);\n }\n }", "private function createHashArray(){\n $hashArray = [];\n foreach ($this->searchableArray as $nameInSearchableArray) {\n $index = crc32($nameInSearchableArray);\n if (isset($hashArray[$index])) {\n array_push($hashArray[$index], $nameInSearchableArray);\n } else {\n $hashArray[$index] = [$nameInSearchableArray] ;\n }\n }\n return $hashArray;\n }", "protected function __setUnique()\n {\n }", "public function getUnique()\n {\n return $this->get(self::UNIQUE);\n }", "public function testDuplicates(){\n\n\n $l = new PokerClass();\n\t$a = $l->suffleCards();\n\t\t$result = array_unique($a);\n\n $this->assertEquals(52, count($result));\n\n }", "function u_array_unique(array $array, callable $equals): array\n{\n $result = [];\n\n foreach($array as $row)\n {\n if( u_in_array($result, $row, $equals) )\n {\n continue;\n }\n else\n {\n $result[] = $row;\n }\n }\n\n return $result;\n}", "function array2d_unique2d2($arr, $unique_key) {\n\n\tif(is_array($arr) && count($arr) > 0) {\n\t\t$return_arr = array();\n\t\t\n\t\tforeach($arr as $sub_arr) {\n\t\t\t$found_flag = false;\n\t\t\tforeach($return_arr as $value) {\n\t\t\t\tif($sub_arr[$unique_key] == $value) \n\t\t\t\t\t$found_flag = true;\n\t\t\t\t}\n\t\t\tif(!$found_flag) {\n\t\t\t\t$return_arr[$sub_arr[$unique_key]] = array();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\treturn $return_arr;\n\t\t}\n\t\t\n\tdebug_text_print(\"passed value not an array for array2d_sort()\");\t\t\n\treturn 0;\n\t}", "public\tfunction checkUnique($data, $fields)\n{\nif (!is_array($fields))\n{\n$fields = array($fields);\n}\n \n// go trough all columns and get their values from the parameters\nforeach($fields as $key)\n{\n$unique[$key] = $this->data[$this->name][$key];\n}\n \n// primary key value must be different from the posted value\nif (isset($this->data[$this->name][$this->primaryKey]))\n{\n$unique[$this->primaryKey] = \"<>\" . $this->data[$this->name][$this->primaryKey];\n}\n \n// use the model's isUnique function to check the unique rule\nreturn $this->isUnique($unique, false);\n}", "public function isUnique(): bool;", "function array2d_unique2d($arr, $unique_key) {\n\n\tif(is_array($arr) && count($arr) > 0) {\n\n\t\t$return_arr = array();\n\t\t\n\t\tforeach($arr as $sub_arr) {\n\t\t\t$found_flag = false;\n\t\t\tforeach($return_arr as $value) {\n\t\t\t\tif($sub_arr[$unique_key] == $value) \n\t\t\t\t\t$found_flag = true;\n\t\t\t\t}\n\t\t\tif(!$found_flag)\n\t\t\t\t$return_arr[$sub_arr[$unique_key]] = $sub_arr;\n\t\t\t}\n\t\t\n\t\treturn $return_arr;\t\n\t\t}\n\t\n\tdebug_text_print(\"passed value not an array for array2d_sort()\");\n\treturn 0;\n\t}", "public function _unique_field(Validate $array, $field)\n\t{\n\t\tif ($array[$field])\n\t\t{\n\t\t\t$query = DB::select($this->_fields[$this->_primary_key]->column)\n\t\t\t\t->from($this->_table)\n\t\t\t\t->where(\n\t\t\t\t\t$this->_fields[$field]->column,\n\t\t\t\t\t'=',\n\t\t\t\t\t$this->_fields[$field]->_database_wrap($array[$field]))\n\t\t\t\t->execute($this->_db);\n\n\t\t\tif (count($query))\n\t\t\t{\n\t\t\t\t$array->error($field, 'unique');\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.72353417", "0.71617", "0.69882274", "0.69486034", "0.6768483", "0.6747954", "0.67194533", "0.6693847", "0.6692044", "0.6476668", "0.63812053", "0.6320549", "0.6170782", "0.61554927", "0.61034113", "0.6101436", "0.6101295", "0.60920495", "0.6084337", "0.60310256", "0.59935987", "0.5958827", "0.5938488", "0.5909845", "0.5900857", "0.5877849", "0.58706176", "0.5820505", "0.58078724", "0.57903665" ]
0.78141135
0
Sets the renderer used by this tree.
public function setRenderer(tree\Renderer $renderer) { $this->_renderer = $renderer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRenderer($renderer) {\n\t\tif (is_callable($renderer)) {\n\t\t\t$this->_htmlRenderer = $renderer;\n\t\t}else {\n\t\t\t$this->_htmlRenderer = array('CHtml', 'errorSummary');\n\t\t}\n\t}", "protected function setRenderer( $renderer )\n {\n $this->renderer = $renderer;\n $this->tpl = Core\\Renderer::setRenderer( $renderer );\n if ( $this->template != null )\n $this->tpl->addTemplateDir( Core\\Context::getTemplatePath( $this->template ) );\n $this->tpl->addTemplateDir( Core\\Context::getModulePath() );\n }", "public function setRenderer(AbstractRenderer $renderer)\n\t{\n\t\t$this->renderer\t= $renderer;\n\t}", "public static function setRenderer($renderer)\n {\n if (ClassInfo::classImplements($renderer, IMarkdownRenderer::class)) {\n self::$renderer = $renderer;\n } else {\n user_error('The renderer ' . $renderer . ' does not implement IMarkdownRenderer', E_USER_ERROR);\n }\n }", "public function setRenderer(Renderer $renderer)\n {\n $this->renderer = $renderer;\n return $this;\n }", "public function set_cell_renderer($cell_renderer)\n {\n $this->cell_renderer = $cell_renderer;\n }", "public function setRenderer(RendererInterface $renderer)\n {\n $this->renderer = $renderer;\n }", "public function setRenderer($name)\n {\n $this->rendererName = $name;\n\n return $this;\n }", "public function getRenderer()\n {\n return $this->renderer;\n }", "public function getRenderer()\n {\n return $this->renderer;\n }", "public function getRenderer()\n {\n return $this->renderer;\n }", "public function setRendererClass( $class )\n {\n $this->rendererClass = (string) $class;\n }", "public function __construct ($renderer) {\n\t\t$this->renderer = $renderer;\n\t}", "public function setRenderer($renderer): MainOption {\n\t\t$rendererType = getType($renderer);\n\t\tif (!in_array($rendererType, ['string', 'array'])) {\n\t\t\tthrow new InvalidArgumentException(\"\\$renderer must be a string or array. Found: $rendererType.\");\n\t\t}\n\t\tif (is_array($renderer)) {\n\t\t\tValidator::getInstance()->checkKeysValueTypesOrFail($renderer, 'string', 'string', '$renderer');\n\t\t\tforeach ($renderer as $key => $item) {\n\t\t\t\tif (!in_array($key, ['header', 'pageButton'])) {\n\t\t\t\t\tthrow new InvalidArgumentException(\"You can user only 'header' and/or 'pageButton'. Found: $key.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->_setConfig('renderer', $renderer);\n\t\treturn $this->getMainOption();\n\t}", "public function getRenderer() {\n\t\treturn $this->_getConfig('renderer');\n\t}", "public static function setDefaultRenderer($renderer = NULL)\n\t{\n\t\tif (is_null($renderer)) {\n\t\t\tstatic::$defaultRenderer = new PhpTemplateRenderer();\n\t\t\treturn;\n\t\t}\n\n\t\tif ($renderer instanceof RendererInterface) {\n\t\t\tstatic::$defaultRenderer = $renderer;\n\t\t\treturn;\n\t\t}\n\n\t\t// Resolve renderer given by special key\n\t\tif (is_string($renderer)) {\n\t\t\tstatic::$defaultRenderer = static::resolveRenderer($renderer);\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new MvcsException(__METHOD__.\"(): Invalid argument passed as default renderer\");\n\t}", "public static function setFieldsetElementRenderer(\n Mage_XmlConnect_Model_Simplexml_Form_Element_Renderer_Interface $renderer\n ) {\n self::$_defaultFieldsetElementRenderer = $renderer;\n }", "function render (){\n\t\t$this->renderer = new renderer();\n\t\t//some code here\n\t}", "protected function getDefaultRenderer()\n\t{\n\t\treturn new $this->defaultRenderer;\n\t}", "public function getPageRenderer()\n {\n if(tx_rnbase_util_TYPO3::isTYPO80OrHigher()) {\n return $this->pageRenderer;\n }\n elseif (tx_rnbase_util_TYPO3::isTYPO70OrHigher()) {\n $this->initPageRenderer();\n return $this->pageRenderer;\n }\n return parent::getPageRenderer();\n }", "public function __construct(\n Renderer $renderer\n ) {\n $this->renderer = $renderer;\n }", "public static function setValidatorRuleRenderer(\n Mage_XmlConnect_Model_Simplexml_Form_Element_Renderer_Interface $renderer\n ) {\n self::$_defaultValidatorRuleRenderer = $renderer;\n }", "public function setView(Renderer $view)\n {\n $this->view = $view;\n }", "protected function initRenderer() {\r\n\t\t\r\n\t\t/* Init renderer if not yet done */\r\n\t\tif (is_null($this->renderer)) {\r\n\t\t\t$rendererClassUserFunc = tx_pttools_div::getTS('config.tx_ptgsastock.tresholdRendererClass');\r\n\t tx_pttools_assert::isNotEmptyString(\r\n\t $rendererClassUserFunc, \r\n\t array('message' => 'Set config.tx_ptgsastock.tresholdRendererClass in your TS (perhaps forgot to load static template?)!')\r\n\t );\r\n\t $this->renderer = t3lib_div::getUserObj($rendererClassUserFunc);\r\n\t tx_pttools_assert::isInstanceOf(\r\n\t $this->renderer, \r\n\t 'tx_ptgsastock_iStockTresholdRenderer',\r\n\t array('message' => 'Returned object must implement tx_ptgsastock_iStockTresholdRenderer')\r\n\t );\r\n\t\t}\r\n\t\t\r\n\t}", "public function setHighlighter($highlighter)\n {\n $this->highlighter = $highlighter;\n }", "private function getRenderer()\n {\n if (!is_object($this->renderInst)) {\n $class = self::$renderer;\n $this->renderInst = new $class();\n }\n\n return $this->renderInst;\n }", "public function setRenderWriter ( $Writer ) {\n\t\t# Add Writer\n\t\t$this->addWriter($Writer);\n\t\t# Set Default\n\t\t$this->_Writer = $Writer;\n\t\t# Chain\n\t\treturn $this;\n\t}", "public function get_cell_renderer()\n {\n if (!isset($this->cell_renderer))\n {\n $classname = $this->get_class('CellRenderer');\n $this->cell_renderer = new $classname($this);\n }\n\n return $this->cell_renderer;\n }", "protected function _getOrderRenderer()\n {\n if (!$this->_renderer) {\n $version = explode('.', Mage::getVersion());\n if ( $version[0] == 1 && $version[1] <= 3 ) {\n $layout = Mage::app()->getLayout();\n } else {\n $layout = $this->getLayout();\n }\n $this->_renderer = $layout->createBlock(\n 'windsorcircle_export/adminhtml_form_field_order_options', '',\n array('is_render_to_js_template' => true)\n );\n $this->_renderer->setClass('order_options_value');\n $this->_renderer->setExtraParams('style=\"width:240px\"');\n }\n return $this->_renderer;\n }", "public function get_renderer(): Renderer {\n\t\t$story_attributes = $this->get_story_attributes();\n\t\t$view_type = ! empty( $story_attributes['view_type'] ) ? $story_attributes['view_type'] : '';\n\n\t\tswitch ( $view_type ) {\n\t\t\tcase 'carousel':\n\t\t\tcase 'circles':\n\t\t\t\t$renderer = new Carousel_Renderer( $this );\n\t\t\t\tbreak;\n\t\t\tcase 'list':\n\t\t\tcase 'grid':\n\t\t\tdefault:\n\t\t\t\t$renderer = new Generic_Renderer( $this );\n\t\t}\n\n\t\t$renderer->init();\n\n\t\treturn $renderer;\n\t}" ]
[ "0.69716287", "0.6956274", "0.6883525", "0.6857481", "0.685642", "0.6639942", "0.6611028", "0.6491866", "0.6436443", "0.6436443", "0.6436443", "0.63095975", "0.62928975", "0.6253273", "0.6185959", "0.6100381", "0.599394", "0.59250104", "0.5897861", "0.5843944", "0.58392763", "0.58387864", "0.580001", "0.57875746", "0.5612124", "0.5611366", "0.56061274", "0.55215967", "0.54276603", "0.5416436" ]
0.8499157
0
Set the PDO fetch mode
public function setFetchMode ($mode) { switch ($mode) { case PDO::FETCH_ASSOC: case PDO::FETCH_BOTH: case PDO::FETCH_NUM: case PDO::FETCH_BOUND: case PDO::FETCH_LAZY: case PDO::FETCH_NAMED: case PDO::FETCH_OBJ: $this->_fetchMode = $mode; break; default: require_once 'Taplod/Db/Adapter/Exception.php'; throw new Taplod_Db_Adapter_Exception('Invalid fetch mode \''.$mode.'\' specified'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFetchMode($mode)\n {\n //check for PDO extension\n if (!extension_loaded('pdo')) {\n throw new \\RuntimeException('The PDO extension is required for this adapter but the extension is not loaded');\n }\n switch ($mode) {\n case \\PDO::FETCH_LAZY:\n case \\PDO::FETCH_ASSOC:\n case \\PDO::FETCH_NUM:\n case \\PDO::FETCH_BOTH:\n case \\PDO::FETCH_NAMED:\n case \\PDO::FETCH_OBJ:\n $this->_fetchMode = $mode;\n break;\n default:\n throw new \\InvalidArgumentException(\"Invalid fetch mode '$mode' specified\");\n break;\n }\n }", "function select_data_modes(){\n /*\n These three which will cover most situations: FETCH_ASSOC, FETCH_CLASS, and FETCH_OBJ.\n */\n\n $STH->setFetchMode(PDO::FETCH_ASSOC);\n}", "protected function setPDOFetchMode()\n\t{\n\t\tif( $this->mDataSet instanceof PDOStatement )\n\t\t{\n\t\t\t$this->mDataSet->setFetchMode(\n\t\t\t\t\tPDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE,\n\t\t\t\t\t$this->mItemClass, $this->mItemClassArgs ) ;\n\t\t}\n\t\treturn $this ;\n\t}", "function setFetchMode($mode, $params=null) \n {\n $ret = call_user_func_array(array($this->statement, 'setFetchMode'), func_get_args());\n return $ret ? $this : $ret;\n }", "public function setFetchMode($mode) {\r\n\t\t$fetchModes = array(self::FETCH_ARRAY, self::FETCH_ASSOC, self::FETCH_STATEMENT, self::FETCH_SQL);\r\n\t\tif ($this->queryData['recordColumns'] === true) //only allow object fetching if we still get the columns for it.\r\n\t\t\t$fetchModes[] = self::FETCH_OBJ;\r\n\t\tif (in_array($mode, $fetchModes))\r\n\t\t\t$this->queryData['fetchMode'] = $mode;\r\n\t\treturn $this;\r\n\t}", "abstract public function setFetchMode($fetchMode);", "function fetchRow($mode = self::FETCH_ORDERED);", "public function setFetchMode($fetchMode)\n {\n $this->_fetchAll = null;\n switch ($fetchMode) {\n case \\PDO::FETCH_NUM :\n $this->_fetchMode = \\PDO::FETCH_NUM;\n break;\n case \\PDO::FETCH_ASSOC :\n $this->_fetchMode = \\PDO::FETCH_ASSOC;\n break;\n case \\PDO::FETCH_BOTH :\n $this->_fetchMode = \\PDO::FETCH_BOTH;\n break;\n case \\PDO::FETCH_OBJ :\n $this->_fetchMode = \\PDO::FETCH_OBJ;\n break;\n }\n }", "public function setFetchMode($fetchmode = null)\n {\n $fetchmode = isset($fetchmode)\n ? $fetchmode\n : $this->options['fetch_mode'];\n\n $this->stmt->setFetchMode($fetchmode);\n }", "public function setFetchMode($fetchMode, $fetchArg1=null, $fetchArg2=null);", "public function setFetchMode($mode, $a1 = NULL, $a2 = []);", "public function setfetchstyle($style = \\PDO::FETCH_BOTH) {\n\t\t$this->fetchstyle = $style;\n\t}", "public function setFetchMode($mode)\n {\n $params = func_get_args();\n call_user_func_array(array($this->result_id, 'setFetchMode'), $params);\n }", "public function setFetchMode($mode, $params = null)\r\n {\r\n $this->fetchMode = $mode;\r\n return true;\r\n }", "public function setFetchMode($fetchMode)\n {\n $this->defaultFetchMode = $fetchMode;\n }", "public function setFetchModeClass($class)\n {\n return $this->stmt->setFetchMode(\\PDO::FETCH_CLASS, $class);\n }", "public function setFetchMode($fetchMode)\n {\n $this->fetchMode = $fetchMode;\n }", "public function setFetchMode($fetchMode)\n {\n $this->doctrine->setFetchMode($fetchMode);\n }", "function execute($sql, $mode = ResultSet::FETCHMODE_NUM);", "public function fetch($mode = NULL, $cursor_orientation = NULL, $cursor_offset = NULL);", "public function fetch($fetch_style = PDO::FETCH_ASSOC) {\n return $this->pdoStatement->fetch($fetch_style);\n }", "public function setFetchMode($fetchMode)\n {\n $this->container ['config'] ['database.fetch'] = $fetchMode;\n return $this;\n }", "protected function setfetchmode($fetchmode)\n {\n $whereclause = \"shoptype = '{$this->type}' \";\n switch ($fetchmode) {\n case \"visible\":\n $whereclause .= \"and status!='invisible'\";\n break;\n case \"open\":\n $whereclause .= \"and status='open'\";\n break;\n default:\n $whereclause .= \"\";\n }\n // End of Switch Statement\n return $whereclause;\n }", "private function setFetchStyle()\n {\n $sql = $this->fetchStatements();\n\n return $this->query($sql, $this->bindings);\n }", "public function fetch($fetchMode=null, $fetchArgument=null, $ctorArgs=null);", "public function fetchAll($fetchStyle = 4);", "public function fetch($id = NULL ,$fetchMode = PDO::FETCH_BOTH) {\r\n\t\tif(is_null($id)) {\r\n\t\t\treturn $this->tbl->fetch();\r\n\t\t} else {\r\n\t\t\treturn $this->tbl->where('id='.$id)->fetch(NULL, $fetchMode);\r\n\t\t}\r\n\t}", "public function fetchArray($mode = false)\n {\n }", "function query($sql, $mode = ResultSet::FETCHMODE_NUM);", "public function fetch($fetchAs = 'both') {\n switch ($fetchAs) {\n case 'array':\n $fetchMode = PDO::FETCH_NUM;\n break;\n case 'assoc':\n $fetchMode = PDO::FETCH_ASSOC;\n break;\n case 'object':\n $fetchMode = PDO::FETCH_OBJ;\n break;\n default:\n $fetchMode = PDO::FETCH_BOTH;\n break;\n }\n return $this->pdoStmt->fetch($fetchMode);\n }" ]
[ "0.7896656", "0.7823743", "0.75789356", "0.75332344", "0.74383837", "0.7324653", "0.7283371", "0.7194554", "0.7118184", "0.7076811", "0.70651585", "0.7004711", "0.6818952", "0.6734596", "0.6670368", "0.6604174", "0.6580618", "0.65764743", "0.65519494", "0.65504354", "0.6529624", "0.6521309", "0.6476155", "0.64745104", "0.6423698", "0.6364863", "0.6362578", "0.63478476", "0.6336312", "0.6316656" ]
0.8130511
0
bool getPath(string $path, string &$val);
public function getPath($path, &$val) { return $this->http->GET($path, $val); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function path(/*# string */ $path)/*# : Path */;", "public function path($path = null);", "function path($val = '', $base = true)\n{\n if ($base) {\n return str_replace(\n array('//', '/', '\\\\', '\\\\\\\\'),\n array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR),\n dirname(__FILE__).DIRECTORY_SEPARATOR.$val\n );\n } else {\n return str_replace(\n array('//', '/', '\\\\', '\\\\\\\\'),\n array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR),\n $val\n );\n }\n}", "public function getRealPath(?string $path = null): bool|string;", "public function setPath($strVal)\r\n {\r\n\t\t$Result = $this->setData(PARAM_KERNEL_ROUTE_TAG_PATH, $strVal);\r\n\t\treturn $Result;\r\n }", "public function isPath();", "public function setPath($value) {\n return $this->set(self::PATH, $value);\n }", "public function path(string $path = null): string;", "public function setPath($val)\n {\n $this->_propDict[\"path\"] = $val;\n return $this;\n }", "function getPath();", "public function valueForPath(string $path);", "abstract function getPath():string ;", "public function path();", "public function path();", "abstract protected function getPath();", "public function getRealpath($path);", "function path() {\n\t}", "public function setPath($var) {}", "public function setPath($var) {}", "function set_path($path,$value)\n{\n return $GLOBALS[\"incair_paths\"][$path] = $value;\n}", "abstract public function getPath() : string;", "abstract public function getPath();", "abstract public function getPath();", "public function path(): PathContract;", "public function getPath() : string ;", "function path( $path = \"\" ) {\n return BASE_URL . $path;\n}", "function common_get_url_by_path($path) {\n\t\tr_file::unixslash($path);\n\n\t\t// Run through paths and swap if we can.\n\t\t$paths = \\_common_get_path_map();\n\t\tforeach ($paths as $k=>$v) {\n\t\t\t$k = \\preg_quote($k, '#');\n\t\t\tif (($result = \\preg_replace(\"#^{$k}#ui\", $v, $path)) !== $path) {\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function setPath($value)\n {\n $this->path = $value;\n }", "public function resultPathSet($path, $val) {\n $loc = &$this->result['list'];\n foreach (explode('.', $path) as $step) {\n if (!array_key_exists($step, $loc)) {\n $loc[$step] = array();\n }\n $loc = &$loc[$step];\n }\n return $loc = $val;\n }", "public function getPath($path) {\n\t\treturn $this->_path;\n\t}" ]
[ "0.68628466", "0.672903", "0.6727979", "0.6690371", "0.65329844", "0.65309244", "0.6431378", "0.6427895", "0.6414004", "0.6374212", "0.6335825", "0.62329835", "0.62080187", "0.62080187", "0.61973226", "0.619676", "0.6172788", "0.61291105", "0.61291105", "0.612885", "0.6116221", "0.60775834", "0.60775834", "0.60575444", "0.6049214", "0.6033786", "0.60207754", "0.6015857", "0.6009343", "0.5997956" ]
0.76270574
0
bool getScript(string $script, string $key, string &$val);
public function getScript($script, $key, &$val) { return $this->getPath($script . "/" . $key, $val); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getScript($script, $key, &$val)\n\t{\n\t\t// get cache\n\t\t$cache = $this->cacheFromKey($key);\n\t\tif ($cache === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// run\n\t\tif (!$cache->getScript($script, $key, $val)) {\n\t\t\t$this->setErrorCache($cache);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function get($key, &$val)\n\t{\n\t\treturn $this->getScript(self::PATH_MCACHE, $key, $val);\n\t}", "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\t$host = $this->hostFromKey($key);\n\t\tarray_push($keyArr[$host], $key);\n\n\t\t$result = false;\n\n\t\t// process testScriptPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$ret;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->testScriptPut($script, $key, $ret);\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t$result;\n\n\t\t$param = \"/\" . $key;\n\n\t\t$path = $script . $param;\n\t\t$jsonKey = json_encode($key);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "abstract public function getScript();", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptGet($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "function getValue($key) {\n global $params;\n\tif (isset($params[$key])) return $params[$key];\n\telse return \"\";\n }", "function getValue($key) {\n global $params;\n\tif (isset($params[$key])) return $params[$key];\n\telse return \"\";\n }", "function get( $key );", "public function getValue(string $key);", "public function TryGetByKey($key, &$value);", "function get($key);", "function get($key);", "public function getScript();", "public function get($key, &$val)\n\t{\n\t\t// get cache\n\t\t$cache = $this->cacheFromKey($key);\n\t\tif ($cache === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// run\n\t\tif (!$cache->get($key, $val)) {\n\t\t\t$this->setErrorCache($cache);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function get_key_value($string, $key) {\n $list = explode( '&', $string);\n foreach ($list as $pair) {\n \t$item = explode( '=', $pair);\n\t\tif (strtolower($key) == strtolower($item[0])) {\n\t\t\treturn urldecode($item[1]); // not for use in $_GET etc, which is already decoded, however our encoder uses http_build_query() before encrypting\n\t\t}\n }\n return \"\";\n}", "public static function getVal($key) {\n $value = false;\n if(isset($_GET[$key])) {\n $value = strip_tags($_GET[$key]);\n $value = preg_replace('/[<>\\\\\\\\\\/]/', '', $value);\n }\n return $value;\n }", "public function getScriptingParameter($key, $default = null)\n\t{\n\t\t$configuration = Factory::getConfiguration();\n\n\t\tif (is_null($this->activeType))\n\t\t{\n\t\t\t$this->activeType = $configuration->get('akeeba.basic.backup_type', 'full');\n\t\t}\n\n\t\treturn $configuration->get('volatile.scripting.' . $this->activeType . '.' . $key, $default);\n\t}", "public function tryGet($key, &$value) : bool;", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "abstract public function get(string $key);", "function vars_get($url) {\n\tlist($url_script, $hash_get) = explode('?', $url);\n\t\n\tif ( !empty($hash_get) ) return '?'.$hash_get;\n}", "function get($hash);", "public function get(/*# string */ $key);", "function processURLScript($script, $url) {\n try {\n $tokenValues = processTokens($script);\n foreach ($tokenValues as $tokenKey => $tokenValue) {\n $url = str_replace($tokenKey, $tokenValue, $url);\n }\n }catch (Exception $e) {\n logOutput(\"[ERROR] [processURLScript] \" . $e->getMessage());\n }\n\n return $url;\n}", "function get($key = null, $val = null) {\n\t\tif (!is_null($val)) {\n\t\t\t$_GET[$key] = $val;\n\t\t}\n\t\tif (DEBUG_MODE && function_exists('debug')) {\n\t\t\tdebug('input_'.__FUNCTION__.'[]', array(\n\t\t\t\t'name'\t=> $key,\n\t\t\t\t'val'\t=> $val,\n\t\t\t\t'op'\t=> $val !== null ? 'set' : 'get',\n\t\t\t\t'trace'\t=> main()->trace_string(),\n\t\t\t));\n\t\t}\n\t\treturn $key === null ? $_GET : $_GET[$key];\n\t}", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);" ]
[ "0.790006", "0.62565935", "0.6100682", "0.6007084", "0.57941425", "0.5751082", "0.5589478", "0.5589478", "0.5543296", "0.546166", "0.54536396", "0.53995997", "0.53995997", "0.5374959", "0.53515965", "0.532242", "0.5301621", "0.52715987", "0.52551585", "0.5194702", "0.5179057", "0.51787984", "0.5174241", "0.5171266", "0.51679826", "0.51585186", "0.5154437", "0.5154437", "0.5154437", "0.5154437" ]
0.82880604
0
bool eraseScript(string $script, string $key);
public function eraseScript($script, $key) { return $this->erasePath($script . "/" . $key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function eraseScript($script, $key)\n\t{\n\t\t// get cache\n\t\t$cache = $this->cacheFromKey($key);\n\t\tif ($cache === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// run\n\t\tif (!$cache->eraseScript($script, $key)) {\n\t\t\t$this->setErrorCache($cache);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function remove(string $key);", "public function remove(string $key);", "public function del(string $key);", "abstract public function remove(string $key): bool;", "function delete($key);", "public function del($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove(string $key): bool;", "public function remove(string $key): bool;", "public function erase(string $key): void\n\t{\n\t\tif (isset($this->vars[$key])) {\n\t\t\tunset($this->vars[$key]);\n\t\t}\n\t\t\n\t\tArr::erase($this->vars, $key);\n\t}", "abstract public function remove($key);", "public function remove( $secretId, $key );", "public function deleteKey($key);", "public function delete($key = '');" ]
[ "0.8059755", "0.6094982", "0.6094982", "0.59761345", "0.59596145", "0.59589744", "0.5936518", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.58783954", "0.58783954", "0.58687687", "0.5866854", "0.586155", "0.5833632", "0.58308667" ]
0.8821577
0
bool multiPut(array $keyList, array $valList [, int $exp = 0]);
public function multiPut($keyList, $valList, $exp = 0) { if (count($keyList) != count($valList)) return false; $data = array_combine($keyList, $valList); $result; $param = "?command=put"; if ($exp > 0) { $param .= "&expire=" . $exp; } $path = self::PATH_MULTI . $param; $jsonData = json_encode($data); return $this->http->POST($path, $jsonData, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\t$valArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t\t$valArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t\tarray_push($valArr[$host], $valList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$result |= $simpleCache->multiPut($keyArr[$host], $valArr[$host], $ext);\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function setMultiple($key);", "public function putAll($key, array $values);", "public function multiGet($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiGet($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiGet($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function MultiSet(array $val): bool\n {\n static::init();\n return static::$handler->MSet(static::$token, $val);\n }", "protected static function setMultiple(array &$arr, array $keyvals)\n {\n foreach ($keyvals as $key => $value) {\n static::set($arr, $key, $value);\n }\n }", "public function setMultiple(array $values, $category = '', $expire_time = NULL) { \r\n if(!empty($values)) {\r\n if(!isset($category)) {\r\n $category = '';\r\n }\r\n \r\n $expires = $this->getExpiresTimestamp($expire_time);\r\n \r\n $keys = array();\r\n $records_to_insert = array();\r\n \r\n foreach($values as $key => $value) {\r\n $keys[] = $key;\r\n \r\n $records_to_insert[] = array(\r\n 'category' => $category,\r\n 'key' => $key,\r\n 'value' => $value,\r\n 'expires' => $expires\r\n );\r\n }\r\n \r\n $delete_placeholder_values = array(\r\n $category\r\n );\r\n \r\n $database_driver_name = $this->connection_object->getDriverName();\r\n \r\n $delete_key_placeholder = '';\r\n \r\n if($database_driver_name == 'pgsql') {\r\n $delete_key_placeholder = '= ANY(?::varchar[])';\r\n \r\n $delete_placeholder_values[] = \"{\" . implode(\",\", $keys) . \"}\";\r\n }\r\n else {\r\n $delete_key_placeholder = QueryGenerator::getInStatement(count($keys));\r\n \r\n $delete_placeholder_values = array_merge($delete_placeholder_values, $keys);\r\n }\r\n \r\n if(!$this->in_transaction) {\r\n $this->connection_object->beginTransaction();\r\n }\r\n \r\n $this->connection_object->query(\"\r\n DELETE FROM cms_cache\r\n WHERE category = ?\r\n AND key {$delete_key_placeholder}\r\n \", $delete_placeholder_values);\r\n \r\n $this->connection_object->insertMulti('cms_cache', $records_to_insert);\r\n \r\n if(!$this->in_transaction) {\r\n $this->connection_object->commit();\r\n }\r\n }\r\n }", "public function setMulti($items, $lifetime = null) {\n if ($this->enabled) {\n $result = false;\n\n // Converts the keys to valid memcached keys. This is very important since certain characters\n // such as spaces will hang the PHP client!!! :O\n $tmp_items = array();\n foreach ($items as $key => $value) {\n $key = preg_replace(\"/[^A-Za-z0-9]/\", \"\", $key);\n if (!empty($key)) {\n $tmp_items[$key] = $value;\n }\n }\n\n // Now store the items\n if (count($tmp_items) > 0) {\n if (isset($lifetime)) {\n $result = $this->memcached->setMulti($tmp_items, time() + $lifetime);\n } else {\n $result = $this->memcached->setMulti($tmp_items, time() + $this->lifetime);\n }\n }\n\n return $result;\n } else {\n return true;\n }\n }", "public function putMany(array $values){}", "public function setMultiple(array $items, $expire = 0);", "public function putAll(array $values);", "public function multiDel($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiDel($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function setMultiple($values, $ttl = null)\n {\n if (!($values instanceof \\Traversable || is_array($values))) {\n throw new InvalidArgumentException(\"Keys must be an array or implement Traversable\");\n }\n $ok = true;\n foreach ($values as $key => $value) {\n $ok = $ok && $this->set($key, $value, $ttl);\n }\n return $ok;\n }", "public function setMultiple($values, $ttl = null)\n {\n foreach ($values as $k => $v) {\n $this->set($k, $v, $ttl);\n }\n\n return true;\n }", "public function setMultiple($values, $ttl = null);", "public function setMultiple($values, $ttl = null)\n {\n }", "public function setMultiple($values, $ttl = null)\n {\n }", "public function putMany(array $values, $seconds)\n {\n foreach ($values as $key => $value) {\n $this->put($key, $value, $seconds);\n }\n\n // TODO Use BatchWriteItem. Blocked by https://github.com/async-aws/aws/issues/566\n return true;\n }", "public function put($key, $val, $exp = 0, $charset = NULL)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\t\tif ($charset != NULL) {\n\t\t\t$param .= \"&charset=\" . $charset;\n\t\t}\n\n\t\t$path = self::PATH_MCACHE . \"/\" . $key . $param;\n\t\treturn $this->http->POST($path, $val, $result);\n\t}", "public function setMultiple($values, $ttl = null)\n {\n if (!is_iterable($values)) {\n throw new Exception('Data is neither an array nor a Traversable');\n }\n\n if ($ttl instanceof DateInterval) {\n $ttl = (new DateTime())->add($ttl)->getTimestamp() - time();\n }\n\n $arrayValues = [];\n\n foreach ($values as $key => $value) {\n $this->validateKey($key);\n $arrayValues[$key] = $this->serializer->serialize($value);\n }\n\n if (!$this->redisClient->mset($arrayValues)) {\n return false;\n }\n\n if (is_int($ttl) && $ttl >= 0) {\n $result = 1;\n\n foreach (array_keys($arrayValues) as $key) {\n $result &= $this->redisClient->expire((string) $key, $ttl) === true;\n }\n\n return $result === 1;\n }\n\n return true;\n }", "public function setKeyList($keyList) {\n if (!$this->mc->set('SMS_KEYLIST', $keyList, 0))\n $this->fatalErrorPage('unable to set memcached'); \n }", "function set( $k, $v, $exp = NULL )\n {\n global $cache, $gc;\n\n if ( strlen( $k ) > 16 ) { return; }\n if ( strlen( $v ) > 255 ) { return; }\n if ( is_numeric($v) ) $v = (int)$v;\n \n if ( ! is_string($k) ) {\n echo 'KEY MUST BE A STRING';\n return;\n }\n\n if ( check_array_size( $v ) ) \n {\n try {\n $cache[$k] = $v;\n if( $exp != NULL ) $gc[$k]['expires'] = date( \"m/d/Y h:i:s a\", time() + $exp );\n \n echo 'STORED' . \"\\n\";\n } catch ( Exception $e ) {\n echo 'An exception occurred: ', $e->getMessage(), \"\\n\";\n }\n }\n else\n {\n echo 'ERROR --CACHE FULL';\n }\n }", "public function putMany(array $values, $minutes){\r\n\r\n\t\t$time = $this->toTime($minutes);\r\n\r\n\t\tforeach ($values as $key => $value) {\r\n\t\t\t$this->calypte->put($this->prefix.$key, $value, $time);\r\n\t\t}\r\n\r\n\t}", "function updateData($data = array(), $keys = array(), $multi_rows = false, $quote = true)\n\t{\n\t\tforeach ($keys as $key)\n\t\t{\n\t\t\t$ustr[] = '`'.$key.'`=VALUES(`'.$key.'`)';\n\t\t}\n\n\t\tif($multi_rows)\n\t\t{\n\t\t\t// rows > 1\n\n\t\t\tif($quote)\n\t\t\t{\n\t\t\t\t$values = '(\\''.implode(\"','\",$data[0]).'\\')';\n\t\t\t\t$cnt = sizeof($data);\n\t\t\t\tfor($i=1; $i<$cnt; $i++)\n\t\t\t\t{\n\t\t\t\t\t$values .= ', ('.hcms_array_to_query($data[$i]).')';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$values = '('.implode(',',$data[0]).')';\n\t\t\t\t$cnt = sizeof($data);\n\t\t\t\tfor($i=1; $i<$cnt; $i++)\n\t\t\t\t{\n\t\t\t\t\t$values .= ', ('.implode(',',$data[$i]).')';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//\t\t\thcms_debug(\"INSERT INTO $this->table VALUES $values\".' ON DUPLICATE KEY UPDATE '.implode(', ',$ustr).';');\n\t\t\treturn $this->db->ExecuteNonQuery(\"INSERT INTO $this->table VALUES $values\".' ON DUPLICATE KEY UPDATE '.implode(', ',$ustr).';');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->db->ExecuteNonQuery(\"INSERT INTO $this->table VALUES ('\".implode(\"','\",$data).'\\') ON DUPLICATE KEY UPDATE '.implode(', ',$ustr).';');\n\t\t}\n\t}", "public function test_add_by_key_array() {\n\t\t$key = microtime();\n\t\t$value = array( 5, 'value' );\n\t\t$server_key_real = 'doughty';\n\n\t\t// Add array to memcached\n\t\t$this->assertTrue( $this->object_cache->addByKey( $server_key_real, $key, $value ) );\n\n\t\t// Verify correct value/type is returned\n\t\t$this->assertSame( $value, $this->object_cache->getByKey( $server_key_real, $key ) );\n\t}", "public function setMulti(array $value_arr)\n {\n foreach ($value_arr AS $key => $value) {\n $this->set($key, $value);\n }\n }", "public function hasMultiple($key);", "public function putMany(array $values, $seconds)\n {\n }" ]
[ "0.86076033", "0.6637326", "0.6567546", "0.61579895", "0.60552466", "0.59578013", "0.59419054", "0.59269404", "0.59037", "0.5881472", "0.5879759", "0.58140415", "0.57968885", "0.5744908", "0.574445", "0.57037044", "0.56590533", "0.5615185", "0.5615185", "0.5597402", "0.5560423", "0.5550725", "0.55450076", "0.5530848", "0.5516021", "0.5486113", "0.5458488", "0.54385644", "0.5428901", "0.5413803" ]
0.90373665
0
bool multiGet(array $keyList, array &$retList); retList : array ( key1 => value1, key2 => value2 ... )
public function multiGet($keyList, &$retList) { $result; $param = "?command=get"; $path = self::PATH_MULTI . $param; $jsonKey = json_encode($keyList); $r = $this->http->POST($path, $jsonKey, $result); if ($r) { $retList = json_decode($result); } return $r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function multiGet($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiGet($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getMultiple($key);", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptGet($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiDel($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getMultiple($keys, $default = null);", "public function multiDel($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function getMultiple(array $keys, array &$tokens = null);", "public function getMulti(array $key_arr)\n {\n $value_arr = array();\n foreach ($key_arr AS $key) {\n $value_arr[$key] = $this->get($key);\n }\n return $value_arr;\n }", "function wp_cache_get_multiple( $keys, $group = '', $force = false ) {\n\t\t$values = array();\n\n\t\tforeach ( $keys as $key ) {\n\t\t\t$values[ $key ] = wp_cache_get( $key, $group, $force );\n\t\t}\n\n\t\treturn $values;\n\t}", "public function getMultiple($keys, $default = null)\n {\n }", "public function getMultiple($keys, $default = null)\n {\n }", "#[Deprecated(replacement: '%class%->mGet(%parametersList%)')]\n public function getMultiple(array $keys) {}", "function get_list(array $keys, $cas_tokens = NULL, $flags = NULL)\n\t{\n\t\tif ($this->ignore_connection_failures && ! $this->memcache)\n\t\t{\n\t\t\treturn $this->default_failed_return;\n\t\t}\n\n\t\t$internal_cache_results = array();\n\t\t$get_results = array();\n\t\t$remaining_keys = $keys;\n\n\t\tif ($this->use_internal_cache)\n\t\t{\n\t\t\tforeach ($keys as $i => $key)\n\t\t\t{\n\t\t\t\tif (array_key_exists($key, $this->cached))\n\t\t\t\t{\n\t\t\t\t\tunset($remaining_keys[$i]);\n\t\t\t\t\t$internal_cache_results[$key] = $this->cached[$key];\n\n\t\t\t\t\t$this->hit_counters['internal_hit']++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->command_counters['get_list']++;\n\n\t\tif ($this->library == 'memcache')\n\t\t{\n\t\t\t$get_results = $this->memcache->get($remaining_keys);\n\t\t}\n\n\t\tif ($this->library == 'memcached')\n\t\t{\n\t\t\t$get_results = $this->memcache->getMulti($remaining_keys, $cas_tokens, $flags);\n\t\t}\n\n\t\t$result = array_merge($internal_cache_results, (array)$get_results);\n\n\t\tforeach ((array)$remaining_keys as $i => $remaining_key)\n\t\t{\n\t\t\tif (! isset($result[$remaining_key]))\n\t\t\t{\n\t\t\t\t$this->cached[$remaining_key] = $this->default_failed_return;\n\n\t\t\t\t$this->hit_counters['miss']++;\n\t\t\t}\n\t\t}\n\n\t\tforeach ((array)$get_results as $get_result_key => $get_result_value)\n\t\t{\n\t\t\t// Empty key shows up sometimes\n\t\t\tif ($get_result_key)\n\t\t\t{\n\t\t\t\t$this->cached[$get_result_key] = $get_result_value;\n\t\t\t}\n\t\t}\n\n\t\t$this->hit_counters['hit'] += count($get_results);\n\t\t\n\t\treturn $result;\n\t}", "public function getMultiple(array $keys, $category = '') { \r\n $values = array();\r\n \r\n if(!empty($keys)) {\r\n if(!isset($category)) {\r\n $category = '';\r\n }\r\n \r\n $placeholder_values = array(\r\n $category\r\n );\r\n \r\n $database_driver_name = $this->connection_object->getDriverName();\r\n\r\n $key_placeholder = '';\r\n \r\n if($database_driver_name == 'pgsql') {\r\n $key_placeholder = '= ANY(?::varchar[])';\r\n \r\n $placeholder_values[] = \"{\" . implode(\",\", $keys) . \"}\";\r\n }\r\n else {\r\n $key_placeholder = QueryGenerator::getInStatement(count($keys));\r\n \r\n $placeholder_values = array_merge($placeholder_values, $keys);\r\n }\r\n \r\n $placeholder_values[] = date('Y-m-d H:i:s');\r\n \r\n if(!$this->in_transaction) {\r\n $this->connection_object->beginTransaction();\r\n }\r\n \r\n $values = $this->connection_object->getMappedColumn(\"\r\n SELECT \r\n key,\r\n value\r\n FROM cms_cache\r\n WHERE category = ?\r\n AND key {$key_placeholder}\r\n AND (\r\n expires IS NULL\r\n OR expires > ?\r\n )\r\n \", $placeholder_values);\r\n \r\n if(!$this->in_transaction) {\r\n $this->connection_object->commit();\r\n }\r\n }\r\n \r\n return $values;\r\n }", "public function get (string ...$keys);", "public static function getMulti($keys, $localCacheTag = self::FLAG_USE_LOCAL_CACHE)\n {\n $list = array();\n $unHitKeys = array();\n $useLocalCache = $localCacheTag & self::MASK_USE_LOCAL_CACHE;\n $onlyLocalCache = $localCacheTag & self::MASK_ONLY_LOCAL_CACHE;\n if ($useLocalCache)\n {\n foreach ($keys as $key)\n {\n if (isset(self::$cacheList[$key]))\n {\n $list[$key] = self::$cacheList[$key];\n }\n else\n {\n $unHitKeys[] = $key;\n }\n }\n }\n else\n {\n $unHitKeys = $keys;\n }\n\n if ($onlyLocalCache)\n {\n return $list;\n }\n\n if (!empty($unHitKeys))\n {\n $cacheList = self::getCacheProxy()->getMulti($unHitKeys);\n $list = $list + $cacheList;\n\n if ($useLocalCache && is_array($cacheList))\n {\n foreach ($cacheList as $key => $item)\n {\n self::$cacheList[$key] = $item;\n }\n }\n }\n\n return $list;\n }", "public function getKeyValueAll($key,$value);", "public static function getMultiObj($keys, $localCacheTag = self::FLAG_USE_LOCAL_CACHE, $onToLocalFn = null)\n {\n $useLocalCache = $localCacheTag & self::MASK_USE_LOCAL_CACHE;\n $onlyLocalCache = $localCacheTag & self::MASK_ONLY_LOCAL_CACHE;\n if (!MCore_Tool_Env::isProd())\n {\n MCore_Tool_Log::addDebugLog('cache', 'getMultiObj: ' . implode(',', $keys));\n }\n $list = array();\n $unHitKeys = array();\n if ($useLocalCache)\n {\n foreach ($keys as $key)\n {\n if (isset(self::$cacheList[$key]))\n {\n $list[$key] = self::$cacheList[$key];\n }\n else\n {\n $unHitKeys[] = $key;\n }\n }\n }\n else\n {\n $unHitKeys = $keys;\n }\n\n if ($onlyLocalCache)\n {\n return $list;\n }\n\n if (!empty($unHitKeys))\n {\n $cacheList = self::getCacheProxy()->getMultiObj($unHitKeys);\n if (is_array($cacheList) && !empty($cacheList))\n {\n foreach ($cacheList as $key => $item)\n {\n if ($useLocalCache)\n {\n if ($onToLocalFn)\n {\n $item = call_user_func($onToLocalFn, $key, $item);\n if ($item === false)\n {\n continue;\n }\n }\n self::$cacheList[$key] = $item;\n }\n $list[$key] = $item;\n }\n }\n }\n\n // reset order\n $ret = array();\n foreach ($keys as $key)\n {\n if (isset($list[$key]))\n {\n $ret[$key] = $list[$key];\n }\n }\n return $ret;\n }", "public function getMultiple($keys, $default = null)\n {\n $return = [];\n foreach ($keys as $k) {\n $return[$k] = $this->get($k, $default);\n }\n\n return $return;\n }", "function get_list( $keys, $array ){\n\treturn array_values( parse_args((array)$keys, $array) );\n}", "function get_list( $keys, $array ){\n\treturn array_values( parse_args((array)$keys, $array) );\n}", "abstract protected function _get($keys);", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptDel($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getMultiple($keys, $default = null)\n {\n if (!is_iterable($keys)) {\n throw new Exception('Keys is neither an array nor a Traversable');\n }\n\n $validKeys = [];\n\n foreach ($keys as $key) {\n $this->validateKey($key);\n $validKeys[] = $key;\n }\n\n $results = $this->redisClient->mget($validKeys);\n\n foreach ($results as $index => $result) {\n unset($results[$index]);\n\n if (!is_string($result)) {\n $results[$validKeys[$index]] = $default;\n continue;\n }\n\n $results[$validKeys[$index]] = $this->serializer->deserialize($result);\n }\n\n return $results;\n }", "public function hasMultiple($key);", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\t$valArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t\t$valArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t\tarray_push($valArr[$host], $valList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$result |= $simpleCache->multiPut($keyArr[$host], $valArr[$host], $ext);\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t$data = array_combine($keyList, $valList);\n\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonData = json_encode($data);\n\t\treturn $this->http->POST($path, $jsonData, $result);\n\t}", "function getListing($multi, $field)\n{\n\t$listing = array( );\t\n\tforeach ($multi as $key=>$value){\n\t\t$temp = $value[$field];\n\t\t$listing[$key] = $temp;}\n\treturn $listing;\n}", "public function getMany(array $keys): mixed;" ]
[ "0.8537086", "0.7497922", "0.72652936", "0.72291225", "0.68314415", "0.67961115", "0.675803", "0.6689168", "0.66883653", "0.66826814", "0.6552993", "0.6552993", "0.6361144", "0.6256549", "0.60918057", "0.6045991", "0.6027965", "0.601038", "0.599359", "0.595385", "0.5944586", "0.5944586", "0.59329545", "0.592693", "0.59234273", "0.5909477", "0.5905825", "0.58788306", "0.58721524", "0.5860985" ]
0.867539
0
bool multiDel(array $keyList, array &$retList); retList : array ( key1 => t/f, key2 => t/f ...)
public function multiDel($keyList, &$retList) { $result; $param = "?command=del"; $path = self::PATH_MULTI . $param; $jsonKey = json_encode($keyList); $r = $this->http->POST($path, $jsonKey, $result); if ($r) { $retList = json_decode($result); } return $r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function multiDel($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiDel($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function delMultiple($key);", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptDel($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function deleteMultiple($keys);", "public function deleteMulti(array $keys);", "public function deleteMultiple($keys)\n {\n }", "public function deleteMultiple(array $keys);", "public function xDel($key, $ids) {}", "public function deleteMultiple(array $keys) {\n // have to flip it and flip it back.\n $changedKeys = array_flip($this->changeKeys(array_flip($keys)));\n return $this->backend->deleteMultiple($changedKeys);\n }", "public function multiGet($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "function wp_cache_delete_multiple( array $keys, $group = '' ) {\n\t\t$values = array();\n\n\t\tforeach ( $keys as $key ) {\n\t\t\t$values[ $key ] = wp_cache_delete( $key, $group );\n\t\t}\n\n\t\treturn $values;\n\t}", "public function deleteMulti($keys) {\n\t\treturn $this->obj->delete($keys) > 0;\n\t}", "public function deleteItems($delList){\n \ttry {\n \t\t$arrDelete = explode(',', $delList);\n \t\tforeach ($arrDelete as $key=>$value) {\n \t\t\t$where = array('md5(client_id) = ?' => $this->_CommonController->decodeKey($value));\n \t\t\t$this->delete($where);\n \t\t}\n \t} catch (Exception $e) {\n \t\t// pass possible exceptions to log file\n \t$this->_CommonController->writeLog($e->getMessage());\n \t}\n }", "public function multiGet($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiGet($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function deleteMultiple($keys)\n {\n return (bool)$this->deleteItems($keys);\n }", "public static function delete_multi($pool, array $keys){\n if ($keys) {\n foreach ($keys as $key) {\n if (array_key_exists($key, self::$local)) {\n unset(self::$local[$key]);\n }\n }\n }\n }", "public function deleteMultiple($keys)\n {\n foreach ($keys as $k) {\n $this->delete($k);\n }\n\n return true;\n }", "function lingotek_keystore_delete_multiple($entity_type, $entity_ids, $lingokey, $condition = '=') {\n if (!is_array($entity_ids)) {\n $entity_ids = array($entity_ids);\n }\n\n $query = db_select('lingotek_entity_metadata', 'l') // Make sure that the variable exists in the table for every input nid\n ->fields('l', array('entity_id'))\n ->condition('entity_type', $entity_type)\n ->condition('entity_id', $entity_ids, 'IN')\n ->condition('entity_key', $lingokey, $condition);\n $delete_nids = $query->execute()->fetchCol();\n\n if (!empty($delete_nids)) {\n $delete = db_delete('lingotek_entity_metadata') // delete for every input nid where the variable exists\n ->condition('entity_type', $entity_type)\n ->condition('entity_id', $delete_nids, 'IN')\n ->condition('entity_key', $lingokey, $condition)\n ->execute();\n }\n}", "function doubleExplode ($del1, $del2, $keyvalue) {\n return Tools::doubleExplode($del1, $del2, $keyvalue);\n}", "function delete_list($item_kit_ids)\n\t{\n\t\t$this->db->where_in('item_kit_id',$item_kit_ids);\n\t\treturn $this->db->update('item_kits', array('deleted' => 1));\n \t}", "public function deleteMultiple($keys)\n {\n if (!($keys instanceof \\Traversable || is_array($keys))) {\n throw new InvalidArgumentException(\"Keys must be an array or implement Traversable\");\n }\n $ok = true;\n foreach ($keys as $key) {\n $ok = $ok && $this->delete($key);\n }\n return $ok;\n }", "public function deleteItem(...$keys): void;", "public static function deleteRecords($recordIdsList = array()) {\n\t\tif ($recordIdsList) {\n\t\t\t$db = PearDatabase::getInstance();\n\t\t\t$query = 'DELETE FROM vtiger_joomla_fieldmaps WHERE id IN (' . generateQuestionMarks($recordIdsList). ')';\n\t\t\t$db->pquery($query, $recordIdsList);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function deleteMultiple($keys)\n {\n /** @var \\Illuminate\\Cache\\Repository $instance */\n return $instance->deleteMultiple($keys);\n }", "public function deleteMultiple($keys)\n {\n if (!is_iterable($keys)) {\n throw new Exception('Keys is neither an array nor a Traversable');\n }\n\n foreach ($keys as $key) {\n $this->validateKey($key);\n }\n\n return (bool) $this->redisClient->del(...$keys);\n }", "public function deleteMultiple(array $ids = []);", "public function deleteMultiple(array $ids = []);", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t$data = array_combine($keyList, $valList);\n\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonData = json_encode($data);\n\t\treturn $this->http->POST($path, $jsonData, $result);\n\t}", "public function deleteListRecord(array $pks) {\n $pks = $this->trigger('beforeDeleteCallbacks', $pks);\n $this->getQueryBuilder()->in($this->primaryKey, $pks)\n ->from($this->table); \n $result = $this->deleteRecords();\n $this->trigger('afterDeleteCallbacks', $result);\n return $result;\n }" ]
[ "0.8560465", "0.76747423", "0.74692553", "0.73548204", "0.7199618", "0.7183386", "0.70286745", "0.6918267", "0.6876141", "0.67862207", "0.6779628", "0.6692892", "0.6513692", "0.64941263", "0.6440724", "0.6367018", "0.61987346", "0.6147643", "0.6113994", "0.5981274", "0.5876281", "0.583053", "0.58016574", "0.57973903", "0.5789056", "0.5783261", "0.575536", "0.575536", "0.57342094", "0.57260466" ]
0.88202447
0
bool testScriptPut(string $script, string $key, string &$ret); Only for test !
public function testScriptPut($script, $key, &$ret) { $result; $param = "/" . $key; $path = $script . $param; $jsonKey = json_encode($key); $r = $this->http->POST($path, $jsonKey, $result); if ($r) { $retList = json_decode($result); } return $r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\t$host = $this->hostFromKey($key);\n\t\tarray_push($keyArr[$host], $key);\n\n\t\t$result = false;\n\n\t\t// process testScriptPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$ret;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->testScriptPut($script, $key, $ret);\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "function PUT($key, $input){\n return \"0\";\n }", "public function getScript($script, $key, &$val)\n\t{\n\t\t// get cache\n\t\t$cache = $this->cacheFromKey($key);\n\t\tif ($cache === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// run\n\t\tif (!$cache->getScript($script, $key, $val)) {\n\t\t\t$this->setErrorCache($cache);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function processPut() {\r\n\t\treturn false;\r\n\t}", "public function testKycChecksPut()\n {\n }", "public function testPut()\n\t{\n\t\t$this->assertFalse($this->cache->put('key', 'value', 15));\n\t}", "public function eraseScript($script, $key)\n\t{\n\t\t// get cache\n\t\t$cache = $this->cacheFromKey($key);\n\t\tif ($cache === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// run\n\t\tif (!$cache->eraseScript($script, $key)) {\n\t\t\t$this->setErrorCache($cache);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptGet($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function testGetAndPut()\n {\n $key = rand(0, 1000);\n\n // Test the /memcached REST API.\n $this->put(\"/memcached/test$key\", \"sour\");\n $this->assertEquals(\"sour\", $this->get(\"/memcached/test$key\"));\n $this->put(\"/memcached/test$key\", \"sweet\");\n $this->assertEquals(\"sweet\", $this->get(\"/memcached/test$key\"));\n }", "public function getScript($script, $key, &$val)\n\t{\n\t\treturn $this->getPath($script . \"/\" . $key, $val);\n\t}", "function runTest($test, $cache) {\n\t$diff = $test($cache);\n\n\tif ( !$diff ) {\n\t\techo \"ok\\n\";\n\t} else {\n\t\techo \"Unexpected output:\\n $diff\\n\";\n\t}\n}", "public function testSuccess()\n {\n // Test data\n $testAnalyticScriptData = [\n 'analytic_script' => '<script></script>',\n ];\n\n $params = [\n 'index' => $this->projectIndex,\n 'type' => ElasticSearchConstantBag::TYPE_ANALYTIC_SCRIPT,\n 'id' => ElasticSearchConstantBag::ID_ANALYTIC_SCRIPT,\n 'body' => $testAnalyticScriptData,\n ];\n \n // Mocking\n $this->elasticSearchIndexManager\n ->expects($this->once())\n ->method('getClient')\n ->willReturn($this->clientMock);\n \n $this->clientMock\n ->expects($this->once())\n ->method('index')\n ->with($params)\n ->willReturn($testAnalyticScriptData);\n \n //Execution\n $methodResult = $this->elasticSearchIndexManager->addAnalyticScriptToIndex($testAnalyticScriptData);\n \n // Asserting\n $this->assertEquals($testAnalyticScriptData, $methodResult);\n }", "public function pput() {\n\t\t$args = func_get_args();\n\t\t$str = array_shift($args);\n\t\treturn $this->put(vsprintf($str, $args));\n\t}", "public function eraseScript($script, $key)\n\t{\n\t\treturn $this->erasePath($script . \"/\" . $key);\n\t}", "public function test_add_by_key_string() {\n\t\t$key = microtime();\n\t\t$value = 'kovalchuk';\n\t\t$server_key_real = 'doughty';\n\n\t\t// Add string to memcached\n\t\t$this->assertTrue( $this->object_cache->addByKey( $server_key_real, $key, $value ) );\n\n\t\t// Verify correct value/type is returned\n\t\t$this->assertSame( $value, $this->object_cache->getByKey( $server_key_real, $key ) );\n\t}", "public function testGetScriptPath()\n {\n }", "public function testPut3()\n {\n // put\n $this->assertTrue($this->object->put('/b1/b2', 'wow'));\n\n // overwrite existing dir, failed\n $this->assertFalse($this->object->put('/b1', 'xxx'));\n\n $this->assertTrue($this->object->del('/b1'));\n }", "function paramPut($key) {\n\tglobal $app;\n\treturn $app->request()->put($key);\n}", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptDel($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function testHttpPutPersistenceItemData()\n {\n }", "public function testPutFileSuccess ()\n {\n $datanodeUrl = 'http://example.com/'. self::REMOTE_FILE;\n $response = $this->getWebResponse('putFile_success');\n\n $fs = $this->getMock('\\\\Hdfs\\\\FilesystemWrapper');\n $fs->method('isExists')->with(self::LOCAL_FILE)->will($this->returnValue(true));\n $fs->method('isReadable')->with(self::LOCAL_FILE)->will($this->returnValue(true));\n\n $web = $this->getMock('\\\\Hdfs\\\\Web\\\\WebHdfsWrapper');\n $web->expects($this->once())\n ->method('getDatanodeUrl')\n ->with(Method::PUT, self::REMOTE_FILE, 'CREATE', array('overwrite' => 'false'))\n ->will($this->returnValue($datanodeUrl));\n $web->expects($this->once())\n ->method('put')\n ->with($datanodeUrl, self::LOCAL_FILE)\n ->will($this->returnValue($response));\n\n $hdfs = $this->getMock('\\\\Hdfs\\\\Web', array('stat'));\n $hdfs->expects($this->once())\n ->method('stat')\n ->with(self::REMOTE_DIR);\n $hdfs->setFilesystemWrapper($fs);\n $hdfs->setWebHdfsWrapper($web);\n\n $hdfs->putFile(self::LOCAL_FILE, self::REMOTE_FILE);\n }", "function processURLScript($script, $url) {\n try {\n $tokenValues = processTokens($script);\n foreach ($tokenValues as $tokenKey => $tokenValue) {\n $url = str_replace($tokenKey, $tokenValue, $url);\n }\n }catch (Exception $e) {\n logOutput(\"[ERROR] [processURLScript] \" . $e->getMessage());\n }\n\n return $url;\n}", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public static function add_script($script, $at_end = true) {\n\t\tif ($script === \"\") throw new Exception(\"Cannot add an empty script\");\n\t\tif (in_array($script, static::$_script) || in_array($script, static::$_end_script))\n\t\t\treturn ($script);\n\t\tif ($at_end)\n\t\t\tstatic::$_end_script[] = $script;\n\t\telse\n\t\t\tstatic::$_script[] = $script;\n\t\treturn (1);\n\t}", "public function testRun_echo_isset_key_string_4() {\n\t\t$this->assertEquals(\n\t\t\t[ 'false' ],\n\t\t\tRuntime::runSource('echo isset($expected_array_got_string[\"some_key\"]) ? \"true\" : \"false\";')\n\t\t);\n\t}", "public function put(string $key, $value, string $tag = null) : bool;", "public function testPutFile()\n {\n $this->setFakeRepository();\n\n $putReturn = $this->repository->put($this->fileName, $this->content);\n $this->assertTrue($putReturn);\n }", "public function testScript()\n {\n $data = Zend_Locale_Data::getList('de_AT', 'script');\n $this->assertEquals('Arabisch', $data['Arab']);\n $this->assertEquals('Lateinisch', $data['Latn']);\n\n $value = Zend_Locale_Data::getContent('de_AT', 'script', 'Arab');\n $this->assertEquals('Arabisch', $value);\n }", "public function send($key, $result);", "public function scriptDo($lua);" ]
[ "0.8642418", "0.57914746", "0.5728688", "0.55823517", "0.5548061", "0.53585714", "0.5333583", "0.53289", "0.5280212", "0.5262544", "0.5168906", "0.5156343", "0.5143259", "0.5092853", "0.5068262", "0.50061804", "0.49813595", "0.49379247", "0.49154723", "0.48936927", "0.4889836", "0.48655945", "0.4857807", "0.48544845", "0.4840804", "0.48360148", "0.48229495", "0.48218545", "0.48193017", "0.47843114" ]
0.8626193
1
bool multiScriptGet(string $script, array $keyList, array &$retList); retList : array ( key1 => value1, key2 => value2 ... )
public function multiScriptGet($script, $keyList, &$retList) { $result; $param = $script ."?command=get"; $path = self::PATH_MULTI . $param; $jsonKey = json_encode($keyList); $r = $this->http->POST($path, $jsonKey, $result); if ($r) { $retList = json_decode($result); } return $r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptGet($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiGet($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptDel($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiGet($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiGet($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getMultiple($key);", "public function multiDel($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiDel($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "function wp_cache_get_multiple( $keys, $group = '', $force = false ) {\n\t\t$values = array();\n\n\t\tforeach ( $keys as $key ) {\n\t\t\t$values[ $key ] = wp_cache_get( $key, $group, $force );\n\t\t}\n\n\t\treturn $values;\n\t}", "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\t$host = $this->hostFromKey($key);\n\t\tarray_push($keyArr[$host], $key);\n\n\t\t$result = false;\n\n\t\t// process testScriptPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$ret;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->testScriptPut($script, $key, $ret);\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getMultiple($keys, $default = null);", "function getScriptKeys($script_file) {\n $lang_keys = array();\n $lang_keys['script_file'] = $script_file;\n $all_lang_keys['lang_keys'] = array();\n // REGEXpression to find language-keys\n $regx_find_lang_keys = '/(?<= t\\(\\')(.*?[^\\\\\\\\])(?=\\')/m'; // Thanks to DrDeath :-D ( https://github.com/DrDeath )\n\n $handle = @fopen($script_file, \"r\");\n if ($handle) {\n while (($buffer = fgets($handle, 4096)) !== false) {\n preg_match_all($regx_find_lang_keys, $buffer, $matches, PREG_SET_ORDER, 0);\n if ( count($matches) ) {\n //dd($matches[0][0]);\n $all_lang_keys['lang_keys'][] = $matches[0][0];\n }\n }\n // IF no matches where found --> convert $all_lang_keys['lang_keys'] from empty array to FALSE\n $all_lang_keys['lang_keys'] = (! count($all_lang_keys['lang_keys'])) ? FALSE : $all_lang_keys['lang_keys'];\n // make UNIQUE\n if (! $all_lang_keys['lang_keys']) {\n $lang_keys['lang_keys'] = FALSE;\n // add some more information\n $lang_keys['num_keys_found'] = FALSE;\n $lang_keys['num_keys_unique'] = FALSE;\n } else {\n $lang_keys['lang_keys'] = array_unique($all_lang_keys['lang_keys']);\n // add some more information\n $lang_keys['num_keys_found'] = count($all_lang_keys['lang_keys']);\n $lang_keys['num_keys_unique'] = count($lang_keys['lang_keys']);\n }\n\n\n if (!feof($handle)) {\n mpt_die('Error while reading ' . $script_file);\n }\n fclose($handle);\n }\n return $lang_keys;\n}", "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t$result;\n\n\t\t$param = \"/\" . $key;\n\n\t\t$path = $script . $param;\n\t\t$jsonKey = json_encode($key);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function getMultiple(array $keys, array &$tokens = null);", "private function _load_requests( /*ref array*/ &$keys_list, /*string*/ $action = 'exit' )\n\t{\n\t\t$temp_array = array();\n\t\t\n\t\tforeach ($keys_list as $key)\n\t\t{\n\t\t\tif ($this->input->post($key) !== FALSE)\n\t\t\t{\n\t\t\t\t$temp_array[$key] = $this->input->post($key);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($action == 'exit') exit();\n\t\t\t\telse $temp_array[$key] = \"\";\n\t\t\t}\n\t\t}\n\t\treturn $temp_array;\n\t}", "public function getScript($script, $key, &$val)\n\t{\n\t\treturn $this->getPath($script . \"/\" . $key, $val);\n\t}", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\t$valArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t\t$valArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t\tarray_push($valArr[$host], $valList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$result |= $simpleCache->multiPut($keyArr[$host], $valArr[$host], $ext);\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getMultiple($keys, $default = null)\n {\n }", "public function getMultiple($keys, $default = null)\n {\n }", "function get_list(array $keys, $cas_tokens = NULL, $flags = NULL)\n\t{\n\t\tif ($this->ignore_connection_failures && ! $this->memcache)\n\t\t{\n\t\t\treturn $this->default_failed_return;\n\t\t}\n\n\t\t$internal_cache_results = array();\n\t\t$get_results = array();\n\t\t$remaining_keys = $keys;\n\n\t\tif ($this->use_internal_cache)\n\t\t{\n\t\t\tforeach ($keys as $i => $key)\n\t\t\t{\n\t\t\t\tif (array_key_exists($key, $this->cached))\n\t\t\t\t{\n\t\t\t\t\tunset($remaining_keys[$i]);\n\t\t\t\t\t$internal_cache_results[$key] = $this->cached[$key];\n\n\t\t\t\t\t$this->hit_counters['internal_hit']++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->command_counters['get_list']++;\n\n\t\tif ($this->library == 'memcache')\n\t\t{\n\t\t\t$get_results = $this->memcache->get($remaining_keys);\n\t\t}\n\n\t\tif ($this->library == 'memcached')\n\t\t{\n\t\t\t$get_results = $this->memcache->getMulti($remaining_keys, $cas_tokens, $flags);\n\t\t}\n\n\t\t$result = array_merge($internal_cache_results, (array)$get_results);\n\n\t\tforeach ((array)$remaining_keys as $i => $remaining_key)\n\t\t{\n\t\t\tif (! isset($result[$remaining_key]))\n\t\t\t{\n\t\t\t\t$this->cached[$remaining_key] = $this->default_failed_return;\n\n\t\t\t\t$this->hit_counters['miss']++;\n\t\t\t}\n\t\t}\n\n\t\tforeach ((array)$get_results as $get_result_key => $get_result_value)\n\t\t{\n\t\t\t// Empty key shows up sometimes\n\t\t\tif ($get_result_key)\n\t\t\t{\n\t\t\t\t$this->cached[$get_result_key] = $get_result_value;\n\t\t\t}\n\t\t}\n\n\t\t$this->hit_counters['hit'] += count($get_results);\n\t\t\n\t\treturn $result;\n\t}", "public static function fmxListScripts()\n\t{\n\t\tglobal $fmx_host;\n\t\tglobal $fmx_database;\n\t\t\n\t\t// assemble the URL\n\t\t$udat['protocal'] = FMX_PROTOCAL;\n\t\t$udat['space'] = '';\n\t\t$udat['host'] = $fmx_host;\n\t\t$udat['fmi'] = 'fmi';\n\t\t$udat['data'] = 'data';\n\t\t$udat['apiVersion'] = FMX_APIVERSION;\n\t\t$udat['databases'] = 'databases';\n\t\t$udat['database'] = $fmx_database;\n\t\t$udat['scripts'] = 'scripts';\n\t\t$url = implode($udat,'/');\n\t\t\n\t\t// send request to FileMaker Server\n\t\t$result = SELF::curlFileMaker($url,NULL,'GET');\n\t\t\n\t\treturn $result;\n\t}", "public function get (string ...$keys);", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t$data = array_combine($keyList, $valList);\n\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonData = json_encode($data);\n\t\treturn $this->http->POST($path, $jsonData, $result);\n\t}", "public function evalScript($script, $keys = null, $args = null) {\n $params = [$script];\n if (is_array($keys)) {\n $keys = (array)$keys;\n $params[] = count($keys);\n $params[] = $keys;\n } else {\n $params[] = 0;\n }\n if (is_array($args)) {\n $params[] = (array) $args;\n }\n return $this->returnCommand(['EVAL'], $keys, $params);\n }", "#[Deprecated(replacement: '%class%->mGet(%parametersList%)')]\n public function getMultiple(array $keys) {}", "function getMultiParams()\n{\n $rtn = array();\n\n $rtn['backend'] = array('backend_hostname', 'backend_port', 'backend_weight', 'backend_data_directory');\n if (paramExists('backend_flag')) {\n $rtn['backend'][] = 'backend_flag';\n }\n if (paramExists('other_pgpool_hostname')) {\n $rtn['other_pgpool'] = array('other_pgpool_hostname', 'other_pgpool_port', 'other_wd_port');\n }\n\n if (paramExists('heartbeat_destination')) {\n $rtn['heartbeat'] = array('heartbeat_destination', 'heartbeat_destination_port', 'heartbeat_device');\n }\n\n if (paramExists('hostname')) {\n $rtn['watchdog_node'] = array('hostname', 'wd_port', 'pgpool_port');\n }\n\n if (paramExists('heartbeat_hostname')){\n $rtn['watchdog_heartbeat'] = array('heartbeat_hostname', 'heartbeat_port', 'heartbeat_device');\n }\n\n return $rtn;\n}", "function wp_cache_set_multiple( array $data, $group = '', $expire = 0 ) {\n\t\t$values = array();\n\n\t\tforeach ( $data as $key => $value ) {\n\t\t\t$values[ $key ] = wp_cache_set( $key, $value, $group, $expire );\n\t\t}\n\n\t\treturn $values;\n\t}", "public function getMultiple(array $keys, $category = '') { \r\n $values = array();\r\n \r\n if(!empty($keys)) {\r\n if(!isset($category)) {\r\n $category = '';\r\n }\r\n \r\n $placeholder_values = array(\r\n $category\r\n );\r\n \r\n $database_driver_name = $this->connection_object->getDriverName();\r\n\r\n $key_placeholder = '';\r\n \r\n if($database_driver_name == 'pgsql') {\r\n $key_placeholder = '= ANY(?::varchar[])';\r\n \r\n $placeholder_values[] = \"{\" . implode(\",\", $keys) . \"}\";\r\n }\r\n else {\r\n $key_placeholder = QueryGenerator::getInStatement(count($keys));\r\n \r\n $placeholder_values = array_merge($placeholder_values, $keys);\r\n }\r\n \r\n $placeholder_values[] = date('Y-m-d H:i:s');\r\n \r\n if(!$this->in_transaction) {\r\n $this->connection_object->beginTransaction();\r\n }\r\n \r\n $values = $this->connection_object->getMappedColumn(\"\r\n SELECT \r\n key,\r\n value\r\n FROM cms_cache\r\n WHERE category = ?\r\n AND key {$key_placeholder}\r\n AND (\r\n expires IS NULL\r\n OR expires > ?\r\n )\r\n \", $placeholder_values);\r\n \r\n if(!$this->in_transaction) {\r\n $this->connection_object->commit();\r\n }\r\n }\r\n \r\n return $values;\r\n }", "public static function getMultiObj($keys, $localCacheTag = self::FLAG_USE_LOCAL_CACHE, $onToLocalFn = null)\n {\n $useLocalCache = $localCacheTag & self::MASK_USE_LOCAL_CACHE;\n $onlyLocalCache = $localCacheTag & self::MASK_ONLY_LOCAL_CACHE;\n if (!MCore_Tool_Env::isProd())\n {\n MCore_Tool_Log::addDebugLog('cache', 'getMultiObj: ' . implode(',', $keys));\n }\n $list = array();\n $unHitKeys = array();\n if ($useLocalCache)\n {\n foreach ($keys as $key)\n {\n if (isset(self::$cacheList[$key]))\n {\n $list[$key] = self::$cacheList[$key];\n }\n else\n {\n $unHitKeys[] = $key;\n }\n }\n }\n else\n {\n $unHitKeys = $keys;\n }\n\n if ($onlyLocalCache)\n {\n return $list;\n }\n\n if (!empty($unHitKeys))\n {\n $cacheList = self::getCacheProxy()->getMultiObj($unHitKeys);\n if (is_array($cacheList) && !empty($cacheList))\n {\n foreach ($cacheList as $key => $item)\n {\n if ($useLocalCache)\n {\n if ($onToLocalFn)\n {\n $item = call_user_func($onToLocalFn, $key, $item);\n if ($item === false)\n {\n continue;\n }\n }\n self::$cacheList[$key] = $item;\n }\n $list[$key] = $item;\n }\n }\n }\n\n // reset order\n $ret = array();\n foreach ($keys as $key)\n {\n if (isset($list[$key]))\n {\n $ret[$key] = $list[$key];\n }\n }\n return $ret;\n }", "public function getMetaMulti(string $meta_key, $default = null);" ]
[ "0.891265", "0.75807667", "0.75271195", "0.74319047", "0.7327869", "0.6143876", "0.58781254", "0.58022356", "0.57686865", "0.54763114", "0.5403621", "0.53668445", "0.53168005", "0.52830726", "0.52816635", "0.51601064", "0.5112629", "0.51121986", "0.51121986", "0.5100581", "0.50869656", "0.50503254", "0.50181586", "0.4987256", "0.49781838", "0.4924209", "0.48939416", "0.48771843", "0.48671737", "0.48645988" ]
0.9003637
0
bool multiScriptDel(string $script, array $keyList, array &$retList); retList : array ( key1 => t/f, key2 => t/f ...)
public function multiScriptDel($script, $keyList, &$retList) { $result; $param = $script ."?command=del"; $path = self::PATH_MULTI . $param; $jsonKey = json_encode($keyList); $r = $this->http->POST($path, $jsonKey, $result); if ($r) { $retList = json_decode($result); } return $r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptDel($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiDel($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptGet($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function delMultiple($key);", "public function deleteMultiple($keys);", "public function multiGet($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function xDel($key, $ids) {}", "function wp_cache_delete_multiple( array $keys, $group = '' ) {\n\t\t$values = array();\n\n\t\tforeach ( $keys as $key ) {\n\t\t\t$values[ $key ] = wp_cache_delete( $key, $group );\n\t\t}\n\n\t\treturn $values;\n\t}", "public function deleteMultiple($keys)\n {\n }", "public function deleteMulti(array $keys);", "public function getScript()\n {\n return <<<'LUA'\nlocal processing = KEYS[1]\nlocal timeouts = KEYS[2]\nlocal item = ARGV[1]\n\nlocal result = redis.call('lrem', processing, -1, item)\n\nlocal count = redis.call('llen', processing)\nif count == 0 then\n redis.call('hdel', timeouts, processing)\nend\nLUA;\n }", "public function deleteItems($delList){\n \ttry {\n \t\t$arrDelete = explode(',', $delList);\n \t\tforeach ($arrDelete as $key=>$value) {\n \t\t\t$where = array('md5(client_id) = ?' => $this->_CommonController->decodeKey($value));\n \t\t\t$this->delete($where);\n \t\t}\n \t} catch (Exception $e) {\n \t\t// pass possible exceptions to log file\n \t$this->_CommonController->writeLog($e->getMessage());\n \t}\n }", "public function deleteMultiple(array $keys);", "public function multiGet($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiGet($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "function lingotek_keystore_delete_multiple($entity_type, $entity_ids, $lingokey, $condition = '=') {\n if (!is_array($entity_ids)) {\n $entity_ids = array($entity_ids);\n }\n\n $query = db_select('lingotek_entity_metadata', 'l') // Make sure that the variable exists in the table for every input nid\n ->fields('l', array('entity_id'))\n ->condition('entity_type', $entity_type)\n ->condition('entity_id', $entity_ids, 'IN')\n ->condition('entity_key', $lingokey, $condition);\n $delete_nids = $query->execute()->fetchCol();\n\n if (!empty($delete_nids)) {\n $delete = db_delete('lingotek_entity_metadata') // delete for every input nid where the variable exists\n ->condition('entity_type', $entity_type)\n ->condition('entity_id', $delete_nids, 'IN')\n ->condition('entity_key', $lingokey, $condition)\n ->execute();\n }\n}", "public static function delete_multi($pool, array $keys){\n if ($keys) {\n foreach ($keys as $key) {\n if (array_key_exists($key, self::$local)) {\n unset(self::$local[$key]);\n }\n }\n }\n }", "function processKeyDelete($params)\n {\n $query = \"delete from SSLKey where id=\\\"\" . $params[\"keyId\"] . \"\\\"\";\n $result = $this->configDB->query($query);\n $result->freeResult();\n\n exec(SCRIPTSPATH . \"/clientManageKey.sh del \" . $params[\"keyId\"] . \" \" . $params[\"clientId\"]);\n\n return array( array( $params[\"keyId\"] ) );\n }", "public function deleteMulti($keys) {\n\t\treturn $this->obj->delete($keys) > 0;\n\t}", "public function multiDeleteAction() {\n\n if ($this->getRequest()->isPost()) {\n\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n\n if ($key == 'delete_' . $value) {\n\n //DELETE SITESTORES FROM DATABASE\n $store_id = (int) $value;\n\n //START SUB STORE WORK\n// $getSubStoreids = Engine_Api::_()->getDbtable('stores', 'sitestore')->getsubStoreids($store_id);\n// foreach ($getSubStoreids as $getSubStoreid) {\n// Engine_Api::_()->sitestore()->onStoreDelete($getSubStoreid['store_id']);\n// }\n //END SUB STORE WORK\n\n Engine_Api::_()->sitestore()->onStoreDelete($store_id);\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }", "public function deleteMultiple($keys)\n {\n return (bool)$this->deleteItems($keys);\n }", "public function deleteMultiple(array $keys) {\n // have to flip it and flip it back.\n $changedKeys = array_flip($this->changeKeys(array_flip($keys)));\n return $this->backend->deleteMultiple($changedKeys);\n }", "public function deleteItem(...$keys): void;", "public static function deleteScripts($sellerdb,$acess_token,$store_hash,$email_id,$validation_id){\n\t\t$db = \\Config\\Database::connect();\n\t\t$builder = $db->table('payu_scripts'); \n\t\t$builder->select('*'); \n\t\t$builder->where('script_email_id', $email_id);\n\t\t$builder->where('token_validation_id', $validation_id);\n\t\t$query = $builder->get();\n\t\t$result = $query->getResultArray();\n\t\tif (count($result) > 0) {\n\t\t\tforeach($result as $k=>$v){\n\t\t\t\t$header = array(\n\t\t\t\t\t\"X-Auth-Client: \".$acess_token,\n\t\t\t\t\t\"X-Auth-Token: \".$acess_token,\n\t\t\t\t\t\"Accept: application/json\",\n\t\t\t\t\t\"Content-Type: application/json\"\n\t\t\t\t);\n\t\t\t\t$request = '';\n\t\t\t\t$url = getenv('bigcommerceapp.STORE_URL').$store_hash.'/v3/content/scripts/'.$v['script_code'];\n\t\t\t\ttry{\n\t\t\t\t\t$client = \\Config\\Services::curlrequest();\n\t\t\t\t\t$response = $client->request('delete', $url, [\n\t\t\t\t\t\t\t'headers' => [\n\t\t\t\t\t\t\t\t\t'X-Auth-Token' => $acess_token,\n\t\t\t\t\t\t\t\t\t'Accept' => 'application/json',\n\t\t\t\t\t\t\t\t\t'Content-Type' => 'application/json'\n\t\t\t\t\t\t\t]\n\t\t\t\t\t]);\n\t\t\t\t\tif (strpos($response->getHeader('content-type'), 'text/html') != false){\n\t\t\t\t\t\t$body = $response->getBody();\n\t\t\t\t\t\t$response = json_decode($body,true);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = [\n\t\t\t\t\t\t\t'email_id' => $email_id,\n\t\t\t\t\t\t\t'type' => 'BigCommerce',\n\t\t\t\t\t\t\t'action' => 'script_tag_deletion',\n\t\t\t\t\t\t\t'api_url' => addslashes($url),\n\t\t\t\t\t\t\t'api_request' => addslashes($request),\n\t\t\t\t\t\t\t'api_response' => addslashes($body),\n\t\t\t\t\t\t\t'token_validation_id' => $validation_id,\n\t\t\t\t\t\t];\n\t\t\t\t\t\t$builderinsert = $db->table('api_log'); \n\t\t\t\t\t\t$builderinsert->insert($data);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\tlog_message('info', 'exception:'.$e->getMessage());\n\t\t\t\t}\n\t\t\t\t$builderdelete = $db->table('payu_scripts'); \n\t\t\t\t$builderdelete->delete(['script_id' => $v['script_id']]);\n\t\t\t}\n\t\t}\n\t}", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t$data = array_combine($keyList, $valList);\n\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonData = json_encode($data);\n\t\treturn $this->http->POST($path, $jsonData, $result);\n\t}", "public function deleteMultiple($keys)\n {\n if (!is_iterable($keys)) {\n throw new Exception('Keys is neither an array nor a Traversable');\n }\n\n foreach ($keys as $key) {\n $this->validateKey($key);\n }\n\n return (bool) $this->redisClient->del(...$keys);\n }", "public static function batchDeleteEntries() {\n $result = array();\n $deleted = lC_Manufacturers_Admin::batchDelete($_GET['batch']);\n if ($deleted) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "public function deleteMultiple($keys)\n {\n foreach ($keys as $k) {\n $this->delete($k);\n }\n\n return true;\n }", "public function evalScript($script, $keys = null, $args = null) {\n $params = [$script];\n if (is_array($keys)) {\n $keys = (array)$keys;\n $params[] = count($keys);\n $params[] = $keys;\n } else {\n $params[] = 0;\n }\n if (is_array($args)) {\n $params[] = (array) $args;\n }\n return $this->returnCommand(['EVAL'], $keys, $params);\n }" ]
[ "0.89238805", "0.77679956", "0.73373663", "0.72953534", "0.7109702", "0.6743923", "0.6093241", "0.60670775", "0.59102505", "0.59025204", "0.5857108", "0.5767507", "0.56923664", "0.5640015", "0.56055194", "0.55806196", "0.5399403", "0.5395389", "0.5353398", "0.5260798", "0.5220852", "0.5215561", "0.51951617", "0.5177086", "0.5066544", "0.50314647", "0.5001393", "0.48815036", "0.48802388", "0.48740843" ]
0.91571873
0
bool open(array string $hosts, int $connTimeout = 0, int $sockTimeout = 0); $hosts = array ("ip:port") $connTimeout : The connection timeout, in seconds. $sockTimeout : The socket timeout, int seconds.
public function open(array $hosts, $connTimeout = 0, $sockTimeout = 0) { // check size $this->size = @count($hosts); if ($this->size <= 0) { $this->setError(-1, self::ERROR_INVALID_HOSTS_SIZE); return false; } // init $this->hosts = $hosts; $this->connTimeout = $connTimeout; $this->sockTimeout = $sockTimeout; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fsockopen ($hostname, $port = -1, &$errno = null, &$errstr = null, $timeout = 'ini_get(\"default_socket_timeout\")') {}", "function pfsockopen ($hostname, $port = -1, &$errno = null, &$errstr = null, $timeout = 'ini_get(\"default_socket_timeout\")') {}", "function fsockopen(\n string $hostname,\n #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] int $port,\n #[PhpStormStubsElementAvailable(from: '7.1')] int $port = -1,\n &$error_code,\n &$error_message,\n ?float $timeout\n) {}", "public function open( $host, $database, $user, $password );", "function open(){\r\n\r\n $this->socket_context = stream_context_create(array());\r\n $this->stream = stream_socket_client($this->HOST . \":\" . $this->PORT,\r\n $errno, $errstr, $this->timeout, STREAM_CLIENT_CONNECT, $this->socket_context);\r\n if (!$this->stream) {\r\n echo \"$errstr ($errno)\".NEWLINE;\r\n return flase;\r\n }\r\n return true;\r\n }", "#[Deprecated(replacement: '%class%->connect(%parametersList%)')]\n public function open(\n $host,\n $port = 6379,\n $timeout = 0,\n $persistent_id = null,\n $retry_interval = 0,\n $read_timeout = 0,\n $context = null\n ) {}", "public function open(array $options = array()) {\n $config = $this->_config;\n\n if (!$config['scheme'] || !$config['host']) {\n return false;\n }\n $this->_resource = fsockopen($config['host'], $config['port'], $errno, $errstr, $this->_timeout);\n return $this->_resource;\n }", "public function connect($hostname = [], $port = 389);", "function pfsockopen(\n string $hostname,\n #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] int $port,\n #[PhpStormStubsElementAvailable(from: '7.1')] int $port = -1,\n &$error_code,\n &$error_message,\n ?float $timeout\n) {}", "function open($url,$port='80'){\n $this->url = $url;\n $this->port = $port;\n\t $this->skip=0;\n $this->sFp= fsockopen($this->url,$this->port,$this->error,$this->errorno);\n if((!$this->sFp)&&($this->debug ==TRUE)){\n print \"$this->errstr ($this->errno)!!!!!\\n\";\n $this->skip=1;\n\t\tdie;\n\t\t}else{\n\t\t stream_set_timeout ($this->sFp,3,33);\n\t\t $this->skip=0;\n return $this->sFp;\n }\n }", "function open($adressServer, $port, $ti=2){\n $this->fp = @fsockopen($adressServer, $port, $this->errno, $errstr, $ti);\n if(!$this->fp){\n //utilisé pour le debug...\n //echo \"<b>echec d'ouverture $adressServer</b><br><font color=\\\"red\\\">$errstr ($errno).</font><hr>$this->EOL\";\n return;\n }\n $this->recv();\n }", "public function connect($host, $port = NULL, $timeout = NULL) {\n\n }", "public function connect()\r\n {\r\n $errnum = null;\r\n\r\n $errstr = null;\r\n\r\n $this->socket = fsockopen($this->hostAddress, $this->portNumber, $errnum, $errstr, $this->timeout);\r\n }", "public function connect($host);", "public function open() {\n\t\t$this->sock = fsockopen($this->protocol.$this->host, $this->port, $errno, $errstr, 2);\n\t\tfwrite($this->sock, $this->getHeaders()) or $this->error($errno, $errstr);\n\t}", "function open() {\n\t\t$this->smtp = fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);\n\n\t\tif (!$this->smtp)\n\t\t\t$this->log(\"failed to open socket [$this->host:$this->port] $errno $errstr\");\n\t\telse\n\t\t\t$this->log('socket opened successfully');\n\n\t\t// read what should be a server id string\n\t\t$this->read();\n\t\t$this->write('HELO');\n\t\t$this->read();\n\n\t\tif ($this->auth_type)\n\t\t\t$this->performAuth();\n\t}", "private function openConnection() {\r\n $socket = new TSocket($this->request->getClientIp(), '9090');\r\n\r\n $this->transport = new TBufferedTransport($socket);\r\n $protocol = new TBinaryProtocol($this->transport);\r\n\r\n // Create a calculator client\r\n $this->client = new OpenFileServiceClient($protocol);\r\n\r\n // Open up the connection\r\n $this->transport->open();\r\n \r\n }", "function openConn($type, $ip, $port = \"\", $database = \"\", $username = null, $password = null, WinStatus $win_status = null){\n\t\t\tif ($this->conn){\n\t\t\t\t$this->CloseConn();\n\t\t\t}\n\t\t\t\n\t\t\t$this->type_try = $type;\n\t\t\t\n\t\t\tif ($type == \"mysql\"){\n\t\t\t\tif (!function_exists(\"mysql_connect\") && !knj_dl(\"mysql\")){\n\t\t\t\t\tthrow new Exception(\"Could not load the MySQL-extension.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$port){\n\t\t\t\t\t$port = 3306;\n\t\t\t\t}\n\t\t\t\t$ip .= \":\" . $port;\n\t\t\t\t\n\t\t\t\t//updating the status-window.\n\t\t\t\tif ($win_status){\n\t\t\t\t\t$win_status->SetStatus(0, \"Connecting...\", true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->conn = mysql_connect($ip, $username, $password, true);\n\t\t\t\t\n\t\t\t\t//If connection is not set, return false and unset connection.\n\t\t\t\tif (!$this->conn){\n\t\t\t\t\t$this->lasterror = \"MySQL connect error: \" . mysql_error($this->conn);\n\t\t\t\t\tunset($this->conn);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//updating the status-window.\n\t\t\t\tif ($win_status){\n\t\t\t\t\t$win_status->SetStatus(0, \"Selecting the database...\", true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//If a selection of the default database cant be made, close the connection and return false.\n\t\t\t\tif (!mysql_select_db($database, $this->conn)){\n\t\t\t\t\t$this->lasterror = \"MySQL db-select error: \" . mysql_error($this->conn);\n\t\t\t\t\tmysql_close($this->conn);\n\t\t\t\t\tunset($this->conn);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->type = \"mysql\";\n\t\t\t}elseif($type == \"pgsql\"){\n\t\t\t\tif (!$port){\n\t\t\t\t\t$port = \"5432\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$this->CheckConnection($ip, $port)){\n\t\t\t\t\t$this->lasterror = \"Could open a socket to \" . $ip . \":\" . $port . \".\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->conn = pg_connect(\"host=\" . $ip . \" port=\" . $port . \" dbname=\" . $database . \" user=\" . $username . \" password=\" . $password);\n\t\t\t\t\n\t\t\t\t$this->pg_ip = $ip;\n\t\t\t\t$this->pg_port = $port;\n\t\t\t\t$this->pg_db = $database;\n\t\t\t\t$this->pg_user = $username;\n\t\t\t\t$this->pg_pass = $password;\n\t\t\t\t\n\t\t\t\tif (!$this->conn){\n\t\t\t\t\t$this->lasterror = pg_last_error();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->type = \"pgsql\";\n\t\t\t\t$this->pg_version = pg_version($this->conn);\n\t\t\t}elseif($type == \"sqlite\"){\n\t\t\t\tif (!function_exists(\"sqlite_open\") && !knj_dl(\"sqlite\")){\n\t\t\t\t\tthrow new Exception(\"Could not load the SQLite-extension.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->conn = sqlite_open($ip);\n\t\t\t\t\n\t\t\t\tif ($this->conn){\n\t\t\t\t\t$this->type = \"sqlite\";\n\t\t\t\t}else{\n\t\t\t\t\t$this->lasterror = \"The database (\" . $ip . \") could not be read.\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}elseif($type == \"sqlite3\"){\n\t\t\t\tknj_dl(\"pdo\");\n\t\t\t\tknj_dl(\"pdo_sqlite\");\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\t$this->conn = new PDO(\"sqlite:\" . $ip);\n\t\t\t\t\t$this->type = \"sqlite3\";\n\t\t\t\t}catch(Exception $e){\n\t\t\t\t\techo \"Warning: \" . $e->getMessage() . \"\\n\";\n\t\t\t\t\t$this->lasterror = $e->getMessage();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}elseif($type == \"access\"){\n\t\t\t\tif (!file_exists($ip)){\n\t\t\t\t\t$this->lasterror = \"The file could not be found (\" . $ip . \")\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$odbc = \"Driver={Microsoft Access Driver (*.mdb)};Dbq=\" . $ip . \";Uid=Admin;Pwd=;\";\n\t\t\t\t//$odbc = \"DRIVER={Microsoft Access Driver (*.mdb)};\\r\\nDBQ=\" . $ip . \"\\r\\n\";\n\t\t\t\t//$odbc = \"Driver={MDBToolsODBC};Database=\" . $ip . \"\\r\\n\";\n\t\t\t\t//$odbc = \"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\" . $ip . \";\";\n\t\t\t\t\n\t\t\t\t$this->conn = odbc_connect($odbc, \"Administrator\", \"\");\n\t\t\t\t\n\t\t\t\tif (!$this->conn){\n\t\t\t\t\treturn false;\n\t\t\t\t}else{\n\t\t\t\t\t$this->type = \"access\";\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthrow new Exception(\"Unsupported type: \" . $this->type);\n\t\t\t}\n\t\t\t\n\t\t\t$this->sqlc->setOutputType($this->type);\n\t\t\treturn true;\n\t\t}", "protected function _connect() {\n\t\t$this->socket = @fsockopen($this->hostname, $this->port, $err_num, $err_string);\n\t\tif(!$this->socket) {\n\t\t\tthrow new Exception('Could not open connection to '.$this->hostname.':'.$this->port.': '.$err_string.' ('.$err_num.')');\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function _connectsocket($ip, $port, $proto='udp') {\r\n\tif ($this->DEBUG) print \"DEBUG: Opening socket to $ip:$port >>>\\n\";\r\n\t$this->sock = @fsockopen(\"$proto://$ip\", $port, $this->errno, $this->errstr);\r\n\t$this->_set_timeout($this->conf['timeout']);\r\n\treturn $this->sock;\r\n}", "protected function _connect (array $host)\n {\n $this->_activeHost = $host;\n $errNo = null;\n $errStr = null;\n $socket = @fsockopen($host['scheme'] . '://' . $host['host'], $host['port'], $errNo, $errStr, $this->_connect_timeout);\n\n if (!is_resource($socket)) {\n throw new ConnectionException(sprintf('Failed to connect. (%s: %s)', $errNo, $errStr), $host);\n }\n\n return $socket;\n }", "function OpenCon($db_username,$db_password,$db_host)\r\n {\r\n\t$mysqli = mysqli_init(); //initialising MySQLi\r\n\tif (!$mysqli) {\r\n\t\tdie('mysqli_init failed');\r\n\t}\r\n\tif (!$mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 5)) {\r\n\t\tdie('Setting MYSQLI_OPT_CONNECT_TIMEOUT failed');\r\n\t}\r\n\tif (!$mysqli->real_connect($db_host, $db_username, $db_password)) { //if the connection fails returning error\r\n\t\tdie('Connect Error (' . mysqli_connect_errno() . ') '\r\n\t\t\t. mysqli_connect_error());\r\n\t}else\r\n\t\treturn $mysqli;\r\n }", "public function openConnection($client);", "function open( $server, $user, $password, $dbName ) {\n\t\treturn true;\n\t}", "public function pconnect($host, $port = NULL, $timeout = NULL) {\n\n }", "function ssh_open($server, $user, $pass, $port = 22, $methods = array()){\n\t\t$methods = array_merge(array(\n\t\t\t'client_to_server' => array(\n\t\t\t\t'crypt' => '3des-cbc',\n\t\t\t\t'comp' => 'none'),\n\t\t\t'server_to_client' => array(\n\t\t\t\t'crypt' => 'aes256-cbc,aes192-cbc,aes128-cbc',\n\t\t\t\t'comp' => 'none')\n\t\t), $methods);\n\t\tif(!function_exists(\"ssh2_connect\")){\n\t\t\t$this->__errorAndExit(\"function ssh2_connect doesn't exit. Run \\n\\n Ubuntu: sudo apt-get install libssh2-1-dev libssh2-php\\n\\n Mac: sudo port install php5-ssh2\");\n\t\t}\n\t\t\n\t\tif($server == 'server.example.com'){\n\t\t\t$this->__errorAndExit(\"Please fill in the deploy() function in your new app task\");\n\t\t}\n\t\t\n\t\t$this->connection = ssh2_connect($server, $port, $methods);\n\t\t\n\t\tif(!$this->connection){\n\t\t\t$this->__errorAndExit(\"Unable to connect to $server\");\n\t\t}\n\t\t\n\t\tif(!ssh2_auth_password($this->connection, $user, $pass)){\n\t\t\t$this->__errorAndExit(\"Failed to authenticate\");\n\t\t}\n\t}", "function Connect($host,$port=0,$tval=30) {\r\n $this->error = null;\r\n\r\n # make sure we are __not__ connected\r\n if($this->connected()) {\r\n # ok we are connected! what should we do?\r\n # for now we will just give an error saying we\r\n # are already connected\r\n $this->error = array(\"error\" => \"Already connected to a server\");\r\n return false;\r\n }\r\n\r\n if(empty($port)) {\r\n $port = $this->SMTP_PORT;\r\n }\r\n\r\n #connect to the smtp server\r\n $this->smtp_conn = fsockopen($host, # the host of the server\r\n $port, # the port to use\r\n $errno, # error number if any\r\n $errstr, # error message if any\r\n $tval); # give up after ? secs\r\n # verify we connected properly\r\n if(empty($this->smtp_conn)) {\r\n $this->error = array(\"error\" => \"Failed to connect to server\",\r\n \"errno\" => $errno,\r\n \"errstr\" => $errstr);\r\n if($this->do_debug >= 1) {\r\n echo \"SMTP -> ERROR: \" . $this->error[\"error\"] .\r\n \": $errstr ($errno)\" . $this->CRLF;\r\n }\r\n return false;\r\n }\r\n\r\n # sometimes the SMTP server takes a little longer to respond\r\n # so we will give it a longer timeout for the first read\r\n // Windows still does not have support for this timeout function\r\n if(substr(PHP_OS, 0, 3) != \"WIN\")\r\n socket_set_timeout($this->smtp_conn, $tval, 0);\r\n\r\n # get any announcement stuff\r\n $announce = $this->get_lines();\r\n\r\n # set the timeout of any socket functions at 1/10 of a second\r\n //if(function_exists(\"socket_set_timeout\"))\r\n // socket_set_timeout($this->smtp_conn, 0, 100000);\r\n\r\n if($this->do_debug >= 2) {\r\n echo \"SMTP -> FROM SERVER:\" . $this->CRLF . $announce;\r\n }\r\n\r\n return true;\r\n }", "public function connect()\n { \n if ($this->_handle) { \n return;\n }\n \n $this->_handle = fsockopen($this->_protocol . '://' . $this->_host, $this->_port);\n\n if (!$this->_handle) {\n throw new \\Exception(\"Unable to open connetion\");\n }\n }", "function connect($params = array()){\n\n\t\tif(!isset($this->status)){\n\t\t\t$obj = new smtp($params);\n\t\t\tif($obj->connect()){\n\t\t\t\t$obj->status = SMTP_STATUS_CONNECTED;\n\t\t\t}\t\n\n\t\t\treturn $obj;\n\n\t\t}else{\n\t\t\t$this->connection = fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);\n\t\t\tsocket_set_timeout($this->connection, 0, 250000);\n\t\t\t\n\t\t\t$greeting = $this->get_data();\n\t\t\t\n\t\t\tif(is_resource($this->connection)){\n\t\t\t\t$this->status = SMTP_STATUS_CONNECTED;\n\t\t\t\treturn $this->auth ? $this->ehlo() : $this->helo();\n\t\t\t}else{\n\t\t\t\t$this->errors[] = 'Failed to connect to server: '.$errstr;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}", "function connect($dsn, $flags = false);" ]
[ "0.69084", "0.66913116", "0.63792145", "0.6357479", "0.6236857", "0.62079364", "0.61851126", "0.61207527", "0.61200285", "0.6015496", "0.59774995", "0.59238905", "0.5920579", "0.5894639", "0.5894603", "0.5879977", "0.5833399", "0.57971275", "0.56977594", "0.5680764", "0.56573486", "0.5612645", "0.55944216", "0.5547158", "0.5534641", "0.55262595", "0.5524063", "0.55185515", "0.5508126", "0.5486752" ]
0.8428584
0
bool getScript(string $script, string $key, string &$val);
public function getScript($script, $key, &$val) { // get cache $cache = $this->cacheFromKey($key); if ($cache === false) { return false; } // run if (!$cache->getScript($script, $key, $val)) { $this->setErrorCache($cache); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getScript($script, $key, &$val)\n\t{\n\t\treturn $this->getPath($script . \"/\" . $key, $val);\n\t}", "public function get($key, &$val)\n\t{\n\t\treturn $this->getScript(self::PATH_MCACHE, $key, $val);\n\t}", "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\t$host = $this->hostFromKey($key);\n\t\tarray_push($keyArr[$host], $key);\n\n\t\t$result = false;\n\n\t\t// process testScriptPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$ret;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->testScriptPut($script, $key, $ret);\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t$result;\n\n\t\t$param = \"/\" . $key;\n\n\t\t$path = $script . $param;\n\t\t$jsonKey = json_encode($key);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "abstract public function getScript();", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptGet($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "function getValue($key) {\n global $params;\n\tif (isset($params[$key])) return $params[$key];\n\telse return \"\";\n }", "function getValue($key) {\n global $params;\n\tif (isset($params[$key])) return $params[$key];\n\telse return \"\";\n }", "function get( $key );", "public function getValue(string $key);", "public function TryGetByKey($key, &$value);", "function get($key);", "function get($key);", "public function getScript();", "public function get($key, &$val)\n\t{\n\t\t// get cache\n\t\t$cache = $this->cacheFromKey($key);\n\t\tif ($cache === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// run\n\t\tif (!$cache->get($key, $val)) {\n\t\t\t$this->setErrorCache($cache);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function get_key_value($string, $key) {\n $list = explode( '&', $string);\n foreach ($list as $pair) {\n \t$item = explode( '=', $pair);\n\t\tif (strtolower($key) == strtolower($item[0])) {\n\t\t\treturn urldecode($item[1]); // not for use in $_GET etc, which is already decoded, however our encoder uses http_build_query() before encrypting\n\t\t}\n }\n return \"\";\n}", "public static function getVal($key) {\n $value = false;\n if(isset($_GET[$key])) {\n $value = strip_tags($_GET[$key]);\n $value = preg_replace('/[<>\\\\\\\\\\/]/', '', $value);\n }\n return $value;\n }", "public function getScriptingParameter($key, $default = null)\n\t{\n\t\t$configuration = Factory::getConfiguration();\n\n\t\tif (is_null($this->activeType))\n\t\t{\n\t\t\t$this->activeType = $configuration->get('akeeba.basic.backup_type', 'full');\n\t\t}\n\n\t\treturn $configuration->get('volatile.scripting.' . $this->activeType . '.' . $key, $default);\n\t}", "public function tryGet($key, &$value) : bool;", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "abstract public function get(string $key);", "function vars_get($url) {\n\tlist($url_script, $hash_get) = explode('?', $url);\n\t\n\tif ( !empty($hash_get) ) return '?'.$hash_get;\n}", "function get($hash);", "public function get(/*# string */ $key);", "function processURLScript($script, $url) {\n try {\n $tokenValues = processTokens($script);\n foreach ($tokenValues as $tokenKey => $tokenValue) {\n $url = str_replace($tokenKey, $tokenValue, $url);\n }\n }catch (Exception $e) {\n logOutput(\"[ERROR] [processURLScript] \" . $e->getMessage());\n }\n\n return $url;\n}", "function get($key = null, $val = null) {\n\t\tif (!is_null($val)) {\n\t\t\t$_GET[$key] = $val;\n\t\t}\n\t\tif (DEBUG_MODE && function_exists('debug')) {\n\t\t\tdebug('input_'.__FUNCTION__.'[]', array(\n\t\t\t\t'name'\t=> $key,\n\t\t\t\t'val'\t=> $val,\n\t\t\t\t'op'\t=> $val !== null ? 'set' : 'get',\n\t\t\t\t'trace'\t=> main()->trace_string(),\n\t\t\t));\n\t\t}\n\t\treturn $key === null ? $_GET : $_GET[$key];\n\t}", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);" ]
[ "0.82880604", "0.62565935", "0.6100682", "0.6007084", "0.57941425", "0.5751082", "0.5589478", "0.5589478", "0.5543296", "0.546166", "0.54536396", "0.53995997", "0.53995997", "0.5374959", "0.53515965", "0.532242", "0.5301621", "0.52715987", "0.52551585", "0.5194702", "0.5179057", "0.51787984", "0.5174241", "0.5171266", "0.51679826", "0.51585186", "0.5154437", "0.5154437", "0.5154437", "0.5154437" ]
0.790006
1
bool eraseScript(string $script, string $key);
public function eraseScript($script, $key) { // get cache $cache = $this->cacheFromKey($key); if ($cache === false) { return false; } // run if (!$cache->eraseScript($script, $key)) { $this->setErrorCache($cache); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function eraseScript($script, $key)\n\t{\n\t\treturn $this->erasePath($script . \"/\" . $key);\n\t}", "public function remove(string $key);", "public function remove(string $key);", "public function del(string $key);", "abstract public function remove(string $key): bool;", "function delete($key);", "public function del($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove(string $key): bool;", "public function remove(string $key): bool;", "public function erase(string $key): void\n\t{\n\t\tif (isset($this->vars[$key])) {\n\t\t\tunset($this->vars[$key]);\n\t\t}\n\t\t\n\t\tArr::erase($this->vars, $key);\n\t}", "abstract public function remove($key);", "public function remove( $secretId, $key );", "public function deleteKey($key);", "public function delete($key = '');" ]
[ "0.8821577", "0.6094982", "0.6094982", "0.59761345", "0.59596145", "0.59589744", "0.5936518", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.5931908", "0.58783954", "0.58783954", "0.58687687", "0.5866854", "0.586155", "0.5833632", "0.58308667" ]
0.8059755
1
bool multiPut(array $keyList, array $valList [, int $exp = 0]);
public function multiPut($keyList, $valList, $exp = 0) { if (count($keyList) != count($valList)) return false; // initialize key array $keyArr = array(); $valArr = array(); for ($i = 0; $i < count($this->hosts); $i++) { $keyArr[$this->hosts[$i]] = array(); $valArr[$this->hosts[$i]] = array(); } // split keys according to the host for ($i = 0; $i < count($keyList); $i++) { $host = $this->hostFromKey($keyList[$i]); array_push($keyArr[$host], $keyList[$i]); array_push($valArr[$host], $valList[$i]); } $result = false; // process multiPut if key exists for ($i = 0; $i < count($this->hosts); $i++) { $host = $this->hosts[$i]; if (count($keyArr[$host]) > 0) { $simpleCache = $this->cacheFromHost($host); $result |= $simpleCache->multiPut($keyArr[$host], $valArr[$host], $ext); } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t$data = array_combine($keyList, $valList);\n\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonData = json_encode($data);\n\t\treturn $this->http->POST($path, $jsonData, $result);\n\t}", "public function setMultiple($key);", "public function putAll($key, array $values);", "public function multiGet($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiGet($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiGet($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function MultiSet(array $val): bool\n {\n static::init();\n return static::$handler->MSet(static::$token, $val);\n }", "protected static function setMultiple(array &$arr, array $keyvals)\n {\n foreach ($keyvals as $key => $value) {\n static::set($arr, $key, $value);\n }\n }", "public function setMultiple(array $values, $category = '', $expire_time = NULL) { \r\n if(!empty($values)) {\r\n if(!isset($category)) {\r\n $category = '';\r\n }\r\n \r\n $expires = $this->getExpiresTimestamp($expire_time);\r\n \r\n $keys = array();\r\n $records_to_insert = array();\r\n \r\n foreach($values as $key => $value) {\r\n $keys[] = $key;\r\n \r\n $records_to_insert[] = array(\r\n 'category' => $category,\r\n 'key' => $key,\r\n 'value' => $value,\r\n 'expires' => $expires\r\n );\r\n }\r\n \r\n $delete_placeholder_values = array(\r\n $category\r\n );\r\n \r\n $database_driver_name = $this->connection_object->getDriverName();\r\n \r\n $delete_key_placeholder = '';\r\n \r\n if($database_driver_name == 'pgsql') {\r\n $delete_key_placeholder = '= ANY(?::varchar[])';\r\n \r\n $delete_placeholder_values[] = \"{\" . implode(\",\", $keys) . \"}\";\r\n }\r\n else {\r\n $delete_key_placeholder = QueryGenerator::getInStatement(count($keys));\r\n \r\n $delete_placeholder_values = array_merge($delete_placeholder_values, $keys);\r\n }\r\n \r\n if(!$this->in_transaction) {\r\n $this->connection_object->beginTransaction();\r\n }\r\n \r\n $this->connection_object->query(\"\r\n DELETE FROM cms_cache\r\n WHERE category = ?\r\n AND key {$delete_key_placeholder}\r\n \", $delete_placeholder_values);\r\n \r\n $this->connection_object->insertMulti('cms_cache', $records_to_insert);\r\n \r\n if(!$this->in_transaction) {\r\n $this->connection_object->commit();\r\n }\r\n }\r\n }", "public function setMulti($items, $lifetime = null) {\n if ($this->enabled) {\n $result = false;\n\n // Converts the keys to valid memcached keys. This is very important since certain characters\n // such as spaces will hang the PHP client!!! :O\n $tmp_items = array();\n foreach ($items as $key => $value) {\n $key = preg_replace(\"/[^A-Za-z0-9]/\", \"\", $key);\n if (!empty($key)) {\n $tmp_items[$key] = $value;\n }\n }\n\n // Now store the items\n if (count($tmp_items) > 0) {\n if (isset($lifetime)) {\n $result = $this->memcached->setMulti($tmp_items, time() + $lifetime);\n } else {\n $result = $this->memcached->setMulti($tmp_items, time() + $this->lifetime);\n }\n }\n\n return $result;\n } else {\n return true;\n }\n }", "public function putMany(array $values){}", "public function setMultiple(array $items, $expire = 0);", "public function putAll(array $values);", "public function multiDel($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiDel($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function setMultiple($values, $ttl = null)\n {\n if (!($values instanceof \\Traversable || is_array($values))) {\n throw new InvalidArgumentException(\"Keys must be an array or implement Traversable\");\n }\n $ok = true;\n foreach ($values as $key => $value) {\n $ok = $ok && $this->set($key, $value, $ttl);\n }\n return $ok;\n }", "public function setMultiple($values, $ttl = null)\n {\n foreach ($values as $k => $v) {\n $this->set($k, $v, $ttl);\n }\n\n return true;\n }", "public function setMultiple($values, $ttl = null);", "public function setMultiple($values, $ttl = null)\n {\n }", "public function setMultiple($values, $ttl = null)\n {\n }", "public function putMany(array $values, $seconds)\n {\n foreach ($values as $key => $value) {\n $this->put($key, $value, $seconds);\n }\n\n // TODO Use BatchWriteItem. Blocked by https://github.com/async-aws/aws/issues/566\n return true;\n }", "public function put($key, $val, $exp = 0, $charset = NULL)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\t\tif ($charset != NULL) {\n\t\t\t$param .= \"&charset=\" . $charset;\n\t\t}\n\n\t\t$path = self::PATH_MCACHE . \"/\" . $key . $param;\n\t\treturn $this->http->POST($path, $val, $result);\n\t}", "public function setMultiple($values, $ttl = null)\n {\n if (!is_iterable($values)) {\n throw new Exception('Data is neither an array nor a Traversable');\n }\n\n if ($ttl instanceof DateInterval) {\n $ttl = (new DateTime())->add($ttl)->getTimestamp() - time();\n }\n\n $arrayValues = [];\n\n foreach ($values as $key => $value) {\n $this->validateKey($key);\n $arrayValues[$key] = $this->serializer->serialize($value);\n }\n\n if (!$this->redisClient->mset($arrayValues)) {\n return false;\n }\n\n if (is_int($ttl) && $ttl >= 0) {\n $result = 1;\n\n foreach (array_keys($arrayValues) as $key) {\n $result &= $this->redisClient->expire((string) $key, $ttl) === true;\n }\n\n return $result === 1;\n }\n\n return true;\n }", "public function setKeyList($keyList) {\n if (!$this->mc->set('SMS_KEYLIST', $keyList, 0))\n $this->fatalErrorPage('unable to set memcached'); \n }", "function set( $k, $v, $exp = NULL )\n {\n global $cache, $gc;\n\n if ( strlen( $k ) > 16 ) { return; }\n if ( strlen( $v ) > 255 ) { return; }\n if ( is_numeric($v) ) $v = (int)$v;\n \n if ( ! is_string($k) ) {\n echo 'KEY MUST BE A STRING';\n return;\n }\n\n if ( check_array_size( $v ) ) \n {\n try {\n $cache[$k] = $v;\n if( $exp != NULL ) $gc[$k]['expires'] = date( \"m/d/Y h:i:s a\", time() + $exp );\n \n echo 'STORED' . \"\\n\";\n } catch ( Exception $e ) {\n echo 'An exception occurred: ', $e->getMessage(), \"\\n\";\n }\n }\n else\n {\n echo 'ERROR --CACHE FULL';\n }\n }", "public function putMany(array $values, $minutes){\r\n\r\n\t\t$time = $this->toTime($minutes);\r\n\r\n\t\tforeach ($values as $key => $value) {\r\n\t\t\t$this->calypte->put($this->prefix.$key, $value, $time);\r\n\t\t}\r\n\r\n\t}", "function updateData($data = array(), $keys = array(), $multi_rows = false, $quote = true)\n\t{\n\t\tforeach ($keys as $key)\n\t\t{\n\t\t\t$ustr[] = '`'.$key.'`=VALUES(`'.$key.'`)';\n\t\t}\n\n\t\tif($multi_rows)\n\t\t{\n\t\t\t// rows > 1\n\n\t\t\tif($quote)\n\t\t\t{\n\t\t\t\t$values = '(\\''.implode(\"','\",$data[0]).'\\')';\n\t\t\t\t$cnt = sizeof($data);\n\t\t\t\tfor($i=1; $i<$cnt; $i++)\n\t\t\t\t{\n\t\t\t\t\t$values .= ', ('.hcms_array_to_query($data[$i]).')';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$values = '('.implode(',',$data[0]).')';\n\t\t\t\t$cnt = sizeof($data);\n\t\t\t\tfor($i=1; $i<$cnt; $i++)\n\t\t\t\t{\n\t\t\t\t\t$values .= ', ('.implode(',',$data[$i]).')';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//\t\t\thcms_debug(\"INSERT INTO $this->table VALUES $values\".' ON DUPLICATE KEY UPDATE '.implode(', ',$ustr).';');\n\t\t\treturn $this->db->ExecuteNonQuery(\"INSERT INTO $this->table VALUES $values\".' ON DUPLICATE KEY UPDATE '.implode(', ',$ustr).';');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->db->ExecuteNonQuery(\"INSERT INTO $this->table VALUES ('\".implode(\"','\",$data).'\\') ON DUPLICATE KEY UPDATE '.implode(', ',$ustr).';');\n\t\t}\n\t}", "public function test_add_by_key_array() {\n\t\t$key = microtime();\n\t\t$value = array( 5, 'value' );\n\t\t$server_key_real = 'doughty';\n\n\t\t// Add array to memcached\n\t\t$this->assertTrue( $this->object_cache->addByKey( $server_key_real, $key, $value ) );\n\n\t\t// Verify correct value/type is returned\n\t\t$this->assertSame( $value, $this->object_cache->getByKey( $server_key_real, $key ) );\n\t}", "public function setMulti(array $value_arr)\n {\n foreach ($value_arr AS $key => $value) {\n $this->set($key, $value);\n }\n }", "public function hasMultiple($key);", "public function putMany(array $values, $seconds)\n {\n }" ]
[ "0.90373665", "0.6637326", "0.6567546", "0.61579895", "0.60552466", "0.59578013", "0.59419054", "0.59269404", "0.59037", "0.5881472", "0.5879759", "0.58140415", "0.57968885", "0.5744908", "0.574445", "0.57037044", "0.56590533", "0.5615185", "0.5615185", "0.5597402", "0.5560423", "0.5550725", "0.55450076", "0.5530848", "0.5516021", "0.5486113", "0.5458488", "0.54385644", "0.5428901", "0.5413803" ]
0.86076033
1
bool multiGet(array $keyList, array &$retList);
public function multiGet($keyList, &$retList) { // initialize key array $keyArr = array(); for ($i = 0; $i < count($this->hosts); $i++) { $keyArr[$this->hosts[$i]] = array(); } // split keys according to the host for ($i = 0; $i < count($keyList); $i++) { $host = $this->hostFromKey($keyList[$i]); array_push($keyArr[$host], $keyList[$i]); } $result = false; // process multiGet if key exists for ($i = 0; $i < count($this->hosts); $i++) { $host = $this->hosts[$i]; $retArray; if (count($keyArr[$host]) > 0) { $simpleCache = $this->cacheFromHost($host); $r = $simpleCache->multiGet($keyArr[$host], $retArray); if ($r) { if ($retArray) { if ($retList === false || $retList == NULL) $retList = array(); $retList = array_merge($retList, (array)$retArray); } } $result |= $r; } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function multiGet($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function getMultiple($key);", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptGet($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiDel($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function getMultiple($keys, $default = null);", "public function getMultiple(array $keys, array &$tokens = null);", "public function getMultiple($keys, $default = null)\n {\n }", "public function getMultiple($keys, $default = null)\n {\n }", "function wp_cache_get_multiple( $keys, $group = '', $force = false ) {\n\t\t$values = array();\n\n\t\tforeach ( $keys as $key ) {\n\t\t\t$values[ $key ] = wp_cache_get( $key, $group, $force );\n\t\t}\n\n\t\treturn $values;\n\t}", "#[Deprecated(replacement: '%class%->mGet(%parametersList%)')]\n public function getMultiple(array $keys) {}", "public function getMulti(array $key_arr)\n {\n $value_arr = array();\n foreach ($key_arr AS $key) {\n $value_arr[$key] = $this->get($key);\n }\n return $value_arr;\n }", "function get_list(array $keys, $cas_tokens = NULL, $flags = NULL)\n\t{\n\t\tif ($this->ignore_connection_failures && ! $this->memcache)\n\t\t{\n\t\t\treturn $this->default_failed_return;\n\t\t}\n\n\t\t$internal_cache_results = array();\n\t\t$get_results = array();\n\t\t$remaining_keys = $keys;\n\n\t\tif ($this->use_internal_cache)\n\t\t{\n\t\t\tforeach ($keys as $i => $key)\n\t\t\t{\n\t\t\t\tif (array_key_exists($key, $this->cached))\n\t\t\t\t{\n\t\t\t\t\tunset($remaining_keys[$i]);\n\t\t\t\t\t$internal_cache_results[$key] = $this->cached[$key];\n\n\t\t\t\t\t$this->hit_counters['internal_hit']++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->command_counters['get_list']++;\n\n\t\tif ($this->library == 'memcache')\n\t\t{\n\t\t\t$get_results = $this->memcache->get($remaining_keys);\n\t\t}\n\n\t\tif ($this->library == 'memcached')\n\t\t{\n\t\t\t$get_results = $this->memcache->getMulti($remaining_keys, $cas_tokens, $flags);\n\t\t}\n\n\t\t$result = array_merge($internal_cache_results, (array)$get_results);\n\n\t\tforeach ((array)$remaining_keys as $i => $remaining_key)\n\t\t{\n\t\t\tif (! isset($result[$remaining_key]))\n\t\t\t{\n\t\t\t\t$this->cached[$remaining_key] = $this->default_failed_return;\n\n\t\t\t\t$this->hit_counters['miss']++;\n\t\t\t}\n\t\t}\n\n\t\tforeach ((array)$get_results as $get_result_key => $get_result_value)\n\t\t{\n\t\t\t// Empty key shows up sometimes\n\t\t\tif ($get_result_key)\n\t\t\t{\n\t\t\t\t$this->cached[$get_result_key] = $get_result_value;\n\t\t\t}\n\t\t}\n\n\t\t$this->hit_counters['hit'] += count($get_results);\n\t\t\n\t\treturn $result;\n\t}", "public function get (string ...$keys);", "function get_list( $keys, $array ){\n\treturn array_values( parse_args((array)$keys, $array) );\n}", "function get_list( $keys, $array ){\n\treturn array_values( parse_args((array)$keys, $array) );\n}", "public function hasMultiple($key);", "abstract protected function _get($keys);", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptDel($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getMany(array $keys): mixed;", "public function getKeyValueAll($key,$value);", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\t$valArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t\t$valArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t\tarray_push($valArr[$host], $valList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$result |= $simpleCache->multiPut($keyArr[$host], $valArr[$host], $ext);\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function getMulti($keys, $localCacheTag = self::FLAG_USE_LOCAL_CACHE)\n {\n $list = array();\n $unHitKeys = array();\n $useLocalCache = $localCacheTag & self::MASK_USE_LOCAL_CACHE;\n $onlyLocalCache = $localCacheTag & self::MASK_ONLY_LOCAL_CACHE;\n if ($useLocalCache)\n {\n foreach ($keys as $key)\n {\n if (isset(self::$cacheList[$key]))\n {\n $list[$key] = self::$cacheList[$key];\n }\n else\n {\n $unHitKeys[] = $key;\n }\n }\n }\n else\n {\n $unHitKeys = $keys;\n }\n\n if ($onlyLocalCache)\n {\n return $list;\n }\n\n if (!empty($unHitKeys))\n {\n $cacheList = self::getCacheProxy()->getMulti($unHitKeys);\n $list = $list + $cacheList;\n\n if ($useLocalCache && is_array($cacheList))\n {\n foreach ($cacheList as $key => $item)\n {\n self::$cacheList[$key] = $item;\n }\n }\n }\n\n return $list;\n }", "public static function getMultiObj($keys, $localCacheTag = self::FLAG_USE_LOCAL_CACHE, $onToLocalFn = null)\n {\n $useLocalCache = $localCacheTag & self::MASK_USE_LOCAL_CACHE;\n $onlyLocalCache = $localCacheTag & self::MASK_ONLY_LOCAL_CACHE;\n if (!MCore_Tool_Env::isProd())\n {\n MCore_Tool_Log::addDebugLog('cache', 'getMultiObj: ' . implode(',', $keys));\n }\n $list = array();\n $unHitKeys = array();\n if ($useLocalCache)\n {\n foreach ($keys as $key)\n {\n if (isset(self::$cacheList[$key]))\n {\n $list[$key] = self::$cacheList[$key];\n }\n else\n {\n $unHitKeys[] = $key;\n }\n }\n }\n else\n {\n $unHitKeys = $keys;\n }\n\n if ($onlyLocalCache)\n {\n return $list;\n }\n\n if (!empty($unHitKeys))\n {\n $cacheList = self::getCacheProxy()->getMultiObj($unHitKeys);\n if (is_array($cacheList) && !empty($cacheList))\n {\n foreach ($cacheList as $key => $item)\n {\n if ($useLocalCache)\n {\n if ($onToLocalFn)\n {\n $item = call_user_func($onToLocalFn, $key, $item);\n if ($item === false)\n {\n continue;\n }\n }\n self::$cacheList[$key] = $item;\n }\n $list[$key] = $item;\n }\n }\n }\n\n // reset order\n $ret = array();\n foreach ($keys as $key)\n {\n if (isset($list[$key]))\n {\n $ret[$key] = $list[$key];\n }\n }\n return $ret;\n }", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t$data = array_combine($keyList, $valList);\n\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonData = json_encode($data);\n\t\treturn $this->http->POST($path, $jsonData, $result);\n\t}", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "function getListing($multi, $field)\n{\n\t$listing = array( );\t\n\tforeach ($multi as $key=>$value){\n\t\t$temp = $value[$field];\n\t\t$listing[$key] = $temp;}\n\treturn $listing;\n}", "public static function fetchList($ids, $getKeyFn, $getListFn, $onToLocalFn = null, $expire = 0, $default = false)\n {\n if (empty($ids))\n {\n return [];\n }\n $isArray = is_array($ids);\n if (!$isArray)\n {\n $singleId = $ids;\n $ids = (array)$ids;\n }\n $ids = array_filter(array_unique($ids));\n $keys = array();\n foreach ($ids as $id)\n {\n if (is_array($id))\n {\n throw new Exception('The key of each item should not be array');\n }\n $keys[$id] = call_user_func($getKeyFn, $id);\n }\n\n $cacheList = array();\n if ($expire >= 0)\n {\n $onToLocalFnProxy = null;\n if ($onToLocalFn != null)\n {\n $keys_filp = array_flip($keys);\n $onToLocalFnProxy = function($key, $item) use ($keys_filp, $onToLocalFn) {\n $id = $keys_filp[$key];\n $item = call_user_func($onToLocalFn, $id, $item);\n return $item;\n };\n }\n $cacheList = self::getMultiObj($keys, true, $onToLocalFnProxy);\n }\n $unHitIds = array();\n $list = array();\n foreach ($keys as $id => $key)\n {\n if (!isset($cacheList[$key]) || $cacheList[$key] === false)\n {\n $unHitIds[] = $id;\n }\n else\n {\n $list[$id] = $cacheList[$key];\n }\n }\n\n if (!empty($unHitIds))\n {\n $rawList = call_user_func($getListFn, $unHitIds);\n foreach ($unHitIds as $id)\n {\n if (isset($rawList[$id]))\n {\n $item = $rawList[$id];\n $cacheKey = $keys[$id];\n if ($expire != 0)\n {\n self::setObj($cacheKey, $item, $expire);\n }\n if ($onToLocalFn)\n {\n $item = call_user_func($onToLocalFn, $id, $item);\n }\n if ($item === false)\n {\n continue;\n }\n self::$cacheList[$cacheKey] = $item;\n $list[$id] = $item;\n }\n }\n }\n\n if ($isArray)\n {\n // reset order\n $ret = array();\n foreach ($ids as $id)\n {\n if (isset($list[$id]))\n {\n $ret[$id] = $list[$id];\n }\n else if ($default !== false)\n {\n $ret[$id] = $default;\n }\n }\n return $ret;\n }\n else\n {\n return isset($list[$singleId]) ? $list[$singleId] : $default;\n }\n }", "public function getMultiple(array $keys, $category = '') { \r\n $values = array();\r\n \r\n if(!empty($keys)) {\r\n if(!isset($category)) {\r\n $category = '';\r\n }\r\n \r\n $placeholder_values = array(\r\n $category\r\n );\r\n \r\n $database_driver_name = $this->connection_object->getDriverName();\r\n\r\n $key_placeholder = '';\r\n \r\n if($database_driver_name == 'pgsql') {\r\n $key_placeholder = '= ANY(?::varchar[])';\r\n \r\n $placeholder_values[] = \"{\" . implode(\",\", $keys) . \"}\";\r\n }\r\n else {\r\n $key_placeholder = QueryGenerator::getInStatement(count($keys));\r\n \r\n $placeholder_values = array_merge($placeholder_values, $keys);\r\n }\r\n \r\n $placeholder_values[] = date('Y-m-d H:i:s');\r\n \r\n if(!$this->in_transaction) {\r\n $this->connection_object->beginTransaction();\r\n }\r\n \r\n $values = $this->connection_object->getMappedColumn(\"\r\n SELECT \r\n key,\r\n value\r\n FROM cms_cache\r\n WHERE category = ?\r\n AND key {$key_placeholder}\r\n AND (\r\n expires IS NULL\r\n OR expires > ?\r\n )\r\n \", $placeholder_values);\r\n \r\n if(!$this->in_transaction) {\r\n $this->connection_object->commit();\r\n }\r\n }\r\n \r\n return $values;\r\n }" ]
[ "0.86243385", "0.7413462", "0.73045194", "0.72875416", "0.6920121", "0.68491775", "0.6732454", "0.6642039", "0.65069026", "0.65069026", "0.6395203", "0.63887787", "0.63100344", "0.625176", "0.61984247", "0.6160707", "0.6160707", "0.6114656", "0.6087211", "0.60521257", "0.60472053", "0.5986857", "0.5928877", "0.5902215", "0.58844745", "0.58762896", "0.5851323", "0.5828845", "0.58193046", "0.5805485" ]
0.8540015
1
bool multiDel(array $keyList, array &$retList);
public function multiDel($keyList, &$retList) { // initialize key array $keyArr = array(); for ($i = 0; $i < count($this->hosts); $i++) { $keyArr[$this->hosts[$i]] = array(); } // split keys according to the host for ($i = 0; $i < count($keyList); $i++) { $host = $this->hostFromKey($keyList[$i]); array_push($keyArr[$host], $keyList[$i]); } $result = false; // process multiDel if key exists for ($i = 0; $i < count($this->hosts); $i++) { $host = $this->hosts[$i]; $retArray; if (count($keyArr[$host]) > 0) { $simpleCache = $this->cacheFromHost($host); $r = $simpleCache->multiDel($keyArr[$host], $retArray); if ($r) { if ($retArray) { if ($retList === false || $retList == NULL) $retList = array(); $retList = array_merge($retList, (array)$retArray); } } $result |= $r; } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function multiDel($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function delMultiple($key);", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptDel($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function deleteMultiple($keys);", "public function deleteMulti(array $keys);", "public function xDel($key, $ids) {}", "public function deleteMultiple($keys)\n {\n }", "public function multiGet($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function deleteMultiple(array $keys);", "public function multiGet($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiGet($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function deleteMultiple(array $keys) {\n // have to flip it and flip it back.\n $changedKeys = array_flip($this->changeKeys(array_flip($keys)));\n return $this->backend->deleteMultiple($changedKeys);\n }", "public function deleteMulti($keys) {\n\t\treturn $this->obj->delete($keys) > 0;\n\t}", "function wp_cache_delete_multiple( array $keys, $group = '' ) {\n\t\t$values = array();\n\n\t\tforeach ( $keys as $key ) {\n\t\t\t$values[ $key ] = wp_cache_delete( $key, $group );\n\t\t}\n\n\t\treturn $values;\n\t}", "public function deleteMultiple($keys)\n {\n return (bool)$this->deleteItems($keys);\n }", "public function deleteItems($delList){\n \ttry {\n \t\t$arrDelete = explode(',', $delList);\n \t\tforeach ($arrDelete as $key=>$value) {\n \t\t\t$where = array('md5(client_id) = ?' => $this->_CommonController->decodeKey($value));\n \t\t\t$this->delete($where);\n \t\t}\n \t} catch (Exception $e) {\n \t\t// pass possible exceptions to log file\n \t$this->_CommonController->writeLog($e->getMessage());\n \t}\n }", "function delete_list($item_kit_ids)\n\t{\n\t\t$this->db->where_in('item_kit_id',$item_kit_ids);\n\t\treturn $this->db->update('item_kits', array('deleted' => 1));\n \t}", "public function deleteMultiple($keys)\n {\n foreach ($keys as $k) {\n $this->delete($k);\n }\n\n return true;\n }", "function doubleExplode ($del1, $del2, $keyvalue) {\n return Tools::doubleExplode($del1, $del2, $keyvalue);\n}", "function lingotek_keystore_delete_multiple($entity_type, $entity_ids, $lingokey, $condition = '=') {\n if (!is_array($entity_ids)) {\n $entity_ids = array($entity_ids);\n }\n\n $query = db_select('lingotek_entity_metadata', 'l') // Make sure that the variable exists in the table for every input nid\n ->fields('l', array('entity_id'))\n ->condition('entity_type', $entity_type)\n ->condition('entity_id', $entity_ids, 'IN')\n ->condition('entity_key', $lingokey, $condition);\n $delete_nids = $query->execute()->fetchCol();\n\n if (!empty($delete_nids)) {\n $delete = db_delete('lingotek_entity_metadata') // delete for every input nid where the variable exists\n ->condition('entity_type', $entity_type)\n ->condition('entity_id', $delete_nids, 'IN')\n ->condition('entity_key', $lingokey, $condition)\n ->execute();\n }\n}", "public static function deleteRecords($recordIdsList = array()) {\n\t\tif ($recordIdsList) {\n\t\t\t$db = PearDatabase::getInstance();\n\t\t\t$query = 'DELETE FROM vtiger_joomla_fieldmaps WHERE id IN (' . generateQuestionMarks($recordIdsList). ')';\n\t\t\t$db->pquery($query, $recordIdsList);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function undelete_list($item_kit_ids)\n\t{\n\t\t$this->db->where_in('item_kit_id',$item_kit_ids);\n\t\treturn $this->db->update('item_kits', array('deleted' => 0));\n \t}", "public function deleteListRecord(array $pks) {\n $pks = $this->trigger('beforeDeleteCallbacks', $pks);\n $this->getQueryBuilder()->in($this->primaryKey, $pks)\n ->from($this->table); \n $result = $this->deleteRecords();\n $this->trigger('afterDeleteCallbacks', $result);\n return $result;\n }", "public function del($params = [], &$result)\n {\n }", "public function deleteItem(...$keys): void;", "public static function delete_multi($pool, array $keys){\n if ($keys) {\n foreach ($keys as $key) {\n if (array_key_exists($key, self::$local)) {\n unset(self::$local[$key]);\n }\n }\n }\n }", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t$data = array_combine($keyList, $valList);\n\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonData = json_encode($data);\n\t\treturn $this->http->POST($path, $jsonData, $result);\n\t}", "public function deleteMultiple($keys)\n {\n if (!($keys instanceof \\Traversable || is_array($keys))) {\n throw new InvalidArgumentException(\"Keys must be an array or implement Traversable\");\n }\n $ok = true;\n foreach ($keys as $key) {\n $ok = $ok && $this->delete($key);\n }\n return $ok;\n }", "public function deleteListPlanKeys()\n {\n $redisKeys = $this->redis->keys('list:*'); //Get all redis keys start with 'list:'\n if (empty($redisKeys)) {\n return true;\n }\n foreach ($redisKeys as $key) {\n $this->redis->del($key);\n }\n return true;\n }", "function delete_list($item_ids)\n\t{\n\t\t$this->db->where_in('item_id',$item_ids);\n\t\treturn $this->db->update('items', array('deleted' => 1));\n \t}" ]
[ "0.87388897", "0.75024956", "0.7411071", "0.7397169", "0.70604473", "0.70349056", "0.69876975", "0.6954614", "0.68708396", "0.678059", "0.6689361", "0.6573015", "0.6522015", "0.6521142", "0.6409067", "0.63860023", "0.62460464", "0.60774994", "0.6028083", "0.601298", "0.5980732", "0.59592265", "0.5952656", "0.59372747", "0.59174615", "0.58941615", "0.58309275", "0.582229", "0.581372", "0.5793216" ]
0.85902554
1
bool testScriptPut(string $script, string $key, string &$ret); Only fot test !
public function testScriptPut($script, $key, &$ret) { // initialize key array $keyArr = array(); for ($i = 0; $i < count($this->hosts); $i++) { $keyArr[$this->hosts[$i]] = array(); } // split keys according to the host $host = $this->hostFromKey($key); array_push($keyArr[$host], $key); $result = false; // process testScriptPut if key exists for ($i = 0; $i < count($this->hosts); $i++) { $host = $this->hosts[$i]; $ret; if (count($keyArr[$host]) > 0) { $simpleCache = $this->cacheFromHost($host); $r = $simpleCache->testScriptPut($script, $key, $ret); $result |= $r; } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t$result;\n\n\t\t$param = \"/\" . $key;\n\n\t\t$path = $script . $param;\n\t\t$jsonKey = json_encode($key);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function processPut() {\r\n\t\treturn false;\r\n\t}", "function PUT($key, $input){\n return \"0\";\n }", "public function getScript($script, $key, &$val)\n\t{\n\t\t// get cache\n\t\t$cache = $this->cacheFromKey($key);\n\t\tif ($cache === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// run\n\t\tif (!$cache->getScript($script, $key, $val)) {\n\t\t\t$this->setErrorCache($cache);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function testKycChecksPut()\n {\n }", "public function testPut()\n\t{\n\t\t$this->assertFalse($this->cache->put('key', 'value', 15));\n\t}", "public function testGetAndPut()\n {\n $key = rand(0, 1000);\n\n // Test the /memcached REST API.\n $this->put(\"/memcached/test$key\", \"sour\");\n $this->assertEquals(\"sour\", $this->get(\"/memcached/test$key\"));\n $this->put(\"/memcached/test$key\", \"sweet\");\n $this->assertEquals(\"sweet\", $this->get(\"/memcached/test$key\"));\n }", "public function eraseScript($script, $key)\n\t{\n\t\t// get cache\n\t\t$cache = $this->cacheFromKey($key);\n\t\tif ($cache === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// run\n\t\tif (!$cache->eraseScript($script, $key)) {\n\t\t\t$this->setErrorCache($cache);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptGet($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "function runTest($test, $cache) {\n\t$diff = $test($cache);\n\n\tif ( !$diff ) {\n\t\techo \"ok\\n\";\n\t} else {\n\t\techo \"Unexpected output:\\n $diff\\n\";\n\t}\n}", "public function testSuccess()\n {\n // Test data\n $testAnalyticScriptData = [\n 'analytic_script' => '<script></script>',\n ];\n\n $params = [\n 'index' => $this->projectIndex,\n 'type' => ElasticSearchConstantBag::TYPE_ANALYTIC_SCRIPT,\n 'id' => ElasticSearchConstantBag::ID_ANALYTIC_SCRIPT,\n 'body' => $testAnalyticScriptData,\n ];\n \n // Mocking\n $this->elasticSearchIndexManager\n ->expects($this->once())\n ->method('getClient')\n ->willReturn($this->clientMock);\n \n $this->clientMock\n ->expects($this->once())\n ->method('index')\n ->with($params)\n ->willReturn($testAnalyticScriptData);\n \n //Execution\n $methodResult = $this->elasticSearchIndexManager->addAnalyticScriptToIndex($testAnalyticScriptData);\n \n // Asserting\n $this->assertEquals($testAnalyticScriptData, $methodResult);\n }", "public function getScript($script, $key, &$val)\n\t{\n\t\treturn $this->getPath($script . \"/\" . $key, $val);\n\t}", "public function testPut3()\n {\n // put\n $this->assertTrue($this->object->put('/b1/b2', 'wow'));\n\n // overwrite existing dir, failed\n $this->assertFalse($this->object->put('/b1', 'xxx'));\n\n $this->assertTrue($this->object->del('/b1'));\n }", "public function pput() {\n\t\t$args = func_get_args();\n\t\t$str = array_shift($args);\n\t\treturn $this->put(vsprintf($str, $args));\n\t}", "public function testGetScriptPath()\n {\n }", "public function test_add_by_key_string() {\n\t\t$key = microtime();\n\t\t$value = 'kovalchuk';\n\t\t$server_key_real = 'doughty';\n\n\t\t// Add string to memcached\n\t\t$this->assertTrue( $this->object_cache->addByKey( $server_key_real, $key, $value ) );\n\n\t\t// Verify correct value/type is returned\n\t\t$this->assertSame( $value, $this->object_cache->getByKey( $server_key_real, $key ) );\n\t}", "public function testHttpPutPersistenceItemData()\n {\n }", "public function eraseScript($script, $key)\n\t{\n\t\treturn $this->erasePath($script . \"/\" . $key);\n\t}", "public function testPutFileSuccess ()\n {\n $datanodeUrl = 'http://example.com/'. self::REMOTE_FILE;\n $response = $this->getWebResponse('putFile_success');\n\n $fs = $this->getMock('\\\\Hdfs\\\\FilesystemWrapper');\n $fs->method('isExists')->with(self::LOCAL_FILE)->will($this->returnValue(true));\n $fs->method('isReadable')->with(self::LOCAL_FILE)->will($this->returnValue(true));\n\n $web = $this->getMock('\\\\Hdfs\\\\Web\\\\WebHdfsWrapper');\n $web->expects($this->once())\n ->method('getDatanodeUrl')\n ->with(Method::PUT, self::REMOTE_FILE, 'CREATE', array('overwrite' => 'false'))\n ->will($this->returnValue($datanodeUrl));\n $web->expects($this->once())\n ->method('put')\n ->with($datanodeUrl, self::LOCAL_FILE)\n ->will($this->returnValue($response));\n\n $hdfs = $this->getMock('\\\\Hdfs\\\\Web', array('stat'));\n $hdfs->expects($this->once())\n ->method('stat')\n ->with(self::REMOTE_DIR);\n $hdfs->setFilesystemWrapper($fs);\n $hdfs->setWebHdfsWrapper($web);\n\n $hdfs->putFile(self::LOCAL_FILE, self::REMOTE_FILE);\n }", "public function testGet()\n\t{\n\t\t$this->cache->put('key', 'value', 15);\n\t\t$this->assertNull($this->cache->get('key'));\n\t}", "function test_update_existing() {\n\t}", "public function testPutFile()\n {\n $this->setFakeRepository();\n\n $putReturn = $this->repository->put($this->fileName, $this->content);\n $this->assertTrue($putReturn);\n }", "public function testRun_echo_isset_key_string_4() {\n\t\t$this->assertEquals(\n\t\t\t[ 'false' ],\n\t\t\tRuntime::runSource('echo isset($expected_array_got_string[\"some_key\"]) ? \"true\" : \"false\";')\n\t\t);\n\t}", "function paramPut($key) {\n\tglobal $app;\n\treturn $app->request()->put($key);\n}", "public function put(string $key, $value, string $tag = null) : bool;", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptDel($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function testScript()\n {\n $data = Zend_Locale_Data::getList('de_AT', 'script');\n $this->assertEquals('Arabisch', $data['Arab']);\n $this->assertEquals('Lateinisch', $data['Latn']);\n\n $value = Zend_Locale_Data::getContent('de_AT', 'script', 'Arab');\n $this->assertEquals('Arabisch', $value);\n }", "function call_rest_put($url,$data='')\n\t{\n\t\t$result = $this->curl->simple_put($url , $data , array(CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST=> false));\t\n\t\treturn $result;\n\t}", "function call_rest_put($url,$data='')\n\t{\n\t\t$result = $this->curl->simple_put($url , $data , array(CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST=> false));\t\n\t\treturn $result;\n\t}", "public static function add_script($script, $at_end = true) {\n\t\tif ($script === \"\") throw new Exception(\"Cannot add an empty script\");\n\t\tif (in_array($script, static::$_script) || in_array($script, static::$_end_script))\n\t\t\treturn ($script);\n\t\tif ($at_end)\n\t\t\tstatic::$_end_script[] = $script;\n\t\telse\n\t\t\tstatic::$_script[] = $script;\n\t\treturn (1);\n\t}" ]
[ "0.85365707", "0.58397883", "0.5826629", "0.57987833", "0.5729236", "0.5580963", "0.5395536", "0.5361217", "0.53034645", "0.52684534", "0.5186946", "0.5161648", "0.51441205", "0.5111051", "0.5075342", "0.5061814", "0.5056258", "0.4962144", "0.4960996", "0.49594793", "0.49440885", "0.4942041", "0.4935378", "0.4928771", "0.49117336", "0.48928228", "0.48805466", "0.48514742", "0.48514742", "0.48378614" ]
0.86462295
0
bool multiScriptGet(string $script, array $keyList, array &$retList);
public function multiScriptGet($script, $keyList, &$retList) { // initialize key array $keyArr = array(); for ($i = 0; $i < count($this->hosts); $i++) { $keyArr[$this->hosts[$i]] = array(); } // split keys according to the host for ($i = 0; $i < count($keyList); $i++) { $host = $this->hostFromKey($keyList[$i]); array_push($keyArr[$host], $keyList[$i]); } $result = false; // process multiScriptGet if key exists for ($i = 0; $i < count($this->hosts); $i++) { $host = $this->hosts[$i]; $retArray; if (count($keyArr[$host]) > 0) { $simpleCache = $this->cacheFromHost($host); $r = $simpleCache->multiScriptGet($script, $keyArr[$host], $retArray); if ($r) { if ($retArray) { if ($retList === false || $retList == NULL) $retList = array(); $retList = array_merge($retList, (array)$retArray); } } $result |= $r; } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptDel($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiGet($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiGet($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiGet($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getMultiple($key);", "public function multiDel($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiDel($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\t$host = $this->hostFromKey($key);\n\t\tarray_push($keyArr[$host], $key);\n\n\t\t$result = false;\n\n\t\t// process testScriptPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$ret;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->testScriptPut($script, $key, $ret);\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t$result;\n\n\t\t$param = \"/\" . $key;\n\n\t\t$path = $script . $param;\n\t\t$jsonKey = json_encode($key);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "function wp_cache_get_multiple( $keys, $group = '', $force = false ) {\n\t\t$values = array();\n\n\t\tforeach ( $keys as $key ) {\n\t\t\t$values[ $key ] = wp_cache_get( $key, $group, $force );\n\t\t}\n\n\t\treturn $values;\n\t}", "public function getScript($script, $key, &$val)\n\t{\n\t\treturn $this->getPath($script . \"/\" . $key, $val);\n\t}", "function getScriptKeys($script_file) {\n $lang_keys = array();\n $lang_keys['script_file'] = $script_file;\n $all_lang_keys['lang_keys'] = array();\n // REGEXpression to find language-keys\n $regx_find_lang_keys = '/(?<= t\\(\\')(.*?[^\\\\\\\\])(?=\\')/m'; // Thanks to DrDeath :-D ( https://github.com/DrDeath )\n\n $handle = @fopen($script_file, \"r\");\n if ($handle) {\n while (($buffer = fgets($handle, 4096)) !== false) {\n preg_match_all($regx_find_lang_keys, $buffer, $matches, PREG_SET_ORDER, 0);\n if ( count($matches) ) {\n //dd($matches[0][0]);\n $all_lang_keys['lang_keys'][] = $matches[0][0];\n }\n }\n // IF no matches where found --> convert $all_lang_keys['lang_keys'] from empty array to FALSE\n $all_lang_keys['lang_keys'] = (! count($all_lang_keys['lang_keys'])) ? FALSE : $all_lang_keys['lang_keys'];\n // make UNIQUE\n if (! $all_lang_keys['lang_keys']) {\n $lang_keys['lang_keys'] = FALSE;\n // add some more information\n $lang_keys['num_keys_found'] = FALSE;\n $lang_keys['num_keys_unique'] = FALSE;\n } else {\n $lang_keys['lang_keys'] = array_unique($all_lang_keys['lang_keys']);\n // add some more information\n $lang_keys['num_keys_found'] = count($all_lang_keys['lang_keys']);\n $lang_keys['num_keys_unique'] = count($lang_keys['lang_keys']);\n }\n\n\n if (!feof($handle)) {\n mpt_die('Error while reading ' . $script_file);\n }\n fclose($handle);\n }\n return $lang_keys;\n}", "public function getMultiple($keys, $default = null);", "public function getMultiple(array $keys, array &$tokens = null);", "public function get (string ...$keys);", "private function _load_requests( /*ref array*/ &$keys_list, /*string*/ $action = 'exit' )\n\t{\n\t\t$temp_array = array();\n\t\t\n\t\tforeach ($keys_list as $key)\n\t\t{\n\t\t\tif ($this->input->post($key) !== FALSE)\n\t\t\t{\n\t\t\t\t$temp_array[$key] = $this->input->post($key);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($action == 'exit') exit();\n\t\t\t\telse $temp_array[$key] = \"\";\n\t\t\t}\n\t\t}\n\t\treturn $temp_array;\n\t}", "public static function fmxListScripts()\n\t{\n\t\tglobal $fmx_host;\n\t\tglobal $fmx_database;\n\t\t\n\t\t// assemble the URL\n\t\t$udat['protocal'] = FMX_PROTOCAL;\n\t\t$udat['space'] = '';\n\t\t$udat['host'] = $fmx_host;\n\t\t$udat['fmi'] = 'fmi';\n\t\t$udat['data'] = 'data';\n\t\t$udat['apiVersion'] = FMX_APIVERSION;\n\t\t$udat['databases'] = 'databases';\n\t\t$udat['database'] = $fmx_database;\n\t\t$udat['scripts'] = 'scripts';\n\t\t$url = implode($udat,'/');\n\t\t\n\t\t// send request to FileMaker Server\n\t\t$result = SELF::curlFileMaker($url,NULL,'GET');\n\t\t\n\t\treturn $result;\n\t}", "public function evalScript($script, $keys = null, $args = null) {\n $params = [$script];\n if (is_array($keys)) {\n $keys = (array)$keys;\n $params[] = count($keys);\n $params[] = $keys;\n } else {\n $params[] = 0;\n }\n if (is_array($args)) {\n $params[] = (array) $args;\n }\n return $this->returnCommand(['EVAL'], $keys, $params);\n }", "#[Deprecated(replacement: '%class%->mGet(%parametersList%)')]\n public function getMultiple(array $keys) {}", "public function getMultiple($keys, $default = null)\n {\n }", "public function getMultiple($keys, $default = null)\n {\n }", "public function getScript($script, $key, &$val)\n\t{\n\t\t// get cache\n\t\t$cache = $this->cacheFromKey($key);\n\t\tif ($cache === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// run\n\t\tif (!$cache->getScript($script, $key, $val)) {\n\t\t\t$this->setErrorCache($cache);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\t$valArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t\t$valArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t\tarray_push($valArr[$host], $valList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$result |= $simpleCache->multiPut($keyArr[$host], $valArr[$host], $ext);\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function load($scriptlist = false)\n {\n $scriptLoader = self::getInstance();\n\n if (is_array($scriptLoader->scripts))\n {\n \n foreach ($scriptLoader->scripts as $script)\n {\n\n echo \"<script type=\\\"text/javascript\\\" src=\\\"$script\\\" ></script>\\n\";\n\n }\n\n }\n if ($scriptlist !== false)\n {\n if (!is_array($scriptlist))\n {\n $scriptlist = array($scriptlist);\n }\n foreach ($scriptlist as $script)\n {\n $path = lcDesign::designUrl(\"javascript/\".$script);\n if (!in_array($path, $scriptLoader->scripts))\n {\n echo \"<script type=\\\"text/javascript\\\" src=\\\"$path\\\" ></script>\\n\";\n }\n \n\n }\n }\n\n\n\n }", "public function getScript()\n {\n return <<<'LUA'\nlocal processing = KEYS[1]\nlocal timeouts = KEYS[2]\nlocal item = ARGV[1]\n\nlocal result = redis.call('lrem', processing, -1, item)\n\nlocal count = redis.call('llen', processing)\nif count == 0 then\n redis.call('hdel', timeouts, processing)\nend\nLUA;\n }", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t$data = array_combine($keyList, $valList);\n\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonData = json_encode($data);\n\t\treturn $this->http->POST($path, $jsonData, $result);\n\t}", "public static function getClientList(/*** mixed[] ***/ &$list);", "function get_list( $keys, $array ){\n\treturn array_values( parse_args((array)$keys, $array) );\n}", "function get_list( $keys, $array ){\n\treturn array_values( parse_args((array)$keys, $array) );\n}" ]
[ "0.90533507", "0.75986016", "0.75382787", "0.749645", "0.7210656", "0.6012472", "0.58830875", "0.5748269", "0.5592122", "0.54892945", "0.54790145", "0.54686147", "0.5384649", "0.5320633", "0.5220209", "0.5182568", "0.5153098", "0.5105866", "0.5065232", "0.5058196", "0.505594", "0.505594", "0.50177056", "0.5010323", "0.49923328", "0.49803957", "0.49432036", "0.4922107", "0.49155328", "0.49155328" ]
0.8936405
1
bool multiScriptDel(string $script, array $keyList, array &$retList);
public function multiScriptDel($script, $keyList, &$retList) { // initialize key array $keyArr = array(); for ($i = 0; $i < count($this->hosts); $i++) { $keyArr[$this->hosts[$i]] = array(); } // split keys according to the host for ($i = 0; $i < count($keyList); $i++) { $host = $this->hostFromKey($keyList[$i]); array_push($keyArr[$host], $keyList[$i]); } $result = false; // process multiScriptDel if key exists for ($i = 0; $i < count($this->hosts); $i++) { $host = $this->hosts[$i]; $retArray; if (count($keyArr[$host]) > 0) { $simpleCache = $this->cacheFromHost($host); $r = $simpleCache->multiScriptDel($script, $keyArr[$host], $retArray); if ($r) { if ($retArray) { if ($retList === false || $retList == NULL) $retList = array(); $retList = array_merge($retList, (array)$retArray); } } $result |= $r; } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function multiScriptDel($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=del\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = $script .\"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiDel($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiDel if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiDel($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiScriptGet($script, $keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiScriptGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiScriptGet($script, $keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function delMultiple($key);", "public function multiGet($keyList, &$retList)\n\t{\n\t\t$result;\n\n\t\t$param = \"?command=get\";\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonKey = json_encode($keyList);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function deleteMultiple($keys);", "public function getScript()\n {\n return <<<'LUA'\nlocal processing = KEYS[1]\nlocal timeouts = KEYS[2]\nlocal item = ARGV[1]\n\nlocal result = redis.call('lrem', processing, -1, item)\n\nlocal count = redis.call('llen', processing)\nif count == 0 then\n redis.call('hdel', timeouts, processing)\nend\nLUA;\n }", "public function xDel($key, $ids) {}", "function wp_cache_delete_multiple( array $keys, $group = '' ) {\n\t\t$values = array();\n\n\t\tforeach ( $keys as $key ) {\n\t\t\t$values[ $key ] = wp_cache_delete( $key, $group );\n\t\t}\n\n\t\treturn $values;\n\t}", "public function deleteMultiple($keys)\n {\n }", "public function multiGet($keyList, &$retList)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\tfor ($i = 0; $i < count($keyList); $i++) {\n\t\t\t$host = $this->hostFromKey($keyList[$i]);\n\t\t\tarray_push($keyArr[$host], $keyList[$i]);\n\t\t}\n\n\t\t$result = false;\n\n\t\t// process multiGet if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$retArray;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->multiGet($keyArr[$host], $retArray);\n\t\t\t\tif ($r) {\n\t\t\t\t\tif ($retArray) {\n\t\t\t\t\t\tif ($retList === false || $retList == NULL)\n\t\t\t\t\t\t\t$retList = array();\n\t\t\t\t\t\t$retList = array_merge($retList, (array)$retArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function deleteMulti(array $keys);", "public function deleteItems($delList){\n \ttry {\n \t\t$arrDelete = explode(',', $delList);\n \t\tforeach ($arrDelete as $key=>$value) {\n \t\t\t$where = array('md5(client_id) = ?' => $this->_CommonController->decodeKey($value));\n \t\t\t$this->delete($where);\n \t\t}\n \t} catch (Exception $e) {\n \t\t// pass possible exceptions to log file\n \t$this->_CommonController->writeLog($e->getMessage());\n \t}\n }", "public function deleteMultiple(array $keys);", "function processKeyDelete($params)\n {\n $query = \"delete from SSLKey where id=\\\"\" . $params[\"keyId\"] . \"\\\"\";\n $result = $this->configDB->query($query);\n $result->freeResult();\n\n exec(SCRIPTSPATH . \"/clientManageKey.sh del \" . $params[\"keyId\"] . \" \" . $params[\"clientId\"]);\n\n return array( array( $params[\"keyId\"] ) );\n }", "function lingotek_keystore_delete_multiple($entity_type, $entity_ids, $lingokey, $condition = '=') {\n if (!is_array($entity_ids)) {\n $entity_ids = array($entity_ids);\n }\n\n $query = db_select('lingotek_entity_metadata', 'l') // Make sure that the variable exists in the table for every input nid\n ->fields('l', array('entity_id'))\n ->condition('entity_type', $entity_type)\n ->condition('entity_id', $entity_ids, 'IN')\n ->condition('entity_key', $lingokey, $condition);\n $delete_nids = $query->execute()->fetchCol();\n\n if (!empty($delete_nids)) {\n $delete = db_delete('lingotek_entity_metadata') // delete for every input nid where the variable exists\n ->condition('entity_type', $entity_type)\n ->condition('entity_id', $delete_nids, 'IN')\n ->condition('entity_key', $lingokey, $condition)\n ->execute();\n }\n}", "public static function deleteScripts($sellerdb,$acess_token,$store_hash,$email_id,$validation_id){\n\t\t$db = \\Config\\Database::connect();\n\t\t$builder = $db->table('payu_scripts'); \n\t\t$builder->select('*'); \n\t\t$builder->where('script_email_id', $email_id);\n\t\t$builder->where('token_validation_id', $validation_id);\n\t\t$query = $builder->get();\n\t\t$result = $query->getResultArray();\n\t\tif (count($result) > 0) {\n\t\t\tforeach($result as $k=>$v){\n\t\t\t\t$header = array(\n\t\t\t\t\t\"X-Auth-Client: \".$acess_token,\n\t\t\t\t\t\"X-Auth-Token: \".$acess_token,\n\t\t\t\t\t\"Accept: application/json\",\n\t\t\t\t\t\"Content-Type: application/json\"\n\t\t\t\t);\n\t\t\t\t$request = '';\n\t\t\t\t$url = getenv('bigcommerceapp.STORE_URL').$store_hash.'/v3/content/scripts/'.$v['script_code'];\n\t\t\t\ttry{\n\t\t\t\t\t$client = \\Config\\Services::curlrequest();\n\t\t\t\t\t$response = $client->request('delete', $url, [\n\t\t\t\t\t\t\t'headers' => [\n\t\t\t\t\t\t\t\t\t'X-Auth-Token' => $acess_token,\n\t\t\t\t\t\t\t\t\t'Accept' => 'application/json',\n\t\t\t\t\t\t\t\t\t'Content-Type' => 'application/json'\n\t\t\t\t\t\t\t]\n\t\t\t\t\t]);\n\t\t\t\t\tif (strpos($response->getHeader('content-type'), 'text/html') != false){\n\t\t\t\t\t\t$body = $response->getBody();\n\t\t\t\t\t\t$response = json_decode($body,true);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = [\n\t\t\t\t\t\t\t'email_id' => $email_id,\n\t\t\t\t\t\t\t'type' => 'BigCommerce',\n\t\t\t\t\t\t\t'action' => 'script_tag_deletion',\n\t\t\t\t\t\t\t'api_url' => addslashes($url),\n\t\t\t\t\t\t\t'api_request' => addslashes($request),\n\t\t\t\t\t\t\t'api_response' => addslashes($body),\n\t\t\t\t\t\t\t'token_validation_id' => $validation_id,\n\t\t\t\t\t\t];\n\t\t\t\t\t\t$builderinsert = $db->table('api_log'); \n\t\t\t\t\t\t$builderinsert->insert($data);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\tlog_message('info', 'exception:'.$e->getMessage());\n\t\t\t\t}\n\t\t\t\t$builderdelete = $db->table('payu_scripts'); \n\t\t\t\t$builderdelete->delete(['script_id' => $v['script_id']]);\n\t\t\t}\n\t\t}\n\t}", "public function deleteMulti($keys) {\n\t\treturn $this->obj->delete($keys) > 0;\n\t}", "public function deleteItem(...$keys): void;", "public static function delete_multi($pool, array $keys){\n if ($keys) {\n foreach ($keys as $key) {\n if (array_key_exists($key, self::$local)) {\n unset(self::$local[$key]);\n }\n }\n }\n }", "public function deleteMultiple($keys)\n {\n return (bool)$this->deleteItems($keys);\n }", "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t$result;\n\n\t\t$param = \"/\" . $key;\n\n\t\t$path = $script . $param;\n\t\t$jsonKey = json_encode($key);\n\t\t$r = $this->http->POST($path, $jsonKey, $result);\n\t\tif ($r) {\n\t\t\t$retList = json_decode($result);\n\t\t}\n\n\t\treturn $r;\n\t}", "public function multiPut($keyList, $valList, $exp = 0)\n\t{\n\t\tif (count($keyList) != count($valList))\n\t\t\treturn false;\n\n\t\t$data = array_combine($keyList, $valList);\n\n\t\t$result;\n\n\t\t$param = \"?command=put\";\n\t\tif ($exp > 0) {\n\t\t\t$param .= \"&expire=\" . $exp;\n\t\t}\n\n\t\t$path = self::PATH_MULTI . $param;\n\t\t$jsonData = json_encode($data);\n\t\treturn $this->http->POST($path, $jsonData, $result);\n\t}", "public function testScriptPut($script, $key, &$ret)\n\t{\n\t\t// initialize key array\n\t\t$keyArr = array();\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$keyArr[$this->hosts[$i]] = array();\n\t\t}\n\n\t\t// split keys according to the host\n\t\t$host = $this->hostFromKey($key);\n\t\tarray_push($keyArr[$host], $key);\n\n\t\t$result = false;\n\n\t\t// process testScriptPut if key exists\n\t\tfor ($i = 0; $i < count($this->hosts); $i++) {\n\t\t\t$host = $this->hosts[$i];\n\t\t\t$ret;\n\t\t\tif (count($keyArr[$host]) > 0) {\n\t\t\t\t$simpleCache = $this->cacheFromHost($host);\n\t\t\t\t$r = $simpleCache->testScriptPut($script, $key, $ret);\n\t\t\t\t$result |= $r;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function multiDeleteAction() {\n\n if ($this->getRequest()->isPost()) {\n\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n\n if ($key == 'delete_' . $value) {\n\n //DELETE SITESTORES FROM DATABASE\n $store_id = (int) $value;\n\n //START SUB STORE WORK\n// $getSubStoreids = Engine_Api::_()->getDbtable('stores', 'sitestore')->getsubStoreids($store_id);\n// foreach ($getSubStoreids as $getSubStoreid) {\n// Engine_Api::_()->sitestore()->onStoreDelete($getSubStoreid['store_id']);\n// }\n //END SUB STORE WORK\n\n Engine_Api::_()->sitestore()->onStoreDelete($store_id);\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }", "function delete_list($item_kit_ids)\n\t{\n\t\t$this->db->where_in('item_kit_id',$item_kit_ids);\n\t\treturn $this->db->update('item_kits', array('deleted' => 1));\n \t}", "public function deleteSelection($list)\n {\n }", "public function deleteMultiple(array $keys) {\n // have to flip it and flip it back.\n $changedKeys = array_flip($this->changeKeys(array_flip($keys)));\n return $this->backend->deleteMultiple($changedKeys);\n }" ]
[ "0.9171917", "0.7732598", "0.74495053", "0.7343294", "0.73166597", "0.6595508", "0.6165709", "0.60019684", "0.5961162", "0.5954369", "0.58254915", "0.5825321", "0.57509387", "0.56817156", "0.5590572", "0.55231327", "0.53390783", "0.52786654", "0.5273345", "0.524263", "0.5223399", "0.52053887", "0.5195408", "0.51801664", "0.51543814", "0.51399744", "0.51167876", "0.5057359", "0.50472426", "0.50422126" ]
0.89821523
1
check if filename_retina is empty or not
function checkfiletypes_retina_flibusbox($filename_retina) { if( ! empty( $filename_retina ) ){ $sizeimage = getimagesize($filename_retina); $maximum = array('width' => '88', 'height' => '304'); $width = $sizeimage[0]; $height = $sizeimage[1]; $mimeTypes = array( 'jpg' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', 'bmp' => 'image/bmp', 'jpeg' => 'image/jpeg', 'jpe' => 'image/jpeg'); $checkMt = $sizeimage['mime']; /**** check dimensions of images ****/ if( $width > $maximum['width'] ) { echo "<span class=\"error-upload-files\">" . sprintf( __('Image dimensions are wrong. Maximum width is %s px. Uploaded image width is %s px', 'flibusbox_textdomain'), $maximum['width'], $width ) . "</span><br />"; } if ( $height > $maximum['height'] ) { echo "<span class=\"error-upload-files\">" . sprintf( __('Image dimensions are wrong. Maximum height is %s px. Uploaded image height is %s px', 'flibusbox_textdomain'), $maximum['height'], $height ) . "</span><br />"; } /**** check mimes type ****/ if( ! in_array($checkMt, $mimeTypes) ) { echo "<span class=\"error-upload-files\">" . __('bad extension. for a good use of this plugin, you must choose an images with this extension : jpg, jpeg, jpe, gif, png, bmp', 'flibusbox_textdomain') . "</span>"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_empty($data)\r\n {\r\n try {\r\n $file_name = $data[\"image\"][\"name\"];\r\n if (!empty ($file_name)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } catch (Exception $exception) {\r\n echo $exception->getMessage();\r\n }\r\n }", "private function checkFile()\n {\n $this->err_no_file = false;\n\n if ( !(isset($this->file['size']) && (int) $this->file['size']) )\n $this->err_no_file = true;\n\n return $this->err_no_file;\n }", "function check_image($sourcepath){\n\tif(@$size = getimagesize($sourcepath)){\n\t\tif(!in_array($size[2],array(IMAGETYPE_GIF,IMAGETYPE_JPEG,IMAGETYPE_PNG))){\n\t\t\treturn false;\n\t\t}\n\t}else{\n\t\treturn false;\n\t}\n\treturn $size;\n}", "function is_valid_image($filename) {\n\tglobal $_zp_supported_images;\n\t$ext = strtolower(substr(strrchr($filename, \".\"), 1));\n\treturn in_array($ext, $_zp_supported_images);\n}", "function um_is_temp_image( $url ) {\r\n\t$url = explode( '/ultimatemember/temp/', $url );\r\n\tif (isset( $url[1] )) {\r\n\t\t$src = UM()->files()->upload_temp . $url[1];\r\n\t\tif (!file_exists( $src ))\r\n\t\t\treturn false;\r\n\t\tlist( $width, $height, $type, $attr ) = @getimagesize( $src );\r\n\t\tif (isset( $width ) && isset( $height ))\r\n\t\t\treturn $src;\r\n\t}\r\n\r\n\treturn false;\r\n}", "function est_image($url){\n return file_exists($url) && is_array(getimagesize($url)) ;\n}", "function fileExitsCheck($defaultimg='', $path, $filename)\n{\n $image= $defaultimg==''? asset('assets/img/icons/common/add.png'): $defaultimg;\n\n $imgurl= public_path($path.'/'.$filename);\n if ($filename != null && file_exists($imgurl)) {\n $isimgurl=URL::asset($path.'/'.$filename);\n $image=$isimgurl;\n }\n return $image;\n}", "function checkGdFileType($filename)\n\t{\n\t\t$arr = @getimagesize($filename);\n\t\t$res = false;\n\t\tif (is_array($arr)) {\n\t\t\tswitch ($arr[2]) {\n\t\t\t\tcase 1:\n\t\t\t\t\tif (function_exists('imagecreatefromgif') && function_exists('imagegif')) {\n\t\t\t\t\t\t$this->gdNoSupport = 'GIF';\n\t\t\t\t\t\t$res = true;\n\t\t\t\t\t} \n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif (function_exists('imagecreatefromjpeg') && function_exists('imagejpeg')) {\n\t\t\t\t\t\t$this->gdNoSupport = 'JPG';\n\t\t\t\t\t\t$res = true;\n\t\t\t\t\t} \n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif (function_exists('imagecreatefrompng') && function_exists('imagepng')) {\n\t\t\t\t\t\t$this->gdNoSupport = 'PNG';\n\t\t\t\t\t\t$res = true;\n\t\t\t\t\t} \n\t\t\t\t\tbreak;\n\t\t\t}\t\n\t\t}\n\t\treturn $res;\n\t}", "private function _checkFileOnFS()\n {\n $file_wo_ext = $this->store_path . $this->id;\n if ( file_exists($file_wo_ext . '.jpg') ) {\n $this->file_path = $file_wo_ext . '.jpg';\n $this->format = 'jpg';\n $this->mime = 'image/jpeg';\n return true;\n } elseif ( file_exists($file_wo_ext . '.png') ) {\n $this->file_path = $file_wo_ext . '.png';\n $this->format = 'png';\n $this->mime = 'image/png';\n return true;\n } elseif ( file_exists($file_wo_ext . '.gif') ) {\n $this->file_path = $file_wo_ext . '.gif';\n $this->format = 'gif';\n $this->mime = 'image/gif';\n return true;\n }\n return false;\n }", "static function checkImageSrc($img) \n{\n\t//echo (__DIR__).'/../../uploads/'.$img;\n\tif(file_exists((__DIR__).'/../../uploads/'.$img) && !empty($img))\n\treturn 1;\n\telse\n\treturn null;\n}", "function validazione(bool &$file)\n { \n if($this->size<=0 && $this->copertina>=65535) \n $file = false;\n if($this->type!='image/jpeg' && $this->type!='image/gif' && $this->type!='image/png' && $this->type!='image/svg')\n $file = false; \n }", "function is_image_request()\n{\n\n $image_path = \"\";\n\n if($GLOBALS['RM_REQ']['URI'][1] == \"common\" &&\n $GLOBALS['RM_REQ']['URI'][2] == \"img\" &&\n $GLOBALS['RM_REQ']['URI'][3] != \"\" &&\n image_exists())\n {\n return true;\n }\n else\n {\n return false;\n }\n \n}", "function magic_if_image($file_path)\n{\n\n\tglobal $is_image;\n\n\t$info = new SplFileInfo($file_path);\n\n\t$filetype=$info->getExtension(); \n\n\tif($filetype=='jpg' || $filetype=='png' || $filetype=='bmp' || $filetype=='gif' || $filetype=='jpeg'){\n\n\t\t$is_image='Yes';\n\n\t}else{\n\t\t$is_image='No';\n\t}\n\n\n\treturn $is_image;\n\n}", "public function hasFilename()\n {\n return $this->filename !== null;\n }", "public function hasFilename()\n {\n return $this->filename !== null;\n }", "function checkType($name, $type){\n $extension = pathinfo($name, PATHINFO_EXTENSION); //better way to get extension\n if (!empty($name)) {\n if (($extension == 'jpg' || $extension == 'png' || $extension == 'jpeg' || $extension == 'gif') && ($type == 'image/jpeg' || $type == 'image/png' || $type == 'image/jpg') || $type == 'image/gif') {\n return true;\n } else{\n echo 'Ce n\\'est pas une image';\n return false;\n }\n }\n }", "private static function is_empty($file) {\n return (!$file || empty($file['name']));\n }", "protected function check_sprite_info()\n\t{\n\t\t$dir_scan = scandir($this->sprite_path, 1);\n\t\techo 'Reading sprite: '. $this->sprite_path .'/'. $dir_scan[0] .\" - \". $this->get_time() .\"s\\n\";\n\n\t\t$this->sprite_type = exif_imagetype($this->sprite_path .'/'. $dir_scan[0]);\n\n\t\tif (in_array($this->sprite_type, $this->allowed_sprite_types))\n\t\t{\n\t\t\t$this->sprite_info = getimagesize($this->sprite_path .'/'. $dir_scan[0]);\n\t\t\tprint_r($this->sprite_info);\n\t\t\t\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function validateFile($filename, $from)\n\t{\n\t\tif ($filename == \"\" || !file_exists($filename)) {\n\t\t\t$this->setError('PHP_IMAGE_NO_IMG_ERR', array($from), array($from, $filename));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$arr = @getimagesize($filename);\n\t\t$res = false;\n\t\tif (is_array($arr)) {\n\t\t\tswitch ($arr[2]) {\n\t\t\t\tcase 1:\n\t\t\t\tcase 2:\n\t\t\t\tcase 3:\n\t\t\t\t\t$res = true;\n\t\t\t\t\tbreak;\n\t\t\t}\t\n\t\t}\n\t\tif (!$res) {\n\t\t\t$this->setError('PHP_IMAGE_INV_IMG', array($from), array($from, $filename));\n\t\t}\n\t\treturn $res;\n\t}", "public function hasImage()\r\n {\r\n return $this->getImage() != '';\r\n }", "public function imageHasNotBeenMapped($filename);", "function is_image($file){\n return strstr(mimetype($file),\"image\")!==FALSE;\n}", "public function valid()\n {\n\n if ($this->container['image_file'] === null) {\n return false;\n }\n if (strlen($this->container['image_file']) < 1) {\n return false;\n }\n return true;\n }", "public function hasImageURL()\n {\n return !empty($this->image_url);\n }", "function check_image_format($file)\n {\n if(strtolower($file) == \"png\" || strtolower($file) == \"jpg\" || strtolower($file) == \"bmp\" || strtolower($file) == \"jpeg\"){\n return true;\n }\n else{\n return false;\n }\n }", "private function checkType()\n {\n $this->err_extension = false;\n\n if ( !isset($this->file['name']) ) {\n $this->err_extension = true;\n\n return $this->err_extension;\n }\n\n $this->path_info = pathinfo($this->file['name']);\n\n if ( empty($this->path_info['extension']) ) {\n $this->err_extension = true;\n\n return $this->err_extension;\n }\n\n if ( !$this->extensions )\n $this->err_extension = false;\n\n elseif ( !in_array(strtolower($this->path_info['extension']), array_map('strtolower', $this->extensions)) )\n $this->err_extension = true;\n\n return $this->err_extension;\n }", "function checkifexists(){\n\tif (file_exists($GLOBALS['target_file']) && $GLOBALS['fexists'] != null) {\n\t\t$GLOBALS['fexists'] = $GLOBALS['fexists'] . \", \" . basename($_FILES[\"uploadfile\"][\"name\"][$GLOBALS['y']]);\n\t\t$GLOBALS['uploadOk'] = 0;\n\t}elseif(file_exists($GLOBALS['target_file'])){\n\t\t$GLOBALS['fexists'] = basename($_FILES[\"uploadfile\"][\"name\"][$GLOBALS['y']]);\n\t\t$GLOBALS['uploadOk'] = 0;\n\t}else{\n\t\t$GLOBALS['uploadOk'] = 1;\n\t}\n}", "function hasLogo(){\n\t\t$real_path = APPLICATION_PATH.\"/../public/uploads/farmgroups/group_\";\n\t\t$real_path = $real_path.$this->getID().DIRECTORY_SEPARATOR.\"large_\".$this->getLogo();\n\t\tif(file_exists($real_path) && !isEmptyString($this->getLogo())){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function test_image_size_method_with_nonexistent_image()\n {\n $result = $this->website_object->image_size(\n 'https://www.example.com/elephpant.png'\n );\n\n $this->assertFalse($result);\n $this->assertInternalType('bool', $result);\n }", "function hasProfileImage($id, $photoname){\n\t$real_path = APPLICATION_PATH.\"/../public/uploads/user_\";\n \tif (APPLICATION_ENV == \"production\") {\n \t\t$real_path = str_replace(\"public/\", \"\", $real_path); \n \t}\n\t$real_path = $real_path.$id.DIRECTORY_SEPARATOR.\"avatar\".DIRECTORY_SEPARATOR.\"base_\".$photoname;\n\tif(file_exists($real_path) && !isEmptyString($photoname)){\n\t\treturn true;\n\t}\n\treturn false;\n}" ]
[ "0.6559555", "0.6394239", "0.6155735", "0.609629", "0.60850316", "0.60784715", "0.6007", "0.59514517", "0.59343493", "0.59326285", "0.59309316", "0.5915272", "0.59030735", "0.5901235", "0.5901235", "0.5889476", "0.5889176", "0.5882358", "0.5875083", "0.5869474", "0.586594", "0.5843514", "0.58161294", "0.58100444", "0.5772323", "0.5749239", "0.570837", "0.5706815", "0.56880885", "0.5685212" ]
0.6778029
0
Get the Dao object
public function getDao() { return parent::getDao(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDao();", "public function getDao()\n {\n return $this->dao;\n }", "protected function getDao()\n {\n if (empty($this->_dao)) {\n $this->_dao = $this->daoFactory();\n }\n\n return $this->_dao;\n }", "public static function dao($name)\n\t{\n\t\treturn self::_getDAOInstanceOf($name);\n\t}", "protected abstract function getStandardDao();", "private function getAseguradoraDao()\n {\n if (! $this->aseguradoraDao) {\n $sm = $this->getServiceLocator();\n $this->aseguradoraDao = $sm->get('Application\\Model\\Dao\\AseguradoraDao');\n }\n return $this->aseguradoraDao;\n }", "public function getDataAccessObject(): DAO\n {\n return $this->dbc;\n }", "private function getClienteDao()\n {\n if (! $this->clienteDao) {\n $sm = $this->getServiceLocator();\n $this->clienteDao = $sm->get('Application\\Model\\Dao\\ClienteDao');\n }\n return $this->clienteDao;\n }", "public function get_device_dao()\n {\n if ($this->m_device_dao === null)\n {\n throw new isys_exception_dao('The device dao was not yet instantiated');\n } // if\n\n return $this->m_device_dao;\n }", "private function getAseguradoraClienteDao()\n {\n if (! $this->aseguradoraClienteDao) {\n $sm = $this->getServiceLocator();\n $this->aseguradoraClienteDao = $sm->get('Application\\Model\\Dao\\AseguradoraClienteDao');\n }\n return $this->aseguradoraClienteDao;\n }", "public static function getDao($daoName) {\n\n }", "public function getDaoContainer()\r\n {\r\n return $this->daoContainer;\r\n }", "public function get_identifier_dao()\n {\n if ($this->m_identifier_dao === null)\n {\n throw new isys_exception_dao('The identifier dao was not yet instantiated');\n } // if\n\n return $this->m_identifier_dao;\n }", "protected function getDao($name, $config = NULL) {\r\n return Ddth_Dao_BaseDaoFactory::getInstance($config)->getDao($name);\r\n }", "public static function getDao($daoName) {\n\t if(static::$debug) echo __METHOD__.PHP_EOL;\n\n\t if(is_null(self::$dbref))\n\t\techo \"__ Mandatory call to connect() first\".PHP_EOL;\n\t else {\n\n\t\tif(class_exists($daoName))\n\t\t return new $daoName(self::$dbref);\n\t\telse echo \"Unable to instanciate $daoName\";\n\n\t }\n }", "public final static function getInstance() {\n\t\tif(!isset(self::$dao)) {\n\t\t\tself::$dao= new UtilisateurDAO();\n\t\t\tself::$liste = array();\n\t\t}\n\t\treturn self::$dao;\n\t}", "protected function buildDAO() {\n $typeOf = get_class($this);\n $typeOf = str_replace(\"Business\", \"DAO\", $typeOf);\n $typeOf .= \"DAO\";\n $dao = new $typeOf;\n return $dao;\n }", "public function dataEntityManagerObject() : Object\n {\n /* build the data mapper factory object */\n $dataMapperFactory = new DataMapperFactory();\n $dataMapper = $dataMapperFactory->create(DatabaseDriverFactory::class, $this->environment);\n if ($dataMapper) {\n /* build the query builder factory object */\n $queryBuilderFactory = new QueryBuilderFactory();\n /* todo we will need to have a QueryBuilderDriverFactory::class which loads the relevant query based on the database driver selected */\n $queryBuilder = $queryBuilderFactory->create(QueryBuilder::class);\n if ($queryBuilder) {\n /* build the entity manager factory object */\n $entityManagerFactory = new EntityManagerFactory($dataMapper, $queryBuilder);\n return $entityManagerFactory->create(Crud::class, $this->tableSchema, $this->tableSchemaID);\n }\n }\n }", "public function __construct()\n {\n $this->db = new OnibusDAO(); // estanciando o model\n }", "protected function getTableGeneratorDao() {\n\t\treturn Application::getInstance()->getDiContainer()->getDao('TableGenerator');\n\t}", "public static function getTradeDao()\n {\n return self::getDao( '\\base\\dao\\impl\\Trade', self::getDB() );\n }", "public static function getObject()\n {\n $db = Context::get('_db');\n if(!$db){\n $conn = Pool::getConn();\n $db = new Database($conn);\n Context::set('_db', $db);\n\n # 归还连接\n Coroutine::defer(function() use($conn) {\n Pool::releaseConn($conn);\n });\n }\n\n return $db;\n }", "public function getAttendanceDao() {\n\n if (is_null($this->attendanceDao)) {\n\n $this->attendanceDao = new AttendanceDao();\n }\n\n return $this->attendanceDao;\n }", "public static function getDao($schema = \"main\",$daoType = null) {\n switch($schema) {\n case \"game\":\n return self::getGameDao(R::gid(), R::sdkid(), R::serverid());\n case 'analysis':\n case \"main\":\n case \"slave\":\n default:\n $dao = Y::factory(null != $daoType?$daoType: self::$daoType,'Dao');\n $dao->connect($schema);\n return $dao;\n }\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('DmAutoSeo');\n }", "function Instance()\n\t{\n\t\treturn $this->pdo;\n\t}", "public function getPdo();", "public function getPdo();", "public function getPdo();", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Modelo');\n }" ]
[ "0.80578053", "0.793029", "0.7689825", "0.7155727", "0.71236116", "0.70259196", "0.7003509", "0.68402815", "0.6829489", "0.67638123", "0.6745027", "0.6667649", "0.66423684", "0.65694225", "0.656834", "0.65382856", "0.6428427", "0.64000255", "0.6387627", "0.63833386", "0.6258889", "0.6252766", "0.62166965", "0.6213051", "0.61901957", "0.6130195", "0.6129826", "0.6129826", "0.6129826", "0.6095852" ]
0.79915535
1
Store a newly created tanaman in storage.
public function store(CreatetanamanRequest $request) { $input = $request->all(); $tanaman = $this->tanamanRepository->create($input); Flash::success('Tanaman saved successfully.'); return redirect(route('tanamen.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n {\n $this->storage->set($this);\n\n }", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store() {\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}", "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.70372087", "0.6714449", "0.6680256", "0.6680256", "0.6680256", "0.6647894", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515", "0.66461515" ]
0.7042507
0
Display a landing page for a received registration payment.
function landing($args) { $this->validate(); $this->setupTemplate(); $user =& Request::getUser(); $schedConf =& Request::getSchedConf(); if (!$user || !$schedConf) Request::redirect(null, null, 'index'); $registrationDao =& DAORegistry::getDAO('RegistrationDAO'); $registrationId = $registrationDao->getRegistrationIdByUser($user->getId(), $schedConf->getId()); $registration =& $registrationDao->getRegistration($registrationId); $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('message', ($registration && $registration->getDatePaid()) ? 'schedConf.registration.landingPaid' : 'schedConf.registration.landingUnpaid'); $templateMgr->assign('backLink', Request::url(null, null, 'index')); $templateMgr->assign('backLinkLabel', 'common.continue'); $templateMgr->display('common/message.tpl'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRegisterPage()\n {\n echo $this->blade->render(\"register\", [\n 'signer' => $this->signer,\n ]);\n }", "public function showRegistration()\n {\n if(Auth::check())\n return Redirect::to(\"/\");\n $this->layout->content = View::make('registration');\n $this->layout->bodyclass = \"home-page\";\n }", "public function payment()\n {\n $this->template->write('title', 'Boutique: Payment Information'); \n \n $data['payment_info'] = '';\n \n $this->template->write_view('home_main_content', 'front_end/site_information/payment', $data, TRUE);\n $this->template->render();\n }", "function showPageRegistration()\n {\n if ($this->feedback) {\n echo $this->feedback . \"<br/><br/>\";\n }\n\n echo '<h2>Registration</h2>';\n\n echo '<form method=\"post\" action=\"' . $_SERVER['SCRIPT_NAME'] . '?action=register\" name=\"registerform\">';\n echo '<label for=\"login_input_username\">Username (only letters and numbers, 2 to 64 characters)</label>';\n echo '<input id=\"login_input_username\" type=\"text\" pattern=\"[a-zA-Z0-9]{2,64}\" name=\"user_name\" required />';\n echo '<label for=\"login_input_email\">User\\'s email</label>';\n echo '<input id=\"login_input_email\" type=\"email\" name=\"user_email\" required />';\n echo '<label for=\"login_input_password_new\">Password (min. 6 characters)</label>';\n echo '<input id=\"login_input_password_new\" class=\"login_input\" type=\"password\" name=\"user_password_new\" pattern=\".{6,}\" required autocomplete=\"off\" />';\n echo '<label for=\"login_input_password_repeat\">Repeat password</label>';\n echo '<input id=\"login_input_password_repeat\" class=\"login_input\" type=\"password\" name=\"user_password_repeat\" pattern=\".{6,}\" required autocomplete=\"off\" />';\n echo '<input type=\"submit\" name=\"register\" value=\"Register\" />';\n echo '</form>';\n\n echo '<a href=\"' . $_SERVER['SCRIPT_NAME'] . '\">Homepage</a>';\n }", "public function landing()\n\t{\n\t\t$this->template\t= false;\n\t\tview::render(\"main/landing\");\n\t}", "public function index($registration_id)\n\t{\n\t\t$registration = Registration::where('id',$registration_id)\n\t\t\t\t\t\t\t\t\t\t->where('paid_flag',0)\n\t\t\t\t\t\t\t\t\t\t->where('registered_flag',0)\n\t\t\t\t\t\t\t\t\t\t->first();\n\t\tif(!$registration){\n\t\t\treturn redirect('/');\n\t\t}\t\t\n\t\treturn view('payment')->with('registration',$registration);\t\n\t}", "public function registration()\n {\n $view = new View('login_registration');\n $view->title = 'Bilder-DB';\n $view->heading = 'Registration';\n $view->display();\n }", "public function landing()\n {\n require_once'model/validation.php';\n $this->_f3->set('cssLink', 'landing.css');\n $this->_f3->set('valid', 'validateLogin.js');\n $this->_f3->set('formLink', '//cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.2.1/css/material.min.css');\n echo Template::instance()->render('view/login/landing.php');\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}", "public function paypageAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "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}", "public function index()\n {\n // Get the confirmation URL\n $shop = ShopifyApp::shop();\n $plan = new BillingPlan($shop, $this->chargeType());\n $plan->setDetails($this->planDetails($shop));\n\n // Do a fullpage redirect\n return view('shopify-app::billing.fullpage_redirect', [\n 'url' => $plan->getConfirmationUrl(),\n ]);\n }", "function registration() {\n\t\t$this->addCheck(new HandlerValidatorSchedConf($this));\n\t\t$this->validate();\n\n\t\t$conference =& Request::getConference();\n\t\t$schedConf =& Request::getSchedConf();\n\n\t\t$paymentManager =& OCSPaymentManager::getManager();\n\t\tif (!$paymentManager->isConfigured()) {\n //Request::redirect(null, null, 'index');\n echo \"payment manager is not configured\";\n return;\n }\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t//$templateMgr->assign('pageHierarchy', array(\n\t\t//\tarray(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),\n\t\t//\tarray(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));\n $templateMgr->assign('pageHierarchy', array(\n\t\t\tarray(Request::url(null, null, 'index'), AppLocale::Translate('navigation.home'), true)));\n\t\tSchedConfHandler::setupTemplate($conference,$schedConf);\n\n\t\t$user =& Request::getUser();\n\t\t$registrationDao =& DAORegistry::getDAO('RegistrationDAO');\n\t\tif ($user && ($registrationId = $registrationDao->getRegistrationIdByUser($user->getId(), $schedConf->getId()))) {\n\t\t\t// This user has already registered.\n\t\t\t$registration =& $registrationDao->getRegistration($registrationId);\n\n\t\t\timport('payment.ocs.OCSPaymentManager');\n\t\t\t$paymentManager =& OCSPaymentManager::getManager();\n\n\t\t\tif (!$paymentManager->isConfigured() || !$registration || $registration->getDatePaid()) {\n\t\t\t\t// If the system isn't fully configured or the registration is already paid,\n\t\t\t\t// display a message and block the user from going further.\n \n $this->_registrationDisplay($registration);\n \n return;\n\t\t\t}\n\t\t}\n\n\t\t$typeId = (int) Request::getUserVar('registrationTypeId');\n\t\tif ($typeId) {\n\t\t\t// A registration type has been chosen\n\t\t\timport('registration.form.UserRegistrationForm');\n\n\t\t\tif (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor\n\t\t\t\t$form = new UserRegistrationForm($typeId);\n\t\t\t} else {\n\t\t\t\t$form =& new UserRegistrationForm($typeId);\n\t\t\t}\n\t\t\tif ($form->isLocaleResubmit()) {\n\t\t\t\t$form->readInputData();\n\t\t\t} else {\n\t\t\t\t$form->initData();\n\t\t\t}\n\t\t\t$form->display();\n\t\t} else {\n\t\t\t// A registration type has not been chosen; prompt for one.\n\t\t\t$registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');\n\t\t\t$registrationTypes =& $registrationTypeDao->getRegistrationTypesBySchedConfId($schedConf->getId());\n\t\t\t$templateMgr->assign_by_ref('registrationTypes', $registrationTypes);\n\t\t\treturn $templateMgr->display('registration/selectRegistrationType.tpl');\n\t\t}\n\t}", "public function showSuccessTemplate(array $fields, Payment $payment);", "public function registration_page() {\n\t\t$this->load->view('users/user_registration');\n\t}", "public function index()\n\t{\n\t\tSession::flush();\n\t\treturn view('registration.main')\n\t\t->with('pagin', 'registration');\n\t}", "public function showRegistrationStep1()\n {\n SEO::setTitle(__(\"Pendaftaran - Langkah 1\"));\n return view('auth.register.step-1');\n }", "public function index() {\n\n // Redirect logged in users\n if ($this->_loggedIn) {\n return Redirect::to('/');\n }\n\n // Check if register form or subscription plan view should be displayed\n $this->_selectedPlan = Input::get('subscription-plan');\n if (!isset($this->_selectedPlan) || !$this->_isValidSelectedPlan()) {\n return Redirect::to('plans');\n }\n\n // Render register view with all needed information\n return $this->_renderRegisterView();\n }", "public function showRegistrationForm()\n {\n $this->canRegister();\n\n return $this->response->setMetaTitle('Register')\n ->view('auth.register')\n ->layout('auth')\n ->output();\n }", "public function index()\n {\n return view('pages.customer.registration');\n }", "function showRegister() {\n $this->view->printFormRegister();\n }", "public function indexAction() {\n\t\t$form = $this->_getRegistrationForm();\n\t\t$this->view->form = $form;\n\t}", "public function registrationCompletedAction()\n {\n $view = $this->container->getParameter('bag_login.views');\n $settings = $this->container->getParameter('bag_login.email');\n \n return $this->render($view['registration_completed'], array('sendActivationEmail' => $settings['require_account_verification']));\n }", "public function home(){\r\n\t\t$this->security();\r\n\t\t// Include [Header ]\r\n\t\t@include(\"style/header.php\");\r\n\r\n\t\t// Notifications\r\n\t\tif(@$_GET['success'] == 'registration'){\r\n\t\t\t//$this->alert($lang['error'],$lang['notLeaveBlankFields'],'success');\r\n\t\t}\r\n\t\t// Include [Index - Footer]\r\n\t\t@include(\"style/index.php\");\r\n\t\t@include(\"style/footer.php\");\r\n\t}", "public function signup_success() {\n $this->template->content = View::instance('v_users_signup_success');\n $this->template->title = \"Signup Almost Complete\";\n echo $this->template;\n\n }", "public function show(Registration $registration)\n {\n //\n }", "public static function showSignUpPage(){\n InscriptionVue::getHtml();\n }", "public function showRegistrationForm()\n { \n abort_unless(config('boilerplate.access.user.registration'), 404);\n \n $companies = Company::where('status', 1)->get();\n return view('frontend.auth.register', ['companies' => $companies]);\n }", "public function showRegister(){\n $isLoggedIn = $this->isLoggedInFromSession();\n $username = $this->usernameFromSession();\n require_once __DIR__ . '../app/registering.php';\n }", "function display(){\n global $DOPBSP;\n \n $DOPBSP->views->backend_settings_payment_gateways->template(array('id' => $_POST['id']));\n \n die();\n }" ]
[ "0.700111", "0.6870081", "0.6769051", "0.67027974", "0.6614", "0.6590135", "0.6561108", "0.6549763", "0.64929163", "0.63930136", "0.6363398", "0.63078284", "0.6304532", "0.63017654", "0.625301", "0.6194781", "0.6188931", "0.61881953", "0.61809635", "0.61776435", "0.61776423", "0.6167135", "0.6147328", "0.61321163", "0.611436", "0.61029655", "0.60911554", "0.6070026", "0.60528386", "0.6051929" ]
0.7239787
0
Flash a key / value pair to the session.
public function flash($key, $value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function flash($key, $value)\n\t{\n\t\tArr::set($this->session['data'][':new:'], $key, $value);\n\t}", "public function flash($key, $value)\n {\n array_set($this->session['data'][':new:'], $key, $value);\n }", "public function flash($key, $value) {\n\t\t$this->newFlashData[$key] = $value;\n\t\t$this->allFlashData[$key] = $value;\n\t\t$_SESSION[$this->token . '_flash'][$key] = $this->encrypt($this->serialize($value));\n\t}", "final protected function flash($key, $value) {\n\t\t$this->flash->set($key, $value);\n\t}", "public static function flash($key, $value)\n\t{\n\t\tstatic::put(':new:'.$key, $value);\n\t}", "public function flash($key, $value)\n {\n $this->put($key, $value);\n $this->push('flash.new', $key);\n $this->removeFromOldFlashData(array($key));\n }", "public static function flash_set($key, $value) {\n // If we don't already have it, get a copy of the session\n self::$session = isset(self::$session) ? self::$session : Session::instance();\n \n self::$session->set($key, $value);\n }", "public static function addFlash($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "public function set(string $key, string $value)\n {\n $_SESSION['flash'][$key] = $value;\n }", "public function setFlash($key, $value) {\n\t\tYii::app()->user->setFlash($key, $value);\n\t}", "public function setFlash($key, $value = true, $removeAfterAccess = true);", "function setFlash ($key, $msg) {\n $_SESSION[$key] = $msg;\n }", "public function flash() {\n\t\t$_SESSION['flash']['request'] = $this->requestData;\n\t}", "public function flash()\n {\n $data = (serialize($this->messages));\n session(['flashy' => $data]);\n }", "public function setFlash($name, $value);", "static function set_flashdata( $key, $value ) {\n\t\t$_SESSION['flash_data'][$key] = $value;\n\t}", "public function flash(string $key, mixed $value) {\n $this->storage->set($key, $value);\n $flash = $this->storage->get(self::FLASH_KEY);\n $flash['new'][] = $key;\n $this->storage->set(self::FLASH_KEY, $flash);\n return $this;\n }", "function setFlash(string $_name, $val)\n{\n // Set the flash messae.\n $_SESSION['FLASH'][$_name] = $val;\n}", "public function setFlash($key, $value = true, $removeAfterAccess = true)\n {\n if (Yii::$app->response->format === Response::FORMAT_HTML) {\n Yii::$app->session->setFlash($key, $value, $removeAfterAccess);\n }\n }", "protected function flash()\n {\n $this->sessionStore->flash($this->configRepository->get('notification::session_prefix').$this->container, $this->getFlashable()->toJson());\n }", "function flash($id, $value)\n {\n if (!isset($_SESSION[$this->prefix]['flash'][$id]))\n $_SESSION[$this->prefix]['flash'][$id] = array();\n array_push($_SESSION[$this->prefix]['flash'][$id], $value);\n }", "public static function flash($name, $value=null){\n if(self::has($name)){\n //to get the value already stored in the session\n $old_value = self::get($name);\n //then remove the key($name)\n self::remove($name);\n\n return $old_value;\n } else{\n //add it to the session\n self::add($name, $value);\n }\n\n return null;\n }", "public function store()\n\t{\n\t\tSession::flash($this->key,static::$messages);\n\t}", "public static function set(string $key, string $message): void\n {\n if (session_status() === PHP_SESSION_NONE) {\n session_start();\n }\n $_SESSION['flash'][$key] = $message;\n }", "public function setFlash($key,$value,$defaultValue=null)\n\t{\n\t\t$this->setState(self::FLASH_KEY_PREFIX.$key,$value,$defaultValue);\n\t\t$counters=$this->getState(self::FLASH_COUNTERS,array());\n\t\tif($value===$defaultValue)\n\t\t\tunset($counters[$key]);\n\t\telse\n\t\t\t$counters[$key]=0;\n\t\t$this->setState(self::FLASH_COUNTERS,$counters,array());\n\t}", "function flash(string $key)\n\t{\n\t\t$value = $this->get($key);\n\t\t$this->remove($key);\n\t\treturn $value;\n\t}", "function flash($key = null, $value = null)\n{\n\tif(!is_null($key)) // getter/setter\n\t{\n\t\tif(!is_null($value)) // setter\n\t\t{\n\t\t\tdrone()->flash->set($key, $value);\n\t\t\treturn;\n\t\t}\n\n\t\treturn drone()->flash->get($key); // getter\n\t}\n\treturn drone()->flash;\n}", "public function flash(array $data)\n {\n $flashData = $this->session()->get($this->sessionName());\n $flashData['new'] = $data;\n\n $this->session()->set($this->sessionName(), $flashData);\n }", "function flash($status, $message) {\n $_SESSION['flash'] = ['status' => $status, 'message' => $message];\n }", "public function addFlashMessage(string $key, string $message): void\n {\n $this->session['flashMessages'][$key] = $message;\n }" ]
[ "0.82673764", "0.81675565", "0.81120193", "0.80533046", "0.7871325", "0.7770752", "0.772433", "0.75717676", "0.7366182", "0.7336931", "0.7179245", "0.71517074", "0.7031296", "0.6922624", "0.68996626", "0.6898305", "0.68457305", "0.6820287", "0.67680144", "0.6761486", "0.6734327", "0.6587951", "0.65610987", "0.65480155", "0.65295213", "0.65077806", "0.64929825", "0.6468824", "0.6411177", "0.6362825" ]
0.8198106
1
Make a question to test "Finding a point in the coordinate system"
public function make_geogebra_question_point() { question_bank::load_question_definition_classes('geogebra'); $geo = new qtype_geogebra_question(); test_question_maker::initialise_a_question($geo); $geo->name = "Finding a point in the plane"; $geo->questiontext = "Drag the point to ({a}/{b})"; $geo->generalfeedback = 'Generalfeedback: Dragging a point isn\'t to hard.'; $geo->ggbxml = ggbstringsfortesting::$pointxml; $geo->ggbparameters = ggbstringsfortesting::$pointparameters; $geo->ggbviews = ggbstringsfortesting::$views; $geo->ggbcodebaseversion = '5.0'; $geo->israndomized = 1; $geo->randomizedvar = 'a,b,'; $geo->answers = array( 13 => new question_answer(13, 'e', 1.0, 'Very Good!', FORMAT_HTML) ); $geo->qtype = question_bank::get_qtype('geogebra'); return $geo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFindByPoint()\n {\n $point = static::createPointA();\n $entity = new PointEntity();\n\n $entity->setPoint($point);\n $this->getEntityManager()->persist($entity);\n $this->getEntityManager()->flush();\n\n $result = $this->getEntityManager()->getRepository(self::POINT_ENTITY)->findByPoint($point);\n\n static::assertEquals($entity, $result[0]);\n }", "function loc($xy, $r)\r\n{\r\n\treturn sqrt($r * $r - $xy * $xy);\r\n}", "public function pointCanBeCreatedFromXAndYPosition(): void\n {\n $point = new Lambert72Point(97000.00, 171000.00);\n $this->assertSame(97000.00, $point->xPosition());\n $this->assertSame(171000.00, $point->yPosition());\n }", "function isInside($x, $y, $r)\r\n{\r\n\treturn $x * $x + $y * $y <= $r * $r;\r\n}", "function pointLocation() {\n \n }", "public function a_point_has_correct_points()\n {\n $points = 100;\n\n $point = factory(Point::class)->create(['name' => 'Green', 'key' => 'green', 'points' => $points]);\n\n $this->assertEquals($points, $point->points);\n }", "public function testPoint()\n {\n $entity = $this->persistPointA();\n static::assertIsRetrievableById($this->getEntityManager(), $entity);\n }", "public function testValidateCoordNok2()\n {\n $res = $this->ipObj->validateCoord('127.0.0.1');\n $this->assertFalse($res);\n }", "public function testPointDouble()\n {\n //var_dump($point);\n }", "public static function validatePoint($x, $y, $a, $b, $p){\r\n $x = gmp_init($x, 16);\r\n $y2 = gmp_mod(\r\n gmp_add(\r\n gmp_add(\r\n gmp_powm($x, gmp_init(3, 10), $p),\r\n gmp_mul($a, $x)\r\n ),\r\n $b\r\n ),\r\n $p\r\n );\r\n $y = gmp_mod(gmp_pow(gmp_init($y, 16), 2), $p);\r\n\r\n if(gmp_cmp($y2, $y) == 0)\r\n return true;\r\n else\r\n return false;\r\n }", "function neighbour_verification($array, $x, $y) {\n\n $test_match = 0;\n\n foreach($array as $value) {\n if ($value['x'] == $x + 1 and $value['y'] == $y) {$test_match++;}\n if ($value['x'] == $x - 1 and $value['y'] == $y) {$test_match++;}\n if ($value['x'] == $x and $value['y'] == $y + 1) {$test_match++;}\n if ($value['x'] == $x and $value['y'] == $y - 1) {$test_match++;}\n }\n\n echo \"checkin path box...\\n\";\n return $test_match;\n}", "public function get_geogebra_question_data_point() {\n $q = new stdClass();\n $q->name = 'Finding a point in the plane';\n $q->questiontext = \"Drag the point to ({a}/{b})\";\n $q->questiontextformat = FORMAT_HTML;\n $q->generalfeedback = \"Generalfeedback: Dragging a point isn't to hard\";\n $q->generalfeedbackformat = FORMAT_HTML;\n $q->defaultmark = 1;\n $q->penalty = 0.3333333;\n $q->qtype = 'geogebra';\n $q->length = '1';\n $q->hidden = '0';\n $q->createdby = '2';\n $q->modifiedby = '2';\n $q->options = new stdClass();\n $q->options->answers = array();\n $q->options->answers[0] = new stdClass();\n $q->options->answers[0]->answer = 'e';\n $q->options->answers[0]->fraction = '1.0000000';\n $q->options->answers[0]->feedback = 'Very good.';\n $q->options->answers[0]->feedbackformat = FORMAT_HTML;\n\n $q->options->ggbturl = 'https://tube.geogebra.org/student/mI8RJzVzI';\n $q->options->ggbxml = ggbstringsfortesting::$pointxml;\n $q->options->ggbparameters = ggbstringsfortesting::$pointparameters;\n $q->options->ggbviews = ggbstringsfortesting::$views;\n $q->options->ggbcodebaseversion = '5.0';\n $q->options->israndomized = 1;\n $q->options->randomizedvar = 'a,b,';\n\n return $q;\n }", "public function testFunctionInPredicate()\n {\n $bigPolygon = $this->persistBigPolygon();\n $this->persistSmallPolygon();\n $this->getEntityManager()->flush();\n $this->getEntityManager()->clear();\n\n $query = $this->getEntityManager()->createQuery(\n // phpcs:disable Generic.Files.LineLength.MaxExceeded\n 'SELECT p FROM LongitudeOne\\Spatial\\Tests\\Fixtures\\PolygonEntity p WHERE PgSql_Translate(p.polygon, :x, :y) = :g'\n // phpcs:enable\n );\n $query->setParameter('g', 'POLYGON((4 -4.5,14 -4.5,14 5.5,4 5.5,4 -4.5))', 'string');\n $query->setParameter('x', 4.0);\n $query->setParameter('y', -4.5);\n $result = $query->getResult();\n\n static::assertCount(1, $result);\n static::assertEquals($bigPolygon, $result[0]);\n }", "public function testGetPointsComputer()\n {\n $game = new Game();\n $res = $game->getPointsComputer();\n $exp = 0;\n $this->assertEquals($exp, $res);\n }", "function checklocation($posx, $posy){\n\t\t//print_r($this->locationid);\n\t\t$taken = true;\n\t\t\tforeach($this->locationid as $key => $loc){\n\t\t\t\tif($this->locationid[$key][0] == $posx && $this->locationid[$key][1] == $posy){\n\t\t\t\t\t$taken = false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn $taken;\n\t}", "public function point ($x, $y) {}", "public function testGetLotsNearCoordinatesNotFound()\n {\n $response = $this->call('GET', 'api/lots_near_coordinates/latitude/37.375810/longitude/-122.043462');\n $result = $response->getContent();\n\n $this->assertEquals('There are no parking lots within 5 miles', $result);\n }", "function placeQueen($xCoordinate, $yCoordinate)\n{\n if ($xCoordinate < 0 || $yCoordinate < 0) {\n throw new InvalidArgumentException('The rank and file numbers must be positive.');\n }\n\n if ($xCoordinate > 7 || $yCoordinate > 7) {\n throw new InvalidArgumentException('The position must be on a standard size chess board.');\n }\n\n return true;\n}", "public function testGetAvailableNearCoordinatesNotFound()\n {\n $response = $this->call('GET', 'api/lots_near_coordinates/latitude/37.375810/longitude/-122.043462');\n $result = $response->getContent();\n\n $this->assertEquals('There are no parking lots within 5 miles', $result);\n }", "public function isValidPosition(){\r\n\t\treturn true;\r\n\t}", "function find_intersect_point($a, $b, $c,$d){ \n $vertical_ab = $vertical_cd =1;\n $M_ab = $M_cd = -1;\n\n if (($a->x-$b->x) != 0) {\n\t $M_ab = ($a->y -$b->y)/($a->x-$b->x);\n\t $C_ab = ($a->y) -($M_ab*$a->x);\n\t $vertical_ab = 0;\n }\n\n if (($c->x-$d->x) != 0) {\n\t $M_cd = ($c->y -$d->y)/($c->x-$d->x);\n\t $C_cd = $c->y - ($M_cd*$c->x);\n\t $vertical_cd = 0;\n }\n\n //check for parallel lines - these will never intersect!\n if ($M_ab == $M_cd) {\n\t return null;\n }\n if (($vertical_ab != 1) && ($vertical_cd != 1)){\n\t $I_x = ($C_cd-$C_ab)/($M_ab-$M_cd);\n\t $I_y = ($M_cd*$I_x) + $C_cd;\n }\n else if ($vertical_ab == 1){\n\t $I_x = $a->x;\n\t $I_y = ($M_cd*$I_x) + $C_cd;\n }\n else if ($vertical_cd == 1){\n\t $I_x = $c->x;\n\t $I_y = ($M_ab*$I_x) + $C_ab;\n }\n\n return new Point($I_x,$I_y);\n}", "private function _checkCoordinate($X, $Y){\n $position = $this->_db->fetchFirstRequest('getPositionByCoordinates', array(':X' => $X, \n\t\t\t\t\t\t\t\t\t\t':Y' => $Y, \n\t\t\t\t\t\t\t\t\t\t':battlefield' => $this->_data['battlefield_id']));\n return !empty($position);\n }", "function withinArea($lat,$long,$tableName,$geomColumn,$db,$finalProjection,$routeTable){\r\n $withinSQL = \"SELECT ST_Within(ST_SetSRID(ST_MakePoint(\".$long.\",\".$lat.\"),\".$finalProjection.\"),ST_Transform(ST_setSRID(ST_Extent(\".$geomColumn.\"),26910),\".$finalProjection.\")) FROM \".$routeTable;\r\n $withinResult = pg_query($db, $withinSQL);\r\n #if ($withinResult == false){\r\n # echo \"{\\\"error\\\":\\\"Routing error.\\\"}\";\r\n # exit;\r\n #}\r\n $row = pg_fetch_row($withinResult)[0];\r\n if ($row == 't'){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n}", "public function get_geogebra_question_form_data_point() {\n $form = new stdClass();\n $form->name = \"Finding a point in the plane\";\n $form->questiontext = array();\n $form->questiontext['format'] = \"1\";\n $form->questiontext['text'] = \"Drag the point to ({a}/{b})\";\n\n $form->defaultmark = 1;\n $form->generalfeedback = array();\n $form->generalfeedback['format'] = '1';\n $form->generalfeedback['text'] = \"Generalfeedback: Dragging a point isn't to hard\";\n\n $form->ggbturl = 'https://tube.geogebra.org/student/mI8RJzVzI';\n $form->ggbxml = ggbstringsfortesting::$pointxml;\n $form->ggbparameters = ggbstringsfortesting::$pointparameters;\n $form->ggbviews = ggbstringsfortesting::$views;\n $form->ggbcodebaseversion = '5.0';\n $form->israndomized = 1;\n $form->randomizedvar = 'a,b,';\n\n $form->noanswers = 1;\n $form->answer = array();\n $form->answer[0] = 'e';\n\n $form->fraction = array();\n $form->fraction[0] = '1.0';\n\n $form->feedback = array();\n $form->feedback[0] = array();\n $form->feedback[0]['format'] = '1';\n $form->feedback[0]['text'] = 'Very good.';\n\n $form->penalty = '0.3333333';\n $form->numhints = 2;\n $form->hint = array();\n $form->hint[0] = array();\n $form->hint[0]['format'] = '1';\n $form->hint[0]['text'] = '';\n\n $form->hint[1] = array();\n $form->hint[1]['format'] = '1';\n $form->hint[1]['text'] = '';\n\n $form->qtype = 'geogebra';\n return $form;\n }", "public function getXCoordinate(): int;", "public function testNextLocation() {\n\t\t$start = new Location(2, 3);\n\t\t$result = $this->PathFinder->nextLocation($start, $start);\n\t\t$this->assertTrue($start->equal($result));\n\n\t\t$ends = $start->neighborhood(1);\n\t\t$result = $this->PathFinder->nextLocation($start, $ends[0]);\n\t\t$this->assertEquals(1, $start->distance($result));\n\t}", "public function testGetValidLocationByLocationId() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"location\");\n\n\t\t// create a new location and insert to into mySQL\n\t\t$location = new Location(null, $this->VALID_storageCode, $this->VALID_description);\n\t\t$location->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoLocation = Location::getLocationByLocationId($this->getPDO(), $location->getLocationId());\n\t\t$this->assertSame($numRows + 1, $this->getConnection()->getRowCount(\"location\"));\n\t\t$this->assertSame($pdoLocation->getStorageCode(), $this->VALID_storageCode);\n\t\t$this->assertSame($pdoLocation->getDescription(), $this->VALID_description);\n\n\t}", "function proximity($place, $locations, $cities, $nums, $dates, $ticketing){\n\t\t\t\t\tif (in_array($place, $locations)){\n\t\t\t\t\t\techo \"There is an upcoming event in \" . $cities[$nums[$place]] . \", \" . $place . \" on \" . $dates[$nums[$place]] . \"!\";\n\t\t\t\t\t\techo \"</br>\";\n\t\t\t\t\t\tif ($ticketing[$nums[$place]]){\n\t\t\t\t\t\t\t// a separate page for purchasing tickets is in development\n\t\t\t\t\t\t\techo \"This is a Ticketed event. You may purchase them here (Link TBD).\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\techo \"Admission is free. All are welcome.\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\techo \"Sorry, but we couldn't find an event near your location\";\n\t\t\t\t\t}\n\t\t\t\t}", "static function ptInLineRing($sGeometry, $sPoint)\n {\n // posted at http://dev.mysql.com/doc/refman/5.1/en/functions-that-test-spatial-relationships-between-geometries.html\n $counter = 0;\n // get rid of unnecessary stuff\n $sGeometry = str_replace(\"LINESTRING\", \"\", $sGeometry);\n $sGeometry = str_replace(\"(\", \"\", $sGeometry);\n $sGeometry = str_replace(\")\", \"\", $sGeometry);\n $sPoint = str_replace(\"POINT\", \"\", $sPoint);\n $sPoint = str_replace(\"(\", \"\", $sPoint);\n $sPoint = str_replace(\")\", \"\", $sPoint);\n\n // make an array of points of the polygon\n $polygon = explode(\",\", $sGeometry);\n\n // get the x and y coordinate of the point\n $p = explode(\" \", $sPoint);\n $px = $p[0];\n $py = $p[1];\n\n // number of points in the polygon\n $n = count($polygon);\n $poly1 = $polygon[0];\n for ($i = 1; $i <= $n; $i ++) {\n $poly1XY = explode(\" \", $poly1);\n $poly1x = $poly1XY[0];\n $poly1y = $poly1XY[1];\n $poly2 = $polygon[$i % $n];\n $poly2XY = explode(\" \", $poly2);\n $poly2x = $poly2XY[0];\n $poly2y = $poly2XY[1];\n\n if ($py > min($poly1y, $poly2y)) {\n if ($py <= max($poly1y, $poly2y)) {\n if ($px <= max($poly1x, $poly2x)) {\n if ($poly1y != $poly2y) {\n $xinters = ($py - $poly1y) * ($poly2x - $poly1x) / ($poly2y - $poly1y) + $poly1x;\n if ($poly1x == $poly2x || $px <= $xinters) {\n $counter ++;\n }\n }\n }\n }\n }\n $poly1 = $poly2;\n } // end of While each polygon\n\n if ($counter % 2 == 0) {\n return (false); // outside\n } else {\n return (true); // inside\n }\n\n return true;\n }", "public function testNearest()\n {\n $postcodeClass = new Postcode();\n $response = $this->invokeMethod($postcodeClass, 'nearest', [self::POSTCODE_VALID]);\n $this->assertTrue(is_array($response));\n }" ]
[ "0.6349808", "0.5987589", "0.58741367", "0.5846224", "0.5821902", "0.5764426", "0.57310605", "0.5700302", "0.5690226", "0.5651788", "0.5633246", "0.55896163", "0.5573183", "0.5548471", "0.55170345", "0.5393363", "0.53279734", "0.531778", "0.5286751", "0.5278462", "0.5249239", "0.52303326", "0.51899326", "0.51747656", "0.51698154", "0.51606154", "0.5158563", "0.5121349", "0.511044", "0.5097282" ]
0.6053869
1
Make a form with data to test "Finding a point in the coordinate system"
public function get_geogebra_question_form_data_point() { $form = new stdClass(); $form->name = "Finding a point in the plane"; $form->questiontext = array(); $form->questiontext['format'] = "1"; $form->questiontext['text'] = "Drag the point to ({a}/{b})"; $form->defaultmark = 1; $form->generalfeedback = array(); $form->generalfeedback['format'] = '1'; $form->generalfeedback['text'] = "Generalfeedback: Dragging a point isn't to hard"; $form->ggbturl = 'https://tube.geogebra.org/student/mI8RJzVzI'; $form->ggbxml = ggbstringsfortesting::$pointxml; $form->ggbparameters = ggbstringsfortesting::$pointparameters; $form->ggbviews = ggbstringsfortesting::$views; $form->ggbcodebaseversion = '5.0'; $form->israndomized = 1; $form->randomizedvar = 'a,b,'; $form->noanswers = 1; $form->answer = array(); $form->answer[0] = 'e'; $form->fraction = array(); $form->fraction[0] = '1.0'; $form->feedback = array(); $form->feedback[0] = array(); $form->feedback[0]['format'] = '1'; $form->feedback[0]['text'] = 'Very good.'; $form->penalty = '0.3333333'; $form->numhints = 2; $form->hint = array(); $form->hint[0] = array(); $form->hint[0]['format'] = '1'; $form->hint[0]['text'] = ''; $form->hint[1] = array(); $form->hint[1]['format'] = '1'; $form->hint[1]['text'] = ''; $form->qtype = 'geogebra'; return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_geogebra_question_data_point() {\n $q = new stdClass();\n $q->name = 'Finding a point in the plane';\n $q->questiontext = \"Drag the point to ({a}/{b})\";\n $q->questiontextformat = FORMAT_HTML;\n $q->generalfeedback = \"Generalfeedback: Dragging a point isn't to hard\";\n $q->generalfeedbackformat = FORMAT_HTML;\n $q->defaultmark = 1;\n $q->penalty = 0.3333333;\n $q->qtype = 'geogebra';\n $q->length = '1';\n $q->hidden = '0';\n $q->createdby = '2';\n $q->modifiedby = '2';\n $q->options = new stdClass();\n $q->options->answers = array();\n $q->options->answers[0] = new stdClass();\n $q->options->answers[0]->answer = 'e';\n $q->options->answers[0]->fraction = '1.0000000';\n $q->options->answers[0]->feedback = 'Very good.';\n $q->options->answers[0]->feedbackformat = FORMAT_HTML;\n\n $q->options->ggbturl = 'https://tube.geogebra.org/student/mI8RJzVzI';\n $q->options->ggbxml = ggbstringsfortesting::$pointxml;\n $q->options->ggbparameters = ggbstringsfortesting::$pointparameters;\n $q->options->ggbviews = ggbstringsfortesting::$views;\n $q->options->ggbcodebaseversion = '5.0';\n $q->options->israndomized = 1;\n $q->options->randomizedvar = 'a,b,';\n\n return $q;\n }", "public function make_geogebra_question_point() {\n question_bank::load_question_definition_classes('geogebra');\n $geo = new qtype_geogebra_question();\n test_question_maker::initialise_a_question($geo);\n $geo->name = \"Finding a point in the plane\";\n $geo->questiontext = \"Drag the point to ({a}/{b})\";\n $geo->generalfeedback = 'Generalfeedback: Dragging a point isn\\'t to hard.';\n $geo->ggbxml = ggbstringsfortesting::$pointxml;\n $geo->ggbparameters = ggbstringsfortesting::$pointparameters;\n $geo->ggbviews = ggbstringsfortesting::$views;\n $geo->ggbcodebaseversion = '5.0';\n $geo->israndomized = 1;\n $geo->randomizedvar = 'a,b,';\n $geo->answers = array(\n 13 => new question_answer(13, 'e', 1.0, 'Very Good!', FORMAT_HTML)\n );\n $geo->qtype = question_bank::get_qtype('geogebra');\n\n return $geo;\n }", "function pointLocation() {\n \n }", "function getEstacionamientosRadio($x,$y){\n\t\t$this->resultado = pg_query($this->con,\"SELECT ST_AsText(estacionamientos.geom) as pos FROM estacionamientos WHERE ST_DISTANCE_SPHERE(estacionamientos.geom, ST_GEOMFROMTEXT('POINT($x $y)', 4326)) <= 30 AND estacionamientos.Reservado = 1\");\n\t}", "public function make_geogebra_question_manually() {\n question_bank::load_question_definition_classes('geogebra');\n $geo = new qtype_geogebra_question();\n test_question_maker::initialise_a_question($geo);\n $geo->name = \"Finding a point in the plane\";\n $geo->questiontext = \"Drag the point to ({a}/{b})\";\n $geo->generalfeedback = 'Generalfeedback: Dragging a point isn\\'t to hard.';\n $geo->ggbturl = 'https://tube.geogebra.org/student/mI8RJzVzI';\n $geo->ggbxml = ggbstringsfortesting::$pointxml;\n $geo->ggbparameters = ggbstringsfortesting::$pointparameters;\n $geo->ggbviews = ggbstringsfortesting::$views;\n $geo->ggbcodebaseversion = '5.0';\n $geo->israndomized = 0;\n $geo->randomizedvar = '';\n $geo->qtype = question_bank::get_qtype('geogebra');\n\n return $geo;\n }", "function polyGravity1($points){\n $x_sum = 0;\n $y_sum = 0;\n\n\n $num = count($points);\n foreach ($points as $p){\n //separate into individual x and y value\n $poly_x_y = explode(',', $p);\n \n\tif (count($poly_x_y)<2){\n echo \"Wrong Point format!!!: '$p'\\n\".count($points);\n debug_print_backtrace();\n }\n\t$x_sum += $poly_x_y[0];\n\t$y_sum += $poly_x_y[1];\n\n }\n \n $x_av = $x_sum/$num;\n $y_av = $y_sum/$num;\n return new Point( $x_av, $y_av);\n}", "public function pointCanBeCreatedFromXAndYPosition(): void\n {\n $point = new Lambert72Point(97000.00, 171000.00);\n $this->assertSame(97000.00, $point->xPosition());\n $this->assertSame(171000.00, $point->yPosition());\n }", "public function form()\n {\n\t\t$this->hidden('id');\n\t\t//$this->switch('open', '启用位置')->help('是否启用位置功能');\n $this->tags('poses', '设置位置')->help('设置位置,如 焦点,精华,固顶等');\n }", "function wpcf_fields_google_map_meta_box_form( $data ) {\n $form['name'] = array(\n '#name' => 'wpcf[' . $data['slug'] . ']', // Set this to override default output\n '#type' => 'textfield',\n '#title' => __( 'Add Google Map coordinates', 'wpcf' ),\n '#description' => __( 'Your input should look something like \"41.934146,12.455821\"', 'wpcf' )\n );\n return $form;\n}", "function queryMap() {\n\t\t$center_y = ($this->user->rolle->oGeorefExt->maxy + $this->user->rolle->oGeorefExt->miny) / 2;\n\t\tif($this->user->rolle->epsg_code == 4326){$unit = MS_DD;} else {$unit = MS_METERS;}\n\t\t$md = ($this->user->rolle->nImageWidth-1)/(96 * InchesPerUnit($unit, $center_y));\n\t\t$gd = $this->user->rolle->oGeorefExt->maxx - $this->user->rolle->oGeorefExt->minx;\n\t\t$this->map_scaledenom = round($gd/$md);\n # Abfragebereich berechnen\n\t\tif($this->formvars['querypolygon'] != ''){\n\t\t\t$rect = $this->formvars['querypolygon'];\n\t\t}\n\t\telse{\n\t\t\tif($this->formvars['rectminx'] != ''){\t\t\t// ?????????\n\t\t\t\t$rect = ms_newRectObj();\t\t\t\t\t\t\t\t\t\t// ?????????\n\t\t\t\t$rect->setextent($this->formvars['rectminx'],$this->formvars['rectminy'],$this->formvars['rectmaxx'],$this->formvars['rectmaxy']);\t\t// ?????????\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$rect = $this->create_query_rect($this->formvars['INPUT_COORD']);\n\t\t\t}\n\t\t}\n if($this->show_query_tooltip == true){\n $this->tooltip_query($rect);\n }\n else{\n $this->SachdatenAnzeige($rect);\n\t\t\tif($this->formvars['printversion'] != ''){\n\t\t\t\t$this->mime_type = 'printversion';\n\t\t\t}\n\t\t\t$this->output();\n }\n }", "function gymfitness_leaflet_location(){\n $location = get_field(\"location\");\n ?>\n <div id=\"location\">\n <p><?php get_field(\"location->'lng'\") ?></p>\n <input type=\"hidden\" id=\"lat\" value=\"<?php echo $location['lat'] ?>\" >\n <input type=\"hidden\" id=\"lng\" value=\"<?php echo $location['lng'] ?>\" >\n <input type=\"hidden\" id=\"zoom\" value=\"<?php echo $location['zoom'] ?>\" >\n <input type=\"hidden\" id=\"address\" value=\"<?php echo $location['address'] ?>\" >\n </div>\n <div id=\"map\"></div>\n<?php\n}", "protected function set_coordinates() \n {\n $response = $this->post_form('geocode/get', $this->base_query);\n\n $this->base_query['lat'] = $response->location->lat;\n $this->base_query['lon'] = $response->location->lon;\n }", "function wp_imovel_show_coords( $listing_id = false ) {\n\t\t\tif ( ! $listing_id ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// If latitude and logitude meta isn't set, returns false\n\t\t\t$coords = WP_IMOVEL_F::get_coordinates($listing_id);\n\t\t\tif ( $coords ) {\n\t\t\t\t_e( '<span class=\"description\">Address was validated by Google Maps.</span>', 'wp-imovel' );\n\t\t\t} else {\n\t\t\t\t_e( '<span class=\"description\">Address has not yet been validated, should be formatted as: street, city, state, postal code, country. Locations are validated through Google Maps.</span>', 'wp-imovel' );\n\t\t\t}\n\n\t\t}", "function webpinas_google_location_form() {\r\n webpinas_location_form_html();\r\n}", "function getEstacionamientosInternos(){\n\t\t$this->resultado = pg_query($this->con,\"SELECT ST_AsText(estacionamientos.geom) AS pos FROM estacionamientos,calle WHERE ST_DISTANCE_SPHERE(estacionamientos.geom,calle.geom) <= 5 AND calle.id = 1\");\n\t}", "public function index() {\n\t\tif(is_logged_in() === FALSE) {\n\t\t\t// Redirect to the home page\n\t\t\tredirect( base_url() );\n\t\t}\n\n\t\t// Load required libraries\n\t\t$this->load->library('form_validation');\n\n\t\t// Run form validation\n\t\tif($this->form_validation->run('locator') !== FALSE) {\n\t\t\t// Get submitted coordinates and round them to proper length\n\t\t\t$this->latitude = round($this->input->post('latitude'), 8);\n\t\t\t$this->longitude = round($this->input->post('longitude'), 8);\n\n\t\t\t// Store latituse and longitude in the session data\n\t\t\tif( ($this->session->latitude = $this->latitude) && ($this->session->longitude = $this->longitude) ) {\n\t\t\t\t// If the operation completed successfully\n\t\t\t\techo 'success';\n\t\t\t} else {\n\t\t\t\t// If the operation has failed\n\t\t\t\techo 'error';\n\t\t\t}\n\t\t} else {\n\t\t\t// Show validation errors\n\t\t\techo validation_errors();\n\t\t}\n\t}", "public function point ($x, $y) {}", "public function testPointDouble()\n {\n //var_dump($point);\n }", "public function testCreateByParamsTrue()\n {\n $request = ['equation' => '(('];\n\n $requestDto = $this->getRequestDto();\n\n $requestDto->loadParamsByRequest($request);\n\n $this->assertSame($request['equation'], $requestDto->equation);\n }", "function plot() {\n\t\t\t// Insert the form\n\t\t\techo '<form action=\"' .$this->json->action .'\" method=\"' .$this->json->method .'\" name=\"' .$this->json->name .'\" class=\"formely-form\">';\n\n\t\t\tforeach ($this->json->kvp as $key => $value) {\n\t\t\t\tif ($value->print_label) {\n\t\t\t\t\techo '<label>' .$value->label .': </label>';\n\t\t\t\t}\n\t\t\t\tif ($value->type == 'select' || $value->type == 'textarea') {\n\n\t\t\t\t} else {\n\t\t\t\t\tself::div();\n\t\t\t\t\techo '<input ' .'type=\"' .$value->type .'\"';\n\t\t\t\t\tforeach ($value->attr as $k => $v) {\n\t\t\t\t\t\techo ' ' .$k .'=\"' .$v .'\"';\n\t\t\t\t\t}\n\n\t\t\t\t\techo ' data-regex=\"' .$value->regex .'\"';\n\n\t\t\t\t\techo '>';\n\t\t\t\t\tself::_div();\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\techo '</form>';\n\t\t}", "function loc($xy, $r)\r\n{\r\n\treturn sqrt($r * $r - $xy * $xy);\r\n}", "function wppb_check_map_value( $message, $field, $request_data, $form_location ){\r\n\r\n if( $field['field'] == 'Map' ){\r\n\r\n // Validate the coordinates\r\n $error = false;\r\n\r\n if( !empty( $request_data[ wppb_handle_meta_name( $field['meta-name'] ) ] ) ) {\r\n foreach( $request_data[ wppb_handle_meta_name( $field['meta-name'] ) ] as $position ) {\r\n\r\n $position = explode( ',', $position );\r\n\r\n // We should only have a latitude and longitude\r\n if( count( $position ) != 2 )\r\n $error = true;\r\n\r\n if( strpos( $position[0], '.' ) === false || strpos( $position[1], '.' ) === false )\r\n $error = true;\r\n\r\n }\r\n }\r\n\r\n if( $error )\r\n return __( 'Something went wrong. Please try again.', 'profile-builder' );\r\n\r\n // Check to see if required\r\n if( $field['required'] == 'Yes' ){\r\n if ( ( isset( $request_data[wppb_handle_meta_name( $field['meta-name'] )] ) && ( empty( $request_data[wppb_handle_meta_name( $field['meta-name'] )] ) ) ) || !isset( $request_data[wppb_handle_meta_name( $field['meta-name'] )] ) ){\r\n return wppb_required_field_error($field[\"field-title\"]);\r\n }\r\n }\r\n }\r\n\r\n return $message;\r\n}", "abstract public function getCoordinatesByValue(string $value);", "function showPosition($output){\n if($output == 'lon'){\n echo \"<script>\n showPosition('lon');\n </script>\";\n } elseif($output == 'lat'){\n echo \"<script>\n showPosition('lat');\n </script>\";\n } elseif($output == 'both'){\n echo \"<script>\n showPosition('both');\n </script>\";\n } else{\n echo \"<script>\n showPosition('error');\n </script>\";\n }\n }", "private function getInput(): string\n {\n return 'departure location: 49-920 or 932-950\ndeparture station: 28-106 or 130-969\ndeparture platform: 47-633 or 646-950\ndeparture track: 41-839 or 851-967\ndeparture date: 30-71 or 88-966\ndeparture time: 38-532 or 549-953\narrival location: 38-326 or 341-968\narrival station: 27-809 or 834-960\narrival platform: 29-314 or 322-949\narrival track: 26-358 or 368-966\nclass: 34-647 or 667-951\nduration: 39-771 or 785-958\nprice: 43-275 or 286-960\nroute: 28-235 or 260-949\nrow: 48-373 or 392-962\nseat: 35-147 or 172-953\ntrain: 37-861 or 885-961\ntype: 38-473 or 483-961\nwagon: 49-221 or 228-973\nzone: 46-293 or 307-967\n\nyour ticket:\n101,179,193,103,53,89,181,139,137,97,61,71,197,59,67,173,199,211,191,131\n\nnearby tickets:\n337,687,607,98,229,737,512,521,896,93,341,488,511,550,53,907,888,198,935,767\n506,605,103,683,788,899,101,551,420,947,944,805,495,858,942,980,687,232,145,765\n787,456,807,624,554,260,458,503,682,907,460,697,348,342,343,917,460,475,528,203\n613,944,732,939,417,585,520,585,680,260,611,912,367,573,628,802,905,741,421,66\n407,614,691,504,209,323,507,224,721,916,202,180,679,692,731,508,894,889,263,232\n346,591,998,267,904,713,343,443,583,569,100,585,422,509,62,728,907,451,567,176\n342,470,760,622,60,801,519,911,200,907,225,593,485,490,266,452,141,855,136,937\n129,439,195,947,941,324,272,101,60,94,522,351,68,630,357,264,344,93,209,612\n517,354,89,599,911,233,422,767,466,220,277,67,711,220,189,796,697,745,612,836\n611,231,449,265,497,906,591,551,570,197,702,231,161,556,173,104,501,891,555,397\n916,618,410,218,736,592,857,500,424,889,502,760,387,525,760,807,885,911,353,59\n459,290,191,471,174,945,934,583,748,357,291,841,195,138,620,808,461,587,670,851\n343,147,220,706,458,316,595,687,292,230,68,619,893,421,629,508,178,103,685,699\n142,734,221,269,646,624,730,347,355,469,451,544,793,273,260,685,219,207,405,354\n592,230,531,914,679,415,210,106,517,669,679,424,282,53,350,313,211,215,529,804\n731,494,104,752,994,839,208,617,626,738,702,51,670,583,700,673,897,515,190,574\n717,851,461,141,54,626,937,445,599,906,764,999,67,939,889,716,575,913,502,945\n157,422,622,797,904,210,457,457,217,436,450,293,185,503,447,763,734,493,486,807\n625,315,902,895,614,523,738,626,788,861,509,897,184,550,103,180,510,484,945,212\n853,325,194,309,573,101,490,347,271,100,317,670,448,50,473,580,229,898,804,469\n318,746,946,630,758,524,212,907,889,562,628,404,747,562,211,526,770,801,418,582\n350,796,755,54,105,552,181,440,220,369,635,858,739,626,674,769,218,737,805,138\n103,187,99,750,424,551,520,856,902,351,698,147,510,798,432,351,451,503,135,384\n465,421,624,400,893,506,485,235,228,893,447,162,740,175,614,137,729,680,463,210\n730,440,613,512,152,211,174,58,267,668,220,521,427,219,421,675,769,441,718,719\n427,401,12,93,573,91,460,104,393,500,564,198,613,468,936,725,504,496,501,501\n669,273,576,205,24,855,549,309,103,445,353,228,462,177,579,453,275,450,408,342\n851,373,185,445,719,949,920,792,325,944,161,397,202,723,433,566,550,310,462,271\n429,341,792,699,727,816,528,413,707,799,694,137,454,716,750,906,796,942,346,596\n798,626,858,365,584,206,185,312,720,61,576,599,263,260,632,698,560,692,263,348\n203,738,933,675,497,188,601,905,739,926,229,140,146,142,736,263,687,899,485,343\n428,198,751,436,106,235,597,504,667,647,90,432,903,555,627,485,987,573,805,677\n201,270,92,437,620,761,135,320,905,311,893,142,442,491,936,274,889,806,186,209\n742,147,944,572,407,185,615,96,771,462,646,437,938,628,152,453,737,617,461,516\n577,493,181,210,571,287,208,208,937,143,727,56,409,436,668,512,507,770,685,121\n751,313,746,785,403,917,527,115,676,714,556,676,856,458,55,206,890,272,497,600\n465,143,89,587,617,265,578,453,905,738,851,346,622,272,292,57,891,273,492,298\n415,441,92,230,678,345,89,584,948,75,503,53,705,456,95,511,402,895,531,694\n461,555,425,291,939,349,105,514,856,844,899,403,692,601,231,575,691,463,407,177\n569,785,905,200,88,613,268,160,269,94,70,763,212,401,229,326,405,326,715,676\n484,910,213,942,190,341,584,766,231,712,490,554,529,515,489,19,430,623,232,50\n571,130,130,314,191,920,483,976,592,93,468,807,698,408,417,143,262,510,373,696\n594,492,675,721,671,595,744,673,307,592,886,629,102,797,448,214,627,607,835,850\n211,592,102,944,395,600,501,375,946,745,907,182,568,788,483,464,915,403,88,514\n697,311,470,518,562,732,761,674,619,349,893,187,398,894,995,689,735,623,471,807\n62,280,462,341,176,682,423,172,58,669,518,699,566,705,519,681,308,400,629,945\n191,703,272,52,76,852,342,461,614,199,521,405,610,210,888,71,739,399,799,182\n834,175,727,459,509,677,739,394,712,771,936,348,183,855,675,592,475,454,412,698\n631,180,491,269,719,89,178,515,683,895,351,861,222,558,508,220,174,400,893,469\n310,788,593,681,756,490,450,91,217,895,532,376,682,742,560,897,430,765,730,441\n411,497,629,807,682,176,505,735,102,98,358,502,348,791,999,741,809,769,263,673\n187,202,357,854,373,582,193,496,738,509,339,106,858,211,681,131,518,667,530,521\n629,62,344,504,588,553,98,727,615,556,730,696,618,838,477,267,715,406,464,715\n100,852,626,803,69,408,742,811,613,105,260,178,206,613,309,759,462,499,949,853\n176,435,741,176,342,233,852,872,215,50,403,901,314,421,531,62,440,703,308,103\n858,530,791,519,935,709,576,470,383,753,401,396,718,144,307,211,51,839,680,92\n627,201,851,173,674,404,10,703,668,235,564,266,269,358,857,683,581,88,753,89\n70,224,174,756,215,699,693,104,432,65,557,555,854,707,806,911,352,208,54,894\n225,181,549,181,447,192,948,442,512,350,611,323,918,605,50,528,443,890,608,406\n935,350,211,839,892,403,358,931,179,795,458,570,619,144,717,891,229,425,890,728\n53,408,461,469,861,510,578,363,181,735,465,196,599,573,762,551,759,803,573,586\n291,106,919,506,472,710,522,551,189,493,90,365,855,489,204,574,578,857,554,94\n749,769,490,98,180,403,278,185,504,894,218,602,906,138,945,58,713,910,289,762\n207,418,611,350,825,761,402,176,632,578,486,789,106,624,453,178,408,417,594,607\n896,611,903,51,563,634,710,914,134,885,411,215,756,769,940,183,598,308,449,53\n792,392,891,143,579,58,493,612,158,606,565,793,180,102,503,392,677,891,174,709\n762,229,278,769,100,737,92,454,96,670,510,209,888,142,218,451,178,733,434,727\n142,448,198,511,723,494,131,515,472,274,947,462,336,439,373,349,308,178,313,767\n490,511,271,897,598,100,449,895,454,896,459,563,583,588,737,860,20,499,441,726\n562,465,903,408,451,750,625,300,808,592,602,509,352,699,211,529,292,689,210,582\n607,677,440,209,839,672,460,283,940,229,198,685,95,192,459,526,139,183,603,350\n172,493,101,746,893,55,616,906,740,731,705,284,493,672,908,235,88,464,96,904\n306,502,448,568,94,809,792,373,267,673,575,453,942,787,420,891,531,622,887,425\n212,894,444,808,67,688,177,549,496,24,69,273,590,173,515,729,343,853,438,674\n895,574,646,838,203,789,686,373,260,590,272,431,726,919,410,5,455,557,451,630\n598,64,768,95,219,613,411,570,932,680,299,434,736,439,671,892,577,888,275,324\n172,420,104,98,343,848,343,484,405,610,559,684,906,199,210,179,606,592,106,473\n721,433,768,686,943,594,942,396,142,53,713,400,683,438,892,69,463,106,478,633\n807,688,66,914,751,154,704,271,679,177,807,674,936,687,737,589,179,448,855,574\n627,221,216,405,18,802,620,208,701,712,620,217,372,66,890,92,405,95,369,527\n101,447,318,647,835,190,680,680,896,750,908,600,723,938,200,501,785,785,441,703\n900,235,860,703,186,413,947,477,592,98,356,101,898,714,563,948,210,229,587,326\n706,519,235,523,177,192,175,581,398,341,326,3,515,933,693,398,631,726,755,599\n452,351,368,265,788,593,325,394,738,285,803,558,504,737,855,439,485,919,731,133\n851,347,103,765,205,604,600,684,358,717,916,947,262,311,343,490,606,576,747,80\n685,743,941,578,944,526,213,890,574,881,917,788,404,192,723,493,906,561,514,355\n694,426,345,726,393,706,496,607,416,97,553,101,798,804,264,610,370,714,835,166\n735,587,322,395,917,755,336,186,742,590,261,739,794,793,712,92,682,701,712,58\n791,131,944,767,367,62,633,505,789,796,290,553,51,501,755,392,718,560,104,458\n633,349,915,398,67,602,69,204,216,745,714,120,368,690,601,561,717,677,272,189\n627,768,385,89,619,502,834,291,807,551,674,423,573,761,913,439,627,211,408,405\n462,750,53,615,229,554,418,272,739,175,269,530,829,670,745,358,919,556,945,632\n467,693,751,750,682,173,264,334,614,770,203,556,803,745,172,207,835,184,408,393\n911,179,322,430,697,626,582,934,95,783,532,487,325,698,808,496,263,800,802,914\n925,402,793,676,709,606,601,948,466,218,457,577,599,785,393,323,133,177,421,518\n292,551,838,562,913,748,348,792,507,519,606,697,693,854,551,526,179,604,343,997\n176,599,613,902,203,428,595,217,344,423,312,888,208,469,68,437,898,756,511,477\n621,628,941,157,793,556,745,622,714,621,633,792,519,620,716,50,229,508,65,799\n631,309,324,185,370,439,461,103,460,354,608,318,69,529,485,515,415,69,183,668\n499,679,183,198,468,232,788,511,97,789,392,935,78,89,203,516,355,709,58,397\n398,897,503,697,800,837,680,613,671,649,196,97,894,554,264,355,70,429,682,218\n454,450,487,572,860,985,631,215,793,710,796,594,890,726,628,137,194,791,373,176\n695,751,902,904,797,602,179,96,343,482,740,512,610,502,607,392,595,190,272,192\n14,212,763,584,496,767,462,197,943,578,697,53,707,408,618,834,399,702,401,311\n430,452,520,419,263,83,808,350,613,230,323,521,99,739,287,920,515,761,859,449\n722,527,144,572,55,103,754,527,182,562,792,571,715,143,194,562,4,63,622,229\n770,144,445,809,106,902,518,500,368,601,901,980,465,266,798,449,628,450,799,101\n733,61,626,670,468,532,478,684,504,173,136,700,409,566,890,900,443,914,510,552\n853,583,351,601,266,193,287,341,718,854,845,445,175,914,447,585,132,614,312,727\n196,274,908,22,451,768,905,918,915,746,582,69,260,722,697,674,604,910,596,61\n173,532,313,610,462,834,134,286,887,111,404,947,440,725,415,739,900,695,557,624\n323,54,735,700,224,563,771,734,859,939,712,496,506,730,405,724,199,760,447,314\n495,613,671,342,949,889,855,906,476,798,743,180,448,605,886,488,913,354,185,933\n836,496,563,54,391,448,204,271,567,322,484,401,486,917,490,570,196,466,938,730\n834,692,50,736,195,593,403,791,906,461,581,521,479,916,484,786,229,622,516,731\n674,235,308,673,324,106,681,620,428,96,732,644,751,310,424,718,786,726,687,53\n618,354,104,669,147,981,510,527,68,682,671,220,51,692,518,851,433,59,608,370\n528,758,738,194,474,91,572,59,770,899,502,761,601,342,355,681,561,324,444,751\n176,802,688,432,414,95,269,66,286,214,499,597,768,629,284,911,489,234,180,235\n949,526,63,222,940,98,908,753,886,580,504,942,947,707,763,500,609,934,793,939\n142,598,395,610,562,181,632,132,981,796,272,697,446,861,550,853,761,88,912,190\n501,837,938,203,807,272,134,232,851,644,503,549,557,286,694,887,422,792,622,677\n593,261,422,595,603,513,369,522,405,816,433,859,50,67,209,712,606,623,786,204\n459,932,589,499,333,566,235,235,755,890,441,104,741,412,718,684,618,219,186,352\n668,520,475,67,413,631,188,324,556,627,579,741,102,506,597,100,936,611,678,768\n54,745,498,941,217,214,169,523,934,350,453,606,757,439,50,407,140,918,273,233\n174,88,618,91,741,673,757,891,529,380,431,749,632,465,683,580,797,757,462,455\n97,722,99,580,448,104,945,909,667,545,178,468,462,532,893,65,744,629,791,910\n854,609,483,554,317,568,184,860,789,131,913,699,180,147,519,136,528,729,582,633\n718,579,449,392,502,361,412,672,670,199,729,751,288,860,709,614,576,444,617,98\n493,496,682,599,309,175,145,22,565,413,917,861,851,408,175,756,434,630,901,348\n889,908,197,517,264,771,898,312,800,759,613,747,420,455,893,977,58,684,350,580\n792,615,261,268,371,728,447,537,589,566,671,88,597,426,307,760,93,855,626,917\n372,475,188,605,739,432,900,61,261,268,565,599,94,193,432,733,949,742,191,437\n91,68,60,751,218,106,369,794,131,707,95,528,792,203,232,233,730,139,334,369\n617,96,860,420,440,618,763,356,311,360,737,560,763,308,735,590,915,135,633,595\n558,694,768,99,179,690,89,573,585,599,268,404,611,719,987,487,104,631,713,835\n311,9,469,485,889,910,208,940,192,836,421,853,510,408,786,799,601,270,553,942\n855,633,940,350,395,743,761,67,910,686,412,289,602,64,809,791,383,523,53,496\n857,136,690,313,686,684,266,235,216,600,403,136,297,566,624,838,628,426,859,717\n788,760,177,186,422,214,265,210,464,911,208,131,288,746,683,271,734,197,916,222\n78,484,458,268,612,806,901,764,526,97,941,903,911,262,580,193,599,561,729,689\n629,498,289,465,553,920,326,997,466,358,557,569,207,519,771,519,908,139,261,216\n146,398,423,217,356,802,906,141,503,444,948,182,687,893,835,358,406,403,176,364\n794,463,901,791,761,70,93,557,529,140,916,831,196,130,205,100,196,678,468,275\n203,729,229,55,614,99,918,356,835,496,726,660,935,90,407,855,514,71,353,754\n715,65,714,630,747,579,770,625,741,613,481,448,859,519,453,597,209,945,933,673\n822,347,459,513,492,915,532,746,946,273,612,677,888,704,916,501,724,404,413,582\n263,267,266,903,403,190,623,83,590,467,681,207,566,587,708,600,903,893,803,588\n621,729,573,886,899,450,391,747,58,443,739,619,630,943,352,585,217,528,669,722\n408,312,57,56,184,420,271,431,756,906,90,495,671,559,260,102,851,838,945,831\n492,801,412,819,269,228,263,352,632,137,60,143,569,675,356,557,144,491,794,581\n861,93,411,892,445,287,358,572,411,505,85,604,677,602,208,453,583,572,618,486\n672,696,708,894,947,944,472,747,365,204,483,745,851,435,680,193,521,583,132,137\n291,430,487,746,447,305,576,678,430,586,615,628,57,201,739,835,70,596,195,512\n709,601,690,201,204,735,55,620,95,892,515,340,313,752,400,766,550,93,448,794\n184,948,901,580,886,859,943,566,281,765,182,726,88,89,568,469,578,193,724,552\n607,350,308,949,934,106,513,203,736,264,564,518,212,834,760,525,667,913,858,321\n444,410,941,688,210,399,140,679,857,162,716,801,484,617,675,293,349,551,95,682\n849,192,488,552,946,191,400,190,51,770,266,523,438,423,917,678,947,631,290,412\n858,462,212,889,612,389,671,177,291,183,907,669,292,65,768,669,138,205,549,356\n373,696,894,834,452,564,101,838,721,354,711,475,234,890,287,456,444,525,938,838\n513,148,851,484,683,418,462,197,206,712,343,271,602,684,355,234,897,942,232,503\n276,941,459,694,584,598,716,709,617,710,682,900,201,756,915,798,69,55,233,445\n792,583,393,580,232,454,596,685,595,672,599,87,713,918,582,88,69,794,348,60\n133,57,800,526,263,420,392,801,628,747,898,102,460,95,756,147,489,568,103,330\n920,562,936,486,675,441,994,188,903,560,69,66,344,945,594,520,288,726,861,564\n521,525,337,712,342,423,684,450,55,97,354,903,802,460,101,221,902,58,57,733\n287,220,596,502,275,260,97,559,735,497,220,146,345,557,939,801,416,511,687,996\n397,734,626,527,528,271,744,846,885,672,619,195,627,189,720,201,754,802,308,485\n261,502,96,687,689,202,733,947,331,287,560,785,682,54,589,466,508,628,397,702\n274,417,532,104,598,524,859,757,689,174,522,907,219,791,989,741,936,268,197,858\n133,519,856,672,437,357,753,531,551,407,268,324,188,341,609,806,457,371,896,279\n425,896,509,752,801,897,502,579,530,308,566,308,918,230,741,918,797,395,292,540\n352,370,794,338,835,486,182,610,524,573,211,735,262,623,601,727,269,614,507,580\n519,629,753,613,978,310,353,407,458,857,419,726,88,568,744,907,750,393,741,433\n464,464,135,102,172,64,292,94,912,328,183,105,260,732,713,508,437,442,423,578\n575,427,861,498,558,796,526,703,265,630,450,104,355,186,387,603,486,748,185,932\n635,853,410,188,688,189,438,740,705,411,945,491,145,195,438,699,743,733,626,721\n671,752,200,294,909,427,573,344,753,756,290,712,697,523,903,560,214,176,141,702\n619,530,134,760,344,223,706,626,98,198,756,425,686,797,453,522,453,932,406,489\n489,589,312,628,497,328,736,903,717,518,176,907,412,702,598,261,260,837,90,577\n806,512,471,447,624,683,513,727,595,307,615,350,897,577,465,161,192,144,578,531\n800,728,920,55,754,684,54,202,51,761,612,436,999,935,626,919,100,405,51,173\n854,235,229,692,497,90,453,342,895,449,442,345,198,681,611,51,670,839,802,1\n267,584,550,217,572,403,602,694,467,234,523,857,211,992,593,191,503,467,711,949\n374,354,177,341,704,683,508,342,522,394,559,458,221,463,679,444,903,934,579,490\n515,456,787,893,704,427,986,314,741,894,507,50,761,532,569,409,343,462,723,726\n61,449,524,491,621,212,428,422,511,670,103,732,397,199,619,473,150,809,426,690\n626,510,492,623,235,405,190,188,899,449,389,570,802,621,683,451,790,748,685,918\n619,789,502,491,604,770,905,719,182,633,600,105,754,13,508,594,941,100,892,355\n96,140,133,482,765,647,687,405,188,708,859,185,410,454,355,742,431,97,916,88\n572,497,178,802,685,64,359,889,919,596,529,601,630,141,65,621,892,354,52,806\n672,583,264,214,508,787,423,457,610,904,88,898,20,700,147,513,597,619,934,678\n855,293,805,228,93,570,440,341,912,226,524,739,529,220,569,71,718,712,728,324\n688,679,724,885,591,496,692,268,885,22,670,101,356,406,195,451,368,483,677,690\n890,359,408,307,63,212,104,453,232,945,357,838,205,144,522,94,746,407,411,701\n791,178,718,793,260,909,761,403,855,520,17,682,606,405,59,100,857,755,604,623\n104,406,758,185,502,293,587,489,100,291,769,226,351,792,208,52,742,529,674,799\n260,617,343,621,178,268,568,368,203,915,361,600,292,852,194,286,466,210,704,597\n398,336,771,232,723,667,571,62,197,851,549,684,195,261,408,707,188,90,192,351\n913,913,621,313,932,358,572,436,758,708,625,931,505,451,64,696,807,403,587,421\n605,699,573,563,271,272,436,466,915,530,67,262,319,758,373,948,584,750,431,674\n852,130,273,318,95,578,740,344,891,724,275,145,431,176,531,646,739,938,935,344\n360,397,310,373,576,260,178,407,937,214,286,393,274,180,671,584,146,173,518,529\n702,737,102,451,842,806,572,568,943,790,466,571,103,354,417,516,753,491,744,286\n710,314,750,379,560,193,185,399,515,750,490,682,90,853,561,628,745,368,582,766\n68,503,856,147,184,280,354,457,95,721,766,853,484,406,398,839,553,688,407,409\n768,565,808,671,414,61,320,512,214,472,371,795,407,677,647,744,919,715,809,629\n671,234,162,633,885,358,803,769,789,622,105,355,907,460,61,141,858,857,899,323\n912,852,324,432,943,130,803,686,230,525,905,589,370,100,623,606,687,199,461,931\n734,190,594,308,282,287,426,496,427,421,592,439,272,322,527,396,190,100,596,567\n411,59,765,590,175,358,792,612,761,886,409,795,789,564,140,482,70,527,525,936\n735,375,763,838,450,556,608,512,175,740,312,939,173,710,902,104,91,496,218,938\n678,550,578,888,144,568,589,52,137,759,463,235,293,890,145,50,288,287,165,392\n182,899,491,747,234,482,201,266,429,181,567,65,749,787,191,434,910,566,291,509\n607,494,273,549,674,88,63,234,493,507,127,438,669,370,67,326,852,762,210,463\n618,859,419,394,299,704,670,469,529,96,710,746,803,290,400,748,622,357,406,203\n595,66,95,720,190,66,599,463,684,105,106,295,790,455,447,524,274,322,734,562\n503,464,520,566,52,483,588,946,552,195,861,872,699,897,428,456,312,461,624,800\n346,193,507,441,608,309,356,184,98,177,64,505,722,938,371,175,212,551,280,407\n595,66,134,343,395,892,373,629,714,697,598,358,229,629,618,531,685,95,394,634\n733,393,692,414,94,748,423,52,710,307,421,731,229,891,852,618,723,344,374,771\n511,943,725,694,469,204,459,409,585,516,763,741,946,486,449,322,714,604,766,993\n770,500,91,561,717,272,770,600,403,302,700,174,411,66,188,514,407,234,755,942\n475,731,569,210,580,631,620,353,762,392,495,64,725,732,323,456,503,672,597,514\n765,692,945,280,217,214,92,325,672,684,890,95,674,788,711,837,767,677,523,739\n797,458,65,734,399,719,786,288,416,316,753,503,442,609,528,145,735,403,566,751\n698,748,687,574,861,803,727,372,469,576,811,205,919,416,895,235,231,418,947,202\n437,456,612,630,549,670,806,806,222,705,516,404,470,607,440,748,54,747,602,885\n502,815,723,198,447,768,396,395,463,509,521,57,407,670,895,853,889,733,629,613\n616,619,54,442,949,591,800,804,133,630,271,271,724,513,1,570,633,750,598,104\n60,531,942,53,679,578,448,642,750,711,344,762,90,175,98,437,678,688,509,895\n793,736,721,178,90,451,102,502,444,728,934,393,744,981,732,322,144,59,584,558\n706,460,498,752,313,672,179,604,609,274,685,532,197,5,105,272,450,805,941,308\n447,525,53,203,571,436,505,519,315,594,466,228,506,787,358,711,801,418,88,914\n196,809,174,498,674,64,291,852,803,550,202,630,63,499,460,938,767,133,13,101\n896,791,715,95,512,199,854,490,672,50,990,943,556,630,261,57,520,890,266,187';\n }", "function defineCoords($coords) {\n\tif (is_string($coords)) {\n\t\t$coordString = preg_replace('/ /', '', $coords);\n\t\t$coords = explode(',', $coordString);\n\t}\n\tif (count($coords)>4) {\n\t\treturn false;\n\t}\n\t$fields = array('x1','y1','x2','y2');\n\t$coords = array_combine ($fields, $coords);\n\t$coords['minX'] = min($coords['x1'],$coords['x2']);\n\t$coords['maxX'] = max($coords['x1'],$coords['x2']);\n\t$coords['minY'] = min($coords['y1'],$coords['y2']);\n\t$coords['maxY'] = max($coords['y1'],$coords['y2']);\n\treturn $coords;\n}", "function iform_map_get_map_parameters() {\n $r = array(\n array(\n 'name' => 'map_centroid_lat',\n 'caption' => 'Centre of Map Latitude',\n 'description' => 'WGS84 Latitude of the initial map centre point, in decimal form. Set to \"default\" to use the settings '.\n 'defined in the IForm Settings page.',\n 'type' => 'text_input',\n 'group' => 'Initial Map View',\n 'default' => 'default'\n ),\n array(\n 'name' => 'map_centroid_long',\n 'caption' => 'Centre of Map Longitude',\n 'description' => 'WGS84 Longitude of the initial map centre point, in decimal form. Set to \"default\" to use the settings defined in the IForm Settings page.',\n 'type' => 'text_input',\n 'group' => 'Initial Map View',\n 'default' => 'default'\n ),\n array(\n 'name' => 'map_zoom',\n 'caption' => 'Map Zoom Level',\n 'description' => 'Zoom level of the initially displayed map. Set to \"default\" to use the settings defined in the IForm Settings page.',\n 'type' => 'text_input',\n 'group' => 'Initial Map View',\n 'default' => 'default'\n ),\n array(\n 'name' => 'map_width',\n 'caption' => 'Map Width',\n 'description' => 'Width in pixels of the map, or a css specification for the width, e.g. 75%.',\n 'type' => 'text_input',\n 'group' => 'Initial Map View',\n 'default' => '100%'\n ),\n array(\n 'name' => 'map_height',\n 'caption' => 'Map Height (px)',\n 'description' => 'Height in pixels of the map.',\n 'type' => 'int',\n 'group' => 'Initial Map View',\n 'default'=>600\n ),\n array(\n 'name' => 'remember_pos',\n 'caption' => 'Remember Position',\n 'description' => 'Tick this box to get the map to remember it\\'s last position when reloading the page. This uses cookies so cookies must be enabled for it to work and '.\n 'you must notify your users to ensure you comply with European cookie law.',\n 'type' => 'checkbox',\n 'required' => FALSE,\n 'group' => 'Initial Map View'\n ),\n array(\n 'name' => 'location_boundary_id',\n 'caption' => 'Location boundary to draw',\n 'description' => 'ID of a location whose boundary should be shown on the map (e.g. to define the perimeter of a survey area).',\n 'type' => 'textfield',\n 'group' => 'Initial Map View',\n 'required' => FALSE,\n ),\n array(\n 'name' => 'preset_layers',\n 'caption' => 'Preset Base Layers',\n 'description' => 'Select the preset base layers that are available for the map. When using Google map layers, please ensure you adhere to the '.\n '<a href=\"http://code.google.com/apis/maps/terms.html\">Google Maps/Google Earth APIs Terms of Service</a>. When using the Bing map layers, '.\n 'please ensure that you read and adhere to the <a href=\"http://www.microsoft.com/maps/product/terms.html\">Bing Maps terms of use</a>. '.\n 'The Microsoft Virtual Earth layer is now mapped to the Bing Aerial layer so is provided for backwards compatibility only. You can '.\n 'sort the layers into the order you require by dragging and dropping the layer labels.',\n 'type' => 'list',\n 'options' => array(\n 'google_physical' => 'Google Physical',\n 'google_streets' => 'Google Streets',\n 'google_hybrid' => 'Google Hybrid',\n 'google_satellite' => 'Google Satellite',\n 'bing_aerial' => 'Bing Aerial',\n 'bing_hybrid' => 'Bing Hybrid',\n 'bing_shaded' => 'Bing Shaded',\n 'bing_os' => 'Bing Ordnance Survey',\n 'dynamicOSGoogleSat' => 'Dynamic (OpenStreetMap > Ordnance Survey Leisure > Google Satellite)',\n 'dynamicOSMGoogleSat' => 'Dynamic (OpenStreetMap > Google Satellite)',\n 'osm' => 'OpenStreetMap',\n 'otm' => 'OpenTopoMap',\n 'os_leisure' => 'OS Leisure',\n 'os_outdoor' => 'OS Outdoor',\n 'os_road' => 'OS Road',\n 'os_light' => 'OS Light',\n ),\n 'sortable' => TRUE,\n 'group' => 'Base Map Layers',\n 'required' => FALSE\n ),\n array(\n 'name' => 'wms_base_title',\n 'caption' => 'Additional WMS Base Layer Caption',\n 'description' => 'Caption to display for the optional WMS base map layer',\n 'type' => 'textfield',\n 'group' => 'Base Map Layers',\n 'required' => FALSE\n ),\n array(\n 'name' => 'wms_base_url',\n 'caption' => 'Additional WMS Base Layer Service URL',\n 'description' => 'URL of the WMS service to display for the optional WMS base map layer',\n 'type' => 'textfield',\n 'group' => 'Base Map Layers',\n 'required' => FALSE\n ),\n array(\n 'name' => 'wms_base_layer',\n 'caption' => 'Additional WMS Base Layer Name',\n 'description' => 'Layername of the WMS service layer for the optional WMS base map layer',\n 'type' => 'textfield',\n 'group' => 'Base Map Layers',\n 'required' => FALSE\n ),\n array(\n 'name' => 'tile_cache_layers',\n 'caption' => 'Tile cache JSON (deprecated)',\n 'description' => 'JSON describing the tile cache layers to make available. For advanced users only. ' .\n 'Deprecated - use Other base layer config instead.',\n 'type' => 'textarea',\n 'group' => 'Advanced Base Map Layers',\n 'required' => FALSE\n ),\n array(\n 'name' => 'other_base_layer_config',\n 'caption' => 'Other base layer config',\n 'description' => 'JSON describing the custom base layers to make available. For advanced users only.',\n 'type' => 'textarea',\n 'group' => 'Advanced Base Map Layers',\n 'required' => FALSE\n ),\n array(\n 'name' => 'openlayers_options',\n 'caption' => 'OpenLayers Options JSON',\n 'description' => 'JSON describing the options to pass through to OpenLayers. For advanced users only, leave blank\n for default behaviour.',\n 'type' => 'textarea',\n 'group' => 'Advanced Base Map Layers',\n 'required' => FALSE\n ),\n array(\n 'name' => 'indicia_wms_layers',\n 'caption' => 'WMS layers from GeoServer',\n 'description' => 'List of WMS feature type names, one per line, which are installed on the GeoServer and are to be added to the map as overlays. ' .\n 'Optionally, prefix the feature type name with a title to appear in the layer switcher using the form title = feature-name.',\n 'type' => 'textarea',\n 'group' => 'Other Map Settings',\n 'required' => FALSE\n ),\n array(\n 'name' => 'standard_controls',\n 'caption' => 'Controls to add to map',\n 'description' => 'List of map controls, one per line. Select from layerSwitcher, zoomBox, panZoom, panZoomBar, drawPolygon, drawPoint, drawLine, '.\n 'hoverFeatureHighlight, clearEditLayer, modifyFeature, graticule, fullscreen. If using a data entry form and you add drawPolygon or drawLine controls then your '.\n 'form will support recording against polygons and lines as well as grid references and points.',\n 'type' => 'textarea',\n 'group' => 'Other Map Settings',\n 'required' => FALSE,\n 'default'=>\"layerSwitcher\\npanZoomBar\"\n )\n );\n // Check for easy login module to allow integration into profile locations.\n if (!function_exists('hostsite_module_exists') || hostsite_module_exists('easy_login')) {\n $r[] = array(\n 'name' => 'display_user_profile_location',\n 'caption' => 'Display location from user profile',\n 'description' => 'Tick this box to display the outline of the user\\'s preferred recording location from the user '.\n 'account on the map. The map will be centred and zoomed to this location on first usage. This option has no effect if '.\n '\"Location boundary to draw\" is ticked.',\n 'type' => 'checkbox',\n 'required' => FALSE,\n 'group' => 'Initial Map View'\n );\n }\n return $r;\n}", "public function getValue()\n {\n //Edits by me\n return \"ST_GeomFromText(?, ?)\";\n }", "public function testValidateCoordNok2()\n {\n $res = $this->ipObj->validateCoord('127.0.0.1');\n $this->assertFalse($res);\n }", "public function geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false {}" ]
[ "0.6257816", "0.61835885", "0.5694082", "0.5364226", "0.53529346", "0.5090444", "0.5045766", "0.5008828", "0.5000745", "0.49599305", "0.49382383", "0.49286774", "0.4889705", "0.48863643", "0.48790675", "0.48705447", "0.4859593", "0.48537627", "0.48403072", "0.4838673", "0.4837124", "0.48197013", "0.4787537", "0.47748774", "0.4759945", "0.47584647", "0.47495988", "0.47430065", "0.47308898", "0.4728259" ]
0.72126836
0
Make questiondata with data to test "Finding a point in the coordinate system"
public function get_geogebra_question_data_point() { $q = new stdClass(); $q->name = 'Finding a point in the plane'; $q->questiontext = "Drag the point to ({a}/{b})"; $q->questiontextformat = FORMAT_HTML; $q->generalfeedback = "Generalfeedback: Dragging a point isn't to hard"; $q->generalfeedbackformat = FORMAT_HTML; $q->defaultmark = 1; $q->penalty = 0.3333333; $q->qtype = 'geogebra'; $q->length = '1'; $q->hidden = '0'; $q->createdby = '2'; $q->modifiedby = '2'; $q->options = new stdClass(); $q->options->answers = array(); $q->options->answers[0] = new stdClass(); $q->options->answers[0]->answer = 'e'; $q->options->answers[0]->fraction = '1.0000000'; $q->options->answers[0]->feedback = 'Very good.'; $q->options->answers[0]->feedbackformat = FORMAT_HTML; $q->options->ggbturl = 'https://tube.geogebra.org/student/mI8RJzVzI'; $q->options->ggbxml = ggbstringsfortesting::$pointxml; $q->options->ggbparameters = ggbstringsfortesting::$pointparameters; $q->options->ggbviews = ggbstringsfortesting::$views; $q->options->ggbcodebaseversion = '5.0'; $q->options->israndomized = 1; $q->options->randomizedvar = 'a,b,'; return $q; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_geogebra_question_form_data_point() {\n $form = new stdClass();\n $form->name = \"Finding a point in the plane\";\n $form->questiontext = array();\n $form->questiontext['format'] = \"1\";\n $form->questiontext['text'] = \"Drag the point to ({a}/{b})\";\n\n $form->defaultmark = 1;\n $form->generalfeedback = array();\n $form->generalfeedback['format'] = '1';\n $form->generalfeedback['text'] = \"Generalfeedback: Dragging a point isn't to hard\";\n\n $form->ggbturl = 'https://tube.geogebra.org/student/mI8RJzVzI';\n $form->ggbxml = ggbstringsfortesting::$pointxml;\n $form->ggbparameters = ggbstringsfortesting::$pointparameters;\n $form->ggbviews = ggbstringsfortesting::$views;\n $form->ggbcodebaseversion = '5.0';\n $form->israndomized = 1;\n $form->randomizedvar = 'a,b,';\n\n $form->noanswers = 1;\n $form->answer = array();\n $form->answer[0] = 'e';\n\n $form->fraction = array();\n $form->fraction[0] = '1.0';\n\n $form->feedback = array();\n $form->feedback[0] = array();\n $form->feedback[0]['format'] = '1';\n $form->feedback[0]['text'] = 'Very good.';\n\n $form->penalty = '0.3333333';\n $form->numhints = 2;\n $form->hint = array();\n $form->hint[0] = array();\n $form->hint[0]['format'] = '1';\n $form->hint[0]['text'] = '';\n\n $form->hint[1] = array();\n $form->hint[1]['format'] = '1';\n $form->hint[1]['text'] = '';\n\n $form->qtype = 'geogebra';\n return $form;\n }", "public function make_geogebra_question_point() {\n question_bank::load_question_definition_classes('geogebra');\n $geo = new qtype_geogebra_question();\n test_question_maker::initialise_a_question($geo);\n $geo->name = \"Finding a point in the plane\";\n $geo->questiontext = \"Drag the point to ({a}/{b})\";\n $geo->generalfeedback = 'Generalfeedback: Dragging a point isn\\'t to hard.';\n $geo->ggbxml = ggbstringsfortesting::$pointxml;\n $geo->ggbparameters = ggbstringsfortesting::$pointparameters;\n $geo->ggbviews = ggbstringsfortesting::$views;\n $geo->ggbcodebaseversion = '5.0';\n $geo->israndomized = 1;\n $geo->randomizedvar = 'a,b,';\n $geo->answers = array(\n 13 => new question_answer(13, 'e', 1.0, 'Very Good!', FORMAT_HTML)\n );\n $geo->qtype = question_bank::get_qtype('geogebra');\n\n return $geo;\n }", "public function make_geogebra_question_manually() {\n question_bank::load_question_definition_classes('geogebra');\n $geo = new qtype_geogebra_question();\n test_question_maker::initialise_a_question($geo);\n $geo->name = \"Finding a point in the plane\";\n $geo->questiontext = \"Drag the point to ({a}/{b})\";\n $geo->generalfeedback = 'Generalfeedback: Dragging a point isn\\'t to hard.';\n $geo->ggbturl = 'https://tube.geogebra.org/student/mI8RJzVzI';\n $geo->ggbxml = ggbstringsfortesting::$pointxml;\n $geo->ggbparameters = ggbstringsfortesting::$pointparameters;\n $geo->ggbviews = ggbstringsfortesting::$views;\n $geo->ggbcodebaseversion = '5.0';\n $geo->israndomized = 0;\n $geo->randomizedvar = '';\n $geo->qtype = question_bank::get_qtype('geogebra');\n\n return $geo;\n }", "public static function get_sc_question_form_data_question_one() {\n global $USER;\n $qdata = new stdClass();\n $qdata->id = 4010;\n $qdata->createdby = $USER->id;\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->modifiedby = $USER->id;\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-001';\n $qdata->questiontext = array(\n \"text\" => 'Questiontext for Question 1',\n 'format' => FORMAT_HTML,\n 'itemid' => 1\n );\n $qdata->generalfeedback = array(\n \"text\" => 'This feedback is general',\n 'format' => FORMAT_HTML,\n 'itemid' => 2\n );\n $qdata->defaultmark = 1;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n $qdata->scoringmethod = 'sconezero';\n $qdata->shuffleanswers = 0;\n $qdata->answernumbering = 'none';\n $qdata->numberofrows = 3;\n $qdata->correctrow = 1;\n $qdata->option_1 = array(\n 'text' => 'Option Text 1',\n 'format' => 1\n );\n $qdata->feedback_1 = array(\n 'text' => 'Feedback Text 1',\n 'format' => 1\n );\n $qdata->option_2 = array(\n 'text' => 'Option Text 2',\n 'format' => 1\n );\n $qdata->feedback_2 = array(\n 'text' => 'Feedback Text 2',\n 'format' => 1\n );\n $qdata->option_3 = array(\n 'text' => 'Option Text 3',\n 'format' => 1\n );\n $qdata->feedback_3 = array(\n 'text' => 'Feedback Text 3',\n 'format' => 1\n );\n $qdata->hint = array(\n 0 => array(\n 'text' => 'This is the 1st hint',\n 'format' => FORMAT_HTML\n ),\n 1 => array(\n 'text' => 'This is the 2nd hint',\n 'format' => FORMAT_HTML\n ),\n );\n return $qdata;\n }", "public function get_sc_question_data_question_one() {\n global $USER;\n $qdata = new stdClass();\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-001';\n $qdata->idnumber = 4010;\n $qdata->category = 1;\n $qdata->contextid = 1;\n $qdata->parent = 0;\n $qdata->createdby = $USER->id;\n $qdata->modifiedby = $USER->id;\n $qdata->length = 0;\n $qdata->hidden = 0;\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->timecreated = \"1552376610\";\n $qdata->timemodified = \"1552376610\";\n $qdata->stamp = \"127.0.0.1+1552376610+76EZEc\";\n $qdata->version = \"127.0.0.1+155237661076EZEc\";\n $qdata->defaultmark = 1;\n $qdata->penalty = 0.3333333;\n $qdata->questiontext = \"Questiontext for Question 1\";\n $qdata->questiontextformat = FORMAT_HTML;\n $qdata->generalfeedback = \"This feedback is general\";\n $qdata->generalfeedbackformat = FORMAT_HTML;\n $qdata->options = new stdClass();\n $qdata->options->questionid = 4010;\n $qdata->options->scoringmethod = \"sconezero\";\n $qdata->options->shuffleanswers = 0;\n $qdata->options->answernumbering = 'none';\n $qdata->options->numberofrows = 3;\n $qdata->options->correctrow = 1;\n $qdata->options->rows = array(\n 1 => (object) array(\n 'id' => 1,\n 'questionid' => 4010,\n 'number' => 1,\n 'optiontext' => 'Option Text 1',\n 'optiontextformat' => 1,\n 'optionfeedback' => 'Feedback Text 1',\n 'optionfeedbackformat' => 1\n ),\n 2 => (object) array(\n 'id' => 2,\n 'questionid' => 4010,\n 'number' => 2,\n 'optiontext' => 'Option Text 2',\n 'optiontextformat' => 1,\n 'optionfeedback' => 'Feedback Text 2',\n 'optionfeedbackformat' => 1\n ),\n 3 => (object) array(\n 'id' => 3,\n 'questionid' => 4010,\n 'number' => 3,\n 'optiontext' => 'Option Text 3',\n 'optiontextformat' => 1,\n 'optionfeedback' => 'Feedback Text 3',\n 'optionfeedbackformat' => 1\n )\n );\n $qdata->hints = array(\n 0 => (object) array(\n 'id' => 0,\n 'questionid' => 4010,\n 'hint' => 'This is the 1st hint',\n 'hintformat' => FORMAT_HTML,\n 'shownumcorrect' => 0,\n 'clearwrong' => 0,\n 'options' => 0\n ),\n 1 => (object) array(\n 'id' => 1,\n 'questionid' => 4010,\n 'hint' => 'This is the 2nd hint',\n 'hintformat' => FORMAT_HTML,\n 'shownumcorrect' => 0,\n 'clearwrong' => 0,\n 'options' => 0\n )\n );\n return $qdata;\n }", "public function dataShouldAskQuestion(): array {\n $dummyQuestion = $this->dummyQuestion();\n return [\n [\n $dummyQuestion,\n [\n 'demo_content' => 'ALL',\n ],\n TRUE,\n ],\n ];\n }", "function getDataFromText($document) {\n\t\t\t$cleanData = preg_split('/<br\\/>/', trim($this->extractText($document)), -1, PREG_SPLIT_NO_EMPTY);\n\t\t\t\n\t\t\t$questionData = array();\n\t\t\t$questionIndex = $answerIndex = 0;\n\t\t\t$inQuestionLine = $inCorrectLine = false;\n\t\t\tforeach ($cleanData AS $line) {\n\t\t\t\tif ( strpos($line, '?#') === 0 ) {\n\t\t\t\t\n\t\t\t\t\t$questionIndex++;\n\t\t\t\t\t$answerIndex = 0;\n\t\t\t\t\t$inQuestionLine = true;\n\t\t\t\t\t$questionData[$questionIndex]['question'] = ltrim($line, '?#');\n\t\t\t\t\t\n\t\t\t\t} else if ( strpos($line, '#') === 0 ) {\n\t\t\t\t\n\t\t\t\t\t$answerIndex++;\n\t\t\t\t\t$inQuestionLine = $inCorrectLine = false;\n\t\t\t\t\t\n\t\t\t\t\tif ($questionIndex > 0)\n\t\t\t\t\t\t$questionData[$questionIndex]['answer'][$answerIndex] = ltrim($line, '#');\n\t\t\t\t\t\n\t\t\t\t} else if ( strpos($line, '*#') === 0 ) {\n\t\t\t\t\n\t\t\t\t\t$inQuestionLine = false;\n\t\t\t\t\t$inCorrectLine = true;\n\t\t\t\t\t\n\t\t\t\t\tif ($questionIndex > 0)\n\t\t\t\t\t\t$questionData[$questionIndex]['correct_answer'] = ltrim($line, '*#');\n\t\t\t\t\n\t\t\t\t} else if ( $questionIndex > 0 ) {\n\t\t\t\t\n\t\t\t\t\tif ( $inQuestionLine ) {\n\t\t\t\t\t\n\t\t\t\t\t\t$questionData[$questionIndex]['question'] .= '\\n'.$line;\n\t\t\t\t\t\n\t\t\t\t\t} else if ( $inCorrectLine ) {\n\t\t\t\t\t\n\t\t\t\t\t\t$questionData[$questionIndex]['correct_answer'] .= '\\n'.$line;\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t\t$questionData[$questionIndex]['answer'][$answerIndex] .= '\\n'.$line;\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}\n\t\t\t\n\t\t\tif( !empty($questionData) ) {\n\t\t\t\n\t\t\t\treturn $questionData;\n\t\t\t\n\t\t\t}\n\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t}", "public function testQuestionData()\n\t{\n\t\t$session = Shopware()->Session();\n\n\t\t$test = true;\n\n\t\tif(!$session->get(\"checkoutQuestionGender\"))\n\t\t{\n\t\t\t$test = false;\n\t\t}\n\t\tif(!$session->get(\"checkoutQuestionDateOfBirth\"))\n\t\t{\n\t\t\t$test = false;\n\t\t}\n\t\tif(!$session->get(\"checkoutQuestionSize\"))\n\t\t{\n\t\t\t$test = false;\n\t\t}\n\t\tif(!$session->get(\"checkoutQuestionWeight\"))\n\t\t{\n\t\t\t$test = false;\n\t\t}\n\t\tif(!$session->get(\"checkoutQuestionEthnicity\"))\n\t\t{\n\t\t\t$test = false;\n\t\t}\n\t\tif(!$session->get(\"checkoutQuestionDesiredWeight\"))\n\t\t{\n\t\t}\n\t\tif(!$session->get(\"checkoutQuestionBasalMetabolicRateWithoutPhysicalActivity\"))\n\t\t{\n\t\t}\n\t\tif(!$session->get(\"checkoutQuestionBasicMetabolismIncludingPhysicalActivity\"))\n\t\t{\n\t\t}\n\t\tif(!$session->get(\"checkoutQuestionPhysicalActivityOccupationOrLeisure\"))\n\t\t{\n\t\t}\n\n\t\treturn $test;\n\t}", "public static function get_sc_question_form_data_question_three() {\n global $USER;\n $qdata = new stdClass();\n $qdata->id = 4011;\n $qdata->createdby = $USER->id;\n $qdata->modifiedby = $USER->id;\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-003';\n $qdata->questiontext = array(\n \"text\" => 'Questiontext for Question 1',\n 'format' => FORMAT_HTML,\n 'itemid' => 1\n );\n $qdata->generalfeedback = array(\n \"text\" => 'This feedback is general',\n 'format' => FORMAT_HTML,\n 'itemid' => 2\n );\n $qdata->defaultmark = 1;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->scoringmethod = 'sconezero';\n $qdata->shuffleanswers = 1;\n $qdata->answernumbering = 'none';\n $qdata->numberofrows = 5;\n $qdata->correctrow = 1;\n $qdata->option_1 = array(\n 'text' => 'Option Text 1',\n 'format' => 1\n );\n $qdata->feedback_1 = array(\n 'text' => 'Feedback Text 1',\n 'format' => 1\n );\n $qdata->option_2 = array(\n 'text' => 'Option Text 2',\n 'format' => 1\n );\n $qdata->feedback_2 = array(\n 'text' => 'Feedback Text 2',\n 'format' => 1\n );\n $qdata->option_3 = array(\n 'text' => 'Option Text 3',\n 'format' => 1\n );\n $qdata->feedback_3 = array(\n 'text' => 'Feedback Text 3',\n 'format' => 1\n );\n $qdata->option_4 = array(\n 'text' => 'Option Text 4',\n 'format' => 1\n );\n $qdata->feedback_4 = array(\n 'text' => 'Feedback Text 4',\n 'format' => 1\n );\n $qdata->option_5 = array(\n 'text' => 'Option Text 5',\n 'format' => 1\n );\n $qdata->feedback_5 = array(\n 'text' => 'Feedback Text 5',\n 'format' => 1\n );\n $qdata->hint = array(\n 0 => array(\n 'text' => 'This is the 1st hint',\n 'format' => FORMAT_HTML\n ),\n 1 => array(\n 'text' => 'This is the 2nd hint',\n 'format' => FORMAT_HTML\n ),\n );\n return $qdata;\n }", "public static function get_sc_question_form_data_question_four() {\n global $USER;\n $qdata = new stdClass();\n $qdata->id = 4011;\n $qdata->createdby = $USER->id;\n $qdata->modifiedby = $USER->id;\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-004';\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->questiontext = array(\n \"text\" => 'Questiontext for Question 1',\n 'format' => FORMAT_HTML,\n 'itemid' => 1\n );\n $qdata->generalfeedback = array(\n \"text\" => 'This feedback is general',\n 'format' => FORMAT_HTML,\n 'itemid' => 2\n );\n $qdata->defaultmark = 1;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n $qdata->scoringmethod = 'subpoints';\n $qdata->shuffleanswers = 1;\n $qdata->answernumbering = 'none';\n $qdata->numberofrows = 5;\n $qdata->correctrow = 1;\n $qdata->option_1 = array(\n 'text' => 'Option Text 1',\n 'format' => 1\n );\n $qdata->feedback_1 = array(\n 'text' => 'Feedback Text 1',\n 'format' => 1\n );\n $qdata->option_2 = array(\n 'text' => 'Option Text 2',\n 'format' => 1\n );\n $qdata->feedback_2 = array(\n 'text' => 'Feedback Text 2',\n 'format' => 1\n );\n $qdata->option_3 = array(\n 'text' => 'Option Text 3',\n 'format' => 1\n );\n $qdata->feedback_3 = array(\n 'text' => 'Feedback Text 3',\n 'format' => 1\n );\n $qdata->option_4 = array(\n 'text' => 'Option Text 4',\n 'format' => 1\n );\n $qdata->feedback_4 = array(\n 'text' => 'Feedback Text 4',\n 'format' => 1\n );\n $qdata->option_5 = array(\n 'text' => 'Option Text 5',\n 'format' => 1\n );\n $qdata->feedback_5 = array(\n 'text' => 'Feedback Text 5',\n 'format' => 1\n );\n $qdata->hint = array(\n 0 => array(\n 'text' => 'This is the 1st hint',\n 'format' => FORMAT_HTML\n ),\n 1 => array(\n 'text' => 'This is the 2nd hint',\n 'format' => FORMAT_HTML\n ),\n );\n return $qdata;\n }", "function generate_data_array_for_static_real_test_rule($quiz_detail)\n\t{\n\t\t$question_ids = $quiz_detail['question_ids']; \n\t\t$strSQL = \"SELECT \".$quiz_detail['id'].\" AS quiz_detail_id, Q.id, Q.options,Q.answers,Q.answer_keys, Q.question_group_id FROM questions Q\n\t\tWHERE Q.id IN (\".$question_ids.\")\";\n\t\t$rsRES = mysql_query($strSQL,$this->connection) or die ( mysql_error() . $strSQL );\n\t\t$total_questions = mysql_num_rows($rsRES);\n\t\tif($total_questions > 0){ //if question exist for this rule\n\t\t\t$dataArray = array();$i=$this->index;\n\t\t\twhile($row = mysql_fetch_assoc($rsRES)){\n\t\t\t\t$i++;\n\t\t\t\t$dataArray[$i]['question_id']=$row['id'];\n\t\t\t\t$dataArray[$i]['answer_keys']=$row['answer_keys'];\n\t\t\t\t$dataArray[$i]['quiz_detail_id']=$row['quiz_detail_id'];\n\t\t\t\t$dataArray[$i]['question_group_id']=$row['question_group_id'];\n\t\t\t}\n\t\t\treturn $dataArray;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public static function get_sc_question_form_data_question_two() {\n global $USER;\n $qdata = new stdClass();\n $qdata->id = 4011;\n $qdata->createdby = $USER->id;\n $qdata->modifiedby = $USER->id;\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-002';\n $qdata->questiontext = array(\n \"text\" => 'Questiontext for Question 1',\n 'format' => FORMAT_HTML,\n 'itemid' => 1\n );\n $qdata->generalfeedback = array(\n \"text\" => 'This feedback is general',\n 'format' => FORMAT_HTML,\n 'itemid' => 2\n );\n $qdata->defaultmark = 1;\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n $qdata->scoringmethod = 'sconezero';\n $qdata->shuffleanswers = 1;\n $qdata->answernumbering = 'none';\n $qdata->numberofrows = 3;\n $qdata->correctrow = 1;\n $qdata->option_1 = array(\n 'text' => 'Option Text 1',\n 'format' => 1\n );\n $qdata->feedback_1 = array(\n 'text' => 'Feedback Text 1',\n 'format' => 1\n );\n $qdata->option_2 = array(\n 'text' => 'Option Text 2',\n 'format' => 1\n );\n $qdata->feedback_2 = array(\n 'text' => 'Feedback Text 2',\n 'format' => 1\n );\n $qdata->option_3 = array(\n 'text' => 'Option Text 3',\n 'format' => 1\n );\n $qdata->feedback_3 = array(\n 'text' => 'Feedback Text 3',\n 'format' => 1\n );\n $qdata->hint = array(\n 0 => array(\n 'text' => 'This is the 1st hint',\n 'format' => FORMAT_HTML\n ),\n 1 => array(\n 'text' => 'This is the 2nd hint',\n 'format' => FORMAT_HTML\n ),\n );\n return $qdata;\n }", "function getQuestionData(){\r\n\t\t$correctFlag=1;\r\n\t\tforeach($this->correctAnsQues as $key =>$correctQcode) {\r\n\t\t\t$correctAnsDetailsArr [] = $this->getindivisualQuesData($correctQcode,$correctFlag);\r\n\t\t}\r\n\r\n\t\t// sort in ascending order qno\r\n\t\t$qnoOrder =array();\r\n\t\tforeach($correctAnsDetailsArr as $key => $valArr) {\r\n\t\t\t$qnoOrder[$key]=$valArr['qno'];\r\n\t\t}\r\n\t\tarray_multisort($qnoOrder,SORT_ASC,$correctAnsDetailsArr);\r\n\r\n\t\t$correctFlag=0;\r\n\t\tforeach($this->wrongAnsQues as $key =>$wrongQcode) {\r\n\t\t\t$wrongAnsDetailsArr [] = $this->getindivisualQuesData($wrongQcode,$correctFlag);\t\r\n\t\t}\r\n\r\n\t\t// sort in ascending order qno\r\n\t\t$qnoOrder =array();\r\n\t\tforeach($wrongAnsDetailsArr as $key => $valArr) {\r\n\t\t\t$qnoOrder[$key]=$valArr['qno'];\r\n\t\t}\r\n\t\tarray_multisort($qnoOrder,SORT_ASC,$wrongAnsDetailsArr);\r\n\r\n\t\treturn array($correctAnsDetailsArr,$wrongAnsDetailsArr);\r\n\t}", "function unedtrivial_locate_questions($unedtrivial,$userid,$date){\n global $DB;\n $unedid = $unedtrivial->id;\n $numquestions = $unedtrivial->questionsperday;\n \n $selected = array();\n $date_failure_ini = $date - $unedtrivial->retryerror*86400;\n $date_failure_end = $date_failure_ini + 86399;\n $date_success_ini = $date - $unedtrivial->retrysuccess*86400;\n $date_success_end = $date_success_ini + 86399;\n\n $sql1 = 'SELECT * '\n . 'FROM {unedtrivial_history} u '\n .'WHERE u.idunedtrivial = '.$unedid.' AND '\n .' u.questionid <> -1 AND'\n . ' u.userid = '.$userid;\n \n $result1 = $DB->get_records_sql($sql1);\n $correct = $incorrect = array();\n $answered = array();\n $closed = array();\n $today = array();\n $lastresults = array();\n $available_correct = $available_incorrect = array();\n //Temp table [questionid,questionstate,questiondate] with lastest results per question\n foreach ($result1 as $row){\n $newrow = array();\n $locate = array_search($row->questionid, array_column($lastresults, 'questionid'));\n if($locate === false){\n $newrow['questionid'] = $row->questionid;\n $newrow['questionstate'] = $row->questionstate;\n $newrow['questiondate'] = $row->questiondate; \n $lastresults[] = $newrow;\n }else{\n $lastresults[$locate]['questionstate'] = $row->questionstate;\n $lastresults[$locate]['questiondate'] = $row->questiondate;\n }\n }\n //Now we classify temp table in questions available and closed\n foreach ($lastresults as $lr){\n if ($lr['questionstate'] == $unedtrivial->timestocomplete){\n $closed[] = $lr['questionid'];\n }else if ($lr['questionstate'] == -1 && $lr['questiondate'] < $date_failure_end){\n $available_incorrect[] = $lr['questionid'];\n }else if ($lr['questionstate'] > 0 && $lr['questiondate'] < $date_success_end){\n $available_correct[] = $lr['questionid'];\n }\n if ($lr['questiondate'] == $date){\n $today[] = $lr['questionid'];\n }\n $answered[] = $lr['questionid'];\n }\n \n //Firstly we insert incorrect questions\n for($i=0;$i<min($numquestions,count($available_incorrect));$i++){\n $selected[] = $available_incorrect[$i];\n }\n //Now, if necessary, we insert correct questions\n if (count($selected) < $numquestions){\n $min = min($numquestions-count($selected),count($available_correct));\n for($i=0;$i<$min;$i++){\n $selected[] = $available_correct[$i];\n }\n //Finally, we insert new questions\n if(count($selected) < $numquestions){\n srand($unedid+$userid+$date); //Random seed is arguments dependant\n $sql2 = 'SELECT u.id '\n . 'FROM {unedtrivial_questions} u '\n .'WHERE u.idunedtrivial = '.$unedid;\n $result2 = $DB->get_records_sql($sql2);\n $allquestions = array();\n foreach($result2 as $row2){\n $allquestions[] = $row2->id;\n }\n $available_all = array_diff($allquestions,$answered);\n $available_all = array_values($available_all);\n $min = min($numquestions-count($selected),count($available_all));\n \n for($i=0;$i<$min;$i++){\n $random = rand(0,count($available_all)-1);\n $selected[] = $available_all[$random];\n unset($available_all[$random]); //Delete question selected, to avoid duplicates\n $available_all = array_values($available_all); //Re-sort array\n }\n }\n } \n for ($i=count($selected);$i<$numquestions;$i++){\n //This should never happens... fill questions with null value\n $selected[] = -1;\n }\n //Cancel questions if user has answered some today\n for ($i=$numquestions-1;$i>=$numquestions-count($today);$i--){\n $selected[$i] = -1;\n }\n \n return $selected;\n}", "function parseQuestion($data)\n{\n\tforeach ($data['sentences'] as $sentenceKey => $sentence)\n\t{\n\t\t$result = array();\n\t\tforeach ($sentence['clauses'] as $clauseKey => $clause)\n\t\t{\n\t\t\tforeach ($clause['phrases'] as $phraseKey => $phrase)\n\t\t\t{\n\t\t\t\tforeach ($phrase['words'] as $wordKey => $word)\n\t\t\t\t{\n\t\t\t\t\t// Find interrogative to determine what the question is asking about\n\t\t\t\t\tif ($word['word_component'] == 'interrogative')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($clause['clause_type'] == 'main')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Simple sentence\n\t\t\t\t\t\t\t$result = array_merge($result, determineQuestionType($phrase['phrase_type'], $phrase['phrase_category'], $phrase['phrase_aspect'], $word['word_lex']));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Complex sentence\n\t\t\t\t\t\t\t$result = array_merge($result, determineQuestionType($clause['clause_type'], $phrase['phrase_category'], $phrase['phrase_aspect'], $word['word_lex']));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} //word\n\t\t\t} //phrase\n\t\t\t\n\t\t\t// Check if this is really a question\n\t\t\tif (($clause['clause_type'] == 'main') && ((strpos($clause['clause_construction'], 'question') !== false) || (strpos($clause['clause_construction'], 'information_request') !== false)))\n\t\t\t{\n\t\t\t\t$result['valid'] = true;\n\t\t\t\t$result['positive'] = (strpos($clause['clause_construction'], 'positive') !== false);\n\t\t\t\t$result['passive'] = (strpos($clause['clause_construction'], 'passive') !== false);\n\t\t\t\t$result['clause_tense'] = $clause['clause_tense'];\n\t\t\t\t$result = array_merge($result, determineSentenceParts($clause));\n\t\t\t}\n\t\t} //clause\n\n\t\tif (isset($result['valid']))\n\t\t{\n\t\t\tif (!isset($result['question_type']))\n\t\t\t{\n\t\t\t\t// Binary question\n\t\t\t\t$result['question_type'] = 'yes_no';\n\t\t\t}\n\t\t\telse if (isset($result[$result['question_type']]))\n\t\t\t{\n\t\t\t\t// Unset what is asked for\n\t\t\t\tunset($result[$result['question_type']]);\n\t\t\t}\n\t\t\tunset($result['valid']);\n\t\t\treturn $result;\n\t\t}\n\t} //sentence\n\t\n\treturn false;\n}", "public function get_sc_question_data_question_two() {\n global $USER;\n $qdata = new stdClass();\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-002';\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->idnumber = 4010;\n $qdata->category = 1;\n $qdata->contextid = 1;\n $qdata->parent = 0;\n $qdata->createdby = $USER->id;\n $qdata->modifiedby = $USER->id;\n $qdata->length = 1;\n $qdata->hidden = 0;\n $qdata->timecreated = \"1552376610\";\n $qdata->timemodified = \"1552376610\";\n $qdata->stamp = \"127.0.0.1+1552376610+76EZEc\";\n $qdata->version = \"127.0.0.1+155237661076EZEc\";\n $qdata->defaultmark = 1;\n $qdata->penalty = 0.3333333;\n $qdata->questiontext = \"Questiontext for Question 1\";\n $qdata->questiontextformat = FORMAT_HTML;\n $qdata->generalfeedback = \"This feedback is general\";\n $qdata->generalfeedbackformat = FORMAT_HTML;\n $qdata->options = new stdClass();\n $qdata->options->questionid = 4010;\n $qdata->options->scoringmethod = \"sconezero\";\n $qdata->options->shuffleanswers = 1;\n $qdata->options->answernumbering = 'none';\n $qdata->options->numberofrows = 3;\n $qdata->options->correctrow = 1;\n $qdata->options->rows = array(\n 1 => (object) array(\n 'id' => 1,\n 'questionid' => 4010,\n 'number' => 1,\n 'optiontext' => 'Option Text 1',\n 'optiontextformat' => 1,\n 'optionfeedback' => 'Feedback Text 1',\n 'optionfeedbackformat' => 1\n ),\n 2 => (object) array(\n 'id' => 2,\n 'questionid' => 4010,\n 'number' => 2,\n 'optiontext' => 'Option Text 2',\n 'optiontextformat' => 1,\n 'optionfeedback' => 'Feedback Text 2',\n 'optionfeedbackformat' => 1\n ),\n 3 => (object) array(\n 'id' => 3,\n 'questionid' => 4010,\n 'number' => 3,\n 'optiontext' => 'Option Text 3',\n 'optiontextformat' => 1,\n 'optionfeedback' => 'Feedback Text 3',\n 'optionfeedbackformat' => 1\n )\n );\n $qdata->hints = array(\n 0 => (object) array(\n 'id' => 0,\n 'questionid' => 4010,\n 'hint' => 'This is the 1st hint',\n 'hintformat' => FORMAT_HTML,\n 'shownumcorrect' => 0,\n 'clearwrong' => 0,\n 'options' => 0\n ),\n 1 => (object) array(\n 'id' => 1,\n 'questionid' => 4010,\n 'hint' => 'This is the 2nd hint',\n 'hintformat' => FORMAT_HTML,\n 'shownumcorrect' => 0,\n 'clearwrong' => 0,\n 'options' => 0\n )\n );\n return $qdata;\n }", "public function maybe_add_points( array $answer_data, $answer_type, $answer, $question_id ) {\n\t\t\treturn $answer_data;\n\t\t}", "public function space_in_unit_question_providers() {\n\n $data = [];\n\n $data[] = [\n 'units' => [\n 'match(km)' => ['type' => qtype_varnumunit::SPACEINUNIT_REMOVE_ALL_SPACE, 'fraction' => 1]\n ],\n 'answers' => [1],\n 'expects' => [\n '1km' => ['grade' => 1, 'state' => 'question_state_gradedright'],\n '1 km' => ['grade' => 1, 'state' => 'question_state_gradedright'],\n '1 km' => ['grade' => 1, 'state' => 'question_state_gradedright'],\n '2 km' => ['grade' => 0.1, 'state' => 'question_state_gradedpartial'],\n '1 cm' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '2cm' => ['grade' => 0, 'state' => 'question_state_gradedwrong'],\n '1 k m' => ['grade' => 1, 'state' => 'question_state_gradedright']\n ]\n ];\n $data[] = [\n 'units' => [\n 'match(km)' => ['type' => qtype_varnumunit::SPACEINUNIT_PRESERVE_SPACE_REQUIRE, 'fraction' => 1]\n ],\n 'answers' => [1],\n 'expects' => [\n '1m' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '1km' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '1 km' => ['grade' => 1, 'state' => 'question_state_gradedright'],\n '1 m' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '1 km' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '2 m' => ['grade' => 0, 'state' => 'question_state_gradedwrong'],\n '1 cm' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '1 cm' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '2cm' => ['grade' => 0, 'state' => 'question_state_gradedwrong'],\n '1 k m' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '2 k m' => ['grade' => 0, 'state' => 'question_state_gradedwrong']\n ]\n ];\n\n $data[] = [\n 'units' => [\n 'match(km)' => ['type' => qtype_varnumunit::SPACEINUNIT_PRESERVE_SPACE_NOT_REQUIRE, 'fraction' => 1]\n ],\n 'answers' => [1],\n 'expects' => [\n '1km' => ['grade' => 1, 'state' => 'question_state_gradedright'],\n '1 km' => ['grade' => 1, 'state' => 'question_state_gradedright'],\n '1 km' => ['grade' => 1, 'state' => 'question_state_gradedright'],\n '2 km' => ['grade' => 0.1, 'state' => 'question_state_gradedpartial'],\n '1 cm' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '2cm' => ['grade' => 0, 'state' => 'question_state_gradedwrong'],\n '1 k m' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '2 k m' => ['grade' => 0, 'state' => 'question_state_gradedwrong']\n ]\n ];\n\n $data[] = [\n 'units' => [\n 'match(cm)' => ['type' => qtype_varnumunit::SPACEINUNIT_REMOVE_ALL_SPACE, 'fraction' => 1],\n 'match(dm)' => ['type' => qtype_varnumunit::SPACEINUNIT_PRESERVE_SPACE_NOT_REQUIRE, 'fraction' => 0.75],\n 'match(km)' => ['type' => qtype_varnumunit::SPACEINUNIT_PRESERVE_SPACE_REQUIRE, 'fraction' => 0.5]\n ],\n 'answers' => [1],\n 'expects' => [\n '1cm' => ['grade' => 1, 'state' => 'question_state_gradedright'],\n '1dm' => ['grade' => 0.975, 'state' => 'question_state_gradedpartial'],\n '1m' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '1km' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '1 cm' => ['grade' => 1, 'state' => 'question_state_gradedright'],\n '1 dm' => ['grade' => 0.975, 'state' => 'question_state_gradedpartial'],\n '1 m' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '1 km' => ['grade' => 0.95, 'state' => 'question_state_gradedpartial'],\n '1 cm' => ['grade' => 1, 'state' => 'question_state_gradedright'],\n '1 dm' => ['grade' => 0.975, 'state' => 'question_state_gradedpartial'],\n '1 m' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '1 km' => ['grade' => 0.9, 'state' => 'question_state_gradedpartial'],\n '10cm' => ['grade' => 0.1, 'state' => 'question_state_gradedpartial'],\n '10dm' => ['grade' => 0.075, 'state' => 'question_state_gradedpartial'],\n '10m' => ['grade' => 0, 'state' => 'question_state_gradedwrong'],\n '10km' => ['grade' => 0, 'state' => 'question_state_gradedwrong'],\n '10 cm' => ['grade' => 0.1, 'state' => 'question_state_gradedpartial'],\n '10 dm' => ['grade' => 0.075, 'state' => 'question_state_gradedpartial'],\n '10 m' => ['grade' => 0, 'state' => 'question_state_gradedwrong'],\n '10 km' => ['grade' => 0.05, 'state' => 'question_state_gradedpartial'],\n '10 cm' => ['grade' => 0.1, 'state' => 'question_state_gradedpartial'],\n '10 dm' => ['grade' => 0.075, 'state' => 'question_state_gradedpartial'],\n '10 m' => ['grade' => 0, 'state' => 'question_state_gradedwrong'],\n '10 km' => ['grade' => 0, 'state' => 'question_state_gradedwrong']\n ]\n ];\n\n return $data;\n }", "function extractarray($quodata, $quoremarkdata) {\r\n $this->set_qid($quodata['qid']);\r\n $this->set_bid($quodata['bid']);\r\n $this->set_currency($quodata['currency']);\r\n $this->set_quono($quodata['quono']);\r\n $this->set_Shape_Code($quodata['Shape_Code']);\r\n $this->set_Category($quodata['Category']);\r\n $this->set_tabletype($quodata['tabletype']);\r\n $this->set_company($quodata['company']);\r\n $this->set_pagetype($quodata['pagetype']);\r\n $this->set_custype($quodata['custype']);\r\n $this->set_cusstatus($quodata['cusstatus']);\r\n $this->set_cid($quodata['cid']);\r\n $this->set_accno($quodata['accno']);\r\n $this->set_date($quodata['date']);\r\n $this->set_terms($quodata['terms']);\r\n $this->set_item($quodata['item']);\r\n $this->set_quantity($quodata['quantity']);\r\n $this->set_grade($quodata['grade']);\r\n $this->set_mdt($quodata['mdt']);\r\n $this->set_mdw($quodata['mdw']);\r\n $this->set_mdl($quodata['mdl']);\r\n $this->set_dim_desp($quodata['dim_desp']);\r\n $this->set_fdt($quodata['fdt']);\r\n $this->set_fdw($quodata['fdw']);\r\n $this->set_fdl($quodata['fdl']);\r\n $this->set_finishing_dim_desp($quodata['finishing_dim_desp']);\r\n $this->set_process($quodata['process']);\r\n $this->set_mat($quodata['mat']);\r\n $this->set_pmach($quodata['pmach']);\r\n $this->set_cncmach($quodata['cncmach']);\r\n $this->set_other($quodata['other']);\r\n $this->set_unitprice($quodata['unitprice']);\r\n $this->set_amount($quodata['amount']);\r\n $this->set_discount($quodata['discount']);\r\n $this->set_vat($quodata['vat']);\r\n $this->set_gst($quodata['gst']);\r\n $this->set_ftz($quodata['ftz']);\r\n $this->set_amountmat($quodata['amountmat']);\r\n $this->set_discountmat($quodata['discountmat']);\r\n $this->set_gstmat($quodata['gstmat']);\r\n $this->set_totalamountmat($quodata['totalamountmat']);\r\n $this->set_amountpmach($quodata['amountpmach']);\r\n $this->set_discountpmach($quodata['discountpmach']);\r\n $this->set_gstpmach($quodata['gstpmach']);\r\n $this->set_totalamountpmach($quodata['totalamountpmach']);\r\n $this->set_amountcncmach($quodata['amountcncmach']);\r\n $this->set_discountcncmach($quodata['discountcncmach']);\r\n $this->set_gstcncmach($quodata['gstcncmach']);\r\n $this->set_totalamountcncmach($quodata['totalamountcncmach']);\r\n $this->set_amountother($quodata['amountother']);\r\n $this->set_discountother($quodata['discountother']);\r\n $this->set_gstother($quodata['gstother']);\r\n $this->set_totalamountother($quodata['totalamountother']);\r\n $this->set_totalamount($quodata['totalamount']);\r\n $this->set_mat_disc($quodata['mat_disc']);\r\n $this->set_pmach_disc($quodata['pmach_disc']);\r\n $this->set_aid_quo($quodata['aid_quo']);\r\n $this->set_aid_cus($quodata['aid_cus']);\r\n $this->set_datetimeissue($quodata['datetimeissue']);\r\n $this->set_odissue($quodata['odissue']);\r\n $this->set_rev_parent($quodata['rev_parent']);\r\n $this->set_rev_child($quodata['rev_child']);\r\n $this->set_deleteby($quodata['deleteby']);\r\n $this->set_remarks1($quoremarkdata['remarks1']);\r\n $this->set_remarks2($quoremarkdata['remarks2']);\r\n $this->set_remarks3($quoremarkdata['remarks3']);\r\n $this->set_remarks4($quoremarkdata['remarks4']);\r\n $this->set_datetimedelete_quo(date(\"Y-m-d\"));\r\n }", "function generate_test_questions()\n\t{\n\t\t$dataArray = array();\n\t\t$i=0;\t\n\t\tif($this->quiz_details == false){\n\t\t\t$this->error_description = \"Rules not defined\";\n\t\t\treturn false;\n\t\t}else{\n\t\t\tforeach ($this->quiz_details as $quiz_detail) \n\t\t\t{\n\t\t\t\tif($quiz_detail['question_ids'] == \"\"){//random questions for test\n\t\t\t\t\tif($quiz_detail['question_group'] == QUESTION_GROUP_TRUE){\n\t\t\t\t\t\t$utd_array = $this->generate_data_array_for_random_real_test_rule_group($quiz_detail);\n\t\t\t\t\t}elseif($quiz_detail['question_group'] == QUESTION_GROUP_FALSE){\n\t\t\t\t\t\t$utd_array = $this->generate_data_array_for_random_real_test_rule($quiz_detail);\n\t\t\t\t\t}\n\t\t\t\t}else{//staic questions for test\n\t\t\t\t\t$utd_array = $this->generate_data_array_for_static_real_test_rule($quiz_detail);\n\t\t\t\t}\n\n\t\t\t\tif($utd_array == false){\n\t\t\t\t\t$this->error_description = \"Not enough questions for this quiz .Please contact administrator\";\n\t\t\t\t\t$_SESSION[SESSION_TITLE.'flash'] = $this->error_description;\n\t\t\t\t header( \"Location: dashboard.php\");\n\t\t\t\t exit();\n\t\t\t\t}else{\n\t\t\t\t\t$dataArray = array_merge($dataArray,$utd_array);\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\treturn $dataArray;\n\t\t}\n\t}", "abstract protected function define_datapoints();", "function gen_178()\r\n{\r\n $question = \"\";\r\n $numerator = \"\";\r\n $denominator = \"\";\r\n $split = '@@';\r\n $a = rand(1,12);\r\n $c = rand(1,12);\r\n $d = rand(1,12);\r\n rand_switch_sign($a,3);\r\n rand_switch_sign($c,3);\r\n rand_switch_sign($d,3);\r\n $question = \"Passes through ( $a , $c );<br>\";\r\n ///////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////\r\n //// ////\r\n //// Passes through (a,c) perpendicular to x=d ////\r\n //// ////\r\n ///////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////\r\n $question .= \"Perpendicular to x = $d\";\r\n $numerator = \"not_used\".$split.\"1\".$split.\"not_used\".$split.\"1\".$split;\r\n $numerator .= $c.$split.\"1\".$split.\"not_used\".$split.\"1\";\r\n $answer = array($question,$numerator,$denominator,0,0,32);\r\n return $answer;\r\n}", "public static function get_writeregex_question_data_one_regex_two_teststings() {\n global $USER;\n\n $qdata = new stdClass();\n\n $qdata->createdby = $USER->id;\n $qdata->modifiedby = $USER->id;\n $qdata->qtype = 'writeregex';\n $qdata->name = 'Write regex question';\n $qdata->questiontext = 'Question text';\n $qdata->questiontextformat = FORMAT_HTML;\n $qdata->generalfeedback = '';\n $qdata->generalfeedbackformat = FORMAT_HTML;\n $qdata->defaultmark = 1;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n\n $qdata->options = new stdClass();\n $qdata->options->usecase = false;\n $qdata->options->correctanswer = '';\n $qdata->options->exactmatch = true;\n $qdata->options->notation = 'native';\n $qdata->options->engine = 'fa_matcher';\n $qdata->options->usecharhint = true;\n $qdata->options->uselexemhint = true;\n\n $qdata->options->answers = array(\n 13 => (object) array(\n 'id' => 13,\n 'answer' => '000',\n 'answerformat' => FORMAT_PLAIN,\n 'fraction' => '0.5',\n 'feedback' => 'No tests.',\n 'feedbackformat' => FORMAT_HTML,\n 'regextests' => null\n )\n );\n\n $qdata->hints = array(\n 1 => (object) array(\n 'hint' => 'Hint 1.',\n 'hintformat' => FORMAT_HTML,\n 'shownumcorrect' => 0,\n 'clearwrong' => 0,\n 'options' => 'hintmatchingpart',\n ),\n 2 => (object) array(\n 'hint' => 'Hint 2.',\n 'hintformat' => FORMAT_HTML,\n 'shownumcorrect' => 1,\n 'clearwrong' => 1,\n 'options' => 'hintnextchar',\n ),\n );\n\n return $qdata;\n }", "function gen_179()\r\n{\r\n $question = \"\";\r\n $numerator = \"\";\r\n $denominator = \"\";\r\n $split = '@@';\r\n $a = rand(1,12);\r\n $c = rand(1,12);\r\n $d = rand(1,12);\r\n rand_switch_sign($a,3);\r\n rand_switch_sign($c,3);\r\n rand_switch_sign($d,3);\r\n $question = \"Passes through ( $a , $c );<br>\";\r\n ///////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////\r\n //// ////\r\n //// Passes through (a,c) perpendicular to y=d ////\r\n //// ////\r\n ///////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////\r\n $question .= \"Perpendicular to y = $d\";\r\n $numerator = \"not_used\".$split.\"1\".$split.\"not_used\".$split.\"1\".$split;\r\n $numerator .= \"not_used\".$split.\"1\".$split.$a.$split.\"1\";\r\n $answer = array($question,$numerator,$denominator,0,0,32);\r\n return $answer;\r\n}", "function get_all_answers_belongToOne_question($questionid){\n\t$data = array();\n\t$result = mysql_query(\"SELECT a.*, b.* FROM mock_exam_questions a, mock_exam_answers b WHERE b.question_id = a.question_id AND a.question_id = '$questionid'\");\n\twhile ($row = mysql_fetch_assoc($result)) {\n\t $data [] = $row;\n\t}\n\treturn $data;\n}", "public function run()\n {\n $dataAnswer = [\n [\n 'option' => null,\n 'question_id' => 1\n ],\n [\n 'option' => null,\n 'question_id' => 2\n ],\n [ \n 'option' => 'Homme',\n 'question_id' => 3\n ],\n [\n 'option' => 'Femme',\n 'question_id' => 3\n ],\n [ \n 'option'=>'Préfère ne pas répondre',\n 'question_id' => 3\n ],\n [\n 'option' => null,\n 'question_id' => 4\n ],\n [\n 'option' => null,\n 'question_id' => 5\n ],\n [\n 'option' => 'Occulus Rift/s',\n 'question_id' => 6\n ],\n [\n 'option' => 'HTC Vive',\n 'question_id' => 6\n ],\n [\n 'option' => 'Windows Mixed Reality',\n 'question_id' => 6\n ],\n [\n 'option' => 'PSVR',\n 'question_id' => 6\n ],\n [\n 'option' => 'SteamVR',\n 'question_id' => 7\n ],\n [\n 'option' => 'Occulus store',\n 'question_id' => 7\n ],\n [\n 'option' => 'Viveport',\n 'question_id' => 7\n ],\n [\n 'option' => 'Playstation VR',\n 'question_id' => 7\n ],\n [\n 'option' => 'Google Play',\n 'question_id' => 7\n ],\n [\n 'option' => 'Windows store',\n 'question_id' => 7\n ],\n [\n 'option' => 'Occulus Quest',\n 'question_id' => 8\n ],\n [\n 'option' => 'Occulus Go',\n 'question_id' => 8\n ],\n [\n 'option' => 'HTC Vive Pro',\n 'question_id' => 8\n ],\n [\n 'option' => 'Autre',\n 'question_id' => 8\n ],\n [\n 'option' => 'Aucun',\n 'question_id' => 8\n ],\n [\n 'option' => null,\n 'question_id' => 9\n ],\n [\n 'option' => 'Regarder des émissions TV en direct',\n 'question_id' => 10\n ],\n [\n 'option' => 'Regarder des films',\n 'question_id' => 10\n ],\n [\n 'option' => 'Jouer en solo',\n 'question_id' => 10\n ],\n [\n 'option' => 'Jouer en team',\n 'question_id' => 10\n ],\n [\n 'option' => null,\n 'question_id' => 11\n ],\n [\n 'option' => null,\n 'question_id' => 12\n ],\n [\n 'option' => null,\n 'question_id' => 13\n ],\n [\n 'option' => null,\n 'question_id' => 14\n ],\n [\n 'option' => null,\n 'question_id' => 15\n ],\n [\n 'option' => 'Oui',\n 'question_id' => 16\n ],\n [\n 'option' => 'Non',\n 'question_id' => 16\n ],\n [\n 'option' => 'Oui',\n 'question_id' => 17\n ],\n [\n 'option' => 'Non',\n 'question_id' => 17\n ],\n [\n 'option' => 'Oui',\n 'question_id' => 18\n ],\n [\n 'option' => 'Non',\n 'question_id' => 18\n ],\n [\n 'option' => 'Oui',\n 'question_id' => 19\n ],\n [\n 'option' => 'Non',\n 'question_id' => 19\n ],\n [\n 'option' => null,\n 'question_id' => 20\n ]\n ];\n\n foreach($dataAnswer as $dt){\n $insertData = Answer::create(array(\n 'option'=>$dt['option']\n ));\n\n $insertData->question()->associate($dt['question_id']);\n $insertData->save();\n }\n }", "function gen_174()\r\n{\r\n $question = \"\";\r\n $numerator = \"\";\r\n $denominator = \"\";\r\n $split = '@@';\r\n $a = rand(1,12);\r\n $c = rand(1,12);\r\n rand_switch_sign($a,3);\r\n rand_switch_sign($c,3);\r\n $question = \"Passes through ( $a , $c );<br>\";\r\n ///////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////\r\n //// ////\r\n //// Through (a,c) perpendicular to the x-axis ////\r\n //// ////\r\n ///////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////\r\n $question .= \"Perpendicular to the x-axis\";\r\n $numerator = \"not_used\".$split.\"1\".$split.\"not_used\".$split.\"1\".$split;\r\n $numerator .= \"not_used\".$split.\"1\".$split.$a.$split.\"1\";\r\n $answer = array($question,$numerator,$denominator,0,0,32);\r\n return $answer;\r\n}", "public function get_possible_responses($questiondata) {\n $parts = array();\n\n foreach ($questiondata->options->answers as $aid => $answer) {\n $parts[$aid] = array($aid => new question_possible_response(\n html_to_text(format_text(\n $answer->answer, $answer->answerformat, array('noclean' => true)),\n 0, false), $answer->fraction));\n }\n\n return $parts;\n }", "function create_questions() {\n\n// create questions array\n$questions = array();\n\n// This loop creates 25 questions\nfor ($i = 0; $i<25; $i++) {\n\n// variables for random numbers\n $ranNum1 = rand(8,50);\n $ranNum2 = rand(5,25);\n $ran10 = rand(-10,10);\n $ran9 = rand(-9,9);\n\n // Calculate correct answer\n$correctAnswer = $ranNum1 + $ranNum2; \n\n// incorrect answers = correct answer plus a random number in a range\n$firstIncorrect = $correctAnswer + $ran10;\n$secondIncorrect = $correctAnswer + $ran9;\n\n // Add the 2 random numbers that add up \n $questions[$i][\"leftAdder\"] = $ranNum1;\n $questions[$i][\"rightAdder\"] = $ranNum2;\n\n // put the correct answer in the array\n $questions[$i][\"correctAnswer\"] = $correctAnswer;\n\n \n// $questions[$i][\"secondIncorrectAnswer\"] = $secondIncorrect; \n\n// Get incorrect answers within 10 numbers either way of correct answer\n// The below Make sure it is a unique answer\nif ($firstIncorrect == $correctAnswer) {\n$firstIncorrect += $ran10;\n}\n\nif ($secondIncorrect == $correctAnswer || $secondIncorrect == $firstIncorrect) {\n$secondIncorrect += $ran9;\n}\n\n$questions[$i][\"firstIncorrectAnswer\"] = $firstIncorrect; \n$questions[$i][\"secondIncorrectAnswer\"] = $secondIncorrect; \n}\n\n// After the loop, return the array\nreturn $questions;\n}", "public function init($question) {\n\t\t//check_and_add(\"type\", $question);\n\t\t//need to load the question index data files from Stratum\n\n\t}" ]
[ "0.6789892", "0.64383405", "0.57158715", "0.56909364", "0.5638877", "0.5603007", "0.55980515", "0.5480343", "0.54596627", "0.5434071", "0.542534", "0.53599006", "0.52768487", "0.5251491", "0.5220635", "0.5217073", "0.51916647", "0.5186891", "0.51796424", "0.51712453", "0.5061983", "0.50475496", "0.5004322", "0.49868283", "0.49556175", "0.49541017", "0.4946121", "0.49394378", "0.4923562", "0.4920895" ]
0.7162405
0
Serializes the given data into a json string.
public function serialize($data) { return json_encode($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function toJson($data)\n {\n return json_encode(self::jsonPrepare($data));\n }", "public function serialize($data): string\n {\n return json_encode($data, JSON_THROW_ON_ERROR | $this->options, $this->depth);\n }", "public function toJson($data)\n {\n return json_encode($data);\n }", "public function toJson($data)\n {\n print json_encode($data);\n exit;\n }", "private function convertToJSON($data)\n {\n return json_encode($data);\n }", "public function jsonEncode($data)\n {\n return $this->jsonEncoder->serialize($data);\n }", "protected function encode_data($data) {\n return json_encode($data);\n }", "public static function jsonEncode($data)\n {\n }", "public function asJSON($data)\n {\n return json_encode($data);\n }", "protected function _json($data)\n {\n return Mage::helper('core')->jsonEncode($data);\n }", "private function json($data)\n {\n if (is_array($data)) {\n return json_encode($data, JSON_NUMERIC_CHECK);\n }\n }", "public static function Json($data) {\n return print json_encode($data);\n }", "protected function serialize($data)\n {\n if ($this->serializer === null) {\n return Json::encode($data);\n }\n\n return call_user_func($this->serializer, $data);\n }", "private function json($data){\n if(is_array($data)){\n return json_encode($data, JSON_PRETTY_PRINT);\n } else {\n return \"{}\";\n }\n }", "public function serialize($data)\n {\n if (is_string($data) === true) {\n return $data;\n } else {\n $data = json_encode($data);\n if ($data === '[]') {\n return '{}';\n } else {\n return $data;\n }\n }\n }", "private function json($data)\r\n\t{\r\n\t\tif(is_array($data)){\r\n\t\t\treturn json_encode($data);\r\n\t\t}\r\n\t}", "private function json($data) {\n if (is_array ( $data )) {\n return json_encode ( $data );\n }\n }", "public function json($data) {\r\n if (is_array($data)) {\r\n return json_encode($data);\r\n }\r\n }", "public function get_json($data)\n\t{\n\t\tif (version_compare(APP_VER, '2.6', '<') OR !function_exists('json_encode'))\n\t\t{\n\t\t\treturn $this->EE->javascript->generate_json($data, TRUE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn json_encode($data);\n\t\t}\n\t}", "public static function jsonEncode($data)\n {\n return json_encode($data, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);\n }", "function serializeData ($data) {\n $obj = json_decode($data, true);\n $newStructure = $this->buildStructureFromObj($obj);\n return serialize($newStructure);\n }", "private function json($data){\n\t\t\tif(is_array($data)){\n\t\t\t\treturn json_encode($data);\n\t\t\t}\n\t\t}", "private function json($data){\n\t\t\tif(is_array($data)){\n\t\t\t\treturn json_encode($data);\n\t\t\t}\n\t\t}", "private function json($data){\n\t\t\tif(is_array($data)){\n\t\t\t\treturn json_encode($data);\n\t\t\t}\n\t\t}", "private function json($data){\n\t\t\tif(is_array($data)){\n\t\t\t\treturn json_encode($data);\n\t\t\t}\n\t\t}", "private function formatData($data = array()) {\n return json_encode($data);\n }", "private function dataToJson($data)\n {\n $cols = $this->getColumns($data);\n\n $rows = array();\n foreach ($data as $key => $row) {\n if ($key != 0 || !$this->_skipFirstRow) {\n $c = array();\n foreach ($row as $v) {\n $c[] = array('v' => $v);\n }\n $rows[] = array('c' => $c);\n }\n }\n\n return json_encode(array('cols' => $cols, 'rows' => $rows));\n }", "protected function encodeLogData($data)\n {\n return json_encode($this->processLogData($data));\n }", "public function json($data)\n {\n if (is_array($data)) {\n $data = json_encode($data);\n } else {\n $data = (array)$data;\n }\n\n $this->withHeader('Content-Type', 'application/json');\n $this->end($data);\n }", "public static function toJSON($data)\n {\n if (is_array($data)) {\n\t\t\t$json = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);\n\t\t\treturn $json;\n } else {\n return false;\n }\n }" ]
[ "0.8110015", "0.8071297", "0.8053194", "0.7990472", "0.7870202", "0.7870039", "0.7817454", "0.7777224", "0.77708405", "0.7726522", "0.77208924", "0.7557288", "0.75391245", "0.75316614", "0.75233114", "0.74971956", "0.74935734", "0.74794257", "0.7448531", "0.7448411", "0.7349019", "0.73376846", "0.73376846", "0.73376846", "0.73376846", "0.7314828", "0.7312106", "0.7269576", "0.72154033", "0.7214837" ]
0.8197363
0
Returns the class metadata factory used in the new validator
public function getClassMetadataFactory() { trigger_error('getClassMetadataFactory() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED); return $this->classMetadataFactory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMetadataFactory()\n {\n return $this->delegate->getMetadataFactory();\n }", "private function getCookieMetadataFactory()\n {\n if (!$this->cookieMetadataFactory) {\n $this->cookieMetadataFactory = ObjectManager::getInstance()->get(CookieMetadataFactory::class);\n }\n return $this->cookieMetadataFactory;\n }", "public function createMetadataObject()\n {\n return new ClassMetadata($this->resolveProperties());\n }", "private function getCookieMetadataFactory()\n {\n if (!$this->cookieMetadataFactory) {\n $this->cookieMetadataFactory = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\n \\Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory::class\n );\n }\n return $this->cookieMetadataFactory;\n }", "protected function getJmsSerializer_MetadataFactoryService()\n {\n $this->services['jms_serializer.metadata_factory'] = $instance = new \\Metadata\\MetadataFactory(new \\Metadata\\Driver\\LazyLoadingDriver($this, 'jms_serializer.metadata_driver'), 'Metadata\\\\ClassHierarchyMetadata', true);\n\n $instance->setCache(new \\Metadata\\Cache\\FileCache((__DIR__.'/jms_serializer')));\n\n return $instance;\n }", "protected function getSecurity_Extra_MetadataFactoryService()\n {\n $this->services['security.extra.metadata_factory'] = $instance = new \\Metadata\\MetadataFactory(new \\Metadata\\Driver\\LazyLoadingDriver($this, 'security.extra.metadata_driver'));\n\n $instance->setCache(new \\Metadata\\Cache\\FileCache((__DIR__.'/jms_security'), true));\n $instance->setIncludeInterfaces(true);\n\n return $instance;\n }", "protected function getSerializer_Mapping_ClassMetadataFactoryService()\n {\n return $this->privates['serializer.mapping.class_metadata_factory'] = new \\Symfony\\Component\\Serializer\\Mapping\\Factory\\ClassMetadataFactory(new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\LoaderChain(array(0 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\AnnotationLoader(($this->privates['annotations.cached_reader'] ?? $this->getAnnotations_CachedReaderService())), 1 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/Banner.yaml')), 2 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/ClassifyGoods.yaml')), 3 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/Consumer.yaml')), 4 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/CustomPage.yaml')), 5 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/Goods.yaml')), 6 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/GoodsBanner.yaml')), 7 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/Marketing.yaml')), 8 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/Member.yaml')), 9 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/Order.yaml')), 10 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/OrderBill.yaml')), 11 => new \\Symfony\\Component\\Serializer\\Mapping\\Loader\\YamlFileLoader(($this->targetDirs[3].'/config/api_platform/serialization/ReceiptInfo.yaml')))), NULL);\n }", "protected function validationFactory()\n {\n return app(Factory::class);\n }", "public function getFactory() {}", "private function getValidationFactory() : Factory\n {\n $container = Container::getInstance();\n return $container->make('validator');\n }", "protected function _metadata()\n {\n $called_class = get_class($this);\n //if ($called_class::$metadata === null) return $called_class::$metadata = \\D::manager()->getClassMetadata($called_class);\n return \\D::manager()->getClassMetadata($called_class);\n }", "protected function getValidationFactory()\n {\n return app(Factory::class);\n }", "public static function metadata()\n {\n $called_class = get_called_class();\n return \\D::manager()->getClassMetadata($called_class);\n }", "public function __construct(ClassMetadataFactory $metadataFactory);", "public function factory()\n {\n return $this->factory;\n }", "protected function validator()\n {\n return $this->validationFactory;\n }", "public static function factory()\n {\n return parent::factory(__CLASS__);\n }", "public static function getMetaClass(): string;", "abstract public function getObjectFactory();", "public function get_config_factory_class() {\n\t\treturn __NAMESPACE__ . '\\ConfigFactory';\n\t}", "public function getFactory()\n {\n return $this->factory;\n }", "public function getMetadata($class);", "public function getFactory() {\n return $this->factory;\n }", "public function getClassMetaData(): ClassMetadataInfo;", "public function getFactory()\n {\n return new Factory($this);\n }", "protected static function getClassMetadata() {\n\t\treturn self::getEntityManager()->getClassMetadata(get_called_class());\n\t}", "final public function getFactory() {\n\t\treturn '';\n\t}", "public function getValidationFactory(): callable {\n return $this->validationFactory;\n }", "public function getFactory() {\n\t\treturn $this->factory;\n\t}", "protected function getValidator_ValidatorFactoryService()\n {\n return $this->privates['validator.validator_factory'] = new \\Symfony\\Component\\Validator\\ContainerConstraintValidatorFactory(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('Sonata\\\\CoreBundle\\\\Validator\\\\InlineValidator' => function () {\n return ($this->services['sonata.admin.validator.inline'] ?? $this->load('getSonata_Admin_Validator_InlineService.php'));\n }, 'Sonata\\\\FormatterBundle\\\\Validator\\\\Constraints\\\\FormatterValidator' => function () {\n return ($this->privates['sonata.formatter.validator.formatter'] ?? $this->load('getSonata_Formatter_Validator_FormatterService.php'));\n }, 'Sonata\\\\MediaBundle\\\\Validator\\\\FormatValidator' => function () {\n return ($this->privates['sonata.media.validator.format'] ?? $this->load('getSonata_Media_Validator_FormatService.php'));\n }, 'Symfony\\\\Bridge\\\\Doctrine\\\\Validator\\\\Constraints\\\\UniqueEntityValidator' => function () {\n return ($this->privates['doctrine.orm.validator.unique'] ?? $this->load('getDoctrine_Orm_Validator_UniqueService.php'));\n }, 'Symfony\\\\Component\\\\Security\\\\Core\\\\Validator\\\\Constraints\\\\UserPasswordValidator' => function () {\n return ($this->privates['security.validator.user_password'] ?? $this->load('getSecurity_Validator_UserPasswordService.php'));\n }, 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\EmailValidator' => function () {\n return ($this->privates['validator.email'] ?? $this->privates['validator.email'] = new \\Symfony\\Component\\Validator\\Constraints\\EmailValidator('html5'));\n }, 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\ExpressionValidator' => function () {\n return ($this->privates['validator.expression'] ?? $this->privates['validator.expression'] = new \\Symfony\\Component\\Validator\\Constraints\\ExpressionValidator());\n }, 'doctrine.orm.validator.unique' => function () {\n return ($this->privates['doctrine.orm.validator.unique'] ?? $this->load('getDoctrine_Orm_Validator_UniqueService.php'));\n }, 'security.validator.user_password' => function () {\n return ($this->privates['security.validator.user_password'] ?? $this->load('getSecurity_Validator_UserPasswordService.php'));\n }, 'sonata.admin.validator.inline' => function () {\n return ($this->services['sonata.admin.validator.inline'] ?? $this->load('getSonata_Admin_Validator_InlineService.php'));\n }, 'sonata.core.validator.inline' => function () {\n return ($this->privates['sonata.core.validator.inline'] ?? $this->load('getSonata_Core_Validator_InlineService.php'));\n }, 'sonata.formatter.validator.formatter' => function () {\n return ($this->privates['sonata.formatter.validator.formatter'] ?? $this->load('getSonata_Formatter_Validator_FormatterService.php'));\n }, 'sonata.media.validator.format' => function () {\n return ($this->privates['sonata.media.validator.format'] ?? $this->load('getSonata_Media_Validator_FormatService.php'));\n }, 'validator.expression' => function () {\n return ($this->privates['validator.expression'] ?? $this->privates['validator.expression'] = new \\Symfony\\Component\\Validator\\Constraints\\ExpressionValidator());\n })));\n }" ]
[ "0.7407256", "0.69445896", "0.6725774", "0.6678491", "0.660235", "0.6520275", "0.64494145", "0.64267826", "0.640623", "0.6386256", "0.63341016", "0.6319486", "0.61114985", "0.610795", "0.610302", "0.607565", "0.6050432", "0.60361063", "0.60305715", "0.6029994", "0.60176826", "0.5994886", "0.599153", "0.598758", "0.59688985", "0.5961754", "0.5947777", "0.5930406", "0.5906185", "0.5883627" ]
0.7171429
1
course schedule grid in the catalog page
public function coursecostsGridAction() { $this->_initProduct(); $this->loadLayout(); $this->getLayout()->getBlock('product.edit.tab.coursecost'); $this->renderLayout(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function schedule()\n {\n $item = explode(\"!\", $_GET['compId']);\n $table = $item[0];\n $prodid = $item[1];\n $compNiveau = $this->getCompetencyNiveau($prodid);\n switch ($table)\n {\n case \"competency\":\n $niveau = 0;\n $competency = $prodid;\n break;\n case \"niveau\":\n $niveau = $prodid;\n $competency = $compNiveau[\"id\"];\n break;\n default:\n break;\n }\n $db = &atkGetDb();\n $query = $db->createQuery();\n $query->addTable(\"competency_planning\");\n $query->addField(\"competency_id\", $competency);\n $query->addField(\"niveau_id\", $niveau);\n $query->addField(\"person_id\", $this->user['id']);\n $query->addField(\"planDate\", $_GET['schedule']);\n $query->addField(\"remark\", $_GET['message']);\n $db->query($query->buildInsert());\n }", "protected function grid()\n {\n return Admin::grid(Schedule::class, function (Grid $grid) {\n $grid->year('年');\n $grid->month('月');\n $grid->day('日');\n $grid->competition_id('比赛')->display(function ($id) {\n return $id ? Competition::find($id)->title : null;\n });\n $grid->visible('可见')->switch();\n $grid->info('额外信息');\n });\n }", "protected function grid()\n {\n $grid = new Grid(new Schedule);\n\n $grid->id('Id');\n $grid->type('Type')->display(function($category) {\n $result = [ 'Inbound', 'Outbound'];\n return $result[$category];\n });\n $grid->column('Tour name')->display(function () {\n $names = array_map(function($item) {\n return \"<span>{$item['lang']}: {$item['tour_name']}</span><br>\";\n }, $this->trans->toArray());\n return implode('', $names);\n });\n $grid->start_date('Start date');\n $grid->column('Url')->display(function () {\n $names = array_map(function($item) {\n return \"<span>{$item['lang']}: {$item['url']}</span><br>\";\n }, $this->trans->toArray());\n return implode('', $names);\n });\n $grid->status('Status');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n return $grid;\n }", "public function gridAction()\n {\n $this->loadLayout();\n $this->getResponse()->setBody(\n $this->getLayout()->createBlock('festivalbackground/adminhtml_festivalbackground_grid')->toHtml()\n );\n }", "public function gridAction()\n\t{\n\t\t$this->loadLayout();\n\t\t$this->renderLayout();\n\t}", "public function schedule_list()\n\t{\n\t\t$data['title'] = \"Schedule List\";\n\t\t$data['schedul_info'] = $this->schedule_model->get_schedule_list();\n\t\t$this->load->view('admin/_header',$data);\n\t\t$this->load->view('admin/_left_sideber');\n\t\t$this->load->view('admin/view_schedule_list');\n\t\t$this->load->view('admin/_footer');\n\t}", "function schedule() {\n\t\t$this->addCheck(new HandlerValidatorSchedConf($this));\n\t\t$this->validate();\n\n\t\t$conference =& Request::getConference();\n\t\t$schedConf =& Request::getSchedConf();\n\n\t\t$postScheduleDate = $schedConf->getSetting('postScheduleDate');\n\t\tif (!$postScheduleDate || time() < $postScheduleDate || !$schedConf->getSetting('postSchedule')) Request::redirect(null, null, 'schedConf');\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('pageHierarchy', array(\n\t\t\tarray(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),\n\t\t\tarray(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));\n\t\tSchedConfHandler::setupTemplate($conference, $schedConf);\n\n\t\t$buildingDao =& DAORegistry::getDAO('BuildingDAO');\n\t\t$roomDao =& DAORegistry::getDAO('RoomDAO');\n\n\t\t$buildingsAndRooms = $allRooms = array();\n\t\t$buildings =& $buildingDao->getBuildingsBySchedConfId($schedConf->getId());\n\t\twhile ($building =& $buildings->next()) {\n\t\t\t$buildingId = $building->getId();\n\t\t\t$rooms =& $roomDao->getRoomsByBuildingId($buildingId);\n\t\t\t$buildingsAndRooms[$buildingId] = array(\n\t\t\t\t'building' => &$building\n\t\t\t);\n\t\t\twhile ($room =& $rooms->next()) {\n\t\t\t\t$roomId = $room->getId();\n\t\t\t\t$buildingsAndRooms[$buildingId]['rooms'][$roomId] =& $room;\n\t\t\t\t$allRooms[$roomId] =& $room;\n\t\t\t\tunset($room);\n\t\t\t}\n\t\t\tunset($building);\n\t\t\tunset($rooms);\n\t\t}\n\t\t$templateMgr->assign_by_ref('buildingsAndRooms', $buildingsAndRooms);\n\t\t$templateMgr->assign_by_ref('allRooms', $allRooms);\n\n\t\t// Merge special events and papers into an array by time/date\n\t\t$itemsByTime = array();\n\n\t\t$publishedPaperDao =& DAORegistry::getDAO('PublishedPaperDAO');\n\t\t$publishedPapers =& $publishedPaperDao->getPublishedPapers($schedConf->getId(), PAPER_SORT_ORDER_TIME);\n\t\twhile ($paper =& $publishedPapers->next()) {\n\t\t\tif ($paper->getStartTime()) {\n\t\t\t\t$startTime = strtotime($paper->getStartTime());\n\t\t\t\t$itemsByTime[$startTime][] =& $paper;\n\t\t\t}\n\t\t\tunset($paper);\n\t\t}\n\t\tunset($publishedPapers);\n\n\t\t$specialEventDao =& DAORegistry::getDAO('SpecialEventDAO');\n\t\t$specialEvents =& $specialEventDao->getSpecialEventsBySchedConfId($schedConf->getId());\n\t\twhile ($specialEvent =& $specialEvents->next()) {\n\t\t\t$startTime = strtotime($specialEvent->getStartTime());\n\t\t\tif ($startTime) $itemsByTime[$startTime][] =& $specialEvent;\n\t\t\tunset($specialEvent);\n\t\t}\n\t\tunset($specialEvents);\n\n\t\t// WARNING: $itemsByTime contains both PublishedPapers and\n\t\t// SpecialEvents; both implement getStartTime() and\n\t\t// getEndTime.\n\t\tksort($itemsByTime);\n\t\tforeach ($itemsByTime as $startTime => $junk) {\n\t\t\tuasort($itemsByTime[$startTime], create_function('$a, $b', 'return strtotime($a->getEndTime()) - strtotime($b->getEndTime());'));\n\t\t}\n\n\t\t// Read in schedule layout settings\n\t\tif ($schedConf->getSetting('mergeSchedules')) {\n\t\t\tksort($itemsByTime);\n\t\t}\n\t\t$templateMgr->assign('showEndTime', $schedConf->getSetting('showEndTime'));\n\t\t$templateMgr->assign('showAuthors', $schedConf->getSetting('showAuthors'));\n\t\t$templateMgr->assign('hideNav', $schedConf->getSetting('hideNav'));\n\t\t$templateMgr->assign('hideLocations', $schedConf->getSetting('hideLocations'));\n\n\t\t$templateMgr->assign_by_ref('itemsByTime', $itemsByTime);\n\t\t$templateMgr->assign('conference.currentConferences.scheduler');\n\n\t\tif($schedConf->getSetting('layoutType') == SCHEDULE_LAYOUT_COMPACT) {\n\t\t\t$templateMgr->display('schedConf/schedules/compact.tpl');\n\t\t} else if($schedConf->getSetting('layoutType') == SCHEDULE_LAYOUT_EXPANDED || !$schedConf->getSetting('layoutType')) {\n\t\t\t$templateMgr->display('schedConf/schedules/expanded.tpl');\n\t\t}\n\t}", "public function gridAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "public function gridAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "function calendar($student_type_id=0) {\n\t $this->set('page_title', 'Course Calendar');\n\t $this->set('student_type_id', $student_type_id);\n $this->layout = 'fullwidth_layout';\n}", "public function gridAction()\r\n {\r\n $this->loadLayout();\r\n $this->getResponse()->setBody(\r\n $this->getLayout()->createBlock('hackthon_pirates/adminhtml_display_grid')->toHtml()\r\n );\r\n }", "public function index()\n {\n $extra['title'] = lang('pyrocourse:pyrocourses');\n\n $extra['buttons'] = array(\n array(\n 'label' => lang('pyrocourse:manage'),\n 'url' => 'admin/course/manage/-entry_id-'\n )\n );\n\n $this->streams->cp->entries_table('course', 'streams', 3, 'admin/course/index', true, $extra);\n }", "public function display_subject_grid()\n {\n if(isset($_POST['save']))\n {\n $this->save_subject_grid();\n }\n $formalAssessments = true;\n $gradebook = true;\n $ajaxCall = false;\n\n global $COURSE, $PAGE, $CFG;\n $this->get_projects();\n $retval = '<div id=\"bcgtgridsummary bcgtalevelgrid\">';\n $retval .= '<div class=\"bcgtgridbuttons\">';\n $retval .= \"<input type='submit' id='viewsimple' name='viewsimple' value='View Simple' class='viewsimple' />\";\n $retval .= \"<br>\";\n $courseID = optional_param('cID', -1, PARAM_INT);\n $groupingID = optional_param('grID', -1, PARAM_INT);\n $sCourseID = optional_param('scID', -1, PARAM_INT);\n $context = context_course::instance($COURSE->id);\n if($courseID != -1)\n {\n $context = context_course::instance($courseID);\n }\n $editing = false;\n $grid = optional_param('g', 's', PARAM_TEXT);\n if($grid == 'ae' || $grid == 'se')\n {\n $editing = true;\n }\n if(has_capability('block/bcgt:editclassgrids', $context))\n {\t\n $retval .= \"<input type='submit' id='editsimple' name='editsimple' value='Edit Simple' class='editsimple' />\";\n if($editing)\n {\n $retval .= \"<input type='submit' id='save' name='save' value='Save' class='gridsave' />\";\n }\n }\n $retval .= '</div>';\n //if we are using alsp reporting\n //then show the alps coefficients\n if(get_config('bcgt', 'calcultealpstempreports') \n && has_capability('block/bcgt:seealpsreportsstudent', $context))\n {\n $retval .= $this->display_coefficient_summary_table($this->id);\n }\n $retval .= '</div>';\n $retval .= '<br clear=\"all\">';\n $retval .= '<input type=\"hidden\" id=\"grid\" name=\"g\" value=\"'.$grid.'\"/>';\n $jsModule = array(\n 'name' => 'mod_bcgtalevel',\n 'fullpath' => '/blocks/bcgt/plugins/bcgtalevel/js/bcgtalevel.js',\n 'requires' => array('base', 'io', 'node', 'json', 'event', 'button')\n );\n //\n $PAGE->requires->js_init_call('M.mod_bcgtalevel.initclassgrid', array($this->id), true, $jsModule);\n require_once($CFG->dirroot.'/blocks/bcgt/lib.php');\n load_javascript();\n \n //header\n //then get them all. \n $retval .= '<div id=\"alevelClassGridOuter\" class=\"alevelClassGridOuter alevelgrid\">';\n $retval .= '<table class=\"alevelClassGridTables\" id=\"alevelClassGridQ'.$this->id.'\">';\n $retval .= '<thead>';\n $retval .= $this->get_display_grid_header($students = true, $formalAssessments, $gradebook,false);\n $retval .= '</thead>';\n $retval .= '<tbody>';\n //now get the students\n $loadParams = new stdClass();\n $loadParams->loadLevel = Qualification::LOADLEVELALL;\n $loadParams->loadTargets = true;\n $onCourse = true;\n $students = $this->get_students('', 'lastname ASC, firstname ASC', $sCourseID, $onCourse, $groupingID);\n if($students)\n {\n foreach($students AS $student)\n {\n $retval .= '<tr>';\n //load_student_information will clear previous student's information. \n $this->load_student_information($student->id, $loadParams);\n $this->get_gradebook_for_grid();\n $retval .= $this->get_single_grid_row($editing, true, \n $formalAssessments, $gradebook, $ajaxCall, false);\n $retval .= '</tr>';\n }\n }\n $retval .= '</tbody>';\n $retval .= '</table>';\n $retval .= '</div>';\n// $retval .= '</div>';\n return $retval;\n }", "public function gridAction()\n {\n $this->loadLayout();\n $this->getResponse()->setBody($this->getLayout()->createBlock('resource/adminhtml_info_grid')->toHtml());\n }", "public function gridAction()\n {\n $this->loadLayout();\n $this->getResponse()->setBody(\n $this->getLayout()->createBlock('zblocks/adminhtml_zblocks_grid')->toHtml()\n );\n }", "public function gamesScheduleAction()\n {\n View::renderTemplate('Admin/GamesSchedule.html', [\n 'user' => $this->user]);\n }", "function exam_schedule($exam_id = '') {\n $this->data['exam_details'] = $this->Exam_manager_model->student_exam_detail($exam_id); \n $this->data['time_table'] = $this->Exam_manager_model->exam_schedule($exam_id);\n $this->data['page'] = 'exam_schedule';\n $this->data['title'] = 'Exam Schedule';\n $this->__template('exam/exam_schedule', $this->data);\n }", "public function coursecostsAction()\n {\n $this->_initProduct();\n $this->loadLayout();\n $this->getLayout()->getBlock('product.edit.tab.coursecost');\n $this->renderLayout();\n }", "public function display_subject_grid()\n {\n //display the unit grid\n }", "function execute_course_list()\n{\n\tinclude_once(\"view/course_list.php\");\n\t$data = array();\n\t$data[\"courses\"] = course_getAll();\n\tview($data);\n}", "public function getCourseSummary(){\n\n\t\t$this->layout->content = View::make('admin.lotto.course-summary', array (\n\t\t\t\t \t'courses' => Course::all()->sortBy('user.id')), Session::all()\n\t\t\t );\n\t\n\t}", "public function getSchedules()\n {\n return view('schedules.admin.schedules');\n }", "public function actionCalendar(){\n $app = Yii::$app;\n if($app->user->id == 2){\n return $this->render('calendar', [\n 'commercials' => SpyCommercial::find()\n ->select(['commercial_id', 'name', 'lastname'])\n ->where(['!=', 'commercial_id', 2])\n /* ->andWhere(['!=', 'commercial_id', 1])*/\n ->all(),\n 'types' => SpyTaskType::find()->all(),\n ]);\n }\n return $this->goHome();\n }", "function dashcourse(&$url, &$lang, &$cinfo, $uc_status, $index, $enable_actions = true, $h_number = 2) {\n\n\t$has_edition \t= $cinfo['course_edition'];\n\t\n\tYuiLib::load(array('animation' => 'my_animation'));\n\t\n\t$course_type \t= $cinfo['course_type'];\n\t$action \t\t= relationWithCourse($cinfo['idCourse'], $cinfo, $uc_status, false);\n\t$there_material\t= array();\n\n\t$lang_c =& DoceboLanguage::createInstance('course', 'lms');\n\n\tif (!defined(\"_ECOM_CURRENCY\")) {\n\t\t$currency_label = getPLSetting(\"ecom\", \"currency_label\", \"\");\n\t\tdefine(\"_ECOM_CURRENCY\", $currency_label);\n\t}\n\n\t$cs = array(\n\t\tCST_PREPARATION => $lang_c->def('_CST_PREPARATION', 'course', 'lms'),\n\t\tCST_AVAILABLE \t=> $lang_c->def('_CST_AVAILABLE', 'course', 'lms'),\n\t\tCST_EFFECTIVE \t=> $lang_c->def('_CST_CONFIRMED', 'course', 'lms'),\n\t\tCST_CONCLUDED \t=> $lang_c->def('_CST_CONCLUDED', 'course', 'lms'),\n\t\tCST_CANCELLED \t=> $lang_c->def('_CST_CANCELLED', 'course', 'lms') );\n\n\tif($cinfo['img_material'] != '') $there_material[] = '&id_course='.$cinfo['idCourse'];\n\n\t$html = '<div class=\"course_container'\n\t\t.( Get::sett('use_social_courselist') == 'on' ? ' double_height' : ' normal_height' )\n\t\t.( $index == 0 ? ' course_container_first' : '' ).'\">';\n\t$html .= '<div class=\"course_info_container\">'\n\t\t\t.'<h'.$h_number.'>'.\n\t\t( $cinfo['lang_code'] ? '<img src=\"'.getPathImage('cms').'language/'.$cinfo['lang_code'].'.png\" alt=\"'.$cinfo['lang_code'].'\" /> ' : '' ).\n\t\t//'['.$cinfo['code'].'] '.\n\t\t$cinfo['name'].\n\t'</h'.$h_number.'>';\n\n\tif($cinfo['classrooms'] != '') {\n\n\t\t$html .= str_replace(\tarray('[classrooms_name]', '[classrooms_location]'),\n\t\t\t\t\t\t\t\tarray($cinfo['classrooms']['classroom'], $cinfo['classrooms']['location']),\n\t\t\t\t\t\t\t\t$lang->def('_IN_THE_CLASSROOM')\n\t\t\t\t\t\t\t);\n\t}\n\t// -----------------------------------------------------------------\n\tif(!$has_edition) {\n\n\t\t$html .= '<p class=\"course_support_info\">';\n\t\t// number of subscription not limited\n\t\tif($cinfo['max_num_subscribe'] == 0) {\n\n\t\t\t$html .= str_replace(\tarray('[course_type]', '[create_date]', '[enrolled]', '[course_status]'),\n\t\t\t\t\t\t\tarray($course_type, createDateDistance($cinfo['create_date'], 'catalogue', true), $cinfo['enrolled'], $cs[$cinfo['course_status']]),\n\t\t\t\t\t\t\t$lang->def('_COURSE_INTRO'))\n\t\t\t\t\t.' ['.$cinfo['code'].'] ';\n\t\t} else {\n\n\t\t\t// limited number of subscription\n\t\t\t$html .= str_replace(\tarray('[course_type]', '[create_date]', '[enrolled]', '[course_status]', '[max_subscribe]'),\n\t\t\t\t\t\t\tarray($course_type, createDateDistance($cinfo['create_date'], 'catalogue', true), $cinfo['enrolled'], $cs[$cinfo['course_status']], $cinfo['max_num_subscribe']),\n\t\t\t\t\t\t\t$lang->def('_COURSE_INTRO_WITH_MAX'));\n\n\t\t\tif($cinfo['enrolled'] >= $cinfo['max_num_subscribe'] && $cinfo['allow_overbooking'] == '1') {\n\n\t\t\t// limited number of subscription reached\n\t\t\t\t$html .= '<br/>'.$lang->def('_CAN_JOIN_WAITING_LIST');\n\t\t\t}\n\t\t}\n\t\tif($cinfo['min_num_subscribe'] != 0) {\n\t\t\t$html .= '<br/>'.str_replace('[min_subscribe]', $cinfo['min_num_subscribe'], $lang->def('_MIN_SUBSCRIBE_FOR_COURSE'));\n\t\t}\n\t\t$html .= '</p>';\n\t}\n\t// --------------------\n\tif(trim($cinfo['description']) == '') $html .= '';\n\telseif(strpos($cinfo['description'], '<p') === false) $html .= '<p class=\"course_description\">'.$cinfo['description'].'</p>';\n\telse $html .= '<div class=\"course_description\">'.$cinfo['description'].'</div>';\n\n\tif(empty($cinfo['edition_list']) && $has_edition) {\n\n\t\t$html .= '<img src=\"'.getPathImage('lms').'coursecatalogue/editions.png\" alt=\"'.$lang->def('_EDITIONs').'\" /> '\n\t\t\t.$lang->def('_NO_CONTENT');\n\n\t} elseif($has_edition) {\n\n\t\t// edition list actions ---------------------------------------------------\n\t\t$html .= '<p class=\"editions_actions\">';\n\t\t$html .= '<img src=\"'.getPathImage('lms').'coursecatalogue/editions.png\" alt=\"'.$lang->def('_EDITIONs').'\" /> ';\n\t\t$html .= '<a id=\"course_edition_'.$cinfo['idCourse'].'_open\" class=\"course_editions_expand\" href=\"javascript:;\" onclick=\"\n\t\t\tYAHOO.Animation.BlindIn(\\'course_edition_'.$cinfo['idCourse'].'\\', \\'\\');\n\t\t\tYAHOO.util.Dom.get(\\'course_edition_'.$cinfo['idCourse'].'_open\\').style.display = \\'none\\';\n\t\t\tYAHOO.util.Dom.get(\\'course_edition_'.$cinfo['idCourse'].'_close\\').style.display = \\'inline\\';\n\t\t\treturn false;\">'\n\n\t\t\t.str_replace(\tarray('[edition_count]', '[edition_available]'),\n\t\t\t\t\t\t\tarray(count($cinfo['edition_list']), $cinfo['edition_available']),\n\t\t\t\t\t\t\t$lang->def('_SHOW_COURSE_EDITION'))\n\t\t.'</a>';\n\n\t\t$html .= '<a id=\"course_edition_'.$cinfo['idCourse'].'_close\" class=\"course_editions_collapse\" href=\"javascript:;\" onclick=\"\n\t\t\tYAHOO.Animation.BlindOut(\\'course_edition_'.$cinfo['idCourse'].'\\');\n\t\t\tYAHOO.util.Dom.get(\\'course_edition_'.$cinfo['idCourse'].'_close\\').style.display = \\'none\\';\n\t\t\tYAHOO.util.Dom.get(\\'course_edition_'.$cinfo['idCourse'].'_open\\').style.display = \\'inline\\';\n\t\t\treturn false;\">'\n\n\t\t\t.$lang->def('_HIDE_COURSE_EDITION')\n\t\t.'</a>'\n\t\t.'</p>';\n\n\t\t// edition list show -------------------------------------------------------------------------\n\t\t$html .= '<ul id=\"course_edition_'.$cinfo['idCourse'].'\" class=\"course_editions\">';\n\n\t\twhile(list($id_edition, $ed_info) = each($cinfo['edition_list'])) {\n\n\t\t\tif($ed_info['img_material'] != '') $there_material[] = '&id_course='.$cinfo['idCourse'].'&edition_id'.$ed_info['idCourseEdition'];\n\n\t\t\t$html .= '<li><b class=\"course_title\">['.$ed_info['code'].'] '.$ed_info['name'].'</b><p>';\n\n\t\t\tif(($ed_info['date_begin'] != '0000-00-00' && $ed_info['date_end'] != '0000-00-00') || $ed_info['classrooms'] != '') {\n\t\t\t\t$html .= $lang->def('_EDITIONS');\n\t\t\t}\n\t\t\tif($ed_info['date_begin'] != '0000-00-00' && $ed_info['date_end'] != '0000-00-00') {\n\t\t\t\t$html .= ' '.str_replace(\tarray('[date_begin]', '[date_end]'),\n\t\t\t\t\t\t\t\t\t\tarray(Format::date($ed_info['date_begin'], 'date'),\n\t\t\t\t\t\t\t\t\t\t\tFormat::date($ed_info['date_end'], 'date')),\n\t\t\t\t\t\t\t\t\t\t$lang->def('_EDTION_TIME'));\n\t\t\t}\n\t\t\tif($ed_info['classrooms'] != '') {\n\n\t\t\t\t$html .= str_replace(\tarray('[classrooms_name]', '[classrooms_location]'),\n\t\t\t\t\t\t\t\t\t\t\tarray($ed_info['classrooms']['classroom'], $ed_info['classrooms']['location']),\n\t\t\t\t\t\t\t\t\t\t\t$lang->def('_IN_THE_CLASSROOM') \t);\n\t\t\t}\n\t\t\tif(($ed_info['date_begin'] != '0000-00-00' && $ed_info['date_end'] != '0000-00-00') || $ed_info['classrooms'] != '') {\n\t\t\t\t$html .= '<br />';\n\t\t\t}\n\t\t\tif($ed_info['max_num_subscribe'] == 0)\n\t\t\t\t$html .= str_replace(\tarray('[user_count]', '[waiting_count]', ' su [max_user]'),\n\t\t\t\t\t\t\t\t\t\tarray($ed_info['user_count'], $ed_info['waiting'], ''),\n\t\t\t\t\t\t\t\t\t\t$lang->def('_USER_EDITION_SUBSCRIBE') ).'</p>';\n\t\t\telse\n\t\t\t\t$html .= str_replace(\tarray('[user_count]', '[waiting_count]', '[max_user]'),\n\t\t\t\t\t\t\t\t\t\tarray($ed_info['user_count'], $ed_info['waiting'], $ed_info['max_num_subscribe']),\n\t\t\t\t\t\t\t\t\t\t$lang->def('_USER_EDITION_SUBSCRIBE') ).'</p>';\n\n\t\t\tif(($ed_info['user_count'] != '' && $ed_info['date_end'] != '0000-00-00') || $ed_info['classrooms'] != '') {\n\t\t\t\t$html .= '<br />';\n\t\t\t}\n\n\t\t\t// number of subscription not limited\n\t\t\t/*if($ed_info['max_num_subscribe'] == 0) {\n\n\t\t\t\t$html .= str_replace(\tarray('[user_count]', '[waiting_count]', ' su [max_user]'),\n\t\t\t\t\t\t\t\t\t\tarray($ed_info['user_count'], $ed_info['waiting'], ''),\n\t\t\t\t\t\t\t\t\t\t$lang->def('_USER_EDITION_SUBSCRIBE') );\n\t\t\t} else {\n\n\t\t\t\t// limited number of subscription\n\t\t\t\t$html .= str_replace(\tarray('[user_count]', '[max_subscribe]', '[waiting_count]'),\n\t\t\t\t\t\t\t\t\t\tarray($ed_info['user_count'], $ed_info['max_num_subscribe'], $ed_info['waiting']),\n\t\t\t\t\t\t\t\t\t\t$lang->def('_USER_EDITION_SUBSCRIBE_WITH_MAX') );\n\n\t\t\t\tif($ed_info['user_count'] >= $ed_info['max_num_subscribe'] && $ed_info['allow_overbooking'] == '1') {\n\n\t\t\t\t\t// limited number of subscription reached\n\t\t\t\t\t$html .= '<br/>'.$lang->def('_CAN_JOIN_WAITING_LIST');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($ed_info['min_num_subscribe'] != 0) {\n\t\t\t\t$html .= '<br/>'.str_replace('[min_subscribe]', $cinfo['min_num_subscribe'], $lang->def('_MIN_SUBSCRIBE_FOR_EDITION'));\n\t\t\t}\n\t\t\t$html .= '</p>';*/\n\n\t\t\t// theacher list ----------------------------------------------------------\n\t\t\tif(Get::sett('use_social_courselist') == 'on') {\n\n\t\t\t\tif(isset($ed_info['theacher_list']) && is_array($ed_info['theacher_list']) && !empty($ed_info['theacher_list'])) {\n\n\t\t\t\t\t$html .= '<h3 class=\"course_teacher_list\">'.$lang->def('_THEACER_LIST').'</h3>'\n\t\t\t\t\t\t.'<ul class=\"course_teacher_list\">';\n\n\t\t\t\t\twhile(list(, $id_teach) = each($ed_info['theacher_list'])) {\n\n\t\t\t\t\t\t$profile = new UserProfile( $id_teach );\n\t\t\t\t\t\t$profile->init('profile', 'framework', '', 'ap');\n\t\t\t\t\t\t$html .= '<li class=\"the_course\">'\n\t\t\t\t\t\t\t.'<a href=\"'.$url->getUrl('op=showprofile&id_course='.$cinfo['idCourse'].'&id_user='.$id_teach).'\">'\n\t\t\t\t\t\t\t.$profile->getUserPhotoOrAvatar('micro').' '.$profile->resolveUsername()\n\t\t\t\t\t\t\t.'</a></li>';\n\t\t\t\t\t}\n\t\t\t\t\t$html .= '</ul>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$html .= '</li>';\n\t\t}\n\t\t$html .= '</ul>';\n\n\t\t$html .= '<script type=\"text/javascript\">\n\t\t\tYAHOO.util.Dom.get(\\'course_edition_'.$cinfo['idCourse'].'\\').style.display = \\'none\\';\n\t\t\tYAHOO.util.Dom.get(\\'course_edition_'.$cinfo['idCourse'].'_close\\').style.display = \\'none\\';\n\t\t</script>';\n\n\t} elseif(Get::sett('use_social_courselist') == 'on') {\n\n\t\t// theacher list ----------------------------------------------------------\n\t\tif(isset($cinfo['theacher_list']) && is_array($cinfo['theacher_list']) && !empty($cinfo['theacher_list'])) {\n\n\t\t\t$html .= '<h3 class=\"course_teacher_list\">'.$lang->def('_THEACER_LIST').'</h3>'\n\t\t\t\t.'<ul class=\"course_teacher_list\">';\n\n\t\t\twhile(list(, $id_teach) = each($cinfo['theacher_list'])) {\n\n\t\t\t\t$profile = new UserProfile( $id_teach );\n\t\t\t\t$profile->init('profile', 'framework', '', 'ap');\n\t\t\t\t$html .= '<li>'\n\t\t\t\t\t.'<a href=\"'.$url->getUrl('op=showprofile&id_course='.$cinfo['idCourse'].'&id_user='.$id_teach).'\">'\n\t\t\t\t\t.$profile->getUserPhotoOrAvatar('micro').' '.$profile->resolveUsername()\n\t\t\t\t\t.'</a></li>';\n\t\t\t}\n\t\t\t$html .= '</ul>';\n\t\t}\n\n\t}\n\t// course related extra option ---------------------------------------------\n\tif(Get::sett('use_social_courselist') == 'on' || !empty($there_material) || ($cinfo['course_demo'] != '')) {\n\n\t\t$html .= '<ul class=\"course_related_actions\">';\n\t\tif(Get::sett('use_social_courselist') == 'on') {\n\n\t\t\t$html .= '<li class=\"course_comment\">'\n\t\t\t\t\t.'<a href=\"javascript:;\" onclick=\"openComment(\\''.$cinfo['idCourse'].'\\'); return false;\">'\n\t\t\t\t\t.'<span>'.$lang->def('_COMMENTS').' ('\n\t\t\t\t\t.( isset($cinfo['comment_count']) ? $cinfo['comment_count'] : '0' ).')</span></a></li>';\n\t\t\t\n\t\t}\n\t\t// the course material -----------------------------------------------------------------\n\t\tif(!empty($there_material)) {\n\n\t\t\tif(count($there_material) == 1) {\n\n\t\t\t\t// direct download of material -------------------------------------------------\n\t\t\t\t$html .= '<li class=\"course_materials\">'\n\t\t\t\t\t.'<a href=\"'.$url->getUrl('op=donwloadmaterials'.array_pop($there_material)).'\">'\n\t\t\t\t\t.'<span>'.$lang->def('_MATERIALS').'</span></a></li>';\n\t\t\t} else {\n\n\t\t\t\t// popup download of material --------------------------------------------------\n\t\t\t\t$html .= '<li class=\"course_materials\">'\n\t\t\t\t\t.'<a href=\"javascript:;\" onclick=\"openWindowWithAction(\\''.$cinfo['idCourse'].'\\', \\'course_materials\\'); return false;\">'\n\t\t\t\t\t.'<span>'.$lang->def('_MATERIALS').'</span></a></li>';\n\t\t\t}\n\t\t}\n\n\t\t// the course demo link ----------------------------------------------------------------\n\t\tif($cinfo['course_demo'] != '') {\n\n\t\t\trequire_once(_base_.'/lib/lib.multimedia.php');\n\t\t\t$ext = end(explode('.', $cinfo['course_demo']));\n\t\t\tif(isPossibleEmbedPlay('/appLms/'.Get::sett('pathcourse'), $cinfo['course_demo'], $ext)) {\n\n\t\t\t\t// play demo in popup ---------------------------------------------------------\n\t\t\t\t$html .= '<li class=\"course_demo\">'\n\t\t\t\t\t.'<a href=\"javascript:;\" onclick=\"openWindowWithAction(\\''.$cinfo['idCourse'].'\\', \\'play_demo\\'); return false;\">'\n\t\t\t\t\t.'<span>'.$lang->def('_DEMO').'</span></a></li>';\n\t\t\t} else {\n\n\t\t\t\t// download demo --------------------------------------------------------------\n\t\t\t\t$html .= '<li class=\"course_demo\">'\n\t\t\t\t\t.'<a href=\"'.$url->getUrl('op=showdemo&id_course='.$cinfo['idCourse']).'\">'\n\t\t\t\t\t.'<span>'.$lang->def('_DEMO').'</span></a></li>';\n\t\t\t}\n\t\t}\n\t\t$html .= '</ul>';\n\t}\n\t$html .= '</div>';\n\t// score and subscribe action ----------------------------------------------\n\t$html .= '<ul class=\"course_score\">';\n\tif($enable_actions) {\n\t\tif($has_edition)\n\t\t\tlist($edition_for_enter) = sql_fetch_row(sql_query(\t\"SELECT edition_id\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\" FROM \".$GLOBALS['prefix_lms'].\"_courseuser\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\" WHERE idUser = '\".getLogUserId().\"'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\" AND idCourse = '\".$cinfo['idCourse'].\"'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\" ORDER BY edition_id DESC\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\" LIMIT 0,1\"));\n\t\t\n\t\t\n\t\tif($cinfo['first_is_scorm'] != false && $cinfo['direct_play']) {\n\t\t\t$lb_param = \"\";\n\t\t\tif($cinfo['first_is_scorm'][0] != '' && $cinfo['first_is_scorm'][0] != '0')\n\t\t\t\t\t$lb_param .= \";width=\".$cinfo['first_is_scorm'][0].\"\";\n\t\n\t\t\tif($cinfo['first_is_scorm'][1] != '' && $cinfo['first_is_scorm'][1] != '0')\n\t\t\t\t$lb_param .= \";height=\".$cinfo['first_is_scorm'][1].\"\";\n\t\t}\n\t\tif($action[0] == 'subscribed' ) {\n\t\t\t\n\t\t\t$access = Man_Course::canEnterCourse($cinfo);\n\t\t}\n\t\t$html .= '<li id=\"action_of_'.$cinfo['idCourse'].'\" class=\"third_action '.$action[0].'\">'\n\t\t\t\t/*\n\t\t\t\t.( '<a href=\"index.php?modname=course_autoregistration&op=course_autoregistration\"'.' >'\n\t\t\t\t\t\t\t.$lang->def('_SUBSCRIBE')\n\t\t\t\t\t\t\t.'<br /></a>'\n\t\t\t\t\t\t )\n\t\t\t\t*/\n\t\t\t\t.( $action[1] != false ? '<a href=\"javascript:;\"'\n\t\t\t\t\t.' onclick=\"openWindowWithAction(\\''.$cinfo['idCourse'].'\\', \\'course_action_confirm'.( $has_edition ? '_edition' : '' ).'\\'); return false;\">' : '' )\n\t\t\t\t.($action[0] == 'subscribed' && $access['can']\n\t\t\t\t\t? '<a href=\"index.php?modname=course&op=aula&idCourse='.$cinfo['idCourse'].($has_edition ? '&amp;id_e='.$edition_for_enter : '').'\"'\n\t\t\t\t\t\t.($cinfo['direct_play'] == 1 && $cinfo['level'] <= 3 && $cinfo['first_is_scorm']\n\t\t\t\t\t\t\t? ' rel=\"shadowbox'.$lb_param.'\" title=\"'.$cinfo['name'].'\"' \n\t\t\t\t\t\t\t: ' title=\"'.$lang->def('_ENTER').'\"' )\n\t\t\t\t\t\t.'>'.$lang->def('_ENTER').'</a>' \n\t\t\t\t\t: $lang->def('_'.strtoupper($action[0])).'<br />'\n\t\t\t\t);\n\t\tswitch($action[0]) {\n\t\t\tcase \"can_buy\" :\n\t\t\tcase \"can_reserve\" : { $html .= $cinfo['prize'].' '._ECOM_CURRENCY; };break;\n\t\t}\n\t\t$html .= ( $action[2] != false ? '<img src=\"'.getPathImage().'coursecatalogue/'.$action[2].'\" '\n\t\t\t\t\t.'alt=\"'.$lang->def('_ALT_'.strtoupper($action[0])).'\"/>' : '' )\n\t\t\t\t.( $action[1] != false ? '</a>' : '' )\n\t\t\t\t.'</li>';\n\t}\n\tif(Get::sett('use_social_courselist') == 'on') {\n\n\t\t$html .= '<li class=\"current_score\"><span>'.$lang->def('_SCORE').'</span><br />'\n\t\t\t.'<strong id=\"course_score_'.$cinfo['idCourse'].'\">'.$cinfo['course_vote'].'</strong></li>';\n\t\tif($uc_status != false && $uc_status['waiting'] == 0) {\n\n\t\t\t$html .= '<li class=\"score_it\">'\n\t\t\t\t\t.'<a class=\"good\" href=\"javascript:;\" '\n\t\t\t\t\t\t.'onclick=\"course_vote(\\''.$cinfo['idCourse'].'\\', \\'good\\'); return false;\" '\n\t\t\t\t\t\t.'title=\"'.$lang->def('_VOTE_GOOD_TITLE').'\">'\n\n\t\t\t\t\t\t.'<img id=\"score_image_good_'.$cinfo['idCourse'].'\" src=\"'.getPathImage().'coursecatalogue/good'\n\t\t\t\t\t\t\t.( $cinfo['user_score'] == '1' ? '_grey' : '' )\n\t\t\t\t\t\t\t.'.png\" alt=\"'.$lang->def('_VOTE_GOOD_ALT').' : '.strip_tags($cinfo['name']).'\" />'\n\t\t\t\t\t.'</a> '\n\t\t\t\t\t.'<a class=\"bad\" href=\"javascript:;\" '\n\t\t\t\t\t\t.'onclick=\"course_vote(\\''.$cinfo['idCourse'].'\\', \\'bad\\'); return false;\" '\n\t\t\t\t\t\t.'title=\"'.$lang->def('_VOTE_BAD_TITLE').'\">'\n\n\t\t\t\t\t\t.'<img id=\"score_image_bad_'.$cinfo['idCourse'].'\" src=\"'.getPathImage().'coursecatalogue/bad'\n\t\t\t\t\t\t\t.( $cinfo['user_score'] == '-1' ? '_grey' : '' )\n\t\t\t\t\t\t\t.'.png\" alt=\"'.$lang->def('_VOTE_BAD_ALT').' : '.strip_tags($cinfo['name']).'\" />'\n\t\t\t\t\t.'</a>'\n\t\t\t\t.'</li>';\n\t\t} else {\n\n\t\t\t$html .= '<li class=\"score_it\" id=\"score_action_'.$cinfo['idCourse'].'\">'\n\t\t\t\t\t.'<img src=\"'.getPathImage().'coursecatalogue/good_grey.png\" alt=\"'.$lang->def('_VOTE_GOOD_ALT').' : '.strip_tags($cinfo['name']).'\" /> '\n\t\t\t\t\t.'<img src=\"'.getPathImage().'coursecatalogue/bad_grey.png\" alt=\"'.$lang->def('_VOTE_BAD_ALT').' : '.strip_tags($cinfo['name']).'\" />'\n\t\t\t\t.'</li>';\n\t\t}\n\t}\n\t$html .= '</ul>';\n\t$html .= '</div>';\n\treturn $html;\n}", "function grid()\n {\n $this->menu_active = 'product';\n $dis['base_url']=base_url();\n $dis['news_link'] = gen_seo_url($this->lang->line('news')).'/';\n $dis['view']='product_grid';\n\t\t$this->viewfront($dis);\n }", "private function get_content_calendar() {\n $cal = new Calendar($this->_bdd, TEMPLATE);\n $data_calendrier = $cal->get_data_events();\n\n $i = 0;\n $data = array();\n //on ne prend que les 10 premières news si possible\n while( isset($data_calendrier[$i] ) && $i < 10 ) {\n $data[$i] = $data_calendrier[$i];\n $i++;\n }\n\n $this->_smarty->assign(\"AsideCal\", $data);\n }", "function execute_course_detail()\n{\t\n\tinclude_once(\"view/course_detail.php\");\n\t$data = array();\n\t$data[\"courses\"] = course_get_detail($courseid);\n\tview($data);\n}", "protected function grid()\n {\n $grid = new Grid(new Course);\n $grid->column('id', __('编号'));\n $grid->title('视频标题');\n $grid->pic('视频封面图')->image();\n $grid->is_push('是否推荐');\n return $grid;\n }", "function listContainer()\n\t{\n\t\t$this->addTabs(\"container\");\n\n\t\t$plugin = $this->getPluginObject();\n\t\t$main_tpl = $this->main_tpl;\n\n\t\t//$this->toolbar->setFormAction($this->ctrl->getFormAction($this));\n\t\t$this->toolbar->addButton($plugin->txt(\"add_course\"), $this->ctrl->getLinkTarget($this, \"selectCourse\"));\n\n\t\t$plugin->includeClass(\"class.ilUFreibCourseTableGUI.php\");\n\t\t$table = new ilUFreibCourseTableGUI($this, \"configure\", $this->getPluginObject(), $this->courses);\n\n\t\t$main_tpl->setContent($table->getHTML());\n\t}", "public function indexAction()\n {\n // $courses = new Admin_Model_CoursesMapper();\n\n\t// We have an array of Course Models here - one for each row.\n\t// $this->view->courses = $courses->fetchOne($course_id);\n }" ]
[ "0.66019285", "0.65488803", "0.6299384", "0.6261198", "0.611758", "0.60843617", "0.60557073", "0.6042772", "0.6042772", "0.6007753", "0.5997331", "0.59957814", "0.5942978", "0.59315133", "0.5910952", "0.5904291", "0.58805764", "0.5877549", "0.5860985", "0.58582884", "0.5848259", "0.58210176", "0.58192486", "0.58137935", "0.5802299", "0.5787659", "0.57787275", "0.5765757", "0.5751445", "0.5697934" ]
0.6815606
0
get POST GET sortid
public function _get_post_sortid() { $sortid = 0; if (isset($_POST['sortid'])) { $sortid = (int)$_POST['sortid']; } elseif (isset($_GET['sortid'])) { $sortid = (int)$_GET['sortid']; } else { $sortid = $this->_convert_op_to_sortid(); } $sortid = $this->_pagenavi->_check_sortid($sortid); return $sortid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortItem($sort,$id){\n global $dbconn;\n // ---- Get sql query\n $sql = \" UPDATE $this->tablename set vttb_sort=\".$sort.\" where vttb_id=\".$id;\n // ---- Execute SQL\n $dbconn->Execute($sql);\n }", "private function updateSort($sort, $id) {\r\n $command = Yii::app()->db->createCommand('UPDATE ' . $this->tableName() . ' SET post_sort=:sort WHERE post_id=:id');\r\n $command->bindParam(':sort', $sort, PDO::PARAM_INT);\r\n $command->bindParam(':id', $id, PDO::PARAM_INT);\r\n return $command->execute();\r\n }", "function get_sort_query() {\n if (isset($_GET[\"sort\"])) {\n if ($_GET[\"sort\"] == 0) {\n return \" ORDER BY item\";\n } else if ($_GET[\"sort\"] == 1) {\n return \" ORDER BY item DESC\";\n } else {\n print_errors(\"Invalid sort value\");\n }\n }\n return \"\";\n }", "public function actionSort()\n {\n if (Yii::$app->request->isAjax) {\n $ids = array();\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n $data_request = Yii::$app->request->post();\n $i = $r = 0;\n foreach ($data_request['item'] as $id) {\n $r += $this->actionUpdate($id, 'sort', $i);\n $i++;\n }\n if ($r !== $i) {\n $result = array(\"err\" => Yii::t('app', 'ERROR_SORTED'));\n } else {\n $result = array(\"err\" => 0, \"success\" => Yii::t('app', 'SUCCESSFULLY_SORTED'));\n }\n return $result;\n }\n }", "public function actionSave_custom_fields_sort_order($id=0)\n\t{\n\t\t$id = (int)$id;\n\t\t$ids = $_POST['ids'];\n\t\t\n\t\tif (is_array($ids) && sizeof($ids)) {\n\t\t\t$i=0;\n\t\t\tforeach ($ids as $id) {\n\t\t\t\t$criteria=new CDbCriteria; \n\t\t\t\t$criteria->condition='id=:id'; \n\t\t\t\t$criteria->params=array(':id'=>$id); \t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\tif ($ps = Tbl_CustomFields::model()->find($criteria)) {\n\t\t\t\t\t$ps->sort_order = $i;\n\t\t\t\t\t$ps->save();\n\t\t\t\t\t\n\t\t\t\t\t++$i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function getSort() {return 310;}", "public function getsortorder($id)\n\t\t\t{\n\t\t\t\t$select_table = new Zend_Db_Table('dbt_content_management');\n\t\t\t\t$rowselect = $select_table->fetchRow($select_table->select()->where('id = ?',trim(intval($id))));\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t$sort_order = $rowselect['sort_order'];\n\t\t\t\treturn $sort_order;\n\t\t\t\t\n\t\t\t}", "public function actionSave_custom_fields_option_sort_order($id=0)\n\t{\n\t\t$id = (int)$id;\n\t\t$ids = $_POST['ids'];\n\t\t\n\t\tif (is_array($ids) && sizeof($ids)) {\n\t\t\t$i=0;\n\t\t\tforeach ($ids as $id) {\n\t\t\t\t$criteria=new CDbCriteria; \n\t\t\t\t$criteria->condition='id=:id'; \n\t\t\t\t$criteria->params=array(':id'=>$id); \t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\tif ($ps = Tbl_CustomFieldsOption::model()->find($criteria)) {\n\t\t\t\t\t$ps->sort_order = $i;\n\t\t\t\t\t$ps->save();\n\t\t\t\t\t\n\t\t\t\t\t++$i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function getSort(){\r\n return 301;\r\n }", "function get_sorti($id_sorti)\n {\n return $this->db->get_where('sortis',array('id_sorti'=>$id_sorti))->row_array();\n }", "private function setSort()\n\t{\n\t\treturn isset($this->field['sort']) ? $this->field['sort'] : 0;\n\t}", "private function sortingData($sort) {\n\t\t$strSort = \"\";\n\t\tif (! empty ( $sort )) {\n\t\t\t$sort = addslashes ( htmlspecialchars ( $sort ) );\n\t\t\t$sorts = explode ( \"-\", $sort );\n\t\t\t\n\t\t\tforeach ( $sorts as $sort ) {\n\t\t\t\t$sort = explode ( \",\", $sort );\n\t\t\t\t$strSort .= $sort [0] . \" \" . $sort [1] . \",\";\n\t\t\t}\n\t\t\t\n\t\t\tif (! empty ( $strSort )) {\n\t\t\t\t$strSort = substr ( $strSort, 0, - 1 );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $strSort;\n\t}", "function getSort(){\n return 555;\n }", "function getSort(){\n return 299;\n }", "public function getSort();", "function _getSortField($sort,$bServerSort) {\n switch($sort) {\n case SQSORT_NONE:\n $sSortField = 'UID';\n break;\n case SQSORT_DATE_ASC:\n case SQSORT_DATE_DESC:\n $sSortField = 'DATE';\n break;\n case SQSORT_FROM_ASC:\n case SQSORT_FROM_DESC:\n $sSortField = 'FROM';\n break;\n case SQSORT_SUBJ_ASC:\n case SQSORT_SUBJ_DESC:\n $sSortField = 'SUBJECT';\n break;\n case SQSORT_SIZE_ASC:\n case SQSORT_SIZE_DESC:\n $sSortField = ($bServerSort) ? 'SIZE' : 'RFC822.SIZE';\n break;\n case SQSORT_TO_ASC:\n case SQSORT_TO_DESC:\n $sSortField = 'TO';\n break;\n case SQSORT_CC_ASC:\n case SQSORT_CC_DESC:\n $sSortField = 'CC';\n break;\n case SQSORT_INT_DATE_ASC:\n case SQSORT_INT_DATE_DESC:\n $sSortField = ($bServerSort) ? 'ARRIVAL' : 'INTERNALDATE';\n break;\n case SQSORT_THREAD:\n break;\n default: $sSortField = 'UID';\n break;\n\n }\n return $sSortField;\n}", "private function sorting_to_wp_query_param( $sort ) {\n\t\t$parts = explode( '|', $sort );\n\t\t$orderby = isset( $_GET['orderby'] )\n\t\t\t? $_GET['orderby']\n\t\t\t: $parts[0];\n\n\t\t$order = isset( $_GET['order'] )\n\t\t\t? strtoupper( $_GET['order'] )\n\t\t\t: ( ( isset( $parts[1] ) && 'ASC' === strtoupper( $parts[1] ) ) ? 'ASC' : 'DESC' );\n\n\t\treturn array( $orderby, $order );\n\t}", "function getSort(){\r\n return 299;\r\n }", "function getSort(){\r\n return 299;\r\n }", "function get_sortitem(){\n\t\tif(empty($this->sortfield)){\n\t\t\t$this->init_sortstuff($this->Folder_ID);\n\t\t}\n\n\t\treturn $this->sf2si[$this->sortfield];\n\t}", "public function tablesort_get_query_parameters() {\nreturn drupal_get_query_parameters($_GET, ['q', 'sort', 'order', 'nid']);\n}", "private function sort()\n {\n $sortRaw = $this->request->get('sort');\n\n $direction = Str::startsWith($sortRaw, '-') ? 'DESC' : 'ASC';\n $sortBy = Str::after($sortRaw, '-');\n\n $this->guardSorting($sortBy);\n\n $this->builder->orderBy($sortBy, $direction);\n }", "protected function arrayPostID(){\n $arrayEditProduct = array('id' => $_GET['id']);\n return $arrayEditProduct;\n }", "function getSort() {\n return 139;\n }", "function findit_reply_sortdata_form_submit($form, &$form_states) {\n global $base_url;\n $path = current_path();\n $sort_order = $form_states['values']['sort'];\n $url = $base_url . '/' . $path . '?sort_order=' . $sort_order;\n $form_states['redirect'] = $url;\n}", "function sortby($sortby,$order) {\n\treturn '?'.http_build_query(array_merge(Input::except('page'),array(\n\t\t'sortby'=>$sortby,\n\t\t'order'=>$order\n\t)));\n}", "function getSort(){\n return 999;\n }", "function getSort(){\n return 152;\n }", "function test_field_id_asc_with_order_param(){\n\t\tself::clear_get_values();\n\n\t\t$dynamic_view = self::get_view_by_key( 'dynamic-view' );\n\t\t$dynamic_view->frm_page_size = 1;\n\n\t\tself::remove_view_order( $dynamic_view );\n\t\t$order_row = array(\n\t\t\t'type' => 'field',\n\t\t\t'col' => '493ito',\n\t\t\t'dir' => 'ASC',\n\t\t);\n\t\tself::add_order_to_view( $dynamic_view, $order_row );\n\n\t\t// Add order param, should override order in View\n\t\t$extra_atts = array( 'order_by' => 'id', 'order' => 'DESC' );\n\t\t$d = self::get_default_args( $dynamic_view, array( 'Steve', 'frm_pagination_cont' ), array( 'Jamie', 'Steph' ), $extra_atts );\n\t\tself::run_get_display_data_tests( $d, 'view with field ASC and order=id order_by=DESC params' );\n\t}", "public function sort_report_file(){\r\n\t\t$sorted_reports = $_POST['sorted'];\r\n\t\t$reports_option = array();\r\n\r\n\t\tfor ($i=0; $i < count($sorted_reports); $i++) {\r\n\t\t\t$id = $sorted_reports[$i];\r\n\t\t\t$reports_option[$id] = $id;\r\n\t\t}\r\n\r\n\t\t$rslt = update_option('iemop_top_reports', $reports_option);\r\n\r\n\t\techo json_encode($rslt);\r\n\r\n\t\twp_die();\r\n\t}" ]
[ "0.64624643", "0.63573164", "0.61221164", "0.6039572", "0.59734976", "0.5949904", "0.5903584", "0.5831405", "0.58311725", "0.5817107", "0.58080345", "0.5806152", "0.579129", "0.5759571", "0.57389826", "0.5728497", "0.5701462", "0.5692866", "0.5692866", "0.5665906", "0.565215", "0.5626566", "0.5591533", "0.55832756", "0.5578237", "0.55490136", "0.5545068", "0.55330616", "0.54975533", "0.549653" ]
0.79888356
0
Parses given JSONencoded `text` and returns the resulting object. JSON objects are parsed into anonymous structures and JSON arrays are parsed into `Array`. If given `text` is not valid JSON, an exception will be thrown.
public static function parse ($text) { #/opt/haxe/std/php/_std/haxe/Json.hx:34: characters 3-29 return Json::phpJsonDecode($text); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function fromJson($text, $maxDepth = 0) {}", "public function parse($text) {\n\t\treturn $this->_Parser->parse($text);\n\t}", "public static function parse($text);", "public static function parseText($json)\n {\n $text = $json->text;\n $spans = array();\n foreach ($json->spans as $spanJson) {\n $span = StructuredText::parseSpan($spanJson);\n if (isset($span)) {\n array_push($spans, $span);\n }\n }\n\n return new ParsedText($text, $spans);\n }", "public function parseJsonToObject($json)\n {\n return json_decode($json);\n }", "protected function parseText($text)\n {\n }", "public function cleanJson($text)\n {\n //if there isn't a character matched then our string is invalid, but we can't do anything about it\n if (strstr($text, '{') !== false) {\n $text = strstr($text, '{');\n }\n\n //find the position of the last \"}\" character\n $lastChar = strrpos($text, '}');\n\n //if there isn't a character matched then our string is invalid, but we can't do anything about it\n if ($lastChar !== false) {\n //count is from zero, so we return up to matched character + 1\n $text = substr($text, 0, $lastChar + 1);\n }\n\n return $text;\n }", "function better_decode_json($json_text)\n{\n $result_to_json = json_decode($json_text, true);\n\n $json_error = '';\n switch (json_last_error())\n {\n\tcase JSON_ERROR_NONE:\n\t //$json_error = ' - No errors';\n\t break;\n\tcase JSON_ERROR_DEPTH:\n\t $json_error = ' - Maximum stack depth exceeded';\n\t break;\n\tcase JSON_ERROR_STATE_MISMATCH:\n\t $json_error = ' - Underflow or the modes mismatch';\n\t break;\n\tcase JSON_ERROR_CTRL_CHAR:\n\t $json_error = ' - Unexpected control character found';\n\t break;\n\tcase JSON_ERROR_SYNTAX:\n\t $json_error = ' - Syntax error, malformed JSON';\n\t break;\n\tcase JSON_ERROR_UTF8:\n\t $json_error = ' - Malformed UTF-8 characters, possibly incorrectly encoded';\n\t break;\n\tdefault:\n\t $json_error = ' - Unknown error';\n\t break;\n }\n\n if ($json_error != '')\n\t$result_to_json['error'] = \"in better_decode_json read error \" . $json_error;\n\n return $result_to_json;\n\n}", "public static function parse($json)\n {\n $blocks = array();\n foreach ($json as $blockJson) {\n $maybeBlock = StructuredText::parseBlock($blockJson);\n if (isset($maybeBlock)) {\n array_push($blocks, $maybeBlock);\n }\n }\n\n return new StructuredText($blocks);\n }", "public static function parse(string $json)\n\t{\n\t\t$tokenizer = new Tokenizer([\n\t\t\tself::T_WHITESPACE => '\\\\s+',\n\t\t\tself::T_OBJECT_OPENING_BRACE => '\\\\{',\n\t\t\tself::T_OBJECT_CLOSING_BRACE => '\\\\}',\n\t\t\tself::T_ARRAY_OPENING_BRACE => '\\\\[',\n\t\t\tself::T_ARRAY_CLOSING_BRACE => '\\\\]',\n\t\t\tself::T_OBJECT_KEY_VALUE_DELIMITER => ':',\n\t\t\tself::T_NUMBER => '-?(?:[1-9]\\d*|0)(?:\\.\\d+)?(?:[eE][-+]?\\d+)?',\n\t\t\tself::T_STRING => '\"(?:[^\"\\\\\\\\]*|\\\\\\\\[\"\\\\\\\\bfnrt\\\\/]|\\\\\\\\u[0-9a-f]{4})*\"',\n\t\t\tself::T_CONSTANT => 'true|false|null',\n\t\t\tself::T_ITEM_DELIMITER => ',',\n\t\t]);\n\n\t\ttry {\n\t\t\tself::$stream = $tokenizer->tokenize($json);\n\t\t} catch (Exception $e) {\n\t\t\tthrow new ParserException($e->getMessage(), $e->getCode(), $e);\n\t\t}\n\n\t\t// get rid of whitespaces, so we don't have to handle them everywhere\n\t\tself::$stream->tokens = array_values(array_filter(self::$stream->tokens, function (Token $token) {\n\t\t\treturn $token->type !== self::T_WHITESPACE;\n\t\t}));\n\n\t\ttry {\n\t\t\t$value = self::parseValue();\n\n\t\t\t// check for any additional tokens\n\t\t\t$token = self::$stream->nextToken();\n\t\t\tif ($token !== NULL) {\n\t\t\t\tthrow new ParserException('Unexpected \\'' . $token->value . '\\', expected end of file');\n\t\t\t}\n\n\t\t\treturn $value;\n\t\t} catch (Throwable $e) {\n\t\t\t[$line, $column] = Tokenizer::getCoordinates($json, self::$stream->position);\n\t\t\tthrow new ParserException('Error in JSON: ' . $e->getMessage() . ' on line ' . $line . ', column ' . $column, $e->getCode(), $e);\n\t\t}\n\t}", "public function parse($text): string\n {\n return $this->parser->parse($text);\n }", "public static function parseJSON($json)\n {\n if (is_string($json)) {\n\t\t\t$data = json_decode($json, true);\n\t\t\treturn $data;\n } else {\n return false;\n }\n }", "function jsonDecode(string $jsonString): array\n{\n return \\json_decode($jsonString, true, 512, JSON_THROW_ON_ERROR);\n}", "public function fromJson(string $json);", "public static function matchJson(string $text)\n {\n return false !== preg_match(self::JSON_PATTERN, $text);\n }", "function is_json($TEXT) {\n json_decode($TEXT);\n return (json_last_error() == JSON_ERROR_NONE);\n }", "public static function parseText($text)\n {\n// Rays::import(\"application.vendors.php-markdown.Michelf.Markdown_inc\");\n// return \\Michelf\\Markdown::defaultTransform($text);\n\n Rays::import(\"application.vendors.php-markdown.Michelf.MarkdownExtra_inc\");\n return MarkdownExtra::defaultTransform($text);\n }", "public static function fromJson(array|string $json): static;", "public function parse($text) {\n \n // Reset all variables\n $this->_EnvVars = array();\n $this->_GlobalVars = array();\n $this->_EnvStack = array();\n $this->_hasError = false;\n $this->_newError = false;\n $this->_Error = \"\";\n $this->_Result = \"\";\n \n // Reset all modules\n for($i = 0; $i < count($this->_modObjs); $i ++ ) {\n $this->_modObjs[$i]->reset();\n }\n \n return $this->doParse($text);\n }", "public static function parse(string $json) : array {\n $json = new JSON($json);\n return $json->asArray();\n }", "public function parse($data)\n {\n return json_decode($data, true);\n }", "public static function fromJsonObject($json);", "public static function fromString($json)\n {\n return new static(json_decode($json, true));\n }", "public function parseJson()\n {\n $result = $this->_response->getBody()->getContents();\n return json_decode($result);\n }", "public static function text_to_array($text)\n\t{\t\n\t\t/* \n\t\t$text = preg_replace('/{(.*?)}/', '$1_', $text);\n\t\t$result = explode(\"_\", $text);\n\t\t\n\t\treturn $result;\n\t\t*/\n\t\t$place=1;\n\n\t\twhile (strpos($text,\"}\")>0)\n\t\t{\n\t\t\t$start = strpos($text,\"{\")+1;\n\t\t\t$length = strpos($text,\"}\") - $start;\n\t\t\t$array[$place] = substr($text, $start, $length);\n\t\t\t$text = substr($text, $start + $length + 1);\n\t\t\t$place=$place+1;\n\t\t}\n\n\t\treturn $array;\n\t\t\n\t}", "protected function parseToArray($json)\n {\n return json_decode($json, true);\n }", "public static function jsonObjectDeserialize(string $jsonObjectStr): JsonDeserializable;", "public function getAnalyzedText(string $text) : array\n {\n var_dump($this->user . ' ' . $this->password);\n $params = [\n 'query' => [\n 'version' => '2017-09-21',\n 'text' => $this->normalizeText($text),\n ],\n 'auth' => [\n $this->user,\n $this->password\n ]\n ];\n\n /*\n * We even send the result of an empty tweet;\n */\n $result = $this->client->get(self::SERVICE_PATH, $params)->getBody();\n\n if (empty($result))\n {\n throw new \\Exception('Not expected answer from Watson API.');\n }\n\n return json_decode($result, true);\n }", "public function decode(string $json): array;", "protected function _parse_json()\n {\n $this->_data_parsed = null;\n try {\n $parsed = json_decode($this->_data_raw);\n // switch (json_last_error()) {\n // case JSON_ERROR_DEPTH:\n // $this->_set_error_message('json', JSON_ERROR_DEPTH . ': Maximum stack depth exceeded');\n // break;\n // case JSON_ERROR_CTRL_CHAR:\n // $this->_set_error_message('json', JSON_ERROR_CTRL_CHAR . ': Unexpected control character found');\n // break;\n // case JSON_ERROR_SYNTAX:\n // $this->_set_error_message('json', JSON_ERROR_SYNTAX . ': Syntax error, malformed JSON');\n // break;\n // case JSON_ERROR_STATE_MISMATCH:\n // $this->_set_error_message('json', JSON_ERROR_STATE_MISMATCH . ': Invalid or malformed JSON');\n // break;\n // case JSON_ERROR_UTF8:\n // $this->_set_error_message('json', JSON_ERROR_UTF8 . ': Malformed UTF-8 characters, possibly incorrectly encoded');\n // break;\n // case JSON_ERROR_NONE:\n // default:\n // break;\n // }\n } catch (Exception $e) {\n $this->_set_error_message('exception', $e);\n }\n return $parsed;\n }" ]
[ "0.69922495", "0.69406265", "0.68641734", "0.6221962", "0.61419034", "0.61128", "0.61075425", "0.5987768", "0.5896945", "0.58907455", "0.58187854", "0.58115065", "0.5785724", "0.5734784", "0.570754", "0.56113017", "0.5603502", "0.5600417", "0.55895364", "0.55855155", "0.5508857", "0.5502915", "0.5494265", "0.5477957", "0.5436977", "0.542293", "0.54080015", "0.5393415", "0.5372635", "0.53514147" ]
0.81054187
0
Encodes the given `value` and returns the resulting JSON string. If `replacer` is given and is not null, it is used to retrieve the actual object to be encoded. The `replacer` function takes two parameters, the key and the value being encoded. Initial key value is an empty string. If `space` is given and is not null, the result will be prettyprinted. Successive levels will be indented by this string.
public static function stringify ($value, $replacer = null, $space = null) { #/opt/haxe/std/php/_std/haxe/Json.hx:42: characters 3-47 return Json::phpJsonEncode($value, $replacer, $space); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function encodeJson($value) {\n if (defined('DEBUGGING')) {\n return json_encode($value, JSON_PRETTY_PRINT);\n }\n\n return json_encode($value);\n }", "public static function encode($value)\n {\n if (!defined('JSON_PRESERVE_ZERO_FRACTION')) define('JSON_PRESERVE_ZERO_FRACTION',1024);\n $str=json_encode($value,JSON_PRESERVE_ZERO_FRACTION);\n self::errorCheck();\n return $str;\n }", "protected function _dumpNode($key, $value, $indent)\n {\n // Do some folding here, for blocks.\n if (strpos($value, \"\\n\") !== false\n || strpos($value, ': ') !== false\n || strpos($value, '- ') !== false) {\n $value = $this->_doLiteralBlock($value, $indent);\n } else {\n $value = $this->_fold($value, $indent);\n }\n\n if (is_bool($value)) {\n $value = ($value) ? 'true' : 'false';\n } elseif (is_float($value)) {\n if (is_nan($value)) {\n $value = '.NAN';\n } elseif ($value === INF) {\n $value = '.INF';\n } elseif ($value === -INF) {\n $value = '-.INF';\n }\n }\n\n $spaces = str_repeat(' ', $indent);\n\n if (is_int($key)) {\n // It's a sequence.\n $string = $spaces . $key . ': ' . $value . \"\\n\";\n } else {\n // It's mapped.\n $string = $spaces . $key . ': ' . $value . \"\\n\";\n }\n\n return $string;\n }", "protected static function jsonArmor($value)\r\n {\r\n return str_replace(\r\n static::$ESCAPE_JSON_CHARACTERS,\r\n static::$ENCODED_JSON_CHARACTERS,\r\n utf8_encode($value)\r\n );\r\n }", "public static function encode($value, $options = 0, $depth = 512)\n\t{\n\t\tif (version_compare(PHP_VERSION, '5.5.0', '>='))\n\t\t{\n\t\t\t$raw = json_encode($value, $options, $depth);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$raw = json_encode($value, $options);\n\t\t}\n\n\t\t// json_encode() does not escape <, > and &, so we do it with str_replace().\n\t\treturn str_replace(array('<', '>', '&'), array('\\u003c', '\\u003e', '\\u0026'), $raw);\n\t}", "protected function encode($key, $value)\n {\n if (is_numeric($value)) {\n return '\"'.$key.'\" => '.$value;\n } elseif (is_array($value)) {\n return '\"'.$key.'\" => unserialize(\"'.addslashes(serialize($value)).'\")';\n } else {\n return '\"'.$key.'\" => \"'.$value.'\"';\n }\n }", "private function formatValue($value)\n {\n if ($value === '') {\n return '';\n }\n\n if ($value === null) {\n return '<comment>Null</comment>';\n }\n\n if (is_bool($value)) {\n return '<comment>' . ($value ? 'True' : 'False') . '</comment>';\n }\n\n if (empty($value)) {\n return '<comment>Empty</comment>';\n }\n\n if (is_array($value)) {\n return json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n\n if (is_object($value)) {\n return sprintf('<%s>', get_class($value));\n }\n\n if (is_scalar($value)) {\n return $value;\n }\n\n throw new InvalidArgumentException(sprintf('Do not know how to format value \"%s\"', print_r($value, true)));\n }", "public static function encode($value, int $options = self::DEFAULT_OPTIONS_ENCODE, int $depth = 512): string\n {\n return json_encode($value, $options, $depth);\n }", "protected function _yamlize($key, $value, $indent)\n {\n if ($value instanceof Serializable) {\n // Dump serializable objects as !php/object::classname serialize_data\n $data = '!php/object::' . get_class($value) . ' ' . $value->serialize();\n $string = $this->_dumpNode($key, $data, $indent);\n } elseif (is_array($value) || $value instanceof Traversable) {\n // It has children. Make it the right kind of item.\n $string = $this->_dumpNode($key, null, $indent);\n\n // Add the indent.\n $indent += $this->_options['indent'];\n\n // Yamlize the array.\n $string .= $this->_yamlizeArray($value, $indent);\n } elseif (!is_array($value)) {\n // No children.\n $string = $this->_dumpNode($key, $value, $indent);\n }\n\n return $string;\n }", "function debugFormat(mixed $value, $indent = ''): string\n{\n switch (true) {\n case \\is_int($value) || \\is_float($value):\n return \\var_export($value, true);\n case [] === $value:\n return '[]';\n case false === $value:\n return 'false';\n case true === $value:\n return 'true';\n case null === $value:\n return 'null';\n case '' === $value:\n return \"''\";\n case $value instanceof \\UnitEnum:\n return \\ltrim(\\var_export($value, true), '\\\\');\n }\n $subIndent = $indent.' ';\n\n if (\\is_string($value)) {\n return \\sprintf(\"'%s'\", \\addcslashes($value, \"'\\\\\"));\n }\n\n if (\\is_array($value)) {\n $j = -1;\n $code = '';\n\n foreach ($value as $k => $v) {\n $code .= $subIndent;\n\n if (\\in_array($k, ['path', 'prefix'], true) && \\is_string($v)) {\n $v = '/'.\\ltrim($v, '/');\n }\n\n if (!\\is_int($k) || 1 !== $k - $j) {\n $code .= debugFormat($k, $subIndent).' => ';\n }\n\n if (\\is_int($k) && $k > $j) {\n $j = $k;\n }\n $code .= debugFormat($v, $subIndent).\",\\n\";\n }\n\n return \"[\\n\".$code.$indent.']';\n }\n\n if (\\is_object($value)) {\n if ($value instanceof ResourceHandler) {\n return 'new ResourceHandler('.debugFormat($value(''), $indent).')';\n }\n\n if ($value instanceof \\stdClass) {\n return '(object) '.debugFormat((array) $value, $indent);\n }\n\n if (!$value instanceof \\Closure) {\n return $value::class;\n }\n $ref = new \\ReflectionFunction($value);\n\n if (0 === $ref->getNumberOfParameters()) {\n return 'fn() => '.debugFormat($ref->invoke(), $indent);\n }\n }\n\n throw new \\UnexpectedValueException(\\sprintf('Cannot format value of type \"%s\".', \\get_debug_type($value)));\n}", "public static function escapeJsonString($value) {\n\t\t$escapers = array(\"\\\\\", \"/\", \"\\\"\", \"\\n\", \"\\r\", \"\\t\", \"\\x08\", \"\\x0c\");\n\t\t$replacements = array(\"\\\\\\\\\", \"\\\\/\", \"\\\\\\\"\", \"\\\\n\", \"\\\\r\", \"\\\\t\", \"\\\\f\", \"\\\\b\");\n\t\t$result = str_replace($escapers, $replacements, $value);\n\t\treturn $result;\n\t}", "public static function jsonEncode($value) : string\n {\n $result = \\json_encode($value, \\JSON_UNESCAPED_SLASHES | \\JSON_UNESCAPED_UNICODE | \\JSON_PARTIAL_OUTPUT_ON_ERROR);\n return \\is_string($result) ? $result : '(invalid data)';\n }", "private function _doFolding($value, $indent)\n {\n // Don't do anything if wordwrap is set to 0\n if ($this->_dumpWordWrap !== 0 && is_string($value) && strlen($value) > $this->_dumpWordWrap) {\n $indent += $this->_dumpIndent;\n $indent = str_repeat(' ', $indent);\n $wrapped = wordwrap($value, $this->_dumpWordWrap, \"\\n$indent\");\n $value = \">\\n\".$indent.$wrapped;\n } else {\n if ($this->setting_dump_force_quotes && is_string($value) && $value !== self::REMPTY) {\n $value = '\"'.$value.'\"';\n }\n if (is_numeric($value) && is_string($value)) {\n $value = '\"'.$value.'\"';\n }\n }\n\n return $value;\n }", "public static function &encode($value, int $options = 0, int $depth = 512)\n\t{\n\t\t$enc = json_encode($value, $options, $depth);\n\t\tself::handleError(json_last_error(), 'encode');\n\t\treturn $enc;\n\t}", "public static function printPhpValue($value, int $indentationLevel = 0): string\n {\n $output = VarExporter::export($value);\n // Padding with x spaces so they align\n $split = explode(\"\\n\", $output);\n $result = '';\n $padWith = str_repeat(' ', $indentationLevel);\n foreach ($split as $index => $line) {\n $result .= ($index == 0 ? '' : \"\\n$padWith\") . $line;\n }\n\n return $result;\n }", "protected function encode($value = null) {\n\n\t\t\tif (is_array($value)) {\n\t\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t\t$encoded[$k] = $this->encode($v);\n\t\t\t\t}\n\t\t\treturn $encoded;\n\t\t\t} else {\n\t\t\t\treturn $this->hash($value).\"+\".$value;\n\t\t\t}\n\t\t}", "function encode($value)\n {\n switch (gettype($value)) {\n case 'boolean':\n return $value ? 'true' : 'false';\n case 'integer':\n case 'double':\n return $value;\n case 'string':\n return '\"' . $this->quote($value) . '\"';\n case 'array':\n if (array_keys($value) === range(0, count($value) - 1)) {\n // encode as array\n $elts = array();\n foreach ($value as $val) {\n $elts[] = $this->encode($val);\n }\n return '[' . implode(',', $elts) . ']';\n } else {\n // encode as object\n $members = array();\n foreach ($value as $key => $val) {\n $members[] = '\"' . $this->quote($key) . '\":'\n . $this->encode($val);\n }\n return '{' . implode(',', $members) . '}';\n }\n case 'object':\n return $this->encode(get_object_vars($value));\n case 'NULL':\n return 'null';\n default:\n $msg = __FUNCTION__ . '(): type is unsupported, encoded as null';\n trigger_error($msg, E_USER_WARNING);\n return 'null';\n }\n }", "protected function encodeValue( $value ): string\n\t{\n\t\tif( NULL !== $this->encoder ){\n\t\t\t/** @var Callable $callable */\n\t\t\t$callable\t= [$this->encoder, 'encode'];\n\t\t\t$value\t\t= call_user_func_array( $callable, [$value] );\n\t\t}\n\t\treturn $value;\n\t}", "private function _yamlize($key, $value, $indent, $previous_key = -1, $first_key = 0, $source_array = null)\n {\n if (is_array($value)) {\n if (empty($value)) {\n return $this->_dumpNode($key, array(), $indent, $previous_key, $first_key, $source_array);\n }\n // It has children. What to do?\n // Make it the right kind of item\n $string = $this->_dumpNode($key, self::REMPTY, $indent, $previous_key, $first_key, $source_array);\n // Add the indent\n $indent += $this->_dumpIndent;\n // Yamlize the array\n $string .= $this->_yamlizeArray($value, $indent);\n } elseif (!is_array($value)) {\n // It doesn't have children. Yip.\n $string = $this->_dumpNode($key, $value, $indent, $previous_key, $first_key, $source_array);\n }\n\n return $string;\n }", "public function prettyJsonEncode($values)\n\t{\n\t\treturn version_compare(PHP_VERSION, '5.4.0', '>=') ? json_encode($values, JSON_PRETTY_PRINT) : json_encode($values);\n\t}", "public function serialize($value)\n {\n $this->navigator->accept($this->navigator, $this->visitor, $value);\n\n $result = $this->visitor->getResult();\n\n return $this->encoder->encode($result);\n }", "public function encodeValue($value) {\r\n\t\treturn $this->sess->encodeValue($value);\r\n\t}", "public function asJson($value)\n {\n if ($value === null) {\n return $this->nullDisplay;\n }\n\n return is_array($value) ? Html::encode(json_encode($value)) : $value;\n }", "function json_encode($value, $options = 0)\n {\n global $services_json;\n if (!isset($services_json)) {\n require_code('json_inner');\n $services_json = new Services_JSON();\n }\n return $services_json->encode($value);\n }", "function escapeJsonString($value) {\n $escapers = array(\"\\\\\", \"/\", \"\\\"\", \"\\n\", \"\\r\", \"\\t\", \"\\x08\", \"\\x0c\", \"'\", \"{\", \"}\", \"$\", \"@\", \"#\");\n $replacements = array(\"\\\\\\\\\", \"\\\\/\", \"\\\\\\\"\", \"\\\\n\", \"\\\\r\", \"\\\\t\", \"\\\\f\", \"\\\\b\", \"\", \"\", \"\", \"\", \"\", \"\");\n $result = str_replace($escapers, $replacements, $value);\n// return $result;\n $result = trim(htmlspecialchars($result));\n return $result;\n }", "public static function jsonEncode($value, int $options=128)\n {\n return json_encode($value, $options);\n\n }", "protected function _encode($value, $format)\n\t{\n\t\tswitch ($format)\n\t\t{\n\t\t\tcase self::FORMAT_PHP:\n\t\t\t\t$value = serialize($value);\n\t\t\t\tbreak;\n\t\t\tcase self::FORMAT_JSON:\n\t\t\t\t$value = json_encode($value);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $value;\n\t}", "public static function encodeFunc($value)\n {\n $value = str_replace('\\\\\"', '\"', $value);\n //then force escape these same double quotes And Any UNESCAPED Ones.\n $value = str_replace('\"', '\\\"', $value);\n //force wrap value in quotes and return\n return '\"' . $value . '\"';\n }", "public function encode($value);", "protected function addPadding($value)\n {\n $pad = $this->block - strlen($value) % $this->block;\n return $value . str_repeat(chr($pad), $pad);\n }" ]
[ "0.59877396", "0.5631821", "0.5511065", "0.546688", "0.54306424", "0.5380005", "0.5334787", "0.5331637", "0.52924347", "0.52073455", "0.51884025", "0.51728135", "0.51517683", "0.5122305", "0.5116881", "0.5045637", "0.4970579", "0.49437124", "0.48916706", "0.48839375", "0.4862425", "0.48559874", "0.4852834", "0.48205304", "0.479501", "0.47939152", "0.47633326", "0.47463644", "0.4744736", "0.4733198" ]
0.80326235
0
Fetch the confirm custom script.
public function getConfirmCustom() { return $this->confirmCustom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function afww_lifecycle_confirmation( $request, $scripturl )\n{\n $response = array( 'target_url' => $scripturl );\n \n // Send a GET request to the supplied confirmation URL.\n file_get_contents( $request[ 'confirmationData' ][ 'confirmationUrl' ] );\n \n return $response;\n}", "protected function getConfirm_code()\n {\n return hash_hmac('sha256', str_random(40), config('app.key'));\n }", "public function confirmAction()\n {\n $this->container->get('contao.framework')->initialize();\n\n $controller = new BackendConfirm();\n\n return $controller->run();\n }", "public function getConfirm()\n\t{\n\t\treturn $this->getKeyValue('confirm'); \n\n\t}", "public function getScript();", "public static function getTxtConfirm()\n\t{ \n\t\treturn (string)self::get('txtConfirm');\n\t}", "function confirm()\n\t{\n\t\t//import core plugin\n\t\tFvnImporter::corePaymentPlugin();\n\t\tFvnImporter::model('orders');\t\t\n\t\tdo_action('hb_order_process_execute_before');\t\t\n\t\t$plugin = $this->input->getString('method');\n\t\tif(substr($plugin,0,10)=='hbpayment_'){\n\t\t\t$plugin = substr($payment_plugin,10);\n\t\t\t// echo $payment_plugin;die;\n\t\t}\n\t\t$plugin = 'hbpayment_'.$plugin;\n\n\t\t$config = HBFactory::getConfig();\n\t\t//check order da dc thanh toan lan nao chua de add transaction\n\t\t// $original_order = (new FvnModelOrders())->getItem($this->input->get)\n\t\t$payment = new $plugin();\t\n\t\t$payment->config = $config;\n\t\t$payment->order = new FvnModelOrders();\n\t\t$payment->order->load($this->input->get('order_id'));\n\t\t$results = $payment->_postPayment();\n\t\t/// Send email\n\t\t// debug($results);die;\n\t\tif($results){\n\t\t\tif(!isset($results->sendemail)){\n\t\t\t\t//send email\n\t\t\t\tif($config->allow_curl){\n\t\t\t\t\t$url = site_url().'index.php?hbaction=payment&task=urlsendmail&order_id='.$results->id;\n\t\t\t\t\tFvnHelper::pingUrl($url);\n\t\t\t\t}else{\n\t\t\t\t\t$this->sendMail($results->id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\tdo_action('hb_order_process_execute_after',$results);\n\t\t// die;\n\t\t/*\n\t\tif($results->order_status==FvnParamOrderStatus::CONFIRMED['value']){\n\t\t\twp_redirect(FvnHelper::get_order_link($results));\n\t\t}else{\t\t\t\n\t\t\twp_redirect('index.php?view=message');\n\t\t}\t\t\n\t\t*/\n\t\twp_redirect(FvnHelper::get_order_link($results));\n\t\texit;\n\t}", "public function actionConfirm()\n {}", "public function _replyToGetScripts() { return ''; }", "public function getScript(): string\n {\n return view('scripts.callback', [\n 'task' => $this->task,\n 'path' => str_replace('.sh', '-script.sh', $this->task->scriptFile()),\n 'token' => Str::random(20),\n 'hash' => $this->task->id,\n ])->render();\n }", "public function getConfirm()\r\n {\r\n return $this->confirm;\r\n }", "public function confirm()\n {\n return call_user_func_array('Zend\\Console\\Prompt\\Confirm::prompt', func_get_args());\n }", "public function confirmCommand()\n {\n // can also: $this->confirm();\n $a = Interact::confirm('continue');\n\n $this->write('Your answer is: ' . ($a ? 'yes' : 'no'));\n }", "public function getConfirm()\n\t{\n\t\treturn $this->confirm;\n\t}", "function confirm() {\n // $this->data->confirmatory_message();\n }", "public function getConfirmInput();", "public function sendConfirmation();", "public function getConfirm($code) {\n\t\tif (Confide::confirm($code)) {\n\t\t\t$notice_msg = Lang::get('confide::confide.alerts.confirmation');\n\n\t\t\treturn Response::json([\n\t\t\t\t'status' => '_SUCCESSFUL',\n\t\t\t\t'description' => $notice_msg\n\t\t\t], 200);\n\t\t} else {\n\t\t\t$error_msg = Lang::get('confide::confide.alerts.wrong_confirmation');\n\n\t\t\treturn Response::json([\n\t\t\t\t'status' => '_FAILED',\n\t\t\t\t'description' => $error_msg\n\t\t\t], 200);\n\t\t}\n\t}", "public function getAjaxUrlConfirm()\n {\n return $this->urlHelper->getUrl(self::TELESALES_CONFIRM_ENDPOINT);\n }", "public function getScript(): string\n {\n return 'echo \"Hello wolrd\"';\n }", "abstract public function getScript();", "private static function confirm(): bool\n {\n $cmd = self::readCommandSchema('confirm');\n $options = [];\n\n if ($cmd === null) {\n self::throwError(\"Cannot confirm command\");\n }\n\n self::readInteractiveOptions($cmd, $options);\n\n return $options['status'] === 'y';\n }", "function confirmAddonServices(){\n\n\t\t\t$this->output = $this->build_template($this->get_template(\"confirmAddonServices\"));\n\n\t\t}", "public function getScript(): string\n {\n return $this->script;\n }", "public function getConfirm( $code )\n {\n if (Confide::confirm( $code ))\n {\n return Redirect::to('user/login')\n ->with( 'notice', Lang::get('confide::confide.alerts.confirmation') );\n }\n else\n {\n return Redirect::to('user/login')\n ->with( 'error', Lang::get('confide::confide.alerts.wrong_confirmation') );\n }\n }", "protected function script()\n {\n $deleteConfirm = trans('admin.delete_confirm');\n $refreshSucceeded = trans('admin.refresh_succeeded');\n $deleteSucceeded = trans('admin.delete_succeeded');\n $confirm = trans('admin.confirm');\n $cancel = trans('admin.cancel');\n\n $optionShowTags = empty($this->options['showTags']) ? 'false' : ($this->options['showTags'] ? 'true' : 'false');\n $optionLevels = empty($this->options['levels']) ? 5 : $this->options['levels'];\n $optionEnableLinks = empty($this->options['enableLinks']) ? 'false' : ($this->options['enableLinks'] ? 'true' : 'false');\n $optionHighlightSelected = empty($this->options['highlightSelected']) ? 'false' : ($this->options['highlightSelected'] ? 'true' : 'false');\n\n return <<<SCRIPT\n \n console.log('loaded');\n \n $('#{$this->elementId}').treeview(\n {\n data: getTree(),\n showTags: $optionShowTags,\n levels: $optionLevels,\n enableLinks: $optionEnableLinks,\n highlightSelected: $optionHighlightSelected,\n });\n \n $(document).on(\"click\", '.tree_branch_delete', function() {\n var id = $(this).data('id');\n swal({\n title: \"$deleteConfirm\",\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#DD6B55\",\n confirmButtonText: \"$confirm\",\n closeOnConfirm: false,\n cancelButtonText: \"$cancel\"\n },\n function(){\n $.ajax({\n method: 'post',\n url: '{$this->path}/' + id,\n data: {\n _method:'delete',\n _token:LA.token,\n },\n success: function (data) {\n $.pjax.reload('#pjax-container');\n\n if (typeof data === 'object') {\n if (data.status) {\n swal(data.message, '', 'success');\n } else {\n swal(data.message, '', 'error');\n }\n }\n }\n });\n });\n });\n\n $('.{$this->elementId}-refresh').click(function () {\n $.pjax.reload('#pjax-container');\n toastr.success('{$refreshSucceeded}');\n });\n\n $('.{$this->elementId}-expandAll').on('click', function(e){\n $('#{$this->elementId}').treeview('expandAll', { silent: true });\n });\n\n $('.{$this->elementId}-collapseAll').on('click', function(e){\n $('#{$this->elementId}').treeview('collapseAll', { silent: true });\n });\n\nSCRIPT;\n }", "public function _replyToGetScripts() { return $this->getScripts(); }", "public static function getConfirmMsg()\n\t{\n\t\treturn (string)self::get('confirm_msg');\n\t}", "public function getScript()\n {\n return '';\n }", "protected function charge_script() {\r\n\t\tforeach ( $this->script as $sc ) {\r\n\t\t\techo \"<script type='text/javascript' src='../VUE/Script/\" . $sc . \".js'></script>\\n\";\r\n\t\t}\r\n\t}" ]
[ "0.61907196", "0.6061443", "0.6049391", "0.5682453", "0.56466484", "0.56163406", "0.558705", "0.5564068", "0.5560102", "0.553993", "0.54767835", "0.5446154", "0.5433239", "0.54310656", "0.53879094", "0.5370558", "0.5325281", "0.5322976", "0.5322688", "0.5317042", "0.52998286", "0.5257302", "0.52446187", "0.5203416", "0.51632357", "0.5157458", "0.515718", "0.5152261", "0.5148117", "0.5134562" ]
0.6087772
1
Retrieve the confirm message.
public function getConfirmMessage() { return $this->confirmMessage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getConfirmMsg()\n\t{\n\t\treturn (string)self::get('confirm_msg');\n\t}", "public static function getConcludingConfirmMsg()\n\t{\n\t\treturn (string)self::get('concluding_confirm_msg');\n\t}", "public function getConfirm()\r\n {\r\n return $this->confirm;\r\n }", "public function getConfirm()\n\t{\n\t\treturn $this->confirm;\n\t}", "public function getConfirm()\n\t{\n\t\treturn $this->getKeyValue('confirm'); \n\n\t}", "public function getConfirmText() {\n return $this->t('Delete Notification');\n }", "public static function getTxtConfirm()\n\t{ \n\t\treturn (string)self::get('txtConfirm');\n\t}", "public function getConfirmKey()\r\n {\r\n return $this->_confirmField;\r\n }", "public function getConfirmCustom()\n\t{\n\t\treturn $this->confirmCustom;\n\t}", "public static function getConfirmSubject()\n\t{ \n\t\treturn (string)self::get('confirm_subject');\n\t}", "function confirm() {\n // $this->data->confirmatory_message();\n }", "public function getPasswordConfirm()\n {\n return $this->passwordConfirm;\n }", "public function getPasswordConfirm()\r\n {\r\n return $this->passwordConfirm;\r\n }", "public function getConfirmInput();", "public static function getTxtIntroConfirm()\n\t{ \n\t\treturn (string)self::get('txt_intro_confirm');\n\t}", "public function getConfirmPassword()\n {\n return $this->confirmPassword;\n }", "public function getConfirmPassword()\n {\n return $this->confirmPassword;\n }", "public function getConfirmationResponse()\n {\n return $this->gateway->getConfirmationResponse();\n }", "public function confirm()\n {\n return call_user_func_array('Zend\\Console\\Prompt\\Confirm::prompt', func_get_args());\n }", "public function getMessage(): string\n {\n return Translator::getInstance()->getTranslation(\"forge-confirm-problem\");\n }", "public function getConfirm()\n {\n return view('pages.auth.mailconfirm');\n }", "public static function confirm($id = -1)\n\t{ \n\t\treturn self::state($id, 'confirm'); \n\t}", "public function getQuestion() {\n return $this->t('Are you sure you want to delete content_moderation_notification %label?', [\n '%label' => $this->entity->label(),\n ]);\n }", "public function getDeleteConfirmKey();", "public function getIsConfirmedStatus()\n {\n $id = $this->getCustomerId();\n switch ($this->accountManagement->getConfirmationStatus($id)) {\n case AccountManagementInterface::ACCOUNT_CONFIRMED:\n return __('Confirmed');\n case AccountManagementInterface::ACCOUNT_CONFIRMATION_REQUIRED:\n return __('Confirmation Required');\n case AccountManagementInterface::ACCOUNT_CONFIRMATION_NOT_REQUIRED:\n return __('Confirmation Not Required');\n }\n return __('Indeterminate');\n }", "public function getQuestion() {\n return t('Are you sure you want delete this entity?');\n }", "public function confirmSubmit ($confirm_what)\n\t{\n\t\treturn $this->template->confirmSubmit($confirm_what);\n\t}", "public function getMessage() {\n return $this->_cb->getMessage($this);\n }", "public function actionConfirm()\n {}", "protected function getConfirm_code()\n {\n return hash_hmac('sha256', str_random(40), config('app.key'));\n }" ]
[ "0.8969101", "0.8222131", "0.80777484", "0.80638033", "0.7935137", "0.78083664", "0.77558136", "0.7589714", "0.73343027", "0.71480775", "0.70764196", "0.6906805", "0.686142", "0.68239003", "0.6758289", "0.6758119", "0.6758119", "0.6682022", "0.6673624", "0.66598624", "0.6654753", "0.6408735", "0.6386855", "0.63855183", "0.63784206", "0.63114625", "0.6293867", "0.62388486", "0.6227649", "0.6225986" ]
0.8975857
0
Retrieve the header attributes.
public function getHeaderAttributes() { return $this->attributes['header']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHeader(){\n\t\treturn $this->attributes['header'];\n\t}", "public function getHeaders() {\n return @$this->attributes['headers'];\n }", "public function getHeaderInformation() {\n return array(\n 'name' => $this->name,\n 'email' => $this->email,\n 'phone_number' => $this->phone_number,\n 'address' => $this->address,\n 'personal_website' => $this->personal_website\n );\n }", "public function getHeadersAttribute()\n {\n return collect($this->data->get('Headers', []))\n ->mapWithKeys(function ($header) {\n return [$header['Name'] => $header['Value']];\n });\n }", "function getHeaders() {\n return $this->getFieldValue('headers');\n }", "public function getRequiredHeaders();", "abstract public function getHeaderInfo();", "private function getHeader()\r\n {\r\n return $this->header;\r\n }", "public function getHeader()\n {\n return $this->_header;\n }", "public function getHeaders(){\n\t \treturn $this->headers;\n\t }", "abstract public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeader()\n {\n return $this->_header;\n }", "function qm_get_headers()\n {\n return \\Quantum\\Request::getHeaders();\n }", "public function getHeader()\r\n {\r\n return $this->header;\r\n }", "public function getHeaders() {\n }", "function getHeaders() {\n return $this->headers;\n }", "public static function getHeaders() {\n\t\treturn self::$headers;\n\t}", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "function headers() {\n return $this->headers;\n }", "function headers() {\n return $this->headers;\n }", "public function getHeaders() \n {\n return $this->response['headers'];\n }" ]
[ "0.77038234", "0.7547072", "0.7239175", "0.68976605", "0.6863944", "0.68568844", "0.6851531", "0.68350345", "0.6806939", "0.6806182", "0.67771095", "0.6772455", "0.6772455", "0.6772455", "0.6772455", "0.6772455", "0.6772455", "0.6772455", "0.67337215", "0.67323995", "0.67146176", "0.67094725", "0.66722065", "0.66706324", "0.66655254", "0.66655254", "0.66655254", "0.66613954", "0.66613954", "0.6619602" ]
0.8691405
0
Retrieve the image title.
public function getImageTitle() { return $this->imageTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImageTitle()\n {\n return $this->imageTitle;\n }", "public function title(): string {\n\t\treturn get_the_title( $this->image_id );\n\t}", "public function getTitleImage()\n {\n return $this->titleImage;\n }", "public function getTitle(){\n\t\treturn isset($this->data['XMP-dc']['Title']) ? $this->data['XMP-dc']['Title']:\n\t\t(isset($this->data['IPTC']['Headline']) ? $this->data['IPTC']['Headline']:\n\t\t\t(isset($this->data['IPTC']['ObjectName']) ? $this->data['IPTC']['ObjectName']:\n\t\t\t\t(isset($this->data['XMP-photoshop']['Headline']) ? $this->data['XMP-photoshop']['Headline']: null)));\n\t}", "public function get_title() {\n\t\treturn esc_html__( 'Martfury - Image Box', 'martfury' );\n\t}", "public function getImageName()\n {\n return $this\n ->get('imagename')\n ->get('name');\n }", "public function get_title() {\n\t\treturn __( 'Styled Image', 'thegem' );\n\t}", "public function getImageName()\n {\n return $this->imageName;\n }", "public function title()\n {\n return $this->asset->title;\n }", "public function getTitle()\n {\n if (is_null($this->_title))\n {\n $this->_title = $this->getMetadata(\"title\");\n }\n return $this->_title;\n }", "public static function getMetaTitle()\n\t{\n\t\tself::metadata();\n\t\treturn(static::$metadata->meta_title);\n\t}", "public function getMetaTitle();", "public function getMetaTitle();", "public static function getPageTitle()\n\t{\n\t\tself::metadata();\n\t\treturn(static::$metadata->title);\n\t}", "public function getMetaImageCaption()\n {\n return $this->owner->ImageMetaCaption;\n }", "public function getMetaImageCaption()\n {\n return $this->owner->ImageMetaCaption;\n }", "public function title()\n \t{\n \t\tif(!$aProperties=$this->properties(false))\n \t\t{\n \t\t\treturn ;\n \t\t}\n \t\treturn $aProperties->get('title') ;\n \t}", "public function getTitle()\n\t{\n\t\treturn $this->data[self::KEY_TITLE];\n\t}", "private function getImageTitle(FileStorageImage $oPicture): string\n {\n if ($this->isPhotoTitleEligible()) {\n return $this->httpRequest->post('title');\n }\n\n // Otherwise, get the name from the filename\n return $this->getTitleFromFileName($oPicture);\n }", "public function getTitle() {\n foreach ($this->getContents() as $content) {\n $contentAssoc = $content->getAssocArray(false);\n if ($contentAssoc['format'] == \"default\")\n return $contentAssoc['title'];\n }\n }", "public function getImageCaption() {\r\t\treturn ($this->imageCaption);\r\t}", "public function getHeadshotName() {\n\t\t$currentHeadshot = $this->getCurrentHeadshot();\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query\n\t\t\t->select($db->quoteName(array('title')))\n\t\t\t->from($db->quoteName('#__content'))\n\t\t\t->where($db->quoteName('id').\" = \".$db->quote($currentHeadshot));\n\t\t$db->setQuery($query);\n\t\t$result = $db->loadResult();\n\t\treturn $result;\n\t}", "public function getTitle() {\r\n\t\treturn $this->getProperty(\"title\");\r\n\t}", "function getPhotoTitle($id) {\n $params = array(\n 'method' => 'flickr.photos.getInfo',\n 'photo_id' => $id,\n 'api_key' => $this->getAPIKey()\n );\n $this->setQueryString($params);\n $response = $this->request('');\n $result = $this->getValue($response->getBody(), photo, title);\n return $result;\n }", "public function get_title()\n {\n return __('Logo Carousel', SA_ELEMENTOR_TEXTDOMAIN);\n }", "private function getTitle() {\n return $this->title;\n }", "public function getTheTitle() {\n\t\treturn $this->getTitle();\n\t}", "public function getTitle()\n {\n $this->getParts();\n\n return $this->title;\n }", "public function getStoreBlockTitleImg()\n {\n return $this->get(self::store_block_title_img);\n }", "public function getTitle() {\n\t\t\treturn get_the_title($this->article_id);\t\t\n\t\t}" ]
[ "0.86860543", "0.8239422", "0.8164879", "0.77092725", "0.75595665", "0.75578743", "0.7514012", "0.7383824", "0.73183113", "0.7300336", "0.7294078", "0.72889286", "0.72889286", "0.72854894", "0.7259891", "0.7259891", "0.724536", "0.724215", "0.72345537", "0.7166918", "0.7162851", "0.71457624", "0.7135555", "0.71335614", "0.71155274", "0.71133083", "0.7112439", "0.7096384", "0.70850617", "0.7083208" ]
0.89043427
0
Retrieve the overwrite value setting.
public function getOverwrite() { return $this->overwriteValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSetting()\n {\n return $this->setting;\n }", "public function getSetting()\n\t{\n\t\treturn $this->setting;\n\t}", "function get_user_setting()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER_SETTING);\r\n }", "function setting() {\r\n return $setting[''];\r\n }", "public function getOverwrite($key)\n {\n if (isset($this->overwrittenData[$key])) {\n return $this->overwrittenData[$key];\n }\n }", "private function getScopeOverriddenValue()\n {\n if (null === $this->scopeOverriddenValue) {\n $this->scopeOverriddenValue = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\n ScopeOverriddenValue::class\n );\n }\n\n return $this->scopeOverriddenValue;\n }", "public function save()\n {\n return ApplicationSetting::put($this->key, $this->value);\n }", "protected function getOption()\n {\n return get_option($this->setting, array());\n }", "public function getUserDefinedValue()\n {\n return $this->userDefinedValue;\n }", "public function getUpdatedValue() {\n\t\treturn $this->getValue();\n\t}", "function get() {\n\t\treturn get_site_option( $this->_option(), false, false );\n\t}", "function get_value()\n {\n return $this->get_default_property(self :: PROPERTY_VALUE);\n }", "function getOptionMetaValue()\n {\n return $this->__ometa_value ;\n }", "function getConfigWritable(){\n $this->_checkConfig();\n return $this->bConfigWritable;\n }", "public function getDefaultValue()\n {\n return $this->getProduct()->getPreconfiguredValues()->getData('options/' . $this->getOption()->getId());\n }", "function siteorigin_setting( $setting ){\n\treturn SiteOrigin_Settings::single()->get( $setting );\n}", "function get_value()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_VALUE);\r\n }", "function get_override() {\n\t\t\tif (SemisecureLoginReimagined::is_multisite() && SemisecureLoginReimagined::get_option('allow_overrides') != 'no' && SemisecureLoginReimagined::get_option('use_overrides', true) == 'yes')\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "public function getSaveValue($value)\n {\n return $value;\n }", "function get( $setting ) {\n\t\tstatic $old_settings = false;\n\t\tif( $old_settings === false ) {\n\t\t\t$old_settings = get_option( get_template() . '_theme_settings' );\n\t\t}\n\n\t\tif( isset( $old_settings[$setting] ) ) {\n\t\t\t$default = $old_settings[$setting];\n\t\t}\n\t\telse {\n\t\t\t$default = isset( $this->defaults[$setting] ) ? $this->defaults[$setting] : false;\n\t\t}\n\n\t\t// Handle setting migration\n\t\treturn apply_filters( 'siteorigin_setting', get_theme_mod( 'theme_settings_' . $setting, $default ), $setting );\n\t}", "public function getNewValueJson()\n {\n if (array_key_exists(\"newValueJson\", $this->_propDict)) {\n return $this->_propDict[\"newValueJson\"];\n } else {\n return null;\n }\n }", "public function getOriginalValue()\n {\n return $this->store->get($this->name);\n }", "public function getAskAboutOverwrites() {\n return @$this->attributes['ask_about_overwrites'];\n }", "public function getOverrideWarningsFlag(): ?string\n {\n return $this->overrideWarningsFlag;\n }", "public function getOverrideWarningsFlag(): ?string\n {\n return $this->overrideWarningsFlag;\n }", "protected function get_value() {\n\t\treturn $this->user_options->get( Active_Consumers::OPTION );\n\t}", "protected function set_saved_value() {\n\t\tif ( $this->use_key ) {\n\t\t\t$this->saved_value = $this->option_key;\n\t\t} else if ( is_array( $this->option ) ) {\n\t\t\tif ( $this->use_separate_values && isset( $this->option['value'] ) ) {\n\t\t\t\t$this->saved_value = $this->option['value'];\n\t\t\t} else {\n\t\t\t\t$this->saved_value = isset( $this->option['label'] ) ? $this->option['label'] : reset( $this->option );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->saved_value = $this->option;\n\t\t}\n\t}", "public function &getValueToSet();", "public function getPref()\n {\n return $this->pref;\n }", "public function __get($key) {\n if (!array_key_exists($key, $this->settings)) {\n return null;\n }\n return $this->settings[$key]['value'];\n }" ]
[ "0.6376737", "0.6288923", "0.61894363", "0.61602724", "0.60882044", "0.60096824", "0.5779781", "0.57331705", "0.56567824", "0.5645894", "0.5632574", "0.56308746", "0.5589443", "0.5572018", "0.556741", "0.55545", "0.55412906", "0.5515931", "0.55103594", "0.5489791", "0.54527646", "0.54390997", "0.5436928", "0.54200965", "0.54200965", "0.5412886", "0.5407776", "0.54061395", "0.53997135", "0.5377703" ]
0.7867472
0
Retrieve the default sorting method.
public function getSortingMethod() { return $this->sortingMethod; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultSort()\n\t{\n\t\treturn $this->_defaultSort;\n\t}", "public static function getSortingType() {\n if (isset($_GET[\"sorting\"])){\n return $_GET[\"sorting\"];\n }\n\n return \"ASC\";\n }", "public function getDefaultSortField(): string;", "public function getDefaultSortField(): string;", "public function getDefaultSortField()\n {\n return $this->defaultSortField;\n }", "public function getSort()\r\n {\r\n return $this->config->get('sort');\r\n }", "public function getSort()\n {\n return $this->get(self::SORT);\n }", "public function getDefaultSort()\n {\n return ['id', 'desc'];\n }", "public function getDefaultSortOrder()\n {\n return $this->defaultSortOrder;\n }", "public function getSorting()\n\t{\n\t\treturn $this->sorting;\n\t}", "public function getSort();", "public static function default() {\n return self::ASC();\n }", "function getSort() {\n return 139;\n }", "public function get_sort_default_column() {\r\n\t\treturn 'name';\r\n\t}", "function getDefaultSortingField()\n {\n return 'name';\n }", "protected function get_sort()\n\t{\n\t\tif ($this->default_sort)\n\t\t\t$default_sort = $this->default_sort;\n\t\telse\n\t\t\t$default_sort = $this->accessor_object->get_default_sort();\n\t\t\n\t\t$sort = $this->session->userdata( $this->sort_session_var );\n\t\t\n\t\tif (!$sort && $default_sort)\n\t\t\t$sort = $default_sort;\n\t\t\n\t\tif (empty( $sort ))\n\t\t\treturn \"\";\n\t\t\n\t\tif (!is_string( $sort ))\n\t\t\treturn $sort;\n\t\t\n\t\tlog_message_debug( __METHOD__, \"incoming sort = $sort\", TRUE );\n\t\t\t\n\t\tif ($sort[0] != '-')\n\t\t{\n\t\t\t$direction = ModelSchemaField::SORT_ASCENDING;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$direction = ModelSchemaField::SORT_DESCENDING;\n\t\t\t$sort = substr( $sort, 1 ) . \" DESC\";\n\t\t}\n\t\t\n\t\tlog_message_debug( __METHOD__, \"sort = $sort, direction = $direction\" );\n\t\n\t\treturn $sort;\n\t}", "function getSort(){\n\t\treturn 108;\n\t}", "public function getSort() {\r\n\r\n\t\t$this->errorReset();\r\n\r\n\t\treturn $this->sort;\r\n\t}", "public function getSort()\n {\n return $this->sort;\n }", "public function getSort()\n {\n return $this->sort;\n }", "public function getSort() {\n return $this->sort;\n }", "public function getSort()\n\t{\n\t\treturn $this->sort;\n\t}", "public function getSort()\n\t{\n\t\treturn $this->sort;\n\t}", "public static function getDefaultOrderBy() {\n $orderField = c('Vanilla.Discussions.SortField', self::DEFAULT_ORDER_BY_FIELD);\n $orderDirection = c('Vanilla.Discussions.SortDirection', 'desc');\n\n // Normalize any prefixed fields\n if (strpos($orderField, 'd.') === 0) {\n $orderField = substr($orderField, 2);\n }\n\n return [$orderField => $orderDirection];\n }", "public static function getDefaultSorting()\n {\n return ['id'];\n }", "function getSort ()\n {\n return 10;\n }", "function getSort(){\r\n return 301;\r\n }", "protected function _getSortAvailableFunctions()\n {\n return [\n self::SORT_SERVER,\n self::SORT_NAME,\n self::SORT_JOBS_IN_QUEUE,\n self::SORT_JOBS_RUNNING,\n self::SORT_WORKERS\n ];\n }", "public function sortKeyType()\n {\n return 'string';\n }", "function getSort(){\n return 299;\n }" ]
[ "0.76768976", "0.76295704", "0.7273028", "0.7273028", "0.72556967", "0.7052195", "0.6913776", "0.68811464", "0.6776794", "0.67603093", "0.6738795", "0.6736015", "0.67203546", "0.6667016", "0.666697", "0.6639213", "0.66373307", "0.6626269", "0.66082126", "0.66082126", "0.6598828", "0.6591774", "0.6591774", "0.6583862", "0.65670186", "0.65384614", "0.65175974", "0.6517248", "0.6512132", "0.6504025" ]
0.8281768
0
Retrieve the URL title tag.
public function getURLTitle() { return $this->urlTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function url_title()\n\t\t\t {\n\t\t\t \treturn ($this->title !== NULL) ? $this->title->url_title : '';\n\t\t\t }", "public function getPageTitle(){\r\n $html = @file_get_contents($this->current_url);\r\n preg_match('/<title>(.*)<\\/title/i', $html, $title);\r\n \r\n // If the title could be obtained.\r\n if(isset($title[1])){ \r\n return $title[1];\r\n }\r\n return false; \r\n }", "public function getTitle()\n {\n return $this->getAttributeValue('title');\n }", "private function getTitle() {\n return $this->title;\n }", "public static function get_remote_page_title ($url) {\n\t\t\t\t$data = file_get_contents($url);\n\t\t\t\t$regex = '/<title[^>]*>(.*)<\\/title>/';\n\t\t\t\tpreg_match($regex,$data,$match);\n\n\t\t\t\treturn $match[1]; \n\t\t\t}", "public function getTitle() {\r\n\t\treturn $this->title;\r\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n return $this->get(self::TITLE);\n }", "public function getTitle() {\n return $this->get(self::TITLE);\n }", "public function getTitle()\n {\n return $this->getValue('title');\n }", "public function getTitle()\n {\n return $this->get(self::TITLE);\n }", "public function getTitle() {\r\n\t\treturn $this->getProperty(\"title\");\r\n\t}", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle() {\n\t\treturn $this->_title;\n\t}", "public function getTitle() {\n\t\treturn $this->_title;\n\t}", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }" ]
[ "0.8239034", "0.7579494", "0.7523922", "0.7514605", "0.7506315", "0.7485067", "0.7468977", "0.7468977", "0.7468977", "0.7468977", "0.7468977", "0.74664724", "0.74664724", "0.746078", "0.7434438", "0.74316245", "0.740517", "0.740517", "0.740517", "0.740517", "0.740517", "0.740517", "0.7403252", "0.7403252", "0.740146", "0.740146", "0.740146", "0.740146", "0.740146", "0.740146" ]
0.82701266
0
Sets the confirm message.
public function setConfirm($message, $custom = null) { $this->confirm = true; $this->confirmMessage = SpoonFilter::htmlentities((string) $message); $this->confirmCustom = (string) $custom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConfirmationMessage(){\n\t\t$this->signUpConfirmation = NEW_USER_FORM_REGISTRATION_CONFIRMATION_STR;\n\t}", "public function setConfirm(bool $confirm)\n\t{\n\t\t$this->addKeyValue('confirm', $confirm); \n\n\t}", "public function getConfirmMessage()\n\t{\n\t\treturn $this->confirmMessage;\n\t}", "function confirm() {\n // $this->data->confirmatory_message();\n }", "public function confirmCommand()\n {\n // can also: $this->confirm();\n $a = Interact::confirm('continue');\n\n $this->write('Your answer is: ' . ($a ? 'yes' : 'no'));\n }", "abstract public function confirm($message, array $options = array());", "public function getConfirmText() {\n return $this->t('Delete Notification');\n }", "public function setConfirm($confirm)\r\n {\r\n $this->confirm = $confirm;\r\n\r\n return $this;\r\n }", "protected function setConfirmations()\n {\n $this->context->controller->confirmations = $this->_confirmations;\n }", "public static function getConfirmMsg()\n\t{\n\t\treturn (string)self::get('confirm_msg');\n\t}", "public function setConfirmationMessage($token) {\n \tif ($this->_receiver == null)\n \t\tthrow new Exception('The receiver must be set before setting the message');\n\n\t\t$message = '\n\t\t<html>\n\t\t\t<head>\n\t\t\t\t<style>\n\t\t\t\t\tbody {\n\t\t\t\t\t\tfont-family: sans-serif;\n\t\t\t\t\t}\n\t\t\t\t\t#container {\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t}\n\t\t\t\t\t#button {\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\twhite-space: nowrap;\n\t\t\t\t\t\tvertical-align: middle;\n\t\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\t\t-moz-user-select: none;\n\t\t\t\t\t\t-ms-user-select: none;\n\t\t\t\t\t\tuser-select: none;\n\t\t\t\t\t\tborder: 1px solid transparent;\n\t\t\t\t\t\tpadding: .375rem .75rem;\n\t\t\t\t\t\tfont-size: 1rem;\n\t\t\t\t\t\tline-height: 1.5;\n\t\t\t\t\t\tborder-radius: .25rem;\n\t\t\t\t\t\tcolor: #fff;\n\t\t\t\t\t\tbackground-color: #007bff;\n\t\t\t\t\t\tborder-color: #007bff;\n\t\t\t\t\t\ttransition: color .15s ease-in-out,\n\t\t\t\t\t\t\tbackground-color .15s ease-in-out,\n\t\t\t\t\t\t\tborder-color .15s ease-in-out,\n\t\t\t\t\t\t\tbox-shadow .15s ease-in-out;\n\t\t\t\t\t}\n\t\t\t\t\ta:hover {\n\t\t\t\t\t\tcolor: #fff;\n\t\t\t\t\t\tbackground-color: #0069d9;\n\t\t\t\t\t\tborder-color: #0062cc;\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<div id=\"container\">\n\t\t\t\t\t<h1><strong>Confirm your Camagru account</strong></h1>\n\t\t\t\t\t<p>Hi %s ! To finalize your registration to camagru, please click on the link below.</p>\n\t\t\t\t\t<a id=\"button\" href=\"%s?token=%s\">Activate account</a>\n\t\t\t\t</div>\n\t\t\t</body>\n\t\t</html>\n\t\t';\n\n\t\t$message = sprintf(\n\t\t\t$message,\n\t\t\t$this->_receiver['firstname'],\n\t\t\t'https://' . $_SERVER['HTTP_HOST'] . '/confirm-account.php',\n\t\t\t$token\n\t\t);\n\n\t\t$this->_message = $message;\n\t\t$this->_subject = 'Confirm your Camagru account';\n }", "public function confirm()\n {\n $pageTitle = 'Commentaire en attente de validation';\n $this->render('confirmation', ['pageTitle' => $pageTitle], 'frontend');\n }", "public function getConfirm()\r\n {\r\n return $this->confirm;\r\n }", "public function confirm()\n {\n $this->exitWith('1');\n }", "public function confirm($message, $method = null)\n {\n $this->confirmMessage = $message;\n $this->confirmMethod = $method;\n\n return $this;\n }", "public function actionConfirm()\n {}", "public function getConfirm()\n\t{\n\t\treturn $this->confirm;\n\t}", "public function doconfirm()\n {\n $this->bean->active = 1;\n $this->bean->confirm = 1;\n \\R::store($this->bean);\n }", "public static function confirm($message,$default='n',$yes='y',$no='n')\n {\n switch($default) {\n case $yes:\n $yes = strtoupper($yes);\n break;\n default:\n $no = strtoupper($no);\n break;\n }\n if(self::getOption('noninteractive')){\n $res = $default;\n self::line($message.' : '.$res);\n } else {\n $res = self::prompt($message.' ['.$yes.'/'.$no.']');\n if(empty($res)) {\n $res = $default;\n }\n }\n return strtolower($res) == strtolower($yes);\n }", "public function getConfirm()\n\t{\n\t\treturn $this->getKeyValue('confirm'); \n\n\t}", "public function addConfirmation($value) {\n\t\t$this->confirm_message = $value;\n\t\treturn $this;\n\t}", "public static function getConcludingConfirmMsg()\n\t{\n\t\treturn (string)self::get('concluding_confirm_msg');\n\t}", "protected function setNeedConfirm($need_confirm){\n $this->param['need_confirm'] = $need_confirm;\n }", "public function confirm()\n {\n return call_user_func_array('Zend\\Console\\Prompt\\Confirm::prompt', func_get_args());\n }", "public function sendConfirmEmail()\n {\n if ($user = $this->getUser()) {\n Yii::$app->getMailer()->compose('@skeleton/mail/account/confirm', ['user' => $user])\n ->setSubject(Yii::t('skeleton', 'Confirm your account'))\n ->setFrom(Yii::$app->params['email'])\n ->setTo($user->email)\n ->send();\n }\n }", "public function settingsConfirm()\n\t\t{\n\t\t\t$_SESSION['error'] = \"Are you sure you want to permantly delete your account?\";\n\t\t\t$_SESSION['confirm'] = \"true\";\n\t\t\theader('Location: '.BASE_URL.'/settings');\n\n\t\t}", "public static function getTxtConfirm()\n\t{ \n\t\treturn (string)self::get('txtConfirm');\n\t}", "protected function addConfirmationMessage($strMessage)\n\t{\n\t\t$this->addMessage($strMessage, 'TL_CONFIRM');\n\t}", "public function setColumnConfirm($column, $message, $custom = null, $title = null, $uniqueId = '[id]'): void\n {\n $column = (string) $column;\n $message = (string) $message;\n $title = ($title !== null) ? (string) $title : null;\n $uniqueId = (string) $uniqueId;\n\n // has results\n if ((int) $this->source->getNumResults() === 0) {\n return;\n }\n // column doesn't exist\n if (!isset($this->columns[$column])) {\n throw new \\SpoonDatagridException(\n 'The column \"' . $column . '\" doesn\\'t exist, therefore no confirm message/script can be added.'\n );\n }\n\n // get URL\n $url = $this->columns[$column]->getURL();\n\n // URL provided?\n if ($url !== '') {\n // grab current value\n $currentValue = $this->columns[$column]->getValue();\n\n // reset URL\n $this->columns[$column]->setURL(null);\n\n // set the value\n $this->columns[$column]->setValue('<a href=\"' . $url . '\" class=\"\">' . $currentValue . '</a>');\n }\n\n // generate id\n $id = 'confirm-' . (string) $uniqueId;\n\n // set title if there wasn't one provided\n if ($title === null) {\n $title = SpoonFilter::ucfirst(BackendLanguage::lbl('Delete') . '?');\n }\n\n // grab current value\n $value = $this->columns[$column]->getValue();\n\n // add class for confirmation\n if (mb_substr_count($value, '<a') === 0) {\n // is it a link?\n throw new Exception('The column doesn\\'t contain a link.');\n }\n\n if (mb_substr_count($value, 'class=\"') > 0) {\n $value = str_replace(\n 'class=\"',\n 'data-message-id=\"' . $id . '\" class=\"jsConfirmationTrigger ',\n $value\n );\n } else {\n $value = str_replace(\n '<a ',\n '<a data-message-id=\"' . $id . '\" class=\"jsConfirmationTrigger\" ',\n $value\n );\n }\n\n // append message\n $value .= '<div id=\"' . $id . '\" title=\"' . $title . '\" style=\"display: none;\"><p>' .\n $message . '</p></div>';\n\n // reset value\n $this->columns[$column]->setValue($value);\n }", "public function confirm($message = null, $yes = 'y', $no = 'n')\n {\n $input = $this->get($message . '(' . $yes . '|' . $no . ')');\n if ($input == $yes) {\n return true;\n } elseif ($input == $no) {\n return false;\n }\n return $this->confirm($message, $yes, $no);\n }" ]
[ "0.71722174", "0.7164104", "0.70112365", "0.69561267", "0.6700097", "0.66306525", "0.65376675", "0.63852715", "0.6375291", "0.6334686", "0.630501", "0.62951654", "0.62449443", "0.6203695", "0.6140005", "0.610765", "0.60964555", "0.60733443", "0.6039887", "0.6032445", "0.60092944", "0.5975998", "0.5953962", "0.58900636", "0.58852243", "0.5853034", "0.5796957", "0.57931757", "0.5785885", "0.5775039" ]
0.75887626
0
Set the header attributes.
public function setHeaderAttributes(array $attributes) { foreach($attributes as $key => $value) $this->attributes['header'][(string) $key] = (string) $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHeader($header){\n\t\t$this->attributes['header'] = $header;\n\t}", "function setTableHeaderAttributes($attribs)\n {\n $this->_options['headerAttributes'] = $attribs;\n }", "public function setHeaders() {\n }", "private function setHeader($header){\n $this->header = $header ;\n }", "function setHeader($header) {\n $this->header = $header;\n }", "public function setHeader($header){\n $this->header = $header;\n }", "function setTableHeaderAttributes($attribs)\r\n {\r\n $this->_table->setRowAttributes(0, $attribs, true);\r\n }", "public function setHeader(array $header) : void;", "public function setHeader($header) {\n\t\t$this->header = $header;\n\t}", "public function setHeader($header) {\n $this->header = $header;\n }", "public function setHeader($header)\n {\n $this->header = $header;\n }", "function setHeaders($headers){\n $this->defaultHeader = false;\n $this->headers = $headers;\n }", "public function setHeader($name, $value);", "protected function setHeader(array $header)\n {\n $this->header = $header;\n }", "function setHeader(string $name, string $value);", "public function setHeader(array $header)\n {\n $this->header = $header;\n }", "public function setHeader(array $header): void\n {\n $this->header = $header;\n }", "function setHeaders($headers)\r\n\t{\r\n\t\t$this->_headers = $headers;\r\n\t\t$this->_updateRowsCols($headers);\r\n\t}", "public function setHeader($key, $value);", "public function setHeader(string $name, $value): self;", "public function headerAttributes($value) {\n return $this->setProperty('headerAttributes', $value);\n }", "public final function assign()\n\t{\n\t\tZoombi_Headers::setHeader($this->m_key, $this->m_value);\n\t}", "private function normalize_header() {\n\t\tif (!$this->skeleton->built('header')) {\n\t\t\t$header = self::fetch('admin_header', [$this->id()]);\n\t\t}\n\t\telse {\n\t\t\t$header = $this->skeleton->get('header');\n\t\t\t$this->skeleton->rebuild('header');\n\t\t}\n\n\t\tif (!($header['date_created'] instanceof DateTime)) $header['date_created'] = new DateTime($header['date_created']);\n\t\tif (!($header['last_modified_date'] instanceof DateTime)) $header['last_modified_date'] = new DateTime($header['last_modified_date']);\n\t\tif (!($header['last_login_date'] instanceof DateTime)) $header['last_login_date'] = new DateTime($header['last_login_date']);\n\n\t\t$header['active'] = CK\\fn::check_flag($header['active']);\n\t\t$header['broker'] = CK\\fn::check_flag($header['broker']);\n\t\t$header['account_manager'] = CK\\fn::check_flag($header['account_manager']);\n\n\t\t$this->skeleton->load('header', $header);\n\t}", "public function setHeader($header, $value);", "private function normalize_header() {\n\t\tif (!$this->skeleton->built('header')) {\n\t\t\t$header = self::fetch('family_header', [':family_unit_id' => $this->id()]);\n\t\t}\n\t\telse {\n\t\t\t$header = $this->skeleton->get('header');\n\t\t\t$this->skeleton->rebuild('header');\n\t\t}\n\n\t\t$header['homogeneous'] = CK\\fn::check_flag($header['homogeneous']);\n\t\t$header['active'] = CK\\fn::check_flag($header['active']);\n\t\t$header['date_created'] = self::DateTime($header['date_created']);\n\n\t\t$this->skeleton->load('header', $header);\n\t}", "function setHeaders($headers){\n\t\t\n\t\tcurl_setopt($this->_curlHandler, CURLOPT_HTTPHEADER, $headers);\n\t}", "function setHeaders($headers) {\n $this->headers = $headers;\n }", "public function setHeader($headerArr)\r\n {\r\n $this->header = $headerArr;\r\n }", "function setHeader($hText) {\n $this->header = $hText;\n }", "function setHeader($baseType,$header='header'){\n\t\t$this->_header = $baseType. DS . $header;\n\t}" ]
[ "0.7714475", "0.7438785", "0.7114051", "0.7071004", "0.7025141", "0.70236564", "0.6945993", "0.68269396", "0.6819938", "0.6816485", "0.6759683", "0.6620099", "0.6608904", "0.66071296", "0.6579786", "0.65441567", "0.6530303", "0.6527895", "0.65092474", "0.6491057", "0.6466399", "0.6444067", "0.64392376", "0.6432507", "0.6428974", "0.64239305", "0.6410982", "0.6396505", "0.6364507", "0.63595736" ]
0.78656036
0
Sets the overwrite status.
public function setOverwrite($on = true) { $this->overwriteValue = (bool) $on; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOverwriteExisting($value){\n $this->overwriteExisting= $value;\n }", "public function overwrite($value) {\n $this->_overwrite = (bool) $value;\n }", "public function setOverwrite(bool $overwrite)\n {\n $this->overwrite = $overwrite;\n // cancel previous init\n $this->utmCookie = null;\n }", "#[@xmlmapping(element= '@overwrite')]\n public function setOverwrite($o) {\n $this->overwrite= ($o == 'true');\n }", "public function overwrite():bool\n {\n return $this->_overwrite;\n }", "public function overwriteFile($overwrite = true){\n\t\tif (!is_bool($overwrite)){\n\t\t\t$this->overwriteFile = false;\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\t$this->overwriteFile = $overwrite;\n\t\t}\n\t}", "public function overWriteFiles($bool = true) {\n $this->overwrite_files = $bool;\n }", "public function enableOverwriting($overwrite = true)\n {\n return $this->overwrite_enabled = (bool)$overwrite;\n }", "protected function setPermissionOverwritesAttribute(?array $overwrites): void\n {\n if ($overwrites) {\n $overwritesDiscrim = $this->overwrites->discrim;\n foreach ($overwrites as $overwrite) {\n $overwrite = (array) $overwrite;\n /** @var ?Overwrite */\n if ($overwritePart = $this->overwrites->offsetGet($overwrite[$overwritesDiscrim])) {\n $overwritePart->fill($overwrite);\n } else {\n /** @var Overwrite */\n $overwritePart = $this->overwrites->create($overwrite, $this->created);\n $overwritePart->created = &$this->created;\n }\n $this->overwrites->pushItem($overwritePart);\n }\n } else {\n if (null === nowait($this->overwrites->cache->clear())) {\n foreach ($this->overwrites->keys() as $key) {\n $this->overwrites->offsetUnset($key);\n }\n }\n }\n\n $this->attributes['permission_overwrites'] = $overwrites;\n }", "public function forceSetDirty(): void\n {\n $this->copy = -1;\n }", "public function setFailed()\n {\n $this->update(['status' => static::STATUS_FAILED]);\n }", "public function forceOverwrite(): self\n {\n $this->overwrite = true;\n\n return $this;\n }", "public function getOverwrite()\n\t{\n\t\treturn $this->overwriteValue;\n\t}", "private function setResponseStatus(): void\n {\n $httpStatusCode = match ($this->exception->getStatus()) {\n \"unauthorized\"=>HttpStatus::UNAUTHORIZED,\n \"forbidden\"=>HttpStatus::FORBIDDEN,\n \"not_found\"=>HttpStatus::NOT_FOUND,\n default=>HttpStatus::OK,\n };\n $this->response->setStatus($httpStatusCode);\n }", "public function markAsUnread(){\n if($this->getStatus() == self::STATUS_READ){\n $this->setStatus(self::STATUS_UNDREAD)->save();\n }\n }", "public function setNotModified() {\n $this->setStatusCode(self::STATUS_CODE_NOT_MODIFIED);\n $this->setView(null);\n\n $removeHeaders = array(\n Header::HEADER_ALLOW,\n Header::HEADER_CONTENT_ENCODING,\n Header::HEADER_CONTENT_LANGUAGE,\n Header::HEADER_CONTENT_LENGTH,\n Header::HEADER_CONTENT_MD5,\n Header::HEADER_CONTENT_TYPE,\n Header::HEADER_LAST_MODIFIED,\n );\n\n $this->headers->removeHeader($removeHeaders);\n }", "public function resetStatus(): void\n {\n $this->status = 0;\n }", "public function setStatus(?RecommendationStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "public function setInitialStatus(){\n $this->order->status()->attach(1, ['user_id'=>$this->vendor->user->id, 'comment'=>'Social Network order']);\n\n //Set automatically approved by admin - since it it social\n //$this->order->status()->attach(2, ['user_id'=>1, 'comment'=>__('Automatically approved by admin')]);\n }", "public function markAsRead()\n {\n $this->status = self::STATUS_READ;\n $this->save();\n }", "public function setIdempotencyLevel($var) {}", "public function changeStatus()\n {\n }", "public function changeStatus()\n {\n }", "public function changeStatus()\n {\n }", "public function changeStatus()\n {\n }", "public function markAsUnread()\n {\n $this->status = self::STATUS_UNREAD;\n $this->save();\n }", "public function setPending()\n {\n $this->status = self::STATUS_PENDING;\n $this->save();\n }", "public function setFailed()\n {\n \t$this->attributes['status'] = 'Gagal';\n \tself::save();\n }", "function setStatus(){\r\n\t\t$role_id=decodeId($this->uri->segment(4,null));\r\n\t\t$role_status=decodeId($this->uri->segment(5,null));\r\n\t $role_default=$this->uri->segment(6,null);\r\n\t\tif(!$this->role->isRoleVerified($role_id)){ // if not Available Location\r\n\t\t\tset_flash_message(ROLE_VERIFICATION_FAILED,'error');\r\n\t\t\tredirect(\"admincms/roles/\");\r\n\t\t}\r\n\t\tif($role_default==FALSE){\r\n\t\t$data=array('is_active'=>$role_status);\t\t\t\t\t\t\r\n\t\t$this->general->updateData(TBL_MST_ROLES,array('id'=>$role_id),$data);\t\t\r\n\t\tredirect(\"admincms/roles/\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tset_flash_message(OPS_THE_DEFAULT_FIELD_IS_ACTIVE,'error');\r\n\t\t\tredirect(\"admincms/roles/\");\r\n\t\t\t\r\n\t\t\t}\r\n\t}", "function setOverritePic($value)\n {\n $this->_overritePic = $value;\n }" ]
[ "0.7057387", "0.67240673", "0.624619", "0.6077294", "0.6014798", "0.5869199", "0.56973255", "0.56561583", "0.5544757", "0.5412085", "0.5392445", "0.53541493", "0.52463984", "0.5153173", "0.50966024", "0.5076234", "0.5059699", "0.504547", "0.5018686", "0.49978566", "0.4996364", "0.4994831", "0.4994831", "0.4994831", "0.4994831", "0.49932522", "0.4984537", "0.49829692", "0.4971868", "0.49625945" ]
0.6777807
1
Sets the default sorting method for this column.
public function setSortingMethod($sort = 'asc') { $this->sortingMethod = SpoonFilter::getValue($sort, array('asc', 'desc'), 'asc'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSortingMethod()\n\t{\n\t\treturn $this->sortingMethod;\n\t}", "public function get_sort_default_column() {\r\n\t\treturn 'name';\r\n\t}", "public function getDefaultSortField()\n {\n return $this->defaultSortField;\n }", "private function setSort()\n\t{\n\t\treturn isset($this->field['sort']) ? $this->field['sort'] : 0;\n\t}", "public function getDefaultSortField(): string;", "public function getDefaultSortField(): string;", "public function configureSorting()\n {\n $this->orderable = is_string($this->orderable) ? $this->orderable : \n ($this->orderable === true ? 'order' : false);\n if($this->orderable){\n $this->orderBy = array_merge([$this->orderable => 'ASC'], $this->orderBy);\n $this->data(['orderableRoute' => route('vuravel-catalog.order')]);\n }\n }", "public function disableDefaultSort()\n {\n $this->addDefaultSort = false;\n return $this;\n }", "function getDefaultSortingField()\n {\n return 'name';\n }", "public function getDefaultSort()\n\t{\n\t\treturn $this->_defaultSort;\n\t}", "protected function applyDefaultSorts()\n {\n }", "public function setDefaultSorting($column, $sorting = 'ASC') {\n\t\tif (empty($this->orderBy)) {\n\t\t\t$this->sort($column, $sorting);\n\t\t}\n\t}", "protected function applyDefaultSorting(): void\n {\n // At least 1 default value is needed\n if ($this->defaultOrderByMethod === null && $this->defaultOrder === null) {\n return;\n }\n\n add_action('pre_get_posts', function (WP_Query $query) {\n if (! $this->adminPageMatches($query)) {\n return;\n }\n\n // Apply the default 'orderby' method, if it's set\n if (trim($query->get('orderby')) === '' && $this->defaultOrderByMethod !== null) {\n $query->set('orderby', $this->defaultOrderByMethod);\n }\n\n // Apply the default 'order' value, if it's set\n if (trim($query->get('order')) === '' && $this->defaultOrder !== null) {\n $query->set('order', $this->defaultOrder);\n }\n }, 9);\n }", "public static function getSortingType() {\n if (isset($_GET[\"sorting\"])){\n return $_GET[\"sorting\"];\n }\n\n return \"ASC\";\n }", "public function set_order_by($value){$this->_order_by = $value;}", "public function setDefaultSort($column, $order = sfGrid::ASC)\n {\n $this->defaultSortColumn = $column;\n $this->defaultSortOrder = $order;\n }", "private function setSortingOptions(): void\n {\n // default URL\n if (BackendModel::getContainer()->get('url')) {\n $this->setURL(\n BackendModel::createUrlForAction(\n null,\n null,\n null,\n ['offset' => '[offset]', 'order' => '[order]', 'sort' => '[sort]'],\n false\n )\n );\n }\n\n // sorting labels\n $this->setSortingLabels(\n BackendLanguage::lbl('SortAscending'),\n BackendLanguage::lbl('SortedAscending'),\n BackendLanguage::lbl('SortDescending'),\n BackendLanguage::lbl('SortedDescending')\n );\n }", "public function getDefaultSort()\n {\n return ['id', 'desc'];\n }", "public static function getDefaultSorting()\n {\n return ['id'];\n }", "public function sortKeyType()\n {\n return 'string';\n }", "protected function setQueryOrderBy(){\n\n // if search order_by is set then set as new value\n if ( $this->hasInput('order_by') && $this->getInput('order_by') != \"\" ){\n\n // overide default order_method\n if ( $this->getInput('order_method') == \"desc\" ){\n $this->order_method = \"desc\";\n } else if($this->getInput('order_method') == \"asc\"){\n $this->order_method = \"asc\";\n }\n\n // check if chosen order_by is exists in the columns properties\n if ( array_key_exists( $this->getInput('order_by'),$this->columns ) ){\n $this->order_by = $this->getInput('order_by');\n }\n }\n\n if (!empty($this->order_by) && !empty($this->order_method)){\n // just set the default order query string\n // just like: order by column_name desc\n $this->query->orderBy($this->order_by,$this->order_method);\n }\n\n }", "public function setDefaultSort( $value )\n\t{\n\t\t$this->_defaultSort = $value;\n\t\treturn $this;\n\t}", "public function setSortColumn($value)\n {\n $this->sortColumn = $value;\n }", "protected function getSortFieldName()\n {\n return 'orderby';\n }", "public function setDefaultSortField($defaultSortField)\n {\n $this->defaultSortField = $defaultSortField;\n }", "public static function getDefaultOrderBy() {\n $orderField = c('Vanilla.Discussions.SortField', self::DEFAULT_ORDER_BY_FIELD);\n $orderDirection = c('Vanilla.Discussions.SortDirection', 'desc');\n\n // Normalize any prefixed fields\n if (strpos($orderField, 'd.') === 0) {\n $orderField = substr($orderField, 2);\n }\n\n return [$orderField => $orderDirection];\n }", "protected function sort()\n {\n $column = $this->columns[$this->request->get(\"order\")[0][\"column\"]];\n $direction = $this->request->get(\"order\")[0][\"dir\"];\n\n if ($column->orderable) {\n $this->query()->orderBy($column->name, $direction);\n }\n }", "public function getSortColumn(): string\n {\n return $this->sortColumn;\n }", "public function getSortColumn()\n {\n return $this->sortColumn;\n }", "public function setSort($sort = null)\n\t{\n\t\t$sort = $sort && \\is_array($sort) ? $sort : $this->config->getOption('sort');\n\n\t\t//set the sort values\n\t\t$this->sort = array(\n\t\t\t'field' => $sort['field'] ?? $this->config->getDataModel()->getKeyName(),\n\t\t\t'direction' => $sort['direction'] ?? 'desc',\n\t\t);\n\n\t\t//if the sort direction isn't valid, set it to 'desc'\n\t\tif (!\\in_array($this->sort['direction'], array('asc', 'desc')))\n\t\t{\n\t\t\t$this->sort['direction'] = 'desc';\n\t\t}\n\t}" ]
[ "0.715437", "0.64122075", "0.6388146", "0.63860655", "0.6371542", "0.6371542", "0.63216424", "0.62905645", "0.6283753", "0.62622845", "0.6210392", "0.61986697", "0.6188695", "0.60320425", "0.60303956", "0.6027465", "0.60157937", "0.5929839", "0.5912775", "0.59080654", "0.5878189", "0.58109224", "0.57824546", "0.57731944", "0.5735736", "0.5731537", "0.57193494", "0.5715282", "0.5686688", "0.567822" ]
0.68562174
1
Loops the entirety of the file and, per loop, tries to generate the identifiable element from it. Each element is added to the array of primary elements located within this object. Each primary element can hold a list of children than, by themselves, can also contain a list of children and so on
public function build() { foreach ($this->fileContents as $key => $element) { if ($this->generatePrimaryElements($element, $key)) continue; $this->generateArrayBasedElements($element, false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function populateElements() {\n foreach ($this->data as $row) {\n $this->elements[] = new ChildColonyInfo($row);\n }\n }", "private function add_taxa_from_undeclared_parent_ids() //text file here is generated by utility check_if_all_parents_have_entries() in 26.php\n { $file = CONTENT_RESOURCE_LOCAL_PATH . \"26_files/\" . $this->resource_id . \"_undefined_parent_ids_archive.txt\";\n if(file_exists($file)) {\n $i = 0;\n foreach(new FileIterator($file) as $line_number => $id) {\n $i++;\n $taxa = self::AphiaClassificationByAphiaID($id);\n self::create_taxa($taxa);\n }\n }\n // else exit(\"\\n[$file] does not exist.\\n\");\n }", "function parseEntries($_eidArrayArr, &$_entryDataArr, &$_childrenArr)\n{\n global $missing;\n\n if (empty($_eidArrayArr))\n throw new \\Exception(\"array is empty\");\n\n echo \"parsing...\";\n $missingCnt = 0;\n $parentLveid = array();\n foreach ($_eidArrayArr as $entryeid => $key) {\n try {\n $fileName = TmpDir . DIR_SEP . 'entry_' . $entryeid . '.html';\n// echo \"\\n\",$entryeid;\n $_entryDataArr[$entryeid] = \\Parser\\parseEntryPage($fileName);\n if ($_entryDataArr[$entryeid] === false) {\n echo '\\n' . '!';\n $missing[$entryeid] = true;\n continue;\n }\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n /*Note : the entries cited by THIS entry is the parent\n */\n foreach ($_entryDataArr[$entryeid]['citation'] as $parenteid => $info) {\n $parentLveid[$parenteid] = true; // mark as existance at next level\n if (!isset($_childrenArr[$parenteid])) {\n $_childrenArr[$parenteid] = array();\n }\n $_childrenArr[$parenteid][$entryeid] = true; //add children(THIS) to parent\n }\n }\n echo \"missing $missingCnt\\n\";\n return $parentLveid;\n}", "private function fillFilesArray()\n {\n // Get all files inside pages folder\n// $this->path = $path;\n// $this->path = 'src/pages';\n $files = scandir($this->path);\n\n // If debug flag is set, divert to printing arrays in courses folder\n if($this->isDebug) {\n// $this->testFileArray( $files );\n $this->readFolder( $this->path, $this->directoryLevel );\n $this->readArrays();\n return;\n }\n\n // Remove . and ..\n $files = array_diff(scandir($this->path), array('.', '..'));\n\n foreach($files as $file) {\n array_push($this->files, $file);\n }\n\n // Instantiate all page classes and store them in array\n foreach($this->files as $file) {\n\n // Check if the file should be ignored\n if( !is_dir($file) && $file != 'template.php' && $file != 'GenericPage.php') {\n\n // If not, require it to get it into the project\n require_once __DIR__ . '/../pages/' . $file;\n// require_once __DIR__ . '/../pages/' . $file;\n// require_once $file;\n\n\n // Strip the extension off the filename\n $classNameArray = explode(\n '.',\n $file\n );\n\n $class = 'J\\\\ClassNotes\\\\' . $classNameArray[0];\n\n\n $newPage = new $class($classNameArray[0]);\n\n // Add the object to the array\n array_push(\n $this->pages,\n $newPage\n );\n }\n }\n }", "function _create_elements($current){\n $schema = array();\n $elements = $current->xpath('xsd:element|xsd:sequence');\n foreach($elements as $element){\n if($element->getName() == 'element'){\n $vars = get_object_vars($element);\n $attributes = $vars['@attributes'];\n if(isset($attributes['type'])){\n $schema[$attributes['name']] = $this->_get_type($attributes['type']);\n }else{\n // Look for in-line type definition\n $inline = $element->xpath('xsd:complexType');\n if(count($inline) > 0){\n if(count($inline) > 1){throw new Exception(\"Invalid XSD schema: more than one inline complexType\");}\n $inline_type = array_shift($inline);\n $schema[$attributes['name']] = $this->_parse_complex_type($inline_type, $attributes['name']);\n }else{\n // Simple value\n $schema[$attributes['name']] = array();\n }\n }\n if(isset($attributes['minOccurs']) && $attributes['minOccurs'] != 1){\n $schema[$attributes['name']]['#min_occurence'] = $attributes['minOccurs'] == \"unbounded\" ? -1 : intval($attributes['minOccurs']);\n }\n if(isset($attributes['maxOccurs']) && $attributes['maxOccurs'] != 1){\n $schema[$attributes['name']]['#max_occurence'] = $attributes['maxOccurs'] == \"unbounded\" ? -1 : intval($attributes['maxOccurs']);\n }\n }else if($element->getName() == 'sequence'){\n // A sequence of elements, indicating a repeat within the parent tag.\n // XXX we need to handle this properly - as this is actually wrong. The sequence has it's own minOccurs/maxOccurs.\n // We'd need a '#sequence' element.\n $schema = array_merge($schema, $this->_create_elements($element));\n }else{\n throw new Exception('Unsuported element type within flow : ' . $element->getName());\n }\n }\n return $schema;\n }", "function generate_contents(&$code)\r\n\t{\r\n\t\tforeach(array_keys($this->children) as $key)\r\n\t\t{\r\n\t\t\t$this->children[$key]->generate($code);\r\n\t\t} \r\n\t}", "function generateChildren(&$code) {\r\n foreach ( array_keys($this->children) as $key ) {\r\n $this->children[$key]->generate($code);\r\n $tmpName = $this->children[$key]->tmpName;\r\n if ( preg_match('/^[0-9]+$/',$key) ) {\r\n $code->append(\"{$this->tmpName}[$key] = $tmpName;\");\r\n } else {\r\n $code->append(\"{$this->tmpName}.$key = $tmpName;\");\r\n }\r\n }\r\n }", "public function loadElements() {\n\t\t\n\t\t$this->albums = array();\n\t\t$this->files = array();\n\t\t\n\t\t/* this is clean if this is a subdirectory which is not the config or thumb directory */\n\t\t// $cleanLocation = count($this->album) && $this->album[0] !== $this->lonely->configDir && $this->album[0] !== $this->lonely->thumbDir;\n\t\t$cleanLocation = count($this->album) && !in_array($this->lonely->configDirectoryName, $this->album) && $this->album[0] !== $this->lonely->thumbDirectoryName;\n\t\t\n\t\t/* go through each element */\n\t\t$dir = opendir($this->location);\n\t\twhile (($filename = readdir($dir)) !== false) {\n\t\t\t\n\t\t\t/* skip files starting with a dot or a minus */\n\t\t\t// if ($filename[0] == '.' || $filename[0] == '-') {\n\t\t\tif ($this->lonely->isHiddenName($filename)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* get location */\n\t\t\t$location = $this->location.$filename;\n\t\t\t\n\t\t\t/* the element must not be in the config or thumb directory */\n\t\t\tif (!$cleanLocation && (strpos($location.DIRECTORY_SEPARATOR, $this->lonely->configDir) === 0 || strpos($location.DIRECTORY_SEPARATOR, $this->lonely->thumbDir) === 0)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* check if link */\n\t\t\t// if (is_link($location)) {\n\t\t\t\t// /* change location to the linked location */\n\t\t\t\t// $location = readlink($location);\n\t\t\t\t// /* skip if new location is not within the gallery's root directory */\n\t\t\t\t// if (strpos($location.DIRECTORY_SEPARATOR, $this->lonely->rootDir) !== 0) {\n\t\t\t\t\t// continue;\n\t\t\t\t// }\n\t\t\t// }\n\t\t\t\n\t\t\tswitch (filetype($location)) {\n\t\t\t\t\n\t\t\t\tcase 'dir':\n\t\t\t\t\t/* must not be config directory */\n\t\t\t\t\t// if ($filename !== $this->lonely->configDirectoryName) {\n\t\t\t\t\tif (!$this->lonely->isHiddenAlbumName($filename)) {\n\t\t\t\t\t\t$album = new self($this->lonely, array_merge($this->album, array($filename)), $this);\n\t\t\t\t\t\t$this->albums[$filename] = $album;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'file':\n\t\t\t\t\tif (!$this->lonely->isHiddenFileName($filename)) {\n\t\t\t\t\t\t$file = LonelyFileFactory::create($filename, $this);\n\t\t\t\t\t\tif ($file) {\n\t\t\t\t\t\t\t$this->files[$filename] = $file;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t/* sort alphabetically */\n\t\tksort($this->albums);\n\t\tksort($this->files);\n\t\t\n\t}", "function import_exercise($file)\n{\n \n global $exercise_info;\n global $element_pile;\n global $non_HTML_tag_to_avoid;\n global $record_item_body;\n global $backlog_message;\n\n //get required table names\n\n $tbl_cdb_names = claro_sql_get_course_tbl();\n $tbl_quiz_exercise = $tbl_cdb_names['qwz_exercise'];\n $tbl_quiz_question = $tbl_cdb_names['qwz_question'];\n\n //set some default values for the new exercise\n\n $exercise_info = array();\n $exercise_info['name'] = preg_replace('/.zip$/i','' ,$file);\n $exercise_info['description'] = get_lang('undefined description');\n $exercise_info['question'] = array();\n $element_pile = array();\n $backlog_message = array();\n\n //create parser and array to retrieve info from manifest\n\n $element_pile = array(); //pile to known the depth in which we are\n $module_info = array(); //array to store the info we need\n\n //unzip the uploaded file in a tmp directory\n\n $exercisePath = get_and_unzip_uploaded_exercise();\n\n //find the different manifests for each question and parse them.\n\n $exerciseHandle = opendir($exercisePath);\n\n //find each question repository in the uploaded exercise folder\n\n array_push ($backlog_message, get_lang('XML question files found : '));\n\n $question_number = 0;\n\n //used to specify the question directory where files could be found in relation in any question\n\n global $questionTempDir;\n\n\n //1- parse the parent directory\n\n $questionHandle = opendir($exercisePath);\n\n while (false !== ($questionFile = readdir($questionHandle)))\n {\n if (preg_match('/.xml$/i' ,$questionFile))\n {\n array_push ($backlog_message, get_lang(\"XML question file found : \".$questionFile));\n parse_file($exercisePath, '', $questionFile);\n }//end if xml question file found\n }//end while question rep\n\n\n //2- parse every subdirectory to search xml question files\n\n while (false !== ($file = readdir($exerciseHandle)))\n {\n\n if (is_dir($exercisePath.$file) && $file != \".\" && $file != \"..\")\n {\n //find each manifest for each question repository found\n\n $questionHandle = opendir($exercisePath.$file);\n\n while (false !== ($questionFile = readdir($questionHandle)))\n {\n if (preg_match('/.xml$/i' ,$questionFile))\n {\n parse_file($exercisePath, $file, $questionFile);\n }//end if xml question file found\n }//end while question rep\n } //if is_dir\n }//end while loop to find each question data's\n\n\n //Display data found\n\n\tarray_push ($backlog_message, 'Exercise name : <b>' . $exercise_info['name'] . '</b>');\n\tarray_push ($backlog_message, 'Exercise description : ' . $exercise_info['description']);\n\n foreach ($exercise_info['question'] as $key => $question)\n {\n $question_number++;\n array_push ($backlog_message, '<b>'.$question_number.'-</b> Question found (' .$key. ') : <b>' . $question['title'] . '</b>');\n\t\tif (isset($question['statement'])) array_push ($backlog_message, '* Statement : ' . $question['statement']);\n\t\tarray_push ($backlog_message, '* Type : ' . $question['type']);\n\t\t\n\t\tforeach ($exercise_info['question'][$key]['answer'] as $answer)\n\t\t{\t\n if ($question['type']==\"MATCHING\")\n {\n array_push ($backlog_message, '** Matchset : ');\n foreach ($answer as $matchSetElement)\n {\n array_push ($backlog_message, '*** Element ' . $matchSetElement);\n }\n }\n else\n {\n array_push ($backlog_message, '** Answer found : ' . $answer['value']);\n if (isset($answer['feedback'])) array_push ($backlog_message, '*** Answer feedback : ' . $answer['feedback']);\n }\n\t\t}\n\n if (isset($question['weighting']))\n {\n array_push ($backlog_message, '* WEIGHTING for Answers :');\n foreach ($question['weighting'] as $key => $weighting)\n {\n array_push ($backlog_message, '** Answer : '.$key.' ==> weighting : '.$weighting);\n }\n }\n\n if (isset($question['correct_answers']))\n {\n array_push ($backlog_message, '* CORRECT ANSWERS :');\n foreach ($question['correct_answers'] as $answerIdent)\n {\n array_push ($backlog_message, '* Answer : '.$answerIdent);\n }\n }\n\n\t\tif (isset($question['response_text']))\n {\n array_push ($backlog_message, '* Text to fill in : '.$question['response_text'] );\n }\n }\n\n //---------------------\n //add exercise in tool\n //---------------------\n\n //1.create exercise\n\n $exercise = new Exercise();\n\n $exercise->setTitle($exercise_info['name']);\n $exercise->setDescription($exercise_info['description']);\n\n if ($exercise->validate())\n {\n $exercise_id = $exercise->save();\n }\n else\n {\n array_push ($backlog_message, 'EXERCISE DATA INVALID !!!');\n }\n\n //For each question found...\n\n foreach($exercise_info['question'] as $key => $question_array)\n {\n //2.create question\n\n $question = new ImsQuestion();\n\n if (isset($question_array['title'])) $question->setTitle($question_array['title']);\n if (isset($question_array['statement'])) $question->setDescription($question_array['statement']);\n $question->setType($question_array['type']);\n\n if ($question->validate())\n { \n $question_id = $question->save();\n\n if ($question_id)\n {\n //3.create answers\n \n $question->setAnswer();\n $question->import($exercise_info['question'][$key], $exercise_info['question'][$key]['tempdir']);\n $exercise->addQuestion($question_id);\n $question->answer->save();\n $question->save();\n }\n else\n {\n array_push ($backlog_message, 'IMPOSSIBLE TO SAVE QUESTION !!!');\n }\n }\n else\n {\n array_push ($backlog_message, 'QUESTION DATA INVALID !!!');\n }\n }\n $link = \"<center><a href=\\\"../exercise_submit.php?exId=\".$exercise_id.\"\\\">\".get_lang('See the exercise').\"</a></center>\";\n array_push ($backlog_message, $link);\n\n //delete the temp dir where the exercise was unzipped\n\n claro_delete_file($exercisePath);\n\n return $backlog_message;\n}", "private function _processHierarchy() {\n foreach ($this->files as $file) {\n // Remove file extensions. We will add them in as we create the links to\n // preserve hierarchy.\n $file = str_replace('.md', '', $file);\n\n // Split into hierarchy.\n $parts = explode($this->separator, $file);\n $this->_buildHierarchy($this->content, $parts);\n }\n }", "private function loadElements() {\n\t\t$template_metadata = $this->getTemplate()->getMetadata();\n\t\t$this->elements = array();\n\t\t$counter = 0;\n\t\tforeach($template_metadata['regions'] as $region) {\n\t\t\t$this->regions[$region] = array();\n\t\t\t// Only iterate over regions defined in the app\n\t\t\tif(!array_key_exists($region, $this->configuration['elements'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tforeach($this->configuration['elements'][$region] as $name => $element) {\n\t\t\t\t// Extract and unset class, so we can use the remains as configuration\n\t\t\t\t$class = $element['class'];\n\t\t\t\tunset($element['class']);\n\t\t\t\t$id = sprintf($this->element_id_template, $counter++);\n\t\t\t\t$this->regions[$region][] = new $class($id, $name, $element, $this);\n\t\t\t}\n\t\t}\n\t}", "private function importTerms($TermsElement, $pids = array()) {\n\n $parents = array();\n\n foreach ($TermsElement as $term) {\n\n $termAttributes = $term->attributes();\n\n // Do not import disabled terms\n if ($termAttributes['enabled'] == 'false' && drupal_is_cli() && function_exists('drush_main')) {\n drush_log('skipped disabled term: ' . $termAttributes['id'], 'warning');\n continue;\n }\n\n // If it has children, also import them.\n if (isset($term->term)) {\n $child_pids = $pids;\n $child_pids['p' . (count($pids) + 1)] = (string) $termAttributes['id'];\n $this->importTerms($term->term, $child_pids);\n }\n\n $parentId = trim((string) $termAttributes['parentid']);\n $parents[(string) $termAttributes['id']] = $parentId;\n\n $record = array(\n 'tid' => (string) $termAttributes['id'],\n 'language' => LANGUAGE_NONE,\n 'name' => (string) $termAttributes['label'],\n 'did' => (string) $termAttributes['domain'],\n 'parent' => empty($parentId) ? $parentId : NULL,\n 'show_term' => $termAttributes['show'] == 'true' ? 1 : 0,\n 'slug' => culturefeed_search_slug((string) $termAttributes['label'], 128),\n );\n\n $record += $pids;\n\n // Get all the parent ids (p1, p2, p3...)\n /* if (!empty($parentId)) {\n $parentWasTerm = TRUE;\n $currTerm = $term;\n $termParents = array();\n\n // Loop through parents untill we find a non-term node.\n while ($parentWasTerm) {\n\n // Get parent of current term, and check if it's also a term.\n $parent_node = $currTerm->xpath('parent::*');\n $parent = $parent_node[0];\n if (!$parent) {\n break;\n }\n\n if ($parent->getName() == 'term') {\n $termParents[] = (string) $parent->attributes()->id;\n $currTerm = $parent;\n }\n else {\n $parentWasTerm = FALSE;\n }\n }\n\n foreach ($termParents as $i => $id) {\n $record['p' . ($i + 1)] = $id;\n }\n\n } */\n\n // Always save label as undefined language so we can fallback.\n $this->logMessages[] = array(\n 'message' => 'Imported term ' . $record['name'] . ' ' . $parentId . ' for domain ' . $record['did'],\n 'code' => 'success'\n );\n drupal_write_record('culturefeed_search_terms', $record);\n\n // Import other languages.\n foreach (array('nl', 'en', 'de', 'fr') as $language) {\n $key = 'label' . $language;\n if (isset($termAttributes[$key]) && !empty($termAttributes[$key])) {\n $record['language'] = $language;\n $record['name'] = (string) $termAttributes[$key];\n drupal_write_record('culturefeed_search_terms', $record);\n\n $this->logMessages[] = array(\n 'message' => 'Imported term ' . $record['name'] . ' ' . $parentId . ' in language ' . $record['language'],\n 'code' => 'success'\n );\n\n }\n }\n }\n\n }", "protected function define_structure() {\n $userinfo = $this->get_setting_value('userinfo');\n\n // Define each element separated\n $sloodle = new backup_nested_element('sloodle', \n array('id'), \n array(\n 'course',\n 'type',\n 'name',\n 'intro',\n 'introformat',\n 'timecreated',\n 'timemodified'\n )\n );\n\n $trackers = new backup_nested_element('trackers');\n $tracker = new backup_nested_element('tracker',\n array('id'),\n array(\n 'sloodleid',\n )\n );\n\n\n $distributors = new backup_nested_element('distributors');\n $distributor = new backup_nested_element('distributor',\n array('id'),\n array(\n 'sloodleid',\n 'channel',\n 'timeupdated'\n )\n );\n\n $presenters = new backup_nested_element('presenters');\n $presenter = new backup_nested_element('presenter',\n array('id'),\n array(\n 'sloodleid',\n 'framewidth',\n 'frameheight'\n )\n );\n\n $presenterentries = new backup_nested_element('presenter_entries');\n $presenterentry = new backup_nested_element('presenter_entry',\n array('id'),\n array(\n 'sloodleid',\n 'name',\n 'source',\n 'type', \n 'ordering'\n )\n );\n\n $controllers = new backup_nested_element('controllers');\n $controller = new backup_nested_element('controller',\n array('id'),\n array(\n 'sloodleid',\n 'enabled',\n 'password'\n )\n );\n\n $layouts = new backup_nested_element('layouts');\n $layout = new backup_nested_element('layout',\n array('id'),\n array(\n 'course',\n 'name',\n 'timeupdated',\n 'controllerid'\n )\n );\n\n $layoutentries = new backup_nested_element('layout_entries');\n $layoutentry = new backup_nested_element('layout_entry',\n array('id'),\n array(\n 'layout',\n 'name',\n 'position',\n 'rotation'\n )\n );\n\n $layoutentryconfigs = new backup_nested_element('layout_entry_configs');\n $layoutentryconfig = new backup_nested_element('layout_entry_config',\n array('id'),\n array(\n 'layout_entry',\n 'name',\n 'value' \n )\n ); \n\n $sloodlecurrencytypes = new backup_nested_element('currency_types');\n $sloodlecurrencytype = new backup_nested_element('currency_type',\n array('id'),\n array(\n 'name',\n 'timemodified',\n 'imageurl',\n 'displayorder'\n )\n );\n\n $sloodleusers = new backup_nested_element('users');\n $sloodleuser = new backup_nested_element('user',\n array('id'),\n array(\n 'userid',\n 'uuid',\n 'avname',\n 'profilepic',\n 'lastactive'\n )\n );\n\n $sloodle->add_child($controllers);\n $controllers->add_child($controller);\n $controller->add_child($layouts);\n $layouts->add_child($layout);\n $layout->add_child($layoutentries);\n $layoutentries->add_child($layoutentry);\n\n $layoutentry->add_child($layoutentryconfigs);\n $layoutentryconfigs->add_child($layoutentryconfig);\n\n $distributors->add_child($distributor);\n $sloodle->add_child($distributors);\n\n $trackers->add_child($tracker);\n $sloodle->add_child($trackers);\n\n $presenterentries->add_child($presenterentry);\n $presenter->add_child($presenterentries);\n $presenters->add_child($presenter);\n $sloodle->add_child($presenters);\n\n\n if ($userinfo) {\n $sloodleusers->add_child($sloodleuser);\n $sloodle->add_child($sloodleusers);\n }\n\n $sloodlecurrencytypes->add_child($sloodlecurrencytype);\n $sloodle->add_child($sloodlecurrencytypes);\n\n // Build the tree\n \n // Define sources\n $sloodle->set_source_table('sloodle', array('id' => backup::VAR_ACTIVITYID));\n\n /*\n Neither of these tables link directly to a course or controller.\n However, they may be referenced by other things that are in a controller, so we can't leave them out.\n There will need to be some restore code in the to do something sensible with these on load.\n */\n $sloodleuser->set_source_table('sloodle_users', array());\n $sloodlecurrencytype->set_source_table('sloodle_currency_types', array());\n //$sloodleuser->set_source_sql(\"SELECT * FROM {sloodle_users} ORDER BY id\", array());\n\n\n if ($userinfo) {\n }\n $distributor->set_source_table('sloodle_distributor', array('sloodleid' => backup::VAR_ACTIVITYID));\n $tracker->set_source_table('sloodle_tracker', array('sloodleid' => backup::VAR_ACTIVITYID));\n $presenter->set_source_table('sloodle_presenter', array('sloodleid' => backup::VAR_ACTIVITYID));\n $presenterentry->set_source_table('sloodle_presenter_entry', array('sloodleid' => backup::VAR_ACTIVITYID));\n $controller->set_source_table('sloodle_controller', array('sloodleid' => backup::VAR_ACTIVITYID));\n $layout->set_source_table('sloodle_layout', array('controllerid' => backup::VAR_MODID));\n $layoutentry->set_source_table('sloodle_layout_entry', array('layout' => backup::VAR_PARENTID));\n $layoutentryconfig->set_source_table('sloodle_layout_entry_config', array('layout_entry' => backup::VAR_PARENTID));\n\n /*\n $layout->set_source_sql(\n 'SELECT * FROM {sloodle_layout} WHERE controllerid = ?',\n array(backup::VAR_MODID)\n );\n */\n\n // Define id annotations\n $sloodleuser->annotate_ids('sloodle_user', 'userid');\n \n // Define file annotations\n //mod_sloodle | presenter | 8 \n $presenter->annotate_files('mod_sloodle', 'presenter', null);\n \n // Return the root element (sloodle), wrapped into standard activity structure\n return $this->prepare_activity_structure($sloodle);\n \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 parse_ids() {\n $i=0;\n if ($this->simplexml) {\n $this->simplexml->registerXPathNamespace('frx', FRX_NS);\n $frx_attributes = array();\n $frx_nodes = $this->simplexml->xpath('body//*[@frx:*]');\n\n if ($frx_nodes) foreach ($frx_nodes as $node) {\n $attr_nodes = $node->attributes(FRX_NS);\n if ($attr_nodes) {\n // Make sure every element has an id\n $i++;\n $id = 'forena-' . $i;\n\n if (!(string)$node['id']) {\n $node->addAttribute('id', $id);\n\n }\n else {\n if (strpos((string)$node['id'], 'forena-')===0) {\n // Reset the id to the numerically generated one\n $node['id'] = $id;\n }\n else {\n // Use the id of the element\n $id = (string)$node['id'];\n }\n }\n\n // Save away the frx attributes in case we need them later.\n $attr_nodes = $node->attributes(FRX_NS);\n $attrs = array();\n if ($attr_nodes) foreach ($attr_nodes as $key => $value) {\n $attrs[$key] = (string)$value;\n }\n // Save away the attributes\n $frx_attributes[$id] = $attrs;\n }\n }\n\n $this->frx_attributes = $frx_attributes;\n }\n }", "protected function define_structure () {\n\n $paths = array();\n // To know if we are including userinfo\n $userinfo = $this->get_setting_value('userinfo');\n\n\n // Define each element separated\n $paths[] = new restore_path_element('iassign', '/activity/iassign');\n $paths[] = new restore_path_element('iassign_statement', '/activity/iassign/statements/statement');\n\n\n\n if($userinfo) {\n $iassign_submissions = new restore_path_element('iassign_submission', '/activity/iassign/statements/statement/iassign_submissions/iassign_submission');\n $paths[] = $iassign_submissions;\n $iassign_submission_comments = new restore_path_element('iassign_submission_comment', '/activity/iassign/statements/statement/iassign_submissions/iassign_submission/iassign_submission_comments/iassign_submission_comment');\n $paths[] = $iassign_submission_comments;\n }\n return $this->prepare_activity_structure($paths);\n }", "function pre_parent_basal_values()\n {\n $recs['page_ids_Present'] = 'http://eol.org/schema/terms/Present';\n $recs['page_ids_Habitat'] = 'http://eol.org/schema/terms/Habitat';\n $recs['page_ids_FLOPO_0900032'] = 'http://purl.obolibrary.org/obo/FLOPO_0900032';\n foreach($recs as $table => $predicate) {\n //truncate first\n $sql = \"TRUNCATE TABLE SDR.\".$table.\";\";\n if($result = $this->mysqli->query($sql)) echo \"\\nTable truncated [$table] OK.\\n\";\n //insert data\n /* commented 2019Nov11. Can no longer accommodate big files, memory-wise I think. Used manual, notes in SDR_all_readmeli.txt.\n $sql = \"INSERT INTO SDR.\".$table.\" SELECT DISTINCT t.page_id from SDR.traits_BV t WHERE t.predicate = '\".$predicate.\"'\";\n if($result = $this->mysqli->query($sql)) echo \"\\nTable updated [$table] OK.\\n\";\n else {\n echo \"\\nsomething went wrong: [$table]\\n\";\n print_r($result);\n }\n */\n /* Jun 23, 2020. Removed manual step. All are now scripted.\n step1: save unique page_id in a text file\n step2: insert to respective tables\n */\n //step1: save unique page_id in a text file\n $sql = \"SELECT t.page_id from SDR.traits_BV t WHERE t.predicate = '\".$predicate.\"'\";\n $result = $this->mysqli->query($sql);\n $page_ids = array();\n while($result && $rec=$result->fetch_assoc()) $page_ids[$rec['page_id']] = '';\n $page_ids = array_keys($page_ids);\n $destination = $this->main_dir.\"/\".$this->MySQL_append_files_dir.\"/$table\".\".txt\";\n if(!($WRITE = Functions::file_open($destination, \"w\"))) return;\n fwrite($WRITE, implode(\"\\n\", $page_ids). \"\\n\"); fclose($WRITE);\n //step2: insert to respective tables\n self::append_to_MySQL_table($table, $destination);\n echo \"\\nTotal rows [$table]: \".self::count_table_rows($table).\"\\n\";\n }\n }", "public function add()\n {\n $new_record = array();\n foreach ($this->internalTemplateNode->__items as $key => $node) {\n if ($node->isContainer()) {\n // validate child nodes, nesting not supported in this version.\n throw new \\Exception(\"Unsupported copy, Array doesn't support nesting.\");\n }\n $new_record[$key] = clone $node ;\n }\n\n $container_node = new ContainerField(\n $this->__reference . \".\" . $this->internalArrayCounter,\n $this->internalXMLTagName\n );\n\n foreach ($new_record as $key => $node) {\n // initialize field with new internal id and defined default value\n $node->setInternalReference($container_node->__reference.\".\".$key);\n $node->applyDefault();\n $container_node->addChildNode($key, $node);\n }\n\n // make sure we have a UUID on repeating child items\n $container_node->setAttributeValue(\"uuid\", $this->generateUUID());\n\n // add node to this object\n $this->addChildNode(null, $container_node);\n\n return $container_node;\n }", "function preencheDados() { \r\n\r\n\r\n /* echo 'No!! ' . $no;\r\n $x1 = $no1->getMyLevel() . $no1->getMyId();\r\n echo 'x = '. $x1;\r\n */\r\n\r\n //Create our ArrayList\r\n $nodes = new ArrayList();\r\n $no1 = new NoFolha('00', \"Tag 1\");\r\n echo $no1->getComposedID() . ' -- ' . $no1->getName();\r\n\r\n $no2 = new NoFolha('10', \"Tag 2\");\r\n $no3 = new NoFolha('20', \"Tag 3\");\r\n $no4 = new NoFolha('21', \"Tag 4\");\r\n $nodes->add( $no1);\r\n $nodes->add( $no2 );\r\n $nodes->add( $no3 );\r\n $nodes->add( $no4 );\r\n\r\n //Create our loop\r\n echo '==== <BR>';\r\n for($i = 0; $i < $nodes->size(); $i++) {\r\n echo $nodes[$i]->getName() . \"<br>\";\r\n }\r\n \r\n // [ parent, child ]\r\n $this->heapTree->insert([$no1, $no2]);\r\n $this->heapTree->insert([$no2, $no3]);\r\n $this->heapTree->insert([$no2, $no4]);\r\n $this->printTree();\r\n\r\n\r\n }", "function get_treeStructureElements ($uid) {\n\t\t$treeStructure = array();\n\t\t\t$res = $this->getDataInit($uid,$subCSSclass);\n\t\t\twhile ( $row = $this->getDataNext($res,$subCSSclass))\t{\n\t\t\t\t$treeStructure['cat_'.$row['uid']]= $uid;\n\t\t\t\t$treeStructure = array_merge($treeStructure,$this->get_treeStructureElements($row['uid'])) ;\n\t\t\t}\n\t\treturn $treeStructure;\n\t}", "abstract protected function generateContents();", "protected function parseTree() {\n $this->fileId = Reader::unpackLong( substr( $this->deserialized, $this->ReaderOffset, 8 ) );\n $this->ReaderOffset += 8;\n\n $this->pageIndex = Reader::unpackLong( substr( $this->deserialized, $this->ReaderOffset, 8 ) );\n $this->ReaderOffset += 8;\n\n $this->pageOffset = Reader::unpackInt( substr( $this->deserialized, $this->ReaderOffset, 4 ) );\n $this->ReaderOffset += 4;\n\n $this->size = Reader::unpackInt( substr( $this->deserialized, $this->ReaderOffset, 4 ) );\n $this->ReaderOffset += 4;\n\n $this->changeSize = Reader::unpackInt( substr( $this->deserialized, $this->ReaderOffset, 4 ) );\n $this->ReaderOffset += 4;\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 }", "public static function generate() : void\n\t\t{\n\t\t$classes = NamespaceTree::getAllClasses();\n\n\t\tforeach ($classes as $class)\n\t\t\t{\n\t\t\ttry\n\t\t\t\t{\n\t\t\t\t$reflection = new \\ReflectionClass($class);\n\t\t\t\t$parent = $reflection->getParentClass();\n\n\t\t\t\tif ($parent)\n\t\t\t\t\t{\n\t\t\t\t\t$parentName = $parent->getName();\n\n\t\t\t\t\tif (isset(self::$children[$parentName]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\tself::$children[$parentName][] = $reflection->getName();\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\tself::$children[$parentName] = [$reflection->getName()];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcatch (\\Throwable)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected function readData() {\n if (!$this->parsed) {\n $this->data = array();\n $this->parsed = TRUE;\n $files = file_scan_directory($this->data_dir, '/.*/');\n foreach($files as $file) {\n $docs = simplexml_load_file($file->uri);\n foreach($docs as $doc) {\n $id = (string)$doc->Recid;\n\n $ob = new stdClass();\n $ob->language = 'en';\n // Copy all attributes\n $ob->Recid = $id;\n $ob->dateOfEntry = (string)$doc->dateOfEntry;\n $ob->dateOfModification = (string)$doc->dateOfModification;\n\n $ob->titleOfText['en'] = (string)$doc->titleOfText;\n $ob->titleOfText['fr'] = (string)$doc->titleOfTextFr;\n $ob->titleOfText['es'] = (string)$doc->titleOfTextSp;\n $ob->titleOfText['de'] = (string)$doc->titleOfTextOther;\n foreach($ob->titleOfText as $title) {\n if(!empty($title)) {\n $ob->title = $title;\n break;\n }\n }\n\n $ob->typeOfText = (string)$doc->typeOfText;\n $ob->jurisdiction = (string)$doc->jurisdiction;\n $ob->fieldOfApplication = (string)$doc->fieldOfApplication;\n\n foreach($doc->subject as $s) { $ob->subject[] = MigrationUtil::decodeHTMLText((string)$s); }\n foreach($doc->languageOfDocument as $s) { $ob->languageOfDocument[] = (string)$s; }\n\n $ob->placeOfAdoption = (string)$doc->placeOfAdoption;\n $ob->depository = (string)$doc->depository;\n $ob->dateOfText = (string)$doc->dateOfText;\n $ob->dateOfText = ($ob->dateOfText == '0000-00-00') ? NULL : $ob->dateOfText;\n\n $ob->searchDate = (string)$doc->searchDate;\n $ob->searchDate = ($ob->searchDate == '0000-00-00') ? NULL : $ob->searchDate;\n\n $ob->entryIntoForceDate = (string)$doc->entryIntoForceDate;\n $ob->entryIntoForceDate = ($ob->entryIntoForceDate == '0000-00-00') ? NULL : $ob->entryIntoForceDate;\n\n $ob->obsolete = (string)$doc->obsolete;\n $ob->officialPublication = (string)$doc->officialPublication;\n $ob->availableIn = (string)$doc->availableIn;\n $ob->linkToFullText = (string)$doc->linkToFullText;\n $ob->internetReference = (string)$doc->internetReference;\n $ob->amendsTreaty = (string)$doc->amendsTreaty;\n $ob->relatedWebSite = (string)$doc->relatedWebSite;\n\n $ob->abstract['en'] = (string)$doc->abstract;\n $ob->abstract['fr'] = (string)$doc->abstractFr;\n $ob->abstract['es'] = (string)$doc->abstractSp;\n\n $ob->ecolex_url = 'http://www.ecolex.org/ecolex/ledge/view/RecordDetails?index=treaties&id=' . $id;\n\n foreach($doc->citesTreaty as $s) { $ob->citesTreaty[] = (string)$s; }\n foreach($doc->keyword as $s) { $ob->keyword[] = (string)$s; }\n foreach($doc->region as $s) { $ob->region[] = (string)$s; }\n\n if(empty($ob->title)) {\n $this->setMessage('Skipping record with empty title:' . $ob->Recid);\n continue;\n }\n $this->staticFieldFixes($ob);\n $this->data[$id] = $ob;\n }\n }\n }\n }", "protected function define_structure() {\n global $DB;\n\n $config = get_config(\"etherpadlite\");\n\n try {\n $client = \\mod_etherpadlite\\api\\client::get_instance($config->apikey, $config->url);\n } catch (\\InvalidArgumentException $e) {\n \\core\\notification::add($e->getMessage(), \\core\\notification::ERROR);\n }\n\n // To know if we are including userinfo.\n $userinfo = $this->get_setting_value('userinfo');\n\n // Define each element separated.\n $eplite = new backup_nested_element('etherpadlite', array('id'), array(\n 'name', 'intro', 'introformat', 'guestsallowed', 'timecreated', 'timemodified'));\n\n // Define elements of the content structure.\n // The elements \"html\" and \"text\" get the content of the main etherpad.\n // The element grouppaddata get the serialized data as array with objects (->text and ->html).\n $content = new backup_nested_element('content', null, array('html', 'text', 'grouppaddata'));\n\n // Build the tree.\n $eplite->add_child($content);\n\n // Define sources.\n $eplite->set_source_table('etherpadlite', array('id' => backup::VAR_ACTIVITYID));\n $eplite->annotate_files('mod_etherpadlite', 'intro', null); // This file area hasn't an itemid.\n\n // All the rest of elements only happen if we are including user info.\n if ($userinfo) {\n $modid = $this->task->get_activityid();\n if (!empty($client)) {\n if ($etherpadlite = $DB->get_record('etherpadlite', array('id' => $modid))) {\n $padid = $etherpadlite->uri;\n // Get all groups.\n $groups = groups_get_all_groups($etherpadlite->course);\n $grouppaddata = array();\n // Get group pads if exist.\n $cm = get_coursemodule_from_instance('etherpadlite', $modid);\n if ($cm->groupmode != 0 && $groups) {\n // Get the HTML content of the group pads.\n foreach ($groups as $group) {\n $grouppadid = $padid . $group->id;\n $html = $client->get_html($grouppadid);\n $text = $client->get_text($grouppadid);\n $groupcontent = new \\stdClass();\n $groupcontent->html = $html->html;\n $groupcontent->text = $text->text;\n $grouppaddata[$group->id] = $groupcontent;\n }\n }\n\n $data = new \\stdClass();\n $data->grouppaddata = serialize($grouppaddata);\n // The HTML content of the main pad.\n $html = $client->get_html($padid);\n $text = $client->get_text($padid);\n $data->html = $html->html;\n $data->text = $text->text;\n $content->set_source_array(array($data));\n }\n }\n }\n\n // Define id annotations.\n // We have none.\n\n // Define file annotations.\n\n // Return the root element (etherpadlite), wrapped into standard activity structure.\n return $this->prepare_activity_structure($eplite);\n\n }", "protected function gather() {\n\t\t$RecursiveIterator = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator('../'));\n\n\t\tforeach($RecursiveIterator as $item) {\n\t\t\tif(!$this->isValid($item)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(!$name = $this->identify((string) $item)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->files[(string) $item] = $name;\n\t\t}\n\t}", "public function scorm_reconstitute_array_element($sversion, $userdata, $element_name, $children)\n\t{\n\t\t$current = '';\n\t\t$current_subelement = '';\n\t\t$current_sub = '';\n\t\t$count = 0;\n\t\t$count_sub = 0;\n\t\t$scormseperator = '_';\n\n\t\tif (strcasecmp($sversion, 'SCORM_1.2') != 0)\n\t\t{\n\t\t\t// Scorm 1.3 elements use a . instead of an _\n\t\t\t$scormseperator = '.';\n\t\t}\n\n\t\t// Filter out the ones we want\n\t\t$element_list = array();\n\n\t\tforeach ($userdata as $element => $value)\n\t\t{\n\t\t\tif (substr($element, 0, strlen($element_name)) == $element_name)\n\t\t\t{\n\t\t\t\t$element_list[$element] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// Sort elements in .n array order\n\t\tuksort($element_list, \"scormGuruImport::scorm_element_cmp\");\n\n\t\t// Generate JavaScript\n\t\tforeach ($element_list as $element => $value)\n\t\t{\n\t\t\tif (strcasecmp($sversion, 'SCORM_1.2') != 0)\n\t\t\t{\n\t\t\t\t$element = preg_replace('/\\.(\\d+)\\./', \".N\\$1.\", $element);\n\t\t\t\tpreg_match('/\\.(N\\d+)\\./', $element, $matches);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$element = preg_replace('/\\.(\\d+)\\./', \"_\\$1.\", $element);\n\t\t\t\tpreg_match('/\\_(\\d+)\\./', $element, $matches);\n\t\t\t}\n\n\t\t\tif (count($matches) > 0 && $current != $matches[1])\n\t\t\t{\n\t\t\t\tif ($count_sub > 0)\n\t\t\t\t{\n\t\t\t\t\techo '\t' . $element_name . $scormseperator . $current . '.' . $current_subelement . '._count = ' . $count_sub . \";\\n\";\n\t\t\t\t}\n\n\t\t\t\t$current = $matches[1];\n\t\t\t\t$count++;\n\t\t\t\t$current_subelement = '';\n\t\t\t\t$current_sub = '';\n\t\t\t\t$count_sub = 0;\n\t\t\t\t$end = strpos($element, $matches[1]) + strlen($matches[1]);\n\t\t\t\t$subelement = substr($element, 0, $end);\n\t\t\t\techo '\t' . $subelement . \" = new Object();\\n\";\n\n\t\t\t\t// Now add the children\n\t\t\t\tforeach ($children as $child)\n\t\t\t\t{\n\t\t\t\t\techo '\t' . $subelement . \".\" . $child . \" = new Object();\\n\";\n\t\t\t\t\techo '\t' . $subelement . \".\" . $child . \"._children = \" . $child . \"_children;\\n\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Now - flesh out the second level elements if there are any\n\t\t\tif (strcasecmp($sversion, 'SCORM_1.2') != 0)\n\t\t\t{\n\t\t\t\t$element = preg_replace('/(.*?\\.N\\d+\\..*?)\\.(\\d+)\\./', \"\\$1.N\\$2.\", $element);\n\t\t\t\tpreg_match('/.*?\\.N\\d+\\.(.*?)\\.(N\\d+)\\./', $element, $matches);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$element = preg_replace('/(.*?\\_\\d+\\..*?)\\.(\\d+)\\./', \"\\$1_\\$2.\", $element);\n\t\t\t\tpreg_match('/.*?\\_\\d+\\.(.*?)\\_(\\d+)\\./', $element, $matches);\n\t\t\t}\n\n\t\t\t// Check the sub element type\n\t\t\tif (count($matches) > 0 && $current_subelement != $matches[1])\n\t\t\t{\n\t\t\t\tif ($count_sub > 0)\n\t\t\t\t{\n\t\t\t\t\techo '\t' . $element_name . $scormseperator . $current . '.' . $current_subelement . '._count = ' . $count_sub . \";\\n\";\n\t\t\t\t}\n\n\t\t\t\t$current_subelement = $matches[1];\n\t\t\t\t$current_sub = '';\n\t\t\t\t$count_sub = 0;\n\t\t\t\t$end = strpos($element, $matches[1]) + strlen($matches[1]);\n\t\t\t\t$subelement = substr($element, 0, $end);\n\t\t\t\techo '\t' . $subelement . \" = new Object();\\n\";\n\t\t\t}\n\n\t\t\t// Now check the subelement subscript\n\t\t\tif (count($matches) > 0 && $current_sub != $matches[2])\n\t\t\t{\n\t\t\t\t$current_sub = $matches[2];\n\t\t\t\t$count_sub++;\n\t\t\t\t$end = strrpos($element, $matches[2]) + strlen($matches[2]);\n\t\t\t\t$subelement = substr($element, 0, $end);\n\t\t\t\techo '\t' . $subelement . \" = new Object();\\n\";\n\t\t\t}\n\n\t\t\techo '\t' . $element . ' = \\'' . $value . \"';\\n\";\n\t\t}\n\n\t\tif ($count_sub > 0)\n\t\t{\n\t\t\techo '\t' . $element_name . $scormseperator . $current . '.' . $current_subelement . '._count = ' . $count_sub . \";\\n\";\n\t\t}\n\n\t\tif ($count > 0)\n\t\t{\n\t\t\techo '\t' . $element_name . '._count = ' . $count . \";\\n\";\n\t\t}\n\t}", "public function addElementToResults(&$element, $id, $idParent, $depthParent) {\n // $element è l'elemento che deve essere inserito, gli altri parametri sono i riferimenti per l'inserimento\n $element->id = $id;\n $element->parent = $idParent;\n $element->depth = $depthParent;\n\n $upToId = array_slice($this->results, 0, $id, true);\n $upToEnd = array_slice($this->results, $id, count($this->results) - $id, true);\n $insertion = array($id => $element);\n $this->results = array_merge($upToId, $insertion, $upToEnd);\n\n echo $this->results[$id]->pageType.' '.$this->results[$id]->title.'<br />';\n echo $this->results[$id+1]->pageType.' '.$this->results[$id+1]->title.'<br />';\n // verificare se il contenuto da wrappare ha dei figli, generalmente sono i box aside\n $this->results[$id + 1]->id++;\n $this->results[$id + 1]->parent++;\n $this->results[$id + 1]->depth++;\n\n for ($i = $id + 2; $i < count($this->results); $i++) {\n echo $i.'<br />';\n echo 'ID elemento '.$this->results[$i]->id.'<br />';\n $this->results[$i]->id++;\n echo 'ID aumentato '.$this->results[$i]->id.'<br />';\n if ($this->results[$i]->parent >= $id) {\n echo 'Parent di '.$this->results[$i]->id.' originale: '.$this->results[$i]->parent.'<br />';\n $this->results[$i]->parent++;\n echo 'Parent aumentato: '.$this->results[$i]->parent.'<br />';\n }\n echo 'Profondità del risultato corrente '.$this->results[$i]->depth.'<br/>';\n echo 'Profondità di suo padre '.$this->results[$this->results[$i]->parent]->depth.'<br />';\n if ($this->results[$i]->depth == $this->results[$this->results[$i]->parent]->depth) {\n $this->results[$i]->depth++;\n }\n }\n\n\t}", "private function xmltoarray($contents, $get_attributes=1, $priority = 'attribute') {\n if(!$contents) return array();\n\n if(!function_exists('xml_parser_create')) {\n //print \"'xml_parser_create()' function not found!\";\n return array();\n }\n\n //Get the XML parser of PHP - PHP must have this module for the parser to work\n $parser = xml_parser_create('');\n xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, \"UTF-8\"); # http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss\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, trim($contents), $xml_values);\n xml_parser_free($parser);\n\n if(!$xml_values) return;//Hmm...\n\n //Initializations\n $bigxml_array = array();\n $parents = array();\n $opened_tags = array();\n $arr = array();\n\n $current = &$bigxml_array; //Refference\n\n //Go through the tags.\n $repeated_tag_index = array();//Multiple tags with same name will be turned into an array\n foreach($xml_values as $data) {\n unset($attributes,$value);//Remove existing values, or there will be trouble\n\n //This command will extract these variables into the foreach scope\n // tag(string), type(string), level(int), attributes(array).\n extract($data);//We could use the array by itself, but this cooler.\n\n $result = array();\n $attributes_data = array();\n\n if(isset($value)) {\n if($priority == 'tag') $result = $value;\n else $result['value'] = $value; //Put the value in a assoc array if we are in the 'Attribute' mode\n }\n\n //Set the attributes too.\n if(isset($attributes) and $get_attributes) {\n foreach($attributes as $attr => $val) {\n if($priority == 'tag') $attributes_data[$attr] = $val;\n else $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n }\n }\n\n //See tag status and do the needed.\n if($type == \"open\") {//The starting of the tag '<tag>'\n $parent[$level-1] = &$current;\n if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag\n $current[$tag] = $result;\n if($attributes_data) $current[$tag. '_attr'] = $attributes_data;\n $repeated_tag_index[$tag.'_'.$level] = 1;\n\n $current = &$current[$tag];\n\n } else { //There was another element with the same tag name\n\n if(isset($current[$tag][0])) {//If there is a 0th element it is already an array\n $current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;\n $repeated_tag_index[$tag.'_'.$level]++;\n } else {//This section will make the value an array if multiple tags with the same name appear together\n $current[$tag] = array($current[$tag],$result);//This will combine the existing item and the new item together to make an array\n $repeated_tag_index[$tag.'_'.$level] = 2;\n\n if(isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well\n $current[$tag]['0_attr'] = $current[$tag.'_attr'];\n unset($current[$tag.'_attr']);\n }\n\n }\n $last_item_index = $repeated_tag_index[$tag.'_'.$level]-1;\n $current = &$current[$tag][$last_item_index];\n }\n\n } elseif($type == \"complete\") { //Tags that ends in 1 line '<tag />'\n //See if the key is already taken.\n if(!isset($current[$tag])) { //New Key\n $current[$tag] = $result;\n $repeated_tag_index[$tag.'_'.$level] = 1;\n if($priority == 'tag' and $attributes_data) $current[$tag. '_attr'] = $attributes_data;\n\n } else { //If taken, put all things inside a list(array)\n if(isset($current[$tag][0]) and is_array($current[$tag])) {//If it is already an array...\n\n // ...push the new element into that array.\n $current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;\n\n if($priority == 'tag' and $get_attributes and $attributes_data) {\n $current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;\n }\n $repeated_tag_index[$tag.'_'.$level]++;\n\n } else { //If it is not an array...\n $current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value\n $repeated_tag_index[$tag.'_'.$level] = 1;\n if($priority == 'tag' and $get_attributes) {\n if(isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well\n\n $current[$tag]['0_attr'] = $current[$tag.'_attr'];\n unset($current[$tag.'_attr']);\n }\n\n if($attributes_data) {\n $current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;\n }\n }\n $repeated_tag_index[$tag.'_'.$level]++; //0 and 1 index is already taken\n }\n }\n\n } elseif($type == 'close') { //End of tag '</tag>'\n $current = &$parent[$level-1];\n }\n }\n\n return($bigxml_array);\n}" ]
[ "0.56206304", "0.55278", "0.55141", "0.5510417", "0.5487023", "0.5285377", "0.5204845", "0.51773053", "0.5067398", "0.5066514", "0.5065179", "0.5036723", "0.50336224", "0.4993889", "0.49924994", "0.4971577", "0.49610895", "0.49589854", "0.4953054", "0.4948603", "0.494003", "0.49348295", "0.49334794", "0.49012843", "0.48847404", "0.48652148", "0.485416", "0.48508656", "0.48428118", "0.48197293" ]
0.6694801
0
get all the ledger from selected company
function getAllLedger() { //list of ledger xml query $listOfLedgerXML =<<<XML <ENVELOPE> <HEADER> <VERSION>1</VERSION> <TALLYREQUEST>Export</TALLYREQUEST> <TYPE>Data</TYPE> <ID>List of Ledgers</ID> </HEADER> <BODY> <DESC> <TDL> <TDLMESSAGE> <REPORT NAME="List of Ledgers" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No"> <FORMS>List of Ledgers</FORMS> </REPORT> <FORM NAME="List of Ledgers" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No"> <TOPPARTS>List of Ledgers</TOPPARTS> <XMLTAG>"List of Ledgers"</XMLTAG> </FORM> <PART NAME="List of Ledgers" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No"> <TOPLINES>List of Ledgers</TOPLINES> <REPEAT>List of Ledgers : Collection of Ledgers</REPEAT> <SCROLLED>Vertical</SCROLLED> </PART> <LINE NAME="List of Ledgers" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No"> <LEFTFIELDS>List of Ledgers</LEFTFIELDS> </LINE> <FIELD NAME="List of Ledgers" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No"> <SET>\$Name</SET> <XMLTAG>"LEDGERNAME"</XMLTAG> </FIELD> <COLLECTION NAME="Collection of Ledgers" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No"> <TYPE>Ledger</TYPE> </COLLECTION> </TDLMESSAGE> </TDL> </DESC> </BODY> </ENVELOPE> XML; $ledgerList = $this->xml_execute($listOfLedgerXML); return $ledgerList["LEDGERNAME"]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLedger(){\n /*$this->db->select('*')\n ->from('ledger');\n ->join('branch','ledger.branch_id=branch.branch_id')\n ->join('account_group','account_group.id=ledger.accountgroup_id');\n \n return $this->db->get()->result();*/\n\n return $this->db->select('l.*,b.branch_name,a.group_title')\n ->from('ledger l')\n ->join('branch b','b.branch_id = l.branch_id')\n ->join('account_group a','a.id=l.accountgroup_id')\n ->get()\n ->result();\n }", "public function company(): array\n {\n // ADD : WHERE ID = COMPANY.ID\n $sql = \"SELECT CONCAT(people_firstname, ' ', people_lastname) AS people_fullName, \n people.people_phone, people.people_email, people.people_company \n FROM `company`\n INNER JOIN `people_has_company`\n ON company.id = people_has_company.fk_company \n INNER JOIN people ON people.id = people_has_company.fk_people\";\n $out['company_people']['cols'] = array(\"#\", \"Name\", \"Phone\", \"Email\", 'Company');\n $out['company_people']['rows'] = $this->getData($sql, true);\n\n // Second Table - Show all the invoices related to the company\n // ADD : WHERE ID = COMPANY.ID\n $sql = \"SELECT invoice.invoice_number, invoice.invoice_date, CONCAT(people_firstname, ' ', people_lastname) AS people_fullName \n FROM `company`\n INNER JOIN `invoice` \n ON invoice.invoice_fk_company = company.id \n INNER JOIN `people` \n ON invoice.invoice_fk_people = people.id\";\n $out['company_invoice']['cols'] = array('#', 'Invoice Number', 'Date', 'Name');\n $out['company_invoice']['rows'] = $this->getData($sql, true);\n\n return $out;\n }", "function get_all_company()\n {\n $this->db->order_by('id_company', 'desc');\n return $this->db->get('company')->result_array();\n }", "public function getCompany();", "function getAllAdvertiserCompany(){\n\t\n\t\t\tApp::import('model','AdvertiserProfile');\n\t\t $this->AdvertiserProfile = new AdvertiserProfile(); \n\t\t\t\n\t\t\t$AdvertiserProfileList = $this->AdvertiserProfile->find('list', array('fields' => array('id', 'company_name'),'order' => 'AdvertiserProfile.name ASC','recursive' => -1,'conditions' => array('AdvertiserProfile.publish' => 'yes'))); \n\t\t\t\n\n\t\t\treturn $AdvertiserProfileList;\n\t }", "public function getCompanies()\n {\n $result = Company::all();\n return $result;\n }", "public function get_all_companies() {\n\t\t$this->db->select($this->company_id);\n\t\t$this->db->select($this->company_name);\n\t\t$query = $this->db->get($this->company_table);\n\t\treturn $query->result();\n\t\t\n\t}", "public function getBranches()\n {\n return $this->hasMany(Branches::className(), ['id_company' => 'id']);\n }", "public function getClients($company) \n {\n $c = Company::find($company);\n if (!$c) {\n return $this->sendError('No such company founded');\n }\n return $this->sendResponse($c->clients()->paginate(7), 'Clients of company['. $company .'] retrieved successfully.');\n }", "public function getLov() {\n return\n DB::table($this->table)\n ->select(\n 'id',\n 'name'\n )\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $this->requester->getCompanyId()]\n ])\n ->get();\n }", "function get_company($id_company)\n {\n return $this->db->get_where('company',array('id_company'=>$id_company))->row_array();\n }", "public static function getCompanyList($companyid){\n\t\t//DB::select( DB::raw('set sql_mode='''));\n\t\treturn $results = Company::where('id',$companyid)->get();\n }", "public static function getCompanyBranchList($companyid,$branchid=false,$unionbranchid=false,$groupid=false){\n\t\t//DB::select( DB::raw('set sql_mode='''));\n $companyBranch = CompanyBranch::where('company_id',$companyid);\n if($branchid!=false && $branchid!=''){\n $companyBranch->where('id',$branchid);\n }\n if($unionbranchid!=false && $unionbranchid!=''){\n $companyBranch->where('union_branch_id',$unionbranchid);\n }\n if($groupid!=false && $groupid!=''){\n $union_branch_ids = DB::table('union_group_branches')->where('union_group_id',$groupid)->pluck('union_branch_id');\n $companyBranch->whereIn('union_branch_id',$union_branch_ids);\n }\n $companyBranch->where('status',1);\n \n return $companyBranch->get();\n }", "public function getAll($companyId)\n {\n $tenantId = $this->requester->getTenantId();\n return\n DB::table('readiness_levels')\n ->select(\n 'id',\n 'name',\n 'description',\n 'color',\n 'ready_now as readyNow',\n 'eff_begin as effBegin',\n 'eff_end as effEnd'\n )\n ->where([\n ['readiness_levels.tenant_id', $tenantId],\n ['readiness_levels.company_id', $companyId]\n ])\n ->orderBy('id', 'DESC')\n ->get();\n }", "private function listCompanies()\n\t{\n\t\t$companies = DB::table('companies')->select('companies.id','companies.name')->get();\t\n\t\t\t\n\t\treturn $companies;\n\t}", "public function companylist(){\n \t$company=Company::with('user')->get();\n return json_encode($company);\n }", "public function companies();", "public function companyIndex()\n {\n $company = Company::where('estatud',\"=\",'1')->get();\n foreach ($company as $change ) {\n $change = $change->type;\n }\n return $company;\n }", "function getAllCompagnies() {\r\n// Initialiser la connexion BDD\r\n try {\r\n // LIST: CONTIENDRA UN TABLEAU D'OBJETS\r\n $list = array();\r\n if (is_null(parent::getBdd())) {\r\n parent::__construct();\r\n }\r\n if (!parent::getBdd()->inTransaction()) {\r\n parent::getBdd()->beginTransaction();\r\n }\r\n// Query SQL\r\n $query = \"SELECT * FROM Compagnies\";\r\n\r\n\r\n $response = parent::getBdd()->query($query);\r\n// Boucler sur les resultats \r\n while ($data = $response->fetch()) {\r\n // SI ID exite => Creer l'objet\r\n if (isset($data['id'])) {\r\n $object = new Compagnie($data['id']);\r\n } else {\r\n // ERROR\r\n return null;\r\n }\r\n\r\n // REMPLIR LOBJET AVEC LES ATTRIBUTS\r\n\r\n if (isset($data['adresseFacturation'])) {\r\n $object->setAdresseFacturation($data['adresseFacturation']);\r\n }\r\n if (isset($data['manager'])) {\r\n $object->setManager($data['manager']);\r\n }\r\n if (isset($data['libelle'])) {\r\n $object->setLibelle($data['libelle']);\r\n }\r\n if (isset($data['logo'])) {\r\n $object->setLogo($data['logo']);\r\n }\r\n\r\n\r\n // REMPLIR LA LISTE AVEC\r\n array_push($list, $object);\r\n }\r\n $response->closeCursor();\r\n if (empty($list)) {\r\n return null;\r\n }\r\n return $list;\r\n } catch (Exception $e) {\r\n error_log($e->getMessage());\r\n }\r\n return null;\r\n }", "public function get_all_company()\n\t{\n \t\t//$sql='SELECT \tdistinct on (view_tempcustomermaster.tempcustname) view_tempcustomermaster.id,view_tempcustomermaster.tempcustname FROM \tview_tempcustomermaster ORDER BY tempcustname ASC';\n\n \t\t$sql='SELECT view_tempcustomermaster.id,view_tempcustomermaster.tempcustname FROM \tview_tempcustomermaster ORDER BY tempcustname ASC';\n \t//echo $sql; die;\n\t\t$result = $this->db->query($sql);\n\t//\tprint_r($result->result_array());\n\t\t$options = $result->result_array();\n\t\t$options_arr;\n\t\t$options_arr[''] = '-Please Select Customer-';\n\n\t\t// Format for passing into form_dropdown function\n\t\tforeach ($options as $option) {\n\t\t\t$options_arr[$option['id']] = $option['tempcustname'];\n\t\t}\n\t\treturn $options_arr;\n\t\t\n\t}", "function get_all_companies()\n {\n $this->db->order_by('company_id', 'desc');\n return $this->db->get('companies')->result_array();\n }", "public function getAllCompanies()\n {\n $url = vsprintf(self::ENDPOINT_FIND_BY_UUID, ['']);\n $hubUrl = $this->hub->setToken('', true);\n return $hubUrl->request->get($url)->throw();\n }", "public function companies(){\n return $this->morphedByMany(Company::class, 'sectoryables');\n }", "public function allCompagnyNameAndId()\n {\n $bdd = $this->dbConnect();\n\n $requete = \"SELECT company_name, company_id FROM company\";\n\n $resultat = $bdd->prepare($requete);\n $resultat->execute();\n\n return $resultat->fetchAll();\n }", "public static function get_client_invoices($company)\n {\n return self::$db->where(array('client' => $company,'status !=' => 'Cancelled','show_client' => 'Yes'))->order_by('inv_id', 'desc')->get('invoices')->result();\n }", "public function getCompanyList()\r\n {\r\n $result = $this->find('list', array('fields' => array('id', 'name'), 'order' => array('name' => 'ASC')));\r\n return $result;\r\n }", "public function company($id){\n if($id != $this->current_user->id) {\n if(!$this->current_user->can('super_list_contract')) {\n return $this->prepareResponse('document.NOT_AUTHORIZED_TO_LIST_OTHER');\n }\n }\n\n $company = Company::find($id);\n\n if(!$company)\n return $this->prepareResponse('company.NOT_FOUND');\n\n $roots = [];\n foreach ($company->users as $user) {\n $root = $this->_get_root_directory($user->id);\n $root->load('user');\n array_push($roots, $root);\n }\n\n return $roots;\n }", "function get_company($company_id)\n {\n return $this->db->get_where('companies',array('company_id'=>$company_id))->row_array();\n }", "function getAllCompanyName(){\n\t\t\tApp::import('model','AdvertiserProfile');\n\t\t $this->AdvertiserProfile = new AdvertiserProfile();\n\t\t\t$companyList = $this->AdvertiserProfile->find('list',array('fields'=>array('AdvertiserProfile.id','AdvertiserProfile.company_name')));\n\t\t\treturn $companyList;\n\t}", "public function getAllCompaniesForAdminForDataTable(){\n return $this->query();\n }" ]
[ "0.6743585", "0.6124794", "0.6002001", "0.59858793", "0.59756976", "0.5891217", "0.58809817", "0.5876617", "0.58613884", "0.5859777", "0.58056456", "0.580509", "0.5798251", "0.57982486", "0.5794864", "0.5757352", "0.5754012", "0.57337147", "0.57285", "0.57073796", "0.5671517", "0.56707746", "0.56675845", "0.5665371", "0.5664025", "0.5653185", "0.5624443", "0.5607135", "0.560131", "0.5580604" ]
0.6236052
1
create new ledger entry in tally
function CreateLedger($create_ledger_params) { if( count($create_ledger_params) == 0) { return "params are not available"; } $ledger_name = $create_ledger_params["ledger_name"]; $state_name = $create_ledger_params["state_name"]; $pin_code = $create_ledger_params["pin_code"]; $email = $create_ledger_params["email"]; $ledger_address = $create_ledger_params["ledger_address"]; $email_cc = $create_ledger_params["email_cc"]; $ledger_phone = $create_ledger_params["ledger_phone"]; $ledger_mobile = $create_ledger_params["ledger_mobile"]; $ledger_website = $create_ledger_params["ledger_website"]; $ledger_contact = $create_ledger_params["ledger_contact"]; $income_tax_number = $create_ledger_params["income_tax_number"]; $country = $create_ledger_params["country"]; $ledger_city = $create_ledger_params["ledger_city"]; $parent = $create_ledger_params["parent"]; $ledger_description = $create_ledger_params["ledger_description"]; $party_gstin = $create_ledger_params["party_gstin"]; $gst_nature_of_supply = $create_ledger_params["gst_nature_of_supply"]; $opening_balance = $create_ledger_params["opening_balance"]; $is_affect_stock = $create_ledger_params["is_affect_stock"]; $is_bill_wise_on = $create_ledger_params["is_bill_wise_on"]; //conditions for ledger in tally-- more will be added later. if ($ledger_name == ""){return "please provide ledger name";} if ($parent == ""){return "please provide ledger parent";} if ($ledger_description == ""){return "please provide ledger description";} if ($ledger_name == ""){return "please provide ledger name";} if ($country == ""){return "please provide ledger country";} //default value for some attributes $is_affect_stock = ($is_affect_stock !== NULL) ? $is_affect_stock : 'NO'; $opening_balance = ($opening_balance !== NULL) ? $opening_balance : 0; $is_bill_wise_on = ($is_bill_wise_on !== NULL) ? $is_bill_wise_on : 'NO'; $use_for_vat = ($use_for_vat !== NULL) ? $use_for_vat : 'NO'; //create a ledger xml structure $ledgerCreateXML =<<<XML <ENVELOPE> <HEADER> <VERSION>1</VERSION> <TALLYREQUEST>IMPORT</TALLYREQUEST> <TYPE>DATA</TYPE> <ID>ALL MASTERS</ID> </HEADER> <BODY> <DESC> </DESC> <REQUESTDATA> <TALLYMESSAGE xmlns:UDF="TallyUDF"> <LEDGER NAME="{$ledger_name}" ACTION="Create"> <NAME.LIST> <NAME>{$ledger_name}</NAME> </NAME.LIST> <ADDRESS.LIST TYPE="String"> <ADDRESS>{$ledger_address}</ADDRESS> <ADDRESS>{$ledger_city}</ADDRESS> </ADDRESS.LIST> <LEDSTATENAME>{$state_name}</LEDSTATENAME> <PINCODE>{$pin_code}</PINCODE> <MAILINGNAME.LIST TYPE="String"> <MAILINGNAME>{$ledger_name}</MAILINGNAME> </MAILINGNAME.LIST> <EMAIL>{$email}</EMAIL> <COUNTRYNAME>{$country}</COUNTRYNAME> <GSTREGISTRATIONTYPE>Regular</GSTREGISTRATIONTYPE> <PARENT>{$parent}</PARENT> <NARRATION>{$ledger_description}</NARRATION> <COUNTRYOFRESIDENCE>{$country}</COUNTRYOFRESIDENCE> <EMAILCC>{$email_cc}</EMAILCC> <LEDGERPHONE>{$ledger_phone}</LEDGERPHONE> <LEDGERCONTACT>{$ledger_contact}</LEDGERCONTACT> <LEDGERMOBILE>{$ledger_mobile}</LEDGERMOBILE> <PARTYGSTIN>{$party_gstin}</PARTYGSTIN> <GSTNATUREOFSUPPLY>{$gst_nature_of_supply}</GSTNATUREOFSUPPLY> <ISBILLWISEON>{$is_bill_wise_on}</ISBILLWISEON> <AFFECTSSTOCK>{$is_affect_stock}</AFFECTSSTOCK> <OPENINGBALANCE>{$opening_balance}</OPENINGBALANCE> <USEFORVAT>{$use_for_vat}</USEFORVAT> <TAXCLASSIFICATIONNAME/> <TAXTYPE/> <RATEOFTAXCALCULATION/> </LEDGER> </TALLYMESSAGE> </REQUESTDATA> </BODY> </ENVELOPE> XML; // echo $ledgerCreateXML;die(); $ledgerCreated = $this->xml_execute($ledgerCreateXML); return $ledgerCreated; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createAccount()\n {\n $nextAcAccountNumber = ['accountNumber' =>ctrlr::getInstance()->getNewAccountNumber()];\n ctrlr::getInstance()\n ->view('newAccount', $nextAcAccountNumber)\n ->newAccount($nextAcAccountNumber);\n $this->log->addInfo(json_encode(['account creation attempt' =>$nextAcAccountNumber]));\n }", "public function creating(OdometerEntries $entry)\n {\n if(Auth::user()) {\n $entry->created_by = Auth::user()->id;\n }\n\n\n }", "function time_tracker_time_entry_create() {\n return entity_get_controller('time_tracker_entry')->create();\n}", "function createAccounts(array $data){\nreturn $this->post($data, \"/ledger/account/batch\");\n}", "function createAccount(array $data){\nreturn $this->post($data, \"/ledger/account\");\n}", "public function customerLedgerEntry($ledgerId)\n {\n $notes = 'Invoice with Invoice Id = '.$this->_invoiceId.\n ' '.$this->_invoiceTo;\n $dataToInsert = array(\n 'debit' => $this->getTotalAmount(),\n 'credit' => \"0\",\n 'notes' => $notes,\n 'transaction_timestamp' => $this->_transactionTime,\n 'fa_ledger_id' => $ledgerId\n );\n $ledgerEntryId = $this->getLedgerEntryModel()->create($dataToInsert);\n return $ledgerEntryId;\n }", "public static function addDebt(array $data)\n {\n $timestamp = Carbon::now();\n\n DB::beginTransaction();\n\n $debt = Debt::create([\n 'user_id' => $data['debt']['userID'],\n 'name' => $data['debt']['name'],\n 'type' => $data['debt']['type'],\n 'initial_balance' => $data['debt']['startBalance'],\n 'current_balance' => $data['debt']['currentBalance'],\n 'minimum_payment' => $data['debt']['minPayment'],\n 'start_date' => $data['debt']['startDate'],\n 'payment_period' => $data['debt']['payPeriod']\n ]);\n\n $interest = InterestRate::create([\n 'debt_id' => $debt->id,\n 'rate' => $data['interest']['rate'],\n 'fixed' => $data['interest']['fixed'],\n 'from' => $data['interest']['from'] ?? $timestamp\n ]);\n\n $lender_id = $data['lender']['id'] ?? Lender::create([\n 'name' => $data['lender']['name'],\n 'phone' => $data['lender']['phone'],\n 'account' => $data['lender']['account'],\n 'address1' => $data['lender']['address1'],\n 'address2' => $data['lender']['address2'],\n 'city' => $data['lender']['city'],\n 'state' => $data['lender']['state'],\n 'zip' => $data['lender']['zip']\n ])->id;\n\n $debt->interest_rate_id = $interest->id;\n $debt->lender_id = $lender_id;\n $debt->save();\n \n DebtHistory::create([\n 'debt_id' => $debt->id,\n 'event' => 'Debt entered',\n 'timestamp' => $timestamp\n ]);\n\n DB::commit();\n \n return Debt::with(\n ['interestRates', 'lender', 'history']\n )->find($debt->id);\n }", "public function create()\n {\n $this->insertDeal();\n $this->getTasks();\n }", "public function create(Entries $data);", "private function saveTender($release, $data){\n $tn = $data->tender;\n if($tn){\n $tender = Tender::firstOrCreate([\n \"release_id\" => $release->id\n ]);\n\n $tender->local_id = $tn->id;\n $tender->title = $tn->title;\n $tender->description = $tn->description;\n $tender->status = $tn->status;\n $tender->amount = $tn->value ? $tn->value->amount : null;\n $tender->currency = $tn->value ? $tn->value->currency : null;\n $tender->procurement_method = $tn->procurementMethod;\n $tender->procurement_method_rationale = $tn->procurementMethodRationale;\n $tender->award_criteria = $tn->awardCriteria;\n $tender->award_criteria_details = $tn->awardCriteriaDetails;\n $tender->tender_start = $tn->tenderPeriod ? date(\"Y-m-d\", strtotime($tn->tenderPeriod->startDate)) : null;\n $tender->tender_end = $tn->tenderPeriod ? date(\"Y-m-d\", strtotime($tn->tenderPeriod->endDate)) : null;\n $tender->enquiry_start = $tn->enquiryPeriod ? date(\"Y-m-d\", strtotime($tn->enquiryPeriod->startDate)) : null;\n $tender->enquiry_end = $tn->enquiryPeriod ? date(\"Y-m-d\", strtotime($tn->enquiryPeriod->endDate)) : null;\n $tender->award_start = $tn->awardPeriod ? date(\"Y-m-d\", strtotime($tn->awardPeriod->startDate)) : null;\n $tender->award_end = $tn->awardPeriod ? date(\"Y-m-d\", strtotime($tn->awardPeriod->endDate)) : null;\n $tender->has_enquiries = $tn->hasEnquiries;\n $tender->eligibility_criteria = $tn->eligibilityCriteria;\n $tender->submission_method = count($tn->submissionMethod) ? implode(',',$tn->submissionMethod) : null; \n $tender->submission_method_details = $tn->submissionmethoddetails;\n $tender->number_of_tenderers = empty($tn->numberOfTenderers) ? 0 : $tn->numberOfTenderers;\n $tender->buyer_id = $release->buyer_id;\n\n $tender->update();\n \n $this->saveItems($tender, $tn);\n $this->saveTenderers($tender, $tn);\n $this->saveProviers($tender, $tn, \"tender\");\n $this->saveDocuments($tender, $tn);\n $this->saveProcuringEntity($tender, $tn);\n }\n }", "public function create()\n {\n // auto generate, format : BK-bulan_tahun_no urut (BK1020-001)\n $date = date('yymd');\n $getId = Journal::getId()->count() + 1;\n $noUrut = \"\";\n if($getId < 10){\n $noUrut = \"00\".$getId;\n }else {\n $noUrut = \"0\".$getId;\n }\n $code = 'BK'.$date.'-'.$noUrut;\n return view('pages.journal.create',[\n 'code' => $code\n ]);\n }", "public function create($fields = array())\n\t{\n\t\tif(!$this->_db->insert('budget', $fields)){\n\t\t\tthrow new Exception(\"Error While add budget..\");\n\t\t}\n\t}", "public function salesAccountLedgerEntry()\n {\n $items = $this->getItems();\n $invoiceRecord = $this->fetch();\n \n $financeLedger = new Core_Model_Finance_Ledger;\n $salesLedgerRecord = $financeLedger->fetchByName('Sales Account');\n \n $totalPrice = 0;\n for($i = 0; $i <= sizeof($items)-1; $i += 1) {\n if ($invoiceRecord['invoice_type'] == 1) {\n $items[$i]['quantity'] = 1;\n $items[$i]['unit_price'] = $items[$i]['amount'];\n }\n $price = $items[$i]['unit_price'] * $items[$i]['quantity'];\n $totalPrice = $totalPrice + $price;\n }\n $notes = 'Invoice with Invoice Id = '.$this->_invoiceId.\n ' '.$this->_invoiceTo;\n $dataToInsert = array(\n 'debit' => \"0\",\n 'credit' => $totalPrice,\n 'notes' => $notes,\n 'transaction_timestamp' => $this->_transactionTime,\n 'fa_ledger_id' => $salesLedgerRecord['fa_ledger_id']\n );\n $ledgerEntryModel = new Core_Model_Finance_Ledger_Entry;\n $ledgerEntryId = $ledgerEntryModel->create($dataToInsert);\n return $ledgerEntryId;\n }", "public function createShipmentAndGetWaybill();", "function AfterAdd(&$values, &$keys, $inline, &$pageObject)\n{\n\n\t\t$description = \"Lending of[\".$values['OpeningBalance'].\"] for [\".$values['AccountName'].\" - \".$values['AccountNumber'].\"]\";\n\nglobal $conn;\n\n $sql = \"UPDATE accounts set \".\n\t\t\t\"AccountType = 'Loan',AccountBalance=\".$values['OpeningBalance'].\" where id=\".$values['id'];\n\t\tdb_query($sql,$conn);\n\n$RecID = GetRecordCounterID('CashDepositNo');\n$sql = \"INSERT INTO transactions \".\n\t\t\t\"(AccountNumber,Balance,AccountName,`DateTime`, \".\n \"Amount,AccountType,ClientNo,LastModifiedBy,LastModifiedDate,\".\n \"CashDepositNo,CashDepositType,LoanCreditPaymentPurpose,TransactionType,\".\n \"TransactionStatus,TransactionNo,Description,\".\n \"LoanCreditWitness,LoanCreditPaymentNo, LoanCreditPaymentName,LoanCreditApplicationStatus) \".\n \"values ('\".\n $values['AccountNumber'].\"', \".\n $values['OpeningBalance'].\", '\".\n $values['AccountName'].\"', '\".\n date(\"D M d, Y G:i\").\"', \".\n $values['OpeningBalance'].\", '\".\n \"Loan', '\".\n $values['ClientNo'].\"', '\".\n $values['LastModifiedBy'].\"', '\".\n $values['LastModifiedDate'].\"', '\".\n $RecID.\"', '\".\n $values['AccountName'].\"', '\".\n $values['LoanCreditPaymentPurpose'].\"', '\".\n \"Loan Credit','Approved','$RecID','$description','\".\n $values['LoanCreditWitness'].\"', '\". \n $RecID.\"', '\". \n $values['AccountName'].\"', 'Approved'\". \n \")\";\n\n\t\tdb_query($sql,$conn);\n\t\n\n\n\treturn;\n\n\n\n;\t\t\n}", "public function run()\n {\n Tetra::create([\n 'identifier' => \"1235\",\n 'year' => 2018,\n 'type' => 1,\n 'goal' => 123,\n 'campus_id' => Campus::first()->id,\n ]);\n }", "public function actionCreate()\n {\n $model = new Adds();\n $model->oder=1;\n $model->trend_on_date=date('Y-m-d');\n $model->trend_on_time=date('H:i');\n $model->trend_on_length=0;\n if ($model->load(Yii::$app->request->post())){\n $dt=$model->trend_on_date.' '.$model->trend_on_time;\n $dat=new DateTime($dt);\n $dat = date_modify($dat, \"+\".$model->trend_on_length.\" hour\");\n $model->trend_on=$dt;\n $model->trend_down=$dat->format('Y-m-d H:i:s');\n $url='#';\n if($model->book_code){\n $url=Url::base(true).Yii::$app->urlManager->createUrl(['/site/bookview','code'=>$model->book_code]);\n }\n else{\n $url=$model->url;\n }\n $model->url=$url;\n $model->upload();\n if($model->save())\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "function erp_acct_insert_purchase_data_into_ledger( $purchase_data ) {\n global $wpdb;\n\n $ledger_map = \\WeDevs\\ERP\\Accounting\\Includes\\Classes\\Ledger_Map::get_instance();\n $ledger_id = $ledger_map->get_ledger_id_by_slug( 'purchase' );\n\n if ( ! $ledger_id ) {\n return new WP_Error( 505, 'Ledger ID not found for purchase', $purchase_data );\n }\n // Insert amount in ledger_details\n $wpdb->insert(\n $wpdb->prefix . 'erp_acct_ledger_details',\n array(\n\t\t\t'ledger_id' => $ledger_id,\n\t\t\t'trn_no' => $purchase_data['voucher_no'],\n\t\t\t'particulars' => $purchase_data['particulars'],\n\t\t\t'debit' => $purchase_data['amount'],\n\t\t\t'credit' => 0,\n\t\t\t'trn_date' => $purchase_data['trn_date'],\n\t\t\t'created_at' => $purchase_data['created_at'],\n\t\t\t'created_by' => $purchase_data['created_by'],\n\t\t\t'updated_at' => $purchase_data['updated_at'],\n\t\t\t'updated_by' => $purchase_data['updated_by'],\n )\n );\n\n}", "public function createEntry($id = null);", "private function createTicket() : Ticket\n {\n $parkingSpot = ParkingSpot::all()->random();\n return Ticket::create([\n 'parking_spot_id' => $parkingSpot->id\n ]);\n }", "public static function create($telegram_id, $amount, $rate)\n\t{\n\n\t\t$db = Database::get();\n\n\t\ttry {\n\n\t\t\t$db->beginTransaction();\n\t\t\t$db->query(\"\tINSERT\n\t\t\t\t\t\t\t\t\tINTO\n\t\t\t\t\t\t\t\t\t `investment`(\n\t\t\t\t\t\t\t\t\t\t`telegram_id`,\n\t\t\t\t\t\t\t\t\t\t`amount`,\n\t\t\t\t\t\t\t\t\t\t`rate`,\n\t\t\t\t\t\t\t\t\t\t`contract_end_date`\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t \" . $db->quote($telegram_id) . \",\n\t\t\t\t\t\t\t\t\t \" . $db->quote($amount) . \",\n\t\t\t\t\t\t\t\t\t \" . $db->quote($rate) . \",\n\t\t\t\t\t\t\t\t\t NOW() + INTERVAL \" . (getenv(\"CONTRACT_DAY\")) . \" DAY\n\t\t\t\t\t\t\t\t\t)\");\n\t\t\t$db->commit();\n\t\t} catch (\\Exception $e) {\n\t\t\t$db->rollBack();\n\t\t\tthrow new \\Exception($e->getMessage());\n\t\t}\n\t}", "function incrementCreatedAt();", "public function create($fields = array()) {\n\t\tif(!$this->_db->insert('ticket', $fields)) {\n\t\t\tthrow new Exception('#80234 There was a problem adding a ticket');\n\t\t}\n\t}", "public function created($model)\n {\n // Do something\n /* Create accounts */\n $datetime = $model->asLocalTime($model->created_at);\n $accountId = $model->trade_account_id;\n $accountables = $model->heldCurrencyModels();\n foreach ($accountables as $account) {\n $account::create([\n 'id' => $accountId,\n 'amount' => 0,\n 'created_at' => $datetime,\n 'updated_at' => $datetime\n ]);\n }\n }", "public function newTicket(Request $request, $id)\r\n {\r\n// $data = Records::getRecord($id);\r\n// Exchange1C::netTicket($data);\r\n Exchange1C::updateNewTickets();\r\n }", "public function run()\n {\n // create 100 payments\n }", "function createRecordOrUpdatePoints($data){\r\n\t\tif(is_null($data['WeeklyLocationTotal']['id'])){\r\n\t\t\t$this->newFromStream($data['Location']['id'], $data['Week']['id'], $data['Attempt']['points']);\r\n\t\t} else {\r\n\t\t\t$this->set($data['WeeklyLocationTotal']);\r\n\t\t\t$this->updatePoints($data['Attempt']['points']);\t\t\t\r\n\t\t}\r\n\t}", "function create_note() {\n $this->crud_model->create_note();\n }", "public function runCreate()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t// Greate grouping for testing value types\r\n\t\t$cust = CAntObject::factory($dbh, \"customer\", null, $this->user);\r\n\t\t$grpd = $cust->addGroupingEntry(\"groups\", \"Regression Group\", \"e3e3e3\");\r\n\t\t$statd = $cust->addGroupingEntry(\"status_id\", \"Regression Status\", \"e3e3e3\");\r\n\r\n\t\t// Now loop through and create number objects\r\n\t\tfor ($i = 0; $i < $this->createNum; $i++)\r\n\t\t{\r\n\t\t\t$cust = CAntObject::factory($dbh, \"customer\", null, $this->user);\r\n\t\t\t$cust->setValue(\"name\", \"Regression Test \" . $i);\r\n\t\t\t$cust->setValue(\"status_id\", $statd['id']);\r\n\t\t\t$cust->setMValue(\"groups\", $grpd['id']);\r\n\t\t\t$cid = $cust->save();\r\n\r\n\t\t\t$this->ids[] = $cid;\r\n\t\t}\r\n\t}", "function erp_acct_update_purchase_data_into_ledger( $purchase_data, $purchase_no ) {\n global $wpdb;\n\n $ledger_map = \\WeDevs\\ERP\\Accounting\\Includes\\Classes\\Ledger_Map::get_instance();\n $ledger_id = $ledger_map->get_ledger_id_by_slug( 'purchase' );\n\n if ( ! $ledger_id ) {\n return new WP_Error( 505, 'Ledger ID not found for purchase', $purchase_data );\n }\n\n // insert contra `erp_acct_ledger_details`\n $wpdb->update( $wpdb->prefix . 'erp_acct_ledger_details', array(\n 'ledger_id' => $ledger_id,\n 'particulars' => ! empty( $purchase_data['particulars'] ) ? $purchase_data['particulars'] : '',\n 'credit' => $purchase_data['amount'],\n 'trn_date' => $purchase_data['trn_date'],\n 'created_at' => $purchase_data['created_at'],\n 'created_by' => $purchase_data['created_by'],\n 'updated_at' => $purchase_data['updated_at'],\n 'updated_by' => $purchase_data['updated_by']\n ), array(\n 'trn_no' => $purchase_no\n ) );\n}" ]
[ "0.5746092", "0.56541467", "0.55934244", "0.5590205", "0.55539984", "0.55193895", "0.5401249", "0.53825575", "0.5374628", "0.5372622", "0.5342811", "0.5319893", "0.5314685", "0.5306924", "0.52969897", "0.5296889", "0.5291289", "0.5290539", "0.5290325", "0.5284532", "0.52701336", "0.52602774", "0.5249988", "0.52220154", "0.52191687", "0.51857483", "0.51716477", "0.5161833", "0.51471144", "0.51464105" ]
0.62595963
0