query
stringlengths 10
8.11k
| document
stringlengths 17
398k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Creates a new instance for a given set of loaders | public function __construct(array $loaders = array())
{
$this->loaders = $loaders;
} | [
"public function __construct(array $loaders = array())\n {\n $this->loaders = array();\n foreach ($loaders as $loader)\n {\n $this->addLoader($loader);\n }\n }",
"public function addLoaders(array $loaders)\n {\n foreach ($loaders as $loader) {\n if (is_string($loader)) {\n $loader = new $loader();\n }\n\n if (!$loader instanceof InputLoaderInterface) {\n $name = is_object($loader) ? get_class($loader) : (string) $loader;\n throw new InvalidArgumentException('Given loader (' . $name . ') does not implement LoaderInterface', Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n\n $this->registerLoader($loader);\n }\n\n return $this;\n }",
"private function createLoader(array $paths)\n {\n $loader = new FilesystemLoader();\n\n foreach ($paths as $namespace => $path) {\n if (is_string($namespace)) {\n $loader->setPaths($path, $namespace);\n } else {\n $loader->addPath($path);\n }\n }\n\n return $loader;\n }",
"function loader($classes) {\n\t$classes[] = 'loader';\n\treturn $classes;\n}",
"public function createClassLoaders()\n {\n }",
"public function newInstance()\n {\n // Set the file locators in each loader instance.\n foreach($this->loaders as $loader) {\n if(false === $loader instanceof LoaderInterface) {\n throw new \\InvalidArgumentException(\"Loaders must implement Affiniti\\Config\\Loader\\LoaderInterface.\");\n }\n \n $loader->setLocator($this->fileLocator);\n }\n \n return new DelegatingLoader(new LoaderResolver($this->loaders));\n }",
"public static function setLoader($loader){}",
"public static function init() {\n\t\t$loaders = spl_autoload_functions();\n\n\t\tforeach ($loaders as &$loader) {\n\t\t\t$loaderToUnregister = $loader;\n\n\t\t\t// Only hook onto SilverStripe's SS_ClassLoader.\n\t\t\tif (is_array($loader) && ($loader[0] instanceof SS_ClassLoader)) {\n\t\t\t\t$originalLoader = $loader[0];\n\n\t\t\t\t// Configure library loader for doctrine annotation loader\n\t\t\t\tAnnotationRegistry::registerLoader(function ($class) use ($originalLoader) {\n\t\t\t\t\t$originalLoader->loadClass($class);\n\n\t\t\t\t\treturn class_exists($class, false);\n\t\t\t\t});\n\t\t\t\t$loader[0] = new AopSilverStripeLoader($loader[0]);\n\t\t\t}\n\t\t\tspl_autoload_unregister($loaderToUnregister);\n\t\t}\n\t\tunset($loader);\n\n\t\tforeach ($loaders as $loader) {\n\t\t\tspl_autoload_register($loader);\n\t\t}\n\t}",
"protected function _initResourceloaders()\n {\n ClassLoader::addStaticResources(array(\n 'viewhelper' => 'Webwijs\\View\\Helper',\n 'formdecorator' => 'Webwijs\\Form\\Decorator',\n 'formelement' => 'Webwijs\\Form\\Element',\n 'validator' => 'Webwijs\\Validate',\n 'facetsearch' => 'Webwijs\\FacetSearch',\n 'facetsearchfilter' => 'Webwijs\\FacetSearch\\Filter',\n 'model' => 'Webwijs\\Model',\n 'modeltable' => 'Webwijs\\Model\\Table',\n 'service' => 'Webwijs\\Service',\n ));\n }",
"private function registerDefaultWebLoaders()\n {\n if (function_exists('curl_init')) {\n $this->loaders['https'] = new CurlWebLoader('https://');\n $this->loaders['http'] = new CurlWebLoader('http://');\n } else {\n $this->loaders['https'] = new FileGetContentsWebLoader('https://');\n $this->loaders['http'] = new FileGetContentsWebLoader('http://');\n }\n }",
"public function getProcessorsLoader()\n {\n if ($this->processorsLoader === null)\n {\n $processorsToFilter = $this->parameters['processors'];\n $this->processorsLoader = new PluginLoader(\n 'PieCrust\\\\Baker\\\\Processors\\\\IProcessor',\n PieCrustDefaults::APP_DIR . '/Baker/Processors',\n function ($p1, $p2) { return $p1->getPriority() < $p2->getPriority(); },\n $processorsToFilter == '*' ?\n null :\n function ($p) use ($processorsToFilter) { return in_array($p->getName(), $processorsToFilter); },\n 'SimpleFileProcessor.php'\n );\n foreach ($this->processorsLoader->getPlugins() as $proc)\n {\n $proc->initialize($this->pieCrust);\n }\n }\n return $this->processorsLoader;\n }",
"public function loadServices($providers);",
"public function __construct( array $providers = array() ) {\n\t\t// array_unique ensures we only register each provider once.\n\t\t$providers = array_unique( array_merge( $this->providers, $providers ) );\n\n\t\tforeach ( $providers as $provider ) {\n\t\t\tif ( is_string( $provider ) && class_exists( $provider ) ) {\n\t\t\t\t$provider = new $provider;\n\t\t\t}\n\n\t\t\tif ( $provider instanceof ServiceProvider ) {\n\t\t\t\t$this->register( $provider );\n\t\t\t}\n\t\t}\n\t}",
"public function newLoader()\n {\n $loader = substr(get_class($this), 0, -9) . 'Loader';\n\n return app()->make($loader, ['extension' => $this]);\n }",
"protected function _initResourceloaders()\n {\n ClassLoader::addStaticResources(array(\n 'viewhelper' => 'Theme\\Helper',\n 'formelement' => 'Theme\\Admin\\Controller\\Form\\Element',\n ));\n }",
"protected function getFeatures_LoaderService()\n {\n $class = $this->getParameter('features.loader.class');\n $instance = new $class($this->getParameter('features.path'), $this->getParameter('container'));\n\n return $instance;\n }",
"protected function initLoader()\n {\n $this->versionParser = new VersionParser();\n\n if (!$this->loader) {\n $this->loader = new ArrayLoader($this->versionParser);\n }\n }",
"public function create_autoloader( $plugins ) {\n\t\tglobal $jetpack_packages_psr4;\n\t\t$jetpack_packages_psr4 = array();\n\t\t$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_psr4.php', $jetpack_packages_psr4 );\n\n\t\tglobal $jetpack_packages_classmap;\n\t\t$jetpack_packages_classmap = array();\n\t\t$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_classmap.php', $jetpack_packages_classmap );\n\n\t\tglobal $jetpack_packages_filemap;\n\t\t$jetpack_packages_filemap = array();\n\t\t$this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_filemap.php', $jetpack_packages_filemap );\n\n\t\t$loader = new Version_Loader(\n\t\t\t$this->version_selector,\n\t\t\t$jetpack_packages_classmap,\n\t\t\t$jetpack_packages_psr4,\n\t\t\t$jetpack_packages_filemap\n\t\t);\n\n\t\t// Activate the autoloader.\n\t\tAutoloader::activate( $loader );\n\t}",
"public function __construct($renderer, $base_path)\n {\n $rendererList = explode(',', $renderer);\n\n $this->nameList = array();\n $this->rendererList = array();\n\n //let's load the renderer dynamically\n foreach ($rendererList as $renderer) {\n $this->nameList[] = $renderer;\n if (in_array($renderer, array('Behat2', 'Twig', 'Minimal'))) {\n $className = __NAMESPACE__.'\\\\'.$renderer.'Renderer';\n } else {\n $className = $renderer;\n }\n $this->rendererList[$renderer] = new $className();\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get payment gateway callback/notification response. | public function getCallbackResponse(
Request $request,
PaymentGatewayConfigurationInterface $paymentGatewayConfiguration
): GatewayResponse; | [
"public function getPaymentResponse()\n {\n return $this->payment_response;\n }",
"public function getPaymentResponse();",
"public function getGatewayResponse();",
"public function payment_response()\r\n\t{\r\n\t\t$this->checkout_model->process_payment_status_in_general($_POST, $_GET);\r\n\t}",
"public function getPayPalResponse(){\r\n\t\t\r\n\t}",
"public function getNativeResponse()\n {\n $this->info();\n return $this->stripe_subscription;\n }",
"public function getNativeResponse()\n {\n $this->info();\n return $this->braintree_charge;\n }",
"public function getNativeResponse()\n {\n $this->info();\n return $this->braintree_subscription;\n }",
"public function responseAction()\n\t{\n\t\t$validated = true;\n\t\t$orderId = $_POST['orderNo'];// Generally sent by gateway\n\t\t\n\t\tif($validated) {\n\t\t\t// Payment was successful, so update the order's state, send order email and move to the success page\n\t\t\t$order = Mage::getModel('sales/order');\n\t\t\t$order->loadByIncrementId($orderId);\n\t\t\t$order->addStatusToHistory($order->getStatus(), Mage::helper('payza')->__('Customer successfully returned from Gateway'));\n\t\t\t$order->sendNewOrderEmail();\n\t\t\t$order->setEmailSent(true);\n\t\t\t$order->save();\n\t\t\tMage::getSingleton('checkout/session')->unsQuoteId();\n\t\t\t$this->_redirect('checkout/onepage/success', array('_secure'=>true));\n\t\t}\n\t\telse {\n\t\t\t// There is a problem in the response we got\n\t\t\t$this->_redirect('checkout/onepage/failure');\n\t\t}\n\t}",
"public function responseAction() {\n\t\tif($this->getRequest()->isGet()) {\n\t\t\t\n\t\t\t/*\n\t\t\t/* Your gateway's code to make sure the reponse you\n\t\t\t/* just got is from the gatway and not from some weirdo.\n\t\t\t/* This generally has some checksum or other checks,\n\t\t\t/* and is provided by the gateway.\n\t\t\t/* For now, we assume that the gateway's response is valid\n\t\t\t*/\n\n\n\n\t\t\t$code1 = $this->getRequest()->get(\"code\");\n\t\t\t$status =$this->getRequest()->get(\"status\");\n\t\t\t$transaction_id =$this->getRequest()->get(\"transaction_id\");\n\n\n\t\t\t$orderId = substr($transaction_id,3); // Generally sent by gateway\n if ($code1=='000'){\n $validated = true;\n }elseif ($code1=='900'){\n $validated = false;\n }else{\n $validated = false;\n }\n\n\t\t\tif($validated) {\n\t\t\t\t// Payment was successful, so update the order's state, send order email and move to the success page\n\t\t\t\t$order = Mage::getModel('sales/order');\n\t\t\t\t$order->loadByIncrementId($orderId);\n\t\t\t\t$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, 'Gateway has authorized the payment.');\n\t\t\t\t\n\t\t\t\t$order->sendNewOrderEmail();\n\t\t\t\t$order->setEmailSent(true);\n\t\t\t\t\n\t\t\t\t$order->save();\n\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->unsQuoteId();\n\t\t\t\t\n\t\t\t\tMage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure'=>true));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// There is a problem in the response we got\n\t\t\t\t$this->cancelAction();\n\n $this->_redirect('checkout/cart');\n\t\t\t\t//Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure'=>true));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tMage_Core_Controller_Varien_Action::_redirect('');\n\t}",
"public function getResponseMessage () {}",
"public function get_stored_payment_response() {\n\n\t\t$response_data = WC()->session->get( 'apple_pay_payment_response', array() );\n\t\t$response = null;\n\n\t\tif ( ! empty( $response_data ) ) {\n\t\t\t$response = $this->build_payment_response( $response_data );\n\t\t}\n\n\t\treturn $response instanceof SV_WC_Payment_Gateway_Apple_Pay_Payment_Response ? $response : false;\n\t}",
"public function getGatewayResponseCode(): ?string\n {\n return $this->_gateway_response_code;\n }",
"function handleResponse () {\n\n\t\t// get the generator instance\n\t\t$gen_class = $this->identifyPaymentMode();\n\t\tif (!is_null($gen_class)) {\n\t\t\t$generator = new $gen_class(); \n\t\t\treturn (Array)\t$generator->handleResponse();\n\t\t} else {\n\t\t\t// error on return call\n\t\t\tlogCheckFileExists($_SERVER['DOCUMENT_ROOT'].'/log/payment.log');\n\t\t\t$f = fopen($_SERVER['DOCUMENT_ROOT'].'/log/payment.log', 'a+');\n\t\t\tfwrite($f, \"\\n\".'['.date('d/m/Y H:i:s').'] - Paiement : '.$pay_mode.' - Erreur sur retour de paiement');\n\t\t\tfclose($f);\n\t\t}\n\t}",
"public function getGatewayResponseCode(): string\n {\n return $this->getData(self::GATEWAY_RESPONSE_CODE);\n }",
"function handleReturn()\n\t\t{\n\t\t\t$token = $_REQUEST['TOKEN']; // The payson token for the order.\n\t\t\t$paymentDetailsData = $this->_PaymentDetails($token); // Get payment details about the payment.\n\t\t\t$returner = array('OriginalResponse' => $paymentDetailsData, 'ExternalId' => @$paymentDetailsData['responseEnvelope_correlationId']); // Save the response from Payson for debugging\n\n\t\t\tif($paymentDetailsData['responseEnvelope_ack'] == 'SUCCESS') // If the request was successfull\n\t\t\t{\n\t\t\t\tif($paymentDetailsData['status'] == 'COMPLETED'): // Check if the payment was completed\n // Return information about how to find the payment, and its status.\n\t\t\t\t\t$returner['Status'] = 'COMPLETED';\n\t\t\t\t\t$returner['GetBy'] = 'ExternalReference';\n\t\t\t\t\t$returner['GetValue'] = $token;\n\t\t\t\telse:\n\t\t\t\t\t$returner['Status'] = 'FAILURE';\n\t\t\t\tendif;\n\t\t\t}\n\n\t\t\treturn $returner;\n\t\t}",
"public function getPaymentResult($gatewayResponse = null)\n {\n $gatewayResponse = $gatewayResponse ?: Input::all();\n\n switch ($gatewayResponse['Status']) {\n case 'AU':\n $paymentResult = self::PAYMENT_RESULT_OK;\n break;\n case 'DE':\n $paymentResult = self::PAYMENT_RESULT_DECLINED;\n break;\n case 'CA':\n $paymentResult = self::PAYMENT_RESULT_CANCELLED_BY_CARDHOLDER;\n break;\n case 'TI':\n $paymentResult = self::PAYMENT_TIMED_OUT;\n break;\n case 'EX':\n default:\n $paymentResult = self::PAYMENT_RESULT_FAILED;\n break;\n }\n\n return $paymentResult;\n }",
"public function confirmationPayment()\n {\n $response = $this->client->request($this->methods['post'], \"payment_gateway_api/confirm_payment\", [\n 'json' => [\n 'AGR_TRANS_ID' => $this->agr_trans_id,\n 'VERIFICATION_CODE' => $this->verification_code,\n 'SIGN_TIME' => $this->generateSignTime(),\n 'SIGN_STRING' => md5($this->SECRET_KEY. $this->agr_trans_id.$this->verification_code. $this->sign_time)\n ]\n ]);\n\n return json_decode($response->getBody());\n }",
"public function callback()\n {\n try {\n $json = file_get_contents('php://input');\n $temp = json_decode($json, true);\n $data = $temp['data'];\n\n $this->key = $this->config->get('payment_pmt_secret_key');\n\n $signature_check = sha1($this->key.$temp['account_id'].$temp['api_version'].$temp['event'].$temp['data']['id']);\n $signatureCheckSha512 = hash('sha512', $this->key.$temp['account_id'].$temp['api_version'].$temp['event'].$temp['data']['id']);\n if ($signature_check != $temp['signature'] && $signatureCheckSha512 != $temp['signature']) {\n //hack detected - not implemented yet\n die('ERROR - Hack attempt detected');\n }\n\n $order_id = $data['order_id'];\n $pmt_order_id = $data['id'];\n $event = $temp['event'];\n if ($event == 'charge.created') {\n $this->load->model('checkout/order');\n // Load order, and verify the order has not been processed before, if it has, go to success page\n $order_info = $this->model_checkout_order->getOrder($order_id);\n $order_message = \"Order ID=$order_id - PMT order_id=$pmt_order_id\";\n $this->model_checkout_order->addOrderHistory($order_id, self::ORDER_STATUS, $order_message, true);\n\n $order_info = $this->model_checkout_order->getOrder($order_id);\n if ($order_info) {\n if ($order_info['order_status_id'] == self::ORDER_STATUS) {\n //RESPONSE OK\n $response = array (\n 'statusCode' => '200',\n 'result' => 'Order confirmed',\n 'timestamp' => time(),\n 'order_id' => $order_id\n );\n } else {\n //RESPONSE KO\n $response = array (\n 'statusCode' => '500',\n 'result' => 'Order NOT confirmed',\n 'timestamp' => time(),\n 'order_id' => $order_id\n );\n }\n }\n } elseif ($event == 'charge.failed') {\n //do nothing\n }\n } catch (\\Exception $e) {\n $response = array (\n 'statusCode' => '500',\n 'result' => $e->getMessage(),\n 'timestamp' => time(),\n 'order_id' => $order_id\n );\n }\n\n $toJson = json_encode($response, JSON_UNESCAPED_SLASHES);\n $status = $response['statusCode'];\n header(\"HTTP/1.1 \".$status, true, $status);\n header('Content-Type: application/json', true);\n echo ($toJson);\n exit();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get human readable name for a message constant. | public function getMessageLevelName($constant) {
$map = array(
MigrationBase::MESSAGE_ERROR => t('Error'),
MigrationBase::MESSAGE_WARNING => t('Warning'),
MigrationBase::MESSAGE_NOTICE => t('Notice'),
MigrationBase::MESSAGE_INFORMATIONAL => t('Informational'),
);
return $map[$constant];
} | [
"public function getConstantName(): string\n {\n return $this->constant;\n }",
"public function getErrorConstantName(){\n\t\treturn isset(self::$errors_constants[$this->code])\n\t\t\t? self::$errors_constants[$this->code]\n\t\t\t: \"UNKNOWN [{$this->code}]\";\n\t}",
"public function getMessageName()\n {\n return $this->messageName();\n }",
"private function getUsedConstantsMessage(): string\r\n {\r\n $usedConstants = '';\r\n if (!empty($this->usedConstants)) {\r\n foreach ($this->usedConstants as $const => $value) {\r\n $usedConstants .= sprintf('%s %s %s, '\r\n , Stylizer::constant($const)\r\n , Stylizer::operation('=')\r\n , Stylizer::type($value));\r\n }\r\n }\r\n return $usedConstants;\r\n }",
"private function getConstantName(CActiveRecord $model)\n\t{\n\t\treturn strtoupper(str_replace(array(' ', '-', ':', '=', '+'), '_', $model->title));\n\t}",
"public function describe()\n {\n $class = $this->class !== Message::CLASS_IN ? 'CLASS' . $this->class . ' ' : '';\n $type = 'TYPE' . $this->type;\n $ref = new \\ReflectionClass('RectorPrefix202309\\\\React\\\\Dns\\\\Model\\\\Message');\n foreach ($ref->getConstants() as $name => $value) {\n if ($value === $this->type && \\strpos($name, 'TYPE_') === 0) {\n $type = \\substr($name, 5);\n break;\n }\n }\n return $this->name . ' (' . $class . $type . ')';\n }",
"public function getFullConstantName(): string\n {\n $classname = $this->getEntity()->getName() . 'EntityMap';\n $const = $this->getConstantName();\n\n return $classname.'::'.$const;\n }",
"public function getMathConstantName()\n\t\t{\n\t\t\treturn $this->constant;\n\t\t}",
"public function localizedName() {\n\t\t$name = \\GO::t('name', $this->name());\n\t\tif($name=='name')\n\t\t\t$name = $this->name();\n\t\treturn $name;\n\t}",
"public function getGenericConstantsName()\n {\n return $this->getOptionValue(self::GENERIC_CONSTANTS_NAME);\n }",
"function attrTypeConstantToString($const)\n {\n if (in_array($const, array_keys($this->aTypeConsts))) {\n return strtoupper($this->aTypeConsts[$const]);\n\n } else {\n return 'not found';\n }\n }",
"public static function formatting($constName) {\n return StrHelper::toCamelCase(strtolower($constName));\n }",
"private function getConstantName($value)\n {\n return strtoupper(\n $this->prefixLeadingDigits(\n str_replace(\n [':', '-', '!', '+'],\n '_',\n preg_replace('/([a-z])([A-Z])/', '$1_$2', $value)\n )\n )\n );\n }",
"public function getDefaultValueConstantName () {}",
"public function getConstantName($name) {\r\n\t\treturn \"CURLOPT_\".strtoupper($name);\r\n\t}",
"public function getDefaultValueConstantName()\n {\n return $this->constantName;\n }",
"public function getName()\n {\n if (!empty($this->nameSingular)) {\n return Piwik::translate($this->nameSingular);\n }\n\n return $this->nameSingular;\n }",
"public function getStatusName(): string\n {\n switch ($this->status) {\n case -1:\n return __('main.service_request_status.cancelled');\n case 0:\n return __('main.service_request_status.unassigned');\n case 1:\n return __('main.service_request_status.assigned');\n default:\n return \"Unknown\";\n }\n }",
"public function getMessageTemplate(): string\n {\n if ($this->messageTemplate) {\n return $this->messageTemplate;\n }\n if (isset($this->options['label'])) {\n return constant(get_class($this) . '::LABELED_MESSAGE');\n }\n\n return constant(get_class($this) . '::MESSAGE');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the rule admin type | abstract public function getAdminType(); | [
"function AdminType()\n\t{\n\t\treturn $this->admintype;\n\t}",
"function GetAdminType($admintype = 'a')\n\t{\n\t\tif (!in_array($admintype, array_keys($this->AdminTypes))) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($admintype == 'c') {\n\t\t\treturn $admintype;\n\t\t}\n\n\t\treturn $this->AdminTypes[$admintype];\n\t}",
"function getRuleType()\n {\n return $this->ruleType;\n }",
"public function getRuleType()\n {\n return $this->ruleType;\n }",
"function get_rule($type='rule_client')\n {\n $CI =& get_instance();\n $CI->load->model('user_mod');\n\n return $CI->user_mod->$type;\n }",
"public function getRuleTypeId()\n {\n return $this->iRuleTypeDatabaseId;\n }",
"public function getAdminColumnType()\n {\n return $this->getData('admin_column_type');\n }",
"public function getManagertype()\n {\n return $this->source->getManagertype();\n }",
"public static function admin_post_type(){\n global $post, $typenow, $current_screen;\n\n // Check to see if a post object exists\n if ($post && $post->post_type)\n return $post->post_type;\n\n // Check if the current type is set\n elseif ($typenow)\n return $typenow;\n\n // Check to see if the current screen is set\n elseif ($current_screen && $current_screen->post_type)\n return $current_screen->post_type;\n\n // Finally make a last ditch effort to check the URL query for type\n elseif (isset($_REQUEST['post_type']))\n return sanitize_key($_REQUEST['post_type']);\n \n return '-1';\n }",
"function getType() {\n\t\tif ( !$this->_Type ) {\n\t\t\t$this->_Type = self::TYPE_SITE;\n\t\t\tif ( $this->getSiteConfig()->getParentSite()->getParamValue() == self::SYSTEM_BASEADMINSITE_NAME || $this->getDomainName() == self::SYSTEM_BASEADMINSITE_NAME ) {\n\t\t\t\t$this->_Type = self::TYPE_ADMIN;\n\t\t\t} else {\n\t\t\t\t$oParent = $this->getSiteConfig()->getParentConfig();\n\t\t\t\twhile ( is_object($oParent) && $oParent->getParentSite()->getParamValue() ) {\n\t\t\t\t\tif ( $oParent->getParentSite()->getParamValue() == self::SYSTEM_BASEADMINSITE_NAME ) {\n\t\t\t\t\t\t$this->_Type = self::TYPE_ADMIN;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$oParent = $oParent->getParentConfig();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_Type;\n\t}",
"public function get_current_admin_post_type(): string {\n\n\t\t$screen = get_current_screen();\n\n\t\tif ( is_a( $screen, '\\WP_Screen' ) ) {\n\t\t\tif ( isset( $screen->post_type ) ) {\n\t\t\t\treturn (string) $screen->post_type;\n\t\t\t}\n\t\t}\n\n\t\t$post_id = (int) filter_input( INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT );\n\t\t$post_type = get_post_type( $post_id );\n\n\t\tif ( false !== $post_type ) {\n\t\t\treturn (string) $post_type;\n\t\t}\n\n\t\treturn (string) filter_input( INPUT_GET, 'post_type', FILTER_SANITIZE_STRING );\n\t}",
"private function get_admin_edit_screen_post_type() {\n\n\t\t$screen = get_current_screen();\n\n\t\treturn $screen->post_type;\n\n\t}",
"function get_admin_types()\n\t{\n\t\t$admin_types = false;\n\t\t\n\t\t$type = new Admin_type();\n\t\t$type->get();\n\t\t\n\t\tforeach( $type->all as $a )\n\t\t{\n\t\t\t$admin_types[ $a->id ] = $a->name;\n\t\t}\n\t\t\n\t\treturn $admin_types;\n\t}",
"function AdminCategory($type)\n{\n\treturn Lphelper::LPAdminCategory($type);\n}",
"public function is_admin(){\n\t if($this->admin==0){\n\t return 'user';\n\t }else if($this->admin==1){\n\t return 'admin';\n\t }else if($this->admin==2){\n\t return 'teacher';\n\t }\n\t}",
"function GetListAdminTypes()\n\t{\n\t\treturn $this->ListAdminTypes;\n\t}",
"public function getAdminPermission() {\n return $this->entityType->getAdminPermission();\n }",
"public function getAdministrativeAreaType();",
"public function getAdmin() {\n return $this->adminElement;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of prependItem method. | public function testPrependItem() {
$routerStub = $this->createMock(Router::class);
$breadcrumbsHelper = new BreadcrumbsHelper($routerStub);
$breadcrumbsHelper->addItem("Link One", "http://example.com/one");
$breadcrumbsHelper->prependItem("Link Two", "http://example.com/two");
// Define expected result array
$resultArray[] = new Breadcrumb("Link Two", "http://example.com/two", "breadcrumbs", [], true);
$resultArray[] = new Breadcrumb("Link One", "http://example.com/one", "breadcrumbs", [], true);
$this->assertEquals($resultArray, $breadcrumbsHelper->getNamespaceBreadcrumbs());
} | [
"public function prepend($item);",
"public function prepend($item) : Sequence;",
"public function testActionExecutionItemPrepend() {\n // Test adding a value at the start.\n $list = ['One', 'Two', 'Three'];\n\n $this->action\n ->setContextValue('list', $list)\n ->setContextValue('item', 'Zero')\n ->setContextValue('pos', 'start');\n\n $this->action->execute();\n\n // The list should contain four items, with the new item added at the start.\n $this->assertArrayEquals([\n 'Zero',\n 'One',\n 'Two',\n 'Three',\n ], $this->action->getContextValue('list'));\n }",
"public function prepend(string $item): void\n {\n if (isset($this->cache[$item])) {\n return;\n }\n\n array_unshift($this->list, $item);\n $this->cache[$item] = true;\n ++$this->length;\n }",
"public function testPrependRouteItem() {\n $routerStub = $this->createMock(Router::class);\n $routerStub->method(\"generate\")\n ->willReturn(\"http://example.com/generate\");\n\n $breadcrumbsHelper = new BreadcrumbsHelper($routerStub);\n $breadcrumbsHelper->addRouteItem(\"Link One\", \"link.one\", []);\n $breadcrumbsHelper->prependRouteItem(\"Link Two\", \"link.two\", []);\n\n // Define expected result array\n $resultArray[] = new Breadcrumb(\"Link Two\", \"http://example.com/generate\", \"breadcrumbs\", [], true);\n $resultArray[] = new Breadcrumb(\"Link One\", \"http://example.com/generate\", \"breadcrumbs\", [], true);\n\n $this->assertEquals($resultArray, $breadcrumbsHelper->getNamespaceBreadcrumbs());\n }",
"public function testPrepend()\n {\n $value = Util::prepend('something', 'pre_');\n $this->assertEquals($value, 'pre_something');\n\n $value = Util::prepend('pre_something', 'pre_');\n $this->assertEquals($value, 'pre_something');\n\n $value = Util::prepend('somethingpre_.else', 'pre_');\n $this->assertEquals($value, 'pre_somethingpre_.else');\n }",
"public function prepend($item) {\n\n\t\tif(!$this->isValidItem($item)) {\n\t\t\tif($item instanceof WireArray) {\n\t\t\t\tforeach($item as $i) $this->prepend($i); \n\t\t\t\treturn $this; \n\t\t\t} else {\n\t\t\t\tthrow new WireException(\"Item prepend to \" . get_class($this) . \" is not an allowed type\"); \n\t\t\t}\n\t\t}\n\n\t\tif($this->duplicateChecking && ($key = $this->getItemKey($item)) !== null) {\n\t\t\t// item already present\n\t\t\t$a = array($key => $item); \n\t\t\t$this->data = $a + $this->data; // UNION operator for arrays\n\t\t\t// $this->data = array_merge($a, $this->data); \n\t\t} else { \n\t\t\t// new item\n\t\t\tarray_unshift($this->data, $item); \n\t\t\treset($this->data);\n\t\t\t$key = key($this->data);\n\t\t}\n\t\t//if($item instanceof Wire) $item->setTrackChanges();\n\t\t$this->trackChange('prepend', null, $item); \n\t\t$this->trackAdd($item, $key); \n\t\treturn $this; \n\t}",
"public function beforeItemAdd($item)\n {\n }",
"public function testPrepend()\n {\n $dom = new DomQuery('<a>X</a>');\n $dom->find('a')->prepend('<span></span>', '<i></i>');\n $this->assertEquals('<a><i></i><span></span>X</a>', (string) $dom);\n $this->assertEquals(1, $dom->find('span')->length);\n }",
"public function prepend($data){}",
"function newItemBefore()\n\t{\n\t\t$li =& $this->getNode();\n\t\t$new_li =& $this->dom->create_element(\"ListItem\");\n\t\t$new_li =& $li->insert_before($new_li, $li);\n\t}",
"public function prependItem($item, $key=null): CollectionInterface;",
"public function insertBefore($index, $item)\r\n {\r\n if ($index === -1) {\r\n if (count($this) === 0) {\r\n return parent::add($item);\r\n }\r\n return parent::insert(0, $item);\r\n }\r\n\r\n return parent::insert($index, $item);\r\n }",
"public function prepend(self $item, ?\\SetaPDF_Core_Document $document = null, $mode = null) {}",
"public function test_prepare_item() {\n\t}",
"public function prepend($value)\n\t{\n\t\tarray_unshift($this->items, $value);\n\t}",
"public function prepend($value)\n {\n array_unshift($this->items, $value);\n }",
"public function addBefore($beforeKey, array $newItem);",
"function PreProcessItemData()\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads the supplied file demarcated by semicolons and returns an array of SQL fragments. The return array will contain unprocessed SQL fragments that could be just whitespace and/or comments. | public function parse($sqlFile)
{
$sql = $this->getNormalizedContent($sqlFile);
$seekPos = 0;
$return = [];
while (true) {
$nextPos = $this->getSemiColonPos($sql, $seekPos);
if ($nextPos === false) {
$return[] = substr($sql, $seekPos);
break;
} else {
$return[] = substr($sql, $seekPos, $nextPos - $seekPos);
$seekPos = $nextPos + 1;
}
}
return $return;
} | [
"private function readSqlFile($name)\n {\n $sql = '';\n $lines = file($name);\n foreach ($lines as $line) {\n $line = trim($line);\n if (!empty($line) && substr($line, 0, 2) != '--') {\n $sql .= \"$line\";\n }\n }\n\n return explode(';', $sql);\n }",
"function getSQLCommands($fileName) {\n $commands = array();\n\n $fh = fopen($fileName, 'r');\n if ($fh) {\n $command = '';\n while (($buffer = fgets($fh, 4096)) !== false) {\n if (strpos($buffer, '--') === 0) { //we have a 'special' comment\n //add current command to commands\n if (count(trim($command)) > 0) {\n $commands[] = $command;\n }\n\n //reset current command\n $command = '';\n } else if (count(trim($buffer)) > 0) { //we have a command (fragment), try to ignore blank lines\n $command .= ' ' . $buffer;\n }\n }\n\n //add last line command to commands\n if (count(trim($command)) > 0) {\n $commands[] = $command;\n }\n\n if (!feof($fh)) {\n echo \"Error: unexpected fgets() fail\\n\";\n }\n\n fclose($fh);\n }\n\n return $commands;\n}",
"private function getSqlStatements($fileName)\n {\n $sqlStatements = file_get_contents($fileName);\n $sqlStatements = str_replace('PREFIX_', _DB_PREFIX_, $sqlStatements);\n $sqlStatements = str_replace('ENGINE_TYPE', _MYSQL_ENGINE_, $sqlStatements);\n\n return $sqlStatements;\n }",
"function _read_sql_command_from_file($f) {\n\t\t$out = '';\n\t\twhile ($line = fgets($f)) {\n\t\t\t$first2 = substr($line, 0, 2);\n\t\t\t$first3 = substr($line, 0, 2);\n\n\t\t\t// Ignore single line comments. This function doesn't support multiline comments or inline comments.\n\t\t\tif ($first2 != '--' && ($first2 != '/*' || $first3 == '/*!')) {\n\t\t\t\t$out .= ' ' . trim($line);\n\t\t\t\t// If a line ends in ; or */ it is a sql command.\n\t\t\t\tif (substr($out, strlen($out) - 1, 1) == ';') {\n\t\t\t\t\treturn trim($out);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn trim($out);\n\t}",
"public function splitSqlFile($filename)\n {\n $handle = fopen($filename, 'r');\n $queries = 0;\n $db = DataAccess::getInstance();\n if ($handle) {\n $buffer = '';\n while (!feof($handle)) {\n $this_buffer = fgets($handle, 4096);\n //$this_buffer = rtrim($buffer);\n if (substr(ltrim($this_buffer), 0, 1) == '#' || substr(ltrim($this_buffer), 0, 2) == '--') {\n //comment line\n continue;\n }\n $buffer .= $this_buffer;\n //$buffer = rtrim($buffer);\n if (substr(rtrim($buffer), -1) == ';') {\n //end of query, add query\n $db->Execute($buffer);\n $queries++;\n $buffer = '';\n }\n }\n }\n return $queries;\n }",
"function import_sql($file, $delimiter = ';') {\n $handle = fopen($file, 'r');\n $sql = '';\n\n if($handle) {\n /*\n * Loop through each line and build\n * the SQL query until it detects the delimiter\n */\n while(($line = fgets($handle, 4096)) !== false) {\n $sql .= trim(' ' . trim($line));\n if(substr($sql, -strlen($delimiter)) == $delimiter) {\n qa_db_query_sub($sql);\n $sql = '';\n }\n }\n\n fclose($handle);\n }\n}",
"function _processSQLfile($filename)\n {\n $file_content = file($filename);\n $query = \"\";\n foreach($file_content as $sql_line)\n {\n $tsl = trim($sql_line);\n if (($sql_line != \"\") && (substr($tsl, 0, 2) != \"--\") && (substr($tsl, 0, 1) != \"#\"))\n {\n $query .= $sql_line;\n if(preg_match(\"/;\\s*$/\", $sql_line))\n {\n // We need to remove only the last semicolon\n $pos = strrpos($query,\";\");\n if($pos !== false)\n {\n $query = substr($query,0,$pos).substr($query,$pos+1);\n }\n\n $result = pdo_query($query);\n if (!$result)\n {\n $xml .= \"<db_created>0</db_created>\";\n die(pdo_error());\n }\n $query = \"\";\n }\n }\n } // end for each line\n }",
"private function runSQL($filename)\n\t{\n\t\t$this->load->helper('file');\n\t\t\n\t\t// Temporary variable, used to store current query\n\t\t$templine = '';\n\t\t\n\t\t// delimiter\n\t\t$delimiter = \";\";\n\n\t\t// Read in entire file\n\t\t$lines = file($filename);\n\t\t\n\t\t// Loop through each line\n\t\tforeach ($lines as $line_num => $line) {\n\t\t\t$line = trim($line);\n\t\t\t\n\t\t\t// Only continue if it's not a comment\n\t\t\tif (strtoupper(substr($line, 0, 9)) == 'DELIMITER') {\n\t\t\t\t$delimiter = substr($line, -1, 1);\n\t\t\t\t//print \"Line: \".$line.\" Changed delimited to \".$delimiter.\"<br>\";\n\t\t\t}\n\t\t\telseif (substr($line, 0, 2) != '--' && $line != '') {\n\t\t\t\t// Add this line to the current segment\n\t\t\t\t$templine .= ' '.$line;\n\t\t\t\t\n\t\t\t\t// If it has a delimiter at the end, it's the end of the query\n\t\t\t\tif (substr($line, -1, 1) == $delimiter) {\n\t\t\t\t\t// remove the delimiter\n\t\t\t\t\t$templine = rtrim($templine, $delimiter); \n\t\t\t\t\t\n\t\t\t\t\t// Perform the query\n\t\t\t\t\t$this->db->query($templine) or print('Error performing query \\'<b>' . $templine . '</b>\\': ' . mysql_error() . '<br /><br />');\n\t\t\t\t\t// Reset temp variable to empty\n\t\t\t\t\t$templine = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t//echo \"Delimiter: \".$delimiter.\". SQL: \".$templine.\"<br>\";\n\t\t}\n\t}",
"public function loadSql(string $fixturePath): array\n {\n if (!file_exists($fixturePath)) {\n throw new FixtureLoaderEx(\"Fixture $fixturePath does not exist.\");\n }\n\n $handle = @fopen($fixturePath, 'r');\n\n if (!$handle) {\n throw new FixtureLoaderEx(\"Error opening fixture $fixturePath.\");\n }\n\n $sqlArr = [];\n\n $index = 0;\n while (($sql = fgets($handle)) !== false) {\n // Skip comments\n if (substr($sql, 0, 2) == '--') {\n continue;\n }\n\n $isMultiLineSql = array_key_exists($index, $sqlArr);\n $isEndOfSql = substr($sql, -2, 1) == ';';\n\n if ($isMultiLineSql) {\n $sqlArr[$index] .= $sql;\n } else {\n $sqlArr[$index] = $sql;\n }\n\n if ($isEndOfSql) {\n $sqlArr[$index] = trim($sqlArr[$index]);\n ++$index;\n }\n }\n\n fclose($handle);\n\n return $sqlArr;\n }",
"function trim_cfx_ingres_sql($file_contents) {\r\n $output = \"\";\r\n $line = \"\";\r\n $in_sql = false;\r\n foreach ($file_contents as $line) {\r\n if (preg_match(\"/sql\\s*=\\s*\\\"\\s*$/i\", $line)) {\r\n $in_sql = true;\r\n }\r\n if ($in_sql) {\r\n if (preg_match(\"/\\\"\\>/\", $line)) {\r\n $in_sql = false;\r\n $line = trim($line);\r\n }\r\n if ($in_sql) {\r\n $line = str_replace(\"\\n\", \" \", $line);\r\n $line = str_replace(\"\\r\", \" \", $line);\r\n $line = str_replace(\"\\t\", \" \", $line);\r\n $line = trim($line);\r\n }\r\n $output .= $line;\r\n } else {\r\n $output .= $line . \"\\n\";\r\n }\r\n }\r\n return explode(\"\\n\", $output);\r\n}",
"public function parseSql(string $sql)\n {\n # Clean Up Soure Code\n $sql = str_replace(\";\\r\\n\", \";\\n\", $sql); // Convert windows line endings on STATEMENTS ONLY\n $sql = preg_replace('!/\\*.*?\\*/!s', '', $sql);\n $sql = preg_replace('/^-- .*$/m', '', $sql); // Remove Comment line starting with --\n $sql = preg_replace('/^#.*$/m', '', $sql); // Remove Comments start with #\n \n $statements = [];\n if ($sql) {\n $statements = explode(\";\\n\", $sql);\n $statements = array_map('trim', $statements);\n }\n \n return $statements;\n }",
"function split_sql_file($sql, $delimiter)\r\n {\r\n // Split up our string into \"possible\" SQL statements.\r\n $tokens = explode($delimiter, $sql);\r\n\r\n // try to save mem.\r\n $sql = \"\";\r\n $output = array();\r\n\r\n // we don't actually care about the matches preg gives us.\r\n $matches = array();\r\n\r\n // this is faster than calling count($oktens) every time thru the loop.\r\n $token_count = count($tokens);\r\n for ($i = 0; $i < $token_count; $i++)\r\n {\r\n // Don't wanna add an empty string as the last thing in the array.\r\n if (($i != ($token_count - 1)) || (strlen($tokens[$i] > 0)))\r\n {\r\n // This is the total number of single quotes in the token.\r\n $total_quotes = preg_match_all(\"/'/\", $tokens[$i], $matches);\r\n // Counts single quotes that are preceded by an odd number of backslashes,\r\n // which means they're escaped quotes.\r\n $escaped_quotes = preg_match_all(\"/(?<!\\\\\\\\)(\\\\\\\\\\\\\\\\)*\\\\\\\\'/\", $tokens[$i], $matches);\r\n\r\n $unescaped_quotes = $total_quotes - $escaped_quotes;\r\n\r\n // If the number of unescaped quotes is even, then the delimiter did NOT occur inside a string literal.\r\n if (($unescaped_quotes % 2) == 0)\r\n {\r\n // It's a complete sql statement.\r\n $output[] = $tokens[$i];\r\n // save memory.\r\n $tokens[$i] = \"\";\r\n }\r\n else\r\n {\r\n // incomplete sql statement. keep adding tokens until we have a complete one.\r\n // $temp will hold what we have so far.\r\n $temp = $tokens[$i] . $delimiter;\r\n // save memory..\r\n $tokens[$i] = \"\";\r\n\r\n // Do we have a complete statement yet?\r\n $complete_stmt = false;\r\n\r\n for ($j = $i + 1; (!$complete_stmt && ($j < $token_count)); $j++)\r\n {\r\n // This is the total number of single quotes in the token.\r\n $total_quotes = preg_match_all(\"/'/\", $tokens[$j], $matches);\r\n // Counts single quotes that are preceded by an odd number of backslashes,\r\n // which means they're escaped quotes.\r\n $escaped_quotes = preg_match_all(\"/(?<!\\\\\\\\)(\\\\\\\\\\\\\\\\)*\\\\\\\\'/\", $tokens[$j], $matches);\r\n\r\n $unescaped_quotes = $total_quotes - $escaped_quotes;\r\n\r\n if (($unescaped_quotes % 2) == 1)\r\n {\r\n // odd number of unescaped quotes. In combination with the previous incomplete\r\n // statement(s), we now have a complete statement. (2 odds always make an even)\r\n $output[] = $temp . $tokens[$j];\r\n\r\n // save memory.\r\n $tokens[$j] = \"\";\r\n $temp = \"\";\r\n\r\n // exit the loop.\r\n $complete_stmt = true;\r\n // make sure the outer loop continues at the right point.\r\n $i = $j;\r\n }\r\n else\r\n {\r\n // even number of unescaped quotes. We still don't have a complete statement.\r\n // (1 odd and 1 even always make an odd)\r\n $temp .= $tokens[$j] . $delimiter;\r\n // save memory.\r\n $tokens[$j] = \"\";\r\n }\r\n\r\n } // for..\r\n } // else\r\n }\r\n }\r\n\r\n return $output;\r\n }",
"public function parseSql($sql) {\n \n $sql = $this->sqlParser->removeRemarks($sql);\n $sqls = $this->sqlParser->splitSqlFile($sql);\n \n return $sqls;\n }",
"public function executeSqlFile($filename){\r\n\t\t\t$sql_filename = $filename;\r\n\t\t\t$sql_contents = file_get_contents($sql_filename);\r\n\t\t\t$sql_querys = preg_split('@;@', $sql_contents, NULL, PREG_SPLIT_NO_EMPTY);\r\n\r\n\t\t\tforeach ($sql_querys as $query) {\r\n\t\t\t\tif (strlen(trim($query)) != 0) // remove those strings contain only whitespace\r\n\t\t\t\t\t$this->query($query);\r\n\t\t\t}\r\n\t\t}",
"public function GetSQLFileContents() {\n\t\t$file = $this->GetSQLFile();\n\t\treturn file_get_contents($file);\n\t}",
"function parse_sql($sql, $delim)\r\n\t\t{\r\n\t\t\tif ( $sql == '' )\r\n\t\t\t{\r\n\t\t\t die('Could not obtain SQL structure/data - function parse_sql($sql, $delim) ');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$retval = array();\r\n\t\t\t$statements = explode($delim, $sql);\r\n\t\t\tunset($sql);\r\n\t\t\t\r\n\t\t\t$linecount = count($statements);\r\n\t\t\tfor ( $i = 0; $i < $linecount; $i++ )\r\n\t\t\t{\r\n\t\t\t if ( ($i != $linecount - 1) || (strlen($statements[$i]) > 0) )\r\n\t\t\t {\r\n\t\t\t $statements[$i] = trim($statements[$i]);\r\n\t\t\t $statements[$i] = str_replace(\"\\r\\n\", '', $statements[$i]) . \"\\n\";\r\n\t\t\t\r\n\t\t\t // Remove 2 or more spaces\r\n\t\t\t $statements[$i] = preg_replace('#\\s{2,}#', ' ', $statements[$i]);\r\n\t\t\t\r\n\t\t\t $retval[] = trim($statements[$i]);\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\tunset($statements);\r\n\t\t\t\r\n\t\t\treturn $retval;\r\n\t\t}",
"public static function splitSqlFile($sql, $delimiter) {\r\n // Split up our string into \"possible\" SQL statements.\r\n $tokens = explode($delimiter, $sql);\r\n // try to save mem.\r\n $sql = \"\";\r\n $output = array();\r\n // we don't actually care about the matches preg gives us.\r\n $matches = array();\r\n // this is faster than calling count($oktens) every time thru the loop.\r\n $token_count = count($tokens);\r\n for ($i = 0; $i < $token_count; $i++) {\r\n // Don't wanna add an empty string as the last thing in the array.\r\n if (($i != ($token_count - 1)) || (strlen($tokens[$i] > 0))) {\r\n // This is the total number of single quotes in the token.\r\n $total_quotes = preg_match_all(\"/'/\", $tokens[$i], $matches);\r\n // Counts single quotes that are preceded by an odd number of backslashes,\r\n // which means they're escaped quotes.\r\n $escaped_quotes = preg_match_all(\"/(?<!\\\\\\\\)(\\\\\\\\\\\\\\\\)*\\\\\\\\'/\", $tokens[$i], $matches);\r\n\r\n $unescaped_quotes = $total_quotes - $escaped_quotes;\r\n // If the number of unescaped quotes is even, then the delimiter did NOT occur inside a string literal.\r\n if (($unescaped_quotes % 2) == 0) {\r\n // It's a complete sql statement.\r\n $output[] = $tokens[$i];\r\n // save memory.\r\n $tokens[$i] = \"\";\r\n } else {\r\n // incomplete sql statement. keep adding tokens until we have a complete one.\r\n // $temp will hold what we have so far.\r\n $temp = $tokens[$i] . $delimiter;\r\n // save memory..\r\n $tokens[$i] = \"\";\r\n // Do we have a complete statement yet?\r\n $complete_stmt = false;\r\n\r\n for ($j = $i + 1; (!$complete_stmt && ($j < $token_count)); $j++) {\r\n // This is the total number of single quotes in the token.\r\n $total_quotes = preg_match_all(\"/'/\", $tokens[$j], $matches);\r\n // Counts single quotes that are preceded by an odd number of backslashes,\r\n // which means they're escaped quotes.\r\n $escaped_quotes = preg_match_all(\"/(?<!\\\\\\\\)(\\\\\\\\\\\\\\\\)*\\\\\\\\'/\", $tokens[$j], $matches);\r\n\r\n $unescaped_quotes = $total_quotes - $escaped_quotes;\r\n\r\n if (($unescaped_quotes % 2) == 1) {\r\n // odd number of unescaped quotes. In combination with the previous incomplete\r\n // statement(s), we now have a complete statement. (2 odds always make an even)\r\n $output[] = $temp . $tokens[$j];\r\n // save memory.\r\n $tokens[$j] = \"\";\r\n $temp = \"\";\r\n // exit the loop.\r\n $complete_stmt = true;\r\n // make sure the outer loop continues at the right point.\r\n $i = $j;\r\n } else {\r\n // even number of unescaped quotes. We still don't have a complete statement.\r\n // (1 odd and 1 even always make an odd)\r\n $temp .= $tokens[$j] . $delimiter;\r\n // save memory.\r\n $tokens[$j] = \"\";\r\n }\r\n } // for..\r\n } // else\r\n }\r\n }\r\n return $output;\r\n }",
"public function import($file){\n\t\tglobal $c;\n\t\t$h = fopen($file, 'r');\n\t\t$b = \"\";\n\t\twhile(($l = fgets($h, 256)) !== false){\n\t\t\t$b .= $l;\n\t\t\t$cnt = strlen($l) - 2;\n\t\t\t// If the last character is ;, execute the query\n\t\t\tif ($l[$cnt] == ';' || $l[$cnt-1] == ';'){ // sigh\n\t\t\t\t//echo $b.\"<br>\";\n\t\t\t\t$c[] = $this->query($b);\n\t\t\t\t$b = \"\";\n\t\t\t}\n\t\t}\n\t\tfclose($h);\n\t}",
"function split_sql($sql_text) {\n $re = '% # Match an SQL record ending with \";\"\n \\s* # Discard leading whitespace.\n ( # $1: Trimmed non-empty SQL record.\n (?: # Group for content alternatives.\n \\'[^\\'\\\\\\\\]*(?:\\\\\\\\.[^\\'\\\\\\\\]*)*\\' # Either a single quoted string,\n | \"[^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*\" # or a double quoted string,\n | /*[^*]*\\*+([^*/][^*]*\\*+)*/ # or a multi-line comment,\n | \\#.* # or a # single line comment,\n | --.* # or a -- single line comment,\n | [^\"\\';#] # or one non-[\"\\';#-]\n )+ # One or more content alternatives\n (?:;|$) # Record end is a ; or string end.\n ) # End $1: Trimmed SQL record.\n %x';\n $matches = array();\n if (preg_match_all($re, $sql_text, $matches)) {\n return $matches[1];\n }\n return array();\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new DonationDayReservation model. If creation is successful, the browser will be redirected to the 'view' page. | public function actionCreate()
{
$model = new DonationDayReservation();
if ($model->load(Yii::$app->request->post())){
$model->reservation_key = $model->getRandomKey(4);
$status = $model->validateKey($model->reservation_key);
if ($status == 1){
$model->reservation_key = $model->getRandomKey(5);
}
if ($model->validate() && $model->save()){
return $this->redirect(['view', 'id' => $model->reserved_id]);
}
}
return $this->render('create', [
'model' => $model,
]);
} | [
"public function create()\n {\n return view('class_reservations.create');\n }",
"public function actionCreate()\n {\n $model = new DataDaily();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create() {\n\t\treturn view('reservations.create');\n\t}",
"public function actionCreate()\n {\n $model = new Salerecord();\n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->display_date = (date('Y-m-d'));\n $model->save();\n // return $this->redirect(['view', 'id' => $model->id, 'plant_id' => $model->plant_id, 'customer_id' => $model->customer_id, 'grade_id' => $model->grade_id]);\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Booking();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->booking_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n { \n $model = new Dailyvisitors();\n\n if ($model->load(Yii::$app->request->post()) /*&& $model->save()*/) {\n $model->reg_date = date(\"Y-m-d\",strtotime($model->reg_date));\n \n if($model->save())\n {\n \\Yii::$app->response->format = 'json';\n\n return [\n \"saved\",\n Yii::$app->urlManager->baseUrl.\"/index.php?r=visits/dailyvisitors/view&id=\".$model->id,\n \"Record Saved\",\n \"Record saved successfully\"\n ];\n }\n } \n \n $request = Yii::$app->request;\n\n if($request->isAjax)\n {\n return $this->renderPartial('_create', [\n 'model' => $model,\n ]);\n }\n else\n {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n return view('days.create');\n }",
"public function actionCreate()\n {\n $model = new DonationManagement();\n\n if (Yii::$app->request->post()) {\n $model->donation_type = $_POST['DonationManagement']['donation_type'];\n $model->donation_date = date('Y-m-d',strtotime($_POST['DonationManagement']['donation_date']));\n $model->donationAmount = $_POST['DonationManagement']['donationAmount'];\n if($model->donation_type=='CASH' || $model->donation_type=='OTHERS')\n $model->reference_number = $_POST['DonationManagement']['reference_number'];\n if($model->donation_type=='CARD'){\n $model->reference_number = $_POST['DonationManagement']['reference_number'];\n // $model->card_number = $_POST['DonationManagement']['card_number'];\n // $model->bankName = $_POST['DonationManagement']['bankName'];\n // $model->cardHolderName = $_POST['DonationManagement']['cardHolderName'];\n }\n if($_POST['DonationManagement']['donor_name']!=\"\")\n $model->donor_name = $_POST['DonationManagement']['donor_name'];\n if($_POST['DonationManagement']['contact_number']!=\"\")\n $model->contact_number = $_POST['DonationManagement']['contact_number'];\n if($_POST['DonationManagement']['donor_address']!=\"\")\n $model->donor_address = $_POST['DonationManagement']['donor_address'];\n if($_POST['DonationManagement']['donor_description']!=\"\")\n $model->donor_description = $_POST['DonationManagement']['donor_description'];\n $model->created_at = date('Y-m-d H:i:s');\n $model->updated_at = date('Y-m-d H:i:s');\n $model->save();\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Delivery();\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new roomsegmentation();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate() {\n $model = new ConfirmedRequest();\n\n if ( $model->load( Yii::$app->request->post() ) && $model->save() ) {\n $model->dt_end = strtotime( $model->dt_end );\n\n return $this->redirect( [ 'view', 'id' => $model->id ] );\n } else {\n return $this->render( 'create', [\n 'model' => $model,\n ] );\n }\n }",
"public function actionCreate()\n {\n $model = new Direccion();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\r\n {\r\n $model = new Delivery();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionCreate()\n {\n $model = new Deseados();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Recharge();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $this->layout = \"layout1\";\n $model = new Adcate();\n $data = $model->getOptions();\n if(Yii::$app->request->isPost){\n $post = Yii::$app->request->post();\n if($model->addItem($post)){\n return $this->redirect(['view', 'id' => $model->adCateId]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n 'data'=>$data,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Attendance();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Customerelationship();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->CaseID]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Reqdosen();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_request]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes an individual badge. Removes the badge id from the user's meta data and decrements the user's badge count in the "%go_totals" table. | function go_remove_badge ( $user_id, $badge_id = -1 ) {
if ( ! empty( $user_id ) && ! empty( $badge_id ) && $badge_id > 0 ) {
global $wpdb;
$existing_badges = get_user_meta( $user_id, 'go_badges', true );
$badge_count = count( $existing_badges );
$matching_keys = array_keys( $existing_badges, $badge_id );
if ( ! empty( $matching_keys ) && count( $matching_keys ) > 0 ) {
foreach ( $matching_keys as $key ) {
unset( $existing_badges[ $key ] );
$badge_count--;
}
update_user_meta( $user_id, 'go_badges', $existing_badges );
$wpdb->update( "{$wpdb->prefix}go_totals", array( 'badge_count' => $badge_count ), array( 'uid' => $user_id ) );
}
}
} | [
"public function removeBadge( $badge_name )\r\n\t{\r\n\t\t$badge = $this\r\n ->_dm\r\n ->getRepository( '\\CodingPride\\Document\\Badge' )\r\n ->findOneByName( $badge_name );\r\n\r\n if ( null === $badge )\r\n {\r\n throw new \\InvalidArgumentException( 'The badge \\'' . $badge_name . '\\' does not exist' );\r\n }\r\n\r\n $users = $this->_dm->getRepository( '\\CodingPride\\Document\\User' )->findAll();\r\n\r\n foreach ( $users as $user )\r\n {\r\n $user->removeBadge( $badge );\r\n }\r\n\r\n $this->_dm->remove( $badge );\r\n $this->_dm->flush();\r\n\t}",
"public function remove_badge_curso(){\n\t\t$curso = new YC_Curso( $_POST['id_curso'] );\n\t\t$badge_id = $_POST['id_badge'];\n\t\techo $curso->remove_badge( $badge_id );\n\t\twp_die();\n\t}",
"function go_remove_badge_r ( $user_id, $old_rank_index, $rank_count, $badges_array = null ) {\n\tif ( ! empty( $user_id ) && $old_rank_index > 0 && $rank_count >= 1 ) {\n\t\tif ( empty( $badges_array ) ) {\n\t\t\t$ranks = get_option( 'go_ranks' );\n\t\t\t$badges_array = $ranks['badges'];\n\t\t}\n\t\t$new_rank_index = $old_rank_index - $rank_count;\n\n\t\t// iterate down the ranks badge array, removing each of the user's badges\n\t\tfor ( $rank_index = $old_rank_index; $rank_index > $new_rank_index; $rank_index-- ) {\n\t\t\t$badge_id = $badges_array[ $rank_index ];\n\t\t\tif ( 0 !== $badge_id ) {\n\t\t\t\tgo_remove_badge( $user_id, $badge_id );\n\t\t\t}\n\t\t}\n\t}\n}",
"function remove_badge( string $badge, $users ) : bool {\n\treturn badge_api( 'remove', $badge, $users );\n}",
"public function remove_hit_user( $hit_id, $user_id ) {\n\t\treturn $this->delete(\"hits/$hit_id/users/$user_id\");\n\t}",
"static function removeBadgeFromTrainer($trainerId, $badgeId) {\n return \"delete from `EARNED_BADGE` where `trainer_id` =\" . $trainerId . \" and `badge_id`=\" . $badgeId;\n }",
"function goxeedmodule_user_profile_game_user_remove ($user_uid, $game_user_nid)\n{\n $user_profile = goxeedmodule_user_secure_load ($user_uid);\n $items = goxeedmodule_field_secure_get_items ('user', $user_profile, 'field_goxeed_game_user_nid');\n foreach ($items as $key => $item)\n {\n if ($item[\"value\"] == $game_user_nid)\n {\n unset($user_profile->field_goxeed_game_user_nid['und'][$key]);\n }\n }\n user_save ($user_profile);\n}",
"public function remove_vote( int $user_id ) {\n\t\tdelete_user_meta( $user_id, self::SUPPORTERS_KEY, $this->idea_id );\n\t\t$this->recount();\n\t}",
"public function action_removebuddy()\n\t{\n\t\tcheckSession('get');\n\t\tis_not_guest();\n\n\t\tcall_integration_hook('integrate_remove_buddy', array($this->user->id));\n\n\t\t// Yeah, they are no longer cool\n\t\t$user = $this->_req->getQuery('u', 'intval', '');\n\n\t\t// You have to give a user\n\t\tif (empty($user))\n\t\t{\n\t\t\tthrow new Exception('no_access', false);\n\t\t}\n\n\t\t// Remove this user, assuming we can find them\n\t\tif (in_array($user, $this->user->buddies))\n\t\t{\n\t\t\t$this->user->buddies = array_diff($this->user->buddies, array($user));\n\t\t}\n\n\t\t// Update the settings.\n\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\tupdateMemberData($this->user->id, array('buddy_list' => implode(',', $this->user->buddies)));\n\n\t\t// Redirect back to the profile\n\t\tredirectexit('action=profile;u=' . $user);\n\t}",
"function go_user_delete( $user_id ) {\n \tglobal $wpdb;\n\t$table_name_go_totals = \"{$wpdb->prefix}go_totals\";\n\t$table_name_go = \"{$wpdb->prefix}go\";\n\n\t$wpdb->delete( $table_name_go_totals, array( 'uid' => $user_id ) );\n\t$wpdb->delete( $table_name_go, array( 'uid' => $user_id ) );\n}",
"function imagex_userbadge_delete_form($form, &$form_state, $badge) {\n $form_state['imagex_userbadge'] = $badge;\n\n $form['#submit'][] = 'imagex_userbadge_delete_form_submit';\n\n $form = confirm_form($form,\n t('Are you sure you want to delete badge %name?', array('%name' => $badge->name)),\n 'admin/people/badges/badge',\n '<p>' . t('This action cannot be undone.') . '</p>',\n t('Delete'),\n t('Cancel'),\n 'confirm'\n );\n \n return $form;\n}",
"public function delete() {\r\n $result = $this->_db->delete(\"badges\", array(\"id\" => $this->_id));\r\n if ($result == false) {\r\n return false;\r\n }\r\n\r\n unset($this->_db);\r\n unset($this->_id);\r\n unset($this->_image);\r\n return true;\r\n }",
"function bp_gameful_remove_data( $user_id ) {\n\t/* You'll want to run a function here that will delete all information from any component tables\n\t for this $user_id */\n\n\t/* Remember to remove usermeta for this component for the user being deleted */\n\tdelete_usermeta( $user_id, 'bp_gameful_some_setting' );\n\n\tdo_action( 'bp_gameful_remove_data', $user_id );\n}",
"public function deleteAction(Request $request, Badge $badge)\n {\n $form = $this->createDeleteForm($badge);\n\n $form->handleRequest($request);\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($badge);\n $em->flush();\n }\n return $this->redirectToRoute('badge_index');\n\n }",
"function delete() {\n\t\t$dbw = wfGetDB( DB_PRIMARY );\n\n\t\t$dbw->delete(\n\t\t\t'Vote',\n\t\t\t[\n\t\t\t\t'vote_page_id' => $this->PageID,\n\t\t\t\t'vote_actor' => $this->User->getActorId()\n\t\t\t],\n\t\t\t__METHOD__\n\t\t);\n\n\t\t$this->clearCache();\n\n\t\t// Update social statistics if SocialProfile extension is enabled\n\t\tif ( class_exists( 'UserStatsTrack' ) ) {\n\t\t\t$stats = new UserStatsTrack( $this->User->getId(), $this->User->getName() );\n\t\t\t$stats->decStatField( 'vote' );\n\t\t}\n\t}",
"public function removeUser($userid)\n\t{\n\t\tDB::table('group_user') \n\t\t\t-> where('user_id', '=', $userid)\n\t\t\t-> delete();\n\t}",
"function xprofile_remove_data( $user_id ) {\r\n\tBP_XProfile_ProfileData::delete_data_for_user( $user_id );\r\n\r\n\t// delete any avatar files.\r\n\t@unlink( get_user_meta( $user_id, 'bp_core_avatar_v1_path', true ) );\r\n\t@unlink( get_user_meta( $user_id, 'bp_core_avatar_v2_path', true ) );\r\n\r\n\t// unset the usermeta for avatars from the usermeta table.\r\n\tdelete_user_meta( $user_id, 'bp_core_avatar_v1' );\r\n\tdelete_user_meta( $user_id, 'bp_core_avatar_v1_path' );\r\n\tdelete_user_meta( $user_id, 'bp_core_avatar_v2' );\r\n\tdelete_user_meta( $user_id, 'bp_core_avatar_v2_path' );\r\n}",
"function buddreshare_decrement_user_count( $reshare_id = 0, $user_id = 0 ) {\n\tif( empty( $user_id ) )\n\t\t$user_id = bp_loggedin_user_id();\n\n\t// Update the user's personal reshares count\n\t$count = bp_get_user_meta( $user_id, 'buddyreshare_count', true );\n\t$count = !empty( $count ) ? (int) $count - 1 : 0;\n\n\t// Update user meta\n\tbp_update_user_meta( $user_id, 'buddyreshare_count', $count );\n}",
"function wppb_delete_user_from_signups( $user_id ) {\r\n\tglobal $wpdb;\r\n\r\n $user = get_user_by( 'id', $user_id );\r\n\t$wpdb->delete( $wpdb->base_prefix.'signups', array( 'user_email' => $user->user_email ) );\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test that getCMSFields works on each page type. Mostly, this is just checking that the method doesn't return an error | public function testThatGetCMSFieldsWorksOnEveryPageType()
{
$classes = ClassInfo::subclassesFor(SiteTree::class);
array_shift($classes);
foreach ($classes as $class) {
$page = new $class();
if ($page instanceof TestOnly) {
continue;
}
if (!$page->config()->get('can_be_root')) {
continue;
}
$page->Title = "Test $class page";
$page->write();
$page->flushCache();
$page = DataObject::get_by_id(SiteTree::class, $page->ID);
$this->assertTrue($page->getCMSFields() instanceof FieldList);
}
} | [
"public function testGetCMSFields()\n {\n $layer = new OLMapObject();\n $fieldset = $layer->getCMSFields();\n\n $this->assertTrue(is_a($fieldset, \"FieldSet\"));\n }",
"public function testCustomFieldsGet()\n {\n }",
"public function testEditPdfGetFormFields()\n {\n }",
"public function testFieldRenderers() {\n $this->checkLanguageRenderers('page_2', $this->values);\n }",
"function getFieldsByPageType()\n\t{\n\t\t$useInline = false;\n\t\tif($this->pageType == PAGE_EDIT)\n\t\t{\n\t\t\tif($this->pageEditLikeInline)\n\t\t\t{\n\t\t\t\t$useInline = true;\n\t\t\t\t$allfields = $this->pSet->getInlineEditFields();\n\t\t\t}else\t\n\t\t\t\t$allfields = $this->pSet->getEditFields();\n\t\t}\n\t\telse if($this->pageType == PAGE_ADD)\n\t\t{\n\t\t\tif($this->pageAddLikeInline)\n\t\t\t{\t\n\t\t\t\t$useInline = true;\n\t\t\t\t$allfields = $this->pSet->getInlineAddFields();\n\t\t\t}else\n\t\t\t\t$allfields = $this->pSet->getAddFields();\n\t\t}\n\t\telse if($this->pageType == PAGE_LIST)\n\t\t{\n\t\t\t$allfields = $this->pSet->getListFields();\n\t\t}\n\t\telse\n\t\t\t$allfields = $this->pSet->getFieldsList();\n\t\t$arrFields = array();\n\t\tforeach($allfields as $fName)\n\t\t{\n\t\t\tif($useInline)\n\t\t\t\t$app = $this->pSet->appearOnCurrentPage($fName, $this->pageType, true);\n\t\t\telse\n\t\t\t\t$app = $this->pSet->appearOnCurrentPage($fName, $this->pageType);\n\t\t\tif($app === 'break')\n\t\t\t\tbreak;\n\t\t\telseif(!$app)\n\t\t\t\tcontinue;\n\t\t\t$arrFields[] = $fName;\n\t\t}\t\n\t\treturn $arrFields;\t\n\t}",
"public function testRemovePageFormFields()\n {\n }",
"function getCMSFields($cms = null) {\n\t\t$fields = parent::getCMSFields($cms);\n\t\t\n\t\t// Setup the linking to the original page.\n\t\t$copyContentFromField = new TreeDropdownField(\n\t\t\t\"CopyContentFromID\", \n\t\t\t_t('VirtualPage.CHOOSE', \"Choose a page to link to\"), \n\t\t\t\"SiteTree\"\n\t\t);\n\t\t$copyContentFromField->setFilterFunction(create_function('$item', 'return $item->ClassName != \"VirtualPage\";'));\n\t\t\n\t\t// Setup virtual fields\n\t\tif($virtualFields = $this->getVirtualFields()) {\n\t\t\t$roTransformation = new ReadonlyTransformation();\n\t\t\tforeach($virtualFields as $virtualField) {\n\t\t\t\tif($fields->dataFieldByName($virtualField))\n\t\t\t\t\t$fields->replaceField($virtualField, $fields->dataFieldByName($virtualField)->transform($roTransformation));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add fields to the tab\n\t\t$fields->addFieldToTab(\"Root.Content.Main\", \n\t\t\tnew HeaderField('VirtualPageHeader',_t('VirtualPage.HEADER', \"This is a virtual page\")), \n\t\t\t\"Title\"\n\t\t);\n\t\t$fields->addFieldToTab(\"Root.Content.Main\", $copyContentFromField, \"Title\");\n\t\t\n\t\t// Create links back to the original object in the CMS\n\t\tif($this->CopyContentFromID) {\n\t\t\t$linkToContent = \"<a class=\\\"cmsEditlink\\\" href=\\\"admin/show/$this->CopyContentFromID\\\">\" . \n\t\t\t\t_t('VirtualPage.EDITCONTENT', 'click here to edit the content') . \"</a>\";\n\t\t\t$fields->addFieldToTab(\"Root.Content.Main\", \n\t\t\t\t$linkToContentLabelField = new LabelField('VirtualPageContentLinkLabel', $linkToContent), \n\t\t\t\t\"Title\"\n\t\t\t);\n\t\t\t$linkToContentLabelField->setAllowHTML(true);\n\t\t}\n\t\n\t\treturn $fields;\n\t}",
"public function testFakeFieldsInContentTypesDoesNotExist() {\n $content_types = array_keys($this->contentTypes['test']);\n foreach ($content_types as $type) {\n $field = uniqid('field_', TRUE);\n try {\n $this->assertArrayNotHasKey(\n $field,\n $this->contentTypes['system'][$type]['fields'],\n \"Failed asserting that {$type}:{$field} field does not exist.\"\n );\n }\n catch (Exception $e) {\n $this->handleAssertException($e);\n }\n }\n // Verify if all fields in content types passed the test.\n $this->checkAllAssertionsPassedWholeTest();\n }",
"function getFieldsByPageType()\n\t{\n\t\t$arrFields = array();\n\t\t$allfields = GetFieldsList($this->tName);\n\t\tforeach($allfields as $fName)\n\t\t{\n\t\t\tif($this->pageType == PAGE_EDIT && $this->pageEditLikeInline)\n\t\t\t\t$app = AppearOnCurrentPage($fName,$this->pageType,true);\n\t\t\telse if($this->pageType == PAGE_ADD && $this->pageAddLikeInline)\n\t\t\t\t$app = AppearOnCurrentPage($fName,$this->pageType,true);\n\t\t\telse\n\t\t\t\t$app = AppearOnCurrentPage($fName,$this->pageType);\n\t\t\tif($app === 'break')\n\t\t\t\tbreak;\n\t\t\telseif(!$app)\n\t\t\t\tcontinue;\n\t\t\t$arrFields[] = $fName;\n\t\t}\t\n\t\treturn $arrFields;\t\n\t}",
"private function validatePageArray($page) {\n $fields = array(\n 'type' => array('type' => 'String'),\n 'name' => array('type' => 'String', 'required' => true, 'map_to' => 'title'),\n 'title' => array('type' => 'String', 'required' => true, 'map_to' => 'contentTitle'),\n // the model can take advantage of proper NULLing, so this needn't be set\n // 'scheduled_publishing' => array('type' => 'boolean'),\n 'start' => array('type' => 'DateTime', 'require' => 'scheduled_publishing'),\n 'end' => array('type' => 'DateTime', 'require' => 'scheduled_publishing'),\n 'metatitle' => array('type' => 'String'),\n 'metakeys' => array('type' => 'String'),\n 'metadesc' => array('type' => 'String'),\n 'metarobots' => array('type' => 'boolean'),\n 'content' => array('type' => 'String'),\n 'sourceMode' => array('type' => 'boolean'),\n 'protection_frontend' => array('type' => 'boolean', 'map_to' => 'frontendProtection'),\n 'protection_backend' => array('type' => 'boolean', 'map_to' => 'backendProtection'),\n 'application' => array('type' => 'String', 'map_to' => 'module'),\n 'area' => array('type' => 'String', 'map_to' => 'cmd'),\n 'target' => array('type' => 'String'),\n 'link_target' => array('type' => 'String', 'map_to' => 'linkTarget'),\n 'slug' => array('type' => 'String'),\n 'caching' => array('type' => 'boolean'),\n 'skin' => array('type' => 'integer'),\n 'useSkinForAllChannels' => array('type' => 'integer'),\n 'customContent' => array('type' => 'String'),\n 'useCustomContentForAllChannels' => array('type' => 'integer'),\n 'applicationTemplate' => array('type' => 'String'),\n 'useCustomApplicationTemplateForAllChannels' => array('type' => 'integer'),\n 'cssName' => array('type' => 'String'),\n 'cssNavName' => array('type' => 'String'),\n );\n\n $output = array();\n\n foreach ($fields as $field => $meta) {\n $target = isset($meta['map_to']) ? $meta['map_to'] : $field;\n \n if (isset($page[$field])) {\n $page[$field] = contrexx_input2raw($page[$field]);\n } else {\n $page[$field] = null;\n }\n \n if (isset($meta['required']) && $meta['required'] === true) {\n if ($page[$field] == '') {\n throw new \\Cx\\Core\\ContentManager\\Model\\Entity\\PageException('Required field (' . $field . ') not set!');\n }\n }\n\n switch ($meta['type']) {\n case 'boolean':\n // checkboxes and radiobuttons by default aren't submitted\n // unless checked or selected. in cm.html they are prefixed\n // with an input type=hidden value=off, so we always get a\n // value this is required for Page#updateFromArray to work.\n if ($page[$field] == 'on') {\n $value = true;\n } else if ($page[$field] == 'off') {\n $value = false;\n }\n break;\n case 'DateTime':\n try {\n $value = new \\DateTime($page[$field], $this->tz);\n } catch (\\Exception $e) {\n $value = new \\DateTime('0000-00-00 00:00', $this->tz);\n }\n break;\n case 'integer':\n $value = intval($page[$field]);\n break;\n case 'String':\n $value = $page[$field];\n break;\n }\n if (isset($meta['require']) && isset($page[$meta['require']]) && $page[$meta['require']] == 'off') {\n $value = null;\n }\n\n $output[$target] = $value;\n }\n\n //TODO: should we allow filter/callback fns in field processing above?\n $output['content'] = preg_replace('/\\\\[\\\\[([A-Z0-9_-]+)\\\\]\\\\]/', '{\\\\1}', $output['content']);\n\n return $output;\n }",
"function test_get_field() {\n\n\t\t// Test against global post\n\t\t$test_field = rbm_get_field( 'test_field' );\n\t\t$this->assertEquals( '1', $test_field );\n\n\t\t// Test with manual post ID\n\t\t$test_field = rbm_get_field( 'test_field', $this->test_post_ID );\n\t\t$this->assertEquals( '1', $test_field );\n\n\t\t// Test direct echoing\n\t\t// Test against global post\n\t\tob_start();\n\t\trbm_field( 'test_field' );\n\t\t$test_field = ob_get_clean();\n\t\t$this->assertEquals( '1', $test_field );\n\n\t\t// Test with manual post ID\n\t\tob_start();\n\t\trbm_field( 'test_field', $this->test_post_ID );\n\t\t$test_field = ob_get_clean();\n\t\t$this->assertEquals( '1', $test_field );\n\t}",
"public function testGetAllFields() {\n $field_discovery_test = new FieldDiscoveryTestClass($this->fieldPluginManager, $this->migrationPluginManager, $this->logger);\n $actual_fields = $field_discovery_test->getAllFields('6');\n $actual_node_types = array_keys($actual_fields['node']);\n sort($actual_node_types);\n $this->assertSame(['node'], array_keys($actual_fields));\n $this->assertSame(['employee', 'page', 'story', 'test_page', 'test_planet'], $actual_node_types);\n $this->assertCount(25, $actual_fields['node']['story']);\n foreach ($actual_fields['node'] as $bundle => $fields) {\n foreach ($fields as $field_name => $field_info) {\n $this->assertArrayHasKey('type', $field_info);\n $this->assertCount(22, $field_info);\n $this->assertEquals($bundle, $field_info['type_name']);\n }\n }\n }",
"public function testListMetaforms()\n {\n }",
"protected function testRecurlyPagesSettingsFields() {\n $this->drupalGet('/admin/config/services/recurly');\n $this->assertField('recurly_pages');\n $this->assertFieldChecked('edit-recurly-pages', 'Recurly pages enabled by default.');\n\n $this->assertFieldByName('recurly_coupon_page');\n $this->assertFieldChecked('edit-recurly-coupon-page', 'Recurly coupon pages enabled by default.');\n\n $this->assertFieldByName('recurly_subscription_display');\n $this->assertFieldById('edit-recurly-subscription-display-live', 'live', 'Recurly list subscriptions \\'live\\' option present.');\n $this->assertFieldById('edit-recurly-subscription-display-all', 'all', 'Recurly list subscriptions \\'all\\' option present.');\n $this->assertFieldChecked('edit-recurly-subscription-display-live', 'Recurly subscription display set to \\'live\\' by default.');\n\n $this->assertFieldByName('recurly_subscription_max');\n $this->assertFieldById('edit-recurly-subscription-max-1', '1', 'Recurly single plan option present.');\n $this->assertFieldById('edit-recurly-subscription-max-0', '0', 'Recurly multiple plan option present.');\n $this->assertFieldChecked('edit-recurly-subscription-max-1', 'Recurly set to single plan mode by default.');\n\n $this->assertFieldByName('recurly_subscription_upgrade_timeframe');\n $this->assertFieldById('edit-recurly-subscription-upgrade-timeframe-now', 'now', 'Recurly upgrade plan option \\'now\\' present.');\n $this->assertFieldById('edit-recurly-subscription-upgrade-timeframe-renewal', 'renewal', 'Recurly upgrade plan option \\'renewal\\' present.');\n $this->assertFieldChecked('edit-recurly-subscription-upgrade-timeframe-now', 'Recurly upgrade plan behavior defaults to \\'now\\'.');\n\n $this->assertFieldByName('recurly_subscription_downgrade_timeframe');\n $this->assertFieldById('edit-recurly-subscription-downgrade-timeframe-now', 'now', 'Recurly downgrade plan option \\'now\\' present.');\n $this->assertFieldById('edit-recurly-subscription-downgrade-timeframe-renewal', 'renewal', 'Recurly downgrade plan option \\'renewal\\' present.');\n $this->assertFieldChecked('edit-recurly-subscription-downgrade-timeframe-renewal', 'Recurly downgrade plan behavior defaults to \\'renewal\\'.');\n\n $this->assertFieldByName('recurly_subscription_cancel_behavior');\n $this->assertFieldById('edit-recurly-subscription-cancel-behavior-cancel', 'cancel', 'Recurly cancel plan option \\'at renewal\\' present.');\n $this->assertFieldById('edit-recurly-subscription-cancel-behavior-terminate-prorated', 'terminate_prorated', 'Recurly cancel plan option \\'immediately with prorated refund\\' present.');\n $this->assertFieldById('edit-recurly-subscription-cancel-behavior-terminate-full', 'terminate_full', 'Recurly cancel plan option \\'immediately with full refund\\' present.');\n $this->assertFieldChecked('edit-recurly-subscription-cancel-behavior-cancel', 'Recurly cancel behavior defaults to \\'cancel\\'.');\n }",
"public function test_metabox_not_fields_template() {\n\t\tglobal $wp_meta_boxes;\n\t\t$wp_meta_boxes = array(); // the previous method add the metabox.\n\n\t\t$zf = new ZemogaFields();\n\n\t\t$post_data = array(\n\t\t\t'post_type' => 'page',\n\t\t);\n\n\t\t$post_id = self::factory()->post->create_object( $post_data );\n\t\tupdate_post_meta( $post_id, '_wp_page_template', 'other_template.php' );\n\t\t$post = get_post( $post_id );\n\n\t\t$zf->fields_metabox( 'page', $post );\n\n\t\t$this->assertFalse( $this->is_meta_box_registered( 'fields_cont', 'page' ) );\n\t}",
"public function testV1ListPages()\n {\n\n }",
"public function testPostListFieldCollection()\n {\n }",
"public function test_papi_get_all_page_types() {\n\t\t$page_types = papi_get_all_page_types( true );\n\t\t$this->assertTrue( ! empty( $page_types ) );\n\t}",
"public function testComDayCqWcmCoreImplPagePageManagerFactoryImpl() {\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete whole event, including recurrence and recurring data | function delete(){
global $wpdb;
if( $this->is_recurring() ){
//Delete the recurrences then this recurrence event
$this->delete_events();
}
$result = $wpdb->query ( $wpdb->prepare("DELETE FROM ". $wpdb->prefix . EM_EVENTS_TABLE ." WHERE event_id=%d", $this->id) );
if($result !== false){
$bookings_result = $this->get_bookings()->delete();
}
} | [
"public function testDeleteRecurringEvent()\n {\n $recurringEventParameters = $this->getRecurringEventParameters();\n $this->client->request('POST', $this->getUrl('oro_api_post_calendarevent'), $recurringEventParameters);\n $result = $this->getJsonResponseContent($this->client->getResponse(), 201);\n $event = $this->getContainer()->get('doctrine')->getRepository(CalendarEvent::class)\n ->find($result['id']);\n $data['id'] = $event->getId();\n $data['recurrenceId'] = $event->getRecurrence()->getId();\n $this->client->request(\n 'DELETE',\n $this->getUrl('oro_api_delete_calendarevent', ['id' => $data['id']])\n );\n\n $this->assertEmptyResponseStatusCodeEquals($this->client->getResponse(), 204);\n $event = $this->getContainer()->get('doctrine')->getRepository(CalendarEvent::class)\n ->findOneBy(['id' => $data['id']]); // do not use 'load' method to avoid proxy object loading.\n $this->assertNull($event);\n $recurrence = $this->getContainer()->get('doctrine')->getRepository(Recurrence::class)\n ->findOneBy(['id' => $data['recurrenceId']]);\n $this->assertNull($recurrence);\n }",
"public function delete()\n {\n if ($this->id != null) {\n $facebook = new UNL_UCBCN_FacebookInstance($this->id);\n $facebook->deleteEvent();\n }\n //delete the actual event.\n $r = parent::delete();\n if ($r) {\n UNL_UCBCN::cleanCache();\n $this->factory('recurringdate')->updateRecurringEvents();\n }\n return $r;\n }",
"function TimeIt_userapi_deleteAllRecurrences($args)\n{\n if(!isset($args['obj']) || empty($args['obj'])) {\n return LogUtil::registerError(_MODARGSERROR);\n } else {\n if(isset($args['dates']) && is_array($args['dates']) && !empty($args['dates'])) {\n $datessql = ' AND the_date IN(';\n foreach($args['dates'] AS $date) {\n $datessql .= \"'\".DataUtil::formatForStore($date).\"',\";\n }\n $datessql = substr($datessql, 0, strlen($datessql)-1); // remove last ,\n $datessql .= ')';\n } else {\n $datessql = '';\n }\n $dhearray = DBUtil::selectObjectArray('TimeIt_date_has_events', 'eid = '.(int)$args['obj']['id'].$datessql);\n\n $dheids = array();\n $localeids = array();\n\n foreach($dhearray AS $dheobj) {\n $dheids[] = $dheobj['id'];\n if($dheobj['localeid']) {\n $localeids[] = $dheobj['localeid'];\n }\n }\n\n if(!empty($dheids)) {\n // delete all subcribtions\n DBUtil::deleteWhere('TimeIt_regs', 'pn_eid IN('.implode(',', $dheids).')');\n\n // delete recurrences\n DBUtil::deleteWhere('TimeIt_date_has_events', 'id IN('.implode(',', $dheids).')');\n }\n\n if(!empty($localeids)) {\n // get all events to delete\n $events = DBUtil::selectObjectArray('TimeIt_events','pn_id IN('.implode(',', $localeids).')');\n \n // delete all events\n foreach($events AS $obj) {\n WorkflowUtil::getWorkflowForObject($obj, 'TimeIt_events', 'id', 'TimeIt');\n WorkflowUtil::deleteWorkflow($obj);\n }\n }\n \n return true;\n }\n}",
"public function delete() {\n $events = $this->getEventsCreatedHere(); # we will need to write this method\n foreach ($events as $record) {\n $record->delete();\n }\n\n # delete the calendar_has_event records\n $has_events = $this->getCalendarHasEvents();\n foreach ($has_events as $record) {\n $record->delete();\n }\n\n # delete the user_has_permission records\n $permissions = $this->getAllPermissions();\n foreach ($permissions as $record) {\n $record->delete();\n }\n\n # delete the subscriptions on the calendar\n $subscriptions = $this->getSubscriptions();\n foreach ($subscriptions as $record) {\n $record->delete();\n }\n\n # delete the subscription_has_calendar records (remove calendar from subscriptions that subscribe to it)\n $subscriptions = $this->getSubscriptionHasCalendarRecords();\n foreach ($subscriptions as $record) {\n $record->delete();\n }\n\n return parent::delete();\n }",
"function eventDelete(){\n\t\t$result = mysql_query(getEvent($_GET['event']));\n\t\tif($row = mysql_fetch_assoc($result)) {\n\t\t\tgetEventGlobals($row);\n\t\t\tmysql_query(deleteObject($GLOBALS['objectId']));\n\t\t\tmysql_query(deleteCalendar($GLOBALS['eventId']));\n\t\t}\n\t\theader('Location:' . fullURL(getLangVar(\"calendarURL\")));\n\t}",
"public function removeAllEvents() {\n // QueryBuilder seems to ignore the cascade on delete specifications and fails with constraint checks,\n // if we just delete events here. As a workaround we will manually do the cascade stuff by deleting\n // referenced event details and packets first.\n $this->assureAllowed('delete', 'events');\n $qb = $this->getEntityManager()->createQueryBuilder();\n $qb->delete('HoneySens\\app\\models\\entities\\EventDetail', 'ed');\n $qb->getQuery()->execute();\n $qb->delete('HoneySens\\app\\models\\entities\\EventPacket', 'ep');\n $qb->getQuery()->execute();\n $qb->delete('HoneySens\\app\\models\\entities\\Event', 'e');\n $qb->getQuery()->execute();\n }",
"public function testMassDeleteActionDeletesRegularEventAndCancelsExceptionEvent()\n {\n // Step 1. Create new recurring event without attendees.\n // Recurring event with occurrences: 2016-04-25, 2016-05-08, 2016-05-09, 2016-05-22\n $eventData = [\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY,\n 'recurrence' => [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Model\\Recurrence::TYPE_WEEKLY,\n 'interval' => 2,\n 'dayOfWeek' => [Model\\Recurrence::DAY_SUNDAY, Model\\Recurrence::DAY_MONDAY],\n 'startTime' => '2016-04-25T01:00:00+00:00',\n 'occurrences' => 4,\n 'endTime' => '2016-06-10T01:00:00+00:00',\n ],\n 'attendees' => [\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_1')->getFullName(),\n 'email' => 'foo_user_1@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_REQUIRED,\n ],\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_2')->getFullName(),\n 'email' => 'foo_user_2@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_REQUIRED,\n ]\n ]\n ];\n\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($eventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $recurringEvent */\n $recurringEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 2. Create exception for the recurring event with updated title and time.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY,\n 'attendees' => [\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_1')->getFullName(),\n 'email' => 'foo_user_1@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_REQUIRED,\n ],\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_2')->getFullName(),\n 'email' => 'foo_user_2@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_REQUIRED,\n ]\n ]\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $newEvent */\n $exceptionEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 3. Create new regular calendar event with same attendees.\n $eventData = [\n 'title' => 'Test Simple Event',\n 'description' => 'Test Simple Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-27T01:00:00+00:00',\n 'end' => '2016-04-27T02:00:00+00:00',\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY,\n 'attendees' => [\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_1')->getFullName(),\n 'email' => 'foo_user_1@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_REQUIRED,\n ],\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_2')->getFullName(),\n 'email' => 'foo_user_2@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_REQUIRED,\n ]\n ]\n ];\n\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($eventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $recurringEvent */\n $regularEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 4. Execute delete mass action for regular event.\n $this->client->disableReboot();\n $url = $this->getUrl(\n 'oro_datagrid_mass_action',\n [\n 'gridName' => 'calendar-event-grid',\n 'actionName' => 'delete',\n 'inset' => 1,\n 'values' => implode(',', [$regularEvent->getId()])\n ]\n );\n $this->ajaxRequest(\n 'DELETE',\n $url,\n [],\n [],\n $this->generateBasicAuthHeader(\n 'foo_user_1',\n 'password',\n $this->getReference('oro_calendar:user:foo_user_1')->getOrganization()->getId()\n )\n );\n $result = $this->client->getResponse();\n $data = json_decode($result->getContent(), true, 512, JSON_THROW_ON_ERROR);\n $this->assertTrue($data['successful'] === true);\n $this->assertTrue($data['count'] === 1);\n\n // Step 5. Get events via API and check the removed events are not exist.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n\n $expectedAttendees = [\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_1')->getFullName(),\n 'email' => 'foo_user_1@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_REQUIRED,\n ],\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_2')->getFullName(),\n 'email' => 'foo_user_2@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_REQUIRED,\n ]\n ];\n\n $expectedResponse = [\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n 'allDay' => false,\n 'attendees' => $expectedAttendees,\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'start' => '2016-05-08T01:00:00+00:00',\n 'end' => '2016-05-08T02:00:00+00:00',\n 'allDay' => false,\n 'attendees' => $expectedAttendees,\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'start' => '2016-05-09T01:00:00+00:00',\n 'end' => '2016-05-09T02:00:00+00:00',\n 'allDay' => false,\n 'attendees' => $expectedAttendees,\n ],\n [\n 'id' => $exceptionEvent->getId(),\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n 'allDay' => false,\n 'attendees' => $expectedAttendees,\n ]\n ];\n\n $this->assertResponseEquals($expectedResponse, $response, false);\n\n // Step 6. Check number of calendar events and attendees in the system after all manipulations.\n $this->getEntityManager()->clear();\n\n $this->assertCount(\n 4,\n $this->getEntityRepository(CalendarEvent::class)->findAll(),\n 'Failed asserting 2 events exist in the persistence: ' . PHP_EOL .\n '1 - recurring event' . PHP_EOL .\n '2 - child of event 1' . PHP_EOL .\n '3 - cancelled exception event of 1' . PHP_EOL .\n '4 - child of event 3' . PHP_EOL\n );\n\n $this->assertCount(\n 1,\n $this->getEntityRepository(Entity\\Recurrence::class)->findAll(),\n 'Failed asserting 1 recurrence entity exist in the persistence: ' . PHP_EOL .\n '1 - recurrence of event 1' . PHP_EOL\n );\n\n $this->assertCount(\n 4,\n $this->getEntityRepository(Attendee::class)->findAll(),\n 'Failed asserting 3 attendees exist in the persistence: ' . PHP_EOL .\n '1 - 1st attendee of event 1' . PHP_EOL .\n '2 - 2nd attendee of event 1' . PHP_EOL .\n '3 - 1nd attendee of event 3' . PHP_EOL .\n '4 - 2nd attendee of event 3' . PHP_EOL\n );\n }",
"function tutorias_delete_repetition_from_now($repetitionid,$eventid)\n{\n global $CFG,$COURSE,$USER;\n $ret=true;\n\n $actualevent = get_record('block_tutorias', 'id', $eventid);\n\n $ret = delete_records_select('block_tutorias', \"idrepetition = $repetitionid and starttime > \".$actualevent->starttime );\n $res = delete_records('block_tutorias', 'id', $eventid);\n\n return $ret;\n}",
"public function testDeleteRecurringEventInAttendeeCalendarDeletesThisAttendeeFromAllEvents()\n {\n // Step 1. Create recurring calendar event with 2 attendees.\n // Recurring event with occurrences: 2016-04-01, 2016-04-02, 2016-04-03, 2016-04-04\n $eventData = [\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-04-01T02:00:00+00:00',\n 'updateExceptions' => true,\n 'backgroundColor' => '#FF0000',\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY,\n 'attendees' => [\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_1')->getFullName(),\n 'email' => 'foo_user_1@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_ORGANIZER,\n ],\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_2')->getFullName(),\n 'email' => 'foo_user_2@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_REQUIRED,\n ]\n ],\n 'recurrence' => [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Model\\Recurrence::TYPE_DAILY,\n 'interval' => 1,\n 'startTime' => '2016-04-01T01:00:00+00:00',\n 'occurrences' => 4,\n ]\n ];\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($eventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(['statusCode' => 201, 'contentType' => 'application/json']);\n\n /** @var CalendarEvent $recurringEvent */\n $recurringEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 2. Create exception event with updated title.\n $exceptionData = [\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-04T01:00:00+00:00',\n 'end' => '2016-04-04T02:00:00+00:00',\n 'backgroundColor' => '#FF0000',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-04-04T01:00:00+00:00',\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY,\n 'attendees' => [\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_1')->getFullName(),\n 'email' => 'foo_user_1@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_ORGANIZER,\n ],\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_2')->getFullName(),\n 'email' => 'foo_user_2@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_REQUIRED,\n ],\n ],\n ];\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($exceptionData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(['statusCode' => 201, 'contentType' => 'application/json']);\n\n /** @var CalendarEvent $exceptionEvent */\n $exceptionEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 3. Delete recurring event in non-organizer attendee calendar\n // with flag \"notifyAttendees\"=\"all\" and \"isCancelInsteadDelete\"=true.\n\n /** @var CalendarEvent $attendeeExceptionEvent */\n $attendeeRecurringEvent = $recurringEvent->getChildEventByCalendar(\n $this->getReference('oro_calendar:calendar:foo_user_2')\n );\n\n $this->restRequest(\n [\n 'method' => 'DELETE',\n 'url' => $this->getUrl(\n 'oro_api_delete_calendarevent',\n [\n 'id' => $attendeeRecurringEvent->getId(),\n 'isCancelInsteadDelete' => true,\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_2', 'foo_user_2_api_key'),\n ]\n );\n $this->assertEmptyResponseStatusCodeEquals($this->client->getResponse(), 204);\n\n // Step 4. Check recurring events in owner calendar. Attendee should be removed in all events.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-04-30T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(['statusCode' => 200, 'contentType' => 'application/json']);\n\n $expectedAttendees = [\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_1')->getFullName(),\n 'email' => 'foo_user_1@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_ORGANIZER,\n ]\n ];\n\n $expectedExceptionAttendees = [\n [\n 'displayName' => $this->getReference('oro_calendar:user:foo_user_1')->getFullName(),\n 'email' => 'foo_user_1@example.com',\n 'status' => Attendee::STATUS_ACCEPTED,\n 'type' => Attendee::TYPE_ORGANIZER,\n ],\n ];\n\n $expectedResponse = [\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-04-01T02:00:00+00:00',\n 'attendees' => $expectedAttendees,\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-02T01:00:00+00:00',\n 'end' => '2016-04-02T02:00:00+00:00',\n 'attendees' => $expectedAttendees,\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-03T01:00:00+00:00',\n 'end' => '2016-04-03T02:00:00+00:00',\n 'attendees' => $expectedAttendees,\n ],\n [\n 'id' => $exceptionEvent->getId(),\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-04T01:00:00+00:00',\n 'end' => '2016-04-04T02:00:00+00:00',\n 'originalStart' => '2016-04-04T01:00:00+00:00',\n 'attendees' => $expectedExceptionAttendees,\n ],\n ];\n\n $this->assertResponseEquals($expectedResponse, $response, false);\n\n // Step 5. Check recurring events in 2nd non-organizer attendee calendar.\n // No events should not be in the calendar.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_2')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-04-30T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_2', 'foo_user_2_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(['statusCode' => 200, 'contentType' => 'application/json']);\n\n $expectedResponse = [];\n\n $this->assertResponseEquals($expectedResponse, $response, false);\n }",
"public static function deleteOldEvents() {\n $dateRange = Yii::app()->settings->eventDeletionTime;\n if (!empty($dateRange)) {\n $dateRange = $dateRange * 24 * 60 * 60;\n $deletionTypes = json_decode(Yii::app()->settings->eventDeletionTypes, true);\n if (!empty($deletionTypes)) {\n $deletionTypes = \"('\" . implode(\"','\", $deletionTypes) . \"')\";\n $time = time() - $dateRange;\n X2Model::model('Events')->deleteAll(\n 'lastUpdated < ' . $time . ' AND type IN ' . $deletionTypes);\n }\n }\n }",
"function delete_all_past_events() {\n$hl_ID=-1;\n$workdays_ID=-1;\n$rec=SQLSelectOne('select ID from calendar_categories where holidays=1');\nif ($rec) \n $hl_ID=$rec['ID'];\n\n$rec=SQLSelectOne('select ID from calendar_categories where workdays=1');\nif ($rec) \n $workdays_ID=$rec['ID'];\n\n SQLExec(\"DELETE FROM calendar_events WHERE CALENDAR_CATEGORY_ID<>\".$hl_ID.\" AND CALENDAR_CATEGORY_ID<>\".$workdays_ID.\" AND IS_TASK=0 and IS_REPEATING=0 and (TO_DAYS(NOW())-TO_DAYS(DUE))>1\");\n }",
"public function delete() {\n\t\t$this->validate_csrf_token();\n\n\t\t$this->sql->SQLQueryString = 'DELETE FROM cs_calendar\n\t\t\tWHERE calendar_id = '\n\t\t\t. $this->sql->Escape(__FILE__, __LINE__, $this->data['calendar_id']);\n\n\t\t$this->sql->RunQuery(__FILE__, __LINE__);\n\n\t\t$this->flush_cache();\n\t}",
"public function delete()\n {\n //get all facebook events for this id and delete them.\n $events = UNL_UCBCN_Manager::factory('eventdatetime');\n $events->whereAdd('eventdatetime.event_id = '.$this->id);\n $number = $events->find();\n while ($events->fetch()) {\n $facebook = new UNL_UCBCN_FacebookInstance($events->id);\n $facebook->deleteEvent();\n }\n\n // Delete child elements that would be orphaned.\n if (ctype_digit($this->id)) {\n foreach (array('calendar_has_event',\n 'event_has_keyword',\n 'eventdatetime',\n 'event_has_eventtype',\n 'event_has_sponsor',\n 'event_isopento_audience',\n 'event_targets_audience') as $table) {\n $do = DB_DataObject::factory($table);\n $do->event_id = $this->id;\n $do->delete();\n }\n }\n return parent::delete();\n }",
"public function deleteSchedule();",
"public function deleteSportEvent()\n {\n }",
"function delete( $array ){\r\n\t\tglobal $wpdb;\r\n\t\t//Detect array type and generate SQL for event IDs\r\n\t\t$results = array();\r\n\t\tif( !empty($array) && @get_class(current($array)) != 'EM_Event' ){\r\n\t\t\t$events = self::get($array);\r\n\t\t}else{\r\n\t\t\t$events = $array;\r\n\t\t}\r\n\t\tforeach ($events as $EM_Event){\r\n\t\t\t$results[] = $EM_Event->delete();\r\n\t\t}\r\n\t\t//TODO add better error feedback on events delete fails\r\n\t\treturn apply_filters('em_events_delete', in_array(false, $results), $event_ids);\r\n\t}",
"function deleteEvent($day, $month, $year, $time, $buffertime, $userID){\n\tfoundAppointment($day, $month, $year, $userID);\n\t\t$q = \"DELETE FROM `UCPM_appointments` WHERE (TIME(starttime) > '$time') AND (TIME(starttime) < '$buffertime') AND (DATE(starttime) = '$year-$month-$day') AND (userID='$userID') \";\n\t$result = mysql_query($q) or die(mysql_error());\n\tcheckDeleted($day, $month, $year, $userID);\n\n}",
"function delete(){\n\t\tglobal $DOT;\n global $wpdb;\n global $DOPBSP;\n\n $id = $_POST['id'];\n $schedule = json_decode(stripslashes($_POST['schedule']));\n \n $days = array();\n $query = array();\n\n while ($data = current($schedule)){\n $day = key($schedule);\n array_push($days, $day);\n array_push($query, 'day=\"'.$day.'\"'); \n next($schedule); \n }\n \n if (count($query) > 0){\n $wpdb->query('DELETE FROM '.$DOPBSP->tables->days.' WHERE calendar_id=\"'.$id.'\" AND ('.implode(' OR ', $query).')');\n }\n \n\t\t$DOT->models->availability->set($id);\n\n die();\n }",
"public function events_delete(): void\n {\n $response = $this->check_request('Delete event');\n if (!$response) {\n $eventid = input_request('eventid');\n TableEvents::deleteByID($eventid);\n TableParticipants::deleteByEvent($eventid);\n TableRSVPs::deleteByEvent($eventid);\n $this->log_info(\"Delete event $eventid\");\n $response = $this->get_response(false, 'Event deleted');\n }\n exit(json_encode($response));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Proyecto has many Cotizaciones | public function cotizaciones()
{
# Define a one-to-many relationship.
return $this->hasMany('mmdi\Cotizacione');
} | [
"public function proyecto()\n {\n # Define an inverse one-to-many relationship.\n return $this->belongsTo('mmdi\\Proyecto');\n }",
"public function getComentarios()\n {\n return $this->hasMany(Comentarios::className(), ['Id_jogo' => 'Id']);\n }",
"public function getPuntajeComentarios()\n {\n return $this->hasMany(PuntajeComentario::className(), ['id_comentario' => 'id']);\n }",
"public function getComentarioPublicacions()\n {\n return $this->hasMany(ComentarioPublicacion::className(), ['compub_fkcomentario' => 'com_id']);\n }",
"public function publicacioncc(){\n return $this->belongsToMany('PublicacionCentrocomercial','publicacion_comerciales','centrocomercial_id','publicacion_id');\n }",
"public function cobros() {\r\n\t\treturn $this->hasMany('Cobro', 'usuario_id'); // this matches the Eloquent model\r\n\t}",
"public function projectos()\n {\n return $this->belongsToMany(Projecto::class,'projecto__provincias__distritos');\n }",
"public function clasesProducto()\n {\n return $this->belongsTo('crmcomercial\\Entities\\ClasesProducto', 'pro_clasprod');\n }",
"public function getCopias()\n {\n return $this->hasMany(Copias::className(), ['juego_id' => 'id'])->inverseOf('juego');\n }",
"public function compras()\n {\n return $this->hasMany(\"App\\Models\\Compra\");\n }",
"public function getCirugiaprogramadas()\n {\n return $this->hasMany(Cirugiaprogramada::className(), ['id_medico' => 'id']);\n }",
"public function getActoresPorPeliculas()\n {\n return $this->hasMany(ActoresPorPelicula::className(), ['idactor' => 'id']);\n }",
"public function bitacoraPendientes()\n {\n return $this->hasMany('App\\Models\\BitacoraPendiente','cia_id','id');\n }",
"public function getProyecto()\n {\n return $this->hasOne(Proyectos::className(), ['id_proyecto' => 'id_proyecto']);\n }",
"public function conjuntos(){\n\n return $this->belongsToMany('Conjunto','administrador_conjunto','administrador_id','conjunto_id');\n\n }",
"public function casos(){\n return $this->belongsTo('App\\Caso');\n }",
"public function clasesProducto()\n {\n return $this->belongsTo('crmcomercial\\Entities\\ClasesProducto', 'prod_clasprod');\n }",
"public function contenidoPedidos()\n {\n return $this->hasMany('App\\ContenidoPedido', 'PED_CODIGO', 'CON_CODIGO');\n }",
"public function proyectosLiderados()\n {\n return $this->hasMany('App/Proyecto', 'lider_id');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Event has more infos ? | public function hasMoreInfos()
{
if(!isset($this->moreInfos) || $this->moreInfos === null)
{
$this->moreInfos = class_exists($this->getEventClassName());
}
return $this->moreInfos;
} | [
"function Event_Inscriptions_Info($event=array())\n {\n if (empty($event)) { $event=$this->Event(); }\n \n $text=\"\";\n if (!empty($event[ \"Info\" ]))\n {\n $text=\n $this->MyMod_Data_Fields_Show(\"Info\",$event).\n $this->BR();\n }\n\n return $text;\n }",
"function smd_event_info($atts) {\n\t$atts['use'] = 'event';\n\treturn smd_cal_info($atts);\n}",
"public function info()\n {\n return $this->request('event/info', array(\n 'id' => $this->id\n ));\n }",
"public function getEventDetail()\n {\n return $this->event_detail;\n }",
"public function eventDetails()\n {\n return [\n 'name' => 'Event',\n 'description' => 'Event description',\n 'group' => 'groupcode',\n ];\n }",
"public function getEventDetails()\n {\n\t\treturn $this->_devToolHelper->getEventDetails();\n }",
"function add_event($event_info) {\n\t\n\t\n\treturn true;\n}",
"public function eventDetails()\n {\n return [\n 'name' => 'Activated',\n 'description' => 'A user is activated',\n 'group' => 'user'\n ];\n }",
"abstract protected function get_events();",
"public function getEventDescription()\n {\n }",
"function howtoStoreInfos($event){\n\tglobal $_StoredInfos,$_debug;\n\tif($_debug>0) console(\"howto.Event[$event]\");\n}",
"function event_details($obj) {\n \n // $fields[phrase('id', CAPITALIZE)] = $obj->id;\n $fields[phrase('type', CAPITALIZE)] = get_object('event_type', $obj->type, 'name');\n // $fields[phrase('status', CAPITALIZE)] = get_object('event_status', $obj->status, 'name'). \" (\".sql2human($obj->status_change_timestamp).\")\";\n // if($obj->status_change_timestamp > 1) $status_str .= \" (\".sql2human($enqObj->status_change_timestamp).\")\";\n\n $fields[phrase('start_time', CAPITALIZE)] = sql2human($obj->start_time, array('show_weekday' => true, 'show_time' => true));\n // $fields[phrase('end_time', CAPITALIZE)] = sql2human($obj->end_time, true, true);\n\n $fields[phrase('address', CAPITALIZE)] = $obj->start_address;\n $fields[phrase('to_address', CAPITALIZE)] = $obj->end_address;\n\n $fields[phrase('reservation', CAPITALIZE)] = $obj->res_id;\n if($obj->apt_id) $fields[phrase('property', CAPITALIZE)] = get_object('property', $obj->apt_id, 'name');\n\n $fields[phrase('customer_name', CAPITALIZE)] = $obj->customer_name;\n $fields[phrase('customer_count', CAPITALIZE)] = $obj->customer_count;\n $fields[phrase('customer_notes', CAPITALIZE)] = $obj->customer_notes;\n\n $fields[phrase('contractor_name', CAPITALIZE)] = $obj->contractor_name;\n $fields[phrase('contractor_notes', CAPITALIZE)] = $obj->contractor_notes;\n\n $fields[phrase('alert', CAPITALIZE)] = $obj->alert;\n $fields[phrase('notes', CAPITALIZE)] = $obj->notes;\n \n return array_filter($fields);\n}",
"function getEventDescription()\n {\n return ($this->__eventdescription) ;\n }",
"function notifications_event_text($event) {\n $info = notifications_event_types($event->type, $event->action);\n return $info;\n}",
"public function getEventInfo($event)\n {\n $info = xarEvents::getSubject($event);\n if (empty($info)) {\n return;\n }\n // file load takes care of validation for us\n if (!xarEvents::fileLoad($info)) {\n return;\n }\n return $info;\n }",
"public function EventAnnounce()\n {\n $id = _v('id', 0);\n $json = _v('json', 0);\n \n $event = Event::GetEvent($id);\n\n $res = array('q' => 'ok', 'errs' => array());\n if (!empty($event) && $event['Status'] == 1)\n {\n \t\t\n $mesg = 'New ' . ($event['EventType']==1 ? 'live' : ($event['EventType']==2 ? 'stream' : 'online')) . ' event ';\n /*\n\t\t\t$mesg .= ' \"<a href=\"http://'.DOMAIN.'/u/' . $this->mUser->mUserInfo['Name'] . '/events/' . $event['Id'] . '\">' . $event['Title'] . '</a>\"';\n\t\t\t*/\n\t\t\t$link = ' http://'.DOMAIN.'/u/' . $this->mUser->mUserInfo['Name'] . '/events/' . $event['Id'];\n\t\t\t$mesg .= $event['Title'];\n if($event['EventType'] != ONLINE_EVENT)\n {\n $mesg .= ' in ' . $event['Location'];\n }\n $mesg .= ' on ' . date('m/d/Y \\a\\t g:i A', strtotime($event['EventDate']));\n\t\t\t$mesg .= $link;\n \n\t\t\t$wallLink = '/u/' . $this->mUser->mUserInfo['Name'] . '/events/' . $event['Id'];\n\t\t\t\n\t\t\t$wallDate = date('M d,Y \\| l g:i A', strtotime($event['EventDate']));\n\n\t\t\t$eventType = ($event['EventType']==1 ? 'Live Event' : ($event['EventType']==2 ? 'Stream Event' : 'Online Event'));\n\n\t\t\t\t\t\t\t\n\t\t \t $wallMesg ='<a href=\"'.$wallLink.'\" >'.I_HAVE_CREATED_AN_EVENT.'</a> \n\t\t\t \t<p class=\"wallEvent font12\"><a href=\"'.$wallLink.'\" class=\"LF\"> <img width=\"100\" vspace=\"5\" hspace=\"5\" align=\"left\" alt=\"\" src=\"/files/photo/thumbs/'.$this->mUser->mUserInfo['Id'].'/'.$event['EventPhoto'].'\" style=\"\" class=\"prof-Img\"></a><a href=\"'.$wallLink.'\" class=\"black\">'.substr($event['Title'], 0, 125).'</a><a href=\"'.$wallLink.'\" class=\"block black bold\">'.($event['EventType']==1 ? 'Live Event' : ($event['EventType']==2 ? 'Stream Event' : 'Online Event')).'</a> <a href=\"'.$wallLink.'\" class=\"block black\" >'.$wallDate.'</a></p>';\n\n Wall::Add( $this->mUser->mUserInfo['Id'], $this->mUser->mUserInfo['Id'], $wallMesg,'','', 0, $this->mCache );\n \n\t\t /* //re-post to twitter\n if (!empty($this->mUser->mUserInfo['TwOauthToken']) && !empty($this->mUser->mUserInfo['TwOauthTokenSecret']))\n {\n require_once('libs/twitteroauth/twitteroauth.php');\n $tweet = new TwitterOAuth(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET, $this->mUser->mUserInfo['TwOauthToken'], $this->mUser->mUserInfo['TwOauthTokenSecret']);\n\t\t\t\t\n\t\t\t\t//start \t\n \n\t\t\t\t$con = new TwitterOAuth(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET);\n\t\t\t\t$request_token = $con->getRequestToken('http://' . DOMAIN . '/base/user/twitterconnect');\n\t\t\t\t$this->mlObj['mSession']->set('oauth_token', $request_token['oauth_token']);\n\t\t\t\t$this->mlObj['mSession']->set('oauth_token_secret', $request_token['oauth_token_secret']);\n\t\t\t\tif($con->http_code == 200)\n\t\t\t\t{\n\t\t\t\t\t$url = $con->getAuthorizeURL($request_token['oauth_token']);\n\t\t\t\t\t$res['url'] = $url;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$errs['tw_id'] = COULD_NOT_CONNECT_TO_TWITTER_REFRESH_THE_PAGE_OR_TRY_AGAIN_LATER;\n\t\t\t\t\tthrow new Exception('err');\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t$code = $tweet->post('https://api.twitter.com/1.1/statuses/update_with_media.json',\n\t\t\t\t\t\t\t\t\t array(\n\t\t\t\t\t\t\t\t\t\t'media[]' => '/files/photo/thumbs/'.$this->mUser->mUserInfo['Id'].'/'.$event['EventPhoto'].'',\n\t\t\t\t\t\t\t\t\t\t'status' => $mesg // Don't give up..\n\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t true, // use auth\n\t\t\t\t\t\t\t\t\t true // multipart\n\t\t\t\t);\n\n\t\t\t\t var_dump($code); die;\n\t\t\t\tif ($code == 200) \n\t\t\t\t{\n\t\t\t\t\techo \"OK\";\n\t\t\t\t deb(json_decode($tweet->response['response']));\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\techo \"ERROR\";\n\t\t\t\t\t deb($tweet->response['response']);\n\t\t\t\t}\n\t\t\t\t//end\n\t\t\t\t\n\t\t\t\t\n //$tweet->post('statuses/update', array('status' => $mesg));\n }*/\n //re-post to facebook\n if (!empty($this->mUser->mUserInfo['FbId']))\n {\n require_once 'libs/facebook-php-sdk/src/facebook.php';\n $facebook = new Facebook(array('appId' => FACEBOOK_API_ID, 'secret' => FACEBOOK_API_SECRET));\n $token = !empty($this->mUser->mUserInfo['FbToken']) ? $this->mUser->mUserInfo['FbToken'] : $facebook->getAccessToken();\n try\n {\n $facebook->api('/'.$this->mUser->mUserInfo['FbId'] . '/feed', 'POST', array('access_token' => $token, 'message' => $mesg, 'link' => $link));\n }\n catch(FacebookApiException $e)\n {\n }\n }\n //update event status\n EventQuery::create()->select(array('Id'))->filterById($id)->update(array('Status' => 2));\n $res['q'] = OK;\n }\n if($json)\n {\n echo json_encode($res);\n exit();\n }\n else\n {\n uni_redirect( PATH_ROOT . 'artist/events');\n }\n }",
"function mes_add_event_info_metabox() {\n\tadd_meta_box(\n\t\t'mes-event-info-metabox',\n\t\t__( 'Event Info', 'max-event' ),\n\t\t'mes_render_event_info_metabox',\n\t\t'event',\n\t\t'normal',\n\t\t'high'\n\t);\n\tadd_meta_box(\n\t\t'mes-event-info-metabox',\n\t\t__( 'Event Info', 'max-event' ),\n\t\t'mes_render_event_info_metabox',\n\t\t'event_moment',\n\t\t'normal',\n\t\t'high'\n\t);\n}",
"public function get_appended_events();",
"function eventdetail()\n\t{\n\t\tif(isset($_SESSION['user']))\n\t\t\t$userInfo = $_SESSION['user'];\n\t\telse\n\t\t\t$userInfo = array();\n\t\t$this->load->model('events');\n\t\t$param = $this->uri->uri_to_assoc(3);\n\t\t$id = \"\";\n\t\tif(isset($param['id']))\n\t\t\t$id = $param['id'];\n\t\t$r = $this->events->getEvent($id);\n\t\tif('OK'==$r['status'] && isset($r['event']['date']))\n\t\t{\n\t\t\t$event = $r['event'];\n\t\t\t$parms = array('event'=>$event);\n\t\t\t$content = $this->load->view('hcdec_event_detail', $parms, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$content = \"<div class='contentBox'><b>No such event</b></div>\";\n\t\t}\n\t\t$p = array('user'=>$userInfo, 'content'=>$content);\n\t\t$this->load->view('public_template', $p);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Transforms each element to array values using given function and merges all result arrays into one array Example: FluentTraversable::from(array('some', 'words')) >flatMap(call::func('str_split')) >toArray(); //result: array('s', 'o', 'm', 'e', 'w', 'o', 'r', 'd', 's') | public function flatMap($func); | [
"function flatmap(callable $mapping)\n{\n return function (array $array) use ($mapping) {\n return \\array_reduce(\\array_map($mapping, $array), function (array $carry, $item) {\n return \\array_merge($carry, \\is_array($item) ? $item : [$item]);\n }, []);\n };\n}",
"public function flatMap(callable $callback): Collection;",
"public static function flatMap($array, callable $callback)\n {\n return array_map($callback, self::flat($array));\n }",
"function flatMap($iterable, $callback): \\RecursiveIterator {\n return flatten(map($iterable, $callback));\n}",
"function array_transform($array, $function)\n{\n\tforeach ($array as &$element)\n\t\t$element = $function($element);\n\treturn $array;\n}",
"public function mapRows(callable $func): array\n {\n return \\array_map(\n $func,\n $this->A\n );\n }",
"function toArray(){\n return function($arr){\n return P::toArray($arr);\n };\n }",
"function map($list, $func)\n{\n $result = array();\n if($list !== null && $list !== false)\n {\n if(!is_array($list)) $list = array($list);\n foreach($list as $key => $item)\n {\n $v = $func($item, $key);\n if($v !== null)\n $result[] = $v;\n }\n }\n return($result);\n}",
"public function map($function) {\r\n $result = array();\r\n foreach ($this->_array as $index => $node) {\r\n if ($this->_isCallback($function, TRUE, FALSE)) {\r\n $mapped = call_user_func($function, $node, $index);\r\n }\r\n if ($mapped === NULL) {\r\n continue;\r\n } elseif ($mapped instanceof DOMNodeList ||\r\n $mapped instanceof Iterator ||\r\n $mapped instanceof IteratorAggregate ||\r\n is_array($mapped)) {\r\n foreach ($mapped as $element) {\r\n if ($element !== NULL) {\r\n $result[] = $element;\r\n }\r\n }\r\n } else {\r\n $result[] = $mapped;\r\n }\r\n }\r\n return $result;\r\n }",
"public static function map(array $array, callable $closure) : array\n {\n return array_map($closure, $array);\n }",
"public function flatMap(callable $map): Sequence\n {\n return $this->sequence()->flatMap($map);\n }",
"function map(callable $fn, iterable $coll): array\n{\n try {\n return ___map_indexed($fn, $coll);\n } catch (ArgumentCountError $error) {\n return array_map($fn, to_array($coll));\n }\n}",
"function array_map_recursive(&$arr, $func)\n{\n $new = array();\n foreach ($arr as $key => $value)\n {\n if (is_array($value))\n {\n $new[$key] = array_map_recursive($value, $func);\n }\n else\n {\n $new[$key] = $func($value);\n }\n }\n return $new;\n}",
"public function flatMap(callable $callback): Set;",
"function array_map_recursive($function, $array) {\n // Recursion closure\n if (!is_array($array)) {\n return call_user_func($function, $array);\n }\n \n // Rercursive call\n $result = array();\n foreach ($array as $key => $value ) {\n $result[$key] = array_map_recursive($function, $value);\n }\n \n return $result;\n}",
"public function toFlatArray();",
"function array_map_recursive($fn, $arr)\r\n{\r\n $rarr = array();\r\n foreach ($arr as $k => $v) {\r\n $rarr[$k] = is_array($v)\r\n ? array_map_recursive($fn, $v)\r\n : call_user_func($fn, $v);\r\n }\r\n return $rarr;\r\n}",
"function map($iterable, callable $f)\n{\n foreach ($iterable as $value) {\n yield $f($value);\n }\n}",
"public static function flatten(...$iterable): array\n {\n $callable = self::lastCallable($iterable);\n return $callable ? self::map(...$iterable)->flatten(...$callable)->traverse : self::map(...$iterable)->flatten;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a ControlParameters object to pool | public static function addControlParametersObject(IControlParametersClass $controlParamsObject) {
self::$controlParametersObjects[$controlParamsObject->getName()] = $controlParamsObject;
} | [
"function addControl($control) {\n \tarray_push($this->controls, $control);\n }",
"public function addParameters(array $parameters);",
"function addOptionControl($params, $section = null) {\n // otherwise add it to the element root\n if ($section) {\n $l = $section;\n } else {\n $l = $this->El;\n }\n\n $control_type = $params['type'];\n\n if (isset($params['name'])) {\n $control_label = $params['name'];\n } else {\n throw new Exception(\"addOptionControl params['name'] must be set\");\n }\n\n // generate a unique slug for the control based on the name\n if (isset($params['slug'])) {\n $control_slug = $params['slug'];\n } else {\n $control_slug = str_replace(\" \", \"-\", $params['name']);\n $control_slug = 'slug_'.preg_replace(\"/[^A-Za-z0-9 ]/\", \"\", $control_slug);\n }\n\n $Control = $l->addControl($control_type, $control_slug, __($control_label));\n\n // option controls is not a style controls, make those auto rebuild element to avoid \"Apply param\" button\n /*$rebuild_element = isset($params['rebuild_element']) ? $params['rebuild_element'] : true; \n if ($rebuild_element) {\n $Control->rebuildElementOnChange();\n }*/\n\n if (isset($params['condition'])) {\n $Control->setCondition($params['condition']);\n }\n\n if (isset($params['value'])) {\n $Control->setValue($params['value']);\n }\n\n if (isset($params['default'])) {\n $Control->setDefaultValue($params['default']);\n }\n\n if (isset($params['base64']) && $params['base64'] == true) {\n $Control->base64();\n }\n\n return $Control;\n\n }",
"public function add_params(array $params);",
"function addParams(array $params);",
"public function addParameters($params) {\n foreach ($params as $placeholder => $paramValue) {\n $this->setParameter($placeholder, $paramValue);\n }\n return $this;\n }",
"public function addParam(...$values) : AddParam;",
"public function testPoolAdd()\n {\n\n }",
"public function addParameter(string $name, $value): self;",
"public function __construct()\n\t\t\t{\n\t\t\t\t$this->m_pools = array();\n\t\t\t}",
"public function add($data = array()) {\n $data = $this->__prepare( $data );\n # add this new operator\n return parent::add($data); \n }",
"public function addConfig() {\n\t\tglobal $REQUEST_DATA;\n\t\treturn SystemDatabaseManager::getInstance()->runAutoInsert('config', array('param','labelName', 'value'), array($REQUEST_DATA['param'],$REQUEST_DATA['label'], $REQUEST_DATA['val']));\n\t}",
"public function addPool(PoolInterface $pool)\n {\n $this->pools[] = $pool;\n }",
"public function addParameter($name, $value);",
"function set_pool(array $pool)\n\t{\n\t\t$this->_pool = $pool;\n\t}",
"function addParameter($name, $value) {\n\t\tif (!$this->params[$name]) {\n\t\t\t$this->params[$name] = array();\n\t\t}\n\t\tarray_push($this->params[$name], $value);\n\t}",
"public static function add_vc_params() {\n\n\t\t\t$settings = array(\n\t\t\t\t'type' => 'autocomplete',\n\t\t\t\t'heading' => __( 'Real Media Library Folder', 'total' ),\n\t\t\t\t'param_name' => 'rml_folder',\n\t\t\t\t'group' => __( 'Gallery', 'total' ),\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'multiple' => false,\n\t\t\t\t\t'min_length' => 1,\n\t\t\t\t\t'groups' => true,\n\t\t\t\t\t'unique_values' => true,\n\t\t\t\t\t'display_inline' => true,\n\t\t\t\t\t'delay' => 0,\n\t\t\t\t\t'auto_focus' => true,\n\t\t\t\t),\n\t\t\t);\n\n\t\t\tforeach ( self::$vc_supported_modules as $module ) {\n\t\t\t\tvc_add_param( $module, $settings );\n\t\t\t\tif ( 'vcex_image_grid' != $module ) {\n\t\t\t\t\tvc_add_param( $module, array(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Count', 'total' ),\n\t\t\t\t\t\t'param_name' => 'posts_per_page',\n\t\t\t\t\t\t'value' => '12',\n\t\t\t\t\t\t'description' => __( 'How many images to grab from this folder. Enter -1 to display all of them.', 'total' ),\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}",
"public static function add_params() {\n\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Image alignment', 'wpex' ),\n\t\t\t\t'param_name' => 'alignment',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Default', 'wpex' ) => '',\n\t\t\t\t\t__( 'Left', 'wpex' ) => 'left',\n\t\t\t\t\t__( 'Right', 'wpex' ) => 'right',\n\t\t\t\t\t__( 'Center', 'wpex' ) => 'center',\n\t\t\t\t),\n\t\t\t\t'description' => __( 'Select image alignment.', 'wpex' )\n\t\t\t) );\n\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Image Filter', 'wpex' ),\n\t\t\t\t'param_name' => 'img_filter',\n\t\t\t\t'value' => array_flip( wpex_image_filters() ),\n\t\t\t\t'description' => __( 'Select an image filter style.', 'wpex' ),\n\t\t\t) );\n\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Over Image Caption', 'wpex' ),\n\t\t\t\t'param_name' => 'img_caption',\n\t\t\t\t'description' => __( 'Use this field to add a caption to any single image with a link.', 'wpex' ),\n\t\t\t) );\n\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'CSS3 Image Link Hover', 'wpex' ),\n\t\t\t\t'param_name' => 'img_hover',\n\t\t\t\t'std' => '',\n\t\t\t\t'value' => array_flip( wpex_image_hovers() ),\n\t\t\t\t'description' => __( 'Select your preferred image hover effect. Please note this will only work if the image links to a URL or a large version of itself. Please note these effects may not work in all browsers.', 'wpex' ),\n\t\t\t) );\n\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Video, SWF, Flash, URL Lightbox', 'wpex' ),\n\t\t\t\t'param_name' => 'lightbox_video',\n\t\t\t\t'description' => __( 'Enter the URL to a video, SWF file, flash file or a website URL to open in lightbox.', 'wpex' ),\n\t\t\t\t'group' => __( 'Custom Lightbox', 'wpex' ),\n\t\t\t) );\n\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'heading' => __( 'Lightbox Type', 'wpex' ),\n\t\t\t\t'param_name' => 'lightbox_iframe_type',\n\t\t\t\t'value' => array(\n\t\t\t\t\t__( 'Auto Detect', 'wpex' ) => '',\n\t\t\t\t\t__( 'URL', 'wpex' ) => 'url',\n\t\t\t\t\t__( 'Youtube, Vimeo, Embed or Iframe', 'wpex' ) => 'video_embed',\n\t\t\t\t\t__( 'HTML5', 'wpex' ) => 'html5',\n\t\t\t\t\t__( 'Quicktime', 'wpex' ) => 'quicktime',\n\t\t\t\t),\n\t\t\t\t'description' => __( 'Auto detect depends on the iLightbox API, so by choosing your type it speeds things up and you also allows for HTTPS support.', 'wpex' ),\n\t\t\t\t'group' => __( 'Custom Lightbox', 'wpex' ),\n\t\t\t\t'dependency' => Array( 'element' => 'lightbox_video', 'not_empty' => true ),\n\t\t\t) );\n\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'HTML5 Webm URL', 'wpex' ),\n\t\t\t\t'param_name' => 'lightbox_video_html5_webm',\n\t\t\t\t'description' => __( 'Enter the URL to a video, SWF file, flash file or a website URL to open in lightbox.', 'wpex' ),\n\t\t\t\t'group' => __( 'Custom Lightbox', 'wpex' ),\n\t\t\t\t'dependency' => Array( 'element' => 'lightbox_iframe_type', 'value' => 'html5' ),\n\t\t\t) );\n\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => __( 'Lightbox Dimensions', 'wpex' ),\n\t\t\t\t'param_name' => 'lightbox_dimensions',\n\t\t\t\t'description' => __( 'Enter a custom width and height for your lightbox pop-up window. Use format widthxheight. Example: 900x600.', 'wpex' ),\n\t\t\t\t'group' => __( 'Custom Lightbox', 'wpex' ),\n\t\t\t) );\n\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'attach_image',\n\t\t\t\t'admin_label' => false,\n\t\t\t\t'heading' => __( 'Custom Image Lightbox', 'wpex' ),\n\t\t\t\t'param_name' => 'lightbox_custom_img',\n\t\t\t\t'description' => __( 'Select a custom image to open in lightbox format', 'wpex' ),\n\t\t\t\t'group' => __( 'Custom Lightbox', 'wpex' ),\n\t\t\t) );\n\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'attach_images',\n\t\t\t\t'admin_label' => false,\n\t\t\t\t'heading' => __( 'Gallery Lightbox', 'wpex' ),\n\t\t\t\t'param_name' => 'lightbox_gallery',\n\t\t\t\t'description' => __( 'Select images to create a lightbox Gallery.', 'wpex' ),\n\t\t\t\t'group' => __( 'Custom Lightbox', 'wpex' ),\n\t\t\t) );\n\n\t\t\t// Hidden fields for parsing\n\t\t\tvc_add_param( 'vc_single_image', array(\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'param_name' => 'rounded_image',\n\t\t\t) );\n\n\t\t}",
"function add_params($params){\n\t\tforeach ($params as $o=>$v) {\n\t\t\t$this->depot->$o = $v;\n\t\t}\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetches a document from the database by identifier, and returns the object representation TODO: Add support for $objectType | public function getObjectByIdentifier($identifier, $objectType = NULL, $useLazyLoading = FALSE) {
try {
$document = $this->client->getDocument($identifier);
} catch (\TYPO3\CouchDB\Client\NotFoundException $exception) {
return NULL;
}
if (isset($document->persistence_objectType)) {
return new $document->persistence_objectType((array)$document);
}
return new \Radmiraal\CouchDB\Document((array)$document);
} | [
"function getDocument($id) {\n \treturn $this->connection->get($id);\n }",
"public function getObjectByIdentifier($identifier) {\n\t\tif ($this->persistenceSession->hasIdentifier($identifier)) {\n\t\t\treturn $this->persistenceSession->getObjectByIdentifier($identifier);\n\t\t} else {\n\t\t\t$objectData = $this->backend->getObjectDataByIdentifier($identifier);\n\t\t\tif ($objectData !== FALSE) {\n\t\t\t\treturn $this->dataMapper->mapToObject($objectData);\n\t\t\t} else {\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\t}",
"public function getObject($id);",
"public function findOneByID($identifier);",
"public function fetch($id)\n\t{\n if($this->_caching){\n $doc = $this->_cache->fetch($id);\n if($doc){\n return $doc;\n }\n }\n $data = $this->_fetch($id);\n $doc = $this->arrayToDocument($data);\n if($this->_caching){\n $this->_cache->add($doc->fetchDocumentId(), $doc);\n }\n return $doc;\n\t}",
"public function getObjectFromID($id) { return get_entity($id); }",
"public function getDocument($rid, $database = null, $fetchPlan = null);",
"public function getByID( $id=null ){\n if ( !$id)\n $id = $this->id;\n $bson = $this->db->getByID( $this->collection, $id );\n self::read( $bson );\n $this->read( $bson ); \n }",
"public function getDocumentDetail_get() {\n extract($_GET);\n $document_id = base64_decode($doc_id);\n $result = $this->document_model->getDocumentDetail($document_id);\n if ($result) {\n return $this->response($result, 200);\n } else {\n return $this->response(NULL, 404);\n }\n }",
"public function document($id)\n {\n return $this->get(\"documents/{$id}/\");\n }",
"protected function getObject($type, $identifier){\n\t\tif (is_numeric($identifier)){\n\t\t\treturn $this->getObjectById($type, $identifier);\n\t\t}\n\t\telseif (preg_match(\"/^(?:cn|dn|ou)=/i\", $identifier)){\n\t\t\treturn $this->getObjectByDN($type, $identifier);\n\t\t}\n\t\telse {\n\t\t\treturn $this->getObjectByCN($type, $identifier);\n\t\t}\n\t}",
"public function getObjectFromID($id) {\n\t\treturn get_entity($id);\n\t}",
"public static function getDocument($id = null) {\n\t\tif ($id)\n\t\t\tphpQuery::selectDocument($id);\n\t\telse\n\t\t\t$id = phpQuery::$defaultDocumentID;\n\t\treturn new phpQueryObject($id);\n\t}",
"public function getEntityByIdentifier($identifier);",
"public function get($doiId);",
"protected function _getObjectData($identifier) {\n\t\tif ($this->hasEntityRecord($identifier)) {\n\t\t\t$statementHandle = $this->databaseHandle->prepare('SELECT \"identifier\", \"type\" AS \"classname\" FROM \"entities\" WHERE \"identifier\"=?');\n\t\t} else {\n\t\t\t$statementHandle = $this->databaseHandle->prepare('SELECT \"identifier\", \"type\" AS \"classname\" FROM \"valueobjects\" WHERE \"identifier\"=?');\n\t\t}\n\t\t$statementHandle->execute(array($identifier));\n\t\t$objects = $this->processObjectRecords($statementHandle);\n\t\treturn current($objects);\n\t}",
"public function get($identifier, array $criteria = null)\n {\n if (empty($criteria)) {\n if ($this->_getIdColumnName() === 'id') {\n return $this->find($identifier);\n } else {\n $criteria = array();\n }\n }\n\n $qb = $this->_getBaseOneQueryBuilder()->setParameter('id', $identifier);\n $this->_addCriteriaToBuilder($qb, 'e', $this->sanitizeQuery($criteria));\n $query = $qb->getQuery();\n $result = $query->getOneOrNullResult();\n return $result;\n }",
"public function find($identifier)\n {\n return $this->model->find($identifier);\n }",
"public function get($identifier, array $criteria = null)\n\t{\n\t\tif (empty($criteria)) {\n\t\t\treturn $this->find($identifier);\n\t\t}\n\n\t\t$criteria['id'] = $identifier;\n\t\t$parts = $this->_addNativeCriteriaToQuery($this->_getBaseDistinctQuery('id'), $criteria);\n\t\t$parts['limit'] = 1;\n\t\t$query = $this->_buildNativeQuery($parts, $this->_getResultMapping());\n\t\t$result = $query->getOneOrNullResult();\n\t\treturn $result;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the invoice status for the shipment you specify. Usage Plans: | Plan type | Rate (requests per second) | Burst | | | | | |Default| 1.133 | 25 | |Selling partner specific| Variable | Variable | The xamznRateLimitLimit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation. | public function getInvoiceStatus($shipmentId): GetInvoiceStatusResponse
{
return $this->client->request('getInvoiceStatus', 'GET', "/fba/outbound/brazil/v0/shipments/{$shipmentId}/invoice/status",
[
]
);
} | [
"function getInvoiceStatus() {\n\t\treturn $this->_calcInvoiceStatusCode();\n\t}",
"public function getInvoiceStatus()\n {\n if (array_key_exists(\"invoiceStatus\", $this->_propDict)) {\n if (is_a($this->_propDict[\"invoiceStatus\"], \"\\Beta\\Microsoft\\Graph\\Model\\BookingInvoiceStatus\") || is_null($this->_propDict[\"invoiceStatus\"])) {\n return $this->_propDict[\"invoiceStatus\"];\n } else {\n $this->_propDict[\"invoiceStatus\"] = new BookingInvoiceStatus($this->_propDict[\"invoiceStatus\"]);\n return $this->_propDict[\"invoiceStatus\"];\n }\n }\n return null;\n }",
"public function getFulfillmentShipmentStatus()\n {\n return $this->_fields['FulfillmentShipmentStatus']['FieldValue'];\n }",
"public function getNewInvoiceStatus()\n {\n return $this->newInvoiceStatus;\n }",
"public function humanInvoiceStatus(){\n\t\tswitch( $this->invoiceStatus ){\n\t\t\tdefault :\n\t\t\tcase self::INVOICE_CADDIE :\n\t\t\t\treturn 'Caddie';\n\t\t\tcase self::INVOICE_IN_PROGRESS :\n\t\t\t\treturn 'In progress';\n\t\t\tcase self::INVOICE_PAYED :\n\t\t\t\treturn 'Payed';\n\t\t\tcase self::INVOICE_ERROR :\n\t\t\t\treturn 'Error';\n\t\t\tcase self::INVOICE_CANCEL :\n\t\t\t\treturn 'Canceled';\n\t\t}\n\t\treturn false;\n\t}",
"public function getBillStatus()\n {\n return $this->bill_status;\n }",
"public function getStatusByDates()\n {\n if ($this->isCurrent()) {\n return PlanStatus::ACTIVE;\n } elseif ($this->hasEnded()) {\n return PlanStatus::FINISHED;\n } elseif ($this->startsAfterNow()) {\n return PlanStatus::PRE_PURCHASE;\n }\n }",
"function getOrderShipmentStatus() {\n $orderShipmentStatus = array(\n '0' => 'Pending',\n '1' => 'Delivered',\n '5' => 'Vendor Shipped',\n '9' => 'Warehouse Received',\n '2' => 'Warehouse Accepted',\n '3' => 'Warehouse Rejected',\n '4' => 'Admin Shipped',\n '6' => 'Admin Cancelled',\n '7' => 'Vendor Cancelled',\n '8' => 'Returned',\n );\n return $orderShipmentStatus;\n }",
"public function getInvoiceState()\n {\n return $this->invoiceState;\n }",
"public function getShippingInvoiced();",
"public function getInventoryStatus()\n {\n return $this->inventoryStatus;\n }",
"public function getInventoryStatus()\n {\n return $this->inventory_status;\n }",
"public function getStatus($shipment_id) {\n\t\t$columns = array ('shipment_id');\n\t\t$records = array ($shipment_id);\n\t\t$status_ = $this->query_from_shipment ( $columns, $records );\n\t\treturn sizeof($status_)>0 ? $status_ [0] ['status'] : null;\n\t}",
"public function getPaymentStatus();",
"public function getTFMShipmentStatus() \n {\n return $this->_fields['TFMShipmentStatus']['FieldValue'];\n }",
"public function getFulfillmentStatus(\\Magento\\Sales\\Model\\Order\\Shipment $shipment)\n {\n $shipmentsCount = $shipment->getOrder()->getShipmentsCollection()->count();\n\n if ($shipment->getOrder()->canShip() == false) {\n return 'COMPLETE';\n } else {\n return 'PARTIAL';\n }\n }",
"public function getShipmentStatuses()\n {\n return array(\n 'NONE' => $this->__('NONE'),\n 'NEW' => $this->__('NEW'),\n 'BOOK' => $this->__('BOOK'),\n 'LABL' => $this->__('LABL'),\n 'MANI' => $this->__('MANI'),\n 'ACCEP' => $this->__('ACCEP'),\n 'TRNS' => $this->__('TRNS'),\n 'DONE' => $this->__('DONE'),\n 'APOD' => $this->__('APOD'),\n 'REFU' => $this->__('REFU'),\n 'ERR' => $this->__('ERR'),\n 'DEL' => $this->__('DEL'),\n 'ONHOLD' => $this->__('ONHOLD'),\n );\n }",
"function _status($contract){\n\t\t//Save the current time: today's date with 00:00:00\n\t\t$time = strtotime(date('Y-m-d', time()));\n\t\t\n\t\t//First of all check if contract end is in the past - if so, status is expired anyway\n\t\tif ($contract->contract_date_end <= $time) return 'contract_status_expired';\n\t\t\n\t\t//if the next invoice date is in the future, we know that the status is ok\n\t\tif ($contract->contract_date_start > $time) return 'contract_status_wait';\n\t\t\n\t\t//if we're between invoices, status is running\n\t\tif ($contract->last_invoice_date <= $time && $contract->next_invoice_date > $time) {\n\t\t\tif ($contract->next_invoice_date < $contract->contract_date_end){\n\t\t\t\treturn 'contract_status_ok';\n\t\t\t} else {\t\t\t\t\n\t\t\t\t//The current invoice is the last one for this contract - we let the user know this\n\t\t\t\treturn 'contract_status_expiring';\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If all these checks are false, we need an invoice.\n\t\treturn 'contract_status_due';\n\t}",
"public function getPhysicalInventoryStatus();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Merges `$data` into `$entity`. Options: validate: Whether or not to validate data before hydrating the entities. Can also be set to a string to use a specific validator. Defaults to true/default. fieldList: A whitelist of fields to be assigned to the entity. If not present the accessible fields list in the entity will be used. accessibleFields: A list of fields to allow or deny in entity accessible fields. | public function merge(EntityInterface $entity, array $data, array $options = []): EntityInterface
{
[$data, $options] = $this->_prepareDataAndOptions($data, $options);
$isNew = $entity->isNew();
$keys = [];
if (!$isNew) {
$keys = $entity->extract((array)$this->_endpoint->getPrimaryKey());
}
if (isset($options['accessibleFields'])) {
foreach ((array)$options['accessibleFields'] as $key => $value) {
$entity->setAccess($key, $value);
}
}
$errors = $this->_validate($data + $keys, $options, $isNew);
$properties = [];
foreach ($data as $key => $value) {
if (!empty($errors[$key])) {
if ($entity instanceof InvalidPropertyInterface) {
$entity->setInvalidField($key, $value);
}
continue;
}
$properties[$key] = $value;
}
if (!isset($options['fieldList'])) {
$entity->set($properties);
$entity->setErrors($errors);
return $entity;
}
foreach ((array)$options['fieldList'] as $field) {
if (array_key_exists($field, $properties)) {
$entity->set($field, $properties[$field]);
}
}
$entity->setErrors($errors);
return $entity;
} | [
"public function merge(EntityInterface $entity, array $data, array $options = [])\n {\n $options += ['associated' => []];\n list($data, $options) = $this->_prepareDataAndOptions($data, $options);\n $errors = $this->_validate($data, $options, $entity->isNew());\n $entity->errors($errors);\n\n foreach (array_keys($errors) as $badKey) {\n unset($data[$badKey]);\n }\n\n// foreach ($this->collection->embedded() as $embed) {\n // $property = $embed->property();\n // if (in_array($embed->alias(), $options['associated']) &&\n // isset($data[$property])\n // ) {\n // $data[$property] = $this->mergeNested($embed, $entity->{$property}, $data[$property]);\n // }\n // }\n\n if (!isset($options['fieldList'])) {\n $entity->set($data);\n\n return $entity;\n }\n\n foreach ((array) $options['fieldList'] as $field) {\n if (array_key_exists($field, $data)) {\n $entity->set($field, $data[$field]);\n }\n }\n\n return $entity;\n }",
"public function merge(EntityInterface $entity, array $data, array $options = [])\n {\n $options += ['associated' => []];\n [$data, $options] = $this->_prepareDataAndOptions($data, $options);\n $errors = $this->_validate($data, $options, $entity->isNew());\n $entity->setErrors($errors);\n\n foreach (array_keys($errors) as $badKey) {\n unset($data[$badKey]);\n }\n\n foreach ($this->index->embedded() as $embed) {\n $property = $embed->getProperty();\n if (in_array($embed->getAlias(), $options['associated']) && isset($data[$property])) {\n $data[$property] = $this->mergeNested($embed, $entity->{$property}, $data[$property]);\n }\n }\n\n if (!isset($options['fieldList'])) {\n $entity->set($data);\n\n return $entity;\n }\n\n foreach ((array)$options['fieldList'] as $field) {\n if (array_key_exists($field, $data)) {\n $entity->set($field, $data[$field]);\n }\n }\n\n return $entity;\n }",
"public function patch(Entity $entity, array $data, array $options=[]) : Entity\n {\n $options += ['name' => $entity->name(),'associated'=>[],'fields'=>[]];\n \n $entity->reset(); // reset modified\n\n $options['associated'] = $this->normalizeAssociated($options['associated']);\n $propertyMap = $this->buildAssociationMap(array_keys($options['associated']));\n\n $properties = [];\n foreach ($data as $property => $value) {\n if (isset($propertyMap[$property])) {\n if (!is_array($value)) {\n $properties[$property] = null;// remove inconsistent data\n continue;\n }\n $alias = $property;\n $fields = [];\n if ($propertyMap[$property] === 'many') {\n $alias = Inflector::singularize($alias);\n }\n\n $model = ucfirst($alias);\n if (isset($options['associated'][$model]['fields'])) {\n $fields = $options['associated'][$model]['fields'];\n unset($options['associated'][$model]['fields']);\n }\n\n $properties[$property] = $this->{$propertyMap[$property]}($value, [\n 'name'=>ucfirst($alias),\n 'fields' => $fields,\n 'associated' => $options['associated'] // passing same data might\n ]);\n } else {\n $original = $entity->get($property);\n if ($value !== $original) {\n $properties[$property] = $value;\n }\n }\n }\n \n if ($options['fields'] and is_array($options['fields'])) {\n foreach ($properties as $property => $value) {\n if (in_array($property, $options['fields'])) {\n $entity->set($property, $value);\n }\n }\n return $entity;\n }\n $entity->set($properties);\n return $entity;\n }",
"public function patchEntity(EntityInterface $entity, array $data, array $options = []): EntityInterface\n {\n $marshaller = $this->marshaller();\n\n return $marshaller->merge($entity, $data, $options);\n }",
"public function testMergeWithFields(): void\n {\n $data = [\n 'title' => 'My title',\n 'body' => null,\n 'author_id' => 1,\n ];\n $marshall = new Marshaller($this->articles);\n $entity = new Entity([\n 'title' => 'Foo',\n 'body' => 'My content',\n 'author_id' => 2,\n ]);\n $entity->setAccess('*', false);\n $entity->setNew(false);\n $entity->clean();\n $result = $marshall->merge($entity, $data, ['fields' => ['title', 'body']]);\n\n $expected = [\n 'title' => 'My title',\n 'body' => null,\n 'author_id' => 2,\n ];\n\n $this->assertSame($entity, $result);\n $this->assertEquals($expected, $result->toArray());\n $this->assertFalse($entity->isAccessible('*'));\n }",
"public function populate($entityData) {\n foreach($entityData as $field => $value) {\n if(property_exists($this, $field) && !is_object($this->{$field})) {\n $this->{$field} = $value;\n }\n }\n\n foreach($this as $field => $value) {\n if(is_object($value)) {\n /** @var BaseEntity $value */\n $value->populate($entityData);\n }\n }\n }",
"protected function setEntityData($data)\n {\n $meta = $this->getEntityMetadata($this->entityClass);\n $id = $meta->getIdentifierFieldNames();\n\n foreach ($data as $f => $v)\n {\n $repoSetter = 'setEntity' . Doctrine\\Common\\Util\\Inflector::classify($f);\n if (method_exists($meta->customRepositoryClassName, $repoSetter))\n {\n $repo = EM()->getRepository($meta->name);\n $repo->$repoSetter($this->entity, $v);\n }\n else if (in_array($f, $meta->fieldNames) && !in_array($f, $id))\n {\n $setter = 'set' . Doctrine\\Common\\Util\\Inflector::classify($f);\n $this->entity->$setter($v);\n }\n else if (isset($meta->associationMappings[$f]))\n {\n $v || $v = null;\n\n $setter = 'set' . Doctrine\\Common\\Util\\Inflector::classify($f);\n $this->entity->$setter($v);\n }\n }\n }",
"abstract protected function populateEntity($entity, array $data);",
"abstract public function populateEntities($data);",
"public function patchEntity(EntityInterface $entity, array $data, array $options = []): EntityInterface;",
"public function merge(array $data): \\Maleficarum\\Data\\Model\\AbstractModel {\n // attempt to merge as much input data as possible\n foreach ($data as $key => $val) {\n $methodName = 'set' . str_replace(' ', '', ucwords($key));\n method_exists($this, $methodName) and $this->$methodName($val);\n }\n\n // merge meta if any is available\n array_key_exists('_meta', $data) && is_array($data['_meta']) and $this->setMeta($data['_meta']);\n\n // conclude\n return $this;\n }",
"public function hydrate()\n {\n if (! $this->_data)\n {\n $this->_data = $this->load();\n }\n else\n {\n $this->_data = array_merge($this->load(), $this->_data);\n }\n }",
"public function setEntityData(array $data){\n parent::setModelData($data);\n }",
"public function testMergeWithValidation(): void\n {\n $data = [\n 'title' => 'My title',\n 'author_id' => 'foo',\n ];\n $marshall = new Marshaller($this->articles);\n $entity = new Entity([\n 'id' => 1,\n 'title' => 'Foo',\n 'body' => 'My Content',\n 'author_id' => 1,\n ]);\n $this->assertEmpty($entity->getInvalid());\n\n $entity->setAccess('*', true);\n $entity->setNew(false);\n $entity->clean();\n\n $this->articles->getValidator()\n ->requirePresence('thing', 'update')\n ->requirePresence('id', 'update')\n ->add('author_id', 'numeric', ['rule' => 'numeric'])\n ->add('id', 'numeric', ['rule' => 'numeric', 'on' => 'update']);\n\n $expected = clone $entity;\n $result = $marshall->merge($expected, $data, []);\n\n $this->assertSame($expected, $result);\n $this->assertSame(1, $result->author_id);\n $this->assertNotEmpty($result->getError('thing'));\n $this->assertEmpty($result->getError('id'));\n\n $this->articles->getValidator()->requirePresence('thing', 'create');\n $result = $marshall->merge($entity, $data, []);\n\n $this->assertEmpty($result->getError('thing'));\n $this->assertSame(['author_id' => 'foo'], $result->getInvalid());\n }",
"protected function addFieldsToData () {\n\t\t$addFields = array_flip(t3lib_div::trimExplode(',', $this->conf['addFieldsToData']));\n\t\t$this->cObj->data = t3lib_div::array_merge_recursive_overrule(\n\t\t\t$this->cObj->data,\n\t\t\t$addFields\n\t\t);\n\t}",
"public function patchEntities($entities, array $data, array $options = [])\n {\n }",
"public function merge($data)\n {\n foreach ($data as $key => $value) {\n if (is_null($value)) {\n continue;\n }\n\n $studlyKey = Utils::studlyCase($key);\n $currentValue = $this->{'get'.$studlyKey}();\n if ($currentValue instanceof BaseSdkObject) {\n $currentValue->merge($value);\n } else {\n $this->{'set'.$studlyKey}(is_array($currentValue) ? array_merge(\n $currentValue,\n $value\n ) : $value);\n }\n }\n return $this;\n }",
"protected function denormalizeFieldData(array $data, FieldableEntityInterface $entity, $format, array $context) {\n foreach ($data as $field_name => $field_data) {\n $field_item_list = $entity->get($field_name);\n\n // Remove any values that were set as a part of entity creation (e.g\n // uuid). If the incoming field data is set to an empty array, this will\n // also have the effect of emptying the field in REST module.\n $field_item_list->setValue([]);\n $field_item_list_class = get_class($field_item_list);\n\n if ($field_data) {\n // The field instance must be passed in the context so that the field\n // denormalizer can update field values for the parent entity.\n $context['target_instance'] = $field_item_list;\n $this->serializer->denormalize($field_data, $field_item_list_class, $format, $context);\n }\n }\n }",
"abstract protected function populateEntity(PrimaryEntity $entity, object $data): PrimaryEntity;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the first date for which courses can currently be created (included) | public function getLastCourseCreateDate(); | [
"public function GetFirstDate( ) {\n\n $dt = new cDate( $this->m_dates[0]);\n\n for ($i=0;$i<$this->m_count; $i++){\n if ($this->m_dates[$i]->lt($dt)) { $dt = new cDate($this->m_dates·[$i]); }\n }\n\n return $dt;\n\n }",
"public function getFirstReleaseDate();",
"private function getFirstDate()\n {\n $days = $this->getUniqueDays()->{0}->date;\n\n return $days;\n }",
"public function getFirstCourseSubjectWeekday()\n {\n return 1;\n\n }",
"public function getManualDateStart() {}",
"function GetStartDate()\n {\n $q = \"SELECT MIN(dt) as dt FROM \".TblModStatLog.\" where 1 \";\n $res = $this->Right->Query( $q, $this->user_id, $this->module );\n if( !$res ) return false;\n $rows = $this->Right->db_GetNumRows();\n $row = $this->Right->db_FetchAssoc();\n return $row['dt'];\n }",
"public function getFirstPublicationDate()\n {\n return $this->firstPublicationDate;\n }",
"public function getFirstTicketDate()\n {\n return $this->firstTicketDate;\n }",
"public function getEarliestShipDate();",
"private function getMinDate()\n {\n $date = new \\DateTime();\n\n return $date;\n }",
"public function firstOrderDate() {\n\t\n\t\t$cpModel = Base::getModel('Common_Orders');\n\t\t$select = $cpModel->select()\n\t\t ->where('common_user_id = ?', $this->id)\n\t\t ->where('status != ?', 'CANCELLED')\n\t\t\t\t ->order('id ASC')\n\t\t\t\t ->limit(1);\n\t\t\n\t\t$order = $cpModel->fetchRow($select);\n\t\tif($order){\n\t\t\treturn $order->date_created;\n\t\t}\n\t\treturn null;\n\t}",
"public function getCurrentAndUpcomingCourses() {\r\n\t $results = $this->find('all', array(\r\n\t 'conditions' => array(\r\n 'CourseDate.date >=' => date('Y-m-d')\r\n ),\r\n 'fields' => array('CourseDate.course_id')\r\n ));\r\n\t if ($results) {\r\n $course_ids = array();\r\n\t foreach ($results as $result) {\r\n\t $course_id = $result['CourseDate']['course_id'];\r\n\t if (! in_array($course_id, $course_ids)) {\r\n $course_ids[] = $course_id;\r\n }\r\n }\r\n\r\n return $course_ids;\r\n }\r\n\r\n return array();\r\n }",
"public function getNewStartDate()\n {\n return $this->new_start_date;\n }",
"function get_first_day(): DateTime {\r\n // Must clone, otherwise the add will affect the first day\r\n $final_issue_first_dt = clone parent::get_first_day();\r\n\r\n // Move up 7 days\r\n $final_issue_first_dt->add(new DateInterval('P7D'));\r\n return $final_issue_first_dt;\r\n }",
"public function getFirstBookingDate()\n {\n return isset($this->FirstBookingDate) ? $this->FirstBookingDate : null;\n }",
"public function getStartDate(): DateTime\n {\n $startMonth = $this->semesterTime == 'Vår' ? '01' : '08';\n return date_create($this->year.'-'.$startMonth.'-01 00:00:00');\n }",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(AsyncJobPeer::CREATION_DATE);\n }",
"public function getBeginCreationDate(): ?string\n {\n return isset($this->BeginCreationDate) ? $this->BeginCreationDate : null;\n }",
"function getStartDate()\n {\n $yyyymmdd = parent::get('templestart');\n if (strlen($yyyymmdd) == 8)\n return new LegacyDate(' ' . substr($yyyymmdd, 0, 4) .\n '/' . substr($yyyymmdd, 4, 2) .\n '/' . substr($yyyymmdd, 6, 2));\n else\n return new LegacyDate('');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the attribute bunch processor instance. | protected function getAttributeBunchProcessor()
{
return $this->attributeBunchProcessor;
} | [
"protected function _getProcessor()\n {\n return Mage::getSingleton('smile_magecache/processor');\n }",
"protected function getProductBunchProcessor()\n {\n return $this->productBunchProcessor;\n }",
"public function getProcessor();",
"protected function getCategoryBunchProcessor()\n {\n return $this->categoryBunchProcessor;\n }",
"public function getProcessorAttributes()\n {\n if (!$this->valid()) {\n return null;\n }\n\n return $this->processors[$this->action][$this->index]['attributes'];\n }",
"protected function getCustomerBunchProcessor()\n {\n return $this->customerBunchProcessor;\n }",
"public function getCategoryBunchProcessor()\n {\n return $this->categoryBunchProcessor;\n }",
"protected function getSampleProcessor()\n {\n return $this->sampleProcessor;\n }",
"public function getProcessor()\n {\n return $this->processor;\n }",
"protected function getMsiBunchProcessor()\n {\n return $this->msiBunchProcessor;\n }",
"protected function getCustomerAddressBunchProcessor()\n {\n return $this->customerAddressBunchProcessor;\n }",
"public function getCatalogProcessor()\n {\n return $this->catalogProcessor;\n }",
"public function getProcessors() {}",
"public function processors()\n {\n return new Processors($this);\n }",
"public function getProcessor(): ProcessorInterface;",
"public function getProcessors(){\n return $this->_creditProcessors;\n }",
"protected function getProcessors()\n {\n return $this->get('payment_method.processor.collection')->all();\n }",
"private function getAttributeObject()\n {\n return $this->registry->registry('entity_attribute');\n }",
"public static function getProcessor()\n {\n return \\Illuminate\\Database\\Query\\Builder::getProcessor();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prepare bind value for LIKE condition Callback method | public function bindLikeValue($value)
{
return '%' . $value . '%';
} | [
"public function where_like($argument = null, $value = null);",
"public function and_where_like($argument = null, $value = null);",
"protected function prepareSearch(){\n\n if($this->search && count($this->searchableFields)){\n $fields = implode(' LIKE ? OR ',$this->searchableFields);\n $values = array_fill(0, count($this->searchableFields), $this->search);\n $this->Model->where(\"($fields LIKE ?)\",$values);\n }//if\n\n }",
"function formSimpleLike($str, $col) {\r\n $final = \"WHERE \" . $col . \" LIKE \" . \"'%\" . $str . \"%'\";\r\n return $final;\r\n}",
"abstract protected function platformPrepareLikeStatement(\n $prefix = null,\n $column,\n $not = null,\n $bind,\n $caseSensitive = false\n );",
"function sql_like_string($str, $like_char, $wildcard = '%', $appendWildcard = true)\n{\n\n // override default wildcard character\n if (isset($GLOBALS['sugar_config']['search_wildcard_char']) &&\n strlen($GLOBALS['sugar_config']['search_wildcard_char']) == 1\n ) {\n $wildcard = $GLOBALS['sugar_config']['search_wildcard_char'];\n }\n\n // add wildcard at the beginning of the search string\n if (isset($GLOBALS['sugar_config']['search_wildcard_infront']) &&\n $GLOBALS['sugar_config']['search_wildcard_infront'] == true\n ) {\n if (substr($str, 0, 1) != $wildcard) {\n $str = $wildcard . $str;\n }\n }\n\n // add wildcard at the end of search string (default)\n if ($appendWildcard) {\n if (substr($str, -1) != $wildcard) {\n $str .= $wildcard;\n }\n }\n\n return str_replace($wildcard, $like_char, $str);\n}",
"public abstract function prepare_wildcard($expr);",
"public function or_where_like($arg = null, $val = null)\n {\n return self::or_where($arg, $val, 'LIKE');\n }",
"function drush_variable_like($arg) {\n return drush_db_select('variable', 'name', 'name LIKE :keyword', array(':keyword' => $arg . '%'), NULL, NULL, 'name');\n}",
"function search_condition($value) {\n\n\t\tif (is_array($value)) {\n\t\t\t$value = $this->array_to_type($value);\n\t\t}\n\n\t\tswitch ($this->type) {\n\n\t\t\tcase TIMESTAMP:\n\t\t\tcase INTEGER:\n\t\t\t\t$result = $this->name.\" = \".intval($value);\n\t\t\t\tbreak;\n\n\t\t\tcase FLOAT:\n\t\t\t\t$result = $this->name.\" = \".floatval($value);\n\t\t\t\tbreak;\n\n\t\t\tcase DATETIME:\n\t\t\tcase TIME:\n\t\t\tcase DATE:\n\t\t\t\t$result = $this->name.\" = '\".$value.\"'\";\n\t\t\t\tbreak;\n\n\t\t\tcase BINARY:\n\t\t\tcase TEXT:\n\t\t\tcase STRING:\n\t\t\tdefault:\n\t\t\t\t$result = $this->name.\" LIKE '\".$value.\"'\";\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\treturn $result;\n\n\t}",
"function op_contains($field) {\n $field = $this->last_name();\n $this->query->add_where($this->options['group'], $field, '%' . db_like($this->value) . '%', 'LIKE');\n }",
"public function bind_param()\n {\n if (func_num_args()<2) {\n return;\n }\n\n $types=func_get_arg(0);\n $count=strlen($types);\n if (func_num_args()<$count) {\n return;\n }\n\n $searches= [];\n $replaces= [];\n for ($i=0;$i<$count;$i++) {\n $searches[$i]='{'.$i.'}';\n switch (substr($types, $i, 1)) {\n case 'i':\n $replaces[$i]=(int)func_get_arg($i+1);\n break;\n\n case 's':\n $replaces[$i]=$this->quoteString(func_get_arg($i+1));\n break;\n\n case 'd':\n $replaces[$i]= (float)func_get_arg($i + 1);\n break;\n\n case 'b':\n // Exception\n die();\n }\n }\n\n $this->mPrepareQuery=str_replace($searches, $replaces, $this->mPrepareQuery);\n }",
"protected function bind_params() {\n\t\t\t$this->escape();\n\t\t\t$select_statement = $this->mysqli->prepare( $this->generate_sql() );\n\n\t\t\t$search_wildcards = '%' . $this->search . '%';\n\n\t\t\tif ( $this->search && !$this->levenshtein_search_enabled ) {\n\t\t\t\t$select_statement->bind_param(\"ss\", $search_wildcards, $search_wildcards);\n\t\t\t}\n\t\t\t\n\t\t\treturn $select_statement;\n\t\t}",
"public final function escapeValToLike($str)\n {\n // escape LIKE condition wildcards\n if (!empty($str))\n\t\t{\n $b = substr($str,0,1);\n if(strlen($str) > 1)\n $e = substr($str,-1);\n else\n $e='';\n\t\t\t$str = $b . str_replace(array('%', '_'), array('\\\\%', '\\\\_'), substr($str,1,-1)) . $e;\n\t\t}\n return $str;\n }",
"function my_posts_where( $where ) {\n global $wpdb;\n $where = str_replace(\n \"wp_posts.post_title = '%\",\n \"wp_posts.post_title LIKE '%\",\n $wpdb->remove_placeholder_escape($where)\n );\n return $where;\n}",
"public function testLike() {\n $this->assertEquals(Default_Helpers_Db::like('any'), '%any%');\n $this->assertEquals(Default_Helpers_Db::like('any', Default_Helpers_Db::LIKE_TYPE_CONTAINS), '%any%');\n $this->assertEquals(Default_Helpers_Db::like('any', Default_Helpers_Db::LIKE_TYPE_STARTS_WITH), 'any%');\n $this->assertEquals(Default_Helpers_Db::like('any', Default_Helpers_Db::LIKE_TYPE_ENDS_WITH), '%any');\n $this->assertEquals(Default_Helpers_Db::like('_a%n_y%'), '%\\\\_a\\\\%n\\\\_y\\\\%%');\n }",
"protected function matchLikeStartEnd($value)\n {\n $likeType = $this->not ? 'NOT LIKE' : 'LIKE';\n\t\tif(strpos($this->operator, '^') !== false) {\n\t\t\t$this->query->where(\"{$this->jsonFieldName} $likeType ?\", $this->escapeLike($value) . '%');\n\t\t} else {\n\t\t\t$this->query->where(\"{$this->jsonFieldName} $likeType ?\", '%' . $this->escapeLike($value));\n\t\t}\n\t}",
"function autocompletar($colClave,$colDesc,$colBuscar,$tabla,$valor,$filtro)\n{\n\n $db = dbConnect(\"resint\");\n $rs = $db->query(\"SELECT $colClave, $colDesc FROM $tabla WHERE $colBuscar REGEXP '$valor' $filtro ORDER BY $colBuscar \");\n $row = $rs->fetchAll(PDO::FETCH_ASSOC);\n\n return ( $row );\n}",
"function depsUserLike ( $f ) {\r\n\r\nglobal $DepUA;\r\n\r\n$a = \" ( \". $f .\" LIKE '%:\". implode( \":%' || \". $f .\" LIKE '%:\", $DepUA ) .\":%' )\";\r\nreturn $a;\r\n\r\n\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
isNotEmpty retourne vrai si la valeur est float et non vide | final public static function isNotEmpty($value):bool
{
return is_float($value) && !empty($value);
} | [
"public function validFloats() {}",
"public function isFloat(): bool\n {\n return \\is_float($this->value);\n }",
"function o_isFloat($value) {\n\t\t\treturn Obj::singleton()->isFloat($value);\n\t\t}",
"final public static function isEmpty($value):bool\n {\n return is_float($value) && empty($value);\n }",
"final public static function isNotFloat($value):bool\n {\n return is_scalar($value) && !is_float($value);\n }",
"public function isFloat(): bool\n {\n return $this->type == self::ST_FLOAT;\n }",
"function is_float ($var) {}",
"function test_float($val)\r\n{\r\n if(is_float(floatval($val)))\r\n {\r\n return $val;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}",
"private function testFloat()\n {\n if (!filter_var($this->data[$this->currentKey], FILTER_VALIDATE_FLOAT)) {\n $this->failedRules[] = \"Feld {$this->currentKey} ist keine Gleitkommazahl\";\n\n return false;\n }\n\n return true;\n }",
"public function isFloatType()\n {\n return $this->isType('float');\n }",
"public function hasFilterFromFloat()\n {\n return $this->filter_from_float !== null;\n }",
"function validate_float ( $sValue )\n{\n return is_numeric($sValue) and ($sValue == (float) $sValue);\n}",
"static function isFloat( $val ) {\n\t\treturn is_numeric( $val ) && !preg_match( '/[^\\d.+\\-e]/', $val );\n\t}",
"public static function aFloat($value)\n {\n return (is_float($value))?:false;\n }",
"function is_finite($val) {}",
"public static function isFloat()\n {\n return Assert::isType(IsType::TYPE_FLOAT);\n }",
"public static function float($value): bool\n {\n return is_float($value);\n }",
"static public function IsFloat($value)\n {\n return (is_float($value)) ? TRUE : FALSE;\n }",
"function is_finite($val)\n{\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The title should be indexed. | public function testIndexTitle()
{
// Add a public exhibit.
$exhibit = $this->_exhibit(true);
// Add a page with a title.
$page = $this->_exhibitPage($exhibit, 'title');
// Get the Solr document for the page.
$document = $this->_getRecordDocument($page);
// Should index the URL.
$this->assertEquals('title', $document->title);
} | [
"public function filter_title()\n {\n }",
"public function testIndexTitle()\n {\n\n // Add a page called \"title\".\n $page = $this->_simplePage(true, 'title');\n\n // Get the Solr document for the page.\n $document = $this->_getRecordDocument($page);\n\n // Should index title.\n $this->assertEquals('title', $document->title);\n\n }",
"public function hasTitle(): bool;",
"private function _indexItemTitleField()\n {\n $this->db->query(<<<SQL\n ALTER TABLE {$this->db->prefix}neatline_records\n ADD FULLTEXT (item_title, title, body, slug);\nSQL\n);\n }",
"private function check_page_title(){\n\t\tif($this->keyword_stats){\n\t\t\t$keyword_exists = stripos($this->page['meta_title'], $this->page['focus_keyword']);\n\t\t\tif ($keyword_exists === false){\n\t\t\t\t$score = 0;\n\t\t\t\t$grade = 1;\n\t\t\t\t$message = \"The meta page title does not contain the focus keyword. The meta page title should contain the focus keyword and it should reside at the beginning.\";\n\t\t\t} else if($keyword_exists > 0){\n\t\t\t\t$score = 1;\n\t\t\t\t$grade = 2;\n\t\t\t\t$message = \"The meta page title contains the focus keyword, but it does not appear at the beginning; try and move it to the beginning.\";\n\t\t\t} else {\n\t\t\t\t$score = 2;\n\t\t\t\t$grade = 3;\n\t\t\t\t$message = \"The meta page title contains the focus keyword at the beginning.\";\n\t\t\t}\n\t\t\t$this->set_summary($score,2,$grade,$message);\n\t\t} else {\n\t\t\t$this->set_grade(2);\n\t\t\t$this->set_score(0);\n\t\t}\n\t\t\n\t\t$title_length = strlen($this->page['meta_title']);\n\t\tif($title_length > 70){\n\t\t\t$score = 0;\n\t\t\t$grade = 1;\n\t\t\t$message = \"The meta page title is <strong>$title_length</strong> characters long, which is over the max limit of 70. Some of the title may not appear in search results.\";\n\t\t} else if($title_length >= 11 && $title_length <= 20) {\n\t\t\t$score = 1;\n\t\t\t$grade = 2;\n\t\t\t$message = \"The meta page title is <strong>$title_length</strong> characters long, which is under the recommended limit of 55-60.\";\n\t\t} else if($title_length > 20 && $title_length <= 70) {\n\t\t\t$score = 2;\n\t\t\t$grade = 3;\n\t\t\t$message = \"The meta page title is <strong>$title_length</strong> characters long, very good!\";\n\t\t} else if($title_length <= 10) {\n\t\t\t$score = 0;\n\t\t\t$grade = 1;\n\t\t\t$message = \"The meta page title is <strong>$title_length</strong> character(s) long, which is fairly short.\";\n\t\t}\n\t\t$this->set_summary($score,2,$grade,$message);\n\t}",
"public function hasTitles()\n {\n return false;\n }",
"protected function set_title()\n {\n }",
"public function validateTitle() : bool\n {\n if( $this->title === 'mr' ||\n $this->title === 'mrs' ||\n $this->title === 'miss' ||\n $this->title === 'master' ||\n $this->title === 'mx'){\n return true;\n } else {\n throw new \\Exception('title is not valid');\n }\n }",
"function isSortByTitle() {\n\t\t\treturn ($this->getSortBy( ) == 'title' ? true : false);\n\t\t}",
"public function getIndexFieldTitleMapping();",
"function searchTitle($title) {\n\t\t\n\t\treturn $this->getMapper()->searchTitle($title,$this);\n\t\t\n\t}",
"public function hasTitles()\n {\n return true;\n }",
"public function test_searching_title() {\n\t\t$results = new \\SWP_Query( [\n\t\t\t's' => 'attributetitle',\n\t\t\t'fields' => 'ids',\n\t\t] );\n\n\t\t$this->assertEquals( 1, count( $results->posts ) );\n\t\t$this->assertArrayHasKey( 0, $results->posts );\n\t\t$this->assertContains( $results->posts[0], self::$post_ids );\n\n\t\t// Test that a title search returns no results.\n\t\t$results = new \\SWP_Query( [\n\t\t\t's' => 'noattributetitle',\n\t\t\t'fields' => 'ids',\n\t\t] );\n\n\t\t$this->assertEquals( 0, count( $results->posts ) );\n\n\t\t// Test that an engine with no Title attribute returns no results.\n\t\t$query = new \\SearchWP\\Query( 'attributetitle', [\n\t\t\t'engine' => 'postsnotitle',\n\t\t\t'fields' => 'ids',\n\t\t] );\n\n\t\t$this->assertEquals( 0, count( $query->results ) );\n\n\t\t// Test that an engine with no Posts Source returns no results.\n\t\t$query = new \\SearchWP\\Query( 'attributetitle', [\n\t\t\t'engine' => 'noposts',\n\t\t\t'fields' => 'ids',\n\t\t] );\n\n\t\t$this->assertEquals( 0, count( $query->results ) );\n\t}",
"public function renderTitle();",
"public function getTitleExact()\n {\n if (array_key_exists('title-exact', $this->_params)) {\n return $this->_params['title-exact'];\n } else {\n return false;\n }\n }",
"function show_title()\n {\n return ($this->show_title==1);\n }",
"function hasTitle()\n {\n return isset($this->_title);\n }",
"public function isSortByTitle()\n {\n return ($this->getSortBy() == 'title') ? true : false;\n }",
"abstract public function get_title_detailed();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the title list. | public static function getTitleList()
{
return array(
self::TITLE_MR => 'mr',
self::TITLE_MS => 'ms',
self::TITLE_MRS => 'mrs',
self::TITLE_MISS => 'miss',
self::TITLE_DR => 'dr',
self::TITLE_PROF => 'prof',
);
} | [
"public function getTitles()\n {\n return $this->titles;\n }",
"public function getTitles() {\n\t\t$titleArray = array();\n\t\tforeach ( $this->pages as $page ) {\n\t\t\t$titleArray[] = $page['title'];\n\t\t}\n\t\treturn $titleArray;\n\t}",
"protected function _getListPageTitleArray()\n {\n return array_merge($this->_titlePrefix, array($this->getTitle()));\n }",
"protected static function titles(): array\n {\n return [];\n }",
"public function titles() : array\n {\n return $this->books->map(function ($book) {\n return $book->title();\n })->all();\n }",
"public function getTitles()\n\t{\n\t\t$db = $this->dbConnect();\n\t\t$req = $db->query(\"SELECT id,title FROM titles\");\n\t\treturn $req;\n\t}",
"public function _getTitleSegments()\n {\n return array();\n }",
"function get_list_title ()\r\n {\r\n return $this->list_title;\r\n }",
"public static function getTitleKeys();",
"public static function getLeaderboardTitles()\n {\n $leaderboards = XenForo_Model::create(__CLASS__)->getLeaderboards();\n $titles = array();\n foreach ($leaderboards as $leaderboardId => $leaderboard) {\n $titles[$leaderboardId] = $leaderboard['title'];\n }\n return $titles;\n }",
"public function Titles() {\n\t$sqlFilt = 'ID_Topic='.$this->KeyValue();\n\t$rsRows = $this->XTitleTable()->TopicRecords($this->KeyValue());\n\treturn $rsRows;\n }",
"function MyMod_Data_Info_Titles()\n {\n $titles=$this->MyMod_Data_Info_Keys();\n array_unshift($titles,\"\");\n return\n array_merge\n (\n array(\"\"),\n $this->MyMod_Data_Info_Keys()\n );\n\n return $titles;\n }",
"public function Titles() {\n\t$sqlFilt = 'ID_Topic='.$this->GetKeyValue();\n\t$rsRows = $this->XTitleTable()->TopicRecords($this->GetKeyValue());\n\treturn $rsRows;\n }",
"public function getTitols()\n {\n return $this->titols;\n }",
"public function getPageTitles(): array\n {\n return [];\n }",
"public function getTitles()\n {\n $titles = array();\n $levels = array(&$titles);\n\n foreach ($this->nodes as $node) {\n if ($node instanceof TitleNode) {\n $level = $node->getLevel();\n $text = (string)$node->getValue();\n $redirection = $node->getTarget();\n $value = $redirection ? array($text, $redirection) : $text;\n\n if (isset($levels[$level-1])) {\n $parent = &$levels[$level-1];\n $element = array($value, array());\n $parent[] = $element;\n $levels[$level] = &$parent[count($parent)-1][1];\n }\n }\n }\n\n return $titles;\n }",
"public function getPageTitles() {\n\n\t\t\t$sql = new DB_Sql();\n\t\t\t$sql->connect();\n\n\t\t\t$query = \"SELECT title FROM webmatrix_user_pages WHERE template = \".$this->subject_tpl_id.\"\";\n\t\t\t$sql->query($query, $this->debug);\n\t\t\t// build array from page titles\n\t\t\t$page_titles = array();\n\t\t\tif ($sql->num_rows() > 0) {\n\t\t\t\twhile($sql->next_record()) {\n\t\t\t\t\t$page_titles[] = $sql->Record['title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $page_titles;\n\n\t\t}",
"function MyApp_Interface_Titles()\n {\n $this->UnitsObj()->Sql_Table_Structure_Update();\n $unit=$this->Unit();\n if (empty($unit))\n {\n return $this->MyApp_Info();\n }\n\n $titles=array($this->MyApp_Name());\n\n $unit=$this->Unit();\n if (!empty($unit))\n {\n array_push($titles,$unit[ \"Title\" ]);\n\n $event=$this->Event();\n\n if (!empty($event))\n {\n $keys=array_keys($event);\n $keys=preg_grep('/Place/',$keys);\n array_push\n (\n $titles,\n $event[ \"Title\" ],\n $this->Event_DateSpan($event),\n $this->Event_Place($event)\n \n );\n }\n else\n {\n \n }\n }\n\n return $titles;\n }",
"public function getTitles()\n\t{\n\t\t$titles = array();\n\t\tforeach ($this->selections as $selection) {\n\t\t\t$titles[$selection->getName()] = $selection->getTitle();\n\t\t}\n\t\treturn $titles;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the record Manifest by DAP Id | public function getRecordManifestByDAPId($dapId = false) {
$rest = $this->getModule('REST');
$rest->sendGET($this->_getConfig('url').'/'.$dapId.'.json');
$rest->seeResponseCodeIs(200);
$rest->haveHttpHeader('Content-Type', 'application/json');
$rest->seeResponseIsJson();
} | [
"public function getApp($id){\n $command = new Command($this->host, self::APPS_GET,\"GET\", $this->enableCache, $this->cacheLifetime, $this->cacheFolder);\n $command->setParam(\"id\", $id);\n $command->execute();\n return $command->getData(\"dapp\");\n }",
"public function getManifest($packageId)\n {\n if (!isset($this->_cacheArray[$packageId])) {\n $manifest = $this->_generateManifest($packageId);\n if (!$manifest) {\n throw new Zend_Exception('Can not generate a manifest for package id: ' . $packageId);\n }\n $this->_cacheArray[$packageId] = $manifest;\n }\n return $this->_cacheArray[$packageId];\n }",
"public function retrieve($id) \n {\n $adDataString = get_deamon_ad_info($id);\n\n return $this->convertToAdObject($adDataString);\n }",
"function RetrieveAdHocAbsenceRequestByID($id) {\n $filter[AD_HOC_REQ_ID] = $id;\n $resultArray = performSQLSelect(ADHOC_ABSENCE_REQUEST_TABLE, $filter);\n\n $result = NULL;\n\n if (count($resultArray) == 1) { //Check to see if record was found.\n $result = $resultArray[0];\n }\n\n return $result;\n}",
"public function getCrdManifest()\n {\n return $this->crd_manifest;\n }",
"public function getManifest() {\n\n\t\tLog::d(\"getManifest = \" . $this->_manifest);\n\t\treturn $this->_manifest;\n\t}",
"private function getManifest()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Construct the query\n\t\t$query->select($db->quoteName('manifest_cache'));\n\t\t$query->from($db->quoteName('#__extensions'));\t\n\t\t$query->where($db->quoteName('name').' = '.$db->quote('com_componentarchitect'));\t\t\n\t\t$query->where($db->quoteName('type').' = '.$db->quote('component'));\n\n\t\t$db->setQuery($query->__toString());\n\t\t\n\t\t$manifest = json_decode( $db->loadResult(), true );\n\t\treturn $manifest;\n\t}",
"public function getIsmcManifest($ref_id = '')\n {\n $id = !empty($ref_id) ? \"ref:{$ref_id}\" : $this->getVideoId();\n $url = \"{$this->getCmsUrl()}/v1/accounts/{$this->getAccountId()}/videos/{$id}/assets/ismc_manifest/{$this->getAssetsId()}\";\n $header = [\n 'Content-type: application/json',\n \"Authorization: Bearer {$this->getAccessToken()}\",\n ];\n\n return $this->call('GET', $url, $header);\n }",
"public function getMediapackage($id)\n {\n $output = $this->request('/search/episode.json?id='.$id);\n\n if (200 !== $output['status']) {\n return false;\n }\n $decode = $this->decodeJson($output['var']);\n\n if (0 == $decode['search-results']['total']) {\n return;\n }\n if ($decode['search-results']['limit'] > 1) {\n return $decode['search-results']['result'][0]['mediapackage'];\n } else {\n return $decode['search-results']['result']['mediapackage'];\n }\n }",
"public static function fromDatabaseId($id)\n\t{\n\t\t$row = Database::queryFirst(\"SELECT module, data FROM serversetup_bootentry\n\t\t\tWHERE entryid = :id LIMIT 1\", ['id' => $id]);\n\t\tif ($row === false)\n\t\t\treturn false;\n\t\treturn self::fromJson($row['module'], $row['data']);\n\t}",
"public function getManifest() {\r\n return inship_fedexship_get($this->handle, 53 );\r\n }",
"public function getRecord($id) {\n\t\tif(is_numeric($id)) {\n\t\t\treturn parent::getRecord($id);\n\t\t} else {\n\t\t\treturn ExternalContent::getDataObjectFor($id);\n\t\t}\n\t}",
"public function get_record( $id ){\n\t\t$primary = $this->get_primary( $id );\n\t\tif( is_array( $primary ) ) {\n\t\t\tif( is_array( $id ) ) {\n\t\t\t\t$data = array();\n\t\t\t\tforeach( $primary as $record ){\n\t\t\t\t\tif ( $this->has_meta ) {\n\t\t\t\t\t\t$meta = $this->get_meta( $record[ 'ID' ] );\n\t\t\t\t\t\t$record = $this->add_meta_to_record( $meta, $record );\n\t\t\t\t\t}\n\n\t\t\t\t\t$data[] = $record;\n\t\t\t\t}\n\n\t\t\t\treturn $data;\n\n\t\t\t}else{\n\t\t\t\t$meta = null;\n\t\t\t\tif ( $this->has_meta ) {\n\t\t\t\t\t$meta = $this->get_meta( $id );\n\t\t\t\t}\n\n\t\t\t\t$data = $primary;\n\t\t\t\tif( $this->has_meta && is_array( $meta ) ){\n\t\t\t\t\treturn $this->add_meta_to_record( $meta, $data );\n\n\t\t\t\t}else{\n\t\t\t\t\treturn $primary;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\n\t}",
"public function get_all_customer_manifests_by_id($req,$res,$args){\n \t$Manifest = Manifest::with(['source_warehouse','destination_warehouse'])\n \t\t\t->where('customer_id',$args['customer_id'])\n \t\t\t->orWhere('receiver_customer_id',$args['customer_id'])\n \t\t->orderBy('created_date', 'DESC')\n \t\t->take($this->getLimitSize('L'))\n \t\t->get();\n \t$data = [\n\t\t\t\"msg_data\" => $Manifest,\n\t\t\t\"msg_status\" => \"OK\"\n\t\t];\n\t\treturn $res->withJSON($data,200);\n }",
"public function getHdsManifestList($ref_id = '')\n {\n $id = !empty($ref_id) ? \"ref:{$ref_id}\" : $this->getVideoId();\n $url = \"{$this->getCmsUrl()}/v1/accounts/{$this->getAccountId()}/videos/{$id}/assets/hds_manifest\";\n $header = [\n 'Content-type: application/json',\n \"Authorization: Bearer {$this->getAccessToken()}\",\n ];\n\n return $this->call('GET', $url, $header);\n }",
"public function getManifest()\n {\n return $this->manifest;\n }",
"public function retrieve($id)\n\t{\n\t\t$result = array();\n\t\ttry {\n\t\t\t$rma = Mage::getModel('rma/rma')->load($id);\n\t\t\tif($rma->getId()) {\n\t\t\t\t$result = $this->_formatRma($rma);\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\tMage::logException($e);\n\t\t\t$this->_fault('error', $e->getMessage());\n\t\t}\n\t\treturn $result;\n\t}",
"public function getManifest()\n\t{\n\t\treturn $this->manifest;\n\t}",
"public function getManifest() {\n\t\treturn $this->manifest;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
NOTIFICATION TRIGGER //// GROUP ENROLLMENT /////// | function learndash_notifications_enroll_group( $user_id, $group_id ) {
learndash_notifications_send_notifications( 'enroll_group', $user_id, $course_id = null, $lesson_id = null, $topic_id = null, $quiz_id = null, $assignment_id = null, $lesson_access_from = null, $question_id = null, $group_id );
} | [
"private function notification(){\n\t\n\t}",
"public function setNotification()\n {\n new NewIkmSurveyEvent( \n\n $this->userToNotify(), \n $this->request['ikm_id'], \n $this->request['layanan_id'], \n route('intern.ikm.home.index') \n\n );\n }",
"abstract protected function handle_notification($p_notification);",
"public function handle_notifications()\n {\n }",
"protected function add_notification()\n {\n }",
"public function emeregencyTrigger(){\n\n\t\t$today = Carbon::today();\n\t\t$firstDayMonth = Carbon::now()->startOfMonth();\n\t\t$seventhtDayMonth = $firstDayMonth->addDays(7);\n\t\t\n\t\tif ($today > $seventhtDayMonth) {\n\t\t\t$ob = OrganizationBranch::on('bk')->whereNotNull('trigger_notify_emails')\n\t\t\t\t\t\t\t\t\t\t\t\t ->where('trigger_emergency_set', 1)\n\t\t\t\t\t\t\t\t\t\t\t\t ->where('trigger_emergency_percentage', '>', 0)\n\t\t\t\t\t\t\t\t\t\t\t\t ->where(function ($query) use($today) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $query->orWhereNull('trigger_sent_on')\n\t\t\t\t\t\t\t\t\t\t\t\t\t ->orWhere('trigger_sent_on', '<', $today);\n\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t ->join('colleges as c', 'c.id', '=', 'organization_branches.school_id')\n\t\t\t\t\t\t\t\t\t\t\t\t ->select('organization_branches.*', 'c.school_name')\n\t\t\t\t\t\t\t\t\t\t\t\t ->get();\n\t\t\t$this->emeregencyTemplate($ob);\n\t\t}\n\t}",
"public function testUpdateNotification()\n {\n\n }",
"public function testUpdateNotification()\n {\n }",
"function procurement_plan_notifications(){\n print_r(procurement_plan_notifications());\n }",
"public function assignement_confirm_notification($params) {\n $current_time = $this->get_current_time();\n $accept_notifycation = strtotime(date(\"Y-m-d H:i:s\", strtotime('+1 minutes', $current_time)));\n// $after_2hrs = strtotime('+2 minutes', $current_time);\n// $after_4hrs = strtotime('+4 minutes', $current_time);\n// $after_6hrs = strtotime('+6 minutes', $current_time); \n $after_2hrs = strtotime('+2 hours', $current_time);\n $after_4hrs = strtotime('+4 hours', $current_time);\n $after_6hrs = strtotime('+6 hours', $current_time);\n $salesrep_id = TableRegistry::get('Users')->get_sales_rep_id($params['company_id']);\n $data[] = array('sender' => $params['action_user_id'], 'receipients' => $params['action_user_id']\n , 'trigger_timestamp' => $accept_notifycation, 'sendout_id' => $params['sendout_id'], 'job_submission_id' => $params['job_submission_id'], 'typeID' => ASSIGNMENT_PENDING_APPLICANT_CONF);\n $data[] = array('sender' => $params['action_user_id'], 'receipients' => $params['candidate_id'], 'navigation' => NAVIGATION_OFFER\n , 'trigger_timestamp' => $accept_notifycation, 'sendout_id' => $params['sendout_id'], 'job_submission_id' => $params['job_submission_id'], 'typeID' => CONF_OF_ASSIGNMENT);\n $data[] = array('sender' => $params['action_user_id'], 'receipients' => $params['candidate_id'], 'navigation' => NAVIGATION_OFFER\n , 'trigger_timestamp' => $after_2hrs, 'sendout_id' => $params['sendout_id'], 'job_submission_id' => $params['job_submission_id'], 'typeID' => ASSIGNMENT_AWAITING_REMINDER_1);\n $data[] = array('sender' => $params['action_user_id'], 'receipients' => $params['candidate_id'], 'navigation' => NAVIGATION_OFFER\n , 'trigger_timestamp' => $after_4hrs, 'sendout_id' => $params['sendout_id'], 'job_submission_id' => $params['job_submission_id'], 'typeID' => ASSIGNMENT_AWAITING_REMINDER_2);\n if (!empty($salesrep_id)) {\n $data[] = array('sender' => $params['action_user_id'], 'receipients' => $salesrep_id\n , 'trigger_timestamp' => $after_6hrs, 'sendout_id' => $params['sendout_id'], 'job_submission_id' => $params['job_submission_id'], 'typeID' => CONTRACTOR_UNRESPONSIVE_CONF_REQUEST);\n }\n $this->datasave($data);\n }",
"function new_user_email_admin_notice()\n {\n }",
"private function add_notification() {\n\t\t$notification_center = Yoast_Notification_Center::get();\n\t\t$notification_center->add_notification( self::get_notification() );\n\t}",
"public function AnnouncementGroupNotification(){\n\t\t\t$notifications = Notifications::where('status','not_sent')->where('type','announcement')->where('announcement_type','app_setting')->get()->toArray();\n\t\t\tif($notifications){\n\t\t\t\tforeach ($notifications as $row) {\n\t\t\t\t\t$provider_id \t\t= $row['user_id'];\n\t\t\t\t\t$provider_data \t\t= ApiTokens::where('user_id',$provider_id)->first();\n\t\t\t\t\tif($provider_data){\n\t\t\t\t\t\t$provider_device_id = $provider_data->device_id;\n\t\t\t\t\t\t$announsement_data \t= AnnouncementModel::where('id',$row['required_id'])->first();\n\t\t\t\t\t\t$user_data \t\t\t= User_model::select('notification_groupby','push_notification')->where('id',$provider_id)->first();\n\t\t\t\t\t\tif(isset($announsement_data) && $announsement_data != null || !empty($announsement_data)){\n\t\t\t\t\t\t\tif($user_data->push_notification == 1){\n\t\t\t\t\t\t\t$notification_message = [\"notification\" => [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\"body\" \t=> \"New announcement is added!\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\"title\" => \"Announcement notification\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"notification_data\" => [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"announcement_id\" => $announsement_data->id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"title\" => isset($announsement_data->title)?$announsement_data->title:'',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"message\" => isset($announsement_data->description)?$announsement_data->description:'',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"type\" \t => 'announcement',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$current_time\t \t= strtotime(date('Y-m-d H:i:s'));\n\t\t\t\t\t\t\t$announsment_time \t= strtotime($row['updated_at']);\n\t\t\t\t\t\t\tif($user_data->notification_groupby == 0 || $user_data->notification_groupby == null){\n\t\t\t\t\t\t\t\tif($current_time > $announsment_time){\n\t\t\t\t\t\t\t\t\tif($this->notification_api($provider_device_id,$notification_message)){\n\t\t\t\t\t\t\t\t\t\t$notification_message['device_id'] = $provider_device_id;\n\t\t\t\t\t\t\t\t\t\t$this->update_notification($notification_message,$row['id']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($user_data->notification_groupby == 2){\n\t\t\t\t\t\t\t\t$estimated_time \t= '+60 minutes';\n\t\t\t\t\t\t\t\t$appointment_start_time = strtotime($estimated_time,strtotime($row['updated_at']));\n\t\t\t\t\t\t\t\tif($current_time > $appointment_start_time){\n\t\t\t\t\t\t\t\t\tif($this->notification_api($provider_device_id,$notification_message)){\n\t\t\t\t\t\t\t\t\t\t$notification_message['device_id'] = $provider_device_id;\n\t\t\t\t\t\t\t\t\t\t$this->update_notification($notification_message,$row['id']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($user_data->notification_groupby == 3){\n\t\t\t\t\t\t\t\t$morning_time = strtotime(date('Y-m-d').' 06:00:00');\n\t\t\t\t\t\t\t\t$morning_expire_time = strtotime(date('Y-m-d').' 06:01:10');\n\t\t\t\t\t\t\t\t$evening_time = strtotime(date('Y-m-d').' 18:00:00');\n\t\t\t\t\t\t\t\t$evening_expire_time = strtotime(date('Y-m-d').' 18:01:10');\n\t\t\t\t\t\t\t\tif($current_time >= $morning_time && $current_time < $morning_expire_time){\n\t\t\t\t\t\t\t\t\tif($this->notification_api($provider_device_id,$notification_message)){\n\t\t\t\t\t\t\t\t\t\t$notification_message['device_id'] = $provider_device_id;\n\t\t\t\t\t\t\t\t\t\t$this->update_notification($notification_message,$row['id']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($current_time >= $evening_time && $current_time < $evening_expire_time){\n\t\t\t\t\t\t\t\t\tif($this->notification_api($provider_device_id,$notification_message)){\n\t\t\t\t\t\t\t\t\t\t$notification_message['device_id'] = $provider_device_id;\n\t\t\t\t\t\t\t\t\t\t$this->update_notification($notification_message,$row['id']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($user_data->notification_groupby == 4){\n\t\t\t\t\t\t\t\t$morning_time = strtotime(date('Y-m-d').' 06:00:00');\n\t\t\t\t\t\t\t\t$morning_expire_time = strtotime(date('Y-m-d').' 06:01:10');\n\t\t\t\t\t\t\t\tif($current_time >= $morning_time && $current_time < $morning_expire_time){\n\t\t\t\t\t\t\t\t\tif($this->notification_api($provider_device_id,$notification_message)){\n\t\t\t\t\t\t\t\t\t\t$notification_message['device_id'] = $provider_device_id;\n\t\t\t\t\t\t\t\t\t\t$this->update_notification($notification_message,$row['id']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"success\";\n\t\t\t}else{\n\t\t\t\techo \"no records available\";\n\t\t\t}die;\n\t }",
"public function callpaymentnotificationlogAction() {\n // exit('do not call me.');\n $response = $this->pendingPaymentFailedNotification(3); exit('send notification'); //here 3 is admin id.\n }",
"public static function sendNotification()\r\n {\r\n\r\n }",
"function new_user_email_admin_notice() {}",
"public function register_notifications() {\n\t}",
"public function setredeemnotification(){\n $this->layout = \"\";\n $sessionstaff = $this->Session->read('staff');\n $Locations = $this->Staff->find('all', array('conditions' => array('Staff.clinic_id' => $sessionstaff['clinic_id'])));\n foreach($Locations as $loc){\n $status=0;\n if($loc['Staff']['id']==$_POST['staff_id']){\n $status=1;\n }\n $loca['Staff'] = array('id' => $loc['Staff']['id'],'redemption_mail'=>$status);\n $this->Staff->save($loca);\n }\n exit;\n }",
"public function testUpdateNotificationType()\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
echo "Area is : ".$a."Parameter is : ".$p."Color is : ".$c; | function showInfo($a,$p,$c)
{
echo "<table class='table table-dark table-hover'>";
echo "<thead class='thead-light'><tr><th>Area</th><th>Parameter</th><th>Color</th></tr></thead>";
echo "<tbody><tr><td>".$a."</td><td>".$p."</td><td>".$c."</td></tr></tbody>";
echo "</table>";
} | [
"function showInfo($a,$p,$c)\r\n {\r\n echo \"<table style='border:1px solid;'>\";\r\n echo \"<tr style='border:1px solid;'><th style='border:1px solid;'>Area</th><th style='border:1px solid;'>Perimeter</th><th style='border:1px solid;'>Color</th></tr>\";\r\n echo \"<tr style='border:1px solid;'><td style='border:1px solid;'>\".$a.\"</td><td style='border:1px solid;'>\".$p.\"</td><td style='border:1px solid;'>\".$c.\"</td></tr>\";\r\n echo \"</table>\";\r\n }",
"public function getvalues()\n{\n\techo \"x is ={$this->x}\";\n\techo \"y is ={$this->y}\";\n\techo \"z is ={$this->z}</br>\";\n}",
"function customize_print1() \n { \n echo \"<p style=color:\".$this->font_color.\";>\".$this->string_value.\"</p>\"; \n }",
"function traceNum($a,$b){\n //写法二 动态性\n echo \"a = $a ,b = $b<br>\";\n}",
"function area($radius,$cm=true)\n{\n $pie = 3.412;\n $area = $pie * $radius * $radius;\n if ($cm) {\n// area in cm\n echo \"area is $area cm\";\n } else {\n//area in m\n echo \"area is #area m <br>\";\n }\n area_unit();\n area_unit();\n\n echo '<br>';\n echo '<br>';\n}",
"public function ToString(){\r\n return \"Color: \".$this->_color.\"</br>Lado 1: \".$this->_ladoUno.\"</br>Lado2: \".$this->_ladoDos.\"</br>Perimetro: \".$this->_perimetro.\"</br>Superficie: \".$this->_superficie.\"</br></br>\".\"<p style='color:{$this->GetColor()}'>{$this->Dibujar()}</p>\";\r\n \r\n }",
"public function area() {\n $area = ($this->base * $this->altura)/2;\n return \"Área del Triangulo: ${area} \\n\";\n }",
"function print_color_variable(){\r\n\t\t\techo 'var color_option = [<br>';\r\n\t\t\tforeach($this->admin_option as $tabs){\r\n\t\t\t\tforeach($tabs['options'] as $section){\r\n\t\t\t\t\tif( !empty($section['options']) ){\r\n\t\t\t\t\t\tforeach($section['options'] as $option_slug => $option){\r\n\t\t\t\t\t\t\tif($option['type'] == 'colorpicker'){\r\n\t\t\t\t\t\t\t\techo '{name: \"' . $option_slug . '\", selector: \"' . str_replace('\"', '\\\"', $option['selector']) . '\"},<br>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\techo '];';\r\n\t\t}",
"function details($name , $age){\n echo \"My name is $name and my age is $age\";\n}",
"function area_unit($radius ,$cm=true ){\r\n $pie = 3.142;\r\n $area = $pie *radius *$radius;\r\n if(cm){\r\n echo \"area is $area cm\";\r\n }else{\r\n echo \"area is $area m\";\r\n }\r\n}",
"function e($name){\n\t\td($name); //$name is actual arg \n\t\techo '<br>'; //break line\n\t\t\n\t}",
"public static function printvar() {\r\n\t\t$vars = func_get_args();\r\n\t\techo \"<pre>\";\r\n\t\tforeach( $vars as $var )\r\n\t\t\tvar_dump( $var );\r\n\t\techo \"</pre>\";\r\n\t}",
"static function prints($areas,$ver=False,$name=\"data\")\n\t\t{\n\n\t\t\techo \"<script>\";\n\t\t\techo \"var \".$name.\" =\";\n\t\t\techo json_encode($areas,JSON_UNESCAPED_UNICODE);\n\n\t\t\techo \";</script>\";\n\t\t}",
"function display() {\n echo \"This is class bar\\n\";\n echo \"a = \".$this->a.\"\\n\";\n echo \"b = \".$this->b.\"\\n\";\n echo \"c = \".$this->c.\"\\n\";\n }",
"function display() {\r\n echo \"This is class bar\\n\";\r\n echo \"a = \".$this->a.\"\\n\";\r\n echo \"b = \".$this->b.\"\\n\";\r\n echo \"c = \".$this->c.\"\\n\";\r\n }",
"function print_area($first_row, $first_col, $last_row, $last_col)\n {\n $this->_print_rowmin = $first_row;\n $this->_print_colmin = $first_col;\n $this->_print_rowmax = $last_row;\n $this->_print_colmax = $last_col;\n }",
"function aula_11(){\r\n\r\n echo \"Utilizando comandos de aspas simples e aspas duplas\" . \"<br>\" . \"\\\"quebrando linhas com o comando\\\" \" . '\\n ' . '$a';\r\n}",
"public function area(){\n return $this->lado * $this->lado;\n }",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Format the headers to an array of 'key: val' which can be passed to curl_setopt. | public function formatHeaders()
{
$headers = array();
foreach ($this->headers as $key => $val) {
if (is_string($key)) {
$headers[] = $key . ': ' . $val;
} else {
$headers[] = $val;
}
}
return $headers;
} | [
"function toCurlHeader($headers){\n $ret=array();\n foreach ($headers as $key => $value) {\n $ret[$key]=$key.\":\".$value;\n }\n return $ret;\n}",
"function request_assemble_curl_headers ($request_headers) {\n $headers = [];\n foreach ($request_headers as $request_header_field_name => $request_header_field_value) {\n $header = sprintf('%s: %s', mb_convert_case($request_header_field_name, MB_CASE_TITLE), $request_header_field_value);\n array_push($headers, $header);\n }\n return $headers;\n}",
"protected function prepareHeaders() {\n if (!empty($this->headers)) {\n $this->requestOptions[CURLOPT_HTTPHEADER] = array();\n foreach ($this->headers as $key => $value) {\n $this->requestOptions[CURLOPT_HTTPHEADER][] = sprintf(\"%s: %s\", $key, $value);\n }\n }\n }",
"private function makeFormattedHeaderArray()\n {\n $formattedHeaders = [];\n\n foreach ($this->headerCollection as $header=>$value) {\n $formattedHeaders[] = sprintf('%s: %s', $header, $value);\n }\n\n return $formattedHeaders;\n }",
"protected function setCurlHTTPRequestHeaders() {\n $idxed_headers = array();\n foreach ($this->headers as $name => $value) {\n $idxed_headers[] = \"$name: $value\";\n }\n \n curl_setopt($this->curl, CURLOPT_HTTPHEADER, $idxed_headers);\n }",
"public function getCurlHeaders(): array {\n\t\treturn array_map(function (array $header) {\n\t\t\treturn $header['name'] . ': ' . $header['value'];\n\t\t}, $this->headers);\n\t}",
"public function toFormattedArray() {\r\n $tmp = array();\r\n foreach($this->headers as $key => $val){\r\n $tmp[] = $key . ': ' . $val;\r\n }\r\n return $tmp;\r\n }",
"private static function curl_headers()\n {\n return [\n 'Content-type: application/json',\n 'Authorization: Bearer '.Auth::user()->token,\n ];\n }",
"function _makeHeaderList($headers) {\n\t\t$headerList = array();\n\t\tforeach ($headers as $name => $value) {\n\t\t\t$headerList[] = \"$name: $value\";\n\t\t}\n\t\treturn $headerList;\n\t}",
"protected function bindHeadersValues() {\n $headers = array();\n foreach ($this->headers as $key => $value) {\n $headers[] = $key . ': ' . $value;\n }\n curl_setopt($this->curlHandler, CURLOPT_HTTPHEADER, $headers);\n }",
"protected function set_request_headers() {\n\t\t$headers = array();\n\t\tforeach ($this->headers as $key => $value) {\n\t\t\t$headers[] = $key.': '.$value;\n\t\t}\n\t\tcurl_setopt($this->request, CURLOPT_HTTPHEADER, $headers);\n\t}",
"public static function headers() {\n\t\t$ret = array();\n\t\tforeach(self::$headers as $name => $value) {\n\t\t\tif ($value) {\n\t\t\t\t$value = $name . ': ' . $value; \n\t\t\t}\n\t\t\t$ret[strtolower($name)] = $value;\n\t\t}\n\t\treturn $ret;\n\t}",
"protected function set_request_headers() {\n $headers = array();\n foreach ($this->headers as $key => $value) {\n $headers[] = $key.': '.$value;\n }\n curl_setopt($this->request, CURLOPT_HTTPHEADER, $headers);\n }",
"function format_header()\n\t{\n\t\t$this->headers = str_replace(\"\\r\\n\", \"\\n\", $this->headers);\n\t\t// Cleanup multiline headers.\n\t\t$this->headers = preg_replace(\"!\\n(\\t| )+!\", ' ', $this->headers);\n\t\t$hdr = explode(\"\\n\", trim($this->headers));\n\t\t$this->headers = array();\n\t\tforeach ($hdr as $v) {\n\t\t\t$hk = substr($v, 0, ($p = strpos($v, ':')));\n\t\t\t// Skip non-valid header lines.\n\t\t\tif (!$hk || ++$p == strlen($v) || ($v{$p} != ' ' && $v{$p} != \"\\t\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$hv = substr($v, $p);\n\t\t\t$hk = strtolower(trim($hk));\n\n\t\t\tif (!isset($this->headers[$hk])) {\n\t\t\t\t$this->headers[$hk] = decode_header_value($hv);\n\t\t\t} else {\n\t\t\t\t$this->headers[$hk] .= ' '. decode_header_value($hv);\n\t\t\t}\n\t\t}\n\t}",
"public function toHeaders();",
"function serialise_api_headers(array $headers) {\n\t$headers_str = \"\";\n\n\tforeach ($headers as $k => $v) {\n\t\t$headers_str .= trim($k) . \": \" . trim($v) . \"\\r\\n\";\n\t}\n\n\treturn trim($headers_str);\n}",
"private function buildHeaders()\n {\n $headerLines = [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n ];\n\n // If the logged in user has an auth token already then set that in the header\n if (isset($this->authToken)) {\n $headerLines['token'] = $this->authToken;\n }\n\n return $headerLines;\n }",
"protected function set_request_headers()\n\t{\n\t\t$headers = array();\n\t\tforeach( $this->getHeaders() as $key => $value ){\n\t\t\t$headers[] = (!is_int($key) ? $key.': ' : '').$value;\n\t\t}\n\n\t\tif( count($this->headers) > 0 ){\n\t\t\tcurl_setopt($this->request, CURLOPT_HTTPHEADER, $headers);\n\t\t}\n\t}",
"protected function set_headers() {\n\t\t$this->args['headers'] = array(\n\t\t'Authorization' => 'Bearer ' . $this->access_token,\n\t\t'Harvest-Account-Id' => $this->account_id,\n\t\t'User-Agent' => $this->application . ' (' . $this->user_agent . ')',\n\t\t'Content-Type' => 'application/json',\n\t\t);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SELECT FROM store WHERE balance <= 3725.49; | public function testCommandLessThanOrEqualWithFloat()
{
$query = new Query($this->store);
$result = $query
->find([
"balance" => [
'$lte' => 3725.49,
]
])
->execute()
;
$expected = 917;
$this->assertEquals($expected, $result->count());
} | [
"function get_transactions_above_value($threshold){\n $str_query=\"select * from pos_transaction where value>='$threshold'\";\n if(!$this->query($str_query)){\n return false;\n }\n return $this->fetch();\n }",
"function balance($username) {\n global $db;\n \n // query to get fund balance of user\n $sql = \"SELECT balance FROM users WHERE name = '$username';\";\n\n $res = mysqli_query($db, $sql);\n if($ar = mysqli_fetch_array($res)) {\n // returns fund balance of user\n return floatval($ar['balance']);\n }\n\n return false;\n}",
"function rating_sql($field, $val)\n{\n if (!is_numeric($val) || (($val < 0) || ($val > 5))) {\n return false;\n }\n if (!$val) {\n return false;\n }\n $s = $val - 0.5;\n $e = $val + 0.49;\n if ($s < 0.51) {\n $s = 0.1;\n }\n if ($e > 5) {\n $e = 5;\n }\n return \"(($field >= $s) AND ($field <= $e))\";\n}",
"function discountPercentageIsWithinBounday($discountPercentage,$offerLessonCap,$feeID){\n\t$db = new database;\t//------ Establish connection with the database.\n\n\t//------ Query the database table.\n\t$q = \"SELECT * FROM `offer` WHERE ((`offer_lesson_cap` < '$offerLessonCap' AND `offer_discount_percentage` >= '$discountPercentage') \".\n\t\t\t\t\t\t\t\t\t\"OR (`offer_lesson_cap` > '$offerLessonCap' AND `offer_discount_percentage` <= '$discountPercentage')) \".\n\t\t\t\t\t\t\t\t\t\"AND `fee_id` = '$feeID' ORDER BY `offer_lesson_cap` DESC;\";\n\t\n\t$result = $db->query($q);\t//------ Query the database table.\n\n\treturn ($result)?false:true;\t//------ Returns true or false depending on whether it meets the condition or not.\n}",
"abstract public function getBalance(string $address): float;",
"function uc_payment_condition_order_balance($order, $settings) {\n $balance = uc_payment_balance($order);\n\n switch ($settings['balance_comparison']) {\n case 'less':\n return $balance < 0;\n case 'less_equal':\n return $balance <= .01;\n case 'equal':\n return $balance < .01 && $balance > -.01;\n case 'greater':\n return $balance >= .01;\n }\n}",
"function get_balance() {\n\t\trequire '../config.php';\n\t\t$con = mysqli_connect($hostname, $dbusername, $dbpassword, $dbname);\n\t\tglobal $currentfbid;\n\t\t$query = \" SELECT balance FROM data WHERE fbid = '$currentfbid' \";\n\t\t$result = mysqli_query($con, $query);\n\t\t$row = mysqli_fetch_array($result);\n\t\tmysqli_close($con);\n\t\treturn $row[0];\n\t}",
"function balanceAll()\n{\n $lines = SELECT COUNT(*) FROM treasurer;\n $total = 0;\n for ($i=0; $i<$lines; $i++)\n {\n $value = SELECT value FROM treasurer WHERE line_ID=$i;\n $multiplier = SELECT direction FROM treasurer WHERE line_ID=$i;\n $total += $total + $value*$multiplier;\n }\n return $total;\n}",
"public function testPlayer1HasRealMoney() \n {\n \t$realMoney = $this->entityManager->getRepository('Application\\Entity\\Currency')\n ->findOneBy(array(\"name\" => \"EUR\"));\n\n \t$balance = $this->player1->getBalance($realMoney);\n \t$this->assertGreaterThan(0, $balance);\n }",
"public function take($amount) {\n\t\t\t$this->refreshBalance();\n\n\t\t\t$db = Database::getInstance();\n\n\t\t\tif ($this->bones >= $amount) {\n\t\t\t\t// good to update\n\t\t\t\t$val = $this->bones - $amount;\n\t\t\t\t$db->query(\"UPDATE userinfo SET money=? WHERE userID=?\", array($val, $this->userid));\n\t\t\t\tif (!$db->error()) {\n\t\t\t\t\t$this->refreshBalance();\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"function get($lat, $lng, $miles) {\n\t$convertedMiles = $miles / 69;\n\t$sql = \"SELECT * FROM parties \n\t\tWHERE (lat BETWEEN \" . ($lat - $convertedMiles) . \" AND \" . ($lat + $convertedMiles) . \") AND (lng BETWEEN \" . \n\t\t\t($lng - $convertedMiles) . \" AND \". ($lng + $convertedMiles) . \");\";\n\n\treturn query ($sql);\n}",
"public function checkBalance(){\n return $this->getBalance();\n }",
"public function lessThanOrEqual(Money $money): bool;",
"function normalizedBalance($exchange, $baseCurrency)\n{\n return $exchange->fetch_balance();\n}",
"public function has_sufficient_balance($param) {\n\t\t$balance = $this->bitcoin_model->current_balance();\n\t\treturn (($param > 0) && ((float)$param <= (float)$balance)) ? TRUE : FALSE;\n\t}",
"public function withdraw($id, $amount) {\n\t\t$rows=$this->pdo->query(\"SELECT * FROM savings\");\n\t\t$balance = null;\n\t\tforeach ($rows as $row){\n\t\t\tif($row[\"id\"] == $id){\n\t\t\t\t$balance = $row[\"balance\"];\n\t\t\t}\n\t\t}\n\t\tif($amount >= $balance){\n\t\t\tprint \"Debug: you don't have enough balance > Throwing null.\";\n\t\t\treturn null;\n\t\t}\n\t\t$balance-=$amount;\n\t\t$sth=$this->pdo->exec(\"UPDATE savings SET balance='$balance' WHERE id='$id'\");\n return $balance;\n }",
"public function testDisabledStoreCreditBalanceHistory()\n {\n $query = <<<QUERY\n{\n customer {\n store_credit {\n enabled\n current_balance {\n currency\n value\n }\n balance_history(pageSize:3, currentPage: 1) {\n items {\n action\n balance_change { \n currency\n value\n }\n actual_balance {\n currency\n value\n }\n }\n }\n }\n }\n }\nQUERY;\n $response = $this->graphQlMutation($query, [], '', $this->getHeaderMap());\n $this->assertTrue($response['customer']['store_credit']['enabled']);\n $this->assertNull($response['customer']['store_credit']['balance_history']);\n $this->assertEquals(\n 50,\n $response['customer']['store_credit']['current_balance']['value']\n );\n }",
"public function greaterThan(Money $money): bool;",
"function balance(): float\n {\n return $this->coin->getBalance(['account' => $this->purchase->id, 'address' => $this -> purchase -> address]);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
delete action deletes a blog in the repository | public function deleteAction(\Lobcher\Simpleblog\Domain\Model\Blog $blog)
{
$this->blogRepository->remove($blog);
$this->redirect('list');
} | [
"public function deleteAction()\n {\n $blogId = (int)$this->params()->fromRoute('id', -1);\n \n // Validate input parameter\n if ($blogId<0) {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n \n $blog = $this->entityManager->getRepository(Blog::class)\n ->findOneById($blogId); \n if ($blog == null) {\n $this->getResponse()->setStatusCode(404);\n return; \n } \n \n $this->blogManager->removeBlog($blog);\n \n // Redirect the user to \"admin\" page.\n return $this->redirect()->toRoute('blogs', ['action'=>'admin']); \n \n }",
"public function deleteBlog($blog);",
"public function delete(Blog $object);",
"public function deleted(Blog $blog)\n {\n //\n }",
"public function delete()\n {\n if (!userHasPermission('admin:blog:post:' . $this->blog->id . ':delete')) {\n\n unauthorised();\n }\n\n // --------------------------------------------------------------------------\n\n // Fetch and check post\n $oUri = Factory::service('Uri');\n\n $iPostId = (int) $oUri->segment(6);\n $oPost = $this->blog_post_model->getById($iPostId);\n\n if (!$oPost || $oPost->blog->id != $this->blog->id) {\n\n $this->oUserFeedback->error('I could\\'t find a post by that ID.');\n redirect('admin/blog/post/index/' . $this->blog->id);\n }\n\n // --------------------------------------------------------------------------\n\n if ($this->blog_post_model->delete($iPostId)) {\n\n $sMessage = ucfirst($this->data['postName']) . ' was deleted successfully. ';\n if (userHasPermission('admin:blog:post:' . $this->blog->id . ':restore')) {\n $sMessage .= anchor('admin/blog/post/restore/' . $this->blog->id . '/' . $iPostId, 'Undo?');\n }\n\n $this->oUserFeedback->success($sMessage);\n\n // Update admin changelog\n $this->oChangeLogModel->add('deleted', 'a', 'blog post', $iPostId, $oPost->title);\n\n } else {\n\n $this->oUserFeedback->error('I failed to delete that post. ' . $this->blog_post_model->lastError());\n }\n\n redirect('admin/blog/post/index/' . $this->blog->id);\n }",
"public function doDeleteBlog()\n {\n \t/* Check ID */\n\t\t$blog_id = intval( $this->request['blogid'] );\n\t\t\n\t\tif( ! $blog_id )\n\t\t{\n $this->registry->output->showError( $this->lang->words['bm_wronguse'], 1162 );\n\t\t}\n\t\t\n\t\t/* Get the blog */\n\t\t$blog = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'blog_blogs', 'where' => \"blog_id={$blog_id}\" ) );\n\t\t\n\t\tif( ! $blog['blog_id'] )\n\t\t{\n $this->registry->output->showError( sprintf( $this->lang->words['bm_idnotexist'], $blog_id), 1163 );\n\t\t}\n\t\t\n\t\t/* Delete it */\n\t\t$this->registry->getClass('blogFunctions')->removeBlog( $blog_id );\n\t\t\t\t\n\t\t/* Done */\n $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['bm_deletebloglog'], $blog_id) );\n \n $this->registry->output->global_message = $this->lang->words['bm_deletedblog'];\n\t\t$this->registry->output->silentRedirectWithMessage( \"{$this->settings['base_url']}{$this->html->form_code}do=index\" );\n }",
"public function delete() {\n\t\ttry {\n\t\t\t$this->model->deletePost($this->args[1], $this->args[2] );\n\t\t\tHTML::redirect('/blog/view/'. $this->args[1]);\n\t\t} catch(Exception $excpt){\n\t\t\t$this->view->setError($excpt);\n\t\t}\t\n\t}",
"function deleteBlog() {\n\t\tif (!empty ($this->id)) {\n\t\t\tif ($this->hasAdministerPermission()) {\n\t\t\t\tglobal $dbi, $log, $login;\n\t\n\t\t\t\t// Check if data has been submitted from the form\n\t\t\t\tcheckSubmitter();\n\t\n\t\t\t\t// Delete blog index image\n\t\t\t\tif(file_exists(scriptPath.\"/\".folderUploadedFiles.\"/blog_\".$this->id.\".jpg\")) unlink(scriptPath.\"/\".folderUploadedFiles.\"/blog_\".$this->id.\".jpg\");\n\t\n\t\t\t\t// Delete posts\n\t\t\t\t$result = $dbi->query(\"SELECT id FROM \".blogPostTableName.\" WHERE blogId=\".$dbi->quote($this->id));\n\t\t\t\tif ($result->rows()) {\n\t\t\t\t\tfor ($i=0; list($id)=$result->fetchrow_array(); $i++) {\n\t\t\t\t\t\t$post = new Post($id);\n\t\t\t\t\t\t$post->deletePost();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// Delete blog permissions\n\t\t\t\t$login->clearPermissions(blogContentId, $this->id);\n\t\n\t\t\t\t// Delete blog data\n\t\t\t\t$dbi->query(\"DELETE FROM \".blogTableName.\" WHERE id=\".$this->id);\n\t\n\t\t\t\t// Delete log data\n\t\t\t\t$log->deleteTransaction(blogContentId, $this->id);\n\t\t\t}\n\t\t}\n\t}",
"private function delete()\r\n\t\t{\r\n\t\t\t$id = $_REQUEST['id'];\r\n\t\t\tDB::delete(\"blog\", \"WHERE id=$id\");\r\n\t\t\t$this->doRSS();\r\n\t\t}",
"public function delete(Blog $post)\n {\n $post->delete();\n return redirect()->route('panel.post')->with('status','Your publication was successfully deleted!');\n }",
"public function deleted(BlogPost $blogPost)\n {\n //\n }",
"public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/blog/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Blog', 'blogId', self::$objectId);\n }",
"public abstract function deleteBlogEntry(BlogEntry $blogEntry);",
"public function deletearticle()\r\n {\r\n $id = filter_input(INPUT_GET, 'id');\r\n $this->blog->deleteBlogItemByID($id);\r\n $this->redirect('?page=blogarticles');\r\n\r\n }",
"public function delete() {\n\t\t//Create a post if the form was submitted\n\t\tif ( isset($_REQUEST[\"deletePost\"]) ) {\n\t\t\t$this->deletePost();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->request->args ) {\n\t\t\t//Get the requested post for editing\n\t\t\t$postId = $this->request->args[0];\n\t\t\t$result = readPost($postId);\n\n\t\t\t//Display the post for deletion if it was found successfully\n\t\t\tif ( $result->status == 0 ) {\n\t\t\t\t$post = $result->data;\n\n\t\t\t\t//Include the Delete page\n\t\t\t\trequire_once(VIEWS . \"/Blog/delete.php\");\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t//Create an error message and redirect to the Blog page\n\t\t\t\t$message = new MessageResponse(1, \"Requested Post Not Found\", \"The Post you requested to delete does not exist\");\n\t\t\t}\n\t\t} else {\n\t\t\t//Create an error message and redirect to the Blog page\n\t\t\t$message = new MessageResponse(1, \"No Post Specified\", \"No Post was chosen for deletion\");\n\t\t}\n\n\t\t$this->setMessage($message);\n\n\t\t//Redirect to the blog home page\n\t\tRoute::redirect(\"/Blog\");\n\t\treturn;\n\t}",
"public function deleteAction(Post $post)\n {\n\n }",
"public function deletePostAction(){\n if(!SearchHelper::isIndexerEnabled()){\n return;\n }\n $postId = InputHelper::getParam('postId');\n if(!$postId){\n return;\n }\n $post = get_post($postId);\n if(wp_is_post_autosave($post) || wp_is_post_revision($post)){\n return;\n }\n\n SearchHelper::deletePost($postId);\n\n }",
"public function Delete()\n {\n $db = new Database(true);\n $db->Run(\"DELETE FROM \". UBlog_Config::$BLOG_POSTS_TABLE .\" WHERE id = :id\", [\":id\" => $this->Id]);\n\n if(count($this->Comments)){\n foreach($this->Comments as $comment){\n $comment->Delete();\n }\n }\n }",
"public function removeblogAction()\n {\n $showblogs = Blog::find();\n \n $this->view->blog = $showblogs;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the value of profil | public function getProfil()
{
return $this->profil;
} | [
"public function get_profil()\n {\n return $this->_profil;\n }",
"public function getProfissao()\n { return $this->getAttribute('profissao'); }",
"public function getProfissao()\n {\n return $this->profissao;\n }",
"public function getProfissao()\n\t{\n\t\treturn $this->profissao;\n\t}",
"public function GetProfil()\n {\n $query = \"Select pro_id as id,pro_name as name FROM T_PROFILE WHERE pro_id=\".$this->profil.\";\";\n $statement = Db::getInstance()->query($query);\n return $statement->fetchObject('App_Model_Profile');\n }",
"public function getPROGESTINA()\n {\n return $this->PROGESTINA;\n }",
"public function getproduccion()\r\n {\r\n return $this->produccion;\r\n }",
"public function getProfissional()\n {\n return $this->profissional;\n }",
"public function getProfil($codeProfil) {\n\t\treturn $this->_profils[$codeProfil];\n\t}",
"public function getProfundidade()\n {\n return $this->profundidade;\n }",
"public function get_profil_psy_r()\n {\n return $this->_profil_psy_r;\n }",
"public function getInterestProfil()\n {\n return $this->interest_profil;\n }",
"public function getProfesor()\n { //*** Se puede hacer de las dos maneras???? */\n //return $this->profesor;\n return $this::$profesor;\n }",
"function getprocedimiento(){\n\t\treturn $this->procedimiento;\n\t}",
"public function getTypeProfil()\n {\n return $this->typeProfil;\n }",
"public function getPhotoProfil()\n {\n return $this->photoProfil;\n }",
"public function isMyProfil()\n {\n return $this->myProfil;\n }",
"public function getIdProfesion()\n {\n return $this->id_profesion;\n }",
"public function getPromocao(){\n return $this->promocao;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ get User Transaction History Count from the transactions table | public function get_count_transaction($Userid)
{
$this->db->where('User_id', $Userid);
$que = $this->db->get($this->table);
return $que->num_rows();
} | [
"public function getTransactionCount();",
"public function countTransactions() {\n $count = count($this->transactions);\n\n return $count;\n }",
"public function count()\n {\n return count($this->transactions);\n }",
"public function get_total_user_logs(){\r\n\t\treturn $this->db->count_all('hores_user_logs');\r\n\t}",
"public function getLoginHistoryCount():int;",
"public function getLoginHistoryCount():int\n {\n $history = Di::make(LoginHistory::class);\n return $history->getCountUuid($this->uuid);\n }",
"public function getTransactionCount()\n {\n return count($this->transactions);\n }",
"function getCount() {\n $user = $this->loadUser(Yii::app()->user->id);\n return $user->count_visit;\n }",
"function get_all_user_history_pelayanan_count()\n {\n $user_history_pelayanan = $this->db->query(\"\n SELECT\n count(*) as count\n\n FROM\n `user_history_pelayanan`\n \")->row_array();\n\n return $user_history_pelayanan['count'];\n }",
"function UserCount()\n{\n\tglobal $log;\n\t$log->debug(\"Entering UserCount() method ...\");\n\tglobal $adb;\n\t$result=$adb->query(\"select * from ec_users where deleted =0;\");\n\t$user_count=$adb->num_rows($result);\n\t$result=$adb->query(\"select * from ec_users where deleted =0 AND is_admin != 'on';\");\n\t$nonadmin_count = $adb->num_rows($result);\n\t$admin_count = $user_count-$nonadmin_count;\n\t$count=array('user'=>$user_count,'admin'=>$admin_count,'nonadmin'=>$nonadmin_count);\n\t$log->debug(\"Exiting UserCount method ...\");\n\treturn $count;\n}",
"function total_invested_user(){\n\t\t$this->db->distinct();\n\t\t$this->db->select('*');\n\t\t$this->db->where('status','100');\n\t\t$this->db->group_by('user_id');\n\t\t$transaction = $this->db->get(DB_PREFIX.'transaction')->result_array();\n\t\tif(!empty($transaction)){\n\t\t\t$return = count($transaction);\n\t\t}else{\n\t\t\t$return = '0';\n\t\t}\n\t\t\n\t\treturn $return;\n\t\t\n }",
"public function getTotalNumberofRegisteredUsers(){\n \n $q = $this->em->createQuery(\"SELECT count(u.id) AS t_count from \\Rideorama\\Entity\\User u\");\n $result = $q->execute();\n $result = $result[0];\n return $result['t_count'];\n }",
"public function get_user_rent_payout_transaction_count ($user_id) {\n // get user rent payout record\n $user_record = RentPayout::where('user_id', $user_id)->count();\n\n // cehc if record exist\n if ($user_record > 0) {\n // record exist - return count value\n return $user_record;\n } else {\n // record doesn't exist - return 0 as count value\n return 0;\n }\n }",
"public function count_user(){\n\t\treturn ORM::factory('user')->count_all();\n\t}",
"public function getTradeCountNew(){\r\n if($this->user_id){\r\n return $trade_notifications = count(Trade::getRecievedByMemberId($this->user_id, 'new'));\r\n }else{\r\n return 0;\r\n }\r\n }",
"public function getUserQuantity()\n {\n return count($this->db->fetchAll(self::TODAY));\n }",
"public static function TransCount() {\n\t\treturn self::$_trans_count;\n\t}",
"function UserCount()\r\n{\r\n\tglobal $log;\r\n\t$log->debug(\"Entering UserCount() method ...\");\r\n\tglobal $adb;\r\n\t$result=$adb->mquery(\"select * from vtiger_users where deleted =0\", array());\r\n\t$user_count=$adb->num_rows($result);\r\n\t$result=$adb->mquery(\"select * from vtiger_users where deleted =0 AND is_admin != 'on'\", array());\r\n\t$nonadmin_count = $adb->num_rows($result);\r\n\t$admin_count = $user_count-$nonadmin_count;\r\n\t$count=array('user'=>$user_count,'admin'=>$admin_count,'nonadmin'=>$nonadmin_count);\r\n\t$log->debug(\"Exiting UserCount method ...\");\r\n\treturn $count;\r\n}",
"public function getNumberOfTransactions()\n {\n return $this->numberOfTransactions;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the first file matching the track_id | static public function getFirstFileByTrackId($track_id){
// get id from file by uri
$fileCriteria = new Criteria();
$fileCriteria->add(FilePeer::TRACK_ID, $track_id);
$fileCriteria->addDescendingOrderByColumn(FilePeer::TRACK_ID);
$file = FilePeer::doSelectOne($fileCriteria);
return $file;
} | [
"public function getFileByPK($id)\n {\n return $this->file->find($id);\n }",
"public function firstFile()\n {\n return $this->files->first();\n }",
"public static function findOneById($id)\n {\n $query = Doctrine_Query::create()->from('Sageweb_Cms_Upload u');\n $query->where('u.id = ?', $id);\n $query->limit(1);\n return $query->fetchOne();\n }",
"public static function get_track_by_id($track_id) {\n $connection = DatabaseConnection::connection();\n $sql = \"SELECT track_url, track_name FROM tracks WHERE track_id=:id\";\n $statement = $connection->prepare($sql);\n $statement->execute(['id' => $track_id]);\n $result = $statement->fetch();\n return $result;\n }",
"function mpdGetSongForId($id)\n{\n\tglobal $mpd;\n\t\n\tif (mpd_connect() == 0) return \"\";\n\n\tlist($artistnum,$albumnum, $songnum) = split(',', $id, 3);\n\t\n\t// our song ID is artistnum, albumnum, songnum\n\t// so first we grab a list of artists and albums\n\t\n\t$artists = $mpd->GetArtists();\n\tif ($artists == NULL) return NULL;\n\t$albums = $mpd->GetAlbums();\n\tif ($albums == NULL) return NULL;\n\t\n\t$artist = $artists[$artistnum];\n\t$album = $albums[$albumnum];\n\t\n\t// now do a \"find album $album\" then filter for our artist\n\t// and count off the song number to get the correct one\n\t\n\tif ( is_null($albumresults = $mpd->Find(MPD_SEARCH_ALBUM, $album)) ) {\n\t\treturn NULL;\n\t}\n\telse\n\t{\n\t\t// got results, iterate and filter for the right artist\n\t\t$numtracks = 0;\n\t\n\t\tif (count($albumresults) > 0)\n\t\t{\n\t\t\tforeach ($albumresults as $track)\n\t\t\t{\n\t\t\t\tif ($track['Artist'] == $artist) {\n\t\t\t\t\t// count\n\t\t\t\t\tif ($numtracks == $songnum) {\n\t\t\t\t\t\treturn $track;\n\t\t\t\t\t}\n\t\t\t\t\t$numtracks++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"public function getById($id) {\n\n\t\treturn $this->fileRepository->getById($id);\n\t}",
"private function _findFirstContentTrack(){\n if ($this->type==0) return $this->tracks[0];\n else {\n foreach ($this->tracks as $track)\n foreach ($track as $line){\n list(,$event) = explode(' ',$line);\n if ($event=='On') return $track;\n }\n }\n return false;\n }",
"public function getSingleEmployeeFile($file_id){\n\t\t$rowSet = $this->tableGateway->select(array('id' => (int)$file_id));\n\t\treturn $rowSet->current();\n\t\t\n\t}",
"public function findFile($id)\n {\n // Check if session user_id is equal to given user id\n if (!(Session::get('user_id') == $id)) {\n return false;\n }\n\n // Get the next file for this user\n $file = DropboxFile::where('user_id', $id)->where('seen', 0)->where('category', '!=', '')->first();\n\n // If the files is empty, the user has seen all the items. Redirect them to the overview page\n if (is_null($file)) {\n return 'overview';\n }\n\n return $file;\n }",
"function getTracker($track_id)\n {\n $select = 'SELECT * FROM track_content WHERE track_id=:track_id';\n\n $statement = $this->_pdo->prepare($select);\n $statement->bindValue(':track_id', $track_id, PDO::PARAM_INT);\n $statement->execute();\n \n return $statement->fetch(PDO::FETCH_ASSOC);\n }",
"public static function find(int $id)\n {\n return self::findIn(File::class, $id);\n }",
"function get_song_id($imgSrc, $previewTrackName, $previewArtistName) {\n global $link;\n $sql = sprintf('select id \n from songs\n where img like \"%%%s%%\" and name like \"%%%s%%\" and artist like \"%%%s%%\"\n limit 1\n ',$imgSrc,$previewTrackName,$previewArtistName);\n \n $result = mysqli_query($link,$sql);\n $row = mysqli_fetch_array($result);\n return $row[0];\n}",
"public function getFirstMediaFile() {\n\t\t$media = explode(',',$this->getPath());\n\t\t\n\t\tif(!empty($media)) {\n\t\t\t$resolver = Tx_Vibeo_Utility_Path::getInstance();\n\t\t\t$filepath = $resolver::resolvePath($media[0]);\n\t\t\treturn $filepath;\n\t\t}\n\t\t\n\t\treturn '';\n\t}",
"function multimedia_file_find($id) {\n $connection = db_connect();\n if (!$connection) {\n return null;\n }\n\n $id = mysqli_real_escape_string($connection, $id);\n $query = \"SELECT * FROM multimedia_files WHERE id = '$id';\";\n $result = mysqli_query($connection, $query);\n mysqli_close($connection);\n if (mysqli_num_rows($result) == 0) {\n return array();\n }\n return mysqli_fetch_assoc($result);\n}",
"public function next_track() {\n $playlist = Playlist::current();\n\n if ($playlist) {\n $track = $playlist->getNextTrack();\n } else {\n return;\n }\n \n if ($track) {\n $file_path = $track->getFullPath();\n $liquidsoap_request = 'annotate:track_id=\"' . $track->id . '\":' . $file_path . \"\\n\";\n } \n\n \treturn $liquidsoap_request;\n }",
"static function /*TrackItem*/get($id) {\n $rec = TrackItem::fetch($id);\n return $rec;\n }",
"public function find($id)\n {\n return app('db')->table('files')->where(['id'=> $id])->get();\n }",
"public function get_file($id){\r\n\t\t$query = \"SELECT * FROM iemoppwdb_market_reports WHERE id=%d\";\r\n\t\t$query = $this->db->prepare($query, $id);\r\n\t\t$rslt = $this->db->get_row($query, ARRAY_A);\r\n\r\n\t\treturn $rslt;\r\n\t}",
"function getFilesForId($id);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor. Attempts to create directory for holding cron jobs | function __construct($filename=NULL, $dir=NULL, $crontabPath=NULL){
global $database;
//$this->directory = ($dir) ? $dir : dirname(__FILE__).DIRECTORY_SEPARATOR;
$this->filename = dirname(__FILE__).DIRECTORY_SEPARATOR.(($filename)?$filename.".crontab":$this->filename);
// create table if not existant
$this->db = $database;
$q = "CREATE TABLE IF NOT EXISTS `crontab` (
`cron_ID` int(11) NOT NULL AUTO_INCREMENT,
`cron_name` text COLLATE utf8_unicode_ci NOT NULL,
`cron_details` text COLLATE utf8_unicode_ci NOT NULL,
`cron_interval` text COLLATE utf8_unicode_ci NOT NULL,
`cron_command` text COLLATE utf8_unicode_ci NOT NULL,
`cron_email` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`cron_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;";
$this->db->query($q);
//$result=$this->setDirectory($this->directory);
//if(!$result)
// exit('Directory error');
$result= $this->createCronFile($this->filename);
if(!$result)
exit('File error');
$this->pathToCrontab=($crontabPath) ? NULL : $crontabPath;
} | [
"public function __construct()\n {\n $this->bundle = getenv('alfred_workflow_bundleid');\n $this->path = getcwd();\n $this->home = getenv('HOME');\n\n $this->cache = getenv('alfred_workflow_cache');\n $this->data = getenv('alfred_workflow_data');\n\n $this->workflow = new Workflow();\n\n if (!file_exists($this->cache)) {\n exec(\"mkdir '\" . $this->cache . \"'\");\n }\n\n if (!file_exists($this->data)) {\n exec(\"mkdir '\" . $this->data . \"'\");\n }\n\n $this->results = [];\n }",
"public function __construct()\n {\n $this->tempDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.self::TEMP_DIR_PREFIX;\n if (!is_dir($this->tempDir)) {\n mkdir($this->tempDir, 0777, true);\n }\n }",
"public function __construct()\n {\n global $vat_config;\n \n do \n {\n $this->_proc_id = rand();\n @$test = mkdir($vat_config['WEB_DATA_WORKING_DIR'] . '/' . $this->_proc_id);\n } while ($test === FALSE);\n \n $this->_set_id = $this->_proc_id;\n $this->_working_dir = $vat_config['WEB_DATA_WORKING_DIR'] . '/' . $this->_proc_id;\n $this->_s3 = new AmazonS3();\n }",
"public function __construct() {\n\n\t\tif ( ! is_dir( EE_SERVICE_DIR ) ) {\n\t\t\tmkdir( EE_SERVICE_DIR );\n\t\t}\n\t\tchdir( EE_SERVICE_DIR );\n\n\t}",
"protected function init()\n {\n $dir = $this->getDir();\n\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n }\n }",
"public function init()\n {\n parent::init();\n $this->mutexPath = Yii::getAlias($this->mutexPath);\n if (!is_dir($this->mutexPath)) {\n FileHelper::createDirectory($this->mutexPath, $this->dirMode, true);\n }\n if ($this->isWindows === null) {\n $this->isWindows = DIRECTORY_SEPARATOR === '\\\\';\n }\n }",
"public function __construct() {\n\t\t@mkdir($this->storage, 0777, true);\n\t}",
"public function initialize()\n {\n if(!is_dir(dirname($this->getDownloadFullPath()))) {\n mkdir(dirname($this->getDownloadFullPath()), 0755, true);\n }\n \n if(!is_dir($this->getInstallDir())) {\n mkdir($this->getInstallDir(), 0755, true);\n } \n \n }",
"protected function createWorkingDirectory()\n {\n $this->working_directory = $this->working_base_directory.\"phpcrawl_tmp_\".$this->crawler_uniqid.DIRECTORY_SEPARATOR;\n \n // Check if writable\n if (!is_writeable($this->working_base_directory))\n {\n throw new Exception(\"Error creating working directory '\".$this->working_directory.\"'\");\n }\n \n // Create dir\n if (!file_exists($this->working_directory))\n {\n mkdir($this->working_directory);\n }\n }",
"function __construct($directory, $attempt_to_create=TRUE)\n {\n $this->directory = $directory;\n \n // Check if we need to create the directory\n if($attempt_to_create && !is_dir($directory))\n if(!mkdir($directory))\n throw new APIException(\"Cache: The specified directory could not be created.\");\n }",
"function setCronJobs() {\n\t\t//Open a file where all the cronjobs will be stored.\n\t\t//Execute that file in order to establish all the cronjobs\n\t\t$output = $this->generateCronJobs();\n\t\t//file_put_contents($this->tmp, $output.PHP_EOL);\n\t\t$f=fopen($this->getTempFile(),\"w\");\n\t\tfwrite($f,$output);\n\t\tfclose($f);\n\t\texec('crontab '.$this->getTempFile());\n\t\t\n\t}",
"function __construct( $bundleid=null )\n\t{\n\t\t$this->path = exec('pwd');\n\t\t$this->home = exec('printf $HOME');\n\n\t\tif ( file_exists( 'info.plist' ) ):\n\t\t\t$this->bundle = $this->get( 'bundleid', 'info.plist' );\n\t\tendif;\n\n\t\tif ( !is_null( $bundleid ) ):\n\t\t\t$this->bundle = $bundleid;\n\t\tendif;\n\n\t\t$this->cache = $this->home. \"/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/\".$this->bundle;\n\t\t$this->data = $this->home. \"/Library/Application Support/Alfred/Workflow Data/\".$this->bundle;\n\n\t\tif ( !file_exists( $this->cache ) ):\n\t\t\texec(\"mkdir '\".$this->cache.\"'\");\n\t\tendif;\n\n\t\tif ( !file_exists( $this->data ) ):\n\t\t\texec(\"mkdir '\".$this->data.\"'\");\n\t\tendif;\n\n\t\t$this->results = array();\n\t}",
"function CronJob ( )\r\n {\r\n\r\n $path = $this->logs_path;\r\n\r\n if ( ! ( $dir_hndl = opendir ( $this->logs_path ) ) )\r\n {\r\n trigger_error ( E_CRON_JOB, E_USER_WARNING);\r\n return;\r\n }\r\n\r\n while ( $fname = readdir ( $dir_hndl ) )\r\n {\r\n if ( substr( $fname, 0, 1 ) == '.' )\r\n continue;\r\n clearstatcache ( );\r\n $ftm = filemtime ( $path . $fname );\r\n if ( time ( ) - $ftm > $this->logs_timeout )\r\n @unlink ( $path . $fname );\r\n }\r\n\r\n closedir ( $dir_hndl );\r\n\r\n }",
"private function init_log_dir()\n {\n $file_log_dir = dirname($this->log_path);\n\n // Check if Dir already exists, if not create using mkdir\n if (! is_dir($file_log_dir)) {\n mkdir($file_log_dir, 0777, true);\n\n // Builds a .htaccess file to prevent direct download\n $this->write_htaccess($file_log_dir);\n }\n }",
"private function initializeDirectory() {\n if ($this -> lesson['instance_source'] && isset($this -> lesson['share_folder']) && $this -> lesson['share_folder'] != $this -> lesson['instance_source']) {\n $this -> lesson['share_folder'] = $this -> lesson['instance_source'];\n //$this -> persist(); We don't use persist() because the object is not fully constructed yet and it will ruin it\n eF_updateTableData(\"lessons\", array('share_folder' => $this -> lesson['share_folder']), \"id=\".$this -> lesson['id']);\n }\n if ($this -> lesson['share_folder']) {\n $this -> directory = G_LESSONSPATH.$this -> lesson['share_folder'].'/';\n } else {\n $this -> directory = G_LESSONSPATH.$this -> lesson['id'].'/';\n }\n if (!is_dir($this -> directory)) {\n mkdir($this -> directory, 0755);\n }\n }",
"public function __construct($cacheTimeLimit = self::CACHE_TIME_LIMIT, $temporaryFolderName = self::TEMPORARY_FOLDER_NAME)\n {\n $this->cacheTimeLimit = $cacheTimeLimit;\n $this->temporaryPath = sprintf(\n '%s%s%s',\n rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR, $temporaryFolderName\n );\n\n $fs = new Filesystem();\n if (!$fs->exists($this->temporaryPath)) {\n $fs->mkdir($this->temporaryPath);\n }\n }",
"private function createLockDirectory()\n {\n $this->removeLockDirectory();\n (new Filesystem())->mkdir($this->getLockDirectory());\n }",
"private static function initCron() {\r\n \t$prefix = __DIR__ . DIRECTORY_SEPARATOR . 'cron' . DIRECTORY_SEPARATOR;\r\n\t\tforeach (array(\r\n\t\t 'FieldFactory.php',\r\n\t\t 'FieldInterface.php',\r\n\t\t 'AbstractField.php',\r\n\t\t 'CronExpression.php',\r\n\t\t 'DayOfMonthField.php',\r\n\t\t 'DayOfWeekField.php',\r\n\t\t 'HoursField.php',\r\n\t\t 'MinutesField.php',\r\n\t\t 'MonthField.php',\r\n\t\t 'YearField.php',\r\n\t\t\t'Exceptions.php'\r\n\t\t) as $class) require_once $prefix . $class;\r\n }",
"public function create()\n {\n if (is_dir($this->workspacePath) === false) {\n mkdir($this->workspacePath);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders a selector box to chose all or a specific package for which the tests should be run. | protected function renderPackageSelectorBox() {
$options = '';
$packageManager = $this->objectManager->get('F3\FLOW3\Package\PackageManagerInterface');
$packages = $packageManager->getAvailablePackages();
foreach ($packages as $package) {
if (in_array($package->getPackageKey(), $this->testBlacklist)) {
continue;
}
$selected = '';
if (isset($_REQUEST['packageToTest']) && $_REQUEST['packageToTest'] == $package->getPackageKey()) {
$selected = ' selected="selected"';
}
$disabled = $packageManager->isPackageActive($package->getPackageKey()) ? '' : ' disabled="disabled"';
$options .= '<option' . $selected . $disabled . '>' . $package->getPackageKey() . '</option>';
}
$testcaseClassName = (isset($_REQUEST['testcaseClassName'])) ? htmlspecialchars($_REQUEST['testcaseClassName']) : '';
$html = '
<select size="1" name="packageToTest">
<option value="*">all packages</option>
' . $options . '
</select>
Filter: <input type="text" name="testcaseClassName" style="width:40em" value="' . $testcaseClassName . '" />' . PHP_EOL;
echo $html;
} | [
"public function selectorAction ()\n {\n // Creation du block\n $this->loadLayout();\n $block = $this->getLayout()->createBlock(\n 'Addonline_Gls_Block_Selector', 'root', \n array('template' => 'gls/selector.phtml')\n );\n $this->getLayout()\n ->getBlock('content')\n ->append($block);\n $this->renderLayout();\n }",
"public function ajax_show_package_select(){\n\t\t$ml = self::print_package_select_options($_POST['service']);\n\t\techo $ml;\n\t}",
"function paintTestMenu() {\n\t\t$groups = $this->baseUrl() . '?show=groups';\n\t\t$cases = $this->baseUrl() . '?show=cases';\n\t\t$plugins = App::objects('plugin', null, false);\n\t\tsort($plugins);\n\t\tinclude CAKE_TESTS_LIB . 'templates' . DS . 'menu.php';\n\t}",
"function testRender(){\n\t\t#mdx:Render\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat']);\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?select_days.*?1.*?select_days.*?6.*?Sat/s\");\n\t\techo $select;\n\t}",
"function makeMySelBox( $title, $order = \"\", $preset_id = 0, $none = 0, $sel_name = \"\", $onchange = \"\" )\r\n {\r\n if ( $sel_name == \"\" ) {\r\n $sel_name = $this->id;\r\n }\r\n echo \"<select name='\" . $sel_name . \"'\";\r\n if ( $onchange != \"\" ) {\r\n echo \" onchange='\" . $onchange . \"'\";\r\n }\r\n echo \">\\n\";\r\n if ( $none ) {\r\n echo \"<option value='0'>---------------</option>\\n\";\r\n }\r\n $keys = $this->getKeys( 0, $order );\r\n foreach ( $keys as $catid ) {\r\n $sel = \"\";\r\n if ( $catid == $preset_id ) {\r\n $sel = \" selected='selected'\";\r\n }\r\n echo \"<option value='$catid'$sel>\" . $this->arr[$catid][$title] . \"</option>\\n\";\r\n $sel = \"\";\r\n $arr = $this->getChildTreeArray( $catid, $order );\r\n foreach ( $arr as $option ) {\r\n $option['prefix'] = str_replace( \".\", \"--\", $option['prefix'] );\r\n $catpath = $option['prefix'] . \" \" . htmlSpecialChars( $option[$title], ENT_QUOTES );\r\n if ( $option[$this->id] == $preset_id ) {\r\n $sel = \" selected='selected'\";\r\n }\r\n echo \"<option value='\" . $option[$this->id] . \"'$sel>$catpath</option>\\n\";\r\n $sel = \"\";\r\n }\r\n }\r\n echo \"</select>\\n\";\r\n }",
"protected function showItemSelection()\n\t{\n\t\tglobal $tpl;\n\t\t\n\t\t$tpl->addJavaScript('./Services/CopyWizard/js/ilContainer.js');\n\t\t$tpl->setVariable('BODY_ATTRIBUTES','onload=\"ilDisableChilds(\\'cmd\\');\"');\n\n\t\tinclude_once './Services/Export/classes/class.ilExportSelectionTableGUI.php';\n\t\t$table = new ilExportSelectionTableGUI($this,'listExportFiles');\n\t\t$table->parseContainer($this->getParentGUI()->object->getRefId());\n\t\t$this->tpl->setContent($table->getHTML());\n\t}",
"function testCaption(){\n\t\t#mdx:Caption\n\t\t$select = new HtSelect('id_category');\n\t\t$select->options([1=>'Category1',2=>'Category2',3=>'Category3']);\n\t\t$select->caption('CHOOSE A CATEGORY:');\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/select.*?CHOOSE A CATEGORY.*?/s\");\n\t\techo $select;\n\t}",
"public function testRenderOptionGroups(): void\n {\n $select = new SelectBoxWidget($this->templates);\n $data = [\n 'name' => 'Birds[name]',\n 'options' => [\n 'Mammal' => [\n 'beaver' => 'Beaver',\n 'elk' => 'Elk',\n ],\n 'Bird' => [\n 'budgie' => 'Budgie',\n 'eagle' => 'Eagle',\n ],\n ],\n ];\n $result = $select->render($data, $this->context);\n $expected = [\n 'select' => [\n 'name' => 'Birds[name]',\n ],\n ['optgroup' => ['label' => 'Mammal']],\n ['option' => ['value' => 'beaver']],\n 'Beaver',\n '/option',\n ['option' => ['value' => 'elk']],\n 'Elk',\n '/option',\n '/optgroup',\n ['optgroup' => ['label' => 'Bird']],\n ['option' => ['value' => 'budgie']],\n 'Budgie',\n '/option',\n ['option' => ['value' => 'eagle']],\n 'Eagle',\n '/option',\n '/optgroup',\n '/select',\n ];\n $this->assertHtml($expected, $result);\n }",
"public function testSelectDisplaysWithCustomClasses()\n {\n $data = [\n 'name' => 'someDropdown',\n 'labelText' => 'Choose option',\n 'options' => [\n 'option1' => 'Option 1',\n 'option2' => 'Option 2',\n ],\n 'classes' => [\n 'formGroup' => 'myFormGroupClass',\n 'label' => 'myLabelClass',\n 'inputContainer' => 'myInputContainerClass',\n 'input' => 'myInputClass',\n ],\n ];\n\n $dom = new DOMDocument();\n $dom->loadHTML($this->renderBladeView('select', $data));\n\n $this->checkFormGroupDisplaysWithCustomClass($dom, $data['classes']['formGroup']);\n\n $label = $dom->getElementsByTagName('label')[0];\n $this->assertFalse(str_contains($label->getAttribute('class'), FormComponentsServiceProvider::LABEL_DEFAULT_CLASS));\n $this->assertTrue(str_contains($label->getAttribute('class'), $data['classes']['label']));\n\n $inputContainer = $dom->getElementsByTagName('div')[1];\n $this->assertFalse(str_contains($inputContainer->getAttribute('class'), FormComponentsServiceProvider::SELECT_CONTAINER_DEFAULT_CLASS));\n $this->assertTrue(str_contains($inputContainer->getAttribute('class'), $data['classes']['inputContainer']));\n\n $input = $dom->getElementsByTagName('select')[0];\n $this->assertFalse(str_contains($input->getAttribute('class'), FormComponentsServiceProvider::SELECT_DEFAULT_CLASS));\n $this->assertTrue(str_contains($input->getAttribute('class'), $data['classes']['input']));\n }",
"function PKG_OptionPageRender2($layout, $client, $package)\n{\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\t//Language code to add to the variables\n\t$langAdd = ($GLOBALS[\"m23_language\"] == \"en\" ? \"\" : $GLOBALS[\"m23_language\"]);\n\n\tforeach (array_keys($layout) as $var)\n\t{\n\t\t//Get the description by language or if there is no translation in the default language.\n\t\tif (isset($layout[$var][\"description$langAdd\"]{1}))\n\t\t\t$description = PKG_decodeDebconfDescription($layout[$var][\"description$langAdd\"],$title);\n\t\telse\n\t\t\t$description = PKG_decodeDebconfDescription($layout[$var][\"description\"],$title);\n\n\n\t\t//Clean the choices from the last run\n\t\t$selection = array();\n\n\n\t\t//Prepare selection array with choices for (multi)selection\n\t\tif (($layout[$var]['type'] == \"select\") || ($layout[$var]['type'] == \"multiselect\"))\n\t\t{\n\t\t\t//Generate a name for the HTML element\n\t\t\t$htmlName = \"SEL_\".urlencode($var);\n\n\t\t\t//Create the choices array\n\t\t\tfor ($i = 1 ; $i <= count($layout[$var]['choices']); $i++)\n\t\t\t{\n\t\t\t\t//Add the choices to the array with the default language answers as keys\n\t\t\t\t$selection[$layout[$var]['choices'][$i]] = \n\t\t\t\t//Check if there is \n\t\t\t\t\tutf8_decode((isset($layout[$var][\"choices$langAdd\"][$i]) ? $layout[$var][\"choices$langAdd\"][$i] : $layout[$var][\"choices\"][$i]));\n\t\t\t}\n\t\t}\n\n\n\t\t//Try to get the default value from the debconf DB\n\t\tif (($default = CLIENT_getDebconfDBValue($client, $package, $var)) === NULL)\n\t\t\t$default = utf8_decode($layout[$var]['default']);\n\n\n\t\t//If the value is for a multiselect template => Create an array with it\n\t\tif ($layout[$var]['type'] == \"multiselect\")\n\t\t\t$default = explode(', ', $default);\n\n\t\t//Store the type of the element: Needed for showing the debconf via CLIENT_getDebconfDB\n\t\t$debconf[$var]['type'] = $layout[$var]['type'];\n\n\t\t//Show the HTML elements by type\n\t\tswitch($layout[$var]['type'])\n\t\t{\n\t\t\tcase \"select\":\n\t\t\t\t{\n\t\t\t\t\t$debconf[$var]['val'] = HTML_selection($htmlName, $selection, SELTYPE_selection, true, $default);\n\t\t\t\t\tHTML_showTableRow($title.\"<br>\".constant($htmlName),\" \",$description);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase \"multiselect\":\n\t\t\t\t{\n\t\t\t\t\techo(\"<tr>\n\t\t\t\t\t\t\t<td>$title<br>\");\n\t\t\t\t\t\t\t$checkedElements = HTML_multiCheckBoxShow($selection, $default);\n\n\t\t\t\t\t\t\t//Only generate the string containing the checked values, if there are values\n\t\t\t\t\t\t\t$debconf[$var]['val'] = (is_array($checkedElements) ? implode(', ',$checkedElements) : \"\");\n\t\t\t\t\techo(\"\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t$description\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase \"boolean\":\n\t\t\t\t{\n\t\t\t\t\t//Generate a name for the HTML element\n\t\t\t\t\t$htmlName = \"SEL_\".urlencode($var);\n\n\t\t\t\t\t//Generate yes/no selection\n\t\t\t\t\t$selection['true'] = $I18N_yes;\n\t\t\t\t\t$selection['false'] = $I18N_no;\n\t\t\t\t\t$debconf[$var]['val'] = HTML_selection($htmlName, $selection, SELTYPE_selection, true, $default);\n\t\t\t\t\tHTML_showTableRow($title.\"<br>\".constant($htmlName),\" \",$description);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase \"string\":\n\t\t\tcase \"password\":\n\t\t\t\t{\n\t\t\t\t\t//Generate a name for the HTML element\n\t\t\t\t\t$htmlName = \"ED_\".urlencode($var);\n\n\t\t\t\t\t$debconf[$var]['val'] = HTML_input($htmlName, $default, 50);\n\t\t\t\t\tHTML_showTableRow($title.\"<br>\".constant($htmlName),\" \",$description);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t{\n\t\t\t\t\t//Remove entries form not supported type (e.g. \"title\")\n\t\t\t\t\tunset($debconf[$var]);\n\t\t\t\t}\n\t\t}\n\t}\n\n\treturn($debconf);\n}",
"function selectionWidget($selected = NULL, $type=NULL) {\n $i = 0;\n $list = & $this->fetchVendorTypeArray($type);\n print(\"<table border='0' cellspacing='5'>\");\n print(\" <tbody>\");\n \n foreach($list as $row) {\n $s = ($row['id'] == $selected) ? 'checked' : '';\n if(!($i % 2)) {\n print(\"<tr>\");\n }\n ?>\n\n\t\t\t\t\t\t<? if ($row['id'] != 11) { ?>\t\t\t\t\n\n <td width='5%' valign='top' align='right'>\n\t\t\t\t\t\t\t\t\n <input <?= $s ?> type='radio' id='<?= $row['name'] ?>' name='vendor_type' value='<?= $row['id'] ?>' />\n </td>\n <td width='45%' valign='top'>\n <label for='<?= $row['name'] ?>'><?= $row['name'] ?></label>\n\t\t\t\t\t\t\n </td>\n\n\t\t\t\t\t\t<? } ?>\n\n <?\n $i++;\n if(!($i % 2)) {\n print(\"</tr>\");\n }\n }\n print(\" </tbody>\");\n print(\"</table>\");\n }",
"public function apiSelectAction() {\n\t\t$data = $this->_prepareApiData();\n\n\t\techo $this->_view( 'partials/api-select', $data ) .\n\t\t $this->_view( 'partials/api-lists', $data );\n\n\t\texit();\n\t}",
"private function render_packages( $form, $type ) {\n\n\t\tif ( $form->get_option( $type === 'plugin' ? 'plugin_automatic_updates' : 'theme_automatic_updates' ) === 'custom' ) {\n\t\t\t$hidden = '';\n\t\t} else {\n\t\t\t$hidden = ' hidden';\n\t\t}\n\n\t\t$form->add_input_group( 'packages' );\n\t\t?>\n\t\t<tr id=\"itsec-version-management-<?php echo esc_attr( $type ); ?>-container\" class=\"itsec-version-management-packages-container<?php echo esc_attr( $hidden ); ?>\">\n\t\t\t<td colspan=\"2\">\n\t\t\t\t<h4><?php $type === 'plugin' ? esc_html_e( 'Select Plugins', 'it-l10n-ithemes-security-pro' ) : esc_html_e( 'Select Themes', 'it-l10n-ithemes-security-pro' ); ?></h4>\n\t\t\t\t<table class=\"itsec-vm-app\" id=\"itsec-vm-app--<?php echo esc_attr( $type ); ?>\"></table>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php\n\n\t\t$form->remove_input_group();\n\t}",
"protected function displayTableSelector() {\n\n\t\t\tglobal $TCA;\n\n\t\t\t\t// show a select box for all reasonable BE tables; already selected tables are marked selected\n\t\t\t$tableSelector .= '\n\t\t\t<fieldset>\n\t\t\t<legend style=\"font-weight: bold;\">'.$GLOBALS['LANG']->getLL('selectTable').'</legend>\n\t\t\t<label for=\"selectedTables\" style=\"display: block; margin: 0.5em 0 1em 0;\">'.$GLOBALS['LANG']->getLL('tcaTables').'</label>\n\t\t\t<select name=\"selectedTables[]\" id=\"selectedTables\" multiple=\"multiple\" size=\"10\">\n\t\t\t';\n\t\t\t\t// fetch the localized table options\n\t\t\twhile (list($table)=each($TCA)) {\n\t\t\t\t(in_array($table, $this->selectedTables)) ? $selected = ' selected=\"selected\"' : $selected = '';\n\t\t\t\tif (substr($table, 0, 4) == 'sys_' || substr($table, 0, 3) == 'be_' || substr($table, 0, 7) == 'static_') continue;\n\t\t\t\t$label = $GLOBALS['LANG']->sl($GLOBALS['TCA'][$table]['ctrl']['title']);\n\t\t\t\tif (!$label) $label = $table;\n\t\t\t\t$tableSelector .= '<option value=\"'.$table.'\"'.$selected.'>'.$label.'</option>';\n\t\t\t}\n\t\t\t\n\t\t\t$tableSelector .= '\n\t\t\t</select>\n\t\t\t</fieldset>';\n\t\t\t\n\t\t\treturn $tableSelector;\n\t\t}",
"public function iSelectAnyColorAndSize()\n {\n //this cycle should be refactored later. It should calculate available colors by itself\n //current implementation is the fastest\n try {\n $this->getMink()->assertSession()->elementExists(\n 'xpath', \"//div[@option-id='128']\"\n )->click();\n } catch (\\Behat\\Mink\\Exception\\ElementNotFoundException $e) {\n }\n\n //looks for available sizes\n try {\n $this->getMink()->assertSession()->elementExists(\n 'xpath', \"//div[@option-id='1566']\"\n )->click();\n } catch (\\Behat\\Mink\\Exception\\ElementNotFoundException $e) {\n }\n \n }",
"function render_dialog_element_box_type() {\n\t\t//$this->dd_layouts_register_standard_elements();\n\t\t//$register_cells = apply_filters('dd_layouts_register_cells', null);\n\t\tinclude_once 'dialog_element_box_type.tpl.php';\n\t}",
"public function render(): void\n {\n $lines = [];\n foreach ($this->choices as $key => $choice) {\n if (is_string($choice)) {\n $lines[] = $this->getGroupTemplate($choice);\n } else {\n $lines[] = $this->getChoiceTemplate($choice);\n }\n }\n\n $this->output->write(implode(\"\\n\", $lines));\n }",
"function testSelected(){\n\t\t#mdx:Selected\n\t\t$choice = new SimpleChoice('season');\n\t\t$choice->options([\n\t\t\t1 => 'Spring',\n\t\t\t2 => 'Summer',\n\t\t\t3 => 'Fall',\n\t\t\t4 => 'Winter'\n\t\t]);\n\t\t$choice->context(['season'=>3]); // selects season 3 (Fall)\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Fall\",\"$choice\");\n\t}",
"public function testChoose()\n {\n $this->specify(\n \"Unable to change the active tube\",\n function () {\n expect($this->client->choose('beanstalk-test'))->equals('beanstalk-test');\n expect($this->client->choose('default'))->equals('default');\n }\n );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Formats a string containing the fullyqualified path to represent a sku_group resource. | public static function skuGroupName(string $account, string $skuGroup): string
{
return self::getPathTemplate('skuGroup')->render([
'account' => $account,
'sku_group' => $skuGroup,
]);
} | [
"public function parseGroupPrefix($path)\n {\n // check if its a group route and it has prefix,\n // if it have prefix, add the prefix to the path\n if (isset($this->attributes['prefix'])) {\n $path = $this->attributes['prefix'].'/'.$path;\n }\n\n return $path;\n }",
"private function getGroupYamlName($group)\n {\n return str_replace('/', '.', $group);\n }",
"function make_name_formatted($name, $group_id=\"\", $prefix=\"\", $suffix=\"\")\n\t{\n\t\tif ( isset( $this->vars['ipb_disable_group_psformat'] ) and $this->vars['ipb_disable_group_psformat'] )\n\t\t{\n\t\t\treturn $name;\n\t\t}\n\t\t\n\t\tif( !$group_id )\n\t\t{\n\t\t\t$group_id = 0;\n\t\t}\n\t\t\n\t\tif( !$prefix )\n\t\t{\n\t\t\tif( $this->cache['group_cache'][ $group_id ]['prefix'] )\n\t\t\t{\n\t\t\t\t$prefix = $this->cache['group_cache'][ $group_id ]['prefix'];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( !$suffix )\n\t\t{\n\t\t\tif( $this->cache['group_cache'][ $group_id ]['suffix'] )\n\t\t\t{\n\t\t\t\t$suffix = $this->cache['group_cache'][ $group_id ]['suffix'];\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\treturn $prefix.$name.$suffix;\n\t}",
"protected function groupNameFromPath($path)\n {\n // Return an empty string if there is no group.e\n if (basename($path) == 'aliases.yml') {\n return '';\n }\n\n return $this->basenameWithoutExtension($path, '.aliases.yml');\n }",
"public function getPathStringFormat()\n {\n return $this->getPathFormat($this->path);\n }",
"public function setPath(string $path, string $group = 'default');",
"protected final static function qualify_group(): string {\r\n $module = JKNAPI::module(static::class);\r\n $qgroup = $module->qualify(static::group());\r\n return sprintf('group_%s', $qgroup);\r\n }",
"public function getGroupFormat(): string {}",
"public function urlToGroupOrParts(GroupView $groupView): string\n {\n $catalogId = $this->catalogId();\n $clientCar = $this->getClientCar();\n $carId = $clientCar->id();\n $criteria = $clientCar->criteria();\n\n $groupPath = $groupView->path()->toString();\n\n if ($groupView->hasParts()) {\n return Router::urlToParts($catalogId, $carId, $groupPath, $criteria);\n }\n\n return Router::urlToGroups($catalogId, $carId, $groupPath, $criteria);\n }",
"public function getResourceGroupsUrl() {\n return Http\\ResourceGroupsUrl::factory(\n $this->getBaseUrl() . '/groups.json',\n $this->getConfig('privateKey'),\n $this->getPublicKey()\n );\n }",
"function getGroupSubpartName()\n\t{\n\t\t// Else: use GROUP\n\t\tif (array_key_exists('legacyMode', $this->conf)) {\n\t\t\tif ($this->conf['legacyMode'] == '2.5') {\n\t\t\t\treturn '###PRODUCTGROUP###';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn '###GROUP###';\n\t}",
"function make_group_str($user)\n{\n $group = (int) (isset($user->group) ? $user->group : $user->power);\n $group2 = get_second_group($user);\n $group2 = $group2 < 0 ? '' : \",$group2\";\n return \"$group$group2\";\n}",
"function Minify_groupUri($group, $forceAmpersand = false)\n{\n $path = $forceAmpersand\n ? \"/g={$group}\"\n : \"/?g={$group}\";\n return _Minify_getBuild($group)->uri(\n '/' . basename(dirname(__FILE__)) . $path\n ,$forceAmpersand\n );\n}",
"public function setResourceGroupName(?string $value): void {\n $this->getBackingStore()->set('resourceGroupName', $value);\n }",
"private function getGroupURI()\n {\n $group = $this->getInput('group');\n $order = $this->getInput('order');\n\n $url = $this->i8n('bridge-uri')\n . $this->i8n('uri-group') . $group . $order;\n return $url;\n }",
"protected function createUriWithGroupContext($group, $path = '<front>', $options = []) {\n $purl = [\n 'provider' => 'og_purl|node',\n 'id' => $group->nid,\n ];\n $options = array_merge($options, ['purl' => $purl, 'absolute' => TRUE]);\n $uri = ltrim(url($path, $options), '/');\n return $uri;\n }",
"protected function getGroupResourceName($prefix, $resource, $method)\n {\n // vsch: don't add prefix to the route name, if you want a prefix added to the route name add 'as' => 'prefix.' to the group options\n return trim(\"{$prefix}{$resource}.{$method}\", '.');\n }",
"protected function createUriWithGroupContext($group, $path = '<front>', $options = array()) {\n $purl = array(\n 'provider' => \"og_purl|node\",\n 'id' => $group->nid,\n );\n $options = array_merge($options, array('purl' => $purl, 'absolute' => TRUE));\n $uri = ltrim(url($path, $options), '/');\n\n return $uri;\n }",
"public static function format(string $actionPath): string\n {\n return preg_replace('/_([^_]*)$/', '/$1', str_replace('/', '_', $actionPath));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set email name header | function set_email_name( $name )
{
if( $donate_name = DN_Settings::instance()->email->get( 'from_name' ) )
{
return sanitize_title( $donate_name );
}
return $name;
} | [
"public function setHeader()\n {\n\n if (!empty($this->nameSender)) {\n $headers = \"From: \" . $this->nameSender . \" <\" . $this->emailSender . \">\\r\\n\";\n } else {\n $headers = \"From: $siteName <\" . $this->emailSender . \">\\r\\n\";\n }\n $this->headers = $headers;\n\n }",
"public function setSender($email, $name);",
"public function setMailHeaders()\r\n {\r\n $mail_from = $this->modx->getOption('mail_from', $this->props);\r\n $this->mail_from = empty($mail_from) ? $this->modx->getOption('emailsender', null) : $mail_from;\r\n\r\n $mail_from_name = $this->modx->getOption('mail_from_name', $this->props);\r\n $this->mail_from_name = empty($mail_from_name) ? $this->modx->getOption('site_name', null) : $mail_from_name;\r\n\r\n $mail_sender = $this->modx->getOption('mail_sender', $this->props);\r\n $this->mail_sender = empty($mail_sender) ? $this->modx->getOption('emailsender', null) : $mail_sender;\r\n\r\n $mail_reply_to = $this->modx->getOption('mail_reply_to', $this->props);\r\n $this->mail_reply_to = empty($mail_reply_to) ? $this->modx->getOption('emailsender', null) : $mail_reply_to;\r\n\r\n $mail_subject = $this->modx->getOption('mail_subject', $this->props);\r\n $mail_subject = empty($mail_subject) ? $this->modx->resource->get('longtitle') : $mail_subject;\r\n /* fall back to pagetitle if longtitle is empty */\r\n $this->mail_subject = empty($mail_subject) ? $this->modx->resource->get('pagetitle') : $mail_subject;\r\n }",
"public function formatHeader( $email, $name = null )\n\t{\n\t\t$email = $this->filterEmail( $email );\n\t\tif ( empty($name) ) {\n\t\t\treturn $email;\n\t\t}\n\t\t$name = $this->encodeUtf8( $this->filterName( $name ) );\n\t\treturn sprintf( '\"%s\" <%s>', $name, $email );\n\t}",
"private function setMailSubject()\r\n\t{\r\n\t\t$this->mailSmtp->Subject = $this->subject;\r\n\t}",
"public function setEmailToName($value) {\n $this->_emailToName = $value;\n }",
"function setSwimmerAlternateMailingName($txt)\n {\n $this->_swimmer_alternate_mailing_name = $txt ;\n }",
"public function setReply($email,$name=null) \r\n\t{\t\t\r\n\t\t$this->headers['Reply-To'] = $name.'<'.$email.'>'; \r\n\t}",
"function setFrom($email)\n\t{\n\t\t$this->_headers['From'] = $email;\n\t}",
"public function setHeader() {\n\n $this->_headers = 'From: ' . $this->_from . \"\\r\\n\";\n $this->_headers.= 'Reply-To: ' . $this->_replyto . \"\\r\\n\";\n $this->_headers.= 'MIME-Version: 1.0' . \"\\r\\n\";\n $this->_headers.= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n //$this->_headers.= 'X-Mailer: PHP/' . phpversion();\n }",
"public function setFrom(string $email, string $name = '') : \\codename\\core\\mail;",
"function setQueryMailTitle($data)\n {\n\t\t$this->queryMailTitle = $data; \n\t}",
"public function setTitle($title){\n\t\t$this->mail_title = $title;\n\t}",
"function setSubject($subject) { $this->headers['Subject'] = $subject; }",
"private function AddMailFromNameField()\n {\n $name = 'MailFromName';\n $field = Input::Text($name, $this->settings->GetMailFromName());\n $this->AddField($field);\n }",
"function Subject( $subject )\n {\n \t$this->xheaders['Subject'] = strtr( $subject, \"\\r\\n\" , \" \" );\n }",
"public function setDefaultHeader()\n {\n $this->headers[] = \"Mime-Version: 1.0\";\n $this->headers[] = \"Date: \" . date(\"r\");\n $this->headers[] = \"X-Mailer: PHP/\".phpversion();\n\n if ($this->subject) {\n $this->headers[] = \"Subject: \" . $this->subject;\n }\n }",
"public function setMailSubject($mail_subject);",
"protected function setEmailId(){\n\t\t$this -> emailId = $this -> $name . ' <' . $this -> $emailAddress . '>';\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setGenero() Set the value of [quantidade_pontos] column. | public function setQuantidadePontos($v)
{
if ($v !== null) {
$v = (int) $v;
}
if ($this->quantidade_pontos !== $v) {
$this->quantidade_pontos = $v;
$this->modifiedColumns[] = PesquisaPeer::QUANTIDADE_PONTOS;
}
return $this;
} | [
"public function setGenero($genero)\n {\n $this->genero = $genero;\n\n return $this;\n }",
"public function setGenero($genero)\n {\n $this->genero = $genero;\n return $this;\n }",
"public function setOtro_proyecto($otro_proyecto){\n $this->otro_proyecto = $otro_proyecto;\n }",
"public function setPeso($peso)\r\n\t{\r\n\t\t$this->peso = $peso;\r\n\t}",
"public function setIdgenero($p_idgenero){\r\n\t$this->idgenero=$p_idgenero;\r\n}",
"private function _setTipGenero($tip_genero)\n {\n $this->tip_genero = $tip_genero;\n\n return $this;\n }",
"public function set_moneda_codigo_costo(string $moneda_codigo_costo) : void {\n $this->moneda_codigo_costo = $moneda_codigo_costo;\n }",
"public function setCodGenero($cod_genero)\n {\n $this->cod_genero = $cod_genero;\n\n return $this;\n }",
"public function setQuantidade($iQuantidade){\n \t$this->iQuantidade = $iQuantidade;\n }",
"public function setResumo($resumo)\n {\n if (!empty($resumo) && !is_null($resumo))\n $this->resumo = $resumo;\n }",
"public function setSerie($valor){\n\t\t\t$this->serie = $valor;\n\t\t}",
"public function setTiempoProceso($tiempoProceso)\n {\n $this->tiempoProceso = $tiempoProceso;\n }",
"public function getQuantidadePontos()\n\t{\n\t\treturn $this->quantidade_pontos;\n\t}",
"public function setMouvementGenere($mouvementGenere) {\n $this->mouvementGenere = $mouvementGenere;\n return $this;\n }",
"function set_pdf_tabla_opciones($opciones)\n\t{\n\t\t$this->_pdf_tabla_opciones = $opciones;\n\t}",
"public function setResumo($resumo)\n {\n if (!empty($resumo) && !is_null($resumo))\n $this->resumo = $resumo;\n }",
"public function setValorProvento($valorProvento)\n {\n $this->valorProvento = $valorProvento;\n\n return $this;\n }",
"function setValorPago($nValorPago) {\n $this->nValorPago = $nValorPago;\n }",
"public function setValor($valor) {\n\t\t$this->valor = $valor;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This function saves the last time the user actively used the system. This is calculated as follows: The attribute "bid:last_session_time" contains a twodimensional array. If the user is loggingoff ($connect=false) then both bid:session_time entries are set to the current unix time stamp. If the user is loggingon ($connect=true) the second time stamp replaces the first one and is set to the current unix time stamp afterwards. bid:session_time[0] contains either the last time the user loggedoff or in the case he didn't logoff correctly the last time he loggedin before the current login. | function setBidLastSessionTime($config_server_ip,$config_server_port,$login_name,$login_pwd,$connect=true) {
try {
//login und $steam def. in "./includes/login.php"
$steam = new steam_connector($config_server_ip,
$config_server_port,
$login_name,
$login_pwd);
if ($steam->get_login_status()) {
$steamUser = $steam->get_login_user();
$bidLastSessionTime = $steamUser->get_attribute("bid:last_session_time");
if (!$bidLastSessionTime || !$connect) {
$bidLastSessionTime = array();
$bidLastSessionTime[0] = $bidLastSessionTime[1] = time();
} else {
$bidLastSessionTime[0] = $bidLastSessionTime[1];
$bidLastSessionTime[1] = time();
}
$steamUser->set_attribute("bid:last_session_time", $bidLastSessionTime);
$steam->disconnect();
}
}
catch (Exception $e) {}
} | [
"public function setLastLogin()\r\n {\r\n $time = date('Y-m-d H:i:s');\r\n $where = $this->getAdapter()->quoteInto('id = ?', $this->userId);\r\n $this->update(array('lastlogin' => $time), array($where));\r\n\t\t$this->lastLogin = $time;\r\n\t\t$this->userData['lastlogin'] = $time;\r\n }",
"public function getLastTimeOnline()\n\t{\n\t\tif ( $this->LastTimeOnline === null )\n\t\t{\n\t\t\t$this->LastTimeOnline = 0;\n\t\t\t$Row = $this->getSessionRow();\n\t\t\tforeach ( $Row->findList( array( 'UserId = '.$this->Id ), 'UpdatedAt desc', 0, 1 ) as $Row )\n\t\t\t{\n\t\t\t\t$this->LastTimeOnline = $Row->UpdatedAt;\n\t\t\t}\n\t\t\tif ( !$this->LastTimeOnline && property_exists( $this, 'PostedAt' ) )\n\t\t\t{\n\t\t\t\t$this->LastTimeOnline = $this->PostedAt;\n\t\t\t}\n\t\t}\n\t\treturn $this->LastTimeOnline;\n\t}",
"public function logCurrentUserLastSeenTime()\n {\n $module = Common::getRequestVar('module', false);\n $currentUserLogin = Piwik::getCurrentUserLogin();\n\n // only log time for non-anonymous visits to the reporting UI\n if ($module == 'API'\n || $module == 'Proxy'\n || $currentUserLogin == 'anonymous'\n ) {\n return;\n }\n\n // get the last known time\n $optionName = self::OPTION_PREFIX . $currentUserLogin;\n $lastSeen = Option::get($optionName);\n\n // do not log if last known time is less than N minutes from now (so we don't make too many\n // queries)\n if (time() - $lastSeen <= self::LAST_TIME_SAVE_DELTA) {\n return;\n }\n\n // log last seen time (Note: autoload is important so the Option::get above does not result in\n // a separate query)\n Option::set($optionName, time(), $autoload = 1);\n }",
"public function lastLogoutTime();",
"public function getLastActivityTime() {\n\t\treturn max($this->lastActivityTime, $this->sessionLastActivityTime);\n\t}",
"public function _initSaveLastVisitTimestamp()\n\t{\n\t\tif (PHP_SAPI == 'cli' ||\n\t\t\tpreg_match('/^\\/mobile(\\/|$)/', $_SERVER['REQUEST_URI']))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$auth = Zend_Auth::getInstance()->getIdentity();\n\n\t\tif (empty($auth['login_id']))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t(new Application_Model_Loginstatus)->update([\n\t\t\t'visit_time' => new Zend_Db_Expr('NOW()')\n\t\t], 'id=' . $auth['login_id']);\n\t}",
"function updateLastAccessedTime() {\n\tif(empty( $_SESSION ))\n\t\treturn;\n\t$userId = getSessionUserId();\n\tif(isset($userId) && $userId != '') {\n\t\t$_SESSION['last_accessed_time'] = time();\n\t}\n}",
"private function lastVisit()\n {\n $lastVisit = User::model()->notsafe()->findByPk(Yii::app()->user->id);\n $lastVisit->lastvisit_at = time();\n $lastVisit->save();\n }",
"public function touchLastLogin()\n {\n $this->last_login_at = now();\n $this->last_seen_at = now();\n $this->save();\n }",
"public function getLastLoginTime() {\n\t\t$this->checkDisposed();\n\t\t\t\n\t\tif ($this->_lastLoginTime === false)\n\t\t\t$this->load();\n\t\treturn $this->_lastLoginTime;\t\n\t}",
"public function updateLastLoggedAt()\n {\n $user = Auth::user();\n $user->last_logged_at = Carbon::now();\n $user->save();\n }",
"public function lastAccessed() {\r\n\t\t$dbo =& CN::getDBO();\r\n\t\t\r\n\t\t$query = '\r\n\t\t\tSELECT\tlast_accessed \r\n\t\t\tFROM \t' . CN_SESSIONS_TABLE . ' \r\n\t\t\tWHERE\tuser_id = \"' . $dbo->sqlsafe( $this->id ) . '\"\r\n\t\t';\r\n\t\t$response = $dbo->query( $query );\r\n\t\t\r\n\t\tif ( $dbo->hasError( $response ) ) {\r\n\t\t\t$dbo->submitErrorLog( $response, 'CN_User::lastAccessed()' );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$timestamp = $dbo->field( 0, 'last_accessed', $response );\r\n\t\t$dbo->free( $response );\r\n\t\treturn $timestamp;\r\n\t}",
"public function touch() {\n\t\tif ($this->has_session) {\n\t\t\t$this->is_writable = true;\n\n if ($this->is_default_timeout) {\n //update last activity time\n $this->db->query(\"LOCK TABLES \".$this->db->escape_identifier($this->sess_table).\" WRITE;\");\n $query = \"UPDATE \".$this->db->escape_identifier($this->sess_table).\" \";\n $query .= \"SET `last_activity`=\".$this->db->escape($this->now).\" \";\n $query .= \"WHERE `session_id`=\".$this->db->escape($this->sess_user['session_id']);\n $this->db->query($query);\n $this->db->query(\"UNLOCK TABLES;\");\n $this->sess_user['last_activity'] = $this->now;\n }\n\t\t}\n\t\t\n\t\treturn $this->has_session;\n\t}",
"public function updateLastSignIn()\r\n\t{\r\n\t\tglobal $db,$db_table_prefix;\r\n\t\t\r\n\t\t$sql = \"UPDATE \".$db_table_prefix.\"Users\r\n\t\t\t SET\r\n\t\t\t\tLastSignIn = '\".time().\"'\r\n\t\t\t\tWHERE\r\n\t\t\t\tUser_ID = '\".$db->sql_escape($this->user_id).\"'\";\r\n\t\t\r\n\t\treturn ($db->sql_query($sql));\r\n\t}",
"public function updateLastConnect()\n {\n $s = 'UPDATE `users` SET `last_connect`=now() WHERE `userID`=%d';\n $params = array($this->userID);\n $this->conn->query($s, $params);\n }",
"public function lastAccessed() {\n\t\t$sqlobj =& SR_System::getDBO();\n\t\t\n\t\t$query\t\t=\t'\n\t\t\tSELECT\t\tlastAccessed\n\t\t\tFROM\t\t' . SR_SESSION_TABLE . '\n\t\t\tWHERE\t\tuser_id = \"' . $sqlobj->sqlsafe( $this->id ) . '\"'\n\t\t;\n\t\t$timestampquery = $sqlobj->query( $query );\n\n\t\tif ( $sqlobj->hasError( $timestampquery ) ) {\n\t\t\t$sqlobj->submitErrorLog( $timestampquery, 'SR_User::lastAccessed()' );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$timestamp = $sqlobj->field( 0, 'lastAccessed', $timestampquery );\n\t\t$sqlobj->free( $timestampquery );\n\t\treturn $timestamp;\n\t}",
"public function lastseen(){\n\t $seen = Time::now();\n\t\n\t\t$q = \"UPDATE users SET\n\t\t\tlastseen = '\".$seen.\"' \n\t\t\tWHERE user_id = '\".$this->user->user_id.\"'\n\t\t\t\";\n\t\n\t\tDB::instance(DB_NAME)->query($q);\n\t}",
"public function saveLoggedOutTime()\n {\n $this->logged_out_at = Carbon::now();\n $this->save();\n }",
"public function updateLastActivity()\n\t{ \n\t\t$this->checkIfSessionIDisSet();\n\n\t\t//check for session expiry.\n\t\tif ($this->inactivityTimeout() || $this->expireTimeout())\n\t\t\tthrow new SessionExpired('Session::updateLastActivity()',\"This session has expired.\");\n\t\t\n\t\t$db = DbManager::getConnexion('internals/users_manager');\n\t\t$db->SQL('UPDATE `'._UFO_RBAC_SCHEMA_.'`.`'.$db->manageCase('T_SESSION_SES').'` SET `SES_LAST_ACTIVITY` = ? WHERE `SESSION_ID` = ?',array(\\Ufo\\Core\\Init\\time(), $this->session));\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether or not generated autoloader considers the class map authoritative. | public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = (boolean) $classMapAuthoritative;
} | [
"public static function isClassLoadingInformationAvailable()\n {\n return !self::isTestingContext() && file_exists(self::getClassLoadingInformationDirectory() . self::AUTOLOAD_CLASSMAP_FILENAME);\n }",
"function testAutoload_mapsConsistency()\n {\n $name = $this->_rndName();\n $path = $this->_writeClassFile($name, '.class.php');\n\n lmb_require($path);\n $_ENV = array();\n lmb_require($path);\n lmb_autoload($name);\n $this->assertTrue(class_exists($name));\n }",
"private function useDefaultAutoloader() : bool\n\t\t{\n\t\t\treturn $this->autoloader_state;\n\t\t}",
"public function autoloadClassmap()\n {\n return $this->autoloadClassmap;\n }",
"public function hasAutoLoader();",
"public function classIsMapped($className)\n\t{\n\t\treturn isset($this->map[$className]);\n\t}",
"private function getClassMap(){\n\t\t$classMapFile = realpath('.').'/autoload.json';\n\t\tif(file_exists($classMapFile)) {\n\t\t\t$this->classMap = json_decode(file_get_contents($classMapFile),true);\n\t\t}\n\t}",
"public static function loadClassMap()\n {\n $class_map = array();\n\n // in development mode we start with a clean slate\n if (!self::$devMode) {\n @include sugar_cached(self::CLASS_CACHE_FILE);\n }\n\n if(empty($class_map)) {\n // oops, something happened to cache\n // try to rebuild\n self::buildClassCache();\n } else {\n self::$classMap = $class_map;\n self::$classMapDirty = false;\n }\n }",
"public function shouldOptimizeAutoloader()\n {\n return $this->optimizeAutoloader;\n }",
"function is_autoload_registered()\n{\n return (spl_autoload_functions() !== false && in_array(DOKU_AUTOLOAD, spl_autoload_functions()));\n}",
"public function isAutoloaded();",
"public function testLoadMap()\n\t{\n\t\tDaoMap::loadMap($this->_className);\n\t\t$map = DaoMap::getMap();\n\t\t$this->assertTrue(array_key_exists(strtolower($this->_className), $map));\n\t}",
"public function isFallbackAutoloader() {\n\t\treturn $this->_fallbackAutoloader;\n\t}",
"public function isFallbackAutoloader()\r\r\n {\r\r\n return $this->_fallbackAutoloader;\r\r\n }",
"protected function preinit() {\n Yii::$classMap += require(Yii::app()->basePath . '/config/classmap.php');\n }",
"public function enable_meta_map()\n {\n return false;\n }",
"public function loadsWithCreator()\n {\n return (bool) defined('static::LOADS_WITH_CREATOR') ? static::LOADS_WITH_CREATOR : false;\n }",
"public function shouldDumpAutoloader()\n {\n return $this->dumpAutoloader;\n }",
"public function autoloaded()\n {\n return true;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Redirects a user to the oauth connect page. | public function redirectToConnectPage()
{
/* Stop - no need to redirect if ACP / IN_TASK */
if ( IN_ACP OR IPS_IS_TASK )
{
return false;
}
/* Reset api to ensure user is not logged in */
$this->resetApi();
/* Append OAUTH URL */
$_urlExtra = '';
$key = md5( uniqid( microtime() ) );
$_urlExtra = '&key=' . $key;
if ( $this->request['_reg'] )
{
$_urlExtra .= '&_reg=1';
}
/* Update user's row */
if ( $this->memberData['member_id'] )
{
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'fb_token' => $key ) ) );
}
/* Is mobile? */
if ( $this->member->isMobileApp || ! empty( $_REQUEST['mobile'] ) )
{
$this->_oauth->setFormFactor( 'touch' );
}
/* Update callback url */
$this->_oauth->setCallBackUrl( FACEBOOK_CALLBACK . $_urlExtra );
$url = $this->_oauth->getAuthorizeURL();
$this->registry->output->silentRedirect( $url );
} | [
"public function redirectAction()\n {\n $this->facebookOAuth->authorize();\n }",
"function oAuthRedirect() {\n\t\t\tBigTree::redirect($this->AuthorizeURL.\n\t\t\t\t\"?client_id=\".urlencode($this->Settings[\"key\"]).\n\t\t\t\t\"&redirect_uri=\".urlencode($this->ReturnURL).\n\t\t\t\t\"&response_type=code\".\n\t\t\t\t\"&scope=\".urlencode($this->Scope).\n\t\t\t\t\"&approval_prompt=force\".\n\t\t\t\t\"&access_type=offline\");\n\t\t}",
"public function redirect()\n {\n $authorizationUrl = $this->provider->getAuthorizationUrl();\n\n header('Location: '.$authorizationUrl);\n }",
"public function oauth_redirect() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( __( 'Permission denied!', 'woocommerce-bookings' ) );\n\t\t}\n\n\t\t$redirect_args = array(\n\t\t\t'page' => 'wc-settings',\n\t\t\t'tab' => 'integration',\n\t\t\t'section' => $this->id\n\t\t);\n\n\t\t// OAuth.\n\t\tif ( isset( $_GET['code'] ) ) {\n\t\t\t$code = sanitize_text_field( $_GET['code'] );\n\t\t\t$access_token = $this->get_access_token( $code );\n\n\t\t\tif ( '' != $access_token ) {\n\t\t\t\t$redirect_args['wc_gcalendar_oauth'] = 'success';\n\n\t\t\t\twp_redirect( add_query_arg( $redirect_args, admin_url( 'admin.php' ) ), 301 );\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\tif ( isset( $_GET['error'] ) ) {\n\n\t\t\t$redirect_args['wc_gcalendar_oauth'] = 'fail';\n\n\t\t\twp_redirect( add_query_arg( $redirect_args, admin_url( 'admin.php' ) ), 301 );\n\t\t\texit;\n\t\t}\n\n\t\t// Logout.\n\t\tif ( isset( $_GET['logout'] ) ) {\n\t\t\t$logout = $this->oauth_logout();\n\t\t\t$redirect_args['wc_gcalendar_logout'] = ( $logout ) ? 'success' : 'fail';\n\n\t\t\twp_redirect( add_query_arg( $redirect_args, admin_url( 'admin.php' ) ), 301 );\n\t\t\texit;\n\t\t}\n\n\t\twp_die( __( 'Invalid request!', 'woocommerce-bookings' ) );\n\t}",
"public function redirectUser(){\n\t\t\tif ($this->ion_auth->is_admin()){\n\t\t\t\tredirect('auth', 'refresh');\n\t\t\t}\n\t\t\tredirect('/', 'refresh');\n\t\t}",
"public function redirectToLogin() {\n\t\t// send an authentification request to identity provider \n\t\t// using HTTP Redirect to Single Sign-On URL \n\t\theader( \"Location: \" . $this->SSOUrl );\n\t}",
"public function userPage() {\n if ($this->currentUser()->isAuthenticated()) {\n return $this->redirect('entity.user.canonical', ['user' => $this->currentUser()->id()]);\n }\n else {\n return $this->redirect('sfgov_user.start_page');\n }\n }",
"function maybe_authorize_user_after_sso() {\n\t\tif ( empty( $_GET['jetpack-sso-auth-redirect'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$redirect_to = ! empty( $_GET['redirect_to'] ) ? esc_url_raw( $_GET['redirect_to'] ) : admin_url();\n\t\t$request_redirect_to = ! empty( $_GET['request_redirect_to'] ) ? esc_url_raw( $_GET['request_redirect_to'] ) : $redirect_to;\n\n\t\t/** This filter is documented in core/src/wp-login.php */\n\t\t$redirect_after_auth = apply_filters( 'login_redirect', $redirect_to, $request_redirect_to, wp_get_current_user() );\n\n\t\t/**\n\t\t * Since we are passing this redirect to WordPress.com and therefore can not use wp_safe_redirect(),\n\t\t * let's sanitize it here to make sure it's safe. If the redirect is not safe, then use admin_url().\n\t\t */\n\t\t$redirect_after_auth = wp_sanitize_redirect( $redirect_after_auth );\n\t\t$redirect_after_auth = wp_validate_redirect( $redirect_after_auth, admin_url() );\n\n\t\t/**\n\t\t * Return the raw connect URL with our redirect and attribute connection to SSO.\n\t\t */\n\t\t$connect_url = Jetpack::init()->build_connect_url( true, $redirect_after_auth, 'sso' );\n\n\t\tadd_filter( 'allowed_redirect_hosts', array( 'Jetpack_SSO_Helpers', 'allowed_redirect_hosts' ) );\n\t\twp_safe_redirect( $connect_url );\n\t\texit;\n\t}",
"public function token_auth_redirect() {\n\n $decodedToken = AUTHORIZATION::validateToken(get_cookie(\"token\"));\n\n if (!empty($decodedToken)) {\n // echo \"yes\";\n // echo $decodedToken->user_email;\n $query = $this->auth_m->select_user_auth_redirect($decodedToken->user_email);\n if ($query > 0) {\n \n redirect(base_url().'home');;\n\n }\n }\n }",
"public function twitterRedirect()\n\t{\n\t\t// Reqest tokens\n\t\t$tokens = Twitter::oAuthRequestToken();\n\n\t\t// Redirect to twitter\n\t\tTwitter::oAuthAuthenticate(array_get($tokens, 'oauth_token'));\n\t\texit;\n\t}",
"protected function auth_redirect() {\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\tauth_redirect();\n\t\t\texit;\n\t\t}\n\t}",
"public function redirectOAuth(string $oauthName): RedirectResponse;",
"public function oauthCallbackAction()\n {\n $request = (new Request())\n ->setBody($this->getRequest()->getContent())\n ->setGet($this->params()->fromQuery())\n ->setPost($this->params()->fromPost());\n\n $system = $this->getServiceLocator()->get('System');\n\n foreach ($system->getPluginManager()->getAuthenticationProviders() as $provider) {\n if ($provider instanceof AbstractOAuthProvider) {\n if (($user = $provider->validateResult($request))) {\n $dbUser = $this->repository->getBy(['email' => $user->getEmail()]);\n\n if (!$dbUser) {\n $this->repository->persist($user)->flush();\n $dbUser = $user;\n } else {\n $dbUser = current($dbUser);\n }\n\n $auth = new AuthenticationService();\n $auth->getStorage()->write($dbUser);\n $this->redirect()->toUrl('/');\n return;\n }\n }\n }\n\n $this->redirect()->toUrl('/login');\n }",
"public function handleGoogleCallback()\n {\n $user = $this->createUserFromOAuth(Socialite::driver('google')->user());\n\n Auth::guard($this->getGuard())->login($user);\n return redirect()->intended($this->redirectPath());\n }",
"private function oauth() {\n if ($this->IntuitAnywhere->handle($this->the_username, $this->the_tenant))\n {\n ; // The user has been connected, and will be redirected to $that_url automatically.\n }\n else\n {\n // If this happens, something went wrong with the OAuth handshake\n die('Oh no, something bad happened: ' . $this->IntuitAnywhere->errorNumber() . ': ' . $this->IntuitAnywhere->errorMessage());\n }\n }",
"public function redirectUser(){\n\t\tif ($this->ion_auth->is_admin()){\n\t\t\tredirect('user');\n\t\t}\n\t\tif (!$this->ion_auth->is_admin()){\n\t\t\tredirect('user');\n\t\t}\n\t\tredirect('/', 'refresh');\n\t}",
"public function facebook_redirect(AuthenticateUser $authenticateUser, Request $request, $provider = null) {\n\t //echo '<pre>';print_r($request->all());die;\n\treturn $authenticateUser->execute($request->all(), $this, $provider);\n // return Socialize::with('facebook')->redirect();\n }",
"function oauth_grant() {\n\t$client = \\Sgdg\\Frontend\\GoogleAPILib\\get_raw_client();\n\t$auth_url = $client->createAuthUrl();\n\theader( 'Location: ' . esc_url_raw( $auth_url ) );\n}",
"function redirect($scopes=array()) {\n\t\t$scope = array_merge(array('user'), $scopes);\n\t\treturn \\Redirect::to(\"https://github.com/login/oauth/authorize?client_id=\" . $this->config['client_id'] . \"&scope=\" . implode(',', $scope) . \"&redirect_uri=\" . url('/authorize'));\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the provided data for a specified prospect. | function pardot_update_prospect($id_field, $id, $params = null, $config = null) {
return pardot_update('prospect', $id_field, $id, $params, $config);
} | [
"public function update(int $sprintId, array $data, bool $partially = false)\n {\n\n }",
"public function updating(Joincompetition $joincompetition, array $data);",
"public function update( $data ){\n foreach( $data as $prop => $value ){\n $update = array();\n if( $this->$prop != $value ){\n $update[$prop] = $value;\n }\n }\n if( $update ){\n $dao = new BIM_DAO_Mysql_Club( BIM_Config::db() );\n $dao->update( $this->id, $update );\n $this->purgeFromCache();\n }\n }",
"public function riwayat_pekerjaan_detail_pro_update($data){\n\t\t$query = $this->db->query(\"update human_pa_md_emp_employment set status_process = '$data[status_process]', \n\t\t\t\t\t\t\temployer = '$data[employer]',\n\t\t\t\t\t\t\tindustry_type = '$data[industry_type]',\n\t\t\t\t\t\t\tlocation = '$data[location]',\n\t\t\t\t\t\t\tcountry = '$data[country]',\n\t\t\t\t\t\t\tjob = '$data[job]',\n\t\t\t\t\t\t\tjob_name = '$data[job_name]',\n\t\t\t\t\t\t\tposition_name = '$data[position_name]',\n job_description = '$data[job_description]',\n reason_leaving = '$data[reason_leaving]',\n remarks = '$data[remarks]' \n\t\t\t\t\t\t\twhere personnel_id = '$data[personnel_id]' \n\t\t\t\t\t\t\tAND start_date = '$data[start_date]' \n\t\t\t\t\t\t\tAND end_date = '$data[end_date]'\");\n\t\treturn $query;\n\t}",
"public function updating(Manufacturer $manufacturer, array $data);",
"public function updatePersonalQualificationData($data)\n\t {\n\t \treturn Qualification::where('id','=',$data['qualification_id'])->update([\n\t \t\t'user_id' => Auth::user()->id,\n\t \t\t'professional_certificate' => $data['professional_certificate'],\n\t \t\t'conferring_organization' => $data['conferring_organization'],\n\t \t\t'summary' => $data['summary'],\n\t \t\t'start_year' => $data['start_year'],\n\t \t]);\n\t }",
"public function updateBy(array $criteria, array $data)\n {\n }",
"function updateProspect($email_address,$new_values = array()) {\n $url = '/do/update/email/' . $email_address;\r\n $result = $this->_pardot_request($url,'prospect',$new_values);\r\n\r\n $root_attributes = $result->attributes();\r\n \n if($root_attributes['stat'] == 'fail') {\r\n return null;\r\n }\r\n return $result->prospect;\r\n \n }",
"public function updateData(array $data): void\n {\n $this->data = $data;\n }",
"public function updatePartner($data){\n\t\t$this->db->where('id', $data['id']);\n $this->db->update('partner', $data);\n\t}",
"public function doc_pribadi_detail_pro_update($data){\n\t\t$query = $this->db->query(\"update human_pa_md_emp_document set document_type = '$data[document_type]',\n\t\t\t\t\t\t\tseq = '$data[seq]',\n\t\t\t\t\t\t\tdocument_no = '$data[document_no]',\n\t\t\t\t\t\t\ttitle = '$data[title]',\n\t\t\t\t\t\t\tauthority_officer = '$data[authority_officer]',\n\t\t\t\t\t\t\tmime_type = '$data[mime_type]',\n\t\t\t\t\t\t\tbinary_data = '$data[binary_data]',\n original_file_name = '$data[original_file_name]',\n extension = '$data[extension]',\n size = '$data[size]',\n remarks = '$data[remarks]' \n\t\t\t\t\t\t\twhere personnel_id = '$data[personnel_id]' \n\t\t\t\t\t\t\tAND start_date = '$data[start_date]' \n\t\t\t\t\t\t\tAND end_date = '$data[end_date]'\");\n\t\treturn $query;\n\t}",
"public function updated(Competency $competency)\n {\n //\n }",
"function updateEpp($epp_id, $data)\n\t{\n\t\t$this->db->where('epp_id', $epp_id);\n\t\t$this->db->update('epp', $data);\t\n\t}",
"public function testUpdate()\n {\n // Create test data.\n $data = $this->addData('update');\n\n // Modify the entry, not the email in this test.\n for ($i = 0; $i < Configuration::TEST_DATA_SIZE; $i++) {\n $data['params'][$i]['id'] = $data['ids'][$i];\n $data['params'][$i]['fn'] = $data['params'][$i]['fn'] . bin2hex(random_bytes(4));\n $data['params'][$i]['ln'] = $data['params'][$i]['ln'] . bin2hex(random_bytes(4));\n $data['params'][$i]['p'] = $data['params'][$i]['p'] . bin2hex(random_bytes(4));\n\n // *** TEST LINE *** : Call update directly with the modded data.\n $this->object->update($data['params'][$i]);\n // *** TEST LINE ***\n }\n\n // Test the data.\n $this->validateData($data);\n\n // Remove the test data.\n $this->removeData($data);\n }",
"public static function updateProspectProperty(ProspectBuyer $prospect_buyer, AddEditProspectBuyerRequest $request)\n {\n \t$prospect_property = ProspectProperty::getForProspectBuyer($prospect_buyer);\n \t$prospect_property->property_id = $request->get('property');\n \t$prospect_property->agent_id = Auth::user()->agent_id;\n \t$prospect_property->prospect_buyer_id = $prospect_buyer->id;\n \t$return[\"success\"] = $prospect_property->touch();\n \treturn $return;\n }",
"public function updateOne($data)\n {\n }",
"public function update($data, $where){\n\t\t\t$this->db->where($where);\n\t\t\t$this->db->update(\"doAttend\", $data);\n\t\t}",
"function update_insurance($data)\n\t{\n\t\tglobal $db, $cid, $ins_id;\n\n\t\t// Now we update this row\n\t\t$sql = \"UPDATE \". GARAGE_INSURANCE_TABLE .\"\n\t\t\tSET business_id = '\".$data['business_id'].\"', premium = '\".$data['premium'].\"', cover_type = '\".$data['cover_type'].\"', comments = '\".$data['comments'].\"' \n\t\t\tWHERE id = '$ins_id' and garage_id = '$cid'\";\n\n\t\tif(!$result = $db->sql_query($sql))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Could Not Update Insurance Premium', '', __LINE__, __FILE__, $sql);\n\t\t}\n\n\t\treturn;\n\t}",
"public function update($data)\n {\n if (empty($data['work_date']))\n {\n $data['work_date'] = NULL;\n }\n \n if (empty($data['description']))\n {\n $data['description'] = NULL;\n }\n \n if (empty($data['work_done_hours']))\n {\n $data['work_done_hours'] = NULL;\n }\n \n if (empty($data['work_remaining_hours']))\n {\n $data['work_remaining_hours'] = NULL;\n }\n \n $this->db->where('id', $data['id']);\n $query = $this->db->update('sprint_work', $data) ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if they are logged into any of the queues provided, they are considered logged in and we will log them out of all | function get_agent_allqueue_state($user, $queues) {
global $logged_agents_array;
global $static_agents_array;
if (empty($queues)) {
debug("no queues for this agent");
return 'NOQUEUES';
}
foreach ($queues as $q) {
debug("checking if logged into queue: $q");
if (array_search($user,$logged_agents_array[$q]) && ! array_search($user,$static_agents_array[$q])) {
debug("Yes logged into queue: $q");
return 'LOGGEDIN';
}
}
debug("Nothing found so logged out");
return 'LOGGEDOUT';
} | [
"function logoutall() {\n \n \t\tglobal $zurich;\n\t\t\n \t\tforeach ($zurich->players as $p) {\n \t\t\tif ($p->id == 'bank') continue;\n \t\t\t$p_obj = & $this->id_to_obj($p->id);\n \t\t\tif ($p_obj->loggedin) {\n \t\t\t\t$p_obj->loggedin = FALSE;\n \t\t\t\tlog_and_confirm(\"left the game\", $p->name, 2);\n \t\t\t\techo \"$p->name was logged out.<br>\";\n \t\t\t}\n \t\t}\n \t}",
"private function call_kenny_loggouts() \n\t\t{\n\t\t\t/**\n\t\t\t * FighterJet's Spreadin' out her wings tonight\n\t\t\t */\n wp_logout();\n\t\t\t$this->exit_like_a_boss();\n\t\t}",
"private function listAll() {\n\t\t$sNicks = '';\n\t\t\n\t\t// build return message\n\t\tforeach ( $this->__aNicks as $aViewer ) {\n\t\t\t$sNicks .= $aViewer[ 'twitch_nick' ] . ' (' . $aViewer[ 'game_nick' ] . '), ';\n\t\t}\n\t\t\n\t\tif ( !empty( $sNicks ) ) {\n\t\t\tLogger::cliLog( \"Current queue: \" . substr( $sNicks, 0, -2 ), 'QUEUE' );\n\t\t\t$this->setReturnMessage( Translator::getInstance()->trans( 'QUEUE_LIST' ) . ' ' . substr( $sNicks, 0, -2 ) );\n\t\t} else {\n\t\t\tLogger::cliLog( \"Queue is empty.\", 'QUEUE' );\n\t\t\t$this->setReturnMessage( Translator::getInstance()->trans( 'QUEUE_EMPTY' ) );\n\t\t}\n\t}",
"function user_in_queue()\r\n\t{\r\n\t\t$db=open_db(\"db/system.sqlite\",SQLITE3_OPEN_READONLY);\r\n\t\t$queue=get_setting($db,\"multireq\");\r\n\t\tclose_db($db);\r\n\t\t$db=open_db(\"db/music.sqlite\",SQLITE3_OPEN_READONLY);\r\n\t\t$ip=extract_ids(get_requests_by_ip($db,$_SERVER['REMOTE_ADDR']));\r\n\t\t$open=array_merge(extract_ids(get_requests_by_status($db,0)),extract_ids(get_requests_by_status($db,1)));\r\n\t\t$requests=array_intersect($ip,$open);\r\n\t\tclose_db($db);\r\n\t\tif($queue == \"y\" || count($requests) <= 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public function checkSessionConcurrency(){\n\t\tif(Session::userIsLoggedIn()){\n\t\t\t// $this->logger->debug(\"userIsLoggedIn\");\n\t\t\tif(Session::isConcurrentSessionExists()){\n\t\t\t\t// TODO: log something...\n\t\t\t\tLoginModel::logout();\n\t\t\t\t$this->redirectHome();\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t}",
"public function logoutAll() {\n Auth::instance()->kill();\n $this->redirecttobase();\n }",
"private function storeToQueues()\n {\n if (!empty($this->androidUsers)) {\n $this->addToDeviceQueue($this->androidUsers, QueueController::ANDROID);\n }\n if (!empty($this->iosUsers)) {\n $this->addToDeviceQueue($this->iosUsers, QueueController::IOS);\n }\n }",
"private function logOut() {\n\n \n\n\n }",
"public function logout_users() {\n\t\t// added 2020-09-22 10:00am\n\t\t$block_login = true;\n\n\t\tif ( is_user_logged_in()) {\n\n\t\t\t// network admins must always be allowed to login\n\t\t\tif ( is_super_admin()){\n\t\t\t\t$block_login = false;\n\t\t\t}\n\n\t\t\t// site admins can be blocked if needed. setting is defined in the network admin settings page.\n\t\t\t// @TODO add this ability\n\t\t\tif ( is_admin()) {\n\t\t\t\t$block_login = false;\n\t\t\t}\n\n\t\t\t// list of allowed users. if not in the list, they're not allowed to login.\n\t\t\t// @TODO add this ability\n\n\n\n\t\t\tif ($block_login){\n\t\t\t\twp_logout();\n\t\t\t}\n\n\t\t} else {\n\t\t\t// user is not logged in. do nothing.\n\t\t}\n\t}",
"private function removeOtherSessions() {\n\t\t}",
"protected function performLogoff() {}",
"public function resetQueue()\n {\n $shopQueueLogs = ShopQueueLog::all();\n foreach ($shopQueueLogs as $shopQueueLog) {\n if ($shopQueueLog->expires_at > 0) {\n $carbon = Carbon::parse($shopQueueLog->created_at);\n // if expired, remove the entry from the shop_queue_logs table\n if ($carbon->diffInMinutes(Carbon::now()) >= $shopQueueLog->expires_at) {\n $shopQueueLog->delete();\n }\n }\n }\n }",
"protected function afterQueueProcess()\n\t{\n\t\t/** @var APNSConnection $apnsConnection */\n\t\t$apnsConnection = $this->connections->apns;\n\n\t\tif ($this->queue->count > 0) {\n\t\t\t$this->log('Queue have been processed.' . $this->queue->count . ' messages.', CLogger::LEVEL_INFO, 'queue');\n\t\t}\n\n\t\tif ($this->isIdling && $apnsConnection->isConnected) {\n\t\t\t$apnsConnection->close();\n\t\t}\n\t}",
"public function locked_out()\n\t{\n\t\t// If invalid_logins is disabled, can't be locked out\n\t\tif($this->_invalid_logins < 1)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$query = $this->db\n\t\t\t->where('ip_address', ip2long($_SERVER['REMOTE_ADDR']))\n\t\t\t->where('success', 0)\n\t\t\t->limit($this->_invalid_logins)\n\t\t\t->order_by('time', 'DESC')\n\t\t\t->get($this->_table['logins']);\n\n\t\tif($query && $query->num_rows() == $this->_invalid_logins)\n\t\t{\n\t\t\t$first = $query->row(0);\n\t\t\t$last = $query->row($this->_invalid_logins - 1);\n\n\t\t\tif($this->timestamp(strtotime($last->time), 'U') - $this->timestamp(strtotime($first->time), 'U') <= ($this->_mins_login_attempts * 60)\n\t\t\t\t&& $this->timestamp(strtotime($last->time), 'U') >= $this->timestamp(strtotime($this->_mins_login_attempts.' minutes ago'), 'U'))\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}",
"function mgm_check_multiple_logins_violation($user, $member, $pack){\r\n\r\n\tglobal $wpdb;\r\n\r\n\t// ip\r\n\r\n\t$ip_address = mgm_get_client_ip_address();\r\n\r\n\t// time period\r\n\r\n\t$time_period = mgm_get_setting('multiple_login_time_span');// 1 HOUR\r\n\r\n\t// datetime\r\n\r\n\t$current_time = strtotime(current_time('mysql', 1));\r\n\r\n\t// last time\r\n\r\n\t$last_time = strtotime('-' . $time_period, $current_time);\r\n\r\n\t// sql\r\n\r\n\t$sql = \"SELECT COUNT(*) AS _C FROM `\". TBL_MGM_MULTIPLE_LOGIN_RECORDS .\"` WHERE 1\r\n\r\n\t AND `user_id`='{$user->ID}' AND `pack_id`='{$member->pack_id}' AND `logout_at` IS NULL\r\n\r\n\t AND `login_at` >= FROM_UNIXTIME({$last_time}) AND `login_at` <= FROM_UNIXTIME({$current_time})\";\r\n\r\n\t// check\r\n\r\n\t$login_count = $wpdb->get_var( $sql );\r\n\r\n\t// check\r\n\r\n\t// mgm_log( $pack, __FUNCTION__);\r\n\r\n\t// check\r\n\r\n\tif( isset($pack['multiple_logins_limit']) && (int)$pack['multiple_logins_limit'] > 0 ){\r\n\r\n\t\tif( $login_count >= (int)$pack['multiple_logins_limit'] ){\r\n\r\n\t\t\treturn true;// error\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t// check\r\n\r\n\t// mgm_log( $wpdb->last_query .' -- LOGIN COUNT: ' . $login_count, __FUNCTION__);\r\n\r\n\r\n\r\n\t// insert only if not done yet\r\n\r\n\t$sql = \"SELECT COUNT(*) AS _C FROM `\". TBL_MGM_MULTIPLE_LOGIN_RECORDS .\"` WHERE \r\n\r\n\t `user_id`='{$user->ID}' AND `pack_id`='{$member->pack_id}' AND `ip_address`='{$ip_address}'\";\r\n\r\n\t$count = $wpdb->get_var( $sql ); \r\n\r\n\t// check\r\n\r\n\t// mgm_log( $wpdb->last_query .' -- PREV RECORD COUNT: ' . $count, __FUNCTION__);\r\n\r\n\t// record\t\r\n\r\n\tif( $count == 0 ){// first\r\n\r\n\t\t$sql= \"INSERT INTO `\". TBL_MGM_MULTIPLE_LOGIN_RECORDS .\"` SET `user_id`='{$user->ID}',\r\n\r\n\t\t `pack_id`='{$member->pack_id}',`ip_address`='{$ip_address}',`login_at`=NOW(),\r\n\r\n\t\t `logout_at`=NULL\";\r\n\r\n\t}else{// next\r\n\r\n\t\t$sql= \"UPDATE `\". TBL_MGM_MULTIPLE_LOGIN_RECORDS .\"` SET `login_at`=NOW(),\r\n\r\n\t\t `logout_at`=NULL WHERE `user_id`='{$user->ID}' AND `pack_id`='{$member->pack_id}' \r\n\r\n\t\t AND `ip_address`='{$ip_address}'\";\r\n\r\n\t}\r\n\r\n\r\n\r\n\t// execute\r\n\r\n\t$wpdb->query($sql);\t\r\n\r\n\r\n\r\n\t// check\r\n\r\n\t// mgm_log( $wpdb->last_query, __FUNCTION__);\r\n\r\n\r\n\r\n\t// return \r\n\r\n\treturn false;\r\n\r\n}",
"public function logoutAll(int $uid):bool;",
"public function processLogout();",
"function stopMasquerade() {\n if (isset($_SESSION['masq'])) {\n unset($_SESSION['userID']);\n unset($_SESSION['accessLevel']);\n unset($_SESSION['newUser']);\n if (isset($_SESSION['masq']['savedPreviousUser'])) {\n $_SESSION['userID'] = $_SESSION['masq']['userID'];\n $_SESSION['accessLevel'] = $_SESSION['masq']['accessLevel'];\n $_SESSION['newUser'] = $_SESSION['masq']['newUser'];\n }\n unset($_SESSION['masq']);\n }\n}",
"function handle_logins()\n{\n if (get_param_integer('httpauth', 0) == 1) {\n require_code('users_inactive_occasionals');\n force_httpauth();\n }\n $username = trim(post_param_string('login_username', ''));\n if (($username != '') && ($username != do_lang('GUEST'))) {\n require_code('users_active_actions');\n handle_active_login($username);\n }\n\n // If it was a log out\n $page = get_param_string('page', ''); // Not get_page_name for bootstrap order reasons\n if (($page == 'login') && (get_param_string('type', '', true) == 'logout')) {\n require_code('users_active_actions');\n handle_active_logout();\n }\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
replace closing with the closing option tag | public function end_el(&$output, $item, $depth = 0, $args = array()) {
$output .= "</option>\n";
} | [
"public function end_el(&$output, $item, $depth){\n $output .= \"</option>\\n\";\n }",
"function Coption(){\r\n \r\n print('</option>');\r\n \r\n }",
"public function end_el(&$output, $item, $depth = 0, $args = array()){\n $output .= \"</option>\\n\";\n }",
"private function SelectClose( $tag )\r\n\t{\r\n\t\t$this->appendHTML( \" </select>\" );\r\n\t\t$this->appendBreak( $tag );\r\n\t}",
"public function selectEnd() {\r\n return '</select>';\r\n }",
"public static function renderOptionGroupClose(){\n\t\tself::out(\n\t\t\tself::closeTag('optgroup')\n\t\t);\n\t}",
"public function end_widget_options() {\n\t\t?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}",
"protected function endOptgroup()\n {\n $this->html .= $this->indent(1, \"</optgroup>\");\n $this->optlevel -= 1;\n }",
"public function GetTagName() {\n\t\treturn 'option';\n\t}",
"function optionElements(array $options)\n{\n $options = array(''=>'') + $options;\n $out = \"\\n\";\n foreach($options as $key=>$value)\n {\n $out .= \"<option value='$key'>$value</option>\\n\";\n }\n return $out;\n}",
"function cw_wpcf7_form_elements($html) {\r\n\t$text = 'Select One';\r\n\t$html = str_replace('<option value=\"\">---</option>', '<option value=\"\">' . $text . '</option>', $html);\r\n\treturn $html;\r\n}",
"function select_option($title, $extra, $tabs = 0)\n{\n start_tag('option', Tab($tabs), false, $extra) ;\n echo $title ;\n close_tag('option', '', true) ;\n}",
"public function getFinishDropdown()\n {\n return '</ul></li>';\n }",
"function my_dropdown_variation_attribute_options_html($html, $args){\n $html = str_replace('Velg en', 'Velg', $html);\n return $html;\n }",
"private function getOptionsHTML()\n\t\t{\n\t\t\t$index = 0;\n\t\t\t$optionsDelimiter = OPTIONS_DELIMITER; // Absurd to have to do this, but heredoc won't interpret a constant.\n\t\t\t$optionsHTML = '';\n\t\t\tforeach ($this->Options as $key => $value)\n\t\t\t{\n\t\t\t\t$optionName = $this->ChoiceKey . INPUT_DELIMITER . OPTION_PREFIX . ++$index;\n\t\t\t\t$optionChecked = $value === true ? 'checked' : '';\n\t\t\t\t$optionsHTML .= \n<<<_HEREDOC\n\t\t\t\t\t\t\t<input type=\"checkbox\" form=\"menu_cart\" name=\"$optionName\" value=\"$key\" $optionChecked/>$key$optionsDelimiter\n\n_HEREDOC;\n\t\t\t}\n\t\t\treturn substr($optionsHTML, 0, strrpos($optionsHTML, OPTIONS_DELIMITER)); // Remove the last options delimiter.\n\t\t}",
"protected function render_inner_html_for_select()\n\t{\n\t\t#\n\t\t# get the name and selected value for our children\n\t\t#\n\n\t\t$selected = $this['value'];\n\n\t\tif ($selected === null)\n\t\t{\n\t\t\t$selected = $this[self::DEFAULT_VALUE];\n\t\t}\n\n\t\t#\n\t\t# this is the 'template' child\n\t\t#\n\n\t\t$dummy_option = new Element('option');\n\n\t\t#\n\t\t# create the inner content of our element\n\t\t#\n\n\t\t$html = '';\n\n\t\t$options = $this[self::OPTIONS] ?: [];\n\t\t$disabled = $this[self::OPTIONS_DISABLED];\n\n\t\tforeach ($options as $value => $label)\n\t\t{\n\t\t\tif ($label instanceof self)\n\t\t\t{\n\t\t\t\t$option = $label;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$option = $dummy_option;\n\n\t\t\t\tif ($label || is_numeric($label))\n\t\t\t\t{\n\t\t\t\t\t$label = escape($label);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$label = ' ';\n\t\t\t\t}\n\n\t\t\t\t$option->inner_html = $label;\n\t\t\t}\n\n\t\t\t#\n\t\t\t# value is casted to a string so that we can handle null value and compare '0' with 0\n\t\t\t#\n\n\t\t\t$option['value'] = $value;\n\t\t\t$option['selected'] = (string) $value === (string) $selected;\n\t\t\t$option['disabled'] = !empty($disabled[$value]);\n\n\t\t\t$html .= $option;\n\t\t}\n\n\t\treturn $html;\n\t}",
"Protected Function renderOptionTags($options, $nestingLevel = 1) {\n\t\t$content = '';\n\t\tForEach ($options As $option) {\n\t\t\tIf ($option['_isRoot']) {\n\t\t\t\t$content .= '<optgroup label=\"' . htmlspecialchars($option['name']) . '\">' . chr(10);\n\t\t\t\t$content .= $this->renderOptionTags($option['_children'], $nestingLevel + 1);\n\t\t\t\t$content .= '</optgroup>';\n\t\t\t} Else {\n\t\t\t\t$isSelected = $this->isSelected($option['uid']);\n\t\t\t\t$indent = ($nestingLevel - 1) * 20;\n\t\t\t\t$style = 'padding-left: ' . $indent . 'px;';\n\t\t\t\t$content .= '<option style=\"' . $style . '\" value=\"' . $option['uid'] . '\" ' . ($isSelected ? 'selected=\"selected\"' : '') . '>' . htmlspecialchars($option['name']) . '</option>' . chr(10);\n\t\t\t\t$content .= $this->renderOptionTags($option['_children'], $nestingLevel + 1);\n\t\t\t}\n\t\t}\n\t\tReturn $content;\n\t}",
"private function renderOptions(): string\n {\n $str = '';\n if ($this->defaultText !== false) {\n $option = new OptionElement();\n $option->text = $this->defaultText;\n $option->value = $this->defaultValue;\n $str .= $option->render();\n }\n foreach ($this->arrOption as $option) {\n $this->setAutoOptionTitle($option);\n $str .= $option->render();\n }\n\n return $str;\n }",
"protected function optionsToString(){\n\t\t$html = '';\n\t\t$selected = $this->getValue();\n\n\t\tforeach($this->options as $value => $label){\n\t\t\t$html .= \"<option value='{$value}' \". (($value == $selected && $selected !== null) ? \"selected='selected'\" :\"\" ) .\">{$label}</option>\\n\";\n\t\t}\n\n\t\treturn $html;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the [oedtnssalesacct] column value. | public function getOedtnssalesacct()
{
return $this->oedtnssalesacct;
} | [
"public function setOedhnssalesacct($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->oedhnssalesacct !== $v) {\n $this->oedhnssalesacct = $v;\n $this->modifiedColumns[SalesHistoryDetailTableMap::COL_OEDHNSSALESACCT] = true;\n }\n\n return $this;\n }",
"public function getEmpleadoNss()\n {\n\n return $this->empleado_nss;\n }",
"public function getOedhacct()\n {\n return $this->oedhacct;\n }",
"public function getArcdsalesamt()\n {\n return $this->arcdsalesamt;\n }",
"public function getAccNo()\n {\n return $this->acc_no;\n }",
"public function getCostOfSaleAccount()\n {\n return $this->costOfSaleAccount;\n }",
"public function getSextarazonbecauser()\n\t{\n\t\treturn $this->sextarazonbecauser;\n\t}",
"protected function getAccessLevelAsText()\n {\n if (\\XLite\\Core\\Auth::getInstance()->getAdminAccessLevel() <= $this->getModelObject()->getAccessLevel()) {\n $label = static::t('Administrator');\n\n } elseif ($this->getModelObject()->getAnonymous()) {\n $sameProfile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')\n ->findUserWithSameLogin($this->getModelObject());\n if ($sameProfile) {\n $label = static::t(\n 'Anonymous Customer, _Registered User with the same email_',\n [\n 'URL' => static::buildURL('profile', '', ['profile_id' => $sameProfile->getProfileId()]),\n ]\n );\n\n } else {\n $label = static::t('Anonymous Customer');\n }\n\n } else {\n $sameProfile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->findOneBy([\n 'login' => $this->getModelObject()->getLogin(),\n 'order' => null,\n 'anonymous' => true,\n ]);\n if ($sameProfile) {\n $label = static::t(\n 'Registered Customer, _Anonymous Customer with the same email_',\n [\n 'URL' => static::buildURL('profile', '', ['profile_id' => $sameProfile->getProfileId()]),\n ]\n );\n\n } else {\n $label = static::t('Registered Customer');\n }\n }\n\n return $label;\n }",
"public function getOehdcrntuser()\n {\n return $this->oehdcrntuser;\n }",
"public function getAmountAuthorized()\n {\n $amountAuthorized = $this->data->xpath($this->namespace . '/ns2:amountAuthorized');\n\n return isset($amountAuthorized[0])\n ? (string) $amountAuthorized[0]\n : null;\n }",
"public function getNtsActivo()\n\t{\n\t\treturn $this -> nts_activo;\n\t}",
"public function getCtrUsuario()\n {\n return $this->ctrUsuario;\n }",
"public function getAccountNo()\n {\n return $this->accountNo;\n }",
"public function getStrAccount()\n {\n return $this->get(self::STRACCOUNT);\n }",
"public function getStUsuario()\n\t{\n\t\treturn $this->st_usuario;\n\t}",
"public function getGlmaclosacct()\n {\n return $this->glmaclosacct;\n }",
"public function __getLoggedInAccount() {\n return $this->getValue(\"loggedInAccount\");\n }",
"function getNSU_Bd() {\r\n\r\n\tglobal $db_nfe;\r\n\t$max = $db_nfe->lookup(\"select count(id_nfesyslog_entrada_lista) from t_nfesyslog_entrada_lista where nsu is not null\");\r\n\t\r\n\tif ($max[0][0]==0) {\r\n\t\t$nsu = \"0\";\r\n\t} else {\r\n\t\t$dtnsu = $db_nfe->lookup(\"select nsu from t_nfesyslog_entrada_lista order by data_autorizacao desc limit 0,1\");\r\n\t\t$nsu = $dtnsu[0][0];\r\n\t}\r\n\treturn $nsu;\r\n}",
"public function getOetbconfautogetcust()\n {\n return $this->oetbconfautogetcust;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
JSON Schema for the headers | public function getHeadersSchema()
{
return $this->getSchema($this->getHeaders());
} | [
"public function getHeadersSchema(): ?\\stdClass;",
"private function json_headers() {\n header('Content-Type: application/json; charset=utf-8');\n }",
"public function cleanHeaders()\n {\n parent::cleanHeaders();\n $this->addHeader('Content-Type', 'application/json'); //JSON by default\n }",
"public function processHeader()\n {\n $header = $this->resource->header();\n if (property_exists($header, 'taxonomy') && !is_null($header->taxonomy)) {\n foreach ($header->taxonomy as $key => $value) {\n if (!is_array($value)) {\n $header->taxonomy[$key] = array(is_string($value) ? $value : json_encode($value));\n } else {\n $header->taxonomy[$key] = array_map(function ($e) {\n return is_string($e) ? $e : json_encode($e);\n }, $header->taxonomy[$key]);\n }\n }\n }\n\n return $header;\n }",
"public function getHeadersJson()\n {\n if (count($this->getHeaders()) <= 0) {\n return \"{}\";\n }\n return json_encode($this->getHeaders(), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP);\n }",
"private function constructHeaders()\n\t{\n\t\treturn [\n\t\t\t'Content-Type: application/json',\n\t\t\t'Cache-Control: no-cache',\n\t\t\t'Authorization: Bearer ' . $this->apiKey\n\t\t];\n\t}",
"public function getAmfHeaders();",
"private function constructHeaders()\n\t{\n\t\treturn [\n\t\t\t'Content-Type: application/json',\n\t\t\t'Authorization: '.$this->access_token,\n\t\t];\n\t}",
"function getBodySchema()\r\n {\r\n }",
"public function getHeaders(): array;",
"protected function getHeaderFields(): array\n {\n return array_merge($this->getAuthTokenHeaders(), ['Accept' => 'application/json']);\n }",
"public function getHeaders()\n {\n }",
"public function getHeaders(){\n\t\treturn array(\n\t\t\t'Content-Type' => 'text/javascript; charset=UTF-8',\n\t\t);\n\t}",
"public function getHeaders() {\n }",
"private static function curl_headers()\n {\n return [\n 'Content-type: application/json',\n 'Authorization: Bearer '.Auth::user()->token,\n ];\n }",
"public function formatHeaders()\n\t{\n\t\t$headers = array();\n\n\t\tforeach ($this->headers as $key => $val) {\n\t\t\tif (is_string($key)) {\n\t\t\t\t$headers[] = $key . ': ' . $val;\n\t\t\t} else {\n\t\t\t\t$headers[] = $val;\n\t\t\t}\n\t\t}\n\n\t\treturn $headers;\n\t}",
"static function parse_head($head, $clean_up = true)\n\t{\n\t\t$headers = array();\n\t\tforeach( explode(\"\\n\", $head) as $header_line )\n\t\t{\n\t\t\tlist($name, $value) = explode(': ', $header_line, 2);\n\t\t\tif ($clean_up)\n\t\t\t{\n\t\t\t\t$name = strtolower(trim($name));\n\t\t\t\t$value = trim($value);\n\t\t\t}\n\t\t\t\n\t\t\tif ( !array_key_exists($name, $headers) )\n\t\t\t\t$headers[$name] = $value;\n\t\t\telse\n\t\t\t\tif (is_array($headers[$name]))\n\t\t\t\t\tarray_push($headers[$name], $value);\n\t\t\t\telse\n\t\t\t\t\t$headers[$name] = array($headers[$name], $value);\n\t\t}\n\t\t\n\t\treturn $headers;\n\t}",
"function getHeaders() {\n return $this->getFieldValue('headers');\n }",
"private function buildHeaders(){\n\n return [\n 'Authorization' => 'Bearer '.$this->getAuthenticator()->createToken(),\n 'Accept' => 'application/json',\n 'Content-type' => 'application/json',\n 'User-agent' => 'NOTIFY-API-PHP-CLIENT/'.self::VERSION\n ];\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes events and performances by date | public function deleteEventsCommand(
$dryRun = true,
$period = 'pastOnly',
$date = '',
$storagePageIds = '',
$limit = 1000
) {
$settings = $this->createSettings($period, $date, $storagePageIds, $limit);
$eventDemand = $this->eventDemandFactory->createFromSettings($settings);
$events = $this->eventRepository->findDemanded($eventDemand);
$performanceDemand = $this->performanceDemandFactory->createFromSettings($settings);
$performances = $this->performanceRepository->findDemanded($performanceDemand);
$deletedPerformances = count($performances);
$output = 'Found ' . $deletedPerformances . ' performance in ' . count($events) . ' events.';
if (!$dryRun) {
$output = 'Deleted ' . $deletedPerformances . ' performances';
foreach ($performances as $performance) {
$this->performanceRepository->remove($performance);
}
$deletedEvents = 0;
$keptEvents = 0;
/** @var Event $event */
foreach ($events as $event) {
$localPerformances = $event->getPerformances();
if (count($localPerformances)) {
$keptEvents++;
continue;
}
$deletedEvents++;
$this->eventRepository->remove($event);
}
$output .= ' and ' . $deletedEvents . ' events. ';
if ($keptEvents > 0) {
$output .= $keptEvents . 'events where not deleted because they contain other performances.';
}
}
$this->outputLine($output);
} | [
"function delete($date) {\n // PARAM $date : date\n \n $sql = \"DELETE FROM `events` WHERE `date`=?\";\n return $this->exec($sql, [$date]);\n }",
"public static function deleteOldEvents() {\n $dateRange = Yii::app()->settings->eventDeletionTime;\n if (!empty($dateRange)) {\n $dateRange = $dateRange * 24 * 60 * 60;\n $deletionTypes = json_decode(Yii::app()->settings->eventDeletionTypes, true);\n if (!empty($deletionTypes)) {\n $deletionTypes = \"('\" . implode(\"','\", $deletionTypes) . \"')\";\n $time = time() - $dateRange;\n X2Model::model('Events')->deleteAll(\n 'lastUpdated < ' . $time . ' AND type IN ' . $deletionTypes);\n }\n }\n }",
"public function deleteOldData(){\n\n exit;\n $db = $this->mongo_db->customQuery();\n $startTime = $this->mongo_db->converToMongodttime(date('Y-m-d H:i:s', strtotime('-2 month')));\n\n $whereDelete['created_date'] = ['$lte' => $startTime ];\n\n $db->user_analysis_chart_data->deleteMany($whereDelete);\n $db->daily_investment_chart_data->deleteMany($whereDelete);\n\n echo \"<br> Deleted Successfully!!!\"; \n }",
"public function removeFor($key, \\DateTime $date);",
"public function delete() {\n $events = $this->getEventsCreatedHere(); # we will need to write this method\n foreach ($events as $record) {\n $record->delete();\n }\n\n # delete the calendar_has_event records\n $has_events = $this->getCalendarHasEvents();\n foreach ($has_events as $record) {\n $record->delete();\n }\n\n # delete the user_has_permission records\n $permissions = $this->getAllPermissions();\n foreach ($permissions as $record) {\n $record->delete();\n }\n\n # delete the subscriptions on the calendar\n $subscriptions = $this->getSubscriptions();\n foreach ($subscriptions as $record) {\n $record->delete();\n }\n\n # delete the subscription_has_calendar records (remove calendar from subscriptions that subscribe to it)\n $subscriptions = $this->getSubscriptionHasCalendarRecords();\n foreach ($subscriptions as $record) {\n $record->delete();\n }\n\n return parent::delete();\n }",
"public function removeAllEvents() {\n // QueryBuilder seems to ignore the cascade on delete specifications and fails with constraint checks,\n // if we just delete events here. As a workaround we will manually do the cascade stuff by deleting\n // referenced event details and packets first.\n $this->assureAllowed('delete', 'events');\n $qb = $this->getEntityManager()->createQueryBuilder();\n $qb->delete('HoneySens\\app\\models\\entities\\EventDetail', 'ed');\n $qb->getQuery()->execute();\n $qb->delete('HoneySens\\app\\models\\entities\\EventPacket', 'ep');\n $qb->getQuery()->execute();\n $qb->delete('HoneySens\\app\\models\\entities\\Event', 'e');\n $qb->getQuery()->execute();\n }",
"public function removeOldEvents() {\n\t\t$loc = __CLASS__ . \"::\" . __FUNCTION__;\n\t\t\n\t\t$history_retention = esc_attr( get_option( TennisEvents::OPTION_HISTORY_RETENTION, TennisEvents::OPTION_HISTORY_RETENTION_DEFAULT ));\n\t\t$currentYear = date('Y');\n\t\t$cutoff = $currentYear - $history_retention + 1;\n\t\terror_log( sprintf(\"%s -> cutoff year is %d \", $loc, $cutoff ) );\n\t\t$numDeleted = 0;\n\n\t\t$args = array( \"post_type\" => TennisEventCpt::CUSTOM_POST_TYPE\n\t\t\t\t\t, \"meta_key\" => TennisEventCpt::START_DATE_META_KEY\n\t\t\t\t\t, \"orderby\" => \"meta_value\"\n\t\t\t\t\t, \"order\" => \"ASC\" \n\t\t\t\t\t, \"meta_query\" => array( \"relation\" => \"AND\"\n\t\t\t\t\t\t\t// ,array(\n\t\t\t\t\t\t\t// \t'key' => TennisEventCpt::PARENT_EVENT_META_KEY\n\t\t\t\t\t\t\t// \t,'compare' => 'NOT EXISTS'\n\t\t\t\t\t\t\t// )\n\t\t\t\t\t\t\t,array(\n\t\t\t\t\t\t\t\t'key' => TennisEventCpt::TENNIS_SEASON\n\t\t\t\t\t\t\t\t,'value' => $cutoff\n\t\t\t\t\t\t\t\t,'compare' => '<='\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_type' => self::CUSTOM_POST_TYPE,\n\t\t\t\t\t\t'suppress_filters' => true\n\t\t);\n\t\t$myQuery = new \\WP_Query( $args );\n\t\t//Loop\n\t\tif( $myQuery->have_posts() ) {\n\t\t\twhile( $myQuery->have_posts() ) { \n\t\t\t\t$myQuery->the_post(); \n\t\t\t\t$post_id = get_the_ID();\n\t\t\t\t$startDate = get_post_meta( get_the_ID(), TennisEventCpt::START_DATE_META_KEY, true );\n\t\t\t\t$season = get_post_meta( get_the_ID(), TennisEventCpt::TENNIS_SEASON, true );\n\t\t\t\t$title = the_title();\n\t\t\t\t$this->log->error_log(\"$loc --> deleting old post '$title'($post_id). Start date=$startDate and Season=$season\");\n\t\t\t\twp_delete_post(get_the_ID(), true);\n\t\t\t\t++$numDeleted;\n\t\t\t}\n\t\t}\n\t\t$this->log->error_log( sprintf(\"%s -> %d old event(s) deleted\", $loc, $numDeleted ) );\n\t}",
"function deleteEventForSeminar($course_id, $resource_id, $date_id) {\n\n\n\n $event_data = OCModel::checkScheduled($course_id, $resource_id, $date_id);\n $event = $event_data[0];\n\n $rest_end_point = \"/recordings/\".$event['event_id'];\n $uri = $rest_end_point;\n\n // setting up a curl-handler\n curl_setopt($this->ochandler,CURLOPT_URL,$this->matterhorn_base_url.$uri);\n curl_setopt($this->ochandler,CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\n $response = curl_exec($this->ochandler);\n $httpCode = curl_getinfo($this->ochandler, CURLINFO_HTTP_CODE);\n\n\n if ($httpCode == 200){\n $event_id = $event['event_id'];\n OCModel::unscheduleRecording($event_id);\n\n return true;\n } else {\n return false;\n }\n }",
"function deleteEventForSeminar($course_id, $resource_id, $date_id)\n {\n $event_data = OCModel::checkScheduled($course_id, $resource_id, $date_id);\n $event = $event_data[0];\n\n $rest_end_point = \"/api/events/\" . $event['event_id'];\n $uri = $rest_end_point;\n\n // setting up a curl-handler\n $location = parse_url($this->matterhorn_base_url);\n\n curl_setopt($this->ochandler, CURLOPT_URL, $location['scheme'] .'://'. $location['host'] . $uri);\n curl_setopt($this->ochandler, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\n //TODO Über REST Klasse laufen lassen, getXML, getJSON...\n\n $response = curl_exec($this->ochandler);\n $httpCode = curl_getinfo($this->ochandler, CURLINFO_HTTP_CODE);\n\n // remove scheduled event from studip even though it isn't available on opencast\n if ($httpCode == 200 || $httpCode == 204 || $httpCode == 404) {\n $event_id = $event['event_id'];\n OCModel::unscheduleRecording($event_id);\n\n return true;\n } else {\n return false;\n }\n }",
"function deleteEvent($day, $month, $year, $time, $buffertime, $userID){\n\tfoundAppointment($day, $month, $year, $userID);\n\t\t$q = \"DELETE FROM `UCPM_appointments` WHERE (TIME(starttime) > '$time') AND (TIME(starttime) < '$buffertime') AND (DATE(starttime) = '$year-$month-$day') AND (userID='$userID') \";\n\t$result = mysql_query($q) or die(mysql_error());\n\tcheckDeleted($day, $month, $year, $userID);\n\n}",
"private function addPerformanceDelete($start, $end, $event_nid) {\n\n\t$startdate = new \\DateTime(format_date(strtotime($start), 'custom', 'Y-m-d'));\n\t$enddate = new \\DateTime(format_date(strtotime($end), 'custom', 'Y-m-d'));\t\n\t// Query for performances for this event, in date range\n\t$query = \\Drupal::entityQuery('performances');\n\t$query->condition('type', 'performance');\n\t$query->condition('field_event.target_id', $event_nid, '=');\n\t$query->condition('field_perf_date.value', [$startdate->format(DATETIME_DATETIME_STORAGE_FORMAT), $enddate->format(DATETIME_DATETIME_STORAGE_FORMAT)], 'BETWEEN');\n\n\t$entity_ids = $query->execute();\n\n\t// Check there are results\n\tif ($entity_ids) {\n\t $delete_count = 0;\n\t foreach ($entity_ids as $id) {\n\t\t$controller = \\Drupal::entityManager()->getStorage('performances');\n\t\t$entities = $controller->loadMultiple([$id]);\n\t\t$controller->delete($entities);\n\t\t$delete_count++;\n\t }\n\t drupal_set_message(t(':count performances have been deleted.', array(':count' => $delete_count)));\n\t} else {\n\t drupal_set_message(t('There are no matching performances in this date range!'), 'status');\n\t}\n }",
"function delete(){\r\n\t\tglobal $wpdb;\r\n\t\tif( $this->is_recurring() ){\r\n\t\t\t//Delete the recurrences then this recurrence event\r\n\t\t\t$this->delete_events();\r\n\t\t}\r\n\t\t$result = $wpdb->query ( $wpdb->prepare(\"DELETE FROM \". $wpdb->prefix . EM_EVENTS_TABLE .\" WHERE event_id=%d\", $this->id) );\r\n\t\tif($result !== false){\r\n\t\t\t$bookings_result = $this->get_bookings()->delete();\r\n\t\t}\r\n\t}",
"function delete_all_past_events() {\n$hl_ID=-1;\n$workdays_ID=-1;\n$rec=SQLSelectOne('select ID from calendar_categories where holidays=1');\nif ($rec) \n $hl_ID=$rec['ID'];\n\n$rec=SQLSelectOne('select ID from calendar_categories where workdays=1');\nif ($rec) \n $workdays_ID=$rec['ID'];\n\n SQLExec(\"DELETE FROM calendar_events WHERE CALENDAR_CATEGORY_ID<>\".$hl_ID.\" AND CALENDAR_CATEGORY_ID<>\".$workdays_ID.\" AND IS_TASK=0 and IS_REPEATING=0 and (TO_DAYS(NOW())-TO_DAYS(DUE))>1\");\n }",
"public function deleteSportEvent()\n {\n }",
"public function purge_data() {\n\n global $wpdb;\n\n $wpdb->query( \"DELETE FROM {$wpdb->prefix}popularpostssummary WHERE view_date < DATE_SUB('\" . WPP_Helper::curdate() . \"', INTERVAL {$this->options['tools']['log']['expires_after']} DAY);\" );\n\n }",
"public function delete_history_before( $date ) {\n \tglobal $wpdb;\n \t$query = sprintf( 'DELETE q,r FROM %s q INNER JOIN %s r ON q.slp_repq_id = r.slp_repq_id ' , $this->table[ 'query' ] , $this->table['results'] ) .\n\t 'WHERE slp_repq_time < %s';\n \t$prepped_query = $wpdb->prepare( $query , array( $date ) );\n \treturn $wpdb->query( $prepped_query );\n\n }",
"public function deleteInDates(int $room_id, array $dates);",
"public function delete() {\n\t\t$this->validate_csrf_token();\n\n\t\t$this->sql->SQLQueryString = 'DELETE FROM cs_calendar\n\t\t\tWHERE calendar_id = '\n\t\t\t. $this->sql->Escape(__FILE__, __LINE__, $this->data['calendar_id']);\n\n\t\t$this->sql->RunQuery(__FILE__, __LINE__);\n\n\t\t$this->flush_cache();\n\t}",
"public function purgeRecords(DateTimeInterface $date): bool{\n\t\treturn $this->wpdb->query(\n\t\t\t$this->wpdb->prepare(\n\t\t\t\t<<<SQL\n\t\t\t\tDELETE FROM {$this->wpdb->prefix}traffic_records WHERE time<%s;\nSQL\n\t\t\t, $date->format(self::DATE_FORMAT))\n\t\t);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specify the HomePathProvider that provides the path to the global pantr directory. | public static function setHomePathProvider(HomePathProvider $p) {
self::$homePathProvider = $p;
} | [
"public function setHome()\n {\n if($this->os == 'win')\n {\n $this->home = $this->temp;\n }\n else\n {\n $this->home = getenv('HOME') . DS;\n }\n }",
"public function getUserHomePath();",
"private function autodetect_home() {\n\t\tif ($this->home !== null)\n\t\t\treturn;\n\t\tif (php_sapi_name() == 'cli')\n\t\t\treturn $this->home = '/';\n\t\t$home = dirname($_SERVER['SCRIPT_NAME']);\n\t\t$home = !$home || $home[0] != '/'\n\t\t\t? '/' : rtrim($home, '/') . '/';\n\t\t$this->home = $home;\n\t}",
"public function getUserHomePath()\n {\n return $this->serverBag->get('HOME');\n }",
"function home_data_path($path = ''): string\n{\n return (new Xdg())->getHomeDataDir().\n DIRECTORY_SEPARATOR.config('app.name').\n ($path ? DIRECTORY_SEPARATOR.$path : $path);\n}",
"function expandHomeDirectory($path)\n{\n $homeDirectory = getenv('HOME');\n if (empty($homeDirectory)) {\n $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\n }\n\t//echo \"homedir=\".$homeDirectory;\n return str_replace('~', realpath($homeDirectory), $path);\n}",
"protected function exportHome()\n {\n if (config('karl.auth.page_home.make_page') == true) {\n foreach ($this->homes as $key => $value) {\n if (file_exists($home = $this->getViewPath($value)) && ! $this->option('force')) {\n if (! $this->confirm(\"The [{$value}] home already exists. Do you want to replace it?\")) {\n return;\n }\n }\n }\n\n $stubView = $this->compileStub(__DIR__.'/stubs/views/'.$key);\n\n $this->files->put($home, $stubView);\n }\n }",
"private function getPublicPath($path=null){\n return sprintf(\"%s/%s/\", public_path(), strtolower(config('newportal.portlets.namespace'))).$path;\n }",
"function supplang_home_url( $path = '' ) {\n\t$home_url = home_url( $path );\n\treturn $home_url . ( strpos( $home_url, '?' ) ? '&' : '?' ) . SUPPLANG_GET_PARAM . '=' . supplang_slug_from_locale();\n}",
"function getHomePagePath(){\n\t\t$path = dirname($_SERVER[\"REQUEST_URI\"]);\n\t\treturn \"$path\";\n\t}",
"public function homeLink()\n\t{\n\t\treturn HTML_PATH_ROOT;\n\t}",
"public function pathProvider()\n {\n return [\n ['/absolute-path'],\n ['/long/absolute-path'],\n ['relative-path']\n ];\n }",
"function expandHomeDirectory($path) {\r\n $homeDirectory = getenv('HOME');\r\n if (empty($homeDirectory)) {\r\n $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\r\n }\r\n return str_replace('~', realpath($homeDirectory), $path);\r\n}",
"function expandHomeDirectory($path) {\r\n $homeDirectory = getenv('HOME');\r\n if (empty($homeDirectory)) {\r\n $homeDirectory = getenv(\"HOMEDRIVE\") . getenv(\"HOMEPATH\");\r\n }\r\n return str_replace('~', realpath($homeDirectory), $path);\r\n}",
"public static function getPresenterDirectory()\n\t{\n\t\treturn app_path('Http/Presenters/');\n\t}",
"function expandHomeDirectory($path) {\n\t $homeDirectory = getenv('HOME');\n\t if (empty($homeDirectory)) {\n\t $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\n\t }\n\t return str_replace('~', realpath($homeDirectory), $path);\n\t}",
"protected function setBasePath()\n {\n $this->basePath = (PHP_SAPI === 'cli') ? $_SERVER['PWD'] . DIRECTORY_SEPARATOR : str_replace('/public', '', $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR);\n }",
"function expandHomeDirectory(string $path): string {\r\n $homeDirectory = getenv('HOME');\r\n if (empty($homeDirectory)) {\r\n $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\r\n }\r\n return str_replace('~', realpath($homeDirectory), $path);\r\n}",
"public function setRootPath(string $path);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds a full qualified class name based on the current bundle and controller name, for a given sub$directory and $suffix | public function getGuessedClassName($class, $directory, $suffix = "")
{
$regex = '/(.*)\\\Controller\\\(.+)Controller/';
if (!preg_match($regex, $class, $matches)) {
throw new HolyCrudGeneratorException('This controller has a non-standard name or namespace. The
autoguesser features are not available');
}
return "$matches[1]\\$directory\\$matches[2]$suffix";
} | [
"public function buildControllerNamespace()\n {\n $fs = '/';\n $bs = '\\\\';\n $namespace = '';\n $prefix = $this->getParams('prefix');\n $controller = $this->getParams('controller');\n $controller = ucfirst($controller . Controller::CONTROLLER_SUFFIX);\n\n // check prefix\n if (!empty($prefix)) {\n if (strpos($prefix, $fs) !== false) {\n $namespace .= implode($bs, array_map('ucfirst', explode($fs, $prefix))) . $bs;\n } else {\n $namespace .= ucfirst($prefix) . $bs;\n }\n }\n\n $namespace .= $controller;\n return Controller::NAMESPACE_PREFIX . $bs . $namespace;\n }",
"protected function getSuffixClass()\r\n {\r\n return \"suffix \" . $this->currObj->getClass(null);\r\n }",
"protected function formulateName()\n {\n $classTokens = explode('\\\\', get_class($this));\n $bundleName = array_shift($classTokens);\n $className = array_pop($classTokens);\n $prefix = strtolower(str_replace('Bundle', '', $bundleName));\n $command = strtolower(str_replace('Command', '', $className)); \n\n return \"{$prefix}:{$command}\";\n }",
"private static function getMainClassName($prefix)\n\t{\n\t\t$parts = explode('_', $prefix);\n\t\t$parts = explode('-', $parts[1]);\n\n\t\t$className = '';\n\t\tforeach($parts as $part){\n\t\t\t$className .= ucfirst($part);\n\t\t}\n\n\t\t$className .= 'ExternalModule';\n\n\t\treturn $className;\n\t}",
"public static function className($package, $name, $suffix = \"\")\n {\n $appClass = new \\ReflectionClass(get_called_class());\n $appNs = $appClass->getNamespaceName();\n\n $class = $appNs . \"\\\\\" . $package . \"\\\\\" . ucfirst($name) . $suffix;\n return $class;\n }",
"function createClassFilePath($class_name, $class_prefix, $base_directory) {\r\n $prefix_length = strlen($class_prefix);\r\n\r\n // Returning false if prefix is not discovered.\r\n if(strncmp($class_name, $class_prefix, $prefix_length) !== 0) return false;\r\n\r\n // Removing prefix\r\n $prefix_removed = substr($class_name, $prefix_length);\r\n\r\n // Formatting class filename.\r\n return replaceDS(\"{$base_directory}/{$prefix_removed}.php\");\r\n}",
"static function nameFrom($class) {\n if (\\ends_with($class, $suffix = '_Controller')) {\n $class = substr($class, 0, -1 * strlen($suffix));\n }\n\n return strtolower(str_replace('_', '.', \\class_basename($class)));\n }",
"private function class_from()\n\t\t{\n\t\t$args = func_get_args();\n\t\t$end = implode(\"\\\\\", array_map('_to_camel', $args));\n\t\treturn ($this->parent ? $this->parent->class : '')\n\t\t. ($this->name ? '\\\\' : '')\n\t\t. $end;\n\t\t}",
"function class_basename($class)\r\n {\r\n $class = is_object($class) ? get_class($class) : $class;\r\n\r\n return basename(str_replace('\\\\', '/', $class));\r\n }",
"public function buildControllerNamespace();",
"function class_basename($class)\n{\n\tif (is_object($class)) $class = get_class($class);\n\n\treturn basename(str_replace('\\\\', '/', $class));\n}",
"function class_basename($class)\n {\n $class = is_object($class) ? get_class($class) : $class;\n return basename(str_replace('\\\\', '/', $class));\n }",
"function class_basename($class)\n\t{\n\t\t$class = is_object($class) ? get_class($class) : $class;\n\t\treturn basename(str_replace('\\\\', '/', $class));\n\t}",
"public function parentSubDirAndSuffix()\n {\n $finder = new ClassFinder;\n $finder->setRootDirectory(__DIR__ . '/Fixtures/Bundle');\n $finder->setRootNamespace(__NAMESPACE__ . '\\\\Fixtures\\\\Bundle');\n $this->assertSameArrayContents([\n 'Darsyn\\\\ClassFinder\\\\Tests\\\\Fixtures\\\\Bundle\\\\Controllers\\\\SecondaryController',\n 'Darsyn\\\\ClassFinder\\\\Tests\\\\Fixtures\\\\Bundle\\\\Controllers\\\\DefaultController',\n ], $finder->findClasses(\n 'Controllers',\n 'Controller',\n 'Darsyn\\\\ClassFinder\\\\Tests\\\\Fixtures\\\\ControllerInterface'\n ));\n }",
"function class_basename($class)\n\t{\n\t\t$class = is_object($class) ? get_class($class) : $class;\n\n\t\treturn basename(str_replace('\\\\', '/', $class));\n\t}",
"public static function buildControllerName($name) {\r\n return __NAMESPACE__ . \"\\\\\" . s($name)->camelize() . self::$config->controller_ext;\r\n }",
"function class_basename($class)\n {\n $class = is_object($class) ? get_class($class) : $class;\n\n return basename(str_replace('\\\\', '/', $class));\n }",
"public static function setControllerSuffix($suffix)\n\t{\n\t\tself::$_controllerSuffix = $suffix;\n\t}",
"private function set_class_name(){\n\n $pieces = explode('\\\\',get_called_class());\n\n $this->class_name = ucfirst( $pieces[ (count( $pieces )-1) ]);\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if a given Datatype has a handler within this class. Not Case sensitive. | public static function available($datatype){
return \method_exists('\SYSTEM\HEADER', strtoupper($datatype));} | [
"public function hasHandler()\n {\n }",
"public function hasHandler($entity_type, $handler_type) {\n // TODO: Implement hasHandler() method.\n }",
"public function hasHandler($type)\n\t{\n\t\treturn isset(self::$handlers[$type]);\n\t}",
"private function hasHandlers(string $type): bool\n {\n return isset($this->handlers[$type]) && count($this->handlers[$type]) > 0;\n }",
"public function hasHandler(): bool{\n return isset($this->_handler) && $this->_handler !== null;\n }",
"public function handler_exists($class_name) {\n\t\t \tif (empty($class_name)) return FALSE;\n\n\t\t\t$mod = str_replace('directory_listing_', '', strtolower($class_name));\n\t\t \t$mod = str_replace(\"_handler\", \"\", $mod); // strip trailing _handler\n\n\t\t \t$filename = \"/handlers/$mod/$mod.php\";\n\t\t\t$abs_path = realpath(dirname(__FILE__).'/..').$filename;\n\t\t\tif (file_exists($abs_path)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\treturn FALSE;\n\t\t }",
"public function hasHandler(string $observableClass): bool\n {\n return isset($this->handlers[$observableClass]);\n }",
"public function hasHandler(): bool\n {\n return $this->handler !== null;\n }",
"public function hasHandler()\n {\n return (bool) $this->handler;\n }",
"public function hasHandler($name)\n {\n return isset($this->handlers[$name]);\n }",
"protected function isHandler($object, $event)\n {\n return true;\n }",
"public function hasHandler(): bool\n {\n return app()->make('slack.slash.commander')->hasHandler($this->getCommand());\n }",
"public function hasHandler(string $command): bool\n {\n return isset($this->handlers[$command]);\n }",
"public function hasHandler($queryClass)\n {\n $type = Type::create($queryClass)->toString();\n\n return isset($this->handlers[$type]);\n }",
"public function hasHandlers(?string $eventType = null): bool;",
"public function hasJobHandler($type);",
"function determineTypeHandler($type);",
"protected function isControllerClassHandler( $handler ) {\n\t\treturn is_string($handler) && strpos($handler, '::');\n\t}",
"public static function hasHandler(string $class, string $name, array $handler): bool\n {\n $result = array_filter((static::$_events[$class][$name] ?? []), function ($item) use ($handler) {\n $item = array_map(function ($value) {\n return trim($value, '\\\\');\n }, $item);\n $handler = array_map(function ($value) {\n return trim($value, '\\\\');\n }, $handler);\n\n return $item === $handler;\n });\n\n return count($result) > 0;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Capture events when your visitors view content on your site that has product details screens, etc. Generated from protobuf field bool products_and_ecommerce_enabled = 15; | public function setProductsAndEcommerceEnabled($var)
{
GPBUtil::checkBool($var);
$this->products_and_ecommerce_enabled = $var;
return $this;
} | [
"public function viewed_product() {\n\n\t\t// bail if tracking is disabled\n\t\tif ( $this->do_not_track() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->not_page_reload() ) {\n\n\t\t\t// add Enhanced Ecommerce tracking\n\t\t\t$product_id = get_the_ID();\n\n\t\t\t// JS add product\n\t\t\t$js = $this->get_ec_add_product_js( $product_id );\n\n\t\t\t// JS add action\n\t\t\t$js .= $this->get_funnel_js( 'viewed_product' );\n\n\t\t\t// enqueue JS\n\t\t\t$this->enqueue_js( 'event', $js );\n\n\t\t\t// set event properties - EC data will be sent with the event\n\t\t\t$properties = array(\n\t\t\t\t'eventCategory' => 'Products',\n\t\t\t\t'eventLabel' => esc_js( get_the_title() ),\n\t\t\t\t'nonInteraction' => true,\n\t\t\t);\n\n\t\t\t$this->js_record_event( $this->event_name['viewed_product'], $properties );\n\t\t}\n\t}",
"public static function isEcommerceTrackingEnabled() {\n return static::isWooCommerceActive() && get_option('shop_analytics_track_ecommerce');\n }",
"public function isEnabledOnProductPage()\n\t{\n\t\treturn Mage::getStoreConfig('rural/rsnippets/enable_product');\n\t}",
"function edd_analytics_events() {\n\tglobal $post, $edd_options;\n\t$actions = array();\n\n\tif ( is_page() ) {\n\t\t$page_template = get_page_template_slug( get_queried_object_id() );\n\n\t\t// Setup Google Analtyics tracking\n\t\tswitch ( $page_template ) {\n\t\t\tcase 'page-templates/template-free-downloads-upsell.php':\n\t\t\t\t$actions[] = array(\n\t\t\t\t\t'type' => 'event',\n\t\t\t\t\t'category' => 'ecommerce',\n\t\t\t\t\t'action' => 'free_downloads',\n\t\t\t\t\t'label' => 'Free Downloads Upsell',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( (int) $post->ID === (int) $edd_options['success_page'] ) {\n\t\t\t$actions[] = array(\n\t\t\t\t'type' => 'event',\n\t\t\t\t'category' => 'ecommerce',\n\t\t\t\t'action' => isset( $_GET[ 'payment_key' ] ) ? 'view_receipt' : 'purchase_confirmation',\n\t\t\t\t'label' => isset( $_GET[ 'payment_key' ] ) ? 'View Receipt' : 'Purchase Confirmation',\n\t\t\t);\n\t\t}\n\n\t\tforeach ( $actions as $action ) {\n\t\t\t?>\n\t\t\t<script>if (typeof __gaTracker !== 'undefined') {\n\t\t\t\t\t__gaTracker('send', {\n\t\t\t\t\t\thitType : \"<?php echo $action['type']; ?>\",\n\t\t\t\t\t\teventCategory: \"<?php echo $action['category']; ?>\",\n\t\t\t\t\t\teventAction : \"<?php echo $action['action']; ?>\",\n\t\t\t\t\t\teventLabel : \"<?php echo $action['label']; ?>\",\n\t\t\t\t\t});\n\t\t\t\t}</script>\n\t\t\t<?php\n\t\t}\n\n\t}\n\n}",
"public function IsEcommercePage() {\n\t\treturn true;\n\t}",
"public function showProducts(): bool\n {\n if ($this->getCurrentCategory()->getDisplayMode() === null) {\n return true;\n }\n\n return in_array(\n $this->getCurrentCategory()->getDisplayMode(),\n [\n Category::DM_PRODUCT,\n Category::DM_MIXED,\n ModePlugin::DM_TILING_AND_PRODUCTS,\n ModePlugin::DM_TILING_AND_PAGE_AND_PRODUCTS\n ]\n );\n }",
"public function getViewContentEvent(){\n $pageSection = $this->_getSection();\n\n //Check if event is enabled\n if(Mage::helper('srcode_facebookpixel')->viewContentEnabled()){\n if($pageSection == 'catalog_product_view'){\n return \"fbq('track', 'ViewContent');\";\n }\n }\n }",
"public function getViewContentEvent()\n {\n $pageSection = $this->_getSection();\n\n //Check if event is enabled\n if ($this->helper->viewContentEnabled($this->_getWebsiteId()) && $pageSection == 'catalog_product_view') {\n $product = $this->registry->registry('current_product');\n if (!empty($product)) {\n //Checking if product is configurable product\n if($product->getTypeId() == 'configurable'){\n // $_children = $product->getTypeInstance()->getUsedProducts($product);\n // foreach ($_children as $child){\n // $product = $child;\n // break;\n // }\n }\n\n //Getting category name\n $categoryIds = $product->getCategoryIds();\n $categoryName = '';\n if (count($categoryIds) >= 1) {\n $categoryId = end($categoryIds); //(lowest category level)\n $category = $this->categoryFactory->create()->load($categoryId);\n $categoryName = $this->_replaceSpecialChars($category->getName());\n }\n\n $contentIds = $this->helper->getUseProductId($this->_getWebsiteId()) ?\n $product->getId() : $product->getSku();\n return \"fbq('track', 'ViewContent', {\n content_name: '\". $this->_replaceSpecialChars($product->getName()) .\"',\n content_ids: ['\". $contentIds .\"'],\n content_type: 'product',\n content_category: '\". $categoryName .\"',\n value: '\". $product->getFinalPrice() .\"',\n currency: '\". $this->_getStoreCurrency() .\"'\n });\";\n }\n }\n }",
"public function inject_view_content_event() {\n\t\t\tglobal $post;\n\n\t\t\tif ( ! $this->is_pixel_enabled() || ! isset( $post->ID ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$product = wc_get_product( $post->ID );\n\n\t\t\tif ( ! $product instanceof \\WC_Product ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if product is variable or grouped, fire the pixel with content_type: product_group\n\t\t\tif ( $product->is_type( array( 'variable', 'grouped' ) ) ) {\n\t\t\t\t$content_type = 'product_group';\n\t\t\t} else {\n\t\t\t\t$content_type = 'product';\n\t\t\t}\n\n\t\t\t$categories = \\WC_Facebookcommerce_Utils::get_product_categories( $product->get_id() );\n\n\t\t\t$event_data = array(\n\t\t\t\t'event_name' => 'ViewContent',\n\t\t\t\t'custom_data' => array(\n\t\t\t\t\t'content_name' => $product->get_title(),\n\t\t\t\t\t'content_ids' => wp_json_encode( \\WC_Facebookcommerce_Utils::get_fb_content_ids( $product ) ),\n\t\t\t\t\t'content_type' => $content_type,\n\t\t\t\t\t'contents' => wp_json_encode(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'id' => \\WC_Facebookcommerce_Utils::get_fb_retailer_id( $product ),\n\t\t\t\t\t\t\t\t'quantity' => 1,\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\t'content_category' => $categories['name'],\n\t\t\t\t\t'value' => $product->get_price(),\n\t\t\t\t\t'currency' => get_woocommerce_currency(),\n\t\t\t\t),\n\t\t\t\t'user_data' => $this->pixel->get_user_info(),\n\t\t\t);\n\n\t\t\t$event = new Event( $event_data );\n\n\t\t\t$this->send_api_event( $event );\n\n\t\t\t$event_data['event_id'] = $event->get_id();\n\n\t\t\t$this->pixel->inject_event( 'ViewContent', $event_data );\n\t\t}",
"public function includeOnlySaleableProducts()\n {\n return true;\n }",
"function oxygen_woocommerce_quickview_enabled() {\n\treturn get_data( 'shop_quickview' );\n}",
"public function getProductEvent()\n {\n $evt = \"\";\n $evtName = 'viewedProduct';\n if ($this->_hubHelper->isEnableEvent($evtName))\n {\n $productJs = new \\stdClass();\n $product = $this->getCurrentProduct();\n if($product->getImage())\n {\n $productImage = $this->_urlBuilder->getBaseUrl(['_type' => UrlInterface::URL_TYPE_MEDIA])\n . 'catalog/product' . $product->getImage();\n }\n else\n {\n $productImage = $this->_imageHelper->init($product,'product_page_image_large')\n ->keepAspectRatio(true)->getUrl();\n }\n $evt.= $this->_getCoustomerData();\n $productJs->type = 'viewedProduct';\n $properties = new \\stdClass();\n $properties->id = $product->getEntityId();\n $properties->sku = $product->getSku();\n $properties->name = $this->_hubHelper->clearStrings($product->getName());\n $properties->price = round($product->getFinalPrice(),2);\n $properties->imageUrl = $productImage;\n $properties->linkUrl = $product->getProductUrl();\n if($product->getShortDescription()) {\n $properties->shortDescription = $this->_hubHelper->clearStrings($product->getShortDescription());\n }\n $categories = array();\n foreach($product->getCategoryIds() as $categoryId)\n {\n try {\n $category = $this->_categoryRepository->get($categoryId);\n $categories[] = $category->getName();\n }\n catch (\\Magento\\Framework\\Exception\\NoSuchEntityException $e)\n {}\n }\n $properties->category = $categories;\n $productJs->properties = $properties;\n $evt.= \"\\nch('event',\".json_encode($productJs).\");\";\n }\n else\n {\n $this->_hubHelper->log($evtName.' OFF');\n }\n return $evt;\n }",
"function storepage_on_sale_products( $args ) {\n\n\t\tif ( is_woocommerce_activated() ) {\n\n\t\t\t$args = apply_filters( 'storepage_on_sale_products_args', array(\n\t\t\t\t'limit' => 4,\n\t\t\t\t'columns' => 4,\n\t\t\t\t'title' => __( 'On Sale', 'storepage' ),\n\t\t\t) );\n\n\t\t\techo '<section class=\"storepage-product-section storepage-on-sale-products\">';\n\n\t\t\tdo_action( 'storepage_before_on_sale_products' );\n\n\t\t\techo '<h2 class=\"section-title\">' . wp_kses_post( $args['title'] ) . '</h2>';\n\n\t\t\tdo_action( 'storepage_after_on_sale_products_title' );\n\n\t\t\techo storepage_do_shortcode( 'sale_products', array(\n\t\t\t\t'per_page' => intval( $args['limit'] ),\n\t\t\t\t'columns' => intval( $args['columns'] ),\n\t\t\t) );\n\n\t\t\tdo_action( 'storepage_after_on_sale_products' );\n\n\t\t\techo '</section>';\n\t\t}\n\t}",
"public function isEnableOrderProductDetails()\n {\n return $this->helper->isEnableOrderProduct();\n }",
"public function showing_restricted_products() {\n\t\treturn ! $this->hiding_restricted_products();\n\t}",
"public function showViewContent()\n {\n if(Mage::getStoreConfig('fbpixel/events/enable_view_content')) {\n return true;\n }\n return false;\n }",
"public function clicked_product() {\n\n\t\tif ( $this->do_not_track() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Yoast is in non-universal mode, skip\n\t\tif ( $this->is_yoast_ga_tracking_active() && ! $this->is_yoast_ga_tracking_universal() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $product;\n\n\t\t$list = $this->get_list_type();\n\t\t$properties = array(\n\t\t\t'eventCategory' => 'Products',\n\t\t\t'eventLabel' => htmlentities( $product->get_title(), ENT_QUOTES, 'UTF-8' ),\n\t\t);\n\n\t\t$js =\n\t\t\t\"$( '.products .post-\" . esc_js( $product->id ) . \" a' ).click( function() {\n\t\t\t\tif ( true === $(this).hasClass( 'add_to_cart_button' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\" . $this->get_ec_add_product_js( $product->id ) . $this->get_funnel_js( 'clicked_product', array( 'list' => $list ) ) . $this->get_event_tracking_js( $this->event_name['clicked_product'], $properties ) . \"\n\t\t\t});\";\n\n\t\t$this->enqueue_js( 'event', $js );\n\t}",
"function storefront_on_sale_products($args) {\n\n if (is_woocommerce_activated()) {\n\n $args = apply_filters('storefront_on_sale_products_args', array(\n 'limit' => 4,\n 'columns' => 4,\n 'title' => __('On Sale', 'storefront'),\n ));\n\n echo '<section class=\"storefront-product-section storefront-on-sale-products\">';\n\n do_action('storefront_homepage_before_on_sale_products');\n\n echo '<h2 class=\"section-title\">' . wp_kses_post($args['title']) . '</h2>';\n\n do_action('storefront_homepage_after_on_sale_products_title');\n\n echo storefront_do_shortcode('sale_products', array(\n 'per_page' => intval($args['limit']),\n 'columns' => intval($args['columns']),\n ));\n\n do_action('storefront_homepage_after_on_sale_products');\n\n echo '</section>';\n }\n }",
"public function getIsEcommerce()\n {\n return $this->isEcommerce;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert int to byte | function _int_to_byte( $n )
{
return chr($n);
} | [
"public function toByte()\n {\n return new Byte($this->value);\n }",
"function _int2bytes($x)\n {\n return ltrim(pack('N', $x), chr(0));\n }",
"private function asByte($in) {\n return is_int($in) ? chr($in) : $in[0];\n }",
"function int2bin($num)\n {\n $bi = new Math_BigInteger($num, 10);\n return _byte_strrev($bi->toBytes());\n }",
"protected function intToBinary($value)\n {\n $nbytes = 0;\n if ($value > 0xFF) {\n $nbytes = 1; // 1 byte integer\n }\n if ($value > 0xFFFF) {\n $nbytes += 1; // 4 byte integer\n }\n if ($value > 0xFFFFFFFF) {\n $nbytes += 1; // 8 byte integer\n }\n if ($value < 0) {\n $nbytes = 3; // 8 byte integer, since signed\n }\n\n $bdata = self::typeBytes(\"1\", $nbytes); // 1 is 0001, type indicator for integer\n $buff = \"\";\n\n if ($nbytes < 3) {\n if ($nbytes == 0) {\n $fmt = \"C\";\n } elseif ($nbytes == 1) {\n $fmt = \"n\";\n } else {\n $fmt = \"N\";\n }\n\n $buff = pack($fmt, $value);\n } else {\n if (PHP_INT_SIZE > 4) {\n // 64 bit signed integer; we need the higher and the lower 32 bit of the value\n $high_word = $value >> 32;\n $low_word = $value & 0xFFFFFFFF;\n } else {\n // since PHP can only handle 32bit signed, we can only get 32bit signed values at this point - values above 0x7FFFFFFF are\n // floats. So we ignore the existance of 64bit on non-64bit-machines\n if ($value < 0) {\n $high_word = 0xFFFFFFFF;\n } else {\n $high_word = 0;\n }\n $low_word = $value;\n }\n $buff = pack(\"N\", $high_word).pack(\"N\", $low_word);\n }\n\n return $bdata.$buff;\n }",
"public function byteValue() {\n return $this->bitwiseAnd(0xFF)->intValue();\n }",
"public function toByte()\n {\n if ($this->value < Byte::MinValue or $this->value > Byte::MaxValue) {\n throw new ClassCastException('Cannot convert to Byte type.');\n }\n return new Byte($this->value);\n }",
"public function readByte(): int\n {\n $s = $this->read(1);\n\n return empty($s) ? 0 : ord($s[0]);\n }",
"public function to_binary() { # :: Int -> String\n return new Str(decbin($this->value));\n }",
"public function writeInt8($int) {}",
"public function castByte()\n {\n $min = self::BYTE_MIN_VALUE;\n $max = self::BYTE_MAX_VALUE;\n\n $castFunction = function ($value) use ($min, $max) {\n return $value < 0 ? $min : $max;\n };\n\n if (is_numeric($this->value) && $this->value >= $min && $this->value <= $max) {\n return $this->value;\n }\n\n return $this->handleMismatch($castFunction, 'byte');\n }",
"public function byteAsString($int)\n {\n return $this->asString($int, 1);\n }",
"public static function toUnsignedByte($i)\n {\n return $i & 0xff;\n }",
"public function readByte() {\n $value = ord(parent::read(1));\n return $value;\n }",
"public static function formatToUInt8($int) {}",
"public function writeInt8($value);",
"public function readByte(): int\n {\n return $this->unpack('c', $this->read(1));\n }",
"public function byte($value)\n {\n $this->write(chr($value), 1);\n }",
"public function writeByte($b);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the Container name for the data source. | public function getContainerName()
{
return $this->containerName;
} | [
"public function getContainerName();",
"public function getContainerName()\n {\n return $this->container_name;\n }",
"public function getContainerName() : string\n {\n return $this->containerName;\n }",
"function get_container_name(){\r\n\t\treturn $this->get_setting('container');\r\n\t}",
"abstract public function containerName();",
"abstract function getDataSourceName();",
"public function getContainerDisplayName()\n {\n if (array_key_exists(\"containerDisplayName\", $this->_propDict)) {\n return $this->_propDict[\"containerDisplayName\"];\n } else {\n return null;\n }\n }",
"private function getContainerClassName(): string\n {\n return \\sprintf(\n self::CONTAINER_NAME_TEMPLATE,\n \\lcfirst($this->entryPointName),\n \\ucfirst($this->environment->toString())\n );\n }",
"public function getContainerClassName()\n {\n $class = $this->getClassName();\n $class .= $this->showPrefix() ? '-prefix' : '';\n $class .= $this->showMiddlename() ? '-middlename' : '';\n $class .= $this->showSuffix() ? '-suffix' : '';\n return $class;\n }",
"public function getContainerName()\n {\n return 'app-'.$this->directory;\n }",
"function getSourceName(&$source) {\n\t\t$_this =& ConnectionManager::getInstance();\n\t\tforeach ($_this->_dataSources as $name => $ds) {\n\t\t\tif ($ds == $source) {\n\t\t\t\treturn $name;\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t}",
"public function getContainerId()\n {\n return $this->getValue('containerId');\n }",
"public function getFieldContainerIdPrefix()\n {\n return $this->getData('field_container_id_prefix');\n }",
"public function getContainerNameSuffix(): string;",
"public function getContainerId()\n {\n return $this->containerId;\n }",
"public function getName()\n {\n return $this->getEnvironment()->getDataDefinition()->getName();\n }",
"public function dataStoreName() {\n return get_class(self::$default_ds);\n }",
"public function getDataSourceName()\n {\n return t(\"Test Data Source\");\n }",
"public function getDockerName()\n {\n return $this->dockername;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return true if table exists | protected function tableExists(): bool
{
$sqlWhere = ' WHERE table_schema = \'%s\' AND table_name = \'%s\';';
$sql = sprintf(
'SELECT count(*) as counter FROM %s ' . $sqlWhere,
'information_schema.tables',
$this->repository->getDatabase(),
$this->repository->getTable()
);
$this->run($sql)->hydrate();
$result = $this->getRowset()[0];
$counter = (int) $result['counter'];
return ($counter > 0);
} | [
"public function tableExists();",
"function tableExists($table);",
"public function checkExistTable()\n {\n return (bool) Mage::getSingleton('core/resource')\n ->getConnection('core_write')\n ->isTableExists($this->getTableName());\n }",
"public static function table_exists() {\n return self::connection()->table_exists(static::$table_name);\n }",
"public function tableExists(): bool\n {\n return Schema::hasTable($this->tableName);\n }",
"private function check_table()\n {\n $res = $this->db->table_exists($this->table);\n if ($this->db->table_exists($this->table)) {\n return true;\n }\n\n return false;\n }",
"public function _tableExists($table)\n\t{\n\t\treturn true;\n\t}",
"public function tableExists($table);",
"public function tableExists($table = NULL) {\n\t\t$db = db_init ();\n\t\tif ($table)\n\t\t\t$qry = \"SELECT 1 FROM $table LIMIT 1;\";\n\t\telse\n\t\t\t$qry = \"SELECT 1 FROM $this->table LIMIT 1;\";\n\t\t$result = $db->query ( $qry );\n\t\tif (! $result)\n\t\t\treturn FALSE;\n\t\t\n\t\treturn TRUE;\n\t}",
"abstract public function tableExists($table);",
"public function tableExists() {\n $sql = \"SELECT 1 FROM yii-schedules LIMIT 1\";\n $result = $this->connection->createCommand()\n ->select('*')\n ->from('yii-schedules')\n ->limit(1);\n try {\n $result->queryScalar();\n } catch (Exception $e) {\n return false;\n }\n return true;\n }",
"private function tableExists() {\n\t\ttry {\n\t\t\t$result = $this->pdo->query(\"SELECT 1 FROM oauth_session LIMIT 1\");\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $result !== false;\n\t}",
"function Sql_Table_Exists($table=\"\")\n {\n if (empty($table)) { $table=$this->SqlTableName($table); }\n \n if (!empty($this->ApplicationObj()->Tables[ $table ])) { return TRUE; }\n \n $query=$this->Sql_Table_Exists_Query($table);\n \n $res=FALSE;\n try\n {\n $res=$this->DB_Query($query,TRUE);\n }\n catch (Exception $e)\n {\n // We got an exception == table not found\n $res=FALSE;\n }\n\n if ($res) { $this->ApplicationObj()->Tables[ $table ]=TRUE; }\n \n return $res;\n }",
"private function isTableExists()\n {\n try {\n $this->resourceConnection->getConnection();\n } catch (\\Exception $e) {\n return false;\n }\n\n return $this->resourceConnection->getConnection()->isTableExists(\n $this->resourceConnection->getTableName('wallee_payment_method_configuration'));\n }",
"public function hasTable();",
"abstract public function tableExists($tableName);",
"protected function ensureTableExists() {\n try {\n $database_schema = $this->connection->schema();\n $database_schema->createTable($this->table, $this->schemaDefinition());\n }\n // If the table already exists, then attempting to recreate it will throw an\n // exception. In this case just catch the exception and do nothing.\n catch (DatabaseException $e) {\n }\n catch (\\Exception $e) {\n return FALSE;\n }\n return TRUE;\n }",
"public function tableExists()\n {\n $applicationExistsSql = \"DESCRIBE `application`\";\n $managerExistsSql = \"DESCRIBE `manager`\";\n\n $applicationExists = $this->mysqli->query($applicationExistsSql);\n if (!$applicationExists)\n {\n $applicationCreate = $this->mysqli->multi_query($this->applicationTableSql);\n }\n\n $managerExists = $this->mysqli->query($managerExistsSql);\n if (!$managerExists)\n {\n $managerCreate = $this->mysqli->multi_query($this->managerTableSql);\n }\n }",
"public function testTablaExiste()\n {\n $this->assertTrue(Schema::hasTable($this->tabla));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get label for shipping exclude tax | public function getExcludeTaxLabel()
{
return __(
'Shipping Excl. Tax (%1)',
$this->escapeHtml($this->getQuote()->getShippingAddress()->getShippingDescription())
);
} | [
"public function getExcludeTaxLabel ()\n\t{\n\t\treturn Mage::helper( \"tax\" )->getIncExcTaxLabel( false );\n\t}",
"function getIncludeTaxLabel() {\n\t\t\t$config = $this->getWarehouseHelper( )->getConfig( );\n\n\t\t\tif (( $config->isMultipleMode( ) && $config->isSplitOrderEnabled( ) )) {\n\t\t\t\t$labels = array( );\n\t\t\t\tforeach ($this->_getQuote( )->getAllShippingAddresses( ) as $address) {\n\t\t\t\t\t$labels[$address->getShippingMethod( )] = $address->getShippingDescription( );\n\t\t\t\t}\n\n\t\t\t\treturn $this->escapeHtml( $this->helper( 'tax' )->__( 'Shipping Incl. Tax (%s)', implode( ' & ', $labels ) ) );\n\t\t\t}\n\n\t\t\treturn parent::getIncludeTaxLabel( );\n\t\t}",
"public function getIncludeTaxLabel()\n {\n return __(\n 'Shipping Incl. Tax (%1)',\n $this->escapeHtml($this->getQuote()->getShippingAddress()->getShippingDescription())\n );\n }",
"function indie_lee_change_cart_product_tax_label ( $label ) {\n $label = '';\n return $label;\n}",
"public function getTaxLabel()\n {\n $taxLabel = Mage::getStoreConfig('iparcel/tax/tax_label');\n if ($taxLabel == '') {\n return Mage::helper('iparcel')->__('Tax');\n } else {\n return $taxLabel;\n }\n }",
"public function getShippingLabel()\n {\n $label = $this->getData('shipping_label');\n if ($label) {\n return $this->getResource()->getReadConnection()->decodeVarbinary($label);\n }\n return $label;\n }",
"public function getTaxAndDutyLabel()\n {\n $taxAndDutyLabel = Mage::getStoreConfig('iparcel/tax/tax_duty_label');\n if ($taxAndDutyLabel == '') {\n return Mage::helper('iparcel')->__('Tax & Duty');\n } else {\n return $taxAndDutyLabel;\n }\n }",
"public function getShippingLabel()\n {\n if ($this->_shippingLabel === null) {\n /** @var $shippingCollection \\Magento\\Rma\\Model\\ResourceModel\\Shipping\\Collection */\n $shippingCollection = $this->_rmaShippingFactory->create();\n $this->_shippingLabel = $shippingCollection->addFieldToFilter(\n 'rma_entity_id',\n $this->getEntityId()\n )->addFieldToFilter(\n 'is_admin',\n \\Magento\\Rma\\Model\\Shipping::IS_ADMIN_STATUS_ADMIN_LABEL\n )->getFirstItem();\n }\n return $this->_shippingLabel;\n }",
"public function getIncludeTaxLabel()\n {\n $originalLabel = parent::getIncludeTaxLabel();\n return $originalLabel . $this->getAdditionalLabel();\n }",
"public function getIncludeTaxLabel ()\n\t{\n\t\treturn Mage::helper( \"tax\" )->getIncExcTaxLabel( true );\n\t}",
"public function getLabel()\n {\n return Mage::helper('cornerdrop_collect')->getCornerDropFeeLabel();\n }",
"function getShippingExcludeTax() {\n\t\t\t$config = $this->getWarehouseHelper( )->getConfig( );\n\n\t\t\tif (( $config->isMultipleMode( ) && $config->isSplitOrderEnabled( ) )) {\n\t\t\t\t$shippingAmount = 90;\n\t\t\t\tforeach ($this->_getQuote( )->getAllShippingAddresses( ) as $address) {\n\t\t\t\t\t$shippingAmount += $address->getShippingAmount( );\n\t\t\t\t}\n\n\t\t\t\treturn $shippingAmount;\n\t\t\t}\n\n\t\t\treturn parent::getShippingExcludeTax( );\n\t\t}",
"public function getShippingSalesTaxNumber();",
"public function displayShippingPriceExclTax()\n {\n return $this->taxHelper->displayShippingPriceExcludingTax();\n }",
"function bbloomer_add_0_to_shipping_label( $label, $method ) { \n\n if ( ! ( $method->cost > 0 ) ) {\n $label .= ': ' . wc_price(0);\n } \n return $label;\n\n}",
"function bbloomer_add_0_to_shipping_label( $label, $method ) {\n if ( ! ( $method->cost > 0 ) ) {\n $label .= ': ' . wc_price(0);\n } \n return $label;\n}",
"function benz_custom_shipping_free_label( $label ) {\n $label = str_replace( \"(Free)\", \" \", $label );\n $label = str_replace( \"(FREE!)\", \" \", $label );\n\n return $label;\n}",
"public function getShippingTaxRefunded();",
"public static function get_shipping_method_labels() {\n\t\t$shipping_method_labels = Iconic_WDS_Core_Settings::get_setting_from_db( 'general_setup', 'shipping_method_labels' );\n\n\t\tif ( empty( $shipping_method_labels ) ) {\n\t\t\t$shipping_method_labels = array();\n\t\t}\n\n\t\treturn apply_filters( 'iconic_wds_shipping_method_labels', $shipping_method_labels );\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Takes ListID and returns All ISBNS and Conditions associated with it and false on failure | public static function getISBNCondition($listID) {
$sql = "
SELECT b.isbn, bl.condition_id
FROM `books_lists` bl
LEFT JOIN `books` b
ON bl.book_id = b.id
WHERE list_id = '" . mysql_real_escape_string($listID) . "'";
$result = mysql_query($sql);
if (!$result) {
die('Invalid query: ' . mysql_error());
}
while($row = mysql_fetch_assoc($result)) {
$arr[] = $row;
}
return $arr;
} | [
"function status_is($list=array())\n\t{\n \t\tif($this->debug>1){error_log('New LP - In learnpathItem::status_is('.print_r($list,true).') on item '.$this->db_id,0);}\n\t\t$mystatus = $this->get_status(true);\n\t\tif(empty($mystatus)){\n\t\t\treturn false;\n\t\t}\n\t\t$found = false;\n\t\tforeach($list as $status)\n\t\t{\n\t\t\tif(preg_match('/^'.$status.'$/i',$mystatus))\n\t\t\t{\n\t\t\t\tif($this->debug>2){error_log('New LP - learnpathItem::status_is() - Found status '.$status.' corresponding to current status',0);}\n\t\t\t\t$found = true;\n\t\t\t\treturn $found;\n\t\t\t}\n\t\t}\n\t\tif($this->debug>2){error_log('New LP - learnpathItem::status_is() - Status '.$mystatus.' did not match request',0);}\n\t\treturn $found;\n\t}",
"public function status_is($list = array())\n {\n if (self::debug > 1) {\n error_log(\n 'learnpathItem::status_is(' . print_r(\n $list,\n true\n ) . ') on item ' . $this->db_id,\n 0\n );\n }\n $currentStatus = $this->get_status(true);\n if (empty($currentStatus)) {\n return false;\n }\n $found = false;\n foreach ($list as $status) {\n if (preg_match('/^' . $status . '$/i', $currentStatus)) {\n if (self::debug > 2) {\n error_log(\n 'New LP - learnpathItem::status_is() - Found status ' .\n $status . ' corresponding to current status',\n 0\n );\n }\n $found = true;\n\n return $found;\n }\n }\n if (self::debug > 2) {\n error_log(\n 'New LP - learnpathItem::status_is() - Status ' .\n $currentStatus . ' did not match request',\n 0\n );\n }\n\n return $found;\n }",
"public function areAttributesVisibleInList( $aAttributes, $iListId );",
"public function testOnListCondition () {\n $contact = $this->contacts ('testUser');\n $list = $this->lists ('testUser');\n $this->assertTrue ($list->hasRecord ($contact));\n\n $params = array (\n 'model' => $contact,\n 'modelClass' => 'Contacts',\n );\n $retVal = $this->executeFlow ($this->x2flow ('flowOnListCondition'), $params);\n\n X2_TEST_DEBUG_LEVEL > 1 && print_r ($retVal['trace']);\n\n // assert flow executed without errors since contact is on list\n $this->assertTrue ($this->checkTrace ($retVal['trace']));\n\n\n $contact = $this->contacts ('testAnyone');\n $this->assertFalse ($list->hasRecord ($contact));\n\n $params = array (\n 'model' => $contact,\n 'modelClass' => 'Contacts',\n );\n $retVal = $this->executeFlow ($this->x2flow ('flowOnListCondition'), $params);\n\n X2_TEST_DEBUG_LEVEL > 1 && print_r ($retVal['trace']);\n\n // assert flow executed with errors since contact is not on list\n $this->assertFalse ($this->checkTrace ($retVal['trace']));\n }",
"function suricata_is_iplist_active($iplist) {\n\n\tforeach (config_get_path('installedpackages/suricata/rule', []) as $rule) {\n\t\tforeach (array_get_path($rule, 'iplist_files/item', []) as $file) {\n\t\t\tif ($file == $iplist)\n\t\t\t\treturn TRUE;\n\t\t}\n\t}\n\treturn FALSE;\n}",
"public function validateList() {\n return $this->isValidList();\n }",
"public function inOptionList($listId, $item)\n {\n $profile = $this->profile;\n $server = $this->server;\n if ($listId && $item) {\n $url = \"https://${server}.iformbuilder.com/exzact/api/v60/profiles/${profile}/optionlists/${listId}/options?fields=\" . urlencode('label(=\"' . $item['label'] . '\")');\n\n $results = json_decode($this->get($url), true);\n\n if ($results) {\n\n return true;\n }\n }\n\n return false;\n }",
"public function GetConditions()\n {\n return DB::table('itemcondition')->get();\n }",
"public function getListDetails($list)\n\t\t{\n\t\t\t$utility = new Utility();\n\t\t\t$call = $utility->getApiPath() . $list->getLink();\n\t\t\t$return = $utility->httpGet($call);\n\t\t\t$list = $this->createListStruct($return['xml']);\n\t\t\tif (!$return)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $list;\n\t\t\t}\n\t\t}",
"public function getListDetailForList($listID)\n {\n $listIDTemp = (int) $listID;\n $rowset = $this->tableGateway->select(array('listID' => $listIDTemp));\n return $rowset; \n }",
"function getStatusSituationListNotice($cond = '', $finddate = NULL) {\n $sql = \"\n\t\t\t\tSELECT a.*, (\n\t\t\t\tSELECT b.checklist_checked FROM $this->table_s_c as b \n\t\t\t\tLEFT JOIN $this->table as c ON c.submit_id = b.submit_id \n\t\t\t\tWHERE a.checklist_id=b.checklist_id AND DATE(c.date_add) = DATE('\" . $finddate . \"')\n\t\t\t\tGROUP BY b.checklist_id ORDER BY b.id DESC\n\t\t\t\t) \n\t\t\t\tas checklist_checked,\n\t\t\t\tu.user_fullname\n\t\t\t\tFROM $this->table_c as a \n\t\t\t\t\n\t\t\t\tLEFT JOIN $this->table_ccu as ccu ON ccu.checklist_category_id = a.parent_category_id \n\t\t\t\tLEFT JOIN $this->table_u as u ON u.user_id = ccu.user_id \t\t\t\t\n\t\t\t\t$cond \n\t\t\t\tORDER BY a.checklist_category_id ASC\n\t\t\";\n\n /* $sql = \"SELECT a.*, u.user_fullname, b.checklist_checked\n FROM pp_checklist as a\n LEFT JOIN pp_submit_checklist as b ON a.checklist_id = b.checklist_id\n LEFT JOIN pp_submit as c ON c.submit_id = b.submit_id\n LEFT JOIN pp_user as u ON c.user_id=u.user_id\n $cond\n ORDER BY a.checklist_category_id ASC\";\n ///echo '<br>'; */\n return $this->db->query($sql)->result();\n }",
"public function flattenConditions()\n {\n // As our lists only supports unique entries anyway, the only thing left is to check if the condition's\n // assertions can be fulfilled (would be possible as direct assertions), and flatten the contained\n // function definitions as well\n $ancestralConditionIterator = $this->ancestralInvariants->getIterator();\n foreach ($ancestralConditionIterator as $conditionList) {\n // iterate all condition lists\n $conditionListIterator = $conditionList->getIterator();\n foreach ($conditionListIterator as $assertion) {\n }\n }\n\n // No flatten all the function definitions we got\n $functionDefinitionIterator = $this->functionDefinitions->getIterator();\n foreach ($functionDefinitionIterator as $functionDefinition) {\n // iterate over all function definitions\n $functionDefinition->flattenConditions();\n }\n\n return false;\n }",
"protected function extractListInfo()\n\t{\n\t\tif ( $this->method == 'POST' ) {\n\t\t\tif ( count( $this->uri ) < 1 ) return FALSE;\n\n\t\t\t$this->list = array_pop( $this->uri );\n\t\t\t$this->type = ( strpos( $this->list, 'shared-' ) === 0 ) ? substr( $this->list, 7 ) : $this->list;\n\t\t} elseif ( $this->method === 'GET' && count( $this->uri ) > 1 ) {\n\t\t\t$lastItemInURI = $this->uri[count( $this->uri ) - 1];\n\n\t\t\tif ( $lastItemInURI === 'list' ) {\n\t\t\t\tarray_pop( $this->uri );\n\n\t\t\t\t$this->list = array_pop( $this->uri );\n\t\t\t\t$this->type = ( strpos( $this->list, 'shared-' ) === 0 ) ? substr( $this->list, 7 ) : $this->list;\n\n\t\t\t\t$this->extractSQLSnippetsForGETList();\n\t\t\t}\n\t\t}\n\n\t\treturn TRUE;\n\t}",
"public function sqlStateIn($state, $list) {\n\t\t/*$stateMap = array(\n\t\t\t'HY000'=>RedBean_QueryWriter::C_SQLSTATE_NO_SUCH_TABLE,\n\t\t\t'42S22'=>RedBean_QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN,\n\t\t\t'HY000'=>RedBean_QueryWriter::C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION\n\t\t);*/\n\n\t\tif ($state=='HY000') {\n\t\t\tif (in_array(RedBean_QueryWriter::C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION,$list)) return true;\n\t\t\tif (in_array(RedBean_QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN,$list)) return true;\n\t\t\tif (in_array(RedBean_QueryWriter::C_SQLSTATE_NO_SUCH_TABLE,$list)) return true;\n\t\t}\n\t\treturn false;\n\t\t//return in_array((isset($stateMap[$state]) ? $stateMap[$state] : '0'),$list);\n\t}",
"function GetListSummary($listid=0)\n\t{\n\t\t$summary = array(\n\t\t\t'emails_sent' => 0,\n\t\t\t'bouncecount_soft' => 0,\n\t\t\t'bouncecount_hard' => 0,\n\t\t\t'bouncecount_unknown' => 0,\n\t\t\t'unsubscribecount' => 0,\n\t\t\t'emailopens' => 0,\n\t\t\t'emailforwards' => 0,\n\t\t\t'linkclicks' => 0\n\t\t);\n\n\t\t$listid = (int)$listid;\n\n\t\tif ($listid <= 0) {\n\t\t\t$summary['emailopens_unique'] = 0;\n\t\t\t$summary['statids'] = array();\n\t\t\treturn $summary;\n\t\t}\n\n\t\t// this is used by both autoresponders & newsletters.\n\t\t$select_query = \"SELECT SUM(htmlrecipients + textrecipients + multipartrecipients) AS emails_sent,\";\n\t\t$select_query .= \"SUM(bouncecount_soft) AS bouncecount_soft, SUM(bouncecount_hard) AS bouncecount_hard, SUM(bouncecount_unknown) AS bouncecount_unknown,\";\n\t\t$select_query .= \"SUM(unsubscribecount) AS unsubscribecount,\";\n\t\t$select_query .= \"SUM(emailopens) AS emailopens,\";\n\t\t$select_query .= \"SUM(emailforwards) AS emailforwards,\";\n\t\t$select_query .= \"SUM(linkclicks) AS linkclicks\";\n\n\t\t$newsletter_query = $select_query;\n\t\t$newsletter_query .= \" FROM \" . SENDSTUDIO_TABLEPREFIX . \"stats_newsletters sn, \";\n\t\t$newsletter_query .= SENDSTUDIO_TABLEPREFIX . \"stats_newsletter_lists snl\";\n\t\t$newsletter_query .= \" WHERE snl.statid=sn.statid\";\n\t\t$newsletter_query .= \" AND snl.listid='\" . $listid . \"'\";\n\n\t\t/*\n\t\t$newsletter_result = $this->Db->Query($newsletter_query);\n\t\t// there will only ever be one row, no need to do a loop here.\n\t\t$newsletter_row = $this->Db->Fetch($newsletter_result);\n\n\t\t// add the info to the summary.\n\t\tforeach ($summary as $p => $item) {\n\t\t\t$summary[$p] += $newsletter_row[$p];\n\t\t}\n\t\t */\n\n\t\t$autoresponder_query = $select_query;\n\t\t$autoresponder_query .= \" FROM \" . SENDSTUDIO_TABLEPREFIX . \"stats_autoresponders sa, \";\n\t\t$autoresponder_query .= SENDSTUDIO_TABLEPREFIX . \"autoresponders a\";\n\t\t$autoresponder_query .= \" WHERE sa.autoresponderid=a.autoresponderid\";\n\t\t$autoresponder_query .= \" AND a.listid='\" . $listid . \"'\";\n\n\t\t/*\n\t\t$autoresponder_result = $this->Db->Query($autoresponder_query);\n\t\t// there will only ever be one row, no need to do a loop here.\n\t\t$autoresponder_row = $this->Db->Fetch($autoresponder_result);\n\n\t\t// add the info to the summary.\n\t\tforeach ($summary as $p => $item) {\n\t\t\t$summary[$p] += $autoresponder_row[$p];\n\t\t}\n\t\t */\n\n\t\t$query = $newsletter_query . \" UNION \" . $autoresponder_query;\n\t\t$result = $this->Db->Query($query);\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\tforeach ($row as $key => $amount) {\n\t\t\t\t$summary[$key] += $amount;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Unsubscribes can also happen through the control panel, so work out that number separately.\n\t\t * Those subscribers won't have a 'statid' in the list_subscribers_unsubscribe table as they weren't removed by a 'stat' (autoresponder or newsletter).\n\t\t*/\n\t\t$query = \"SELECT COUNT(subscriberid) AS count FROM \" . SENDSTUDIO_TABLEPREFIX . \"list_subscribers_unsubscribe WHERE listid='\" . $listid . \"' AND statid=0\";\n\t\t$result = $this->Db->Query($query);\n\t\t$count = $this->Db->FetchOne($result, 'count');\n\n\t\t$summary['unsubscribecount'] += $count;\n\n\t\t$summary['statids'] = array();\n\n\t\t$statids_query = \"SELECT statid FROM \";\n\t\t$statids_query .= SENDSTUDIO_TABLEPREFIX . \"stats_autoresponders sa, \" . SENDSTUDIO_TABLEPREFIX . \"autoresponders a\";\n\t\t$statids_query .= \" WHERE sa.autoresponderid=a.autoresponderid AND a.listid='\" . $listid . \"'\";\n\t\t$statids_query .= \" UNION ALL \";\n\t\t$statids_query .= \"SELECT statid FROM \";\n\t\t$statids_query .= SENDSTUDIO_TABLEPREFIX . \"stats_newsletter_lists snl\";\n\t\t$statids_query .= \" WHERE snl.listid='\" . $listid . \"'\";\n\n\t\t$result = $this->Db->Query($statids_query);\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t$summary['statids'][] = $row['statid'];\n\t\t}\n\n\t\t$summary['emailopens_unique'] = 0;\n\n\t\t/**\n\t\t*\n\t\twe need to do this in case a subscriber has opened multiple newsletters or autoresponders on the same list. we can't just use the emailopens_unique number from the stats table because that doesn't take into account other newsletters/autoresponders sent to that list.\n\t\tso subscriber '1' could open newsletter '1' and autoresponder '1' - which would both be unique for their respective stats but would make an incorrect summary as it would be included twice.\n\t\t*/\n\t\tif (!empty($summary['statids'])) {\n\t\t\t$unique_opens_query = \"SELECT COUNT(DISTINCT subscriberid) AS unique_count FROM \" . SENDSTUDIO_TABLEPREFIX . \"stats_emailopens WHERE statid IN (\" . implode(',', $summary['statids']) . \")\";\n\t\t\t$result = $this->Db->Query($unique_opens_query);\n\t\t\t$summary['emailopens_unique'] = $this->Db->FetchOne($result, 'unique_count');\n\t\t}\n\n\t\treturn $summary;\n\t}",
"function isBusinessInJobList($accountID,$listingID) // returns either listID or 0\n{\n\t//check for unique entry for a business in myList table\n\t$myJobsObj = new myJobs();\n\t$sql = \"SELECT * FROM myJobs WHERE accountID=$accountID and listingID=$listingID\"; \n\t$myJobDAO = $myJobsObj->getRecordsFromQuery($sql);\n\tif($myJobDAO->N>0)\n\t{\n\t\t$myJobDAO->fetch();\n\t\treturn 1;\n\t}\n\telse\n\t\treturn 0;\n}",
"function getInActiveItemList(){\n $sql = \"SELECT item_list.ITEM_LIST_ID,item_list.ITEM_NAME,parent_group.PARENT_GROUP_NAME,material_group.MATERIAL_GROUP_NAME FROM item_list LEFT JOIN parent_group ON parent_group.PARENT_GROUP_ID = item_list.PARENT_GROUP_ID LEFT JOIN material_group ON material_group.MATERIAL_GROUP_ID = item_list.PARENT_GROUP_ID WHERE item_list.ITEM_STATUS = 'InActive'\";\n\n $result = $this->conn->query($sql);\n $rows = $result->fetch_all(MYSQLI_ASSOC);\n return $rows;\n }",
"private function validateItemLists(string $list)\n {\n $valid = true;\n\n $explodedItemsList = explode('/', $list);\n foreach ($explodedItemsList as $item) {\n $item = (int)$item;\n if (is_int($item) && $item > 0 && $item <= 1000000) {\n continue;\n }\n $valid = false;\n }\n\n if ($valid) {\n return $explodedItemsList;\n } else {\n return false;\n }\n }",
"public function findListItems(int $bucketListID) {\n RealityCheckLogger::info(\"Entering BucketListDataService.findListItems()\");\n\n try {\n //check if row exists by using the $userID\n //prepared statements is created\n $stmt = $this->conn->prepare(\"SELECT * FROM ListItem WHERE BucketList_ID = :bucketlistid \");\n $stmt->bindParam(':bucketlistid', $bucketListID);\n\n //array is created and statement is executed\n $list = array();\n $stmt->execute();\n\n //loops through table using stmt->fetch\n for ($i = 0; $row = $stmt->fetch(); $i++) {\n //list item model is created\n $listItem = new ListItemModel($row['ID'], $row['Description'], $bucketListID);\n //inserts variables into end of array\n array_push($list, $listItem);\n }\n RealityCheckLogger::info(\"Leaving BucketListDataService.findListItems() with an array of bucket list items\");\n return $list;\n }\n\n catch(PDOException $e) {\n RealityCheckLogger::error(\"Exception: \", array(\"message\" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation deleteStoreItem Delete a store item | public function deleteStoreItem($id)
{
$this->deleteStoreItemWithHttpInfo($id);
} | [
"public function deleteItem($item, $store, $graph = FALSE) {\n $store->delete('', $item);\n }",
"public function delete(Store $store);",
"public function deleteItem($itemId);",
"public function deleteById($storeId);",
"public function delete($item);",
"public function deleteById($storelocatorId);",
"public function deleteById($item_id);",
"public function testDeleteStoreItem()\n {\n }",
"public function delete($item) { }",
"public function delete($item)\n {\n return $this->manager->delete(\n $this->getIndexName($item),\n self::TYPE,\n $this->getId($item)\n );\n }",
"public function deleteStoreById( $store_id )\n\t{\n\t\t$this->connectDataBase();\n\t\t$this->db->prepare('DELETE FROM store WHERE store_id = :store_id');\n\t\t$this->db->bindParam( ':store_id', $store_id, PDO::PARAM_INT);\n\t\t$this->db->execute();\n\t}",
"public function deleting(SalesOrderItem $salesOrderItem)\n {\n //\n }",
"public function delete_order_item($item_id);",
"function DeleteItem($itemId)\n{\n\tif ($itemId)\n\t{\n\t\t$query = \"DELETE FROM items WHERE ID=:id\";\n\t\t$result = DbExecute($query, array(':id' => $itemId));\n\t}\n}",
"public function delete($item) {\n if (is_array($item)) {\n $item = $item[\"id\"];\n }\n $item = sqlescape($item);\n sqlquery(\"UPDATE `\".$this->Table.\"` SET `delete` = '1' WHERE id = '$item'\");\n BigTreeAutoModule::uncacheItem($item,$this->Table);\n }",
"public function deleted(Item $item)\n {\n //\n }",
"public function deleteCartItem($cartItem);",
"abstract protected function deleteItem();",
"public function delete($buyItemId);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to check amount of specialities | protected function checkAmount(int $count)
{
$specialities = $this->get(route('api.user.profile.specialities.list'))
->assertOk()
->json('specialities');
$this->assertEquals($count, sizeof($specialities));
} | [
"abstract public function shouldCountQuota();",
"public function testGetSpeciality()\n {\n $speciality = new Speciality();\n $speciality->setSpeciality(\"Gynecologue\");\n $speName = $speciality->getSpeciality();\n\n $this->assertEquals(\"Gynecologue\", $speName, \"setNom returns a bad value.\");\n\n $speciality = new Speciality();\n $speciality->setSpeciality(\"Opticien\");\n $speName = $speciality->getSpeciality();\n\n $this->assertEquals(\"Opticien\", $speName, \"setNom returns a bad value.\");\n\n $speciality = new Speciality();\n $speciality->setSpeciality(\"Generaliste\");\n $speName = $speciality->getSpeciality();\n\n $this->assertEquals(\"Generaliste\", $speName, \"setNom returns a bad value.\");\n }",
"public function hasAlphaNuMeasure(){\n\t\t$boolean = TestTypeMeasure::where('test_type_id', $this->id)\n\t\t\t\t\t\t->join('measures', 'testtype_measures.measure_id', '=', 'measures.id')\n\t\t\t\t\t\t->where('measure_type_id', Measure::ALPHANUMERIC);\n\t\treturn $boolean->count();\n\t}",
"public function specialPrice()\n {\n $configuration = Configuration::findOrFail(1);\n if ($this->specialPrice || $configuration->global_discount) {\n\n $configuration->tax_inclusion && $configuration->tax_rate ? $tax = 1 + $configuration->tax_rate / 100 : $tax = 1;\n $this->specialPrice ? $individualDiscount = 1 - $this->specialPrice / 100 : $individualDiscount = 1;\n $configuration->global_discount ? $globalDiscount = 1 - $configuration->global_discount / 100 : $globalDiscount = 1;\n\n $price = $this->basePrice;\n\n return round($price * $individualDiscount * $globalDiscount * $tax, 2);\n } else {\n return false;\n }\n }",
"private function getGiftExist()\n {\n if ($this->brandId == 16 || $this->brandId == 49 || $this->commodityPrice2\n < 1 || $this->commodityPrice2 > 200 || $this->categoryId != 8) {\n return 0;\n }\n return 1;\n }",
"function _isEligibleQuantity()\r\n {\r\n $item = $this->find('first', array(\r\n 'conditions' => array(\r\n 'Item.id' => (!empty($this->data[$this->name]['sub_item_id']) ? $this->data[$this->name]['sub_item_id'] : $this->data[$this->name]['item_id']) ,\r\n ) ,\r\n 'fields' => array(\r\n 'Item.item_user_count',\r\n 'Item.max_limit'\r\n ) ,\r\n 'recursive' => -1\r\n ));\r\n $newTotal = $item['Item']['item_user_count']+$this->data[$this->name]['quantity'];\r\n if ($item['Item']['max_limit'] <= 0 || $newTotal <= $item['Item']['max_limit']) {\r\n return true;\r\n }\r\n if (preg_match(\"/./\", $item['Item']['max_limit'])) {\r\n return false;\r\n }\r\n return false;\r\n }",
"private function countDev(): int\n {\n return $this->countSpeciality();\n }",
"function get_no_of_members_specialpin() {\n\t\t//Connect to mysql server\n\t\t$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);\n\t\tif(!$link) {\n\t\t\tdie('Failed to connect to server: ' . mysql_error());\n\t\t}\n\t\n\t\t//Select database\n\t\t$db = mysql_select_db(DB_DATABASE);\n\t\tif(!$db) {\n\t\t\tdie(\"Unable to select database\");\n\t\t}\n\t\n\t\t$query = \"SELECT crew_id FROM crew WHERE active='true' AND type='senior' AND specialpin NOT LIKE 'not_assigned'\";\n\t\t$result = @mysql_query($query) or die(mysql_error());\n\t\n\t\treturn mysql_num_rows($result);\n\t}",
"protected function validateQty()\r\n\t{\r\n\t\t$val = false;\t\t\t\r\n\t\tif($this->_promoType == 0 || $this->_promoType == 2){\r\n\t\t\tif($this->_cartItemsCount >= $this->_itemLimit)\r\n\t\t\t{\r\n\t\t\t\t$val = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif($this->countItemsinGroup() >= $this->_itemLimit)\r\n\t\t\t{\r\n\t\t\t\t$val = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $val;\t\r\n\t}",
"public function Specialities_get(){\n $check = $this->db->query(\"select * from `wallet_specilization_prices` group by speciality\")->result();\n if(count($check) > 0){\n $i = 0;\n foreach($check as $value){\n $param['specialities'][$i]['speciality'] = $value->speciality;\n $i++;\n }\n $this->response(array('code'=>'200','message'=>'Success','result'=>$param));\n }\n else{\n $param['specialities'] = [];\n $this->response(array('code'=>'201','message'=>'Error','result'=>$param));\n }\n }",
"function validCharLength($string, $isspecialty=0) {\n if ($isspecialty == 1) {\n\tif (strlen($string) > 30) {\n\t echo \"<p style='color: red;'>\" . \"<b>Error: Length of specialty must be less that or equal to 30 characters</b>\" . \"</p>\";\n\t return False;\n\t}\n }\n if (strlen($string) > 20) {\n\techo \"<p style='color: red;'>\" . \"<b>Error: Length of names must be less that or equal to 20 characters</b>\" . \"</p>\";\n\treturn False;\n }\n return True;\n}",
"public function amountRequired();",
"static public function shouldCountQuota()\n\t{\n\t\treturn true;\n\t}",
"public function DA_CantidadPrefacturaNpls();",
"public function isSufficient()\n {\n return $this->quantity > 0;\n }",
"public function shouldCountQuota()\n\t{\n\t\treturn false;\n\t}",
"protected function _count_restrictions ()\n {\n $Result = parent::_count_restrictions ();\n $Result [] = $this->_usable_restriction;\n return $Result;\n }",
"function expert_cv_education_check_count($contact_id) {\n global $user;\n civicrm_initialize();\n $group_info = civicrm_api3('CustomGroup', 'getsingle', array('name' => 'Education'));\n $count = _pum_expert_mycv_get_record_count($contact_id, $group_info['table_name']);\n if (!empty($group_info['max_multiple']) && $count >= $group_info['max_multiple']) {\n drupal_set_message(t('You cannot have more than @count education items', array('@count' => $group_info['max_multiple'])), 'error');\n if (in_array(\"Expert\", $user->roles)) {\n drupal_goto('expert/my-cv');\n } elseif (in_array(\"Candidate expert\", $user->roles)) {\n drupal_goto('portal');\n }\n }\n}",
"public function hasQuantity() : bool;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves all rows for Accounts_Yahoo. | Public Function getAllYahooAccounts()
{
$Yahoo = new Accounts_Yahoo();
return $Yahoo->GetAll();
} | [
"function yahooYQL() {\n\t\tif (isset($this->params['codes'])) {\n\t\t\t// Form YQL query and build URI to YQL Web service\n\t\t\t$codes = $this->params['codes'];\n\t\t\t$yql_query = \"select * from yahoo.finance.quotes where symbol in ('$codes')\";\n\t\t\t$yql_query_url = YAHOO_YQL_API_URL . \"?q=\" . urlencode($yql_query) \n\t\t\t\t. \"&format=json\"\n\t\t\t\t. \"&env=http%3A%2F%2Fdatatables.org%2Falltables.env\";\n\n\t\t\t$json = $this->call($yql_query_url);\n\n\t\t\techo $json;\n\t\t} else {\n\t\t\tthrow new Exception(\"Codes are missing\");\n\t\t}\n\t}",
"public function retrieveAllQuotes()\r\n {\r\n try {\r\n $url = '/quotes/get';\r\n $response = $this->callCrystal($url, $this->data);\r\n return $response;\r\n } catch (RequestException $e) {\r\n $response = $this->StatusCodeHandling($e);\r\n return $response;\r\n }\r\n }",
"private function queryYQL()\n {\n // validate dates\n $this->validateDate();\n\n if (empty($this->startDate)) {\n $this->startDate = '';\n }\n if (empty($this->endDate)) {\n $this->endDate = '';\n }\n\n // set yql query\n $yql_query = 'select * from yahoo.finance.historicaldata where symbol = \"';\n $yql_query .= $this->queryString . '\" and startDate=\"' . $this->startDate . '\" and endDate=\"' . $this->endDate . '\"';\n\n // set request url\n $this->baseUrl = 'http://query.yahooapis.com/v1/public/yql?q=';\n $config = '&format=json&env=http://datatables.org/alltables.env&callback=';\n $this->queryUrl = $this->baseUrl . urlencode($yql_query) . $config;\n\n // curl request\n $this->curlRequest($this->queryUrl);\n\n if (404 == $this->response['status']) {\n return $data = [];\n }\n\n // read json\n $object = json_decode($this->response['result']);\n // check if some data is returned\n if (is_null($object->query->results)) {\n $data = null;\n } else {\n // select object node\n $data = $object->query->results->quote;\n\n // put single object into array to unify $data\n if (is_object($data)) {\n $data = [$data];\n }\n // cast single datasets to array\n foreach ($data as &$dataSet) {\n if (is_object($dataSet)) {\n $dataSet = (array) $dataSet;\n }\n }\n unset($dataSet);\n }\n\n return $data;\n }",
"public function getAllAccounts()\n { \n\n $accounts = fetch_all(\"SELECT `id`, `label`, `user`,\n `api_key`, `logo_path`, `is_live`, `has_cc`, `type`\n FROM `pmt_account`\n WHERE 1\n ORDER BY `is_live` DESC\");\n\n $this->hasAccounts = !empty($accounts);\n\n return $accounts;\n }",
"public function getAllAccounts()\n {\n $this->params['tableName'] = 'account';\n $excludeDeleted = $this->getOrDefault('GET.excludeDeleted', '');\n $query = \"\";\n if (!empty($excludeDeleted)) {\n $query = \"deleteAt eq ''\";\n }\n\n return $this->execQuery($query, 1000, null, null, '_config');\n }",
"public function fetchAllRows();",
"function get_all_aq2emp_accounts()\n {\n return $this->db->get('aq2emp_accounts')->result_array();\n }",
"public static function getAll(){\r\n $SQL = 'SELECT * FROM cash ORDER BY cash_id;';\r\n $prep= Database::getInstance()->prepare($SQL);\r\n $prep->execute();\r\n return $prep->fetchAll(PDO::FETCH_OBJ);\r\n }",
"public static function retrieveAll () {\n return self::retrieve()\n ->setRowClass('Model_Entity')\n ->fetchAll();\n }",
"public function getallchartaccounttype()\n {\n $query = $this->connection->prepare(\"SELECT * FROM gpx_chartaccounts_type ORDER BY name\");\n $query->execute();\n $result = $query->fetchAll();\n return $result;\n }",
"public function getCompanyAll();",
"public function getAllRows(){\n $query = $this->db->prepare(\"SELECT * FROM $this->table\");\n $query->execute();\n return $query->fetchAll();\n }",
"Public Function GetAllUsersWithAPICredit()\n\t{\n\t\t$Rows = $this->_db->fetchAll('SELECT * FROM bevomedia_adwords_api_credit WHERE deleted = 0');\n\t\treturn $Rows;\n\t}",
"public function getAllAccount()\n\t{\n\t\t$sql = \"SELECT * FROM account_type;\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t\n\t}",
"public function Findallcompanies()\n {\n \treturn TblAcaCompanies::find()->joinWith('client')->where(['tbl_aca_clients.is_deleted'=>0])->All();\n }",
"private function download() {\n //use test data if running as test\n if ($this->runastest) {\n $response = file_get_contents(dirname(__FILE__). '/../../tests/yahooTestData.json');\n }\n else {\n $base = 'USD';\n if ($this->settings['use-ssl']) {\n $url = 'https';\n } else {\n $url = 'http';\n }\n\n $url .= '://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.xchange%20where%20pair%20in%20(%22';\n\n foreach ($this->yahooCurrencies as $currency) {\n $url .= \"$base$currency%2C\";\n }\n $url .= '%22)&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys';\n $this->url = $url;\n $response = $this->connect($url);\n }\n\n return $response;\n }",
"public static function GetAll() {\n $connection = Database::Connect();\n \n return $connection->query(\"SELECT * FROM CUSTOMERS\")->fetchAll();\n }",
"function fetch() {\n\n $params = array('access_token' => $_SESSION['yahoo_access_token'],\n 'format' => 'json');\n try {\n // Need to use HTTPS\n $this->_url = 'https://social.yahooapis.com/v1/user/me/profile?' . http_build_query($params);\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->_url);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);\n ob_start();\n curl_exec($ch);\n curl_close($ch);\n $response = ob_get_contents();\n ob_end_clean();\n $data=json_decode($response);\n if(isset($data->error) && isset($_SESSION['refresh_token']) && !empty($_SESSION['refresh_token'])){\n $yahooSettings = (array) Engine_Api::_()->getApi('settings', 'core')->sitelogin_yahoo;\n $client_id = isset($yahooSettings['clientId']) ? $yahooSettings['clientId'] : 0;\n $client_secret = isset($yahooSettings['clientSecret']) ? $yahooSettings['clientSecret'] : 0;\n $redirect_uri = Engine_Api::_()->sitelogin()->getRedirectUrl('yahoo');\n $params = array(\n 'grant_type' => 'refresh_token',\n 'client_id' => $client_id,\n 'client_secret' => $client_secret, \n 'refresh_token' => $_SESSION['refresh_token'],\n 'redirect_uri' => $redirect_uri,\n );\n \n $client = new Zend_Http_Client();\n $client->setUri('https://api.login.yahoo.com/oauth2/get_token')\n ->setMethod(Zend_Http_Client::POST)\n ->setParameterPost($params);\n // Process response\n $response = $client->request();\n $responseData = $response->getBody();\n $responseData = Zend_Json::decode($responseData, Zend_Json::TYPE_ARRAY);\n $_SESSION['yahoo_access_token'] = $responseData['access_token'];\n $_SESSION['refresh_token'] = $responseData['refresh_token'];\n $this->_url = 'https://social.yahooapis.com/v1/user/me/profile?' . http_build_query($params);\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->_url);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);\n ob_start();\n curl_exec($ch);\n curl_close($ch);\n $response = ob_get_contents();\n ob_end_clean();\n }\n } catch (Exception $ex) {\n throw $ex;\n }\n return json_decode($response);\n }",
"public static function all()\n\t{\n\t\t$db = new DB;\n\t\treturn $db->query('SELECT * FROM `orders`');\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new Characteristic\Characteristic entity. | public function createAction(Request $request)
{
$entity = new Characteristic();
$form = $this->createCreateForm($entity);
$form->handleRequest($request);
if ($form->isValid()) {
if (Characteristic::SELECT_POLICY_MANY == $entity->getSelectPolicy()) {
/** @var Value $value */
foreach ($entity->getValues() as &$value) {
$value->setCharacteristic($entity);
}
} else {
foreach ($entity->getValues() as $value) {
$entity->removeValue($value);
}
}
$em = $this->getDoctrine()->getManager();
$em->persist($entity);
$em->flush();
return $this->redirect($this->generateUrl('orkestro_backend_product_characteristic_show', array('id' => $entity->getId())));
}
return array(
'entity' => $entity,
'form' => $form->createView(),
);
} | [
"public function getChCharacteristic()\n {\n return $this->hasOne(Characteristics::class, ['id' => 'ch_characteristic_id']);\n }",
"public function createCharity()\n {\n // TODO: Implement createCharity() method.\n }",
"public function SaveCharacteristic() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtTitle) $this->objCharacteristic->Title = $this->txtTitle->Text;\n\t\t\t\tif ($this->txtDescription) $this->objCharacteristic->Description = $this->txtDescription->Text;\n\t\t\t\tif ($this->txtPicturesPath) $this->objCharacteristic->PicturesPath = $this->txtPicturesPath->File;\n\t\t\t\tif ($this->lstCharacteristicIdcharacteristicObject) $this->objCharacteristic->CharacteristicIdcharacteristic = $this->lstCharacteristicIdcharacteristicObject->SelectedValue;\n\t\t\t\tif ($this->lstSpeciesIdspeciesObject) $this->objCharacteristic->SpeciesIdspecies = $this->lstSpeciesIdspeciesObject->SelectedValue;\n\t\t\t\tif ($this->txtIdentifier) $this->objCharacteristic->Identifier = $this->txtIdentifier->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Characteristic object\n\t\t\t\t$this->objCharacteristic->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}",
"public function createCharity();",
"public function createNewCharacter()\n {\n $this->output->info(\"Create a new Character!\");\n\n $name = $this->output->ask(\"What is your character's name?\");\n\n $this->output->info(\"Thanks! Lets start the game!\");\n\n $this->character = new Character([\"name\" => $name]);\n\n $this->save();\n }",
"function getCharacteristic()\n\t{\n\t\tif (is_object($this->par_node))\n\t\t{\n\t\t\treturn $this->par_node->get_attribute(\"Characteristic\");\n\t\t}\n\t}",
"public function get($charId): Characteristic\n {\n return $this->characteristics->get($charId);\n }",
"public function createEntity();",
"public function character(): Character\n {\n return new Character($this->client);\n }",
"function setCharacteristic($a_char)\n\t{\n\t\tif (!empty($a_char))\n\t\t{\n\t\t\t$this->sec_node->set_attribute(\"Characteristic\", $a_char);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->sec_node->has_attribute(\"Characteristic\"))\n\t\t\t{\n\t\t\t\t$this->sec_node->remove_attribute(\"Characteristic\");\n\t\t\t}\n\t\t}\n\t}",
"public static function createEntity();",
"public function setCharacteristics(\\horstoeko\\ubl\\entities\\cbc\\Characteristics $characteristics)\n {\n $this->characteristics = $characteristics;\n return $this;\n }",
"public function getCharacteristicId() : CharacteristicId\n\t{\n\t\treturn $this->characteristicId;\n\t}",
"public function create() {\n $entity = new stdClass();\n $entity->tid = 0; // Transaction-ID\n $entity->rid = 0; // Recipient-ID\n $entity->sid = 0; // Sender-ID\n $entity->iid = 0; // Initiator-ID\n $entity->amount = 0; // Amount... d'uh\n $entity->tstamp = 0; // Timestamp \n $entity->txt = null; // Transaction-Text\n $entity->ttype = 0; // Transaction-Type (taxonomy reference)\n $entity->signature = null; // The transaction-checksum\n $entity->balance = 0; // The recipient's balance after a successful transaction\n\n $entity->counter = TRUE; // Whether we need a counter-transaction (false = adjustment)\n $entity->signature_ok = FALSE; // I'm not a very trusting soul...\n return $entity;\n }",
"public function created(Character $character)\n {\n // Assign an occupation\n $occupation = \\App\\Occupation::get()->random();\n $character->occupation()->save($occupation);\n\n // Assign traits\n $availableAttributes = \\App\\Attribute::get();\n $attributes = [];\n for ($i=0;$i<rand(1,3);$i++) {\n $attributes[] = $availableAttributes->random();\n }\n\n $character->attributes()->save($attributes);\n }",
"public function createCustomer()\n {\n\t\t$contact = $this;\n\t\t$customer = $this->service->instance->customers()->create();\n\t\t$customer->responsible_user_id = $this->responsible_user_id;\n\t\t$customer->attachContact($this);\n\n\t\t$customer->onCreate(function(&$model) use (&$contact) {\n\t\t\t$contact->attachCustomer($model);\n\t\t});\n\t\treturn $customer;\n\t}",
"public function create()\n {\n $stats = $this->getPlayerStats();\n $orderus = new Hero();\n $orderus->setName('Orderus');\n $orderus->setStats($stats);\n $orderus->setOptimalSkillSelector(new OptimalSkillSelectorService());\n $orderus->setChance(new LuckyService());\n $skills = $this->getSkills($orderus);\n $orderus->setSkills($skills);\n $orderus->setBroadcaster($this->broadcaster);\n return $orderus;\n\n }",
"public function actionCreate()\n {\n $model = new Chowmatistic();\n\n if ($model->load(Yii::$app->request->post())) {\n\n\t\t\t$model->profit2 = $model->profit * $model->final_price;\n\t\t\t$model->commission2 = $model->commission * $model->final_price;\n\n \tif ($model->save()) {\n\t\t\t\treturn $this->redirect('index');\n\t\t\t}\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create() {\n $entity = new stdClass();\n $entity->ttid = 0; // Transaction Type-ID.\n $entity->active = 0; // Active?\n $entity->locked = 0; // Locked type, cannot be edited.\n $entity->selectable = 0; // Whether this item can be selected during a standard transaction.\n $entity->category = ''; // The category in which the Transaction Type should appear.\n $entity->name = ''; // Short name of the Transaction Type.\n $entity->description = ''; // Name of the Transaction Type.\n\n return $entity;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get a photos album id | function wppa_get_album_id_by_photo_id($id) {
global $thumb;
if ( ! is_numeric($id) || $id < '1' ) wppa_dbg_msg('Invalid arg wppa_get_album_id_by_photo_id('.$id.')', 'red');
wppa_cache_thumb($id);
return $thumb['album'];
} | [
"public function getAlbumId();",
"public function getAlbumId()\n {\n return $this->album_id;\n }",
"public function getIdAlbum() {\n\t\treturn $this->idAlbum;\n\t}",
"public function getAlbumId()\n {\n return $this->_albumId;\n }",
"public function getGalleryId() {\n $id_url_regex = '/(http|https)?:?(\\/\\/)?(w*\\.)?flickr\\.com\\/photos\\/flickr\\/galleries\\/[0-9]+/';\n preg_match($id_url_regex, $this->url, $match);\n $this->url = $match[0];\n $json = file_get_contents('https://api.flickr.com/services/rest/?' .\n 'method=flickr.urls.lookupGallery&' .\n 'api_key=' . $this->api_key . '&' .\n 'url=' . $this->url . '&format=json&nojsoncallback=1');\n $data = json_decode($json);\n\n return $data->{'gallery'}->{'id'};\n }",
"public function getPhotoId() {\n $id_regex = '/[0-9]+/';\n preg_match($id_regex, $this->url, $match);\n return $match[0];\n }",
"public function getMembersAlbumId()\n\t{\n\t\treturn intval( $this->settings['gallery_members_album'] );\n\t}",
"public function getAlbum($id);",
"function getAlbumOfSong($id) {\n\tglobal $accessToken;\n\n\t$url = \"https://api.spotify.com/v1/tracks/$id\";\n\t$headers = array();\n\t$headers[] = 'Accept: application/json';\n\t$headers[] = \"Authorization: Bearer $accessToken\";\n\n\t$data = performRequest($headers, $url);\n\t$album = $data[\"album\"];\n\t$id = $album[\"id\"];\n\treturn $id;\n}",
"public function findAlbum($id);",
"function getAlbum($id)\n {\n return $this->albums[$id];\n }",
"public function getMainAlbumId()\n {\n return $this->main_album_id;\n }",
"public function album()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" album ?\");\n\t}",
"public function getPhotoId()\r\n\t{\r\n\t\treturn $this->photoId;\r\n\t}",
"public function getPhotoId()\n {\n return $this->photoId;\n }",
"public function getId($album = NULL)\n {\n if(is_null($album))\n {\n //Si cargue todos los albums\n if(is_null($this->album_loaded))\n {\n if(array_key_exists(mdMedia::$default, $this->hashMap))\n {\n return $this->albums[$this->hashMap[mdMedia::$default]]->id;\n }\n else\n {\n throw new Exception('The album ' . mdMedia::$default . ' is not loaded', 102);\n }\n }\n //Si cargue un album en particular\n else\n {\n return $this->albums[$this->hashMap[$this->album_loaded]]->id;\n }\n }\n else\n {\n if(array_key_exists($album, $this->hashMap))\n {\n return $this->albums[$this->hashMap[$album]]->id;\n }\n else\n {\n throw new Exception('The album ' . $album . ' is not loaded', 102);\n }\n }\n }",
"protected function getAlbumId($albumName) {\n\t\t$sql = \"SELECT ID \";\n\t\t$sql .= \"FROM album \";\n\t\t$sql .= 'WHERE Name = \"' . $albumName . '\"';\n\t\n\t\t$query = Database::executeQuery($sql);\n\t\twhile ($album = mysqli_fetch_array($query)) {\n\t\n\t\t\t$id = $album['ID'];\n\n\t\t}\n\t\treturn $id;\n\t}",
"public function PhotoId() {\n if ( $this->metaInfo && !empty( $this->metaInfo['photoIds'] ) ) {\n return reset( $this->metaInfo['photoIds'] );\n }\n\n return null;\n }",
"public function getPhoto_id()\n {\n return $this->photo_id;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Mark Product flat indexer as invalid | public function markIndexerAsInvalid()
{
if (!$this->_state->isFlatEnabled()) {
return;
}
$this->getIndexer()->invalidate();
} | [
"public function testMarkIndexerAsInvalid()\n {\n $this->_stateMock->expects($this->once())->method('isFlatEnabled')->will($this->returnValue(true));\n $this->_indexerMock->expects($this->once())->method('invalidate');\n $this->prepareIndexer();\n $this->_model->markIndexerAsInvalid();\n }",
"public function setInvalid();",
"protected function invalidateIndex()\n {\n $this->labelIndexer->invalidateIndex();\n }",
"public function markAsIndexed(): void\n {\n return; // Perform some kind of action to indicate this object has been indexed\n }",
"public function setInvalid()\n {\n $this->valid = false;\n }",
"public function hasValidIndex();",
"private function checkMagentoIndexersInvalid()\n {\n return empty($this->_klevuIndexer->getInvalidIndexers()) ? false : true;\n }",
"public function markAsIndexed(): void\n {\n // TODO: Implement markAsIndexed() method.\n }",
"public function testDisabledProduct() : void\n {\n $this->runIndexer();\n $this->disableProduct();\n $this->runIndexer();\n $this->validateDisabledProduct($this->getExtractedProduct(self::SKU, self::STORE_VIEW_CODE));\n }",
"protected function clearIndexIfAllKeysValid(): void\n {\n if (is_null($this->index) || $this->lazyTail->valid()) {\n return;\n }\n\n $allKeysValid = true;\n\n foreach ($this->index as $safeKey => $unsafeKey) {\n if ($safeKey !== $unsafeKey) {\n $allKeysValid = false;\n break;\n }\n }\n\n if ($allKeysValid) {\n // this causes $this->areAllKeysValid() to start returning true\n $this->index = null;\n }\n }",
"public function testInvalidProductEntity()\n {\n $invalidProduct = $this->getEntity();\n $invalidProduct->setName('')\n ->setDescription('pr')\n ->setManufacturer(23.21)\n ->setScreen('aed')\n ->setDas('')\n ->setWeight('ze')\n ->setLength('')\n ->setWidth('')\n ->setHeight(true)\n ->setWifi('')\n ->setVideo4k(123)\n ->setBluetooth('')\n ->setCamera('');\n $this->assertHasErrors($invalidProduct, 15);\n }",
"public function installDoesNotAddIndexOnChangedColumn() {}",
"private function isIndexInvalidationNeeded(AbstractModel $attribute): bool\n {\n $attributes = $this->productAttributes->getIndexedAttributes();\n return !$attribute->isObjectNew() && in_array($attribute->getAttributeCode(), $attributes);\n }",
"public function testFail9()\n {\n $invalidRecord = new InvalidIndexConfig();\n\n $this->setExpectedException('yii\\base\\InvalidConfigException');\n $invalidRecord->indexes;\n }",
"public abstract function hasIndexer();",
"public function setNonexistent();",
"function testInvalidPropertySet() {\n\t\t$o = new \\Scrivo\\ModifiedTouched(self::$context);\n\t\t$o->sabicasElRey = \"el mejor\";\n\t}",
"public function invalidate() {\n\t\t$this->valid = false;\n\t}",
"public function invalidIndexTypeProvider() {\n return array(\n array(-1),\n array('foo'),\n array(null),\n array(true)\n );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Wraps results in appropriate results class for this UserTimeline execution. | protected function wrapResults($outputs)
{
return new Twitter_Timelines_UserTimeline_Results($outputs);
} | [
"protected function wrapResults($outputs)\n {\n return new _23andMe_User_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Box_Users_GetCurrentUser_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Tumblr_User_RetrieveUserDashboard_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Withings_User_GetUser_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Disqus_Threads_VoteOnThread_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Disqus_Users_FollowUser_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Zendesk_Users_ShowUser_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Tumblr_User_GetUserInformation_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Dwolla_Contacts_UserContacts_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new eBay_Shopping_GetUserProfile_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new LastFm_User_GetWeeklyTrackChart_Results($outputs);\n }",
"private function setResults() {\n\n // Start with just their own submissions.\n $uids = array($GLOBALS['user']->uid);\n\n // User is simplequiz administrator.\n if ($this->getAccountIsAdministrator()) {\n\n // They can see all user submissions on this quiz.\n $uids = db_select('simplequiz_submission', 's')\n ->fields('s', array('uid'))\n ->condition('snid', $this->getNodeWrapper()->nid->value())\n ->distinct()\n ->execute()\n ->fetchCol();\n }\n\n // Accounts that have submissions the user can view.\n foreach ($uids as $uid) {\n\n // Add the stats to the result.\n $this->results[$uid] = new SimpleQuizAccountQuizStats($this->getNodeWrapper(), $uid);\n }\n }",
"protected function wrapResults($outputs)\n {\n return new Zendesk_Users_SearchUsers_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Instagram_GetLikedMediaForUser_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Zendesk_Tickets_ListTicketsByUser_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Disqus_Users_ListActiveForums_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Tumblr_Post_RetrieveQueuedPosts_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new LastFm_User_GetWeeklyChartList_Results($outputs);\n }",
"protected function wrapResults($outputs)\n {\n return new Clicky_TopStatsLastWeek_Results($outputs);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets the previous media depending on criteria. options include: vInfo: the media info array | function getPreviousMedia($vInfo, $_type) {
// Changed by Anthony Malak 28-04-2015 to PDO database
global $dbConn;
$params = array();
// if ($_type == 'i' || $_type == 'v') {
// $query = "SELECT * FROM cms_videos WHERE id = (select max(id) FROM cms_videos WHERE id < " . $vInfo['id'] . " AND published=1 AND image_video = '" . $_type . "' AND channelid = '" . $vInfo['channelid'] . "' AND userid = " . $vInfo['userid'] . " AND NOT EXISTS (SELECT video_id FROM cms_videos_catalogs WHERE video_id=id) ) ORDER BY pdate DESC LIMIT 0,1";
// } else {
// $query = "SELECT * FROM cms_videos WHERE id = (select max(id) FROM cms_videos WHERE id < " . $vInfo['id'] . " AND published=1 AND channelid = '" . $vInfo['channelid'] . "' AND userid = " . $vInfo['userid'] . " AND NOT EXISTS (SELECT video_id FROM cms_videos_catalogs WHERE video_id=id) ) ORDER BY pdate DESC LIMIT 0,1";
// }
// $ret = db_query($query);
// if (!$ret || (db_num_rows($ret) == 0)) {
// return false;
// } else {
// $ret_arr = array();
// $row = db_fetch_array($ret);
// return $row;
// }
if ($_type == 'i' || $_type == 'v') {
$query = "SELECT * FROM cms_videos WHERE id = (select max(id) FROM cms_videos WHERE id < :Id AND published=1 AND image_video = :Type AND channelid = :Channelid AND userid = :Userid AND NOT EXISTS (SELECT video_id FROM cms_videos_catalogs WHERE video_id=id) ) ORDER BY pdate DESC LIMIT 0,1";
$params[] = array( "key" => ":Id",
"value" =>$vInfo['id']);
$params[] = array( "key" => ":Type",
"value" =>$_type);
$params[] = array( "key" => ":Channelid",
"value" =>$vInfo['channelid']);
$params[] = array( "key" => ":Userid",
"value" =>$vInfo['userid']);
} else {
$query = "SELECT * FROM cms_videos WHERE id = (select max(id) FROM cms_videos WHERE id < :Id AND published=1 AND channelid = :Channelid'] AND userid = :Userid AND NOT EXISTS (SELECT video_id FROM cms_videos_catalogs WHERE video_id=id) ) ORDER BY pdate DESC LIMIT 0,1";
$params[] = array( "key" => ":Id",
"value" =>$vInfo['id']);
$params[] = array( "key" => ":Channelid",
"value" =>$vInfo['channelid']);
$params[] = array( "key" => ":Userid",
"value" =>$vInfo['userid']);
}
$select = $dbConn->prepare($query);
PDO_BIND_PARAM($select,$params);
$res = $select->execute();
$ret = $select->rowCount();
if (!$res || ($ret == 0)) {
return false;
} else {
$row = $select->fetch();
return $row;
}
// Changed by Anthony Malak 28-04-2015 to PDO database
} | [
"public function skipToPrevious() {\n\n //Get the instance of MPlayerWrapper so we can call methods on it.\n $MPlayer = MPlayerWrapper::getInstance();\n $MPlayer->skipToPreviousFile(); //Get and set the previous record to play.\n\n }",
"public function getPreviousPlays():? array;",
"public function Previous_AV() {\n $this->processSoapCall(\"/upnp/control/AVTransport1\",\n\n \"urn:schemas-upnp-org:service:AVTransport:1\",\n\n \"Previous\",\n\n array(\n\n new SoapParam(\"0\",\"InstanceID\")\n\n ));\n }",
"public function previousImage () {}",
"function getNextMedia($valbum, $media_id)\n{\n\t$next_one = false;\n\t$mediasdate_map = getListOfDatePerMediasFromValbum($valbum, false);\n\tforeach ($mediasdate_map as $media_file => $date)\n\t{\n\t\tif ($media_file == \\MediaAccess\\getRealMediaFile($valbum['album'], $media_id)) $next_one = true;\n\t\telse if ($next_one) return basename($media_file);\n\t}\n\treturn null;\n}",
"public function prev()\r\n\t{\r\n $this->callApi('/v1/me/player/previous', 'POST');\r\n }",
"function Previous() {\n\t\tif ( $this->debugging ) echo \"mpd->Previous()\\n\";\n\t\tif ( ! is_null($rpt = $this->SendCommand(MPD_CMD_PREV))) $this->RefreshInfo();\n\t\tif ( $this->debugging ) echo \"mpd->Previous() / return\\n\";\n\t\treturn $rpt;\n\t}",
"public function previousimage(){}",
"private function getNextPrevIds() {\n $arrReturn = array();\n\n //Load all images on the current level\n $objCur = class_objectfactory::getInstance()->getObject($this->getSystemid());\n $arrImagesLevel = class_module_mediamanager_file::loadFilesDB($objCur->getPrevId(), class_module_mediamanager_file::$INT_TYPE_FILE, true);\n //Sort out the unallowed ones\n foreach($arrImagesLevel as $intKey => $objOneImage) {\n if(!$objOneImage->rightView())\n unset($arrImagesLevel[$intKey]);\n }\n\n //make array-keys numeric\n /** @var $arrImagesLevel class_module_mediamanager_file[] */\n $arrImagesLevel = array_values($arrImagesLevel);\n //Search the current image\n $intKeyHit = 0;\n foreach ($arrImagesLevel as $intKeyHit => $objOneImage) {\n if($objOneImage->getSystemid() == $this->getSystemid()) {\n break;\n }\n }\n\n $arrReturn[\"forward_1\"] = (isset($arrImagesLevel[$intKeyHit+1]) ? $arrImagesLevel[$intKeyHit+1]->getSystemid() : \"\");\n $arrReturn[\"forward_2\"] = (isset($arrImagesLevel[$intKeyHit+2]) ? $arrImagesLevel[$intKeyHit+2]->getSystemid() : \"\");\n $arrReturn[\"forward_3\"] = (isset($arrImagesLevel[$intKeyHit+3]) ? $arrImagesLevel[$intKeyHit+3]->getSystemid() : \"\");;\n\n $arrReturn[\"backward_1\"] = (isset($arrImagesLevel[$intKeyHit-1]) ? $arrImagesLevel[$intKeyHit-1]->getSystemid() : \"\");;\n $arrReturn[\"backward_2\"] = (isset($arrImagesLevel[$intKeyHit-2]) ? $arrImagesLevel[$intKeyHit-2]->getSystemid() : \"\");;\n $arrReturn[\"backward_3\"] = (isset($arrImagesLevel[$intKeyHit-3]) ? $arrImagesLevel[$intKeyHit-3]->getSystemid() : \"\");;\n\n return $arrReturn;\n }",
"function previous() {\n\t\t\tif ($this->PreviousPhoto) {\n\t\t\t\treturn $this->PreviousPhoto;\n\t\t\t}\n\t\t\t$this->getContext();\n\t\t\treturn $this->PreviousPhoto;\n\t\t}",
"public function Previous()\n\t{\n\t\t$this->_addLog(__METHOD__,\"send\");\n\t\tif ( !is_null($rpt = $this->SendCommand(self::MPD_CMD_PREV)) ){\n\t\t $this->GetStatus();\n\t\t $this->GetCurrentSong();\n\t\t}\n\t\t$this->_addLog(__METHOD__,\"response: '\".$rpt.\"'\");\n\t\treturn $rpt;\n\t}",
"public function getPrev($criteria = false);",
"private function previousQuery(){\n \n $mesprev=($this->mes=='1')?'12':(($this->mes-1).'');\n $anioPrev=($this->mes=='1')?(($this->ejercicio-1).''):$this->ejercicio;\n return $this->getSigiDetfacturacion()->where(['mes'=>$mesprev,'anio'=>$anioPrev]);\n }",
"protected function prepareMedia () {\n\t\t// if there is only one allowed version, do not process anything else\n\t\tif (count($this->allowedMediaVersionsAndUrlValues) < 2) {\n\t\t\t$this->mediaSiteVersion = static::MEDIA_VERSION_FULL;\n\t\t\t$this->requestMediaSiteVersion = $this->mediaSiteVersion;\n\t\t\treturn;\n\t\t}\n\n\t\t//if ($this->stricModeBySession) { // check it with any strict session configuration to have more flexible navigations\n\t\t\t$sessStrictModeSwitchUrlParam = static::URL_PARAM_SWITCH_MEDIA_VERSION;\n\t\t\tif (isset($this->requestGlobalGet[$sessStrictModeSwitchUrlParam])) {\n\t\t\t\t$switchUriParamMediaSiteVersion = strtolower($this->requestGlobalGet[$sessStrictModeSwitchUrlParam]);\n\t\t\t\tif (isset($this->allowedMediaVersionsAndUrlValues[$switchUriParamMediaSiteVersion]))\n\t\t\t\t\t$this->switchUriParamMediaSiteVersion = $switchUriParamMediaSiteVersion;\n\t\t\t}\n\t\t//}\n\t\t\n\t\t// look into session object if there are or not any record about recognized device from previous request:\n\t\t$mediaVersionUrlParam = static::URL_PARAM_MEDIA_VERSION;\n\t\tif (isset($this->session->{$mediaVersionUrlParam})) {\n\t\t\t$sessionMediaSiteVersion = $this->session->{$mediaVersionUrlParam};\n\t\t\tif (isset($this->allowedMediaVersionsAndUrlValues[$sessionMediaSiteVersion]))\n\t\t\t\t$this->sessionMediaSiteVersion = $this->session->{$mediaVersionUrlParam};\n\t\t}\n\t\t\n\t\t// set up current media site version from url string\n\t\t$this->prepareRequestMediaVersionFromUrl();\n\t}",
"public function getPlaylistVideoPreviousPageData() {\n if (trim($this->playlistPreviousPage) === '') {\n return false;\n }\n\n $this->playlistPageNumber -= 1;\n $items = $this->loadPlaylistVideo($this->playlistId, $this->playlistMaxResult, $this->playlistPreviousPage, $this->playlistOrder);\n\n return $items;\n }",
"public function getPreviousImage() {\r\n\t\treturn $this->getGalleryImages('previous');\r\n\t}",
"public function previousImage() {\n\t}",
"public function previousRecord();",
"public function fetchPrevious();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show version info for the current task and kill the script | public static function showVersionInformation(Event $ev)
{
$task = $ev->getData('task');
$script = Cli::getScriptName();
$version = $task::VERSION;
Env::log("$script version $version\n");
Env::terminate(0);
} | [
"private function showVersion()\n\t{\n\t\techo 'Fork version: ' . VERSION;\n\t\texit;\n\t}",
"public function finalizeversionTask()\n\t{\n\t\t// get vars\n\t\tif (!$this->_toolid)\n\t\t{\n\t\t\t$this->_toolid = Request::getInt('toolid', 0);\n\t\t}\n\n\t\t// Create a Tool object\n\t\t$obj = new \\Components\\Tools\\Tables\\Tool($this->database);\n\n\t\t// do we have an alias?\n\t\tif ($this->_toolid == 0)\n\t\t{\n\t\t\tif (($alias = Request::getString('app', '')))\n\t\t\t{\n\t\t\t\t$this->_toolid = $obj->getToolId($alias);\n\t\t\t}\n\t\t}\n\n\t\t// make sure user is authorized to go further\n\t\tif (!$this->_checkAccess($this->_toolid))\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('COM_TOOLS_ALERTNOTAUTH'));\n\t\t\treturn;\n\t\t}\n\n\t\t$newstate = Request::getString('newstate', '');\n\t\t//$priority = Request::getInt('priority', 3);\n\t\t//$access = Request::getInt('access', 0);\n\t\t//$newversion = Request::getString('newversion', '');\n\t\t$editversion = Request::getString('editversion', 'dev');\n\n\t\t$hzt = \\Components\\Tools\\Models\\Tool::getInstance($this->_toolid);\n\t\t$hztv = $hzt->getRevision($editversion);\n\n\t\t$oldstatus = ($hztv) ? $hztv->toArray() : array();\n\t\t$oldstatus['toolstate'] = $hzt->state;\n\n\t\tif ($newstate && !intval($newstate))\n\t\t{\n\t\t\t$newstate = \\Components\\Tools\\Helpers\\Html::getStatusNum($newstate);\n\t\t}\n\n\t\t$hzt->state = $newstate;\n\t\t$hzt->state_changed = Date::toSql();\n\t\t$hzt->update();\n\n\t\t$status = $hztv->toArray();\n\t\t$status['toolstate'] = $hzt->state;\n\t\t// update history ticket\n\t\tif ($oldstatus != $status)\n\t\t{\n\t\t\t$this->_newUpdateTicket($hzt->id, $hzt->ticketid, $oldstatus, $status, '');\n\t\t}\n\n\t\t$this->_msg = Lang::txt('COM_TOOLS_NOTICE_STATUS_CHANGED');\n\n\t\t$this->statusTask();\n\t}",
"public function actionVersion()\n {\n $this->stdout('Application Version: ');\n $this->stdout(getenv('APP_NAME') . ' ');\n $this->stdout(APP_VERSION . \"\\n\");\n }",
"public static function getVersionCommand() {}",
"protected function _version()\n {\n $terminal = $this->terminal();\n if (!$this->commandLine()->get('no-header')) {\n $terminal->write($terminal->kahlan() .\"\\n\\n\");\n $terminal->write($terminal->kahlanBaseline(), 'dark-grey');\n $terminal->write(\"\\n\\n\");\n }\n\n $terminal->write(\"version \");\n $terminal->write(static::VERSION, 'green');\n $terminal->write(\"\\n\\n\");\n $terminal->write(\"For additional help you must use \");\n $terminal->write(\"--help\", 'green');\n $terminal->write(\"\\n\\n\");\n QuitStatement::quit();\n }",
"function finish()\n {\n // echo \"task finished {$this->pid}\\n\";\n }",
"public function version()\n {\n $this->setGlobalIndent(0);\n $version = file_get_contents(__DIR__.'/../../.version');\n echo $this->yellow->render('Phillip');\n echo $this('Version '.trim($version));\n }",
"public function version()\n {\n $this->title = _('FOG Version Information');\n echo '<div class=\"latestInfo\">';\n printf(\n '<p>%s: %s</p>',\n _('Running Version'),\n FOG_VERSION\n );\n printf(\n '<p class=\"placehere\" vers=\"%s\"></p>',\n FOG_VERSION\n );\n echo '</div>';\n printf(\n '<h1>%s</h1>',\n _('Kernel Versions')\n );\n $find = array(\n 'isEnabled' => 1\n );\n foreach ((array)self::getClass('StorageNodeManager')\n ->find($find) as &$StorageNode\n ) {\n $url = filter_var(\n sprintf(\n 'http://%s/fog/status/kernelvers.php',\n $StorageNode->get('ip')\n ),\n FILTER_SANITIZE_URL\n );\n printf(\n '<h2>%s FOG Version: ()</h2>'\n . '<pre class=\"kernvers l\" urlcall=\"%s\"></pre>',\n $StorageNode->get('name'),\n $url\n );\n unset($StorageNode);\n }\n unset($Responses, $Nodes);\n }",
"private static function version()\n {\n $files = ['Version'];\n $folder = static::$root.'Foundation'.'/';\n\n self::call($files, $folder);\n }",
"public function versions() {\n\t\t$this->hr ( 1 );\n\t\t\n\t\t$versions = array ();\n\t\t\n\t\tif ($this->versions) {\n\t\t\tforeach ( $this->versions as $version => $title ) {\n\t\t\t\tif (in_array ( $version, $this->complete )) {\n\t\t\t\t\t$this->out ( '[x] ' . $title );\n\t\t\t\t} else {\n\t\t\t\t\t$this->out ( sprintf ( '[%s] <info>%s</info>', $version, $title ) );\n\t\t\t\t\t$versions [] = $version;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->err ( '<error>No versions found</error>' );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->out ( '[E]xit' );\n\t\t$this->out ();\n\t\t\n\t\t$versions [] = 'E';\n\t\t$answer = strtoupper ( $this->in ( 'Which version do you want to upgrade to?', $versions ) );\n\t\t\n\t\tif ($answer === 'E') {\n\t\t\texit ();\n\t\t}\n\t\t\n\t\t$this->to ( $answer );\n\t}",
"function stop()\n {\n $this->cli->quietly('launchctl unload '.$this->daemonPath);\n }",
"public function display_version()\n {\n $usage_vars = array(\n 'website' => Settings::get('website'),\n 'revision' => Settings::get('revision'),\n 'version' => Settings::get('version'),\n );\n $trmfrm = new TerminalFormatter();\n $this->render($usage_vars);\n $usage = $this->get_buffer();\n $usage = $trmfrm->format($usage);\n print($usage);\n }",
"public function run()\n {\n if (empty(Yii::app()->session['loginID']))\n {\n $versionnumber=\"\";\n $versiontitle=\"\";\n $buildtext=\"\";\n } else {\n $versionnumber = Yii::app()->getConfig(\"versionnumber\");\n $versiontitle = gT('Version');\n $buildtext = \"\";\n if(Yii::app()->getConfig(\"buildnumber\")!=\"\") {\n $buildtext = \"+\".Yii::app()->getConfig(\"buildnumber\");\n }\n }\n\n $aData = array(\n 'versionnumber' => $versionnumber,\n 'versiontitle' => $versiontitle,\n 'buildtext' => $buildtext\n );\n\n $this->render('footer', $aData);\n }",
"public function taskEnd() {\n $this->writeln(\"\\r\\033[K\\033[1A\\r <info>✔</info>\");\n }",
"protected function showVersion()\n {\n echo <<<VERSION\n ____ ___ ____ _ ___\n | _ \\_ _| / ___| | |_ _|\n | | | | | | | | | | |\n | |_| | | | |___| |___ | |\n |____/___| \\____|_____|___|\n\n\\033[32mDI CLI\\033[0m version \\033[33m{$this->getCurrentVersion()}\\033[0m by \\033[32mJoris Fritzsche.\\033[0m\n\nVERSION;\n }",
"public function killAction()\n {\n $job_id = $this->params['job_id'];\n $time = $this->params['time'];\n $time = Task::timeFormat();\n\n $oTask = new Task();\n $oTask->setKilled($job_id, $time);\n }",
"public function run()\n {\n if (empty(Yii::app()->session['loginID']))\n {\n $versionnumber=\"\";\n $versiontitle=\"\";\n $buildtext=\"\";\n } else {\n $versionnumber = Yii::app()->getConfig(\"versionnumber\");\n $versiontitle = gT('Version');\n $buildtext = \"\";\n if(Yii::app()->getConfig(\"buildnumber\")!=\"\") {\n $buildtext = \"Build \".Yii::app()->getConfig(\"buildnumber\");\n }\n }\n\n $aData = array(\n 'versionnumber' => $versionnumber,\n 'versiontitle' => $versiontitle,\n 'buildtext' => $buildtext\n );\n\n $this->render('footer', $aData);\n }",
"public function qaTools()\n {\n $this->taskQAToolVersions()->run();\n }",
"protected function printVersionInfo() {\n\t\t// Why don't I just submit a PR instead of forking the tool? a) I don't think the project is active anymore,\n\t\t// b) Some of my changes might not be written well enough/deemed useful enough to include upstream\n\t\t$xfVer = XenForo_Application::$version;\n\t\t$this->printHeading(\"Version info\");\n\t\t$this->printMessage(\"XenForo-CLI by Naatan and robclancy. Forked by lol768.\" . PHP_EOL . \"Running CLI version \" . $this->_versionString . \" on XenForo $xfVer.\" . PHP_EOL);\n\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets topicIDs which are connected with $userID | public function getTopics($userID)
{
$topics = $this ->fetchAll($this->select()
->where('userID = ?',$userID));
return $topics;
} | [
"public function notInvitedTopics($userID)\n\t{\n\t\t$topicModel = new TopicModel();\n\t\t\n\t\t$invTopics = $this ->fetchAll($this->select()\n\t\t\t\t->where('userID = ?',$userID));\n\t\t$tempTopics = $topicModel ->fetchAll();\n\t\t$topics = array();\n\t\t$alreadyInvited = 0;\n\t\tforeach( $tempTopics as $tTopic)\n\t\t{\n\t\t\tforeach( $invTopics as $iTopic)\n\t\t\t{\n\n\t\t\t\tif($tTopic[\"topicID\"]==$iTopic[\"topicID\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t$alreadyInvited = 1;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif($alreadyInvited == 0)\n\t\t\t{\n\t\t\t\t$topics[]=$tTopic[\"topicID\"];\n\t\t\t}\n\t\t\t$alreadyInvited = 0;\n\t\t}\n\t\treturn $topics;\n\t}",
"function sf_find_user_in_topic($topicid, $userid)\n{\n\tglobal $wpdb;\n\treturn $wpdb->get_col(\n\t\t\t\"SELECT user_id\n\t\t\t FROM \".SFPOSTS.\"\n\t\t\t WHERE topic_id=\".$topicid.\"\n\t\t\t AND user_id=\".$userid);\n}",
"function bbp_get_user_favorites_topic_ids($user_id = 0)\n{\n}",
"function topicsStartedBy($memberID)\n{\n\t$db = database();\n\n\t// Fetch all topics started by this user.\n\t$topicIDs = array();\n\t$db->fetchQuery('\n\t\tSELECT \n\t\t\tt.id_topic\n\t\tFROM {db_prefix}topics AS t\n\t\tWHERE t.id_member_started = {int:selected_member}',\n\t\tarray(\n\t\t\t'selected_member' => $memberID,\n\t\t)\n\t)->fetch_callback(\n\t\tfunction ($row) use (&$topicIDs) {\n\t\t\t$topicIDs[] = $row['id_topic'];\n\t\t}\n\t);\n\n\treturn $topicIDs;\n}",
"function getAllPostTopicsFromUser($user_id)\n{\n\tglobal $con;\n\t$sql = \"SELECT * FROM posts WHERE user_id=$user_id AND published=true\";\n\t$result = mysqli_query($con, $sql);\n\t$topics = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\treturn $topics;\n}",
"public function getTopicIDsForMyStuff($oUser){\n\n //now get a list of topics my friends commented on no more than 4 weeks ago\n $sql = \"SELECT\n t.topic_id \n FROM \n \".Config::Get('db.table.topic').\" t \n LEFT JOIN \".Config::Get('plugin.mystuff.table.topic_commented').\" tc ON (tc.topic_id = t.topic_id)\n \".$this->GetFriendsJoin($oUser).\"\n WHERE\n (tc.user_id = \".$oUser->getId().\" OR t.user_id = \".$oUser->getId().\") \n AND (tc.created >= DATE_SUB(NOW(), INTERVAL \".Config::Get('plugin.mystuff.max_age_in_weeks').\" WEEK) OR t.topic_date_add >= DATE_SUB(NOW(), INTERVAL \".Config::Get('plugin.mystuff.max_age_in_weeks').\" WEEK))\n AND t.topic_type != 'teaser'\n AND t.topic_type != 'pinboard'\n \".$this->GetFriendsWhere($oUser).\"\n \";\n\n if($topics = $this->oDb->selectCol($sql)){\n $topics = array_unique($topics);\n dump('My Stuff Topics are: '.print_r($topics, true));\n return $topics;\n }\n \n //fallback\n return array();\n }",
"function bbp_get_user_subscribed_topic_ids( $user_id = 0 ) {\n\t$user_id = bbp_get_user_id( $user_id );\n\tif ( empty( $user_id ) )\n\t\treturn false;\n\n\t$subscriptions = get_user_option( '_bbp_subscriptions', $user_id );\n\t$subscriptions = array_filter( wp_parse_id_list( $subscriptions ) );\n\n\treturn (array) apply_filters( 'bbp_get_user_subscribed_topic_ids', $subscriptions, $user_id );\n}",
"public function listMessageThreadsOwner($userID){\n\t\t$db=$this->connectToDB();//Stores connection to database in $db\n\n\t\t$query= 'SELECT messagethread.id, item.name, user.firstName, user.lastName\n\t\t\t\t\t\t\tFROM messagethread, item, user\n\t\t\t\t\t\t\tWHERE messagethread.owner=?\n\t\t\t\t\t\t\tAND user.id=messagethread.asker\n\t\t\t\t\t\t\tAND item.owner=?\n\t\t\t\t\t\t\tAND item.id=messagethread.itemID';\n\n\t\t$sth = $db->prepare($query);\n\t \t$sth->execute(array($userID, $userID));\n\n\t\t$results = $sth->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t$json = json_encode($results);\n\t\techo $json;\n\t}",
"public function chatGetList($userID = 0)\n {\n $output = $this->im->getChatListOutput($userID);\n $this->im->sendOutput($output);\n }",
"public function getTopicIds() {\n\t\t$ids = array();\n\t\t$topics = $this->getTopics();\n\t\tforeach ($topics as $topic) {\n\t\t\t$ids[] = $topic->getId();\n\t\t}\n\t\treturn $ids;\n\t}",
"function bbp_get_user_favorites_topic_ids( $user_id = 0 ) {\n\t$user_id = bbp_get_user_id( $user_id );\n\tif ( empty( $user_id ) )\n\t\treturn false;\n\n\t$favorites = get_user_option( '_bbp_favorites', $user_id );\n\t$favorites = array_filter( wp_parse_id_list( $favorites ) );\n\n\treturn (array) apply_filters( 'bbp_get_user_favorites_topic_ids', $favorites, $user_id );\n}",
"function bbp_forum_query_topic_ids($forum_id)\n{\n}",
"public function getNewsFeed($userId)\n {\n $users = $this->follower_root[$userId] ?? [];\n array_push($users, $userId);\n $users = array_unique($users);\n $lists = [];\n $queue = new \\SplPriorityQueue;\n if (!empty($users)) {\n foreach ($users as $user) {\n $list = $this->user_tweet_root[$user];\n if (!empty($list)) {\n $first = $list[0];\n $queue->insert([$user, 0, $first], $this->tweet_time[$first]);\n }\n }\n $queue->setExtractFlags(\\SplPriorityQueue::EXTR_BOTH);\n $count = 0;\n while (!$queue->isEmpty()) {\n $count++;\n if ($count > 10) {\n break;\n }\n $data = $queue->extract();\n $user = $data['data'][0];\n $key = $data['data'][1];\n $tweetId = $data['data'][2];\n array_push($lists, $tweetId);\n if (isset($this->user_tweet_root[$user][$key + 1])) {\n $t = $this->user_tweet_root[$user][$key + 1];\n $queue->insert([$user, $key + 1, $t], $this->tweet_time[$t]);\n }\n }\n }\n return $lists;\n }",
"public static function getAll(int $user_id)\n {\n $sql = 'SELECT topic_id FROM followed_topics WHERE user_id = :user_id';\n\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':user_id', $user_id, PDO::PARAM_INT);\n\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_COLUMN);\n }",
"function getConnectionsFromUserID($userID){\n require \"includes/dbh-inc.php\";\n $userConnectionsIDs = [];\n $sql = \"SELECT Connections.UserB_Id\n FROM Connections\n WHERE Connections.UserA_Id = {$userID};\";\n $result = $conn->query($sql);\n if($result->num_rows > 0){\n while($row = $result->fetch_assoc()){\n array_push($userConnectionsIDs,$row['UserB_Id']);\n }\n }\n \n return $userConnectionsIDs;\n}",
"public function getPublicList($userID = 0)\n {\n $chatList = $this->chat->getList();\n foreach($chatList as $chat)\n {\n $chat->members = $this->chat->getMemberListByGID($chat->gid);\n }\n\n if(dao::isError())\n {\n $this->output->result = 'fail';\n $this->output->message = 'Get public chat list failed.';\n }\n else\n {\n $this->output->result = 'success';\n $this->output->users = array($userID);\n $this->output->data = $chatList;\n }\n\n die($this->app->encrypt($this->output));\n }",
"function messagesInTopics($topics)\n{\n\t$db = database();\n\n\t// Obtain all the message ids we are going to affect.\n\t$messages = array();\n\t$db->fetchQuery('\n\t\tSELECT \n\t\t\tid_msg\n\t\tFROM {db_prefix}messages\n\t\tWHERE id_topic IN ({array_int:topic_list})',\n\t\tarray(\n\t\t\t'topic_list' => $topics,\n\t\t)\n\t)->fetch_callback(\n\t\tfunction ($row) use (&$messages) {\n\t\t\t$messages[] = $row['id_msg'];\n\t\t}\n\t);\n\n\treturn $messages;\n}",
"public function getGroupIdsForUserId(int $userId);",
"public function GetRowIDsByUserID(int $userID)\n {\n // Check to see if the user is not in a group\n if(!$this->IsUserInAGroup($userID)) return FALSE;\n\n // Get the row ids from the database\n $results = DB::table($this->table)->where('UserID', $userID)->get('ID');\n\n // Create results array\n $rows = array();\n\n // Loop through all results\n foreach($results as $row)\n {\n // Add row id to $rows array\n array_push($rows, (int)$row->ID);\n }\n\n // return the row ids\n return $rows;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the value of videoLink | public function getVideoLink() {
return $this->videoLink;
} | [
"public function getVideoLinkText(): string;",
"function propertyVideoLink($propertyId)\n{\n $query = \"select video from add_property_video where ap_id={$propertyId}\";\n $property = getQueryResults($query);\n if ($property && !empty($property)) {\n return $property[0]['video'];\n }\n return false;\n}",
"public function getVideoUrl() {\n return $this->video_url;\n }",
"public function getVideoDownloadLink(){\n //parse the string separated by '&' to array\n parse_str($this->getVideoInfo(), $data);\n \n if ($data['status'] === 'ok') {\n\n //set video title\n $this->video_title = $data[\"title\"];\n \n //Get the youtube root link that contains video information\n $stream_map_arr = $this->getStreamArray();\n $final_stream_map_arr = array();\n \n //Create array containing the detail of video \n foreach($stream_map_arr as $stream){\n parse_str($stream, $stream_data);\n $stream_data[\"title\"] = $this->video_title;\n $stream_data[\"mime\"] = $stream_data[\"type\"];\n $mime_type = explode(\";\", $stream_data[\"mime\"]);\n $stream_data[\"mime\"] = $mime_type[0];\n $start = stripos($mime_type[0], \"/\");\n $format = ltrim(substr($mime_type[0], $start), \"/\");\n $stream_data[\"format\"] = $format;\n unset($stream_data[\"type\"]);\n $final_stream_map_arr [] = $stream_data; \n }\n return $final_stream_map_arr;\n } else {\n return false;\n }\n }",
"public function getVideoUrl()\n {\n return $this->videoUrl;\n }",
"public function getVideoUrlAttribute(): string\n {\n return Storage::url($this->video);\n }",
"public function getIdFromLink(){\n if(empty($this->link)){\n return null;\n }\n\n $template='/^(?:http[s]?:\\/\\/)?(?:www.)?youtube.com\\/watch\\?v=([\\w-]{11}).*$/';\n\n preg_match($template, $this->link, $result);\n\n return isset($result[1])?$result[1]:null;\n }",
"function getMovieLinkID() {\n\t\treturn $this->_MovieLinkID;\n\t}",
"public function getVideo()\n {\n return $this->video;\n }",
"public function getVideoUri()\n {\n return $this->video_uri;\n }",
"static function getLinkNCTVideo($link)\n {\n $content = self::curl($link); // đọc nội dung trang\n $return = array();\n preg_match(\"/play_key\\=\\\"(.*)\\\"/\",$content,$arr_preg); // tìm key\n if($arr_preg){\n $arrKeyXML = explode('\"', $arr_preg[1]); // tách key trong chuỗi vừa tìm được\n $linkXML = 'http://v.nhaccuatui.com/flash/xml?key='.$arrKeyXML[0]; // ghép key vào link xml\n $xml_data = self::curl($linkXML); // đọc nội dung trang xml\n $xml_string = str_replace(\"<![CDATA[\",\"\",$xml_data); // loại bỏ <![CDATA[\n $xml_string = str_replace(\"]]>\",\"\",$xml_string); // loại bỏ ]]>\n //print_r($xml_string);exit();\n $xml_string=preg_replace('/&(?!#?[a-z0-9]+;)/', '&', $xml_string);\n $xml_arr = json_decode(json_encode((array) simplexml_load_string($xml_string)), 1); // chuyển đổi thành mảng\n if($xml_arr['track']['item']){\n $arrItem = $xml_arr['track']['item'];\n foreach ($arrItem as $key => $item) {\n $return[$key]['link480'] = self::trimData($item['location']); // link video 480p\n $return[$key]['link360'] = self::trimData($item['lowquality']); // link video 480p\n $return[$key]['link720'] = self::trimData($item['highquality']); // link video 480p\n $return[$key]['title'] = self::trimData($item['title']); // title\n $return[$key]['image'] = self::trimData($item['image']); // link image\n $return[$key]['time'] = self::trimData($item['time']); // time\n $return[$key]['view'] = self::trimData($item['view']); // lượt view\n }\n }\n }\n return $return;\n }",
"public function getVideo()\n {\n return $this->video;\n }",
"public function getProjectVideoUrl()\r\n {\r\n return $this->project_video_url;\r\n }",
"function get_header_video_url()\n {\n }",
"public function getVideoItem()\n {\n return $this->videoItem;\n }",
"protected function getVideoThumbnailUrl(): ?string {\n $first_media_json = reset($this->data['media_json']);\n\n $languages = [\n 'INT',\n mb_strtoupper(\\Drupal::languageManager()->getDefaultLanguage()->getId()),\n 'EN',\n ];\n $languages = array_merge($languages, $this->data['languages'] ?? []);\n $languages = array_unique(array_filter($languages));\n\n foreach ($languages as $langcode) {\n if (isset($first_media_json[$langcode]['THUMB'])) {\n return UrlHelper::parse($first_media_json[$langcode]['THUMB'])['path'] ?? NULL;\n }\n }\n\n return NULL;\n }",
"function exa_video_link($post = null) {\n\n\t$post = get_post($post);\n\n\t/* Get the first youtube link within the post */\n\n\t$firstWord = preg_split('/\\s+/', $post->post_content);\n\n\tif(_exa_is_youtube_link($firstWord[0])) {\n\t\treturn $firstWord[0];\n\t} else {\n\t\treturn null;\n\t}\n\n}",
"function get_goalvideo($iid)\n{\n\t$result = mysql_query(\"SELECT video_link FROM goals WHERE idgoals=\" .$iid)or die(mysql_error());\n\t$num=mysql_numrows($result);\n\t$r = mysql_fetch_array($result);\n\t\n\t// Get info\n\t$video_link=$r[\"video_link\"];\n\t\n\t// return value\n\treturn $video_link;\n}",
"public function getProjectVideo(){\n return $this->_projectVideo;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Filter the query by a related \Rights object | public function filterByRights($rights, $comparison = null)
{
if ($rights instanceof \Rights) {
return $this
->addUsingAlias(RRightsForformatTableMap::COL__RIGHTID, $rights->getId(), $comparison);
} elseif ($rights instanceof ObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(RRightsForformatTableMap::COL__RIGHTID, $rights->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByRights() only accepts arguments of type \Rights or Collection');
}
} | [
"public function filterByRights($rights, $comparison = Criteria::EQUAL)\n {\n return $this\n ->useRRightsFortemplateQuery()\n ->filterByRights($rights, $comparison)\n ->endUse();\n }",
"public function filters()\n {\n return array(\n 'rights',\n );\n }",
"public function filterByRights($rights, $comparison = Criteria::EQUAL)\n {\n return $this\n ->useRRightsForuserQuery()\n ->filterByRights($rights, $comparison)\n ->endUse();\n }",
"public function getRights();",
"public function filterByRights($rights, $comparison = Criteria::EQUAL)\n {\n return $this\n ->useRRightsForbookQuery()\n ->filterByRights($rights, $comparison)\n ->endUse();\n }",
"public function filters() {\n return array(\n 'rights',\n );\n }",
"public function filterBySide(Side $side) {\n// $criteria = Criteria::create();\n// $expr = Criteria::expr();\n// $criteria->where($expr->eq('details.side',$side));\n $p = function($e) use ($side) {\n return $e->getSide() == $side;\n };\n return $this->filter($p);\n }",
"function getList($rights = 0) {\r\n if ($rights >= 0)\r\n $this->Script->where('rights',$rights,'<=');\r\n\r\n $result = $this->Script->search();\r\n return $result;\r\n }",
"public function filterOwnedOrManaged();",
"public function filterByAssignable()\n {\n $app = Application::getFacadeApplication();\n /** @var Repository $config */\n $config = $app->make(Repository::class);\n\n if ($config->get('concrete.permissions.model') != 'simple') {\n // there's gotta be a more reasonable way than this but right now i'm not sure what that is.\n $excludeGroupIDs = [GUEST_GROUP_ID, REGISTERED_GROUP_ID];\n /** @var Connection $db */\n $db = $app->make(Connection::class);\n /** @noinspection PhpUnhandledExceptionInspection */\n /** @noinspection SqlNoDataSourceInspection */\n $r = $db->executeQuery('select gID from ' . $db->getDatabasePlatform()->quoteSingleIdentifier('Groups') . ' where gID > ?', [REGISTERED_GROUP_ID]);\n while ($row = $r->fetch()) {\n $g = $this->getGroupRepository()->getGroupById($row['gID']);\n $gp = new Checker($g);\n /** @noinspection PhpUndefinedMethodInspection */\n if (!$gp->canAssignGroup()) {\n $excludeGroupIDs[] = $row['gID'];\n }\n }\n $this->query->andWhere(\n $this->query->expr()->notIn('g.gId', array_map([$db, 'quote'], $excludeGroupIDs))\n );\n }\n }",
"public function getUserRights(){\n\t\treturn $GLOBALS['db']->select(\"select * from user_rights order by id\");\t\n\t}",
"public function filter($filters, array $options = [])\n {\n $results = $this->user->filter($filters);\n $results = (array_key_exists('orderBy', $options)) ? $results->orderBy($options['orderBy']) : $results->orderBy('created_at', 'asc');\n /**\n * find all the roles that are a lower or same level as i am\n * to that, check which of my roles have a lower or equal level\n * compared to the rest\n */\n $roles = \\Auth::user()->getRoles();\n $myMaxLevel = $roles->pluck('level')->max();\n $allRoles = Role::all();\n $allRolesMaxLevel = $allRoles->pluck('level')->max();\n //if my level is max, i am a super user\n $checkByRole = ($myMaxLevel >= $allRolesMaxLevel);\n\n //i am not a super user, so i need to figure out which roles i am looking for\n //so that we can filter out everything higher than mine #MindBlown\n\n $rolesToLookUp = [];\n if (!$checkByRole) {\n $rolesToLookUp = $allRoles->each(function ($role, $key) use ($myMaxLevel) {\n return $role->level <= $myMaxLevel;\n })->pluck('slug')->toArray();\n }\n\n\n/* \\DB::listen(function ($query) {\n var_dump($query->sql);\n var_dump($query->bindings);\n });*/\n\n $results = $results\n ->with(['roles', 'userPermissions']);\n\n if (!$checkByRole) {\n $results = $results\n ->where(function ($subQuery) use ($rolesToLookUp) {\n //nest these queries cause there might have been some direct\n //filters applied earlier on from the query string\n return $subQuery->whereNotIn('id', function ($q) {\n //grab all users with NO roles, plain users basically\n return $q->select('role_user.user_id')\n ->from('role_user')\n ->leftJoin('users', 'users.id', '=', 'role_user.user_id');\n })\n ->orWhereHas('roles', function ($q) use ($rolesToLookUp) {\n //grab all users with the specific roles\n return $q->whereIn('slug', $rolesToLookUp);\n });\n });\n }\n\n\n\n $results = $results->paginate();\n\n\n return $results;\n }",
"private function filteredMeetingRoom() {\n\t\treturn $this->center\n\t\t ->where('active_flag', 'Y')\n\t\t ->where('city_id', '!=', 0)\n\t\t ->where(function ($q) {\n\t\t\t\t$q->whereHas('center_filter', function ($q) {\n\t\t\t\t\t\t$q->where('meeting_room', 1);})->orWhere(function ($q) {\n\t\t\t\t\t\t$q->has('center_filter', '<', 1);\n\t\t\t\t\t});\n\t\t\t});\n\t}",
"public function getRights() {\n return $this->get('rights', 'user');\n }",
"public function filter()\n {\n $this->items->filter([$this->filter, 'viewable']);\n }",
"public function filter($request){\n return $this->school::where($request);\n }",
"public function getRights() {\r\n \r\n if(!$this->rights){\r\n \r\n $req = $this->db->prepare('SELECT id, name FROM members_rights JOIN rights ON id = right_id WHERE member_id = :id');\r\n $req->execute(array(':id'=>$this->id));\r\n \r\n if($req->rowCount() > 0){\r\n \r\n foreach($req->fetchAll(PDO::FETCH_OBJ) as $right){\r\n \r\n $this->rights[$right->id] = $right->name; \r\n \r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n return $this->rights;\r\n }",
"private function filterContentVisibility()\n {\n $visibilityOrCondition = ['OR'];\n\n // Public content\n $visibilityOrCondition[] = ['OR', 'content.visibility = :visibilityPublic', 'content.visibility IS NULL'];\n\n // Private content can be seen on own container, member spaces, friend profiles or if the user is the author\n $privateVisibilityOrCondition = ['OR',\n 'content.created_by = :userId',\n 'content.contentcontainer_id = :userContentContainerId',\n 'space_membership.user_id IS NOT NULL'\n ];\n\n if($this->isFriendShipEnabled()) {\n // Friend users can see private content, but only in case friendship was accepted\n $privateVisibilityOrCondition[] = ['AND',\n 'user_friendship.id IS NOT NULL',\n 'EXISTS (SELECT id from user_friendship uf where uf.friend_user_id = user_friendship.user_id AND uf.user_id = user_friendship.friend_user_id)'\n ];\n }\n\n $visibilityOrCondition[] = ['AND', 'content.visibility = :visibilityPrivate', $privateVisibilityOrCondition];\n\n $this->query->andWhere($visibilityOrCondition);\n }",
"public function flushRightsCache();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the path to the hash file. | public function getHashPath()
{
return $this->hash_path;
} | [
"public function getHashPath()\n {\n return sprintf(\"files/%s\", $this->getHash());\n }",
"public function get_path_hashed()\n\t\t{\n\t\t\treturn $this->get_path_hashed_dir().'/'.$this->get_path_hashed_name();\n\t\t}",
"public function getHashFile()\n {\n $this->validateFile();\n return sha1_file($this->getFilePath());\n }",
"public function getFullPathHash()\n {\n return hash('crc32b', $this->fullPath);\n }",
"public function path(): string\n {\n if ($this->permissions()) {\n return Filestore::path($this->hash());\n } else {\n return parent::path();\n }\n }",
"public function getHashedFileName();",
"public function hash_to_filepath($hash) {\n return rtrim($this->config(\"base_path\"), \"/\") . DIRECTORY_SEPARATOR . \"$hash\";\n }",
"protected function getPathHash()\n {\n return md5($this->originalImageFilePath);\n }",
"public function getFileHash()\n {\n return $this->file_hash;\n }",
"public function getCurrentFileHash() {\n return $this->data['current_file_hash'];\n }",
"public function hashFile() {\n return sprintf('%s.md5', $this->db);\n }",
"protected function hashPath()\r\n {\r\n return md5($this->migrationPath);\r\n }",
"private function hash_file($ip = '') { \n\t\t\tif ($ip == '') $ip = $this->client;\n\t\t\treturn $this->hash_path . $ip . '_' . $this->hash;\n\t\t}",
"private function getMDPath($hash)\n {\n return $this->getCacheFilePath($hash, 'md');\n }",
"public static function getPath() {\n\t\tif (!self::$path) {\n\t\t\t$backupBase = App::getBackupBase();\n\t\t\t$currentVersion = \\OCP\\Config::getSystemValue('version', '0.0.0');\n\t\t\t$path = $backupBase . $currentVersion . '-';\n\n\t\t\tdo {\n\t\t\t\t$salt = substr(md5(time()), 0, 8);\n\t\t\t} while (file_exists($path . $salt));\n\n\t\t\tself::$path = $path . $salt;\n\t\t}\n\t\treturn self::$path;\n\t}",
"protected function getChecksumRelativeFilePath():string\n {\n return self::CHECKSUMS_BASE_FILENAME . '.' . md5($this->getS3BucketOwner()) . '.' . self::CHECKSUMS_EXTENSION;\n }",
"public function getFilepath() {\n $path = Yii::getAlias('@graphImgPath');\n $filename = $this->user->getIdHash() . \".png\";\n return $path. '/' . $filename;\n }",
"public function getPath(){\n return $this->mapPath( $this->file->getPath() );\n }",
"public function hash()\n {\n return $this->adapter->md5File($this->path);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the map of functions currently set on this object. | public function getFunctions() {
return $this->functions;
} | [
"public static function get_functions() {\n\t\treturn \\array_fill_keys( \\array_keys( self::$arrayWalkingFunctions ), true );\n\t}",
"protected function getMethodsMap()\n {\n return [\n 'add' => 'addItemTo',\n 'set' => 'setProperty',\n 'unset' => 'unsetProperty'\n ];\n }",
"public function getFunctions(): array\n\t\t{\n\t\t\treturn $this->functions;\n\t\t}",
"public function getFunctions()\n {\n return array(\n );\n }",
"public function getMapList()\n {\n return $this->handlerMap();\n }",
"public function getEventMap();",
"private function getMethodsMap()\n {\n if ($this->methodsMap === null) {\n $this->methodsMap = \\Magento\\Framework\\App\\ObjectManager::getInstance()\n ->get(MethodsMap::class);\n }\n return $this->methodsMap;\n }",
"public function getFunctions () {}",
"function function_map() { \n\n $map = array();\n\n\t\t/* Required Functions */\n $map['add'] = 'add_songs';\n $map['delete'] = 'delete_songs';\n $map['play'] = 'play';\n $map['stop'] = 'stop';\n $map['get'] = 'get_songs';\n\t\t$map['status']\t\t= 'get_status';\n $map['connect'] = 'connect';\n\t\t\n\t\t/* Recommended Functions */\n\t\t$map['skip']\t\t= 'skip';\n\t\t$map['next']\t\t= 'next';\n\t\t$map['prev']\t\t= 'prev';\n\t\t$map['pause']\t\t= 'pause';\n\t\t$map['volume_up'] = 'volume_up';\n\t\t$map['volume_down']\t= 'volume_down';\n\t\t$map['random'] = 'random';\n\t\t$map['repeat']\t\t= 'loop';\n\n\t\t/* Optional Functions */\n\t\t$map['delete_all']\t= 'clear_playlist';\n\t\t$map['add_url']\t\t= 'add_url';\n\n return $map;\n\n\t}",
"public static function loadFunctionMap(): FunctionMap\n {\n return FunctionMap::loadFunctionMap();\n }",
"public function get_functions() {\n return array();\n }",
"public function getUserDefinedFunctions()\n {\n return $this->user_defined_functions;\n }",
"public function getRegisteredFunctions();",
"private function getEventMap()\n {\n return [\n WatcherInterface::CREATE_EVENT => FilesystemEvent::CREATE,\n WatcherInterface::MODIFY_EVENT => FilesystemEvent::MODIFY,\n WatcherInterface::DELETE_EVENT => FilesystemEvent::DELETE,\n WatcherInterface::ALL_EVENT => FilesystemEvent::ALL\n ];\n }",
"public static function get_all ()\n {\n return static::$_map;\n }",
"function get_defined_functions () {}",
"function &_getLambdaFunctions()\n {\n static $functions = array();\n return $functions;\n }",
"protected function getRedefinedFunctions(): array {\n return $this->redefined_functions;\n }",
"function field_info_field_map() {\n $cache = _field_info_field_cache();\n return $cache->getFieldMap();\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test creating a child user. | public function testCreate()
{
TestUtil::setupCassette('users/create.yml');
$user = self::$client->user->create([
'name' => 'Test User',
]);
$this->assertInstanceOf(User::class, $user);
$this->assertStringMatchesFormat('user_%s', $user->id);
$this->assertEquals('Test User', $user->name);
// Delete the user once done so we don't pollute with hundreds of child users
self::$client->user->delete($user->id);
} | [
"public function test_creating_a_new_user()\n {\n $response = $this->postUser();\n\n $response\n ->assertStatus(201)\n ->assertJson([\n 'message' => 'Usuário criado com sucesso!',\n 'data' => [\n 'type' => 0,\n 'name' => 'John Doe',\n 'cpf_cnpj' => '12345678901',\n 'email' => 'john.doe@email.com',\n ]\n ]);\n }",
"public function test_can_create_data_request_for_user_some() {\n $this->resetAfterTest();\n\n $parent = $this->getDataGenerator()->create_user();\n $child = $this->getDataGenerator()->create_user();\n $otheruser = $this->getDataGenerator()->create_user();\n\n $systemcontext = \\context_system::instance();\n $parentrole = $this->getDataGenerator()->create_role();\n assign_capability('tool/dataprivacy:makedatarequestsforchildren', CAP_ALLOW, $parentrole, $systemcontext);\n role_assign($parentrole, $parent->id, \\context_user::instance($child->id));\n\n $this->setUser($parent);\n $this->assertFalse(api::can_create_data_request_for_user($otheruser->id));\n }",
"public function a_new_user_can_be_created(): void\n {\n $this->assertInstanceOf(\n User::class,\n $user = app(UserFactory::class)->create()\n );\n\n $this->assertDatabaseHas('users', [\n 'id' => $user->id,\n ]);\n }",
"public function testCreateUser()\n {\n }",
"private function create_test_user() {\n global $CFG;\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'testuser@email.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n }",
"public function testAdminUserCreatePage() : void\n {\n $response = $this->actingAs(static::$user, 'web')\n ->get('/admin/users/create');\n\n $response->assertStatus(200)\n ->assertSee('Εισαγωγή χρήστη');\n }",
"public function create_test_user()\n {\n DB::table('users')->insert([\n 'name' => 'Cypress Test',\n 'email' => 'test@cypress.dev',\n 'password' => bcrypt('test'),\n ]);\n }",
"public function new_user() {\r\n\t\tMainWP_Child_Users::get_instance()->new_user();\r\n\t}",
"public function testPostCreate()\n\t{\n\t\t$admin = TestHelper::createUser(UserStatus::ACTIVE, true)->user;\n\n\t\t$this->be($admin);\n\n\t\t$this->call('POST', 'user/create', array(\n\t\t\t'name' => 'unittestname',\n\t\t\t'email' => 'unittest@unittest.sso',\n\t\t\t'password' => 'somepassword',\n\t\t));\n\n\t\t$this->assertEquals(1, User::where('name', 'unittestname')->count());\n\t}",
"private function createNewUser()\n {\n\n $name = (string) $this->ask('Name');\n $email = (string) $this->ask('E-Mail');\n $user = config('multi-tenant.user_class')::create([\n 'name' => $name,\n 'email' => $email,\n 'password' => bcrypt('tester'),\n ]);\n\n $add_to_tenant = $this->anticipate('Would you like to assign the user to a tenant?', ['Yes', 'No'], 'Yes');\n\n if ($add_to_tenant == 'Yes') {\n $headers = ['Name', 'ID'];\n $tenants = config('multi-tenant.tenant_class')::all('name', 'id');\n\n if($tenants->count() <= 0) {\n $this->comment($user->email . ' with the password `tester` was created without any tenants');\n } else {\n $this->table($headers, $tenants->toArray());\n\n $tenant_id = (int) $this->ask('Please enter the id of the desired tenant.');\n\n $tenant = config('multi-tenant.tenant_class')::findOrFail($tenant_id);\n\n $tenant->update(['owner_id' => $user->id]);\n\n $this->comment('The user ' . $user->email . ' is now the owner of ' . $tenant->name . ' with the password `tester`');\n }\n }\n else{\n $this->comment($user->email . ' with the password `tester` was created without any tenants');\n }\n\n }",
"public function test_create_userNotExist_create()\n {\n $times = $this->stmt->querySingle(\"select count(*) from users where username='user1'\");\n $this->assertEquals(0, $times, \"guard - usuario 'user1' ya existe\");\n $user = $this->getTestUser();\n $this->sut->create($user);\n $actual = $this->querySingle();\n $this->assertEquals(array('username' => 'user1', 'password' => '7c6a180b36896a0a8c02787eeafb0e4c', 'roles' => User::PAGE_2), $actual);\n }",
"public function testCreateCorporateUser()\n {\n }",
"public function testCreate_Child()\n {\n $childDAO = new childDAO();\n\n $childTest = new childModel(8, \"Red Ranger\", \"None\", \"Tom\", 1);\n $child_id = $childDAO->insert($childTest);\n\n $childFound=$childDAO->find($child_id);\n\n $this->assertEquals($child_id, $childFound->child_id);\n $this->assertEquals(8, $childFound->parent_id);\n $this->assertEquals(\"Red Ranger\", $childFound->child_name);\n $this->assertEquals(\"None\", $childFound->allergies);\n $this->assertEquals(\"Tom\", $childFound->trusted_parties);\n }",
"public function testAddNewUserEx() {\n\n try {\n $newUser = new User();\n $newUser->setUserId(1);\n $newUser->setLoginName('testuser1');\n $newUser->setPassword(md5('password123'));\n $newUser->setUserTypeId(1);\n\n $userCreated = $this->userManagementDao->addUser($newUser);\n } catch (Exception $ex) {\n return;\n }\n $this->fail('An expected exception has not been raised.');\n }",
"private function createFakeUser()\n {\n $name = $this->faker->name;\n\n $user = config('multi-tenant.user_class')::create([\n 'name' => $name,\n 'email' => $this->faker->unique()->safeEmail,\n 'password' => bcrypt('tester'),\n ]);\n\n $add_to_tenant = $this->anticipate('Would you like to assign the user to a tenant?', ['Yes', 'No'], 'Yes');\n\n if ($add_to_tenant == 'Yes') {\n $headers = ['Name', 'ID'];\n $tenants = config('multi-tenant.tenant_class')::all('name', 'id');\n\n if($tenants->count() <= 0) {\n $this->comment($user->email . ' with the password `tester` was created without any tenants');\n } else {\n $this->table($headers, $tenants->toArray());\n\n $tenant_id = (int) $this->ask('Please enter the id of the desired tenant.');\n\n $tenant = config('multi-tenant.tenant_class')::findOrFail($tenant_id);\n\n $tenant->update(['owner_id' => $user->id]);\n\n $this->comment('The user ' . $user->email . ' is now the owner of ' . $tenant->name . ' with the password `tester`');\n }\n }\n }",
"public function test_user_was_made()\n {\n $user = User::factory()->create();\n $this->assertTrue($user->id != 0);\n }",
"public function testUserAssistantCreate()\n {\n }",
"private function _createUser(){\r\n\r\n }",
"public function testUserCreate()\n {\n $testUserName = Str::random(10);\n $testUserEmail = $testUserName . '@fake.email';\n $messages = [\n 'generated_email' => 'Email \"%s\" is generated from username.',\n 'same_password' => 'Password is assigned same as username.',\n 'user_created' => 'User \"%s\" has been created.',\n 'duplicated_user' => 'User already exists with email \"%s\"!',\n ];\n\n $this->artisan('user:create', [\n 'username' => $testUserName\n ])\n ->expectsOutput(sprintf($messages['generated_email'], $testUserEmail))\n ->expectsOutput($messages['same_password'])\n ->expectsOutput(sprintf($messages['user_created'], $testUserName))\n ->assertExitCode(0);\n\n $this->artisan('user:create', [\n 'username' => $testUserName\n ])\n ->expectsOutput(sprintf($messages['generated_email'], $testUserEmail))\n ->expectsOutput(sprintf($messages['duplicated_user'], $testUserEmail))\n ->assertExitCode(0);\n\n $testUserName = 'user_with_email';\n $this->artisan('user:create', [\n 'username' => $testUserName,\n '--email' => $testUserName . '@mail.fake'\n ])\n ->expectsOutput($messages['same_password'])\n ->expectsOutput(sprintf($messages['user_created'], $testUserName))\n ->assertExitCode(0);\n\n $testUserName = 'user_with_pass';\n $this->artisan('user:create', [\n 'username' => $testUserName,\n '--password' => $testUserName,\n '--email' => $testUserName . '@mail.fake'\n ])\n ->expectsOutput(sprintf($messages['user_created'], $testUserName))\n ->assertExitCode(0);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Using the passed propertyMap, recursively build array | abstract protected function buildPropertyMapArray(array $array, PropertyMap $propertyMap): array; | [
"public function to_flat_array(){\n\t\t\t$flattened_vars = array();\n\t\t\t$properties = get_object_vars($this);\n\t\t\tforeach($properties as $name => $property){\n\t\t\t\tif($property instanceof EE_Config_Base){\n\t\t\t\t\t$sub_config_properties = get_object_vars($property);\n\t\t\t\t\tforeach($sub_config_properties as $sub_config_property_name => $sub_config_property){\n\t\t\t\t\t\t$flattened_vars[$name.\"_\".$sub_config_property_name] = $sub_config_property;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$flattened_vars[$name] = $property;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $flattened_vars;\n\t\t}",
"private function generateCollectionMap() {\n $this->log('generateCollectionMap: auto-generating collection');\n $properties = $this->getChildProperties();\n $collectionMap = array();\n foreach($properties as $propertyName) {\n $collectionMap[$propertyName] = $propertyName;\n }\n $this->collectionMap = $collectionMap;\n }",
"function upfront_array_to_properties ($the_array, $map=null) {\n\t$the_properties = array();\n\tforeach ($the_array as $name=>$value) {\n\t\tif ( is_array($map) && ! in_array($name, $map) ) { continue; }\n\t\t$the_properties[] = array( 'name' => $name, 'value' => $value );\n\t}\n\treturn $the_properties;\n}",
"function BuildProperty($PropNode)\n {\n $objProp = new clsProperty();\n\n foreach ($PropNode->children() as $PropChild)\n {\n switch ($PropChild->getName())\n {\n case \"ID\":\n $objProp->ID = $PropChild;\n break;\n case \"Name\":\n $objProp->Name = $PropChild;\n break;\n case \"Address\":\n $objProp->Address = $PropChild;\n break;\n case \"City\":\n $objProp->City = $PropChild;\n break;\n case \"State\":\n $objProp->State = $PropChild;\n break;\n case \"Zip\":\n $objProp->Zip = $PropChild;\n break;\n case \"Phone\":\n $objProp->Phone = $PropChild;\n break;\n case \"Email\" :\n $objProp->Email = $PropChild;\n break;\n case \"Maint\":\n $objProp->Maint = $PropChild;\n break;\n case \"WebSite\":\n $objProp->WebSite = $PropChild;\n break;\n case \"Desc\" :\n $objProp->Desc = $PropChild;\n break;\n case \"Amenities\":\n $objProp->Amenities = explode(\"--\",$PropChild);\n break;\n case \"Highlights\" :\n $objProp->Highlights = $PropChild;\n break;\n case \"Coupon\" :\n $objProp->Coupon = $PropChild;\n break;\n case \"Vtour\" :\n $objProp->Vtour = $PropChild;\n break;\n case \"MainPic\" :\n $objProp->MainPic = $PropChild;\n break;\n case \"SubPic1\" :\n case \"SubPic2\" :\n case \"SubPic3\" :\n case \"SubPic4\" :\n case \"SubPic5\" :\n array_push($objProp->SubPics, $PropChild) ;\n break;\n case \"OneBedLowPrices\" :\n case \"TwoBedLowPrices\" :\n case \"ThreeBedLowPrices\" :\n case \"FourBedLowPrices\" :\n\n array_push($objProp->BedLowPrices,$PropChild) ;\n // or die(\" Error Creating BedLowPrices object \");\n break;\n\n case \"UnitTypes\" :\n\n $objProp->Units = $this->BuildUnit($objProp->Units,$PropChild);\n // die(\" Error Creating Unit object \") ;\n\n break;\n case \"ReportRoster\" :\n \n\n $objProp->Reports = $this->BuildReport($objProp->Reports,$PropChild) ;\n // or die (\" Error Creating Report object \") ;\n break;\n }\n\n }\n\n return $objProp;\n\n\n }",
"protected static function propertiesMap() {\n return [\n 'search_term' => ['search_term'],\n 'type' => ['type'],\n 'bundle' => ['bundle'],\n 'tags' => ['tags'],\n 'label' => ['label'],\n 'start_date' => ['start_date'],\n 'end_date' => ['end_date'],\n 'from' => ['from', 'start'],\n 'size' => ['size', 'limit'],\n 'sorting' => ['sort'],\n 'version' => ['version'],\n 'languages' => ['languages'],\n ];\n }",
"final protected function _inheritArrayProperties(array $properties = array(), $typeSafe = false) {\n\t\tif (sizeof($properties)) {\n\t\t\t$class = new ReflectionClass(get_called_class());\n\t\t\t$chain = array();\n\t\t\twhile (($class = $class->getParentClass()) !== false) {\n\t\t\t\tif ($class->getName() === __CLASS__) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$chain[] = $class;\n\t\t\t}\n\t\t\tarray_reverse($chain);\n\t\t\tforeach ($chain as $i => $class) {\n\t\t\t\t$defaultProperties = $class->getDefaultProperties();\n\t\t\t\tforeach ($properties as $j => $property) {\n\t\t\t\t\tif (is_array($this->$property) && isset($defaultProperties[$property]) && is_array($defaultProperties[$property])) {\n\t\t\t\t\t\tforeach ($defaultProperties[$property] as $key => $value) {\n\t\t\t\t\t\t\tif (!isset($this->{$property}[$key])) {\n\t\t\t\t\t\t\t\t$this->{$property}[$key] = $value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ($k = 0; $k < count($defaultProperties[$property]); $k++) {\n\t\t\t\t\t\t\tif (isset($defaultProperties[$property][$k]) && !in_array($defaultProperties[$property][$k], $this->$property)) {\n\t\t\t\t\t\t\t\t$this->{$property}[] = $defaultProperties[$property][$k];\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\treturn $this;\n\t}",
"function prepareDataForProperties( $properties_data ){\n $propertyArr = [];\n foreach($properties_data as $key => $property){\n $propertyArr[$property['id']]['property_type_id'] = $property['property_type_id'];\n $propertyArr[$property['id']]['property_id'] = $property['id'];\n if($property['field_identifier'] == \\Config::get('constants.INPUT_TYPE_FIELD_IDENTIFIER.1')){\n $propertyArr[$property['id']]['basic_name'] = $property['property_type_section_field_value'];\n }\n if($property['field_identifier'] == \\Config::get('constants.INPUT_TYPE_FIELD_IDENTIFIER.2')){\n $propertyArr[$property['id']]['basic_location'] = $property['property_type_section_field_value'];\n }\n if($property['field_identifier'] == \\Config::get('constants.INPUT_TYPE_FIELD_IDENTIFIER.3')){\n $propertyArr[$property['id']]['basic_feature_image'] = $property['property_type_section_field_value'];\n }\n if($property['field_identifier'] == \\Config::get('constants.INPUT_TYPE_FIELD_IDENTIFIER.4')){\n $propertyArr[$property['id']]['basic_price'] = $property['property_type_section_field_value'];\n }\n if($property['field_identifier'] == \\Config::get('constants.INPUT_TYPE_FIELD_IDENTIFIER.5')){\n $propertyArr[$property['id']]['basic_description'] = $property['property_type_section_field_value'];\n }\n if($property['created_at']){\n $propertyArr[$property['id']]['created_at'] = $property['created_at'];\n }\n if($property['first_name']){\n $propertyArr[$property['id']]['first_name'] = $property['first_name'];\n }\n if($property['last_name']){\n $propertyArr[$property['id']]['last_name'] = $property['last_name'];\n }\n if($property['seller_id']){\n $propertyArr[$property['id']]['seller_id'] = $property['seller_id'];\n }\n }\n return $propertyArr;\n }",
"protected abstract function build_mapping();",
"public function getPropertiesAsArray();",
"public function nesting(){\n\t\tarray_splice($this->properties, array_search(self::NESTING_PLACEHOLDER, $this->properties), 1, $this->properties_addon);\n\t}",
"public function buildMap() {}",
"protected function buildFormProperty($property) {\n return array_merge(array(\n '#type' => $property->getType(),\n '#title' => t($property->getTitle()),\n '#description' => t($property->getDescription()),\n '#default_value' => $this->get($property->getId()),\n // @TODO Find out why this doesn't work and resolve it again\n //'#element_validate' => array(array($property, 'validate')),\n //'#element_validate' => array(get_class($property) . '::validate'),\n '#required' => TRUE,\n '#disabled' => !$this->propertiesFileExists,\n ), $property->getExtraParameters());\n }",
"private function mapPropsToValues(): array\r\n {\r\n $values = [];\r\n $values['customer_id'] = $this->customer_id;\r\n $values['document_set_id'] = $this->document_set_id;\r\n $values['our_reference'] = $this->our_reference;\r\n $values['your_reference'] = $this->your_reference;\r\n $values['date'] = $this->date;\r\n $values['expiration_date'] = $this->expiration_date;\r\n $values['financial_discount'] = $this->financial_discount;\r\n $values['special_discount'] = $this->special_discount;\r\n $values['salesman_id'] = $this->salesman_id;\r\n $values['salesman_commission'] = $this->salesman_commission;\r\n\r\n $values['notes'] = $this->notes;\r\n $values['status'] = DocumentStatus::DRAFT;\r\n $values['eac_id'] = $this->caeId;\r\n $values['products'] = $this->products;\r\n\r\n if ($this->shouldAddShippingInformation()) {\r\n $values['delivery_datetime'] = $this->delivery_datetime;\r\n $values['delivery_method_id'] = $this->delivery_method_id;\r\n\r\n $values['delivery_departure_address'] = $this->delivery_departure_address;\r\n $values['delivery_departure_city'] = $this->delivery_departure_city;\r\n $values['delivery_departure_zip_code'] = $this->delivery_departure_zip_code;\r\n $values['delivery_departure_country'] = $this->delivery_departure_country;\r\n\r\n $values['delivery_destination_address'] = $this->delivery_destination_address;\r\n $values['delivery_destination_city'] = $this->delivery_destination_city;\r\n $values['delivery_destination_zip_code'] = $this->delivery_destination_zip_code;\r\n $values['delivery_destination_country'] = $this->delivery_destination_country;\r\n }\r\n\r\n if ($this->shouldAddPayment()) {\r\n $values['payments'] = $this->payments;\r\n }\r\n\r\n if (!empty($this->exchange_currency_id)) {\r\n $values['exchange_currency_id'] = $this->exchange_currency_id;\r\n $values['exchange_rate'] = $this->exchange_rate;\r\n }\r\n\r\n if (!empty($this->associatedDocuments)) {\r\n $this->associateDocuments($values);\r\n }\r\n\r\n return $values;\r\n }",
"private function _collectPropertyFromParentClass( \\ReflectionProperty $property, array $result )\n {\n if ( !$property->isPrivate() && !isset( $result[$property->getName()] ) )\n {\n $result[$property->getName()] = $property;\n }\n return $result;\n }",
"public function buildDataMap() {\n\t\t$this->dataMap = $this->dataMapFactory->buildDataMap(get_class($this->object));\n\t}",
"protected function getValuesFromMap()\n {\n if ($this->bundleMap->bundleMapIsEmpty()) {\n $this->bundleMap->mapBundles();\n }\n\n $this->buildKeys();\n\n if (!$this->hasValidNamespace()) {\n $this->setValues(collect([]));\n } else {\n $values = $this->bundleMap->getBundleValues($this->getPathKeys());\n\n $this->setValues($values);\n }\n }",
"function getPropertyList() {\n\tif (!is_array($this->_properties)) { return false; }\n\t$ar = array();\n\tforeach($this->_properties as $alias => $props) {\n\t\tforeach($props as $prop) {\n\t\t\t$ar[] = array($alias,$prop);\n\t\t\t}\n\t\t}\n\treturn $ar;\n\t}",
"public function setBuildProperties($props)\n {\n $this->buildProperties = array();\n\n $renamedPropelProps = array();\n foreach ($props as $key => $propValue) {\n if (strpos($key, \"propel.\") === 0) {\n $newKey = substr($key, strlen(\"propel.\"));\n $j = strpos($newKey, '.');\n while ($j !== false) {\n $newKey = substr($newKey, 0, $j) . ucfirst(substr($newKey, $j + 1));\n $j = strpos($newKey, '.');\n }\n $this->setBuildProperty($newKey, $propValue);\n }\n }\n }",
"protected function expandRequiredProperties() {\n $required_properties = [];\n foreach ($this->retrievedProperties as $datasource_id => $properties) {\n if ($datasource_id === '') {\n $datasource_id = NULL;\n }\n foreach (array_keys($properties) as $property_path) {\n $path_to_add = '';\n foreach (explode(':', $property_path) as $component) {\n $path_to_add .= ($path_to_add ? ':' : '') . $component;\n if (!isset($required_properties[$path_to_add])) {\n $required_properties[$datasource_id][$path_to_add] = Utility::createCombinedId($datasource_id, $path_to_add);\n }\n }\n }\n }\n return $required_properties;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a query string with the environment parameters. | function _google_tag_environment_query() {
$config = \Drupal::config('google_tag.settings');
if (!$config->get('include_environment')) {
return '';
}
// Gather data.
$environment_id = _google_tag_variable_clean('environment_id');
$environment_token = _google_tag_variable_clean('environment_token');
// Build query string.
return ">m_auth=$environment_token>m_preview=$environment_id>m_cookies_win=x";
} | [
"protected function environmentQuery() {\n if (!$this->get('include_environment')) {\n return '';\n }\n\n // Gather data.\n $environment_id = $this->variableClean('environment_id');\n $environment_token = $this->variableClean('environment_token');\n\n // Build query string.\n return \">m_auth=$environment_token>m_preview=$environment_id\";\n }",
"public function getQueryString() {\n return urldecode($this->env->getEnvValue('QUERY_STRING'));\n }",
"protected static function buildQueryString() {\n\t$s = '';\n\tforeach (self::$parms as $k => $v) {\n\t $s .= $k . '=' . urlencode($v) . '&';\n\t}\n\treturn $s;\n }",
"public function getQueryString(): string\n {\n /* When at least one feature is enabled the query string is created */\n return count($this->params) > 0\n ? self::PARAM_NAME . '=' . implode(',', $this->params) : '';\n }",
"private function get_query_string() \n {\n $res = \"\";\n if(isset($_SERVER['QUERY_STRING'])) // Apache\n {\n $res = $_SERVER['QUERY_STRING'];\n } elseif(isset($_SERVER['REQUEST_URI'])) { // PHP Dev Server\n $res = $_SERVER['REQUEST_URI'];\n }\n return($res);\n }",
"public function getQueryString(): string\n {\n return http_build_query($this->query);\n }",
"public static function GenerateQueryString() {\n\t\t\tif (count($_GET)) {\n\t\t\t\t$strToReturn = '';\n\t\t\t\tforeach ($_GET as $strKey => $mixValue)\n\t\t\t\t\t$strToReturn .= QApplication::GenerateQueryStringHelper(urlencode($strKey), $mixValue);\n\t\t\t\treturn '?' . substr($strToReturn, 1);\n\t\t\t} else\n\t\t\t\treturn '';\n\t\t}",
"private function getQueryString() {\n if (empty($this->queryParams)) {\n return '';\n }\n\n return implode('&', $this->queryParams);\n }",
"public function getQuery(): string\n {\n $query = $this->request->getQueryString();\n\n return null === $query ? '' : \\sprintf('?%s', $query);\n }",
"public function getQueryString()\n {\n return $this->server->get('QUERY_STRING');\n }",
"public function getQueryString()\n\t{\n\t\treturn $_SERVER['QUERY_STRING'];\n\t}",
"public function getQueryString()\n {\n return $this->get('query') ? '?' . $this->get('query') : '';\n }",
"function getQueryString()\n {\n $queryString = \"\";\n $continuation = \"\";\n\n foreach ($this->queryArray as $element => $value) {\n $queryString .= \"$continuation$element=\" . urlencode($value);\n $continuation = \"&\";\n }\n\n return $queryString;\n }",
"public function buildQueryString(): string\n {\n return http_build_query($this->filters);\n }",
"public function acpQueryString()\n\t{\n\t\t$queryString = $this->queryString;\n\t\tunset( $queryString['adsess'] );\n\t\tunset( $queryString['csrf'] );\n\t\treturn static::convertQueryAsArrayToString( $queryString );\n\t}",
"public static function urlQueryString()\n {\n return (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : '';\n }",
"public function getQueryString()\n {\n return static::arrayToParams($this->getParams());\n }",
"protected function createQueryUrlString() {\n $storeId = $this->getStoreId();\n $checkoutSessionId = $this->getCheckoutSessionId();\n $urlQuery = '?d='.$storeId.'&s='.$checkoutSessionId;\n\n return $urlQuery;\n }",
"function queryString()\r\n{\r\n\t$qString = array();\r\n\t\r\n\tforeach($_GET as $key => $value) {\r\n\t\tif (trim($value) != '') {\r\n\t\t\t$qString[] = $key. '=' . trim($value);\r\n\t\t} else {\r\n\t\t\t$qString[] = $key;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$qString = implode('&', $qString);\r\n\t\r\n\treturn $qString;\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This event raises after owner saved. It clears cached values. | public function afterSave($event) {
$this->clearValuesCache();
} | [
"protected function afterSave() {}",
"protected function doAfterContainerSave() {\n if (!$this->isPersistent()) $this->origNodeId = $this->container->getPrimaryKey();\n \n if (!$this->lockStore) $this->endStore(true);\n \n $this->updateFromContainer();\n }",
"public function onSaving()\n {\n $entry = $this->getFormEntry();\n $parent = $this->getParent();\n\n if ($parent) {\n $entry->setAttribute('parent_id', $parent->getId());\n }\n }",
"protected function afterSave()\n\t{\n\t\tparent::afterSave();\n\t}",
"public function afterSave()\n {\n // forget current data\n Cache::forget('julius_multidomain_settings');\n\n // get all records available now\n $cacheableRecords = Setting::generateCacheableRecords();\n\n //save them in cache\n Cache::forever('julius_multidomain_settings', $cacheableRecords);\n }",
"public function afterSave()\n\t{\n\t}",
"public function afterSave()\n {\n Cache::forget(self::instance()->cacheStyle);\n }",
"public function afterValidate()\n {\n foreach ($this->_values as $attribute => $value) {\n $this->owner->$attribute = $value;\n }\n }",
"protected function finishSave()\n {\n $this->fireModelEvent('saved', false);\n $this->syncOriginal();\n }",
"public function onAfterSaveFieldContext()\n {\n MatrixMate::$plugin->matrixMate->clearFieldConfigCache();\n }",
"public function afterSave(){}",
"public function unset_saved() {\n\t\t\tself::$saved = false;\n\t\t}",
"public function onSave()\r\n {\r\n // first, use the default onSave()\r\n $object = parent::onSave();\r\n \r\n }",
"public function afterFind()\n {\n foreach ($this->fields as $f) {\n $this->owner->{$f} = Json::decode(($this->owner->{$f} ? $this->owner->{$f} : null));\n }\n }",
"public function onAfterValidate()\n {\n if ($this->owner->isAttributeChanged('parent_id')) {\n $this->owner->path = $this->owner->parent ? ArrayHelper::createCacheString(ArrayHelper::cacheStringToArray($this->owner->parent->path, $this->owner->parent_id)) : null;\n }\n }",
"public function saved()\n\t{\n\t\tforeach ( $this->_object as $value)\n\t\t{\n\t\t\tif ( $value instanceof Mango_Interface)\n\t\t\t{\n\t\t\t\t$value->saved();\n\t\t\t}\n\t\t}\n\n\t\t$this->_changed = array();\n\t}",
"public function clearInvokedSaveHooks()\n {\n $this->_invokedSaveHooks = array();\n }",
"function __destruct()\n\t{\n\t\tif ($this->_autosave) {\n\t\t\t$this->save();\n\t\t}\n\t}",
"public function onSave()\r\n\t{\r\n\t\t\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Function: unapprove Unapprove a comment Returns: Void | public function unapprove() {
$this->_editState(0);
} | [
"public function revokeApproval( $sComment = null );",
"public function unapproveComment($comment_id){\n\n\t\t$statement = $this->connection->prepare(\"UPDATE comments SET comment_status='unapproved' WHERE comment_id=:comment_id\");\n\t\t$statement->execute(array(':comment_id'=>$comment_id));\n\n\t\t$statement=$this->connection->prepare(\"SELECT comment_post_id as post_id from comments WHERE comment_id=:comment_id \");\n\t\t$statement->execute(array(':comment_id'=>$comment_id));\n\t\t$post_id =$statement->fetch(PDO::FETCH_COLUMN);\n\t\t\n\t\t$statement = $this->connection->prepare(\"UPDATE posts SET comments_count=(comments_count-1) WHERE post_id=:post_id\");\n\t\t$statement->execute(array(':post_id'=>$post_id));\n\n\t}",
"function unacknowledge_guest_comment() {\n $reservationId = $_POST['reservation_id'];\n if(isset($_SESSION['GUEST_COMMENTS_CONTROLLER'])) {\n $commentPage = $_SESSION['GUEST_COMMENTS_CONTROLLER'];\n $commentPage->unacknowledgeComment( $reservationId );\n }\n }",
"public function unapprove()\n {\n return $this->update(['approved' => false]);\n }",
"public function unapprove() {\n\n\t\tcheck_admin_referer( 'wpforms-unapprove-users' );\n\n\t\t$this->do_unapprove();\n\t}",
"function unConfirmComment()\n{\n echo \"======================================= unConfirm Comment ===================================\" .PHP_EOL;\n global $DealingService;\n\n $param =\n [\n ## ============================ *Required Parameters =========================\n 'commentId' => '{put comment id}', # id of comment\n ## =========================== Optional Parameters ===========================\n 'apiToken' => '{Put API TOKEN}', # امکان تغییر apiToken در اینجا وجود دارد\n# \"_token_issuer_\" => TOKEN_ISSUER # default is 1\n 'scVoucherHash' => ['{Put Service Call Voucher Hashes}'],\n 'scApiKey' => '{Put service call Api Key}',\n ];\n try {\n $result = $DealingService->confirmComment($param);\n print_r($result);\n } catch (ValidationException $e) {\n print_r($e->getResult());\n print_r($e->getErrorsAsArray());\n } catch (PodException $e) {\n print_r($e->getResult());\n }\n}",
"public function actionUnapprove()\n\t{\n\t\treturn $this->executeInlineModAction('unapproveThreads');\n\t}",
"public function actionUnapprove()\n\t{\n\t\treturn $this->executeInlineModAction('unapproveMedia');\n\t}",
"public function unapproveSelectedAction()\n {\n $this->view->ids = $ids = $this->_getParam('ids', null);\n $confirm = $this->_getParam('confirm', false);\n $this->view->count = count(explode(\",\", $ids));\n\n // Save values\n if( $this->getRequest()->isPost() && $confirm == true )\n {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try{\n $ids_array = explode(\",\", $ids);\n $notificationTable = Engine_Api::_()->getDbtable('notifications', 'activity');\n foreach( $ids_array as $id ){\n $blog = Engine_Api::_()->getItem('blog', $id);\n if( $blog ) {\n // Send notifications for blog owner\n $owner = $blog->getParent();\n $notificationTable->addNotification($owner, $blog, $blog, 'ynblog_unapproved');\n $blog->is_approved = 0;\n $blog->save();\n }\n }\n $db->commit();\n }\n catch( Exception $e ){\n $db->rollBack();\n throw $e;\n }\n //Redirect to admin manage index page\n $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }\n }",
"function ban_comment($commentID){\n\tglobal $db;\n\t$query = \"UPDATE comments SET \n\t\tapproved = 0\n\t\tWHERE commentID = '$commentID'\";\n\t$db->exec($query);\t\t\t\t\n}",
"function unapproved($comments) {\n global $user_ID;\n global $post;\n \n /*if( count($comments) > 200 ) {\n\t\t\t\t\tremove_filter( 'comment_text', 'wptexturize' );\n\t\t\t\t\tremove_filter( 'comment_text', 'convert_smilies', 20 );\n\t\t\t\t\tremove_filter( 'comment_text', 'wpautop', 30 ); \n\t\t\t\t\tadd_filter( 'comment_text', array( $this, 'wpautop_lite' ), 30 );\t\t\t\t\t\n }*/\n \n /* Check user permissions */\n if($user_ID && current_user_can('edit_post', $post->ID)) { \n /* Use the standard WP function to get the comments */\n if(function_exists('get_comments'))\n $comments = get_comments( array('post_id' => $post->ID, 'order' => 'ASC') );\n /* Use DB query for older WP versions */\n else {\n global $wpdb;\n $comments = $wpdb->get_results(\"SELECT * FROM {$wpdb->comments} WHERE comment_post_ID = {$post->ID} AND comment_approved != 'spam' ORDER BY comment_date ASC\");\n }\n \n /* Target array where both approved and unapproved comments are added */\n $new_comments = array();\n foreach($comments AS $comment) {\n /* Don't display the spam comments */ \n if($comment->comment_approved == 'spam')\n continue;\n /* Highlight the comment author in case the comment isn't approved yet */ \n if($comment->comment_approved == '0') {\n /* Alternative - highlight the comment content */\n //$comment->comment_content = '<div id=\"comment-'.$comment->comment_ID.'-unapproved\" style=\"background: #ffff99;\">'.$comment->comment_content.'</div>';\n $comment->comment_author = '<span id=\"comment-'.$comment->comment_ID.'-unapproved\" class=\"tc_highlight\">'.$comment->comment_author.'</span>';\n }\n $new_comments[] = $comment;\n }\n return $new_comments;\n }\n return $comments;\n }",
"function wp_unspam_comment($comment_id)\n{\n}",
"public function skipApproval();",
"public function markUnapproved()\n {\n $this->Moderated = false;\n $this->write();\n $this->extend('afterMarkUnapproved');\n }",
"function approveDeclineComments(){\n isLoggedInAndisAdmin();\n global $connection;\n // Decline Selected Comments\n if (isset($_GET['decline'])) {\n \n $comment_id_decline = escapeString($_GET['decline']);\n\n $query = \"UPDATE comments SET comment_status = 'decline' WHERE comment_id = {$comment_id_decline}\";\n $decline_comment = mysqli_query($connection, $query);\n // Check if the query is good\n querryCheck($decline_comment);\n\n // Update comments count by -1 \n $comment_post_id = getPostIDbyCommentID($comment_id_decline);\n $query = \"UPDATE POSTS SET post_comment_count = post_comment_count - 1 \";\n $query .= \"WHERE post_id = $comment_post_id \";\n\n $update_post_comment_count = mysqli_query($connection,$query);\n\n // Check if the query is good\n querryCheck($update_post_comment_count);\n\n header(\"Location: comments.php?commentsDecline=ture\");\n }\n\n // Approve Selected Comments\n if (isset($_GET['approve'])) {\n global $connection;\n $comment_id_approve = escapeString($_GET['approve']);\n\n $query = \"UPDATE comments SET comment_status = 'approved' WHERE comment_id = {$comment_id_approve}\";\n $approve_comment = mysqli_query($connection, $query);\n // Check if the query is good\n querryCheck($approve_comment);\n\n // Update comments count by +1\n $comment_post_id = getPostIDbyCommentID($comment_id_approve);\n $query = \"UPDATE POSTS SET post_comment_count = post_comment_count + 1 \";\n $query .= \"WHERE post_id = $comment_post_id \";\n\n $update_post_comment_count = mysqli_query($connection,$query);\n\n // Check if the query is good\n querryCheck($update_post_comment_count);\n\n header(\"Location: comments.php?commentsApproved=true\");\n }\n\n }",
"function reapprove() {\n $comment = \"Set to In Progress status for re-approval.\";\n foreach ($this->approvals_required() as $ap_type_id => $ap_type_desc) {\n $this->approve($ap_type_id, \"\", $comment);\n } // foreach\n }",
"public function unapprove( $args, $assoc_args ) {\n\t\t$reply_id = $args[0];\n\n\t\t// Check if reply exists.\n\t\tif ( ! bbp_is_reply( $reply_id ) ) {\n\t\t\t\\WP_CLI::error( 'No reply found by that ID.' );\n\t\t}\n\n\t\tif ( is_numeric( bbp_unapprove_reply( $reply_id ) ) ) {\n\t\t\t\\WP_CLI::success( sprintf( 'Reply %d successfully unapproved.', $reply_id ) );\n\t\t} else {\n\t\t\t\\WP_CLI::error( sprintf( 'Could not unapprove reply %d.', $reply_id ) );\n\t\t}\n\t}",
"public function approve($comment){\n $qry = new ClientQuery($this->getUrl() . \"/approve(comment='$comment')\", ClientActionType::Update);\n $this->getContext()->addQuery($qry);\n }",
"function approve_comment() {\n global $pdo;\n $comment_id = $_GET['approve'];\n\n $query = \"UPDATE comments SET comment_status = 'approved' WHERE comment_id = :cid\";\n $stmt = $pdo->prepare($query);\n $stmt->execute(array(':cid' => $comment_id));\n header(\"Location: comments.php\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value of ListRegisteredDestinationsResult, return this. | public function withListRegisteredDestinationsResult($value)
{
$this->setListRegisteredDestinationsResult($value);
return $this;
} | [
"public function listRegisteredDestinations($request)\n {\n //require_once (dirname(__FILE__) . '/Model/ListRegisteredDestinationsResponse.php');\n return MWSSubscriptions_Model_ListRegisteredDestinationsResponse::fromXML($this->_invoke('ListRegisteredDestinations'));\n }",
"public function fetchDestinations()\n {\n if (! array_key_exists('MarketplaceId', $this->options)) {\n $this->log('Marketplace ID must be set in order to fetch subscription destinations!', 'Warning');\n\n return false;\n }\n\n $this->options['Action'] = 'ListRegisteredDestinations';\n\n $url = $this->urlbase.$this->urlbranch;\n\n $query = $this->genQuery();\n\n $path = $this->options['Action'].'Result';\n if ($this->mockMode) {\n $xml = $this->fetchMockFile()->$path;\n } else {\n $response = $this->sendRequest($url, ['Post' => $query]);\n\n if (! $this->checkResponse($response)) {\n return false;\n }\n\n $xml = simplexml_load_string($response['body'])->$path;\n }\n\n $this->parseXML($xml);\n }",
"public function listRegisteredDestinations($request);",
"public function listRegisteredDestinations($request)\n {\n if (!($request instanceof ListRegisteredDestinationsInput)) {\n $request = new ListRegisteredDestinationsInput($request);\n }\n $parameters = $request->toQueryParameterArray();\n $parameters['Action'] = 'ListRegisteredDestinations';\n $httpResponse = $this->_invoke($parameters);\n\n $response = ListRegisteredDestinationsResponse::fromXML($httpResponse['ResponseBody']);\n $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);\n return $response;\n }",
"public function setDestinations($value)\n {\n return $this->set('Destinations', $value);\n }",
"public function setAllowedOutboundDataTransferDestinations($val)\n {\n $this->_propDict[\"allowedOutboundDataTransferDestinations\"] = $val;\n return $this;\n }",
"public function registerDestination()\n {\n if (! array_key_exists('MarketplaceId', $this->options)) {\n $this->log('Marketplace ID must be set in order to register a subscription destination!', 'Warning');\n\n return false;\n }\n if (! array_key_exists('Destination.DeliveryChannel', $this->options)) {\n $this->log('Delivery channel must be set in order to register a subscription destination!', 'Warning');\n\n return false;\n }\n if (! array_key_exists('Destination.AttributeList.member.1.Key', $this->options)) {\n $this->log('Attributes must be set in order to register a subscription destination!', 'Warning');\n\n return false;\n }\n\n $this->prepareRegister();\n\n $url = $this->urlbase.$this->urlbranch;\n\n $query = $this->genQuery();\n\n $path = $this->options['Action'].'Result';\n if ($this->mockMode) {\n $xml = $this->fetchMockFile()->$path;\n } else {\n $response = $this->sendRequest($url, ['Post' => $query]);\n\n if (! $this->checkResponse($response)) {\n return false;\n }\n\n $xml = simplexml_load_string($response['body'])->$path;\n }\n\n $this->parseXml($xml);\n }",
"public function getDestinations()\n {\n return $this->destinations;\n }",
"public function setDestinations($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Io\\Token\\Proto\\Common\\Transferinstructions\\TransferEndpoint::class);\n $this->destinations = $arr;\n\n return $this;\n }",
"public static function get_registered_destinations() {\r\n\r\n\t\t\t//only run it one time\r\n\t\t\tif ( ! empty( self::$registered_destinations ) )\r\n\t\t\t\treturn self::$registered_destinations;\r\n\r\n\t\t\t//add BackWPup Destinations\r\n\t\t\t// to folder\r\n\t\t\tself::$registered_destinations[ 'FOLDER' ] \t= array(\r\n\t\t\t\t\t\t\t\t'class' => 'BackWPup_Destination_Folder',\r\n\t\t\t\t\t\t\t\t'info'\t=> array(\r\n\t\t\t\t\t\t\t\t\t'ID' \t=> 'FOLDER',\r\n\t\t\t\t\t\t\t\t\t'name' \t=> __( 'Folder', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t'description' \t=> __( 'Backup to Folder', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'can_sync' => FALSE,\r\n\t\t\t\t\t\t\t\t'needed' => array(\r\n\t\t\t\t\t\t\t\t\t'php_version'\t=> '',\r\n\t\t\t\t\t\t\t\t\t'functions'\t=> array(),\r\n\t\t\t\t\t\t\t\t\t'classes'\t=> array()\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'autoload'\t=> array()\r\n\t\t\t\t\t\t\t);\r\n\t\t\t// backup with mail\r\n\t\t\tself::$registered_destinations[ 'EMAIL' ] \t= array(\r\n\t\t\t\t\t\t\t\t'class' => 'BackWPup_Destination_Email',\r\n\t\t\t\t\t\t\t\t'info'\t=> array(\r\n\t\t\t\t\t\t\t\t\t'ID' \t=> 'EMAIL',\r\n\t\t\t\t\t\t\t\t\t'name' \t=> __( 'Email', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t'description' \t=> __( 'Backup sent via email', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'can_sync' => FALSE,\r\n\t\t\t\t\t\t\t\t'needed' => array(\r\n\t\t\t\t\t\t\t\t\t'php_version'\t=> '5.2.4',\r\n\t\t\t\t\t\t\t\t\t'functions'\t=> array(),\r\n\t\t\t\t\t\t\t\t\t'classes'\t=> array()\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'autoload'\t=> array()\r\n\t\t\t\t\t\t\t);\r\n\t\t\t// backup to ftp\r\n\t\t\tself::$registered_destinations[ 'FTP' ] \t= array(\r\n\t\t\t\t\t\t\t\t'class' => 'BackWPup_Destination_Ftp',\r\n\t\t\t\t\t\t\t\t'info'\t=> array(\r\n\t\t\t\t\t\t\t\t\t'ID' \t=> 'FTP',\r\n\t\t\t\t\t\t\t\t\t'name' \t=> __( 'FTP', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t'description' \t=> __( 'Backup to FTP', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'can_sync' => FALSE,\r\n\t\t\t\t\t\t\t\t'needed' => array(\r\n\t\t\t\t\t\t\t\t\t'mphp_version'\t=> '',\r\n\t\t\t\t\t\t\t\t\t'functions'\t=> array( 'ftp_nb_fput' ),\r\n\t\t\t\t\t\t\t\t\t'classes'\t=> array()\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'autoload'\t=> array()\r\n\t\t\t\t\t\t\t);\r\n\t\t\t// backup to dropbox\r\n\t\t\tself::$registered_destinations[ 'DROPBOX' ] \t= array(\r\n\t\t\t\t\t\t\t\t'class' => 'BackWPup_Destination_Dropbox',\r\n\t\t\t\t\t\t\t\t'info'\t=> array(\r\n\t\t\t\t\t\t\t\t\t'ID' \t=> 'DROPBOX',\r\n\t\t\t\t\t\t\t\t\t'name' \t=> __( 'Dropbox', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t'description' \t=> __( 'Backup to Dropbox', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'can_sync' => FALSE,\r\n\t\t\t\t\t\t\t\t'needed' => array(\r\n\t\t\t\t\t\t\t\t\t'php_version'\t=> '',\r\n\t\t\t\t\t\t\t\t\t'functions'\t=> array( 'curl_exec' ),\r\n\t\t\t\t\t\t\t\t\t'classes'\t=> array()\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'autoload'\t=> array()\r\n\t\t\t\t\t\t\t);\r\n\t\t\t// Backup to S3\r\n\t\t\tif ( version_compare( PHP_VERSION, '5.3.3', '>=' ) )\r\n\t\t\t\tself::$registered_destinations[ 'S3' ] \t= array(\r\n\t\t\t\t\t\t\t\t\t'class' => 'BackWPup_Destination_S3',\r\n\t\t\t\t\t\t\t\t\t'info'\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t'ID' \t=> 'S3',\r\n\t\t\t\t\t\t\t\t\t\t'name' \t=> __( 'S3 Service', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t\t'description' \t=> __( 'Backup to an S3 Service', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t'can_sync' => FALSE,\r\n\t\t\t\t\t\t\t\t\t'needed' => array(\r\n\t\t\t\t\t\t\t\t\t\t'php_version'\t=> '5.3.3',\r\n\t\t\t\t\t\t\t\t\t\t'functions'\t=> array( 'curl_exec' ),\r\n\t\t\t\t\t\t\t\t\t\t'classes'\t=> array()\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t'autoload'\t=> array( \t'Aws\\\\Common' => dirname( __FILE__ ) .'/vendor',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Aws\\\\S3' => dirname( __FILE__ ) .'/vendor',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Symfony\\\\Component\\\\EventDispatcher' => BackWPup::get_plugin_data( 'plugindir' ) . '/vendor',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Guzzle' => dirname( __FILE__ ) . '/vendor'\t)\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\telse\r\n\t\t\t\tself::$registered_destinations[ 'S3' ] \t= array(\r\n\t\t\t\t\t\t\t\t\t'class' => 'BackWPup_Destination_S3_V1',\r\n\t\t\t\t\t\t\t\t\t'info'\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t'ID' \t=> 'S3',\r\n\t\t\t\t\t\t\t\t\t\t'name' \t=> __( 'S3 Service', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t\t'description' \t=> __( 'Backup to an S3 Service v1', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t'can_sync' => FALSE,\r\n\t\t\t\t\t\t\t\t\t'needed' => array(\r\n\t\t\t\t\t\t\t\t\t\t'php_version'\t=> '',\r\n\t\t\t\t\t\t\t\t\t\t'functions'\t=> array( 'curl_exec' ),\r\n\t\t\t\t\t\t\t\t\t\t'classes'\t=> array()\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t'autoload'\t=> array( 'AmazonS3' => dirname( __FILE__ ) . '/vendor/Aws_v1/sdk.class.php' )\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t// backup to MS Azure\r\n\t\t\tself::$registered_destinations[ 'MSAZURE' ] \t= array(\r\n\t\t\t\t\t\t\t\t'class' => 'BackWPup_Destination_MSAzure',\r\n\t\t\t\t\t\t\t\t'info'\t=> array(\r\n\t\t\t\t\t\t\t\t\t'ID' \t=> 'MSAZURE',\r\n\t\t\t\t\t\t\t\t\t'name' \t=> __( 'MS Azure', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t'description' \t=> __( 'Backup to Microsoft Azure (Blob)', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'can_sync' => FALSE,\r\n\t\t\t\t\t\t\t\t'needed' => array(\r\n\t\t\t\t\t\t\t\t\t'php_version'\t=> '5.3.2',\r\n\t\t\t\t\t\t\t\t\t'functions'\t=> array(),\r\n\t\t\t\t\t\t\t\t\t'classes'\t=> array()\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'autoload'\t=> array( 'WindowsAzure' => dirname( __FILE__ ) . '/vendor' )\r\n\t\t\t\t\t\t\t);\r\n\t\t\t// backup to Rackspace Cloud\r\n\t\t\tself::$registered_destinations[ 'RSC' ] \t= array(\r\n\t\t\t\t\t\t\t\t'class' => 'BackWPup_Destination_RSC',\r\n\t\t\t\t\t\t\t\t'info'\t=> array(\r\n\t\t\t\t\t\t\t\t\t'ID' \t=> 'RSC',\r\n\t\t\t\t\t\t\t\t\t'name' \t=> __( 'RSC', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t'description' \t=> __( 'Backup to Rackspace Cloud Files', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'can_sync' => FALSE,\r\n\t\t\t\t\t\t\t\t'needed' => array(\r\n\t\t\t\t\t\t\t\t\t'php_version'\t=> '5.3.3',\r\n\t\t\t\t\t\t\t\t\t'functions'\t=> array( 'curl_exec' ),\r\n\t\t\t\t\t\t\t\t\t'classes'\t=> array()\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'autoload'\t=> array( 'OpenCloud' => dirname( __FILE__ ) . '/vendor',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'Guzzle' => dirname( __FILE__ ) . '/vendor' )\r\n\t\t\t\t\t\t\t);\r\n\t\t\t// backup to Sugarsync\r\n\t\t\tself::$registered_destinations[ 'SUGARSYNC' ] \t= array(\r\n\t\t\t\t\t\t\t\t'class' => 'BackWPup_Destination_SugarSync',\r\n\t\t\t\t\t\t\t\t'info'\t=> array(\r\n\t\t\t\t\t\t\t\t\t'ID' \t=> 'SUGARSYNC',\r\n\t\t\t\t\t\t\t\t\t'name' \t=> __( 'SugarSync', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t\t'description' \t=> __( 'Backup to SugarSync', 'backwpup' ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'can_sync' => FALSE,\r\n\t\t\t\t\t\t\t\t'needed' => array(\r\n\t\t\t\t\t\t\t\t\t'php_version'\t=> '',\r\n\t\t\t\t\t\t\t\t\t'functions'\t=> array( 'curl_exec' ),\r\n\t\t\t\t\t\t\t\t\t'classes'\t=> array()\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t'autoload'\t=> array()\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t//Hook for adding Destinations like above\r\n\t\t\tself::$registered_destinations = apply_filters( 'backwpup_register_destination', self::$registered_destinations );\r\n\r\n\t\t\t//check BackWPup Destinations\r\n\t\t\tforeach ( self::$registered_destinations as $dest_key => $dest ) {\r\n\t\t\t\tself::$registered_destinations[ $dest_key ][ 'error'] = '';\r\n\t\t\t\t// check PHP Version\r\n\t\t\t\tif ( ! empty( $dest[ 'needed' ][ 'php_version' ] ) && version_compare( PHP_VERSION, $dest[ 'needed' ][ 'php_version' ], '<' ) ) {\r\n\t\t\t\t\tself::$registered_destinations[ $dest_key ][ 'error' ] .= sprintf( __( 'PHP Version %1$s is to low, you need Version %2$s or above.', 'backwpup' ), PHP_VERSION, $dest[ 'needed' ][ 'php_version' ] ) . ' ';\r\n\t\t\t\t\tself::$registered_destinations[ $dest_key ][ 'class' ] = NULL;\r\n\t\t\t\t}\r\n\t\t\t\t//check functions exists\r\n\t\t\t\tif ( ! empty( $dest[ 'needed' ][ 'functions' ] ) ) {\r\n\t\t\t\t\tforeach ( $dest[ 'needed' ][ 'functions' ] as $function_need ) {\r\n\t\t\t\t\t\tif ( ! function_exists( $function_need ) ) {\r\n\t\t\t\t\t\t\tself::$registered_destinations[ $dest_key ][ 'error' ] .= sprintf( __( 'Missing function \"%s\".', 'backwpup' ), $function_need ) . ' ';\r\n\t\t\t\t\t\t\tself::$registered_destinations[ $dest_key ][ 'class' ] = NULL;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//check classes exists\r\n\t\t\t\tif ( ! empty( $dest[ 'needed' ][ 'classes' ] ) ) {\r\n\t\t\t\t\tforeach ( $dest[ 'needed' ][ 'classes' ] as $class_need ) {\r\n\t\t\t\t\t\tif ( ! class_exists( $class_need ) ) {\r\n\t\t\t\t\t\t\tself::$registered_destinations[ $dest_key ][ 'error' ] .= sprintf( __( 'Missing class \"%s\".', 'backwpup' ), $class_need ) . ' ';\r\n\t\t\t\t\t\t\tself::$registered_destinations[ $dest_key ][ 'class' ] = NULL;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//add class/namespace to auto load\r\n\t\t\t\tif ( ! empty( self::$registered_destinations[ $dest_key ][ 'class' ] ) && ! empty( self::$registered_destinations[ $dest_key ][ 'autoload' ] ) )\r\n\t\t\t\t\tself::$autoload = array_merge( self::$autoload, self::$registered_destinations[ $dest_key ][ 'autoload' ] );\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn self::$registered_destinations;\r\n\t\t}",
"public function setRegistrants($val)\n {\n $this->_propDict[\"registrants\"] = $val;\n return $this;\n }",
"public function lonch_destinations(){\n $result = $this->db->get('destinations');\n return $result->result();\n }",
"public function setRegisteredOwners($val)\n {\n $this->_propDict[\"registeredOwners\"] = $val;\n return $this;\n }",
"public function setRegisteredUsers($val)\n {\n $this->_propDict[\"registeredUsers\"] = $val;\n return $this;\n }",
"function api_addDestination($destination_list){\r\n\t\tglobal $ORIGINS,$DESTINATIONS,$TIMEUNIT,$TRAVELMODE,$KEY,$API_LINK;\r\n\t\tif(count($destination_list)%2){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$DESTINATIONS = array_merge($DESTINATIONS,$destination_list);\r\n\t\treturn true;\r\n\t}",
"public function setDestinations($destinations)\n {\n $this->destinations = $destinations;\n }",
"public function addDestinations($destinations)\n {\n foreach ($destinations as $destination) {\n $this->addDestination($destination);\n }\n return $this;\n }",
"public function getDestinationsAsync()\n {\n return $this->getDestinationsAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function setRegistrar($val)\n {\n $this->_propDict[\"registrar\"] = $val;\n return $this;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Equal Heights Plugin Equalize the heights of elements. Great for columns or any elements that need to be the same size (floats, etc). Version 1.0 Updated 12/10/2008 Copyright (c) 2008 Rob Glazebrook (cssnewbie.com) Usage: $(object).equalHeights([minHeight], [maxHeight]); Example 1: $(".cols").equalHeights(); Sets all columns to the same height. Example 2: $(".cols").equalHeights(400); Sets all cols to at least 400px tall. Example 3: $(".cols").equalHeights(100,300); Cols are at least 100 but no more than 300 pixels tall. Elements with too much content will gain a scrollbar. | public static function equalHeights()
{
static $loaded = false;
if (!$loaded)
{
$script = 'OSM.jQuery(function($) { $.fn.equalHeights = function(minHeight, maxHeight) { tallest = (minHeight) ? minHeight : 0;this.each(function() {if($(this).height() > tallest) {tallest = $(this).height();}});if((maxHeight) && tallest > maxHeight) tallest = maxHeight;return this.each(function() {$(this).height(tallest).css("overflow","auto");});}});';
JFactory::getDocument()->addScriptDeclaration($script);
}
$loaded = true;
} | [
"public function isDimensionsEqual()\n {\n if($this->image1->getImageWidth() !== $this->image2->getImageWidth()\n || $this->image1->getImageHeight() !== $this->image2->getImageHeight())\n {\n return FALSE;\n }\n\n return TRUE;\n }",
"public function heightFix()\r\n {\r\n static $isAdded;\r\n\r\n $this->jQuery();\r\n\r\n if (!isset($isAdded)) {\r\n $isAdded = true;\r\n $this->addScript('jQuery(function($){\r\n setTimeout(function(){\r\n var maxHeight = tmpHeight = 0;\r\n $(\".jbzoo .items .column\").each(function(n, obj){\r\n var tmpHeight = parseInt($(obj).height(), 10);\r\n if (maxHeight < tmpHeight) {\r\n maxHeight = tmpHeight;\r\n }\r\n }).css({height:maxHeight});\r\n\r\n var maxHeight = tmpHeight = 0;\r\n $(\".jbzoo .subcategories .column\").each(function(n, obj){\r\n var tmpHeight = parseInt($(obj).height(), 10);\r\n if (maxHeight < tmpHeight) {\r\n maxHeight = tmpHeight;\r\n }\r\n }).css({height:maxHeight});\r\n\r\n var maxHeight = tmpHeight = 0;\r\n $(\".jbzoo .related-items .column\").each(function(n, obj){\r\n var tmpHeight = parseInt($(obj).height(), 10);\r\n if (maxHeight < tmpHeight) {\r\n maxHeight = tmpHeight;\r\n }\r\n }).css({height:maxHeight});\r\n }, 300);\r\n });');\r\n }\r\n }",
"public function testLandscapeLessBothResizeOnHeight()\n {\n // \"landscape\"\n $width = 10;\n $height = 5;\n\n $maxWidth = 20;\n $maxHeight = 8;\n\n $resize = new ImageResize();\n list($newWidth, $newHeight) = $resize->getCalculatedSize($width, $height, $maxWidth, $maxHeight);\n\n $this->assertEquals(16, $newWidth);\n $this->assertEquals(8, $newHeight);\n }",
"public function testMinHeight() {\n\t\t$this->assertTrue($this->object->minHeight(400));\n\t\t$this->assertFalse($this->object->minHeight(900));\n\t}",
"public function dataProvider_isSizeMatch() {\n return array(\n\n /**\n * Computing height to maintain aspect ratio with fixed width\n */\n //Large height, exact width\n array(100, null, 100, 400, true),\n\n //Small height, exact width\n array(100, null, 100, 50, true),\n\n //Too small width\n array(100, null, 99, 400, false),\n\n //Too large width\n array(100, null, 101, 400, false),\n\n /**\n * Computing width to maintain aspect ratio with fixed height\n */\n //Large width, exact height\n array(null, 100, 400, 100, true),\n\n //Small width, exact height\n array(null, 100, 50, 100, true),\n\n //Too small heigh\n array(null, 100, 400, 99, false),\n\n //Too large height\n array(null, 100, 400, 101, false),\n\n /**\n * Exact matches\n */\n //Exact image size matches should return true\n array(400, 100, 400, 100, true),\n array(1, 1234, 1, 1234, true),\n\n //Both width and height don't match\n array(400, 100, 1, 2, false),\n array(1, 1234, 4, 5, false),\n\n //Only width matches\n array(400, 100, 400, 50, false),\n\n //Only height matches\n array(400, 100, 50, 100, false)\n );\n }",
"function match_height() {\n\t\t\twp_enqueue_script( 'match-heught-js', get_stylesheet_directory_uri() . '/js/jquery-match-height/jquery.matchHeight.js', array(), '20151215', true );\n }",
"function setHeight($minHeight = 50) {\n\techo \"The height is : $minHeight <br>\";\n}",
"public function getHeightS();",
"function AutoCompGetMaxHeight(){}",
"function socialcompare_get_height(){\n\treturn socialcompare_get_size('socialcompare_height', 'embed_size_h', '500');\n}",
"public function testGetAndSetHeight()\n {\n $height = '140';\n\n $this->pluginWrapper->setHeight($height);\n\n $actual = $this->pluginWrapper->getHeight();\n\n $this->assertEquals($height . 'px', $actual);\n }",
"public function getHeightSq();",
"public function calculateEqualDimensions(int $maxWidth): void {\n if ($maxWidth < 1) {\n throw new RuntimeException('Max width has to be greater than 0!');\n }\n\n // Determinate which image is the smaller and which is the bigger.\n $originalSmallerAW = $this->secondImage->whRatio();\n $originalBiggerH = $this->firstImage->height();\n $originalBiggerW = $this->firstImage->width();\n $originalBiggerAW = $this->firstImage->whRatio();\n if ($this->firstImage->height() <= $this->secondImage->height()) {\n $originalSmallerAW = $this->firstImage->whRatio();\n $originalBiggerH = $this->secondImage->height();\n $originalBiggerW = $this->secondImage->width();\n $originalBiggerAW = $this->secondImage->whRatio();\n }\n\n // Scale up the smaller to the bigger's height.\n $originalSmallerW = $originalBiggerH * $originalSmallerAW;\n $originalSmallerH = $originalBiggerH;\n\n // Calculate out the difference, if its less than 0 it will scale down, if\n // it's bigger than 0 if will scale up.\n $diff = $maxWidth - ($originalBiggerW + $originalSmallerW);\n // Determinate the 'removable' or 'addable' height from the images.\n $averageHeight = $diff * ((($originalSmallerH + $originalBiggerH) / ($originalSmallerW + $originalBiggerW)) / 2);\n // Add or remove the height. If $averageHeight is less than 0 it will scale\n // down, if it's greater than it's scale up.\n $originalSmallerW += $averageHeight * $originalSmallerAW;\n $originalBiggerW += $averageHeight * $originalBiggerAW;\n $originalSmallerH += $averageHeight;\n $originalBiggerH += $averageHeight;\n\n // Return the result in the same order as the image was set.\n if ($this->firstImage->height() <= $this->secondImage->height()) {\n $this->equalizedFirstDimensions = new ImageDimensions($originalSmallerW, $originalSmallerH);\n $this->equalizedSecondDimensions = new ImageDimensions($originalBiggerW, $originalBiggerH);\n }\n else {\n $this->equalizedFirstDimensions = new ImageDimensions($originalBiggerW, $originalBiggerH);\n $this->equalizedSecondDimensions = new ImageDimensions($originalSmallerW, $originalSmallerH);\n }\n }",
"public function filterByMaxHeight($maxHeight = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($maxHeight)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $maxHeight)) {\n $maxHeight = str_replace('*', '%', $maxHeight);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(ListerConfigPeer::MAX_HEIGHT, $maxHeight, $comparison);\n }",
"public function testHeighten()\n {\n $box = new RelativeBox(100, 100);\n\n $this->assertEquals(new RelativeBox(200, 200), $box->heighten(200));\n }",
"function test_get_new_size_when_max_height__is_less_than_height() {\n\t\t$image_info = new GetImageInfo( _TEST_IMAGE );\n\t\tlist( $new_width, $new_height ) = $image_info->get_new_size( 1400, 200 );\n\n\t\t$original_ratio = round( $image_info->get_ratio(), 2 );\n\t\t$resized_ratio = round( $new_width / $new_height, 2 );\n\n\t\t$this->assertEquals( $new_height, 200 );\n\t\t$this->assertEquals( $original_ratio, $resized_ratio );\n\t}",
"function resizeRatio( $maxWidth, $maxHeight, $useAsMinimum = false ) {\n\t\t\n\t\t$widthRatio = $maxWidth / $this->width;\n\t\t$heightRatio = $maxHeight / $this->height;\n\t\t\n\t\tif( $widthRatio < $heightRatio )\n\t\t\treturn $useAsMinimum ? $this->resizeByHeight( $maxHeight ) : $this->resizeByWidth( $maxWidth );\n\t\telse\n\t\t\treturn $useAsMinimum ? $this->resizeByWidth( $maxWidth ) : $this->resizeByHeight( $maxHeight );\n\t}",
"function resizeRatio( $maxWidth, $maxHeight, $useAsMinimum = false ) {\n\n\t\t$widthRatio = $maxWidth / $this->width;\n\t\t$heightRatio = $maxHeight / $this->height;\n\n\t\tif( $widthRatio < $heightRatio )\n\t\t\treturn $useAsMinimum ? $this->resizeByHeight( $maxHeight ) : $this->resizeByWidth( $maxWidth );\n\t\telse\n\t\t\treturn $useAsMinimum ? $this->resizeByWidth( $maxWidth ) : $this->resizeByHeight( $maxHeight );\n\t}",
"public function testRandomHeight()\n {\n $star = new Tree();\n $this->assertContains($star->getHeight(), [5, 7, 11, 15]);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation createStickRuleWithHttpInfo Add a new Stick Rule | public function createStickRuleWithHttpInfo($body, $backend, $transaction_id = null, $version = null, $force_reload = 'false')
{
$returnType = '\Swagger\Client\Model\StickRule';
$request = $this->createStickRuleRequest($body, $backend, $transaction_id, $version, $force_reload);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if (!in_array($returnType, ['string','integer','bool'])) {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 201:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\StickRule',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 202:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\StickRule',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 400:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\Error',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 409:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\Error',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 0:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\Error',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | [
"public function createRuleWithHttpInfo($store_id, $request)\n {\n // verify the required parameter 'store_id' is set\n if ($store_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $store_id when calling createRule');\n }\n // verify the required parameter 'request' is set\n if ($request === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $request when calling createRule');\n }\n // parse inputs\n $resourcePath = \"/v2/user/analytics/{storeId}/rules\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // path params\n if ($store_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"storeId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($store_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($request)) {\n $_tempBody = $request;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('Ocp-Apim-Subscription-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['Ocp-Apim-Subscription-Key'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/v2/user/analytics/{storeId}/rules'\n );\n\n return [null, $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 0:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\BeezUPCommonErrorResponseMessage', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }",
"public function store(CreateStyleAPIRequest $request)\n {\n $input = $request->all();\n\n $style = $this->styleRepository->create($input);\n\n return $this->sendResponse($style->toArray(), 'Style saved successfully');\n }",
"public function createAvailabilityRule($rule)\n {\n $postFields = [\n \"availability_rule_id\" => $rule[\"availability_rule_id\"],\n \"tzid\" => $rule[\"tzid\"],\n \"calendar_ids\" => $rule[\"calendar_ids\"],\n \"weekly_periods\" => $rule[\"weekly_periods\"],\n ];\n\n return $this->httpPost(\"/\" . self::API_VERSION . \"/availability_rules\", $postFields);\n }",
"public function postLtiadvantageDeploymentSharingDeploymentId($version, $deploymentId, $createSharingRuleData)\n {\n $uri = \"/d2l/api/le/$version/ltiadvantage/deployment/$deploymentId/sharing/\";\n $body = $createSharingRuleData;\n $headers = [\"content-type\" => 'application/json'];\n return new Request(\"POST\", $uri, $headers, $body);\n }",
"protected function createStickRuleRequest($body, $backend, $transaction_id = null, $version = null, $force_reload = 'false')\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createStickRule'\n );\n }\n // verify the required parameter 'backend' is set\n if ($backend === null || (is_array($backend) && count($backend) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $backend when calling createStickRule'\n );\n }\n\n $resourcePath = '/services/haproxy/configuration/stick_rules';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($backend !== null) {\n $queryParams['backend'] = ObjectSerializer::toQueryValue($backend);\n }\n // query params\n if ($transaction_id !== null) {\n $queryParams['transaction_id'] = ObjectSerializer::toQueryValue($transaction_id);\n }\n // query params\n if ($version !== null) {\n $queryParams['version'] = ObjectSerializer::toQueryValue($version);\n }\n // query params\n if ($force_reload !== null) {\n $queryParams['force_reload'] = ObjectSerializer::toQueryValue($force_reload);\n }\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function createStory(string $name, RuleInterface ...$rules): Story\n {\n $story = new Story($name, ...$rules);\n $this->addStories($story);\n\n return $story;\n }",
"public function create($strategy, $selector, array $rules = [ ], array $options = [ ]);",
"public function addTarget(Rule $rule, TargetCreateStruct $targetCreateStruct): Target;",
"public function createSnatEntryWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->eipAffinity)) {\n $query['EipAffinity'] = $request->eipAffinity;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->snatEntryName)) {\n $query['SnatEntryName'] = $request->snatEntryName;\n }\n if (!Utils::isUnset($request->snatIp)) {\n $query['SnatIp'] = $request->snatIp;\n }\n if (!Utils::isUnset($request->snatTableId)) {\n $query['SnatTableId'] = $request->snatTableId;\n }\n if (!Utils::isUnset($request->sourceCIDR)) {\n $query['SourceCIDR'] = $request->sourceCIDR;\n }\n if (!Utils::isUnset($request->sourceVSwitchId)) {\n $query['SourceVSwitchId'] = $request->sourceVSwitchId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'CreateSnatEntry',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return CreateSnatEntryResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"function add_rule_to_anchor($anchor, $rule, $label) {\n\tmwexec(\"echo \" . $rule . \" | /sbin/pfctl -a \" . $anchor . \":\" . $label . \" -f -\");\n}",
"protected function updateShippingAreaToRuleWithHttpInfo(\n \\Walmart\\Models\\MP\\US\\Rules\\UpdateShippingAreaToRulesRequest $updateShippingAreaToRulesRequest,\n ): \\Walmart\\Models\\MP\\US\\Rules\\CreateRuleResponse {\n $request = $this->updateShippingAreaToRuleRequest($updateShippingAreaToRulesRequest);\n $this->writeDebug($request);\n $this->writeDebug((string) $request->getBody());\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n $this->writeDebug($response);\n $this->writeDebug((string) $response->getBody());\n } catch (RequestException $e) {\n $hasResponse = !empty($e->hasResponse());\n $body = (string) ($hasResponse ? $e->getResponse()->getBody() : '[NULL response]');\n $this->writeDebug($e->getResponse());\n $this->writeDebug($body);\n\n throw new ApiException(\n \"[{$e->getCode()}] {$body}\",\n (int) $e->getCode(),\n $hasResponse ? $e->getResponse()->getHeaders() : null,\n $body\n );\n } catch (ConnectException $e) {\n $this->writeDebug($e->getMessage());\n\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n switch ($statusCode) {\n case 200:\n if ('\\Walmart\\Models\\MP\\US\\Rules\\CreateRuleResponse' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\Walmart\\Models\\MP\\US\\Rules\\CreateRuleResponse' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return ObjectSerializer::deserialize($content, '\\Walmart\\Models\\MP\\US\\Rules\\CreateRuleResponse', $response->getHeaders());\n }\n\n $returnType = '\\Walmart\\Models\\MP\\US\\Rules\\CreateRuleResponse';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return ObjectSerializer::deserialize($content, $returnType, $response->getHeaders());\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Walmart\\Models\\MP\\US\\Rules\\CreateRuleResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n\n $this->writeDebug($e);\n throw $e;\n }\n }",
"public function created(Rule $rule)\n {\n Artisan::call('rule:apply');\n }",
"public function create($parent, MappingRule $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], MappingRule::class);\n }",
"public function createNetworkSwitchQosRuleWithHttpInfo($network_id, $create_network_switch_qos_rule)\n {\n $returnType = 'object';\n $request = $this->createNetworkSwitchQosRuleRequest($network_id, $create_network_switch_qos_rule);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function store(StoreRulesRequest $request)\n {\n if (! Gate::allows('rule_create')) {\n return abort(401);\n }\n $rule = Rule::create($request->all());\n\n\n\n return redirect()->route('admin.rules.index');\n }",
"protected function updateNetworkWirelessSsidTrafficShapingRulesRequest($network_id, $number, $update_network_wireless_ssid_traffic_shaping_rules = null)\n {\n // verify the required parameter 'network_id' is set\n if ($network_id === null || (is_array($network_id) && count($network_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $network_id when calling updateNetworkWirelessSsidTrafficShapingRules'\n );\n }\n // verify the required parameter 'number' is set\n if ($number === null || (is_array($number) && count($number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $number when calling updateNetworkWirelessSsidTrafficShapingRules'\n );\n }\n\n $resourcePath = '/networks/{networkId}/wireless/ssids/{number}/trafficShaping/rules';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($network_id !== null) {\n $resourcePath = str_replace(\n '{' . 'networkId' . '}',\n ObjectSerializer::toPathValue($network_id),\n $resourcePath\n );\n }\n // path params\n if ($number !== null) {\n $resourcePath = str_replace(\n '{' . 'number' . '}',\n ObjectSerializer::toPathValue($number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($update_network_wireless_ssid_traffic_shaping_rules)) {\n $_tempBody = $update_network_wireless_ssid_traffic_shaping_rules;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function create($appsId, FirewallRule $postBody, $optParams = [])\n {\n $params = ['appsId' => $appsId, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], FirewallRule::class);\n }",
"public function addRule(Rule\\RuleIface $rule);",
"public function insert_rule(Rule $rule) {\n $sql = 'INSERT INTO `' . DB_TN_RULES . '` (`' . DB_CN_RULES_LABEL . '`, `' . DB_CN_RULES_DATE . '`, `' . DB_CN_RULES_LATLON . '`, `' . DB_CN_RULES_RADIUS_KM . '`, `' . DB_CN_RULES_IS_ACTIVE . \"`) VALUES (:LABEL, :DATE, GeomFromText('POINT(\" . $rule->lat . ' ' . $rule->lon . \")'), :RAD, :ISA)\";\n $stmt = $this->prepare($sql);\n $stmt->bindValue(':LABEL', $rule->label);\n $stmt->bindValue(':DATE', $rule->getDateMysql());\n $stmt->bindValue(':RAD', $rule->radius);\n $stmt->bindValue(':ISA', '1');\n $stmt->execute();\n// return $this->lastInsertId();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns xml files working directory path | public function getXmlDirectory()
{
return APP . 'tmp' . DS . 'xml' . DS . $this->name . DS;
} | [
"protected function getDocroot()\n {\n return (getcwd());\n }",
"function GetXmlPath() {\n\t\treturn $this->GetHomePath() . 'sitemap.xml';\n\t}",
"public static function getWorkingDir()\n {\n return Mage::getBaseDir('var') . DS . 'importexport' . DS;\n }",
"protected function getRequestConfigPath()\n {\n return __DIR__ . '/../_files/requests.xml';\n }",
"public function getWorkingDir()\n {\n return $this->_varDirectory->getAbsolutePath($this->borntechiesHelper->getCustomerImportDirectory());\n }",
"public static function getLocalXmlFile()\n {\n if (self::$_localXmlFile === null) {\n self::$_localXmlFile = self::getEtcDir() . DS . 'local.xml';\n }\n return self::$_localXmlFile;\n }",
"public function getWorkingDir() {\n return $this->working_dir;\n }",
"protected function getCurrentWorkingDirectory()\n {\n return getcwd();\n }",
"protected function _getKnownValidXml()\n {\n return __DIR__ . '/_files/valid.xml';\n }",
"public function getCurrentWorkingDirectory()\n {\n return $this->packageSourcePath;\n }",
"public function getCurrentDirectory() {\n\t\treturn getcwd();\n\t}",
"public function getWorkingDir(): string\n {\n return $this->workingDir;\n }",
"public function getDocRoot() {\n\t\treturn rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR).'/';\n\t}",
"public function getCurrentDirectory();",
"protected function _getKnownValidXml()\n {\n return __DIR__ . '/_files/payment.xml';\n }",
"public function files_dir()\n\t{\n\t return getcwd() . '/' . FILES_DIR;\n\t}",
"public function getRootDir()\n {\n return $this->server['DOCUMENT_ROOT'];\n }",
"public static function get_location() : string {\n\n\t\treturn __DIR__;\n\n\t}",
"public function currentWorkingDirectory()\n {\n return getcwd();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation postConversationParticipantCallbacksAsyncWithHttpInfo Create a new callback for the specified participant on the conversation. | public function postConversationParticipantCallbacksAsyncWithHttpInfo($conversationId, $participantId, $body = null)
{
$returnType = '';
$request = $this->postConversationParticipantCallbacksRequest($conversationId, $participantId, $body);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $response->getStatusCode(), $response->getHeaders()];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | [
"public function postConversationParticipantCallbacks($conversationId, $participantId, $body = null)\n {\n $this->postConversationParticipantCallbacksWithHttpInfo($conversationId, $participantId, $body);\n }",
"public function postConversationParticipantCallbacksWithHttpInfo($conversationId, $participantId, $body = null)\n {\n $returnType = '';\n $request = $this->postConversationParticipantCallbacksRequest($conversationId, $participantId, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 413:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 415:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 503:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 504:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function postConversationsCallbacks($body)\n {\n list($response) = $this->postConversationsCallbacksWithHttpInfo($body);\n return $response;\n }",
"protected function postConversationParticipantCallbacksRequest($conversationId, $participantId, $body = null)\n {\n // verify the required parameter 'conversationId' is set\n if ($conversationId === null || (is_array($conversationId) && count($conversationId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $conversationId when calling postConversationParticipantCallbacks'\n );\n }\n // verify the required parameter 'participantId' is set\n if ($participantId === null || (is_array($participantId) && count($participantId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $participantId when calling postConversationParticipantCallbacks'\n );\n }\n\n $resourcePath = '/api/v2/conversations/{conversationId}/participants/{participantId}/callbacks';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($conversationId !== null) {\n $resourcePath = str_replace(\n '{' . 'conversationId' . '}',\n ObjectSerializer::toPathValue($conversationId),\n $resourcePath\n );\n }\n // path params\n if ($participantId !== null) {\n $resourcePath = str_replace(\n '{' . 'participantId' . '}',\n ObjectSerializer::toPathValue($participantId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function postConversationParticipantCallbacksAsync($conversationId, $participantId, $body = null)\n {\n return $this->postConversationParticipantCallbacksAsyncWithHttpInfo($conversationId, $participantId, $body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function postConversationsCallbacksAsync($body)\n {\n return $this->postConversationsCallbacksAsyncWithHttpInfo($body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function postConversationsCallsAsyncWithHttpInfo($body)\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\CreateCallResponse';\n $request = $this->postConversationsCallsRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getConversationsCallbacksAsyncWithHttpInfo()\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\CallbackConversationEntityListing';\n $request = $this->getConversationsCallbacksRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function createChatUsingPostAsync($chat_info_request)\n {\n return $this->createChatUsingPostAsyncWithHttpInfo($chat_info_request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function creditorWarehouseAddressPOSTRequestCreditorIDWarehouseAddressPostAsyncWithHttpInfo($accept, $creditor_id, $jiwa_stateful = null, $description = null, $address1 = null, $address2 = null, $address3 = null, $address4 = null, $postcode = null, $country = null, $notes = null, $courier_details = null, $default_delivery_days = null, $is_default = null, $body = null)\n {\n $returnType = '\\Jiwa\\Model\\CreditorWarehouseAddress';\n $request = $this->creditorWarehouseAddressPOSTRequestCreditorIDWarehouseAddressPostRequest($accept, $creditor_id, $jiwa_stateful, $description, $address1, $address2, $address3, $address4, $postcode, $country, $notes, $courier_details, $default_delivery_days, $is_default, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function salesOrderPaymentsPOSTRequestInvoiceIDHistorysInvoiceHistoryIDPaymentsPostAsyncWithHttpInfo($accept, $invoice_id, $invoice_history_id, $jiwa_stateful = null, $payment_type = null, $amount_paid = null, $payment_date = null, $process_payment = null, $authorisation_status = null, $payment_gateway_return_code = null, $processed = null, $card_expiry = null, $payment_ref = null, $authorisation_number = null, $payment_gateway_return_message = null, $card_number = null, $card_holder = null, $bank_name = null, $bsbn = null, $bank_acc = null, $account_name = null, $body = null)\n {\n $returnType = '\\Jiwa\\Model\\SalesOrderPayment';\n $request = $this->salesOrderPaymentsPOSTRequestInvoiceIDHistorysInvoiceHistoryIDPaymentsPostRequest($accept, $invoice_id, $invoice_history_id, $jiwa_stateful, $payment_type, $amount_paid, $payment_date, $process_payment, $authorisation_status, $payment_gateway_return_code, $processed, $card_expiry, $payment_ref, $authorisation_number, $payment_gateway_return_message, $card_number, $card_holder, $bank_name, $bsbn, $bank_acc, $account_name, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function patchConversationsCallbackParticipantAttributes($conversationId, $participantId, $body)\n {\n $this->patchConversationsCallbackParticipantAttributesWithHttpInfo($conversationId, $participantId, $body);\n }",
"public function patchConversationsCallbackParticipantWithHttpInfo($conversationId, $participantId, $body)\n {\n $returnType = '';\n $request = $this->patchConversationsCallbackParticipantRequest($conversationId, $participantId, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 413:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 415:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 503:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 504:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function patchConversationsCallbackParticipantAttributesAsync($conversationId, $participantId, $body)\n {\n return $this->patchConversationsCallbackParticipantAttributesAsyncWithHttpInfo($conversationId, $participantId, $body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function postConversationsCallbackParticipantReplaceWithHttpInfo($conversationId, $participantId, $body)\n {\n $returnType = '';\n $request = $this->postConversationsCallbackParticipantReplaceRequest($conversationId, $participantId, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 413:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 415:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 503:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 504:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function postConversationsCallbackParticipantReplace($conversationId, $participantId, $body)\n {\n $this->postConversationsCallbackParticipantReplaceWithHttpInfo($conversationId, $participantId, $body);\n }",
"public function partnersCreatePostAsyncWithHttpInfo($body = null)\n {\n $returnType = '\\Carooline\\Model\\Partner';\n $request = $this->partnersCreatePostRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function postConversationParticipantSecureivrsessionsAsyncWithHttpInfo($conversationId, $participantId, $body = null)\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\SecureSession';\n $request = $this->postConversationParticipantSecureivrsessionsRequest($conversationId, $participantId, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function debtorContactNamePOSTRequestDebtorIDContactNamesPostAsyncWithHttpInfo($accept, $debtor_id, $jiwa_stateful = null, $default_contact = null, $debtor_contact = null, $creditor_contact = null, $contact_id = null, $account_no = null, $title = null, $first_name = null, $surname = null, $primary_position_id = null, $primary_position_name = null, $secondary_position_id = null, $secondary_position_name = null, $tertiary_position_id = null, $tertiary_position_name = null, $phone = null, $mobile = null, $fax = null, $email_address = null, $prospect_id = null, $logon_code = null, $logon_password = null, $external_app_rec_id = null, $logon_code_changed_by_user = null, $body = null)\n {\n $returnType = '\\Jiwa\\Model\\DebtorContactName';\n $request = $this->debtorContactNamePOSTRequestDebtorIDContactNamesPostRequest($accept, $debtor_id, $jiwa_stateful, $default_contact, $debtor_contact, $creditor_contact, $contact_id, $account_no, $title, $first_name, $surname, $primary_position_id, $primary_position_name, $secondary_position_id, $secondary_position_name, $tertiary_position_id, $tertiary_position_name, $phone, $mobile, $fax, $email_address, $prospect_id, $logon_code, $logon_password, $external_app_rec_id, $logon_code_changed_by_user, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Provide the file name of the order csv with orders missing a specific field | public function orderCsvWithEmptyValueForRequiredFieldsProvider()
{
return [
'empty_name' => ['orders_with_empty_name.csv', 'name'],
'empty_email' => ['orders_with_empty_email.csv', 'email'],
'empty_state' => ['orders_with_empty_state.csv', 'state'],
'empty_zipcode' => ['orders_with_empty_zipcode.csv', 'zipcode'],
'empty_birthday' => ['orders_with_empty_birthday.csv', 'birthday'],
];
} | [
"public function csvExportAction()\n { \n $orders = $this->getRequest()->getPost('order_ids', array());\n if(empty($orders) || (isset($orders[0]) && empty($orders[0]))) {\n Mage::getSingleton('adminhtml/session')->addError(\"Please select some order\");\n $this->_redirectReferer();\n return;\n }\n $file = Mage::getModel('slandsbek_simpleorderexport/export_csv')->exportOrders($orders);\n $this->_prepareDownloadResponse($file, file_get_contents(Mage::getBaseDir('export').'/'.$file));\n\n }",
"protected function createCsvFile() {\n $form = $this->download->form;\n $file_name = $this->exporter->exportToFile($form, false, [], $this->download->id);\n\n if ($file_name) {\n $this->setStatusToComplete($file_name);\n\n return;\n }\n\n $this->setStatusToFailed();\n\n return;\n }",
"public function exportOrderCsvAction()\n\t{\n\t\t$this->_prepareDownloadResponse(\n\t\t\t'invitation_order.csv'\n\t\t\t, Df_Invitation_Block_Adminhtml_Report_Invitation_Order_Grid::i()->getCsv()\n\t\t);\n\t}",
"public function exportOrders($orders) \n {\n $fileName = 'finance_export_'.date(\"Ymd_His\").'.csv';\n $fp = fopen(Mage::getBaseDir('export').'/'.$fileName, 'w');\n\n $this->writeHeadRow($fp);\n foreach ($orders as $order) {\n $order = Mage::getModel('sales/order')->load($order);\n $this->writeOrder($order, $fp);\n\t\t\t//$this->testcheck($order); \n\t\t\t\n }\n\n fclose($fp);\n\n return $fileName;\n }",
"public function DontDeleteCSV()\r\n {\r\n $this->dontDeleteCSV = true;\r\n }",
"public function getRequiredCsvFields()\n {\n // indexes are specified for clarity, they are used during import\n return [\n 0 => __('created_at'),\n 1 => __('product_id'),\n 2 => __('status_id'),\n 3 => __('Title'),\n 4 => __('Detail'),\n 5 => __('nickname'),\n 6 => __('customer_id'),\n 7 => __('option_id'),\n 8 =>__('stores')\n ];\n }",
"public function exportCsvAction() {\n $fileName = 'deleted_orders.csv';\n $grid = $this->getLayout()->createBlock('deleteorder/adminhtml_deleteorder_grid');\n $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\n }",
"public function uploadSaleCSV($validated);",
"public function exportCsvAction() {\n $filename = 'orders_lengow.csv';\n $grid = $this->getLayout()->createBlock('sync/adminhtml_order_grid');\n $this->_prepareDownloadResponse($filename, $grid->getCsvFile());\n }",
"function oubound_Deliveries($file=\"\")\r\n {\r\n\tglobal $wpdb;\r\n\t\r\n\techo \"oubound_Deliveries<br>\";\r\n\t\r\n $csv_file = get_option( 'wp_import_csv'); \r\n\t\r\n if($csv_file !=\"\"){\r\n\t\r\n $table_name = $wpdb->prefix . 'oubound_deliveries';\r\n \r\n //skip line\r\n\t $impCsv_Opt = get_option ( WPCSV_PREFIX );\r\n\t \r\n\t if($impCsv_Opt['ouboundDeliveries'] == \"\" || $impCsv_Opt['ouboundDeliveries'] < 0){\r\n\t\t $skipLine = 8;\r\n\t }else{\r\n\t\t $skipLine = $impCsv_Opt['ouboundDeliveries'];\r\n\t }\r\n \r\n \r\n $csv = readCSV($csv_file,$skipLineNumber = $skipLine);\r\n //echo '<pre>'; print_r($csv);\r\n\t \r\n\t$csv_count_Colmn = $csv;\r\n\t for($i = 0 ; $i<count($csv); $i++){\r\n\t\t if( count($csv_count_Colmn[0])== 12 || count($csv_count_Colmn[0])==11 ){\r\n\t\t\t \r\n\t\t\tif( count($csv_count_Colmn[0])== 12){ \r\n\t\t\t$db['shipment_date'] = $csv[$i][0];\r\n\t\t\t$db['product'] = $csv[$i][1];\r\n\t\t\t$db['country_of_origin_product'] = $csv[$i][2];\r\n\t\t\t$db['external_reference_sales_order_item_id'] =$csv[$i][3];\r\n\t\t\t$db['sales_order_id']= $csv[$i][4];\r\n\t\t\t$db['sales_order_item_id'] = $csv[$i][5];\r\n\t\t\t$db['item_cancellation_status'] = $csv[$i][6];\r\n\t\t\t$db['pack_list_id']= $csv[$i][7];\r\n\t\t\t$db['account_sales_order_item_id'] = $csv[$i][8];\r\n\t\t\t$db['freight_forwarder_delivery_id'] =$csv[$i][9];\r\n\t\t\t$db['tracking_id_delivery_id'] = $csv[$i][10];\r\n\t\t\t$del_Quan = str_replace(\"ea\",\"\",$csv[$i][11]);\r\n\t\t\t$db['delivered_quantity'] = $del_Quan;\r\n\t\t\t\r\n\t\t\t}else{\r\n\t\t\t$db['shipment_date'] = $csv[$i][0];\r\n\t\t\t$db['product'] = $csv[$i][1];\r\n\t\t\t$db['country_of_origin_product'] = $csv[$i][2];\r\n\t\t\t$db['external_reference_sales_order_item_id'] =$csv[$i][3];\r\n\t\t\t$db['sales_order_id']= $csv[$i][4];\r\n\t\t\t$db['sales_order_item_id'] = $csv[$i][5];\r\n\t\t\t$db['item_cancellation_status'] = \"\";\r\n\t\t\t$db['pack_list_id']= $csv[$i][6];\r\n\t\t\t$db['account_sales_order_item_id'] = $csv[$i][7];\r\n\t\t\t$db['freight_forwarder_delivery_id'] =$csv[$i][8];\r\n\t\t\t$db['tracking_id_delivery_id'] = $csv[$i][9];\r\n\t\t\t$del_Quan = str_replace(\"ea\",\"\",$csv[$i][10]);\r\n\t\t\t$db['delivered_quantity'] = $del_Quan;\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\t $db['salesID_itemID'] = $csv[$i][4].'-'.$csv[$i][5];\r\n\t\t\t\r\n\t\t date_default_timezone_set(get_option('timezone_string')); // CDT\r\n\t\t //print_r($db);echo \"<br>\";\r\n\t\t \r\n\t\t\r\n\t\t//InsertInto DB\r\n\t\t$salesID_itemID = $db['salesID_itemID'];\r\n\t\t$results = $wpdb->get_results( \"SELECT id FROM $table_name WHERE salesID_itemID = '$salesID_itemID'\", OBJECT );\r\n\r\n\t\tif($results[0]->id ==\"\"){ //Insert\r\n\t\t\t//echo \"Insert<br>\";\r\n\t\t\t$db['createded_on']= date('m-d-Y H:i:s');\r\n\t\t\t$db['updated_on']= date('m-d-Y H:i:s');\r\n\t\t\t\r\n\t\t\t$insertID = $wpdb->insert( $table_name, $db );\r\n\t\t\t\r\n\t\t}else{ //Update\r\n\t\t\t//echo \"Update<br>\";\r\n\t\t $db['updated_on']= date('m-d-Y H:i:s');\r\n\t\t \r\n\t\t $id = $results[0]->id; //added stripslashes_deep\r\n\t\t $wpdb->update($table_name, $db, array('id'=>$id));\r\n\t\t\t\r\n\t\t }\r\n\t }//If 12\t or 11 \r\n\t\t \r\n\t }//for\r\n\t \t\t\r\n echo '<h2 class=\"success\">Data imported successfully!</h2>';\r\n\t \r\n\t //Copy another dir after impoert Data\tand del\r\n\t\t \r\n\t\tdel_copy_after_import($csv_file);\r\n\t\t update_option( 'wp_import_csv', \"\", 'yes' );\r\n\t\t \r\n\t create_logs_imprtCsv($csv_file) ;//update log file\r\n\t \r\n\t \r\n }\r\n else{\r\n\t\techo '<h3 class=\"error outBond\">No file to import!</h3>';\t\r\n\t}\r\n\t\r\n\t \r\n }",
"public function getCsvFilePath(){\r\n\t\treturn $this->getExportDirectory().$this->getCsvFileName();\r\n\t}",
"public function csv_export() {\n\t$export = \"\";\n\t$order_id = null;\n\t$order_ids = array();\n\t$headers = array();\n\t$products = array();\n\t$summaries = array();\n\tforeach ($this->records as $record) {\n\t $order_id = $record[\"order_id\"];\n\t $order_ids[] = $order_id;\n\t if(!isset($headers[$order_id])) {\n\t\t$headers[$order_id] = $this->build_order_header($record);\n\t }\n\t $products[$order_id] = (isset($products[$order_id]) ? $products[$order_id] : '').$this->build_order_product_line($record);\n\t if(!isset($summaries[$order_id])) {\n\t\t$summaries[$order_id] = $this->build_order_summary($record);\n\t }\n\t}\n\t$order_ids = array_unique($order_ids);\n\tforeach($order_ids as $oid) {\n\t $export .= $headers[$oid].$products[$oid].$summaries[$oid];\n\t}\n\n\treturn $export;\n }",
"public function exportOrders($orders) \n {\n $fileName = 'order_export_'.date(\"Ymd_His\").'.csv';\n $fp = fopen(Mage::getBaseDir('export').'/'.$fileName, 'w');\n \n $this->writeHeadRow($fp);\n foreach ($orders as $order) {\n \t$order = Mage::getModel('sales/order')->load($order);\n $this->writeOrder($order, $fp);\n }\n\t\t\n fclose($fp);\n return $fileName;\n }",
"public function csv_export() {\n\treturn '';\n }",
"public function downloadProductCSV();",
"protected function _prepareOrdersFile($logModelId) {\n try {\n $helper = Mage::helper('crm360');\n $time = date('Y-m-d');\n\n $pathFileHeader = $this->tmp_dir . 'PurchaseHeader-' . $time .'-'.$logModelId.'.csv';\n $fpHeader = fopen($pathFileHeader, 'w');\n\n $coll = Mage::getModel('sales/order')->getCollection();\n if ($this->timestamp !== null) {\n $coll->addAttributeToFilter('updated_at', array('from' => $this->timestamp));\n }\n foreach ($coll as $order) {\n /* Order Header */\n $dataHeader = array(\n $order->getCustomerId(),\n date('d/m/Y H:i:s', strtotime($order->getUpdatedAt())),\n $order->getStoreId(),\n $order->getIncrementId(),\n $order->getBaseCurrencyCode(),\n $helper->formatPrice($order->getGrandTotal()),\n $helper->formatPrice($order->getGrandTotal()-$order->getTaxAmount()),\n $helper->formatPrice($order->getDiscountAmount()),\n $order->getStatus()\n );\n //fputcsv($fpHeader, $dataHeader, '|');\n fputs($fpHeader,implode($dataHeader, '|').PHP_EOL);\n\n }\n fclose($fpHeader);\n\n return array($pathFileHeader);\n } catch (Exception $e) {\n $this->error[] = $e->getMessage();\n return false;\n }\n }",
"public function uploadProductCSV($validated);",
"public function exportCsvAction()\n {\n $fileName = 'reviews_orders.csv';\n $content = $this->getLayout()->createBlock('salesreport/adminhtml_reviews_grid')->getCsv();\n $this->_sendUploadResponse($fileName, $content);\n }",
"public function export_orderitem_csv() {\n\n\t\tglobal $wpdb;\n\n\t\t// Create Temporaray CSV file\n\t\t$filename = 'wpl-ebay-orderitems-'.date_i18n( \"Y-m-d_H-i-s\" ).'.csv';\n\t\t$filepath = $filename;\n\t\t$fp = fopen( $filepath, 'w' );\n\n\t\t// Generate Header Row\n\t\t$header = array();\n\t\tarray_push( $header, \"item_id\" );\n\t\tarray_push( $header, \"title\" );\n\t\tarray_push( $header, \"sku\" );\n\t\tarray_push( $header, \"quantity\" );\n\t\tarray_push( $header, \"transaction_id\" );\n\t\tarray_push( $header, \"OrderLineItemID\" );\n\t\tarray_push( $header, \"TransactionPrice\" );\n\t\tarray_push( $header, \"OrderID\" );\n\t\tarray_push( $header, \"DateCreated\");\n\t\t\n\t\tfputcsv( $fp, $header );\n\n\t\t// Generate Data Rows\n\t\t\n\t\t$table_name = $wpdb->prefix . 'ebay_orders';\n\t\t\n\t\t$result = $wpdb->get_results( \"SELECT * FROM $table_name\" );\n\t\t\n\t\tforeach ( $result as $row ) {\n\n\t\t\t// One Order Item Per Row\n\t\t\tforeach( $this->decodeObject($row->items) as $item ) {\n\n\t\t\t\t$csv_data_row = array();\n\n\t\t\t\tarray_push( $csv_data_row, $item['item_id'] );\n\t\t\t\tarray_push( $csv_data_row, $item['title'] );\n\t\t\t\tarray_push( $csv_data_row, $item['sku'] );\n\t\t\t\tarray_push( $csv_data_row, $item['quantity'] );\n\t\t\t\tarray_push( $csv_data_row, $item['transaction_id'] );\n\t\t\t\tarray_push( $csv_data_row, $item['OrderLineItemID'] );\n\t\t\t\tarray_push( $csv_data_row, $item['TransactionPrice'] );\n\t\t\t\tarray_push( $csv_data_row, $row->order_id );\n\t\t\t\tarray_push( $csv_data_row, $row->date_created );\n\n\t\t\t\tfputcsv( $fp, $csv_data_row );\n\t\t\t}\t\t\n\n\t\t}\n\n\t\tfclose( $fp );\n\n\t\t// Download CSV\n\t\theader( 'Content-Type:application/octet-stream' );\n\t\theader( 'Content-Disposition:filename='.$filename );\n\t\theader( 'Content-Length:' . filesize( $filepath ) );\n\t\treadfile( $filepath ); \n\n\t\t// Delete temporary file\n\t\tunlink( $filepath );\n\n\t\texit;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MinifyFilter::getMinifier is protected and I want to keep it that way (it's not meant for public consumption) However, that's pretty much the only implementation that's worthy of being tested here (minification is already tested in the library itself), so I'll use reflection to get access to the result of that method. | protected function getMinifier(FileAsset $asset)
{
$filter = new MMMinifyFilter();
$object = new \ReflectionObject($filter);
$method = $object->getMethod('getMinifier');
$method->setAccessible(true);
return $method->invoke($filter, $asset);
} | [
"public abstract function minify($input);",
"public function getMinify() {\n return $this->minify;\n }",
"public function useMinified()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_USE_MINIFIED);\n }",
"function __min($filename) { \n return \\KoolMinify\\Loader::getInstance()->getMinifiedFilename($filename);\n}",
"public function testMinify() {\n \n }",
"protected function minify()\n {\n // Clone ourself as a minified object\n $newObject = new minSO($this);\n // Return the new object\n return $newObject;\n }",
"public function getMinifierOptions();",
"public function getMin()\n {\n $this->minified_json = $this::minify($this->original_json);\n return $this->minified_json;\n }",
"public function enableMinified()\n {\n $this->_minified = true;\n }",
"public function minify() : void {\n\n\t}",
"function themify_minified() {\n\treturn defined( 'WP_DEBUG' ) && WP_DEBUG ? '' : '.min';\n}",
"abstract protected function minify($content);",
"function wprss_get_minified_extension_prefix() {\n return apply_filters( 'wprss_minified_extension_prefix', '.min' );\n}",
"protected function getCompressor() {}",
"abstract protected function _minify($content = NULL, $options = array());",
"public static function minify( $input )\r\n\t\t{\r\n\t\t\t\t\r\n\t\t\tinclude_once( LEGATO . '/packages/jsmin/jsmin.php' );\r\n\t\t\t\r\n\t\t\treturn JSMin::minify( $input );\r\n\t\t\t\r\n\t\t}",
"abstract public static function getCodeFilter();",
"public function testMinify()\n\t{\n\t\t$css = <<<EOD\n/* some comment */\n.foo {\n\tmargin:0;\n\tpadding:0;\n}\nEOD;\n\t\t$min = new Cssmin();\n\n\t\t$this->assertEquals('.foo{margin:0;padding:0}', $min->run($css));\n\n\t}",
"private function lookForPreMinifiedAsset()\n {\n $min_path = (string)Str::s($this->file->getRealPath())->replace\n (\n '.'.$this->file->getExtension(),\n '.min.'.$this->file->getExtension()\n );\n\n if (!file_exists($min_path)) return false;\n\n return file_get_contents($min_path);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Goes through a setting section and removes all of the prefixes from the settings. | private function removeSettingSectionPrefixes($setting_section)
{
// Will put updated settings here.
$new_settings = array();
// Check to make sure the setting has been set.
if (!is_array($setting_section)) {
return false;
}
// Loop over and remove the prefix.
foreach($setting_section as $id => $value) {
$id = str_replace($this->setting_prefix, '', $id);
$new_settings[$id] = $value;
}
return $new_settings;
} | [
"public function clearWidgetProperties() {\n foreach ($this->settings as $key => $setting) {\n if (String::startsWith($key, $this->widgetSettingPrefix)) {\n unset($this->settings[$key]);\n }\n }\n }",
"private function remove_sections() {\n\t\t$this->customize->remove_section( 'themes' );\n\t\t$this->customize->remove_section( 'static_front_page' );\n\t}",
"function hello_pro_remove_customizer_settings( $config ) {\n\tunset( $config['genesis']['sections']['genesis_header'] );\n\tunset( $config['genesis']['sections']['genesis_breadcrumbs']['controls']['breadcrumb_front_page'] );\n\treturn $config;\n}",
"public function unset_options() {\n\t\t\tdelete_option( $this->get_prefix() );\n\t\t}",
"function genesis_sample_remove_customizer_settings( $config ) {\n\n\tunset( $config['genesis']['sections']['genesis_header'] );\n\tunset( $config['genesis']['sections']['genesis_breadcrumbs']['controls']['breadcrumb_front_page'] );\n\treturn $config;\n\n}",
"function remove_sections($wp_customize)\n {\n $wp_customize->remove_section(\"colors\");\n }",
"private function resetSkus()\n {\n foreach ($this->options as $op=>$junk) {\n if (preg_match('#SellerSKUList#', $op)) {\n unset($this->options[$op]);\n }\n }\n }",
"public function restorePrefix()\n {\n foreach ($this->removals as $i => $removal) {\n if ($removal->getAffixType() == 'DP') {\n // return the word before precoding (the subject of first prefix removal)\n $this->setCurrentWord($removal->getSubject());\n break;\n }\n }\n\n foreach ($this->removals as $i => $removal) {\n if ($removal->getAffixType() == 'DP') {\n unset($this->removals[$i]);\n }\n }\n }",
"function wg_remove_config_settings() {\n\tglobal $config, $wgg;\n\n\t// Loop through each potential conf path and unset it\n\tforeach ($wgg['xml_paths_to_clean'] as $path) {\n\t\tarray_unset_value($config, $path);\n\t}\n\n\t// Now write out the new config to disk\n\twg_write_config('Removed package configuration and settings.', false);\n}",
"public function clearByPrefix($prefix);",
"public function deleteAllSettings();",
"function xcache_unset_by_prefix($prefix) {}",
"public function unprefix($value);",
"public static function clearSettings() {\n global $wpdb;\n\n //clear wp_options\n $oquery = \"DELETE FROM {$wpdb->options} WHERE (`option_name` LIKE %s) AND \";\n $oquery .= \"(`option_name` NOT IN ('aam-extensions', 'aam-uid'))\";\n $wpdb->query($wpdb->prepare($oquery, 'aam%'));\n\n //clear wp_postmeta\n $pquery = \"DELETE FROM {$wpdb->postmeta} WHERE `meta_key` LIKE %s\";\n $wpdb->query($wpdb->prepare($pquery, 'aam-post-access-%'));\n\n //clear wp_usermeta\n $uquery = \"DELETE FROM {$wpdb->usermeta} WHERE `meta_key` LIKE %s\";\n $wpdb->query($wpdb->prepare($uquery, 'aam%'));\n\n $mquery = \"DELETE FROM {$wpdb->usermeta} WHERE `meta_key` LIKE %s\";\n $wpdb->query($wpdb->prepare($mquery, $wpdb->prefix . 'aam%'));\n \n self::clearCache();\n }",
"public function testRoutingPrefixesSetting() {\n\t\t$restore = Configure::read('Routing');\n\n\t\tConfigure::write('Routing.prefixes', array('admin', 'member', 'super_user'));\n\t\tRouter::reload();\n\t\t$result = Router::prefixes();\n\t\t$expected = array('admin', 'member', 'super_user');\n\t\t$this->assertEquals($expected, $result);\n\n\t\tConfigure::write('Routing.prefixes', array('admin', 'member'));\n\t\tRouter::reload();\n\t\t$result = Router::prefixes();\n\t\t$expected = array('admin', 'member');\n\t\t$this->assertEquals($expected, $result);\n\n\t\tConfigure::write('Routing', $restore);\n\t}",
"private function unsetSettings() {\n $settingName = $this->getExtensionKey() . ':settings';\n\n CRM_Core_BAO_Setting::executeQuery(\"DELETE FROM civicrm_setting WHERE name = '{$settingName}'\");\n }",
"protected function removeCredentialPrefixes($prefix)\n {\n $this->credentials = array_remove_key_prefix(\n $this->credentials,\n $prefix\n );\n }",
"private function delete_deprecated_settings() {\n\t\t$this->delete( 'cpac_sorting_preference' );\n\t\t$this->delete( 'cpac_layouts' );\n\t\t$this->delete( 'cpac_layout_' );\n\t}",
"function deleteSettings() {\r\n\t\t\tdelete_option( 'Headup Widget Settings' );\r\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
One property belongs to a lessor | public function lessor()
{
return $this->belongsTo(Lessor::class, 'lessor_id', 'id');
} | [
"public function getLessorId();",
"public function has_or_relation()\n {\n }",
"public function propertyCondition()\n {\n return $this->belongsTo(\n PropertyConditionCoefficient::class, \n self::COLUMN_PROPERTY_CONDITION_ID\n );\n }",
"public function propertyConditionOr($or) {\n $this->proertiesOr[] = $or;\n return $this;\n }",
"public function lesser($property, $value)\n {\n $this->relationalOperators['lt'][] = array($property,$value);\n return $this;\n }",
"public function includesProperty(string $name) : bool;",
"function prop_or_comp(&$elem,&$properties){\n for($a=0;$a<count($properties);$a+=2){\n if(isset($elem[$properties[$a]]) && ($elem[$properties[$a]]==$properties[$a+1])){\n return true;\n }\n }\n return false;\n }",
"public function approvableParentRelation();",
"public function can_be_used_in_relationship();",
"function getMirrorProperty() {\n $res = null;\n foreach ($this->_other->listProperties() as $name) {\n $prop = $this->_other->getProperty($name);\n if (is_a($prop, 'Ac_Cg_Property_Object')) {\n if ($this->_otherRel) {\n if ($prop->_otherRel && ($prop->isIncoming == !$this->isOtherIncoming) && ($prop->isOtherIncoming == !$this->isIncoming) \n && Ac_Util::sameObject($this->_rel, $prop->_otherRel) && Ac_Util::sameObject($this->_otherRel, $prop->_rel)) \n {\n $res = $prop;\n break;\n }\n } else {\n if (($prop->isIncoming == !$this->isIncoming) && Ac_Util::sameObject($this->_rel, $prop->_rel)) {\n $res = $prop;\n break;\n }\n }\n }\n }\n return $res;\n }",
"public function getRelatedEntity() : Property\n {\n return $this->related_entity;\n }",
"public function property()\n {\n return $this->belongsTo(Property::class,'property_id','id');\n }",
"public function proveedor()\n {\n return $this->hasOne('App\\Proveedor', 'PRO_RUN', 'PRO_PROVEEDOR');\n }",
"public function isSameAs(RepresentsProperty $otherProperty): bool;",
"public function floors(){\n return $this->hasMany('App\\PropertyFloorPlan', 'property_id');\n }",
"public function getNodeProperty()\n\t{\n\t\treturn $this->hasOne(PropertyTypes::className(), ['id' => 'property_type_id']);\n\t}",
"public function subpropertyInMultipleLeftJoinCountTest() {}",
"function is_superior($superiorID, $usrID) \n{\n //get the division of the user\n $usrSuperiorID = get_value('usrTable', 'usrSuperiorID', 'usrID', $usrID);\n \n //check if the relationsship exists\n if( $usrSuperiorID == $superiorID )\n {\n return true;\n }\n else\n {\n return false;\n }\n}",
"public function hasOther(){\n return $this->other;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the associated PangkatGolongan object | public function getPangkatGolongan(PropelPDO $con = null, $doQuery = true)
{
if ($this->aPangkatGolongan === null && (($this->pangkat_golongan_id !== "" && $this->pangkat_golongan_id !== null)) && $doQuery) {
$this->aPangkatGolongan = PangkatGolonganQuery::create()->findPk($this->pangkat_golongan_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection
in the referenced object.
$this->aPangkatGolongan->addPtks($this);
*/
}
return $this->aPangkatGolongan;
} | [
"public function getPangkatGolonganId()\n {\n return $this->pangkat_golongan_id;\n }",
"public function getHitungGaji()\n {\n return $this->hasOne(HitungGaji::className(), ['id' => 'id_hitung_gaji']);\n }",
"public function getPekerjaan()\n {\n return $this->hasOne(Pekerjaan::className(), ['id' => 'pekerjaan_id']);\n }",
"public function pangkat_pns()\n {\n return $this->hasOne(PangkatPNS::class,'nip_pegawai','nip_pegawai');\n }",
"public function ganado()\n {\n return $this->belongsTo(Ganado::class);\n }",
"public function getPemesanan()\n {\n return $this->hasOne(Pemesanan::className(), ['id' => 'id_pemesanan']);\n }",
"public function getPenyelenggara()\n {\n return $this->hasOne(Penyelenggara::className(), ['id' => 'penyelenggara_id']);\n }",
"public function getPegawai()\n {\n return $this->hasOne(Pegawai::className(), ['id' => 'id_pegawai']);\n }",
"public function getHkodeGejala()\n {\n return $this->hasOne(Gejala::className(), ['kode_gejala' => 'hkode_gejala']);\n }",
"public function getGruppa()\n {\n return $this->hasOne(Gruppa::className(), ['gruppa_id' => 'gruppa_id']);\n }",
"public function ganaderia()\n {\n return $this->belongsTo(Ganaderia::class);\n }",
"public function getPerakuanKsu()\n {\n return $this->hasOne(KonfRujukan::className(), ['id' => 'perakuan_ksu']);\n }",
"public function ganaderia(){\n return $this->belongsTo(Ganaderia::class, 'ganaderia_id');\n }",
"public function setPangkatGolongan(PangkatGolongan $v = null)\n {\n if ($v === null) {\n $this->setPangkatGolonganId(NULL);\n } else {\n $this->setPangkatGolonganId($v->getPangkatGolonganId());\n }\n\n $this->aPangkatGolongan = $v;\n\n // Add binding for other direction of this n:n relationship.\n // If this object has already been added to the PangkatGolongan object, it will not be re-added.\n if ($v !== null) {\n $v->addPtk($this);\n }\n\n\n return $this;\n }",
"public function getNamaPanggilan()\n {\n return $this->hasOne(Identitas::className(), ['nama_panggilan' => 'nama_panggilan']);\n }",
"public function getGalpaoId()\n {\n return $this->galpaoId;\n }",
"public function getLoaisanpham()\n {\n return $this->hasOne(LoaiSanPham::className(), ['id' => 'loaisanpham_id']);\n }",
"public function getByIdPenggunaan($id)\n\t{\n\t\treturn $this->db->where('id_penggunaan', $id)->order_by($this->_primaryKey,'desc')->get($this->_table)->row();\n\t}",
"public function getIng()\n {\n return $this->hasOne(Ingredients::className(), ['id' => 'id_ing']);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
download_acme_engine_actual_stable() Download efetivamente do ACME Engine. | public function download_acme_engine_actual_stable($hash = '')
{
if($hash != '')
{
// Coleta se cadastro está valido
$download = $this->db->get_where('wbs_register_download', array('hash_download_key' => $hash));
$download = $download->result_array();
$download = isset($download[0]) ? $download[0] : array();
// Libera download
if(count($download) > 0)
{
$path = PATH_UPLOAD . '/website_files/acme_engine/actual_stable';
$actual_stable = parse_ini_file($path . '/change_log.ini');
$file = get_value($actual_stable, 'file');
// Força download da bagaça
$this->load->helper('download');
force_download($file, file_get_contents($path . '/' . $file));
}
}
} | [
"public function autoDownload()\n {\n $date = date('Y-m-d', strtotime('-8 hour'));\n $items = Episode::with('show')->whereDate('schedule', $date)->whereNull('magnet')->get();\n if (!$items) {\n return '**all done**';\n }\n foreach ($items as $key => $item) {\n @file_get_contents(url('download?id=' . $item->id . '&download=yes'));\n }\n return '**ok**';\n }",
"public function download() {\t\t}",
"function getUrlToDownloadFile() {\r\n\t\treturn \"http://www.elitetorrent.net/get-torrent/\";\r\n\t}",
"public function appDownload()\n\t{\n\t\t# grab the data for the page\n\t\treturn $this->getContent(\"download-the-app\", \"Download the App\");\n\t}",
"function download_suket_019()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_019/template_surat_pernyataan_penyerahan_tanah.docx', NULL);\n\t}",
"function download_suket_018_laki()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_018/template_surat_pengantar_nikah_laki_laki.docx', NULL);\n\t}",
"function file_download() {\n if (!$this->active_file) {\n $this->httpError(HTTP_BAD_REQUEST);\n } // if\n \n if(!$this->active_repository->canView($this->logged_user)) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \n $file_source = implode(\"\\n\", $this->repository_engine->cat($this->active_revision, $this->active_file, $this->request->get('peg')));\n download_contents($file_source, 'application/octet-stream', $this->active_file_basename, true);\n }",
"public function Download($entity)\n {\n return $this->FindById($entity);\n }",
"public function downloadAction()\n\t{\n\t\t$response = Shop::get( 'account/download' )->response();\n\t\treturn Response::make( (string) $response->getBody(), $response->getStatusCode(), $response->getHeaders() );\n\t}",
"function download_suket_018_perempuan()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_018/template_surat_pengantar_nikah_perempuan.docx', NULL);\n\t}",
"public function downloadContractAction()\n {\n\n \tini_set('max_execution_time',0);\n\n \t$cparams=$this->_request->getParams();\n\n \t$participationObject=new EP_Ongoing_Participation();\n \t$cParticipationObject=new EP_Ongoing_CorrectorParticipation();\n\n \t$user_id=$cparams['user_id'];\n \t$article_id=$cparams['article_id'];\n\n \tif($user_id OR $article_id)\n \t{\n \t\t//participation watchlist\n \t\t$participation_watch_list=$participationObject->getParticipationWatchlist($user_id,$article_id);\n \t\t\n \t\t//correctorparticipation watchlist\n \t\t$corrector_participation_watch_list=$cParticipationObject->getParticipationWatchlist($user_id,$article_id);\n\n \t\t$watchlist=array_merge($participation_watch_list,$corrector_participation_watch_list);\n \t\tif(count($watchlist)>0)\n \t\t{\n \t\t\tforeach($watchlist as $watchid)\n \t\t\t{\n \t\t\t\t$watchlist_user[]=$watchid['watchlist_id'];\n \t\t\t}\n \t\t} \t\t\n\n \t\t$watchlist_user=array_values(array_unique($watchlist_user));\n\n \t\tif(is_array($watchlist_user) && count($watchlist_user)>0)\n \t\t{\n \t\t\tforeach($watchlist_user as $watchlist_id )\n \t\t\t{\n \t\t\t\t//generating pdf agreements \t\t\t\t\n \t\t\t\t $zip_files[]=$this->generateContractPdf($watchlist_id,$user_id);\n \t\t\t}\n\n \t\t\t//echo \"<pre>\";print_r($zip_files);exit;\n\n \t\t\tif(count($zip_files)>0)\n \t\t\t{\n\n\t\t\t\t\tif($user_id && !$article_id) //download all contracts of a user\n\t\t\t\t\t{\n\t\t\t\t\t\t$file_path=$contractdir=APP_PATH_ROOT.'contract_agreements/'.$user_id.'/contract_agreements.zip';\n\t\t\t\t\t\t//echo $file_path;exit;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(file_exists($file_path))\n\t\t\t\t\t\t\tunlink($file_path);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//generating zip\n\t\t\t\t\t\t$result = create_zip($zip_files,$file_path,true);\n\n\t\t \t\t\t\n\t\t \t\t\t//downloaing zip file\t \t\t\t\n\n\t\t \t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t {\n\t\t\t \t\t \n\t\t\t $this->_redirect(\"/BO/download_contract_agreement.php?type=zip&user_id=\".$user_id);\n\t\t\t exit;\n\t\t\t }\n\t\t\t else\n\t\t\t echo \"File Not found\";\n\t\t\t }\n\t\t\t else if($user_id && $article_id) //downloadin contract for a published article\n\t\t\t {\n\t\t\t \t$file_path=$zip_files[0];\n\n\t\t\t \t$path_parts = pathinfo($file_path);\n\t\t\t \t$file_name=$path_parts['filename']; \t\n\n\t\t\t \tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t {\n\t\t\t \t\t \n\t\t\t $this->_redirect(\"/BO/download_contract_agreement.php?file=$file_name&type=pdf&user_id=$user_id\");\n\t\t\t exit;\n\t\t\t }\n\t\t\t else\n\t\t\t echo \"File Not found\";\n\t\t\t }\n\t\t } \n\t\t\t\t \t\t\n\n \t\t}\n \t\telse\n \t\t{\n \t\t\techo \"No Contracts found\";\n \t\t}\n\n \t\t\n\n \t}\n\n \t\n }",
"public function downloadFile();",
"abstract function actionDownload();",
"function downloadExtension( $_extKey, $_version ) {\n $_firstLetter = substr( $_extKey, 0, 1 );\n $_secondLetter = substr( $_extKey, 1, 1 );\n $_t3xName = $_extKey . \"_\" . $_version . \".t3x\";\n $_extensionUrl = \"http://typo3.org/fileadmin/ter/\" . $_firstLetter . \"/\" . $_secondLetter . \"/\" . $_t3xName;\n\n $_extensionData = @file_get_contents( $_extensionUrl );\n if( FALSE === $_extensionData ) {\n consoleWriteLine( \"Error: Could not retrieve extension file.\" );\n consoleWriteLine( \"File requested: $_extensionUrl\" );\n exit( 1 );\n }\n\n $_tempFileName = $_t3xName;\n global $OUTPUTFILE;\n if( FALSE !== $OUTPUTFILE && \"\" !== $OUTPUTFILE ) {\n $_tempFileName = $OUTPUTFILE;\n }\n\n file_put_contents( $_tempFileName, $_extensionData );\n if( \"\" === $OUTPUTFILE ) {\n register_shutdown_function( \"cleanUpTempFile\", $_tempFileName );\n }\n\n return $_tempFileName;\n}",
"function download_suket_020()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_020/template_surat_rekomendasi_izin_mendirikan_bangunan.docx', NULL);\n\t}",
"public function download() {\n $file_name = get('name');\n// return \\Response::download(temp_path($file_name));\n return \\Response::download(storage_path('app') . '/' . $file_name);\n }",
"public function downloadLatestAction()\n {\n // check that no job is active\n $ch = new ChunkExportHandler($this);\n $activeJob = $ch->getCurrentJob();\n if ($activeJob === null) {\n // read last completed job\n $job = $this->getDoctrine()->getManager()->createQueryBuilder()\n ->select('j')\n ->from('OpenviewExportBundle:DataExportJob', 'j')\n ->orderBy('j.createdAt', 'DESC')\n ->setMaxResults(1)\n ->getQuery()->getSingleResult();\n if ($job) {\n if ($job->getStatus() === DataExportJob::STATUS_COMPLETE) {\n $filename = ChunkExportHandler::EXPORT_PATH . $job->getFilename();\n if (file_exists($filename)) {\n $content = file_get_contents($filename);\n $response = new Response();\n $response->headers->set('Content-Type', 'application/octet-stream');\n $response->headers->set('Content-Disposition', 'attachment;filename=\"' . basename($filename));\n $response->setContent($content);\n\n return $response;\n } else {\n $this->get('session')->getFlashBag()->add('alert', 'File di esportazione non trovato: ' . basename($filename));\n }\n } else {\n $this->get('session')->getFlashBag()->add('alert', 'Export file not found: ' . basename($filename));\n }\n } else {\n $this->get('session')->getFlashBag()->add('alert', 'Export job completed.');\n }\n } else {\n $this->get('session')->getFlashBag()->add('alert', 'Export job not found.');\n }\n \n // back to export panel\n return $this->redirect($this->generateUrl('openview_export_index'));\n }",
"public function download_latest() {\n\n\t\t\tif ( ! isset( $_REQUEST['nonce'] ) ) {\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\tif ( ! wp_verify_nonce( esc_attr( $_REQUEST['nonce'] ), 'monstroid-dashboard' ) ) {\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\tif ( ! current_user_can( 'update_themes' ) ) {\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\t$url = monstroid_dashboard_updater()->get_update_package();\n\n\t\t\t$this->throw_download_errors( $url );\n\n\t\t\twp_send_json_success(\n\t\t\t\tarray(\n\t\t\t\t\t'url' => $url\n\t\t\t\t)\n\t\t\t);\n\n\t\t}",
"public function testDownloadLiveVideo()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set resume field pages | function wprm_pages() {
if ( $this->wprm_active() ) {
$this->field_pages['resume'] = array(
'edit_resume_fields' => __('Resume Fields', 'wp-job-manager-field-editor'),
// 'edit_links_fields' => __( 'Links Fields' ),
// 'edit_education_fields' => __( 'Education Fields' ),
// 'edit_experience_fields' => __( 'Experience Fields' )
);
return $this->field_pages[ 'resume' ];
}
return array();
} | [
"public function setResume($resume)\n {\n $this->resume = $resume;\n }",
"public function setResume($resume)\n {\n $this->resume = $resume;\n }",
"public function setPage() {\n }",
"protected function setPageInfo() : void {}",
"protected function setPages() {\n // Build array of pages from outline\n $chapters = $this->outline->xpath('chapter');\n $this->pages = $this->xmlObjToArray($chapters, 'pages');\n\n // See if page was requested and set if appropriate\n if(isset($_REQUEST['page'])) {\n // See if all was requested\n if($_REQUEST['page'] == 'all') {\n $this->currentPage = 'all';\n return;\n }\n if(in_array($_REQUEST['page'], $this->pages)) {\n $this->currentPage = $_REQUEST['page'];\n }\n }\n // Otherwise, set default\n if(!isset($this->currentPage)) $this->currentPage = $this->outline->defaultPage;\n\n // Find previus and next pages\n $curKey = null;\n foreach($this->pages as $key => $val) {\n if($val == $this->currentPage) {\n $curKey = $key;\n break;\n }\n }\n // Set values\n if($curKey > 0) $this->previousPage = $this->pages[$curKey - 1];\n if($curKey < (count($this->pages) - 1)) $this->nextPage = $this->pages[$curKey + 1];\n }",
"function setPageURLParts($markdown_parts = array()) {\n $this->page_depth = count($markdown_parts);\n $this->markdown_parts = $markdown_parts;\n }",
"private function setPageSelect()\n {\n $GLOBALS['TSFE']->sys_page = Tx_Smarty_Service_Compatibility::makeInstance('t3lib_pageSelect');\n $GLOBALS['TSFE']->sys_page->versioningPreview = false;\n $GLOBALS['TSFE']->sys_page->versioningWorkspaceId = false;\n $GLOBALS['TSFE']->where_hid_del = ' AND pages.deleted=0';\n $GLOBALS['TSFE']->sys_page->init(false);\n $GLOBALS['TSFE']->sys_page->where_hid_del .= ' AND pages.doktype<200';\n $GLOBALS['TSFE']->sys_page->where_groupAccess\n = $GLOBALS['TSFE']->sys_page->getMultipleGroupsWhereClause('pages.fe_group', 'pages');\n }",
"function modify_resumes_query( $query ) {\n $post_type = $query->get('post_type');\n\n if ( !is_admin() && $post_type == 'resume' && $query->is_main_query() ) { // Run only on the homepage\n $query->query_vars['posts_per_page'] = apply_filters('capstone_resumes_per_page', 10);\n }\n }",
"public function setPages(iterable $pages): void;",
"protected function changePageInSubform()\n {\n $subformFieldKey = UriManager::getSubformFieldKey();\n SessionManager::setSubformFieldFromSession($subformFieldKey, 'pageInSubform', UriManager::getPageInSubform());\n }",
"function SetPage($source){}",
"public function setStartPage($page);",
"private function SetPreviousPage() {\n //Set the previous page only if current page is above 1\n if($this->current_page > 1) {\n $this->previous_page = $this->current_page - 1;\n }\n }",
"function setStartPage($startPage) {\t \t \r\n\t\t$this->startPage = $startPage;\r\n\t}",
"function fillFieldSettings() {\n\t\t$arrFields = $this->pSet->getFieldsList ();\n\t\t$this->addFieldsSettings ( $arrFields, $this->pSet, true, $this->pageType );\n\t\t\n\t\t$this->addExtraFieldsToFieldSettings ();\n\t\t\n\t\tif ($this->searchPanelActivated && $this->permis [$this->searchTableName] [\"search\"]) {\n\t\t\t$arrFields = $this->pSetSearch->getAllSearchFields ();\n\t\t\t$this->addFieldsSettings ( $arrFields, $this->pSetSearch, true, PAGE_SEARCH );\n\t\t}\n\t}",
"public function setResume($resume)\n {\n $this->resume = $resume;\n\n return $this;\n }",
"function setStartPage($p)\n {\n $this->os->setStartPage($p);\n }",
"function createPages() {\r\n if (!$this->row['pageStart'] || $this->pages) { // empty field or page format already done\r\n $this->pages = TRUE;\r\n return;\r\n }\r\n $this->pages = TRUE;\r\n $start = trim(stripslashes($this->row['pageStart']));\r\n $end = $this->row['pageEnd'] ? trim(stripslashes($this->row['pageEnd'])) : FALSE;\r\n $this->bibformat->formatPages($start, $end);\r\n }",
"function set_page($page)\n {\n $this->list_page = (int)$page;\n $this->ldap->set_vlv_page($this->list_page, $this->page_size);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
&47; Txid of the funding transaction Generated from protobuf field bytes funding_txid_bytes = 1[json_name = "funding_txid_bytes"]; | public function getFundingTxidBytes()
{
return $this->readOneof(1);
} | [
"public function getTxid()\n {\n return $this->txid;\n }",
"public function setFundingTxidBytes($var)\n {\n GPBUtil::checkString($var, False);\n $this->writeOneof(1, $var);\n\n return $this;\n }",
"public function getBankTransactionId(): string\n {\n return $this->getData(self::BANK_TRANSACTION_ID);\n }",
"public function getCofTxnid();",
"public function get_txid($str){\n\t\tif (strpos($str, \": \") > 0){\n\t\t\t$strs = explode(\": \", $str);\n\t\t\treturn $strs[1];\n\t\t}\n\t\treturn \"\";\n\t}",
"public function getTxHex()\n {\n return $this->txHex;\n }",
"function generateInternalTXID($tx)\n{\n\t$entropy = array();\n\t$entropy['address'] = $tx['notifiedAddress'];\n\t$entropy['inputs'] = array();\n\tforeach($tx['bitcoinTx']['vin'] as $vin){\n\t\t$input = array();\n\t\t$input['txid'] = $vin['txid'];\n\t\t$input['vout'] = $vin['vout'];\n\t\t$input['n'] = $vin['n'];\n\t\t$input['addr'] = $vin['addr'];\n\t\t$input['value'] = $vin['value'];\n\t\t$entropy['inputs'][] = $input;\n\t}\n\t$entropy['outputs'] = $tx['bitcoinTx']['vout'];\n\t$entropy['fees'] = $tx['bitcoinTx']['fees'];\n\t$hash = hash('sha256', hash('sha256', serialize($entropy)));\n\treturn $hash;\n}",
"function set_txid($txid){\n $this->txid = $txid;\n return $txid;\n }",
"public function getTransactionExternalId();",
"public function getTxId()\n {\n return $this->tx_id;\n }",
"public function setTxid($var)\n {\n GPBUtil::checkString($var, True);\n $this->txid = $var;\n\n return $this;\n }",
"function set_txid($txid){\n $this->txid = $txid ;\n return $this->txid ;\n }",
"public function getTxHash()\n {\n return $this->tx_hash;\n }",
"public function getTransactionIDFromCallback()\n {\n $transactionID = request()->trx_ref;\n\n if (!$transactionID) {\n $transactionID = json_decode(request()->resp)->data->id;\n }\n\n return $transactionID;\n }",
"public function getTransactionID();",
"public function signRawTransaction($rawtx)\n {\n $signedtransaction = $this->executeCommand('signrawtransaction', $rawtx);\n return $signedtransaction['hex'];\n }",
"public function getTxHash()\n {\n return $this->txHash;\n }",
"public function decoderawtransaction($hex){\n return $this->bitcoin->decoderawtransaction($hex);\n }",
"function unpack_raw_txn($raw_txn_hex)\r\n\t{\r\n\t\t// see: https://en.bitcoin.it/wiki/Transactions\r\n\t\t\r\n\t\t$binary=pack('H*', $raw_txn_hex);\r\n\t\t\r\n\t\t$txn=array();\r\n\t\t\r\n\t\t$txn['version']=$this->string_shift_unpack($binary, 4, 'V'); // small-endian 32-bits\r\n\r\n\t\tfor ($inputs=$this->string_shift_unpack_varint($binary); $inputs>0; $inputs--) {\r\n\t\t\t$input=array();\r\n\t\t\t\r\n\t\t\t$input['txid']=$this->string_shift_unpack($binary, 32, 'H*', true);\r\n\t\t\t$input['vout']=$this->string_shift_unpack($binary, 4, 'V');\r\n\t\t\t$length=$this->string_shift_unpack_varint($binary);\r\n\t\t\t$input['scriptSig']=$this->string_shift_unpack($binary, $length, 'H*');\r\n\t\t\t$input['sequence']=$this->string_shift_unpack($binary, 4, 'V');\r\n\t\t\t\r\n\t\t\t$txn['vin'][]=$input;\r\n\t\t}\r\n\t\t\r\n\t\tfor ($outputs=$this->string_shift_unpack_varint($binary); $outputs>0; $outputs--) {\r\n\t\t\t$output=array();\r\n\t\t\t\r\n\t\t\t$output['value']=$this->string_shift_unpack_uint64($binary)/100000000;\r\n\t\t\t$length=$this->string_shift_unpack_varint($binary);\r\n\t\t\t$output['scriptPubKey']=$this->string_shift_unpack($binary, $length, 'H*');\r\n\t\t\t\r\n\t\t\t$txn['vout'][]=$output;\r\n\t\t}\r\n\t\t\r\n\t\t$txn['locktime']=$this->string_shift_unpack($binary, 4, 'V');\r\n\t\t\r\n\t\tif (strlen($binary))\r\n\t\t\tdie('More data in transaction than expected');\r\n\t\t\r\n\t\treturn $txn;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the id of a competition to be held the latest | public static function getNewestCompetition()
{
$sth=DB::getInstance()->prepare('SELECT `id_contest` FROM `buh_contests` WHERE `registration_open`=:reg_open
ORDER BY `date_begin` DESC');
$sth->execute(array('reg_open'=>1));
return $sth->fetchColumn();
} | [
"public function get_idCompetition()\n {\n return $this->_idCompetition;\n }",
"public function getLastIdInteraction()\r\n {\r\n return $this->queryOne('\r\n SELECT id\r\n FROM interaction\r\n ORDER BY `editDateTime` DESC LIMIT 1');\r\n }",
"public function getLastBookingId()\n {\n return Booking::whereHas('bookingParticipants', function ($q) {\n $q->where('user_id', $this->id);\n })->orderBy('created_at', 'desc')->first()->id ?? null;\n }",
"public function getLastMeetingId() {\n\t\t$sth = $this -> mdb2 -> prepare(\"SELECT meetings.id FROM meetings WHERE meetings.id = LAST_INSERT_ID()\");\n\t\t$result = $sth -> execute();\n\t\t$row = $result -> fetchRow(MDB2_FETCHMODE_ASSOC);\n\t\treturn $row['id'];\n\t}",
"public function latestReleaseId(): string\n {\n return array_reverse($this->releaseIds())[0];\n }",
"public function last_booking_id()\n {\n $query = \"select max(`order_id`) from `\" . $this->table_name . \"`\";\n $result = mysqli_query($this->conn, $query);\n $value = mysqli_fetch_row($result);\n return $value[0];\n }",
"public function getLastIdSubstance()\r\n {\r\n return $this->queryOne('SELECT MAX(id) as id FROM substances')['id'];\r\n }",
"public function getCurrentId() {\r\n\t\t\r\n\t\t$query = \"SELECT calendar_id FROM $this->cal ORDER BY calendar_id DESC LIMIT 0,1\";\r\n\t\t\t\t\t\t\r\n\t\t$Resultset = $this->executeQuery($query);\r\n\t\t\t\t\r\n\t\t$cal_data = $Resultset->fetchRow();\r\n\t\t\r\n\t\treturn $cal_data[0];\r\n\t\t\r\n\t}",
"public function getCompetition()\n {\n return $this->competition;\n }",
"public function getCompetition()\n {\n return $this->competition;\n }",
"public function getHighestId();",
"function get_last_storyID() {\n $db = Database::instance()->db();\n $stmt = $db->prepare('SELECT max(storyID) as storyMaxID FROM Story');\n $stmt->execute();\n return $stmt->fetch()['storyMaxID'];\n }",
"public function idCompetition($id) {\n if (key_exists($id, $this->_competitors)) { return $this->_competitors[$id]->idCompetition(); }\n else { return $this->_competitors[0]->idCompetition(); }\n }",
"public function getLastId() \n {\n if(!Patient::all() -> isEmpty()){\n $recentId = Patient::orderBy('patient_id', 'desc')->first()->patient_id;\n return $recentId;\n }\n }",
"private function prismGetLatestId() {\n\t\treturn $this->prismDatabase->get_field(\"SELECT `id` FROM `prism_data` ORDER BY `id` DESC LIMIT 1\");\n\t}",
"public function get_last_finished_assignment()\n {\n // check the primary key value\n if( is_null( $this->id ) )\n {\n log::warning( 'Tried to query participant with no id.' );\n return NULL;\n }\n \n $modifier = new modifier();\n $modifier->where( 'interview.participant_id', '=', $this->id );\n $modifier->where( 'end_datetime', '!=', NULL );\n $modifier->order_desc( 'start_datetime' );\n $modifier->limit( 1 );\n $assignment_list = assignment::select( $modifier );\n\n return 0 == count( $assignment_list ) ? NULL : current( $assignment_list );\n }",
"function maxId()\n {\n $sql = \"SELECT max(COP_ID) as id FROM mco_comprasprov \";\n $this->consult = $this->connection->Execute($sql);\n $max=$this->consult->fields;\n return $max['id']+1;\n\n }",
"function getLastGame()\n\t{\n\t\t$query = \"select SQL_CACHE idgame, end, d, endround_seat, endround_nextseat, all_allin from pkr_game where idtable=\".$this->curr_table.\" and end = 0 order by idgame desc limit 1\";\n\t\t$last_idgame = $GLOBALS['mydb']->select($query);\n\t\t//$last_idgame = $last_idgame[0]['idgame'];\t\t\n\t\treturn $last_idgame;\n\t}",
"public function latest_tester_id() {\n $latest_tester = TestFase::orderBy(\"tester\", \"desc\")->first();\n\n if(count($latest_tester)) {\n return $latest_tester->tester;\n } else {\n return 0;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case for currencyPATCHRequestCurrencyIDUpdate Updates a currency.. | public function testCurrencyPATCHRequestCurrencyIDUpdate()
{
} | [
"public function testCurrencyRatePATCHRequestCurrencyIDRatesRateIDUpdate()\n {\n }",
"public function test_update_currency(){\n\n\t\t$code = strtoupper( __FUNCTION__ );\n\n\t\t$status = APP_Currencies::add_currency( $code, array() );\n\t\t$this->assertTrue( $status );\n\n\t\t$currency_args = array(\n\t\t\t'name' => 'Updated',\n\t\t\t'symbol' => 'UUU',\n\t\t\t'display' => '{updated}',\n\t\t\t'code' => $code\n\t\t);\n\n\t\tAPP_Currencies::update_currency( $code, $currency_args );\n\t\t$this->assertEquals( APP_Currencies::get_currency( $code ), $currency_args );\n\t}",
"public function testUpdateCurrency()\n {\n }",
"public function testCreditorPATCHRequestCreditorIDUpdate()\n {\n }",
"public function testLandedCostShipmentPATCHRequestShipmentIDUpdate()\n {\n }",
"public function testCarrierPATCHRequestCarrierIDUpdate()\n {\n }",
"public function testLandedCostBookInPATCHRequestBookInIDUpdate()\n {\n }",
"public static function updateCurrencies()\n\t{\n\t\t//Get instance of CurrenciesOperations Class\n\t\t$currenciesOperations = new CurrenciesOperations();\n\t\t\n\t\t//Get instance of BodyWrapper Class that will contain the request body\n\t\t$bodyWrapper = new BodyWrapper();\n\t\t\n\t\t//List of Currency instances\n $currencies = array();\n \n $currencyClass = \"com\\zoho\\crm\\api\\currencies\\Currency\";\n\t\t\n\t\t//Get instance of Currency Class\n\t\t$currency = new $currencyClass();\n\t\t\n\t\t//To set the position of the ISO code in the currency.\n\t\t//true: Display ISO code before the currency value.\n\t\t//false: Display ISO code after the currency value.\n\t\t$currency->setPrefixSymbol(true);\n\t\t\n\t\t//To set currency Id\n\t\t$currency->setId(\"3477061000006040001\");\n\t\t\n\t\t//To set the rate at which the currency has to be exchanged for home currency.\n\t\t$currency->setExchangeRate(\"5.0000000\");\n\t\t\n\t\t//To set the status of the currency.\n\t\t//true: The currency is active.\n\t\t//false: The currency is inactive.\n\t\t$currency->setIsActive(true);\n\t\t\n\t\t$format = new Format();\n\t\t\n\t\t//It can be a Period or Comma, depending on the currency.\n\t\t$format->setDecimalSeparator(new Choice(\"Period\"));\n\t \n\t\t//It can be a Period, Comma, or Space, depending on the currency.\n\t\t$format->setThousandSeparator(new Choice(\"Comma\"));\n \n\t\t//To set the number of decimal places allowed for the currency. It can be 0, 2, or 3.\n\t\t$format->setDecimalPlaces(new Choice(\"2\"));\n\t\t\n\t\t//To set the format of the currency\n\t\t$currency->setFormat($format);\n\t\t\n\t\tarray_push($currencies, $currency);\n\t\t\n\t\t//Set the list to Currency in BodyWrapper instance\n\t\t$bodyWrapper->setCurrencies($currencies);\n\t\t\n\t\t//Call updateCurrencies method that takes BodyWrapper instance as parameter \n\t\t$response = $currenciesOperations->updateCurrencies($bodyWrapper);\n\t\t\n\t\tif($response != null)\n\t\t{\n\t\t\t//Get the status code from response\n\t\t\techo(\"Status Code: \" . $response->getStatusCode() . \"\\n\");\n\t\t\t\n\t\t\t//Get object from response\n $actionHandler = $response->getObject();\n \n if($actionHandler instanceof ActionWrapper)\n {\n //Get the received ActionWrapper instance\n $actionWrapper = $actionHandler;\n \n //Get the list of obtained ActionResponse instances\n $actionResponses = $actionWrapper->getCurrencies();\n \n foreach($actionResponses as $actionResponse)\n {\n //Check if the request is successful\n if($actionResponse instanceof SuccessResponse)\n {\n //Get the received SuccessResponse instance\n $successResponse = $actionResponse;\n \n //Get the Status\n echo(\"Status: \" . $successResponse->getStatus()->getValue() . \"\\n\");\n \n //Get the Code\n echo(\"Code: \" . $successResponse->getCode()->getValue() . \"\\n\");\n \n echo(\"Details: \" );\n \n //Get the details map\n foreach($successResponse->getDetails() as $key => $value)\n {\n //Get each value in the map\n echo($key . \": \" . $value . \"\\n\");\n }\n \n //Get the Message\n echo(\"Message: \" . $successResponse->getMessage()->getValue() . \"\\n\");\n }\n //Check if the request returned an exception\n else if($actionResponse instanceof APIException)\n {\n //Get the received APIException instance\n $exception = $actionResponse;\n \n //Get the Status\n echo(\"Status: \" . $exception->getStatus()->getValue() . \"\\n\");\n \n //Get the Code\n echo(\"Code: \" . $exception->getCode()->getValue() . \"\\n\");\n \n if($exception->getDetails() != null)\n {\n echo(\"Details: \" );\n \n //Get the details map\n foreach($exception->getDetails() as $key => $value)\n {\n //Get each value in the map\n echo($key . \": \" . $value . \"\\n\");\n }\n }\n \n //Get the Message\n echo(\"Message: \" . $exception->getMessage()->getValue() . \"\\n\");\n }\n }\n }\n //Check if the request returned an exception\n else if($actionHandler instanceof APIException)\n {\n //Get the received APIException instance\n $exception = $actionHandler;\n \n //Get the Status\n echo(\"Status: \" . $exception->getStatus()->getValue() . \"\\n\");\n \n //Get the Code\n echo(\"Code: \" . $exception->getCode()->getValue() . \"\\n\");\n \n if($exception->getDetails() != null)\n {\n echo(\"Details: \" );\n \n //Get the details map\n foreach($exception->getDetails() as $key => $value)\n {\n //Get each value in the map\n echo($key . \": \" . $value . \"\\n\");\n }\n }\n \n //Get the Message\n echo(\"Message: \" . $exception->getMessage()->getValue() . \"\\n\");\n }\n\t\t}\n\t}",
"public function testUpdateCreditCard(){\n\t\tPayU::$apiLogin = PayUTestUtil::API_LOGIN;\n\t\tPayU::$apiKey = PayUTestUtil::API_KEY;\n\t\tEnvironment::setSubscriptionsCustomUrl(PayUTestUtil::SUBSCRIPTION_CUSTOM_URL);\n\t\t\n\t\t$customer = PayUCustomers::create(PayUTestUtil::buildSubscriptionParametersCustomer());\n\t\t$creditCardParams = array(PayUParameters::CUSTOMER_ID => $customer->id);\n\t\t$creditCardParams = PayUTestUtil::buildSubscriptionParametersCreditCard($creditCardParams);\n\t\t$creditCard = PayUCreditCards::create($creditCardParams);\n\t\t\n\t\t$creditCardParams = array(\n\t\t\t\tPayUParameters::TOKEN_ID => $creditCard->token,\n\t\t\t\tPayUParameters::PAYER_NAME => 'Updated Payer test name' ,\n\t\t\t\tPayUParameters::PAYER_STREET => 'Updated Street 100',\n\t\t\t\tPayUParameters::PAYER_STREET_2 => 'Updated Street 9',\n\t\t\t\tPayUParameters::PAYER_STREET_3 => 'Updated Street 18',\n\t\t\t\tPayUParameters::PAYER_CITY => 'Updated City',\n\t\t\t\tPayUParameters::PAYER_STATE => 'Updated State',\n\t\t\t\tPayUParameters::PAYER_COUNTRY => PayUCountries::CO,\n\t\t\t\tPayUParameters::PAYER_POSTAL_CODE => 'Updated 12345',\n\t\t\t\tPayUParameters::PAYER_PHONE => '987654321',\n\t\t);\n\t\t\n\t\t$creditCard = PayUCreditCards::update($creditCardParams);\n\t\t\n\t\t$parameters = array(PayUParameters::TOKEN_ID => $creditCard->token);\n\t\t$creditCardUpdated = PayUCreditCards::find($parameters);\n\t\t\n\t\t\n\t\t$this->assertEquals($creditCard->token, $creditCardUpdated->token);\n\t\t$this->assertEquals($customer->id, $creditCardUpdated->customerId);\n\t\t$this->assertEquals($creditCardParams[PayUParameters::PAYER_NAME], $creditCardUpdated->name);\n\t\t$this->assertEquals($creditCardParams[PayUParameters::PAYER_STREET], $creditCardUpdated->address->line1);\n\t\t$this->assertEquals($creditCardParams[PayUParameters::PAYER_STREET_2], $creditCardUpdated->address->line2);\n\t\t$this->assertEquals($creditCardParams[PayUParameters::PAYER_STREET_3], $creditCardUpdated->address->line3);\n\t\t$this->assertEquals($creditCardParams[PayUParameters::PAYER_CITY], $creditCardUpdated->address->city);\n\t\t$this->assertEquals($creditCardParams[PayUParameters::PAYER_STATE], $creditCardUpdated->address->state);\n\t\t$this->assertEquals($creditCardParams[PayUParameters::PAYER_POSTAL_CODE], $creditCardUpdated->address->postalCode);\t\t\n\t\t$this->assertEquals($creditCardParams[PayUParameters::PAYER_PHONE], $creditCardUpdated->address->phone);\t\t\n\t\t\n\t}",
"public function testUpdate()\n\t{\n\t\t$this->withoutMiddleware();\n\t\t$this->call('POST', '/charge', $this->chargeData);\n\t\t// Update the Charge\n\t\t$chargeStored = Charge::orderBy('id','desc')->first();\n\n\t\t$this->withoutMiddleware();\n\t\t$this->call('PUT', '/charge/1', $this->chargeUpdate);\n\n\t\t$chargeUpdated = Charge::find('1');\n\t\t$this->assertEquals($chargeUpdated->test_id , $this->chargeUpdate['test_id']);\n\t\t$this->assertEquals($chargeUpdated->current_amount ,$this->chargeUpdate['current_amount']);\n\t}",
"public function testInventoryPATCHRequestInventoryIDUpdate()\n {\n }",
"public function updated(Currency $currency)\n {\n //\n }",
"public function testInventoryComponentPATCHRequestInventoryIDComponentsComponentIDUpdate()\n {\n }",
"public function testInventoryUpSellPATCHRequestInventoryIDUpSellsUpSellIDUpdate()\n {\n }",
"public function testSalesOrderCustomFieldValuePATCHRequestInvoiceIDCustomFieldValuesSettingIDUpdate()\n {\n }",
"public function testUpdate()\n {\n $currency = factory(Currency::class)->create();\n $currencyRepo = new CurrencyRepository($currency);\n $delete = $currencyRepo->delete();\n\n $this->assertInstanceOf(Currency::class, $currency);\n $this->assertEquals($delete->name, $currency->name);\n $this->assertEquals($delete->description, $currency->description);\n $this->assertNotNull($delete->deleted_at);\n }",
"public static function update_exchangeRate ($request, $id)\n {\n $exchangeRate = self::find($id);\n $exchangeRate->currency_id = $request->get('currency_id');\n $exchangeRate->amount = $request->get('amount');\n $exchangeRate->effective_date = date('Y-m-d', strtotime($request->get('effective_date')));\n $exchangeRate->lupd_by = '1';\n $exchangeRate->dt_lupd = date('Y-m-d, H:i:s');\n $exchangeRate->status = 'Active';\n\n if ($exchangeRate->update()) {\n return true;\n } else {\n return false;\n }\n }",
"public function testCurrencyPOSTRequestPost()\n {\n }",
"public function testPurchaseInvoiceLinePATCHRequestPurchaseInvoiceIDLinesPurchaseInvoiceLineIDUpdate()\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stop profiling and save results with configured identifier and namespace. | public function stop()
{
if ($this->runStatus !== self::STATUS_RUNNING) {
throw new \RuntimeException('Cannot stop XHProf - it is not running');
}
$runId = $this->getRunId();
$runNamespace = $this->getRunNamespace();
if ($this->selectedExtension === self::EXT_XHPROF) {
$data = xhprof_disable();
} else {
$data = tideways_xhprof_disable();
}
include_once($this->libPath . '/utils/xhprof_lib.php');
include_once($this->libPath . '/utils/xhprof_runs.php');
$xhprof = new \XHProfRuns_Default($this->tmpPath);
$xhprof->save_run($data, $runNamespace, $runId);
$this->runStatus = self::STATUS_STOPPED;
return [
self::TYPE_REPORT => $this->getReportUrl($runId, $runNamespace),
self::TYPE_CALLGRAPH => $this->getCallgraphUrl($runId, $runNamespace),
];
} | [
"public function stopProfiling()\n {\n $XHProf = XHProf::getInstance();\n\n if ($XHProf->isStarted() && $XHProf->getStatus() === XHProf::STATUS_RUNNING\n && (!$this->manualStop || ($this->manualStop && $this->forceStop))\n ) {\n $XHProf->stop();\n }\n\n if ($this->isActive()) {\n $this->saveReport();\n }\n }",
"public function stop()\n {\n // Create a new profile based upon the data of the adapter\n $profile = $this->getProfileFactory()->create(\n $this->getProfilerAdapter()->stop(),\n $this->getApplicationData(),\n $_SERVER // TODO: Don't want to use this directly, do something smarter\n );\n\n // Notify and persist the profile on the persistence service\n $this->getPersistenceService()->persist($profile);\n\n // Return the profile for further handling\n return $profile;\n }",
"public function stopProfile(){ }",
"public function stop()\n {\n parent::stop();\n\n return xhprof_disable();\n }",
"public function stopFetch($profileId);",
"protected function stop() {\n\t\tif($this->profilerEvent) $this->profiler->stop($this->profilerEvent);\n\t}",
"static public function stop() {\n // stop timer\n array_push(self::$end[self::$cur_name], microtime(true));\n // remember current memory footprint\n array_push(self::$mem_after[self::$cur_name], memory_get_usage());\n\n self::$last_name = self::$cur_name;\n if (!empty(self::$running_profiles)) {\n // got a parent timer (nested timer)\n self::$cur_name = array_pop(self::$running_profiles);\n } else {\n self::$cur_name = null;\n }\n }",
"public function profilerStop()\n {\n if (extension_loaded('xhprof')) {\n $xhprofData = xhprof_disable();\n $xhprofRuns = new XHProfRuns_Default();\n $runId = $xhprofRuns->save_run($xhprofData, $this->xhprofNamespace);\n $profilerUrl = sprintf($this->xhprofHtmlPath . 'index.php?run=%s&source=%s', $runId, $this->xhprofNamespace);\n $styles = ' style=\"display: block; position: absolute; left: 5px; bottom: 5px; background: red; padding: 8px; z-index: 10000; color: #fff;\"';\n echo '<a href=\"' . $profilerUrl . '\" target=\"_blank\" ' . $styles . '>Profiler output</a>';\n }\n }",
"public function stopQuery()\n {\n $this->profiler->stop($this->getCurrentBenchmark());\n }",
"public static function shutdown()\n {\n // Don't do anything if the profiler has already been stopped.\n $profiler = self::load();\n if (!$profiler->isRunning()) {\n return;\n }\n $profiler->stop();\n if (!DApplicationMode::isProductionMode()\n // Check that the router allows reporting.\n // @todo Do this in a better way, profiler shouldn't know about router!\n && (!DRouter::$router || DRouter::$router->profile())\n ) {\n $reportGenerator = DProfilerReportGenerator::decorate($profiler);\n $report = $reportGenerator->generateReport();\n DErrorHandler::$profiling[] =& $report;\n }\n }",
"public function stopProfile($name=null){ }",
"function profilerAgentShutdownHandlerForRecordingMode()\n{\n profilerAgentSaveAdditionalRequestData($GLOBALS['debug_agent_result_file']);\n}",
"public function profilerFinish(){\n }",
"public function finishProfilerAction() {\r\n ob_start();\r\n \t$profileId = $this->getRequest()->getParam('id');\r\n \t$profiler = Mage::getModel(\"mpmassuploadaddons/profilesession\")->load($profileId);\r\n $importType = $profiler->getProductType();\r\n $profiler->delete();\r\n \t$filesPath = Mage::getBaseDir('media').\"/marketplace/massuploaded/\".$profileId.\"/\";\r\n \t$this->deleteDir($filesPath);\r\n if($importType == 'configurable') {\r\n $process = Mage::getModel('index/process')->load(1);\r\n $process->reindexEverything();\r\n $process = Mage::getModel('index/process')->load(2);\r\n $process->reindexEverything();\r\n }\r\n \techo \"true\";\r\n }",
"public function finishProfilerAction() {\n \tob_start();\n \t$profileId = $this->getRequest()->getParam('id');\n \t$profiler = Mage::getModel(\"mpmassuploadaddons/profilesession\")->load($profileId);\n $importType = $profiler->getProductType();\n \t$profiler->delete();\n \t$filesPath = Mage::getBaseDir('media').\"/marketplace/massuploaded/\".$profileId.\"/\";\n \t$this->deleteDir($filesPath);\n \tif($importType == 'configurable') {\n $process = Mage::getModel('index/process')->load(1);\n $process->reindexEverything();\n $process = Mage::getModel('index/process')->load(2);\n $process->reindexEverything();\n }\n \techo \"true\";\n }",
"public function endDbProfile($token){\n\t\t$log = $this->_profiles[$token];\n $log[0] = \"End SQL Profiling $token\";\n\t\t$this->_logs[] = $log;\n if($sqls = Doo::db()->showSQL())\n $this->_profiles[$token]['sql'] = implode(\"\\n\\r\", array_slice($sqls, $this->_profiles[$token]['sqlstart']));\n else\n $this->_profiles[$token]['sql'] = '';\n\t\t$this->_profiles[$token]['result'] = microtime(true) - $this->_profiles[$token][3];\n\t\t$this->_profiles[$token]['memory'] = $this->memory_used() - $this->_profiles[$token]['startmem'];\n\t}",
"public function stop(BenchmarkInterface $benchmark = null, array $metadata = []);",
"public function stopCollection()\n\t{\n\t\tif ( !$this->enabled() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$data = xdebug_get_code_coverage();\n\t\txdebug_stop_code_coverage();\n\n\t\tforeach ( $this->excludedFiles as $file ) {\n\t\t\tunset($data[$file]);\n\t\t}\n\n\t\t$unique_id = md5(uniqid(rand(), true));\n\t\tfile_put_contents(\n\t\t\t$name = $this->getStorageLocationPrefix() . '.' . $unique_id . '.' . $_COOKIE[self::TEST_ID_VARIABLE],\n\t\t\tserialize($data)\n\t\t);\n\t}",
"public static function disableProfiling()\n\t{\n\t\tself::$_profilingEnabled = false;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
modify the profile node and add what is included in the predefined profile Ex: > .... | static function getPredefinedProfileNode($node,$profile_name){
switch($profile_name){
case 'mailingMedias':
case 'publication':
$node->appendChild('<INFO/>');
$node->appendChild('<DESCRIPTIONS/>');
$node->appendChild('<CATEGORIES/>');
Sushee_ElementProfile::getPredefinedProfileNode($node->appendChild('<DEPENDENCIES/>'),'mini');
break;
case 'mini':
$node->appendChild('<INFO/>'); // formerly was more specific, determining each field of each module, but DEPRECATED to simplify handling
break;
case 'complete':
$node->appendChild('<INFO/>');
$node->appendChild('<DESCRIPTIONS/>');
$node->appendChild('<CATEGORIES/>');
Sushee_ElementProfile::getPredefinedProfileNode($node->appendChild('<DEPENDENCIES/>'),'mini');
$node->appendChild('<COMMENTS/>');
break;
case 'descriptions_only':
$node->appendChild('<DESCRIPTIONS/>');
break;
case 'empty':
$node->appendChild('<INFO get="false"/>');
break;
case 'mailing_publication':
$node->appendChild('<INFO creator_info="true"/>');
$node->appendChild('<DESCRIPTIONS/>');
$node->appendChild('<CATEGORIES/>');
Sushee_ElementProfile::getPredefinedProfileNode($node->appendChild('<DEPENDENCIES/>'),'mini');
break;
case 'mini_inbox':
$node->appendChild(
'<INFO>
<ID/>
<ACCOUNTID/>
<TYPE/>
<PRIORITY/>
<FROM/>
<TO/>
<SENDINGDATE/>
<RECEIVINGDATE/>
<ATTACHMENTS/>
<SUBJECT/>
<READ/>
<FLAG/>
<FOLDER/>
<TRASH/>
<JUNK/>
<DIRECTORYID/>
<HTML/>
</INFO>');
break;
case 'mini_publication':
$node->appendChild(
'<INFO>
<MEDIATYPE/><TEMPLATE/><PAGETOCALL/>
</INFO>');
$node->appendChild('<DESCRIPTIONS profile="label"/>');
break;
default:
$node->appendChild('<INFO/>');
}
} | [
"function template_manual_modify_profile_look()\n{\n\t// TODO : Write this.\n}",
"function phorum_mod_user_tagging_profile($profile)\n{\n global $PHORUM;\n\n if (empty($PHORUM['mod_user_tagging']['rules']) ||\n empty($profile['mod_user_tagging'])) return $profile;\n\n foreach ($PHORUM['mod_user_tagging']['rules'] as $rule)\n {\n if (empty($rule['enable_profile'])) continue;\n\n $value = user_tagging_process_rule($rule, $profile);\n\n if ($value !== NULL) {\n $profile[$rule['tpl_var']] = $value;\n }\n }\n\n return $profile;\n}",
"public function setProfileInfo($profile){\n $profile_dir = _COS_PATH . \"/profiles/$profile\";\n include $profile_dir . \"/profile.inc\";\n $this->profileModules = $_PROFILE_MODULES;\n $this->profileTemplates = $_PROFILE_TEMPLATES;\n $this->profileTemplate = $_PROFILE_TEMPLATE;\n $this->profileUseHome = $_PROFILE_USE_HOME;\n }",
"public function setProfileInfo($profile){\n $profile_dir = conf::pathBase() . \"/profiles/$profile\";\n if (!file_exists($profile_dir)) {\n common::abort( \"No such path to profiles: $profile_dir\");\n } \n \n include $profile_dir . \"/profile.inc\";\n $this->profileModules = $_PROFILE_MODULES;\n $this->profileTemplates = $_PROFILE_TEMPLATES;\n $this->profileTemplate = $_PROFILE_TEMPLATE;\n }",
"public function testUpdateProfile()\n {\n }",
"function editProfile()\n {\n include Template::locate(\"wpdm-pp-edit-profile.php\", WPDMPP_TPL_DIR);\n }",
"function getVariableProfileCreationCode ($profileName, $newProfileName = \"\")\n{\n $profile = IPS_GetVariableProfile($profileName);\n if ($profile !== false)\n {\n $profileName = (strlen($newProfileName) > 0) ? $newProfileName : $profileName;\n echo 'IPS_CreateVariableProfile(\"'.$profileName.'\", '.$profile['ProfileType'].');'.\"\\n\";\n echo 'IPS_SetVariableProfileText(\"'.$profileName.'\", \"'.$profile['Prefix'].'\", \"'.$profile['Suffix'].'\");'.\"\\n\";\n echo 'IPS_SetVariableProfileValues(\"'.$profileName.'\", '.$profile['MinValue'].', '.$profile['MaxValue'].', '.$profile['StepSize'].');'.\"\\n\";\n echo 'IPS_SetVariableProfileDigits(\"'.$profileName.'\", '.$profile['Digits'].');'.\"\\n\";\n echo 'IPS_SetVariableProfileIcon(\"'.$profileName.'\", \"'.$profile['Icon'].'\");'.\"\\n\";\n foreach ($profile['Associations'] as $association)\n {\n echo 'IPS_SetVariableProfileAssociation(\"'.$profileName.'\", '.$association['Value'].', \"'.$association['Name'].'\", \"'.$association['Icon'].'\", '.$association['Color'].');'.\"\\n\";\n }\n echo \"\\n\";\n }\n}",
"function _profileSave(){\n global $conf;\n $profiles = $conf['metadir'].'/sync.profiles';\n io_saveFile($profiles,serialize($this->profiles));\n }",
"function prism_head_profile() {\n $content = '<head profile=\"http://gmpg.org/xfn/11\">' . \"\\n\";\n echo apply_filters('prism_head_profile', $content );\n }",
"private function write_single_profile($profile) {\n //$this -> write_aliases($profile['id']);\n //$this -> write_domains($profile['id']);\n //$this -> write_gateways($profile['id']);\n $this -> write_settings($profile['id']);\n //$this -> xmlw -> endElement(); //reserved for multi-profile\n }",
"public function setProfile(Profile $profile)\n\t{\n\t\t$this->addKeyValue('profile', $profile); \n\n\t}",
"function ext_profile_shortcode($attr, $content) {\n\treturn get_extended_profile($content);\n}",
"function _awbs_preprocess_leadership_online_profile(&$vars) {\n $site_id = variable_get('smg_global_site');\n $print_profile_node = node_load(leadership_get_corresponding_nid($vars['field_ld_company'][0]['nid'], 'leadership_print_profile', $site_id));\n\n if (isset($print_profile_node->field_ld_address_1['und'])) {\n $vars['address'] = $print_profile_node->field_ld_address_1['und'][0]['value'];\n // If there is an \"Address 2\", append it to address 1\n if (isset($print_profile_node->field_ld_address_2['und'])) {\n $vars['address'] .= '<br/>' . $print_profile_node->field_ld_address_2['und'][0]['value'];\n }\n }\n if (isset($print_profile_node->field_ld_phone['und'])) {\n $vars['phone'] = $print_profile_node->field_ld_phone['und'][0]['value'];\n }\n if (isset($print_profile_node->field_ld_email['und'])) {\n $vars['email'] = $print_profile_node->field_ld_email['und'][0]['value'];\n }\n if (isset($print_profile_node->field_ld_country['und'])) {\n $vars['country'] = $print_profile_node->field_ld_country['und'][0]['value'];\n }\n if (isset($print_profile_node->field_ld_address_city['und'])) {\n $vars['city'] = $print_profile_node->field_ld_address_city['und'][0]['value'];\n }\n if (isset($print_profile_node->field_ld_state['und'])) {\n $vars['state'] = $print_profile_node->field_ld_state['und'][0]['value'];\n }\n if (isset($print_profile_node->field_ld_zip_postal_code['und'])) {\n $vars['zip'] = $print_profile_node->field_ld_zip_postal_code['und'][0]['value'];\n }\n if (isset($print_profile_node->field_ld_fax['und'])) {\n $vars['fax'] = $print_profile_node->field_ld_fax['und'][0]['value'];\n }\n\n if (isset($vars['node']->field_ld_sales['und'])) {\n $sales_values = array();\n foreach ($vars['node']->field_ld_sales['und'] as $value) {\n $sales_values[] = $value['value'];\n }\n $vars['sales'] = implode(', ', $sales_values);\n }\n}",
"function drush_dslm_add_profile() {\n // Bootstrap dslm, this grabs the instantiated and configured Dslm library object\n if (!$dslm = _dslm_bootstrap()) {\n return FALSE;\n }\n\n $args = drush_get_arguments();\n\n // Get a list of profiles\n $profiles = $dslm->getProfiles();\n\n // Get the profile name via args or interactively\n $profile_name = isset($args[1]) ? $args[1] : FALSE;\n if (!$profile_name) {\n $choices = array();\n foreach ($profiles as $k => $v) {\n $choices[$k] = $k;\n }\n $profile_name = drush_choice($choices);\n if (!$profile_name || !isset($profiles[$profile_name])) {\n return FALSE;\n }\n }\n\n // Get the version via args or interactively\n $profile_Version = isset($args[2]) ? $args[2] : FALSE;\n if (!$profile_version) {\n $choices = array();\n foreach ($profiles[$profile_name]['all'] as $k => $v) {\n $choices[$v] = $v;\n }\n $profile_version = drush_choice($choices);\n if (!$profile_version || !in_array($profile_version, $profiles[$profile_name]['all'])) {\n return FALSE;\n }\n }\n\n // Run the DSLM manageProfile method to add the profile or deal with an error\n if ($dslm->manageProfile($profile_name, $profile_version)) {\n drush_log(\"The profile '$profile_name' version '$profile_version' has been added\", 'ok');\n }\n else {\n drush_log($dslm->lastError(), 'error');\n }\n\n}",
"public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}",
"public function testUpdateProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"private function write_single_profile($profile)\n {\n //$this -> write_aliases($profile['id']);\n //$this -> write_domains($profile['id']);\n //$this -> write_gateways($profile['id']);\n $this->write_settings($profile['id']);\n //$this -> xmlw -> endElement(); //reserved for multi-profile\n }",
"private function write_profiles() {\n $profiles_array = $this -> get_profiles_array();\n $profiles_count = count($profiles_array);\n if ($profiles_count < 1) {\n return ;\n }\n $this -> xmlw -> startElement('profiles');\n\n foreach ($profiles_array as $profile_name => $profile_data) {\n $this -> xmlw -> startElement('profile');\n $this -> xmlw -> writeAttribute('name', $profile_name);\n foreach ($profile_data as $params) {\n //$this -> comment_array($profiles_array[$i]);\n $this -> xmlw -> startElement('param');\n $this -> xmlw -> writeAttribute('name', $params['param_name']);\n $this -> xmlw -> writeAttribute('value', $params['param_value']);\n $this -> xmlw -> endElement();//</param>\n\n }\n $this -> xmlw -> endElement();\n }\n $this -> xmlw -> endElement();\n }",
"public function showProfile()\r\n\t{\r\n\t print \"Profile file: \" . $this->_registry->getConfig()->oproject->profile;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers usage when new attachment is created and attached to a resource | public function onNewAttachment($event) {
$controller = $event->subject;
$request = $controller->request;
$attachment = $event->data['attachment'];
if (empty($request->data['AssetsAsset']['AssetsAssetUsage'])) {
CakeLog::error('No asset usage record to register');
return;
}
$usage = $request->data['AssetsAsset']['AssetsAssetUsage'][0];
$Usage = ClassRegistry::init('Assets.AssetsAssetUsage');
$data = $Usage->create(array(
'asset_id' => $attachment['AssetsAsset']['id'],
'model' => $usage['model'],
'foreign_key' => $usage['foreign_key'],
'featured_image' => $usage['featured_image'],
));
$result = $Usage->save($data);
if (!$result) {
CakeLog::error('Asset Usage registration failed');
CakeLog::error(print_r($Usage->validationErrors, true));
}
$event->result = $result;
} | [
"abstract protected function createEntryAttachmentInstance();",
"protected function addAttachment( $attachment ){\n\t}",
"abstract protected function _attachResource($type, Zend_Pdf_Resource $resource);",
"public function addResource($resource){ }",
"function addAttachment() {\n\t\tif ($this->isAdmin () == TRUE) {\n\t\t\t$this->loadThis ();\n\t\t} else {\n\t\t\t$data [\"companyData\"] = $this->cms_model->getCompanies();\n\t\t\t$data [\"attchmentTypes\"] = $this->cms_model->getAttachmentTypes();\n\t\t\t\n\t\t\t$this->global ['pageTitle'] = 'Feedbacker : Add Attachment';\n\t\t\t$this->loadViews(\"addAttachment\", $this->global, $data, NULL);\n\t\t}\n\t}",
"public function addAttachment($attachment)\n {\n }",
"public static function register() {\n\t\t$attachment_credit = new self();\n\n\t\tadd_filter( 'attachment_fields_to_edit', array( $attachment_credit, 'register_edit_fields' ), 10, 2 );\n\t\tadd_filter( 'attachment_fields_to_save', array( $attachment_credit, 'handle_save_fields' ), 10, 2 );\n\n\t\tadd_action( 'rest_api_init', array( $attachment_credit, 'register_rest_fields' ) );\n\t}",
"public function create_item(/**\n * Fires after a single attachment is completely created or updated via the REST API.\n *\n * @since 5.0.0\n *\n * @param WP_Post $attachment Inserted or updated attachment object.\n * @param WP_REST_Request $request Request object.\n * @param bool $creating True when creating an attachment, false when updating.\n */\n$request) {}",
"public function attach()\n {\n $this->attached = true;\n }",
"protected function insert_attachment(/**\n * Fires after a single attachment is created or updated via the REST API.\n *\n * @since 4.7.0\n *\n * @param WP_Post $attachment Inserted or updated attachment\n * object.\n * @param WP_REST_Request $request The request sent to the API.\n * @param bool $creating True when creating an attachment, false when updating.\n */\n$request) {}",
"public function onAttach()\n {\n }",
"public function attachFile($fieldname, $filename) {}",
"public function testCreateAttachment()\n {\n }",
"public function attach()\n\t{\n\t\t\\Model\\Registry::getInstance()->register($this);\n\t}",
"public function addAttachment()\n {\n global $injector, $notification;\n\n $result = new stdClass;\n $result->action = 'addAttachment';\n if (isset($this->vars->file_id)) {\n $result->file_id = $this->vars->file_id;\n }\n $result->success = 0;\n\n /* A max POST size failure will result in ALL HTTP parameters being\n * empty. Catch that here. */\n if (!isset($this->vars->composeCache)) {\n $notification->push(_(\"Your attachment was not uploaded. Most likely, the file exceeded the maximum size allowed by the server configuration.\"), 'horde.warning');\n } else {\n $imp_compose = $injector->getInstance('IMP_Factory_Compose')->create($this->vars->composeCache);\n\n if ($imp_compose->canUploadAttachment()) {\n try {\n foreach ($imp_compose->addAttachmentFromUpload('file_upload') as $val) {\n if ($val instanceof IMP_Compose_Exception) {\n $notification->push($val, 'horde.error');\n } else {\n $result->success = 1;\n\n /* This currently only occurs when\n * pasting/dropping image into HTML editor. */\n if ($this->vars->img_data) {\n $result->img = new stdClass;\n $result->img->src = strval($val->viewUrl()->setRaw(true));\n\n $temp1 = new DOMDocument();\n $temp2 = $temp1->createElement('span');\n $imp_compose->addRelatedAttachment($val, $temp2, 'src');\n $result->img->related = array(\n $imp_compose::RELATED_ATTR,\n $temp2->getAttribute($imp_compose::RELATED_ATTR)\n );\n } else {\n $this->_base->queue->attachment($val);\n $notification->push(sprintf(_(\"Added \\\"%s\\\" as an attachment.\"), $val->getPart()->getName()), 'horde.success');\n }\n }\n }\n\n $this->_base->queue->compose($imp_compose);\n } catch (IMP_Compose_Exception $e) {\n $notification->push($e, 'horde.error');\n }\n } else {\n $notification->push(_(\"Uploading attachments has been disabled on this server.\"), 'horde.error');\n }\n }\n\n return $this->vars->json_return\n ? $result\n : new Horde_Core_Ajax_Response_HordeCore_JsonHtml($result);\n }",
"public function attach()\n {\n // dummy implementation\n }",
"private function _addAttachement()\n {\n\n //Attach backup\n $this->addElement(\n 'radio',\n 'attachBackup',\n array(\n 'class' => 'radio emailToggle toggler',\n 'label' => 'L_ATTACH_BACKUP',\n 'onclick' => \"myToggle(this, 'y', 'attachToggle');\",\n 'listsep' => ' ',\n 'disableLoadDefaultDecorators' => true,\n 'multiOptions' => array(\n 'y' => 'L_YES',\n 'n' => 'L_NO',\n ),\n 'decorators' => array('Default'),\n )\n );\n\n //Max filesize\n $this->addElement(\n 'text',\n 'Maxsize',\n array(\n 'class' => 'text right emailToggle attachToggle',\n 'size' => 6,\n 'maxlength' => 6,\n 'label' => 'L_EMAIL_MAXSIZE',\n 'listsep' => ' ',\n 'disableLoadDefaultDecorators' => true,\n 'decorators' => array('LineStart'),\n 'validators' => array('Digits'),\n )\n );\n\n //Max filesize unit\n $this->addElement(\n 'select',\n 'MaxsizeUnit',\n array(\n 'class' => 'select emailToggle attachToggle',\n 'listsep' => ' ',\n 'multiOptions' => array(\n 'kb' => 'L_UNIT_KB',\n 'mb' => 'L_UNIT_MB',\n ),\n 'disableLoadDefaultDecorators' => true,\n 'decorators' => array('LineEnd'),\n )\n );\n }",
"protected function registerPhandaAttachments()\n {\n static::setInstance($this);\n $this->instance('app', $this);\n $this->instance(Container::class, $this);\n }",
"public function addAttachments()\n {\n $attachments_relations = [\n 'spots',\n 'plans',\n 'albumPhotos',\n 'areas',\n 'links'\n ];\n $this->addHidden($attachments_relations);\n $this->append('attachments');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if is YITH wishlist page | function oxygen_woocommerce_is_yith_wishlist_page() {
if ( function_exists( 'yith_wcwl_object_id' ) && is_page() ) {
$wishlist_page_id = yith_wcwl_object_id( get_option( 'yith_wcwl_wishlist_page_id' ) );
return $wishlist_page_id && is_page( $wishlist_page_id );
}
return false;
} | [
"private function has_wishlist() {\n\t\treturn $this->get_current_user_wishlist();\n\t}",
"function is_yith_wishlist_premium() {\n\t\treturn ! defined( 'YITH_WCWL_FREE_INIT' ) && file_exists( WP_PLUGIN_DIR . '/yith-woocommerce-wishlist-premium/init.php' );\n\t}",
"public function is_shop_page()\n {\n }",
"protected function is_list_page() {\n\t\treturn false;\n\t}",
"function is_jewellery_page(): bool {\n return (strpos(get_current_url(), '/jewellery') === 0);\n}",
"public function wishlistPage() {\n $wishlist = $this->wishlistProvider->getWishlist('default');\n if (!$wishlist || !$wishlist->hasItems()) {\n return [\n '#theme' => 'commerce_wishlist_empty_page',\n ];\n }\n // Authenticated users should always manage wishlists via the user form.\n $rel = $this->currentUser->isAuthenticated() ? 'user-form' : 'canonical';\n $url = $wishlist->toUrl($rel, ['absolute' => TRUE]);\n\n return new RedirectResponse($url->toString());\n }",
"protected function is_list_page() {\r\n return false;\r\n }",
"public function is_thank_you_page() {\n\t\tglobal $wp;\n\t\t$thank_you_page = false;\n\t\tif ( is_checkout() ) {\n\t\t\tif ( isset( $wp->query_vars['order-received'] ) ) {\n\t\t\t\t$thank_you_page = true;\n\t\t\t\t$this->order = wc_get_order( $wp->query_vars['order-received'] );\n\t\t\t}\n\t\t}\n\t\treturn $thank_you_page;\n\t}",
"private function _isWhitelistedPage() {\n return in_array(\n Mage::getSingleton('cms/page')->getIdentifier(),\n array(\n Mage::getStoreConfig(Mage_Cms_Helper_Page::XML_PATH_NO_ROUTE_PAGE),\n Mage::getStoreConfig(Mage_Cms_Helper_Page::XML_PATH_NO_COOKIES_PAGE)\n )\n );\n }",
"function foodhunt_is_in_woocommerce_page() {\nreturn ( is_shop() || is_product_category() || is_product_tag() || is_product() || is_cart() || is_checkout() || is_account_page() ) ? true : false;\n}",
"public function hasPage();",
"function poco_handheld_footer_bar_wishlist() {\n if (function_exists('yith_wcwl_count_all_products')) {\n ?>\n <a class=\"footer-wishlist\" href=\"<?php echo esc_url(get_permalink(get_option('yith_wcwl_wishlist_page_id'))); ?>\">\n <span class=\"title\"><?php echo esc_html__('Wishlist', 'poco'); ?></span>\n <span class=\"count\"><?php echo esc_html(yith_wcwl_count_all_products()); ?></span>\n </a>\n <?php\n }\n }",
"static function is_plugin_page() {\r\n $current_screen = get_current_screen();\r\n\r\n if ($current_screen->id == 'tools_page_wf-sn') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function isInWishList()\n {\n $pdo = static::getDB();\n $sql = \"select count(*) from wishlists w, products p where w.product_id = p.product_id and w.user_id = :user_id and p.product_id = :product_id\";\n $result = $pdo->prepare($sql);\n $result->execute([\n 'user_id' => Auth::getUserId(),\n 'product_id' => $this->PRODUCT_ID\n ]);\n\n $rowsCount = $result->fetchColumn(); \n\n if($rowsCount >= 1){\n return true;\n }\n return false;\n }",
"public function checkIfInWWPPSettingsPage () {\n\n if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'wwc_license_settings' && isset( $_GET[ 'tab' ] ) && $_GET[ 'tab' ] == 'wwpp' )\n return true;\n else\n return false;\n\n }",
"function is_page() {\n\tglobal $app;\n\n\treturn $app['registry']->had('page');\n}",
"function is_wppe_page() {\n\t\t\tglobal $page_hook;\n\n\t\t\tif ( $page_hook === $this->page )\n\t\t\t\treturn true;\n\n\t\t\treturn false;\n\t\t}",
"protected function isWikiTextTalkPage() {\n\t\t$title = $this->getTitle();\n\t\tif ( !$title->isTalkPage() ) {\n\t\t\t$title = $title->getTalkPage();\n\t\t}\n\t\treturn $title->getContentModel() === CONTENT_MODEL_WIKITEXT;\n\t}",
"public function wishlist(){\n\t\tif($this->session->userdata('userlogin')){\n\t\t\t//Load Item To Wishlist\n\t\t\t$data=array(\n\t\t\t\t'main_view' => 'home/wishlist_view',\n\t\t\t\t'navcategory' => $this->home_model->navcaregory(),\n\t\t\t\t'wishlist' => $this->home_model->getwishlistbyuser()\n\t\t\t\t);\n\t\t\t$this->load->view('layout/home_layout', $data);\n\t\t}\n\t\telse{\n\t\t\tredirect('welcome','refresh');\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10 for regional HealthCheckService, and not more than 1 for global HealthCheckService. HealthCheck resources must have portSpecification=USE_SERVING_PORT or portSpecification=USE_FIXED_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks must belong to the same region as zones of NetworkEndpointGroups. For global HealthCheckService using global INTERNET_IP_PORT NetworkEndpointGroups, the global HealthChecks must specify sourceRegions, and HealthChecks that specify sourceRegions can only be used with global INTERNET_IP_PORT NetworkEndpointGroups. Generated from protobuf field repeated string health_checks = 448370606; | public function setHealthChecks($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->health_checks = $arr;
return $this;
} | [
"public function listHttpHealthChecks($project, $optParams = array()) {\n $params = array('project' => $project);\n $params = array_merge($params, $optParams);\n $data = $this->__call('list', array($params));\n if ($this->useObjects()) {\n return new Google_HttpHealthCheckList($data);\n } else {\n return $data;\n }\n }",
"public function getHealthChecks()\n {\n return $this->health_checks;\n }",
"public function setHealths($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\Compute\\V1\\HealthStatusForNetworkEndpoint::class);\n $this->healths = $arr;\n\n return $this;\n }",
"public function listHealthchecksWithHttpInfo($options)\n {\n $request = $this->listHealthchecksRequest($options);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\Fastly\\Model\\HealthcheckResponse[]' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\Fastly\\Model\\HealthcheckResponse[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\Fastly\\Model\\HealthcheckResponse[]';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Fastly\\Model\\HealthcheckResponse[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function data_cron_health_checks() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'+5 minutes',\n\t\t\t\t'good',\n\t\t\t\t__( 'Scheduled events are running' ),\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'-50 minutes',\n\t\t\t\t'recommended',\n\t\t\t\t__( 'A scheduled event is late' ),\n\t\t\t\ttrue,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'-500 minutes',\n\t\t\t\t'recommended',\n\t\t\t\t__( 'A scheduled event has failed' ),\n\t\t\t\tfalse,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'-50 minutes',\n\t\t\t\t\t'-500 minutes',\n\t\t\t\t),\n\t\t\t\t'recommended',\n\t\t\t\t__( 'A scheduled event has failed' ),\n\t\t\t\ttrue,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t);\n\t}",
"function run_checks() : array {\n\t$checks = [\n\t\t'mysql' => run_mysql_healthcheck(),\n\t\t'object-cache' => run_object_cache_healthcheck(),\n\t\t'cron-waiting' => run_cron_healthcheck(),\n\t\t'cron-canary' => Cavalcade\\check_health(),\n\t\t'elasticsearch' => run_elasticsearch_healthcheck(),\n\t];\n\t$checks = apply_filters( 'altis_healthchecks', $checks );\n\n\treturn $checks;\n}",
"public function checkUrls()\n {\n return $this->hasMany(CheckUrl::class);\n }",
"public function get_checks ( ) {\n\n\t\t\t$url = $this->build_url( 'checks' );\n\n\t\t\t$checks = $this->get( $url );\n\n\t\t\t// we want to format the checks and use standardized keys, so here we go\n\t\t\t$cs = array();\n\n\t\t\tforeach ( $checks as $check ) {\n\t\t\t\t$c = new Nodeping_Check( $check );\n\n\t\t\t\t$cs[ $c->id ] = $c;\n\t\t\t}\n\n\t\t\treturn $cs;\n\n\t\t}",
"public function add_health_checks($tests)\n {\n }",
"public function getHealthCheckArray(): array\n {\n $check = $this->check;\n\n if ($check['lastUpdated'] instanceof DateTime) {\n $check['lastUpdated'] = $check['lastUpdated']->format(DateTime::ATOM);\n }\n\n return $check;\n }",
"public function setHealthCheck($var)\n {\n GPBUtil::checkString($var, True);\n $this->health_check = $var;\n\n return $this;\n }",
"function add_elasticsearch_healthcheck( array $checks ) : array {\n\t$checks['elasticsearch'] = run_elasticsearch_healthcheck();\n\t$checks['elasticpress-index'] = run_elasticpress_indexed_healthcheck();\n\t$checks['elasticpress-synced'] = run_elasticpress_synced_healthcheck();\n\n\treturn $checks;\n}",
"function run_instance_checks() : array {\n\t$checks = [\n\t\t'php' => true,\n\t];\n\n\t/**\n\t * Filters Instance Healthchecks response.\n\t *\n\t * @param array $checks List of instance checks.\n\t */\n\treturn apply_filters( 'altis_instance_healthchecks', $checks );\n}",
"public function getChecks()\n {\n if (null == $this->checks) {\n if (!isset($this->config['checks']) || !is_array($this->config['checks'])) {\n return array();\n }\n $this->checks = array();\n foreach ($this->config['checks'] as $config) {\n if (is_array($config)) {\n $this->checks[] = new Check($config);\n }\n }\n }\n return $this->checks;\n }",
"public static function validateBackground_Check_DataForArrayConstraintsFromSetBackground_Check_Data(array $values = array())\n {\n $message = '';\n $invalidValues = [];\n foreach ($values as $worker_DataTypeBackground_Check_DataItem) {\n // validation for constraint: itemType\n if (!$worker_DataTypeBackground_Check_DataItem instanceof \\WorkdayWsdl\\\\StructType\\Background_Check_Overall_Status_DataType) {\n $invalidValues[] = is_object($worker_DataTypeBackground_Check_DataItem) ? get_class($worker_DataTypeBackground_Check_DataItem) : sprintf('%s(%s)', gettype($worker_DataTypeBackground_Check_DataItem), var_export($worker_DataTypeBackground_Check_DataItem, true));\n }\n }\n if (!empty($invalidValues)) {\n $message = sprintf('The Background_Check_Data property can only contain items of type \\WorkdayWsdl\\\\StructType\\Background_Check_Overall_Status_DataType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));\n }\n unset($invalidValues);\n return $message;\n }",
"public function configuredChecks() {\n if ($this->checks === null) {\n $this->checks = [];\n foreach( $this->config as $driver => $checkConfig ) {\n // check if multiple or just one\n if (is_array($checkConfig)) {\n foreach( $checkConfig as $key => $config ) {\n $instance = $this->createInstance( $driver, $config );\n $instance->setInstanceName(is_string($key)?$key:$config);\n $this->checks[] = $instance;\n }\n } else {\n $instance = $this->createInstance( $driver, $checkConfig );\n $this->checks[] = $instance;\n }\n }\n }\n return $this->checks;\n }",
"public function getCheckResourceBatch()\n {\n return $this->readOneof(4);\n }",
"public function applicationCheckUrlStatus()\n {\n if (empty($this->checkurlStatus)) {\n $length = count($this->checkUrls);\n $missed = 0;\n\n foreach ($this->checkUrls as $link) {\n if ($link->last_status) {\n $missed++;\n }\n }\n\n $this->checkurlStatus = ['missed' => $missed, 'length' => $length];\n }\n\n return $this->checkurlStatus;\n }",
"public function setHttpsHealthCheck($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Compute\\V1\\HTTPSHealthCheck::class);\n $this->https_health_check = $var;\n\n return $this;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
verify if at least one id value is set | final public function hasEmptyId() {
foreach ($this->getModel()->getIdProperties() as $propertyName => $property) {
if(!is_null($this->getValue($propertyName))) {
return false;
}
}
return true;
} | [
"public function issetId()\n {\n return !empty($this->id);\n }",
"function hasIdValue() {\n return false;\n }",
"protected function _issetId($id)\n {\n $stack = $this->getStackRowsIdentifiers();\n return !($stack->count() == 0 || !in_array($id, $stack->toArray()));\n }",
"public function hasId() {\n return isset($this->attributes['id']);\n }",
"public function hasNotId(): bool\n {\n return \\is_null($this->id);\n }",
"protected function hasIdsParameter()\n {\n return isset($this->payload['ids']);\n }",
"public static function hasIdProperty(): bool;",
"public function hasId()\n {\n return (empty($this->id)) ? false : true;\n }",
"private function __validate_id() {\n if ($this->validate_id === false) {\n } elseif (isset($this->initial_data[\"id\"])) {\n if (array_key_exists($this->initial_data[\"id\"], $this->config[\"unbound\"][\"hosts\"])) {\n $this->id = $this->initial_data[\"id\"];\n } else {\n $this->errors[] = APIResponse\\get(2016);\n }\n } else {\n $this->errors[] = APIResponse\\get(2015);\n }\n }",
"abstract public static function hasIdProperty(): bool;",
"public function hasID(){\n if( isset($this->_Response->id) ){\n $this->id = $this->_Response->id;\n $this->_isError = false;\n return true;\n }else{\n return false;\n }\n }",
"public function ValidId()\r\n\t{\r\n\t\t$id = (int)$this->GetId();\r\n\t\tif ($id > 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function isValidId ($id) {\r\n return $id != null && $id > 0;\r\n }",
"public function checkAditionalParameters()\n {\n $this->params['id'] = isset ($this->params['id']) ? $this->params['id'] : null;\n }",
"public static function hasIdProperty(): bool\n {\n return static::getIdProperty() !== null;\n }",
"public function isEmpty(): bool\n\t{\n\t\treturn (empty($this->id));\n\t}",
"public function isId () {}",
"function _checkId($id)\n\t{\n\t\t//passed id null or string\n\t \tif($id==null OR !(is_numeric($id)))\n\t\treturn false;\n\t\t//Checking server id exist or not in database\n\t\tif( $this->WpServer->find( 'count', array('conditions' => array('WpServer.id' => $id)) ) <= 0 )\n\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"private function __validate_id() {\n if (isset($this->initial_data[\"id\"])) {\n # Loop through each alias and check for a match\n foreach ($this->config[\"aliases\"][\"alias\"] as $id=>$alias) {\n # First check if the ID matches the index value or the alias name\n if ($this->initial_data[\"id\"] === $id or $this->initial_data[\"id\"] === $alias[\"name\"]) {\n $this->id = $id;\n $this->validated_data = $alias;\n $this->original_name = $alias[\"name\"];\n break;\n }\n }\n # If we did not find an ID in the loop, return a not found error\n if (is_null($this->id)) {\n $this->errors[] = APIResponse\\get(4055);\n }\n } else {\n $this->errors[] = APIResponse\\get(4050);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the module name to use for translations Wrapper for _getTranslationModule(), with cache | public function getTranslationModule()
{
if (!$this->hasData('translation_module')) {
if (!$translationModule = $this->_getTranslationModule()) {
$translationModule = 'customgrid';
}
$this->setData('translation_module', $translationModule);
}
return $this->_getData('translation_module');
} | [
"public function getMessageTranslationModule() {\n\t\t$module = null;\n\t\t$currentController = Yii::app()->getController();\n\t\tif (is_object($currentController)) {\n\t\t\t$module = $currentController->getModule();\n\t\t}\n\t\tif (!is_object($module)) {\n\t\t\t$module = Yii::app()->getModule('messagetranslation');\n\t\t}\n\t\treturn $module;\n\t}",
"public function getImageTranslationModule() {\n\t\t$module = null;\n\t\t$currentController = Yii::app()->getController();\n\t\tif (is_object($currentController)) {\n\t\t\t$module = $currentController->getModule();\n\t\t}\n\t\tif (!is_object($module)) {\n\t\t\t$module = Yii::app()->getModule('imagetranslation');\n\t\t}\n\t\treturn $module;\n\t}",
"public static function getModuleName(sfContext $context)\n {\n $modulename = $context -> getModuleName();\n $translation = self::getProperty(\"translator\", array());\n\n if (isset($translation[$modulename]))\n {\n if (is_array($translation[$modulename]))\n {\n return empty($translation[$modulename][\"title\"]) ? $modulename : $translation[$modulename][\"title\"];\n }\n else\n {\n return $translation[$modulename];\n }\n }\n // we should check if we can get the module name from the item representing it in the dash menu\n else foreach (self::getAllItems() as $key => $item)\n {\n if (($modulename == $key || $modulename == $item['url']))\n {\n if (isset($item['name']))\n {\n return $item['name']; // yay, we got the name!\n }\n else\n {\n break; // we found our item, but it didn't have a special name, break from the search\n }\n }\n }\n\n return $modulename;\n }",
"protected function getModuleName()\r\n {\r\n $route = $this->getRoute();\r\n return $route['module'];\r\n }",
"public function module_name() {\n \t\treturn $this->module_name;\n \t}",
"public static function getModuleTranslation($module, $string, $source)\n\t{\n\t\tglobal $_MODULES, $_MODULE, $_LANGADM;\n\t\tstatic $lang_cache = array();\n\n\t\tif ($module instanceof Module)\n\t\t{\n\t\t\t$name = $module->name;\n\t\t\t$local_path = $module->getLocalPath();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$name = $module;\n\t\t\t$local_path = _PS_MODULE_DIR_.$module.'/';\n\t\t}\n\n\t\t// @retrocompatibility with translations files in module root\n\t\tif (Tools::file_exists_cache($local_path.'/translations/'.Context::getContext()->language->iso_code.'.php'))\n\t\t\t$file = $local_path.'/translations/'.Context::getContext()->language->iso_code.'.php';\n\t\telse\n\t\t\t$file = $local_path.'/'.Context::getContext()->language->iso_code.'.php';\n\n\t\tif (Tools::file_exists_cache($file) && include_once($file))\n\t\t\t$_MODULES = !empty($_MODULES) ? array_merge($_MODULES, $_MODULE) : $_MODULE;\n\n\t\t$string = str_replace('\\'', '\\\\\\'', $string);\n\n\t\t$cache_key = $name.'|'.$string.'|'.$source;\n\t\tif (!isset($lang_cache[$cache_key]))\n\t\t{\n\t\t\tif (!is_array($_MODULES))\n\t\t\t\treturn str_replace('\"', '"', $string);\n\n\t\t\t// set array key to lowercase for 1.3 compatibility\n\t\t\t$_MODULES = array_change_key_case($_MODULES);\n\t\t\t$currentKey = '<{'.strtolower($name).'}'.strtolower(_THEME_NAME_).'>'.strtolower($source).'_'.md5($string);\n\t\t\t$defaultKey = '<{'.strtolower($name).'}prestashop>'.strtolower($source).'_'.md5($string);\n\n\t\t\tif (isset($_MODULES[$currentKey]))\n\t\t\t\t$ret = stripslashes($_MODULES[$currentKey]);\n\t\t\telseif (isset($_MODULES[Tools::strtolower($currentKey)]))\n\t\t\t\t$ret = stripslashes($_MODULES[Tools::strtolower($currentKey)]);\n\t\t\telseif (isset($_MODULES[$defaultKey]))\n\t\t\t\t$ret = stripslashes($_MODULES[$defaultKey]);\n\t\t\telseif (isset($_MODULES[Tools::strtolower($defaultKey)]))\n\t\t\t\t$ret = stripslashes($_MODULES[Tools::strtolower($defaultKey)]);\n\t\t\t// if translation was not found in module, look for it in AdminController or Helpers\n\t\t\telseif (!empty($_LANGADM))\n\t\t\t\t$ret = Translate::getGenericAdminTranslation($string, null, $_LANGADM);\n\t\t\telse\n\t\t\t\t$ret = stripslashes($string);\n\n\t\t\t$lang_cache[$cache_key] = str_replace('\"', '"', $ret);\n\t\t}\n\t\treturn $lang_cache[$cache_key];\n\t}",
"static function getModuleName() {\n $module_name = ui_module::GetModuleName();\n return $module_name;\n }",
"public function getNameModule()\n {\n return $this->nameModule;\n }",
"public function getModuleName() {\n\t\treturn $this->getModule()->get('name');\n\t}",
"public static function findTranslationModuleName(Varien_Simplexml_Element $node)\n {\n $result = $node->getAttribute('module');\n if ($result) {\n return (string)$result;\n }\n foreach (array_reverse($node->xpath('ancestor::*[@module]')) as $element) {\n $result = $element->getAttribute('module');\n if ($result) {\n return (string)$result;\n }\n }\n foreach ($node->xpath('ancestor-or-self::*[last()-1]') as $handle) {\n $name = Mage::getConfig()->determineOmittedNamespace($handle->getName());\n if ($name) {\n return $name;\n }\n }\n return 'core';\n }",
"public function getModuleRealName() {\n return $this->realModuleName;\n }",
"public static function module_name()\n {\n $class = Controller::curr()->class;\n $file = SS_ClassLoader::instance()->getItemPath($class);\n\n if ($file) {\n $dir = dirname($file);\n while (dirname($dir) != BASE_PATH) {\n $dir = dirname($dir);\n }\n\n $module = basename($dir);\n if ($module == 'openstack') {\n $module = Injector::inst()->get('ViewableData')->ThemeDir();\n }\n\n return $module;\n }\n\n return null;\n }",
"public function getModuleName()\n {\n return $this->module_name;\n }",
"public function get_module_title();",
"public function getModuleName()\n {\n $array = $this->requests->current();\n return $array['module'];\n }",
"function return_mod_list_strings_language($language, $module)\n{\n global $mod_list_strings;\n global $sugar_config;\n global $currentModule;\n\n $cache_key = 'mod_list_str_lang.' . $language . $module;\n\n // Check for cached value\n $cache_entry = sugar_cache_retrieve($cache_key);\n if (!empty($cache_entry)) {\n return $cache_entry;\n }\n\n $language_used = $language;\n $temp_mod_list_strings = $mod_list_strings;\n $default_language = $sugar_config['default_language'];\n\n if ($currentModule == $module && isset($mod_list_strings) && $mod_list_strings != null) {\n return $mod_list_strings;\n }\n\n // cn: bug 6351 - include en_us if file langpack not available\n // cn: bug 6048 - merge en_us with requested language\n include \"modules/$module/language/en_us.lang.php\";\n $en_mod_list_strings = array();\n if ($language_used != $default_language) {\n $en_mod_list_strings = $mod_list_strings;\n }\n\n if (file_exists(\"modules/$module/language/$language.lang.php\")) {\n include \"modules/$module/language/$language.lang.php\";\n }\n\n if (file_exists(\"modules/$module/language/$language.lang.override.php\")) {\n include \"modules/$module/language/$language.lang.override.php\";\n }\n\n if (file_exists(\"modules/$module/language/$language.lang.php.override\")) {\n echo 'Please Change:<br>' . \"modules/$module/language/$language.lang.php.override\" . '<br>to<br>' . 'Please Change:<br>' . \"modules/$module/language/$language.lang.override.php\";\n include \"modules/$module/language/$language.lang.php.override\";\n }\n\n // cn: bug 6048 - merge en_us with requested language\n $mod_list_strings = sugarLangArrayMerge($en_mod_list_strings, $mod_list_strings);\n\n // if we still don't have a language pack, then log an error\n if (!isset($mod_list_strings)) {\n $GLOBALS['log']->fatal(\"Unable to load the application list language file for the selected language($language) or the default language($default_language) for module({$module})\");\n\n return;\n }\n\n $return_value = $mod_list_strings;\n $mod_list_strings = $temp_mod_list_strings;\n\n sugar_cache_put($cache_key, $return_value);\n\n return $return_value;\n}",
"public function getModuleName()\n\t{\n\t\t$name = $this->_getModuleName();\n\t\tlist($company, $module) = explode('_', $name);\n\t\treturn strtolower(implode('_', array($module)));\n\t}",
"function return_custom_module_language($language, $module)\n{\n global $log;\n global $default_language;\n $log->debug(\"Entering return_custom_module_language method ...\");\n\n if(is_file(\"cache/modules/$module/language/$language.lang.php\"))\n {\n include(\"cache/modules/$module/language/$language.lang.php\");\n }\n\n if(!isset($mod_strings))\n {\n $log->fatal(\"Unable to load the module($module) language file for the selected language($language) or the default language($default_language)\");\n $log->debug(\"Exiting return_custom_module_language method ...\");\n return null;\n }\n\n $return_value = $mod_strings;\n\n $log->debug(\"Exiting return_custom_module_language method ...\");\n return $return_value;\n}",
"protected function _getModuleName()\n {\n if (!$this->_moduleName) {\n $class = get_class($this);\n $this->_moduleName = substr($class, 0, strpos($class, '\\\\Helper'));\n }\n return str_replace('\\\\', '_', $this->_moduleName);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all exchange items | public function getExchangeItems(); | [
"public function getAllItems() {\n $result = array();\n foreach ($this->queue as $item) {\n $result[] = $item->data;\n }\n return $result;\n }",
"public function getExchanges();",
"public function getAllItems()\n {\n }",
"public function listExchanges()\n {\n $response = $this->send('/api/exchanges');\n }",
"public function getAllOrderItems()\n {\n }",
"public function getAllItems()\n {\n $processingQueueName = $this->getProcessingQueueName();\n $timeoutsHashName = $this->getTimeoutsHashName();\n\n $result = [];\n while (true) {\n $chunk = $this->redis->queueGet(\n $this->name,\n $processingQueueName,\n $timeoutsHashName,\n $this->options[self::OPT_GET_MAX_CHUNK_SIZE],\n $this->time->micro()\n );\n $result = array_merge($result, $chunk);\n\n if (count($chunk) < $this->options[self::OPT_GET_MAX_CHUNK_SIZE]) {\n break;\n }\n }\n\n return $result;\n }",
"static function getAllItems() {\n\t\t\t\t\n\t\t$data = parent::query(\"SELECT *\n\t\t\t\t\t\t\t\tFROM `sells_objects`\n\t\t\t\t\t\t\t\");\n\t\t\t\t\t\t\t\t\n\t\treturn $data;\t\n\t}",
"public function getAll(): Collection\n {\n return Cache::remember(\n \"meal-items-all\",\n 86400 ,\n function () {\n return MealItem::orderByDesc('created_at')->get();\n });\n }",
"public function getExchangeInfo();",
"public function items()\n {\n\n // Get the requested language\n $language = $this->requestedLanguage();\n\n // Grab the collection of requested items\n $collection = Redis::get(CacheItem::$cache_prefix . AllTradeableItemList::$key);\n $collection = unserialize($collection);\n\n // Go through the collection and clean up the attributes\n foreach ($collection as &$item) {\n\n // Rename \"name\" attribute\n $item['name'] = $item['name_' . $language];\n unset($item['name_en']);\n unset($item['name_de']);\n unset($item['name_fr']);\n unset($item['name_es']);\n\n }\n\n return $this->apiResponse($collection, 86400);\n\n }",
"protected function allItems() {\n\t\treturn $this->allItemsExcept(['BigKey', 'Key']);\n\t}",
"public function getItems()\n {\n if (!$this->items) {\n $items = array();\n foreach ($this->data['items'] as $archiveData) {\n $items[] = new Archive($archiveData, array( 'client' => $this->client ));\n }\n $this->items = $items;\n }\n return $this->items;\n }",
"public function all() {\n\t\treturn $this->items;\n\t}",
"public function getOrdersItems();",
"public function listExchanges()\n {\n return $this->fullNode->request('/wallet/listexchanges', [], 'post');\n }",
"public function getItems()\n {\n $items = Item::forTransaction($this->transactionId)->excludeSvcCharge()->get();\n return $items;\n }",
"public function getAll(): PriceListCollectionTransfer;",
"public function getExhibitors(){\r\n\t\trequire_once \"data/Exhibitor.php\";\r\n\t\t$sql = \"SELECT * FROM \".Exhibitor::getTable().\" ORDER BY NAME ASC\";\r\n\t\t$result = $this->db->query($sql);\r\n\t\tif (PEAR::isError($result)){\r\n\t\t\tprint $result->getMessage();\t\r\n\t\t}else{\r\n\t\t\t$output = array();\r\n\t\t\twhile ( $data = $result->fetchRow(MDB2_FETCHMODE_ASSOC)){\r\n\t\t\t\t$ex = new Exhibitor\t();\r\n\t\t\t\t$ex->initFromDb($data);\r\n\t\t\t\t$output[] = $ex;\r\n\t\t\t}\r\n\t\t\treturn $output;\r\n\t\t}\r\n\t}",
"public function all()\n {\n \treturn $this->enterpriseRepo->all();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the maximum header block size in bytes. | public static function getMaxHeaderBlockSize()
{
if (empty(MHTTPD_Message::$maxHeaderBlockSize)) {
MHTTPD_Message::$maxHeaderBlockSize = (
(MHTTPD_Message::$maxHeaders * MHTTPD_Message::$maxHeaderNameSize)
+ (MHTTPD_Message::$maxHeaders * MHTTPD_Message::$maxHeaderValueSize)
+ 1024 // to be safe
);
}
return MHTTPD_Message::$maxHeaderBlockSize;
} | [
"public function getMaxblocksize()\n {\n return $this->maxblocksize;\n }",
"public function getMaximumSize()\n {\n return self::MAX_SIZE;\n }",
"public function getSize()\n {\n return $this->block_size;\n }",
"public function getMaxSize() {\n return number_format($this->max/1024, 1) . 'KB';\n }",
"public function getMaxSize()\n {\n // Since $max is measured in bytes,\n // dividing $max by 1024 yields kB\n return number_format($this->_max/1024, 1) . 'kB';\n }",
"public function getBlockLength(): int\n {\n return $this->blockSize;\n }",
"public function getSize()\n {\n return ($this->headers['Content-Length'] / 1000000) . \" MB\";\n }",
"public function getMaxChunks()\n\t{\n\t\treturn ceil(($this->name !== null ? filesize($this->name) : 0) / $this->size);\n\t}",
"public function blockDataSize() { return $this->_m_blockDataSize; }",
"public function getMaxSize()\n {\n return $this->maxSize;\n }",
"public static function getMaxUploadSizeInBytes() {\n\t\treturn (self::getMaxUploadSize() * 1024 * 1024);\n\t}",
"public function getBlockLengthInBytes(): int\n {\n return $this->blockSize >> 3;\n }",
"public function getMaxSize() {\n\treturn number_format($this->_max/1048576, 1) . \"MB\"; // number_format() formats a number with grouped thousands\n }",
"public function getMaxSize() {\n\t\t\treturn $this->maxSize >= 0 ? $this->maxSize : $this->getTotalMaxSize();\n\t\t}",
"public static function getImageMaxSizeInBytes() {\n\t\treturn (ImageBase::IMAGE_MAX_SIZE_IN_MB * 1024 * 1024);\n\t}",
"public function getHeaderSize() {\r\n return $this->header_size;\r\n }",
"public function getMaxFileSize()\n {\n return $this->max_file_size;\n }",
"public function getMaxMessageSize()\n {\n return isset($this->settings[self::PARAM_MAX_MESSAGE_SIZE])\n ? (int)$this->settings[self::PARAM_MAX_MESSAGE_SIZE]\n : 0;\n }",
"public static function BytesPerBlock(): int;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Formats a string containing the fullyqualified path to represent a project_cmekSettings resource. | public static function projectCmekSettingsName($project)
{
return self::getProjectCmekSettingsNameTemplate()->render([
'project' => $project,
]);
} | [
"public static function projectSettingsName(string $project): string\n {\n return self::getPathTemplate('projectSettings')->render([\n 'project' => $project,\n ]);\n }",
"public function getPath()\n {\n $sname = '';\n $gname = '';\n $vname = $this->getName();\n if ( $this->getConfigGroup() ) {\n if ( $this->getConfigGroup()->getConfigSection() ) {\n $sname = $this->getConfigGroup()->getConfigSection()->getName();\n }\n $gname = $this->getConfigGroup()->getName();\n }\n\n return sprintf(\n '%s:%s:%s',\n $sname,\n $gname,\n $vname\n );\n }",
"public function getPathStringFormat()\n {\n return $this->getPathFormat($this->path);\n }",
"protected function formatPath($path)\n {\n // canary...\n if(empty($path)){ return ''; }//if\n \n // make sure path doesn't end with a slash...\n if(mb_substr($path,-1) == DIRECTORY_SEPARATOR)\n {\n $path = mb_substr($path,0,-1);\n }//if\n \n return $path;\n \n }",
"private function standardize($path)\n\t{\n\t\t$content_root = array_get($this->config, 'content_root');\n\n\t\t$path = Path::trimSlashes(Path::assemble($content_root, $path));\n\n\t\t// If an already standardized path is passed in, the content root will double up.\n\t\t// Address that.\n\t\t$path = str_replace($content_root . '/' . $content_root, $content_root, $path);\n\n\t\treturn $path;\n\t}",
"public function setPathToSetting($path);",
"protected function formatPath($path)\n {\n $path = rtrim($path, '/');\n $path = rtrim($path, '\\\\');\n $path .= DIRECTORY_SEPARATOR;\n return $path;\n }",
"public static function projectComponentSettingsName($project, $component)\n {\n return self::getProjectComponentSettingsNameTemplate()->render([\n 'project' => $project,\n 'component' => $component,\n ]);\n }",
"public static function formatPath($path){\r\n\r\n \t$osSeparator = FilesManager::getInstance()->getDirectorySeparator();\r\n\r\n \tif($path == null){\r\n\r\n \t\treturn '';\r\n \t}\r\n\r\n \tif(!is_string($path)){\r\n\r\n \t\tthrow new Exception('StringUtils->formatPath: Specified path must be a string');\r\n \t}\r\n\r\n \t// Replace all slashes on the path with the os default\r\n \t$path = str_replace('/', $osSeparator, $path);\r\n \t$path = str_replace('\\\\', $osSeparator, $path);\r\n\r\n \t// Remove duplicate path separator characters\r\n \twhile(strpos($path, $osSeparator.$osSeparator) !== false) {\r\n\r\n \t\t$path = str_replace($osSeparator.$osSeparator, $osSeparator, $path);\r\n \t}\r\n\r\n \t// Remove the last slash only if it exists, to prevent duplicate directory separator\r\n \tif(substr($path, strlen($path) - 1) == $osSeparator){\r\n\r\n \t\t$path = substr($path, 0, strlen($path) - 1);\r\n \t}\r\n\r\n \treturn $path;\r\n }",
"protected function getPath(): string\n {\n return $this->config->get('drivers.json.path', 'setting.json');\n }",
"public function setSettingsPath($path)\n {\n $this->settings_path = $path;\n return $this;\n }",
"public static function getSettingsNamespace(): string {}",
"private function getSettingsDir($path = null)\n {\n return app_path(\"config/settings\").$path;\n }",
"public function GetPath()\n\t{\n\t\t$projectRoot = GitPHP_Util::AddSlash(GitPHP_Config::GetInstance()->GetValue('projectroot'));\n\n\t\treturn $projectRoot . $this->project;\n\t}",
"private static function getCoreConfigContent($path) {\n\t\t\t$flashKey = md5(mt_rand(0, 999999) . time() . mt_rand(0, 999999));\n\t\t\t$path = self::calculateAbsoluteDestPath($path);\n\n\t\t\t$coreConf = \"<?php\\n\\t\";\n\t\t\t$coreConf .= \"define('JIAOYU_PROJECT_HOME', '$path');\\n\\t\";\n\t\t\t$coreConf .= \"define('JIAOYU_FLASH_KEY', '$flashKey');\\n\";\n\t\t\treturn $coreConf;\n\t\t}",
"public static function get_project_path( string $path = '' ) : string {\n return get_template_directory() . $path;\n }",
"public function GetPath()\n\t{\n\t\treturn GitPHP_Config::GetInstance()->GetValue('projectroot') . $this->project;\n\t}",
"function config_path($path = '')\n {\n\n return get_template_directory() . '/config/' . $path;\n\n }",
"private static function formatPath($path)\n {\n if (!preg_match('/\\.php$/', $path)) {\n $path .= '.php';\n }\n $path = preg_replace('/\\/{2,}/', '/', $path);\n return $path;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation salesDocumentAttachmentsV2DeleteAsync Delete a customer invoice draft attachment. | public function salesDocumentAttachmentsV2DeleteAsync($customer_invoice_draft_id, $attachment_id)
{
return $this->salesDocumentAttachmentsV2DeleteAsyncWithHttpInfo($customer_invoice_draft_id, $attachment_id)
->then(
function ($response) {
return $response[0];
}
);
} | [
"public function salesDocumentAttachmentsV2Delete($customer_invoice_draft_id, $attachment_id)\n {\n list($response) = $this->salesDocumentAttachmentsV2DeleteWithHttpInfo($customer_invoice_draft_id, $attachment_id);\n return $response;\n }",
"public function salesDocumentAttachmentsV2DeleteAsyncWithHttpInfo($customer_invoice_draft_id, $attachment_id)\n {\n $returnType = 'object';\n $request = $this->salesDocumentAttachmentsV2DeleteRequest($customer_invoice_draft_id, $attachment_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function salesDocumentAttachmentsV2DeleteWithHttpInfo($customer_invoice_draft_id, $attachment_id)\n {\n $returnType = 'object';\n $request = $this->salesDocumentAttachmentsV2DeleteRequest($customer_invoice_draft_id, $attachment_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function salesDocumentAttachmentsV2DeleteCustomerInvoiceDraftAsync($customer_invoice_draft_id, $attachment_id)\n {\n return $this->salesDocumentAttachmentsV2DeleteCustomerInvoiceDraftAsyncWithHttpInfo($customer_invoice_draft_id, $attachment_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function customerInvoiceDraftsV2DeleteAsync($customer_invoice_draft_id)\n {\n return $this->customerInvoiceDraftsV2DeleteAsyncWithHttpInfo($customer_invoice_draft_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function deleteF24AttachmentAsyncWithHttpInfo($company_id, $document_id, string $contentType = self::contentTypes['deleteF24Attachment'][0])\n {\n $returnType = '';\n $request = $this->deleteF24AttachmentRequest($company_id, $document_id, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function deleteAttachment($taskId, $attachmentId);",
"public function salesDocumentAttachmentsV2PostCustomerInvoiceDraftAsync($body)\n {\n return $this->salesDocumentAttachmentsV2PostCustomerInvoiceDraftAsyncWithHttpInfo($body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function salesDocumentAttachmentsV2DeleteCustomerInvoiceDraftAsyncWithHttpInfo($customer_invoice_draft_id, $attachment_id)\n {\n $returnType = 'object';\n $request = $this->salesDocumentAttachmentsV2DeleteCustomerInvoiceDraftRequest($customer_invoice_draft_id, $attachment_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteAttachment($doc, $attachment_name) {\r\n\t\tif (!is_object($doc)) {\r\n\t\t\tthrow new InvalidArgumentException(\"Document should be an object\");\r\n\t\t}\r\n\r\n\t\tif (!$doc->_id) {\r\n\t\t\tthrow new InvalidArgumentException(\"Document should have an ID\");\r\n\t\t}\r\n\r\n\t\tif (!strlen($attachment_name)) {\r\n\t\t\tthrow new InvalidArgumentException(\"Attachment name not set\");\r\n\t\t}\r\n\r\n\t\t$url = '/' . urlencode($this->dbname) .\r\n\t\t'/' . urlencode($doc->_id) .\r\n\t\t'/' . urlencode($attachment_name);\r\n\t\treturn $this->_queryAndTest('DELETE', $url, array(200, 202), array('rev' => $doc->_rev));\r\n\t}",
"abstract function deleteAttachment($attachment);",
"public function voucherDraftsV2DeleteAsync($voucher_draft_id)\n {\n return $this->voucherDraftsV2DeleteAsyncWithHttpInfo($voucher_draft_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function deleteAttachment($id, $nameAttachment);",
"public function testDeleteAttachment()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function deleteAttachments() {\n\n $deletedAttachments = Attachment::findAll(['email_id' => $this->id, 'is_deleted' => true]);\n\n if(count($deletedAttachments) > 0) {\n foreach ($deletedAttachments as $deletedAttachment) {\n unlink($deletedAttachment->downloadUrl);\n $deletedAttachment->delete();\n }\n }\n\n return true;\n }",
"public function customerInvoiceDraftsV2GetAsync()\n {\n return $this->customerInvoiceDraftsV2GetAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function delete() {\n foreach ($this->attachments()->get() as $attachment) {\n $attachment->remove();\n }\n return parent::delete();\n }",
"protected function _deleteAttachments()\n {\n $this->getModelFromCache('XenForo_Model_Attachment')\n ->deleteAttachmentsFromContentIds(\n $this->getContentType(),\n array($this->getId())\n );\n }",
"public function deleteConversationsEmailMessagesDraftAttachmentWithHttpInfo($conversationId, $attachmentId)\n {\n $returnType = '';\n $request = $this->deleteConversationsEmailMessagesDraftAttachmentRequest($conversationId, $attachmentId);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 413:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 415:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 503:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 504:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.